OSDN Git Service

Merge "Log setVideoSurface() and setVideoSurfaceTexture() failures."
authorJames Dong <jdong@google.com>
Fri, 22 Jul 2011 17:09:22 +0000 (10:09 -0700)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Fri, 22 Jul 2011 17:09:22 +0000 (10:09 -0700)
441 files changed:
Android.mk
api/14.txt
api/current.txt
cmds/am/src/com/android/commands/am/Am.java
cmds/dumpstate/Android.mk
cmds/dumpstate/dumpstate.c
cmds/dumpstate/dumpstate.h
core/java/android/app/ActivityManagerNative.java
core/java/android/app/ActivityThread.java
core/java/android/app/ApplicationThreadNative.java
core/java/android/app/ContextImpl.java
core/java/android/app/IActivityManager.java
core/java/android/app/IApplicationThread.java
core/java/android/app/Instrumentation.java
core/java/android/app/StatusBarManager.java
core/java/android/appwidget/AppWidgetHost.java
core/java/android/appwidget/AppWidgetProviderInfo.java
core/java/android/bluetooth/BluetoothDeviceProfileState.java
core/java/android/bluetooth/BluetoothHeadset.java
core/java/android/content/ComponentCallbacks.java
core/java/android/content/Context.java
core/java/android/database/MatrixCursor.java
core/java/android/hardware/Camera.java
core/java/android/inputmethodservice/ExtractEditLayout.java
core/java/android/net/EthernetDataTracker.java
core/java/android/net/INetworkManagementEventObserver.aidl
core/java/android/net/TrafficStats.java
core/java/android/net/VpnBuilder.java [new file with mode: 0644]
core/java/android/nfc/INfcAdapter.aidl
core/java/android/nfc/INfcTag.aidl
core/java/android/nfc/NfcAdapter.java
core/java/android/nfc/tech/IsoDep.java
core/java/android/nfc/tech/MifareClassic.java
core/java/android/nfc/tech/MifareUltralight.java
core/java/android/nfc/tech/NfcA.java
core/java/android/nfc/tech/NfcF.java
core/java/android/os/Handler.java
core/java/android/os/Looper.java
core/java/android/os/RecoverySystem.java
core/java/android/os/SystemClock.java
core/java/android/preference/PreferenceActivity.java
core/java/android/provider/ContactsContract.java
core/java/android/provider/MediaStore.java
core/java/android/provider/Settings.java
core/java/android/provider/VoicemailContract.java
core/java/android/server/BluetoothBondState.java
core/java/android/server/BluetoothService.java
core/java/android/service/textservice/SpellCheckerService.java [new file with mode: 0644]
core/java/android/service/textservice/SpellCheckerSession.java [new file with mode: 0644]
core/java/android/speech/tts/AudioPlaybackHandler.java
core/java/android/speech/tts/SynthesisMessageParams.java
core/java/android/util/JsonReader.java
core/java/android/util/Patterns.java
core/java/android/view/CollapsibleActionView.java [new file with mode: 0644]
core/java/android/view/Display.java
core/java/android/view/DisplayList.java
core/java/android/view/GLES20Canvas.java
core/java/android/view/GLES20DisplayList.java
core/java/android/view/GLES20RecordingCanvas.java
core/java/android/view/HardwareRenderer.java
core/java/android/view/View.java
core/java/android/view/ViewDebug.java
core/java/android/view/ViewGroup.java
core/java/android/view/textservice/SpellCheckerInfo.aidl [new file with mode: 0644]
core/java/android/view/textservice/SpellCheckerInfo.java [new file with mode: 0644]
core/java/android/view/textservice/SuggestionsInfo.aidl [new file with mode: 0644]
core/java/android/view/textservice/SuggestionsInfo.java [new file with mode: 0644]
core/java/android/view/textservice/TextInfo.aidl [new file with mode: 0644]
core/java/android/view/textservice/TextInfo.java [new file with mode: 0644]
core/java/android/view/textservice/TextServicesManager.java [new file with mode: 0644]
core/java/android/webkit/WebView.java
core/java/android/webkit/WebViewCore.java
core/java/android/webkit/ZoomManager.java
core/java/android/widget/AbsListView.java
core/java/android/widget/ActivityChooserModel.java
core/java/android/widget/ActivityChooserView.java
core/java/android/widget/AdapterView.java
core/java/android/widget/CheckedTextView.java
core/java/android/widget/Gallery.java
core/java/android/widget/GridLayout.java
core/java/android/widget/ImageView.java
core/java/android/widget/TextView.java
core/java/com/android/internal/app/ActionBarImpl.java
core/java/com/android/internal/app/AlertController.java
core/java/com/android/internal/statusbar/IStatusBarService.aidl
core/java/com/android/internal/statusbar/StatusBarIcon.java
core/java/com/android/internal/textservice/ISpellCheckerService.aidl [new file with mode: 0644]
core/java/com/android/internal/textservice/ISpellCheckerSession.aidl [new file with mode: 0644]
core/java/com/android/internal/textservice/ISpellCheckerSessionListener.aidl [new file with mode: 0644]
core/java/com/android/internal/textservice/ITextServicesManager.aidl [new file with mode: 0644]
core/java/com/android/internal/textservice/ITextServicesSessionListener.aidl [new file with mode: 0644]
core/java/com/android/internal/view/menu/ActionMenuPresenter.java
core/java/com/android/internal/view/menu/MenuBuilder.java
core/java/com/android/internal/view/menu/MenuItemImpl.java
core/java/com/android/internal/view/menu/SubMenuBuilder.java
core/java/com/android/internal/widget/ActionBarView.java
core/java/com/android/server/NetworkManagementSocketTagger.java
core/jni/android_media_AudioRecord.cpp
core/jni/android_net_wifi_Wifi.cpp
core/jni/android_os_SystemClock.cpp
core/jni/android_view_GLES20Canvas.cpp
core/res/AndroidManifest.xml
core/res/res/drawable-hdpi/text_edit_suggestions_top_window.9.png [deleted file]
core/res/res/drawable-hdpi/text_edit_suggestions_window.9.png [moved from core/res/res/drawable-hdpi/text_edit_suggestions_bottom_window.9.png with 100% similarity]
core/res/res/drawable-mdpi/text_edit_suggestions_top_window.9.png [deleted file]
core/res/res/drawable-mdpi/text_edit_suggestions_window.9.png [moved from core/res/res/drawable-mdpi/text_edit_suggestions_bottom_window.9.png with 100% similarity]
core/res/res/layout-sw600dp/preference_list_content.xml
core/res/res/layout/text_edit_suggestion_item.xml
core/res/res/layout/text_edit_suggestions_window.xml [moved from core/res/res/layout/text_edit_suggestions_top_window.xml with 98% similarity]
core/res/res/values-land/dimens.xml
core/res/res/values-sw600dp/bools.xml
core/res/res/values-sw600dp/dimens.xml
core/res/res/values-w1024dp/dimens.xml [moved from core/res/res/layout/text_edit_suggestions_bottom_window.xml with 68% similarity]
core/res/res/values-w1280dp/dimens.xml
core/res/res/values/attrs.xml
core/res/res/values/bools.xml
core/res/res/values/dimens.xml
core/res/res/values/public.xml
core/res/res/values/strings.xml
core/res/res/values/styles.xml
core/res/res/values/themes.xml
core/tests/coretests/src/android/database/MatrixCursorTest.java
core/tests/coretests/src/android/util/JsonReaderTest.java
core/tests/coretests/src/android/util/PatternsTest.java
data/fonts/DroidKufi-Bold.ttf [new file with mode: 0644]
data/fonts/DroidKufi-Regular.ttf [new file with mode: 0644]
data/fonts/DroidNaskh-Bold.ttf [new file with mode: 0644]
data/fonts/DroidNaskh-Regular.ttf [new file with mode: 0644]
data/fonts/DroidSansArabic.ttf [deleted file]
data/fonts/fallback_fonts.xml
data/fonts/fonts.mk
docs/html/guide/appendix/api-levels.jd
docs/html/guide/developing/tools/adb.jd
docs/html/guide/practices/design/jni.jd
docs/html/guide/topics/intents/intents-filters.jd
docs/html/guide/topics/manifest/activity-element.jd
docs/html/guide/topics/providers/content-providers.jd
docs/html/sdk/android-3.1.jd
docs/html/sdk/android-3.2.jd [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/alldiffs_index_additions.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/alldiffs_index_all.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/alldiffs_index_changes.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/alldiffs_index_removals.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.Manifest.permission.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.R.attr.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.R.style.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.app.Activity.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.app.ActivityGroup.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.app.Fragment.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.app.FragmentManager.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.app.FragmentTransaction.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.app.KeyguardManager.KeyguardLock.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.app.KeyguardManager.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.app.LocalActivityManager.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.app.TabActivity.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.content.pm.ActivityInfo.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.content.pm.ApplicationInfo.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.content.pm.PackageManager.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.content.res.Configuration.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.graphics.Point.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.graphics.PointF.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.hardware.usb.UsbDeviceConnection.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.net.ConnectivityManager.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.os.Binder.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.os.Build.VERSION_CODES.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.os.IBinder.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.os.ParcelFileDescriptor.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.os.PowerManager.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.telephony.TelephonyManager.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.util.DisplayMetrics.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.view.Display.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/android.view.KeyEvent.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/changes-summary.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/classes_index_additions.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/classes_index_all.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/classes_index_changes.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/classes_index_removals.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/constructors_index_additions.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/constructors_index_all.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/constructors_index_changes.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/constructors_index_removals.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/fields_index_additions.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/fields_index_all.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/fields_index_changes.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/fields_index_removals.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/jdiff_help.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/jdiff_statistics.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/jdiff_topleftframe.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/methods_index_additions.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/methods_index_all.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/methods_index_changes.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/methods_index_removals.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/packages_index_additions.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/packages_index_all.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/packages_index_changes.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/packages_index_removals.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/pkg_android.app.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/pkg_android.content.pm.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/pkg_android.content.res.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/pkg_android.graphics.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/pkg_android.hardware.usb.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/pkg_android.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/pkg_android.net.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/pkg_android.os.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/pkg_android.telephony.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/pkg_android.util.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/changes/pkg_android.view.html [new file with mode: 0644]
docs/html/sdk/api_diff/13/stylesheet-jdiff.css [new file with mode: 0644]
docs/html/sdk/sdk_toc.cs
graphics/jni/android_renderscript_RenderScript.cpp
include/gui/ISurfaceTexture.h
include/gui/SurfaceTexture.h
include/gui/SurfaceTextureClient.h
include/media/AudioEffect.h
include/media/AudioSystem.h
include/media/IAudioPolicyService.h
include/media/MediaProfiles.h
include/media/mediascanner.h
include/media/stagefright/StagefrightMediaScanner.h
include/media/stagefright/openmax/OMX_IVCommon.h
include/surfaceflinger/ISurfaceComposerClient.h
include/surfaceflinger/Surface.h
include/utils/Pool.h [deleted file]
libs/gui/ISurfaceComposerClient.cpp
libs/gui/ISurfaceTexture.cpp
libs/gui/Surface.cpp
libs/gui/SurfaceComposerClient.cpp
libs/gui/SurfaceTexture.cpp
libs/gui/SurfaceTextureClient.cpp
libs/gui/tests/SurfaceTextureClient_test.cpp
libs/hwui/DisplayListRenderer.cpp
libs/hwui/DisplayListRenderer.h
libs/hwui/OpenGLRenderer.cpp
libs/rs/Android.mk
libs/rs/driver/rsdBcc.cpp
libs/rs/rsContext.cpp
libs/rs/rsFBOCache.h
libs/ui/FramebufferNativeWindow.cpp
libs/utils/Android.mk
libs/utils/Pool.cpp [deleted file]
location/java/com/android/internal/location/GpsNetInitiatedHandler.java
media/java/android/media/AudioManager.java
media/java/android/media/AudioRecord.java
media/java/android/media/AudioService.java
media/java/android/media/AudioTrack.java
media/java/android/media/MediaScanner.java
media/java/android/media/videoeditor/MediaArtistNativeHelper.java
media/java/android/media/videoeditor/MediaImageItem.java
media/java/android/media/videoeditor/MediaProperties.java
media/java/android/media/videoeditor/MediaVideoItem.java
media/java/android/media/videoeditor/VideoEditor.java
media/java/android/media/videoeditor/VideoEditorImpl.java
media/java/android/media/videoeditor/VideoEditorProfile.java [new file with mode: 0755]
media/jni/android_media_MediaProfiles.cpp
media/jni/android_media_MediaScanner.cpp
media/jni/mediaeditor/VideoEditorClasses.cpp
media/jni/mediaeditor/VideoEditorPropertiesMain.cpp
media/libeffects/data/audio_effects.conf
media/libeffects/factory/Android.mk
media/libeffects/factory/EffectsFactory.c
media/libeffects/factory/EffectsFactory.h
media/libmedia/AudioEffect.cpp
media/libmedia/AudioRecord.cpp
media/libmedia/AudioSystem.cpp
media/libmedia/IAudioPolicyService.cpp
media/libmedia/MediaProfiles.cpp
media/libmedia/MediaScanner.cpp
media/libmedia/MediaScannerClient.cpp
media/libmedia/mediaplayer.cpp
media/libstagefright/ACodec.cpp
media/libstagefright/CameraSource.cpp
media/libstagefright/ESDS.cpp
media/libstagefright/OMXCodec.cpp
media/libstagefright/StagefrightMediaScanner.cpp
media/libstagefright/codecs/avc/dec/Android.mk [deleted file]
media/libstagefright/codecs/avc/dec/SoftAVC.cpp [deleted file]
media/libstagefright/codecs/avc/dec/SoftAVC.h [deleted file]
media/libstagefright/codecs/avc/dec/include/avcdec_api.h [deleted file]
media/libstagefright/codecs/avc/dec/include/pvavcdecoder.h [deleted file]
media/libstagefright/codecs/avc/dec/include/pvavcdecoderinterface.h [deleted file]
media/libstagefright/codecs/avc/dec/src/avc_bitstream.cpp [deleted file]
media/libstagefright/codecs/avc/dec/src/avcdec_api.cpp [deleted file]
media/libstagefright/codecs/avc/dec/src/avcdec_bitstream.h [deleted file]
media/libstagefright/codecs/avc/dec/src/avcdec_int.h [deleted file]
media/libstagefright/codecs/avc/dec/src/avcdec_lib.h [deleted file]
media/libstagefright/codecs/avc/dec/src/header.cpp [deleted file]
media/libstagefright/codecs/avc/dec/src/itrans.cpp [deleted file]
media/libstagefright/codecs/avc/dec/src/pred_inter.cpp [deleted file]
media/libstagefright/codecs/avc/dec/src/pred_intra.cpp [deleted file]
media/libstagefright/codecs/avc/dec/src/residual.cpp [deleted file]
media/libstagefright/codecs/avc/dec/src/slice.cpp [deleted file]
media/libstagefright/codecs/avc/dec/src/vlc.cpp [deleted file]
media/libstagefright/colorconversion/SoftwareRenderer.cpp
media/libstagefright/httplive/LiveSession.cpp
media/libstagefright/httplive/M3UParser.cpp
media/libstagefright/omx/SoftOMXPlugin.cpp
native/android/native_window.cpp
opengl/tests/gl2_copyTexImage/Android.mk [new file with mode: 0644]
opengl/tests/gl2_copyTexImage/gl2_copyTexImage.cpp [new file with mode: 0644]
packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
packages/SystemUI/res/layout-sw600dp/compat_mode_help.xml
packages/SystemUI/res/layout-sw600dp/status_bar.xml
packages/SystemUI/res/layout-sw600dp/status_bar_input_methods_item.xml
packages/SystemUI/res/layout-sw600dp/status_bar_notification_area.xml
packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel_title.xml
packages/SystemUI/res/layout/navigation_bar.xml
packages/SystemUI/res/values/strings.xml
packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
packages/SystemUI/src/com/android/systemui/statusbar/LatestItemView.java
packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/IconMerger.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/Ticker.java
packages/SystemUI/src/com/android/systemui/statusbar/policy/AccessibilityContentDescriptions.java [new file with mode: 0644]
packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java
packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothController.java
packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java
packages/SystemUI/src/com/android/systemui/statusbar/tablet/CompatModePanel.java
packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodsPanel.java
packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationArea.java [new file with mode: 0644]
packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanelTitle.java [new file with mode: 0644]
packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPeekPanel.java
packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletTicker.java
policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java
policy/src/com/android/internal/policy/impl/PhoneWindow.java
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
services/audioflinger/AudioFlinger.cpp
services/audioflinger/AudioFlinger.h
services/audioflinger/AudioPolicyService.cpp
services/audioflinger/AudioPolicyService.h
services/camera/libcameraservice/CameraService.cpp
services/input/InputDispatcher.cpp
services/input/InputDispatcher.h
services/java/com/android/server/AppWidgetService.java
services/java/com/android/server/ConnectivityService.java
services/java/com/android/server/InputMethodManagerService.java
services/java/com/android/server/MasterClearReceiver.java
services/java/com/android/server/NetworkManagementService.java
services/java/com/android/server/NotificationManagerService.java
services/java/com/android/server/StatusBarManagerService.java
services/java/com/android/server/SystemServer.java
services/java/com/android/server/TextServicesManagerService.java [new file with mode: 0644]
services/java/com/android/server/ThrottleService.java
services/java/com/android/server/WifiService.java
services/java/com/android/server/am/ActivityManagerService.java
services/java/com/android/server/am/ActivityStack.java
services/java/com/android/server/am/ProcessRecord.java
services/java/com/android/server/connectivity/Tethering.java
services/java/com/android/server/connectivity/Vpn.java
services/java/com/android/server/pm/Settings.java
services/java/com/android/server/usb/UsbDeviceManager.java
services/jni/com_android_server_UsbDeviceManager.cpp
services/sensorservice/SensorService.cpp
services/surfaceflinger/Layer.cpp
services/surfaceflinger/Layer.h
services/surfaceflinger/SurfaceFlinger.cpp
services/surfaceflinger/SurfaceTextureLayer.cpp
services/surfaceflinger/SurfaceTextureLayer.h
services/surfaceflinger/Transform.cpp
services/surfaceflinger/clz.h
telephony/java/com/android/internal/telephony/PhoneBase.java
telephony/java/com/android/internal/telephony/cdma/CDMALTEPhone.java
telephony/java/com/android/internal/telephony/cdma/CdmaLteServiceStateTracker.java
telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
tests/BiDiTests/Android [deleted file]
tests/BiDiTests/Android-private.mk [moved from tests/BiDiTests/Android.mk with 100% similarity]
tests/BiDiTests/new-attributes.txt [new file with mode: 0644]
tests/BiDiTests/res/drawable/alphabet_a.png [new file with mode: 0644]
tests/BiDiTests/res/drawable/alphabet_b.png [new file with mode: 0644]
tests/BiDiTests/res/drawable/alphabet_c.png [new file with mode: 0644]
tests/BiDiTests/res/drawable/alphabet_d.png [new file with mode: 0644]
tests/BiDiTests/res/drawable/alphabet_e.png [new file with mode: 0644]
tests/BiDiTests/res/drawable/alphabet_f.png [new file with mode: 0644]
tests/BiDiTests/res/drawable/alphabet_g.png [new file with mode: 0644]
tests/BiDiTests/res/drawable/alphabet_h.png [new file with mode: 0644]
tests/BiDiTests/res/drawable/alphabet_i.png [new file with mode: 0644]
tests/BiDiTests/res/drawable/alphabet_j.png [new file with mode: 0644]
tests/BiDiTests/res/layout/gallery_ltr.xml [new file with mode: 0644]
tests/BiDiTests/res/layout/gallery_rtl.xml [new file with mode: 0644]
tests/BiDiTests/src/com/android/bidi/BiDiTestActivity.java
tests/BiDiTests/src/com/android/bidi/BiDiTestGalleryImages.java [new file with mode: 0644]
tests/BiDiTests/src/com/android/bidi/BiDiTestGalleryLtr.java [new file with mode: 0644]
tests/BiDiTests/src/com/android/bidi/BiDiTestGalleryRtl.java [new file with mode: 0644]
tests/HwAccelerationTest/src/com/android/test/hwui/ListActivity.java
tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java
tests/StatusBar/src/com/android/statusbartest/StatusBarTest.java
tests/TileBenchmark/Android.mk [new file with mode: 0644]
tests/TileBenchmark/AndroidManifest.xml [new file with mode: 0644]
tests/TileBenchmark/res/drawable-hdpi/icon.png [new file with mode: 0644]
tests/TileBenchmark/res/drawable-ldpi/icon.png [new file with mode: 0644]
tests/TileBenchmark/res/drawable-mdpi/icon.png [new file with mode: 0644]
tests/TileBenchmark/res/layout/main.xml [new file with mode: 0644]
tests/TileBenchmark/res/layout/playback.xml [new file with mode: 0644]
tests/TileBenchmark/res/values/colors.xml [new file with mode: 0644]
tests/TileBenchmark/res/values/strings.xml [new file with mode: 0644]
tests/TileBenchmark/src/com/test/tilebenchmark/PlaybackActivity.java [new file with mode: 0644]
tests/TileBenchmark/src/com/test/tilebenchmark/PlaybackGraphs.java [new file with mode: 0644]
tests/TileBenchmark/src/com/test/tilebenchmark/PlaybackView.java [new file with mode: 0644]
tests/TileBenchmark/src/com/test/tilebenchmark/ProfileActivity.java [new file with mode: 0644]
tests/TileBenchmark/src/com/test/tilebenchmark/ProfiledWebView.java [new file with mode: 0644]
tests/TileBenchmark/src/com/test/tilebenchmark/TileData.java [new file with mode: 0644]
tools/aapt/AaptAssets.cpp
tools/aapt/AaptAssets.h
tools/aapt/Android.mk
tools/aapt/Bundle.h
tools/aapt/CacheUpdater.h [new file with mode: 0644]
tools/aapt/Command.cpp
tools/aapt/CrunchCache.cpp [new file with mode: 0644]
tools/aapt/CrunchCache.h [new file with mode: 0644]
tools/aapt/DirectoryWalker.h [new file with mode: 0644]
tools/aapt/FileFinder.cpp [new file with mode: 0644]
tools/aapt/FileFinder.h [new file with mode: 0644]
tools/aapt/Images.cpp
tools/aapt/Images.h
tools/aapt/Main.cpp
tools/aapt/Main.h
tools/aapt/Package.cpp
tools/aapt/Resource.cpp
tools/aapt/ZipFile.h
tools/aapt/tests/CrunchCache_test.cpp [new file with mode: 0644]
tools/aapt/tests/FileFinder_test.cpp [new file with mode: 0644]
tools/aapt/tests/MockCacheUpdater.h [new file with mode: 0644]
tools/aapt/tests/MockDirectoryWalker.h [new file with mode: 0644]
tools/aapt/tests/MockFileFinder.h [new file with mode: 0644]
tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
tools/layoutlib/bridge/src/android/text/AndroidBidi_Delegate.java [new file with mode: 0644]
tools/layoutlib/bridge/src/android/view/inputmethod/InputMethodManager_Delegate.java
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeIInputMethodManager.java
tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java
wifi/java/android/net/wifi/WifiInfo.java
wifi/java/android/net/wifi/WifiManager.java
wifi/java/android/net/wifi/WifiNative.java
wifi/java/android/net/wifi/WifiStateMachine.java
wifi/java/android/net/wifi/WifiWatchdogStateMachine.java

index 335fb73..3b0fc59 100644 (file)
@@ -158,6 +158,11 @@ LOCAL_SRC_FILES += \
        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/textservice/ISpellCheckerService.aidl \
+       core/java/com/android/internal/textservice/ISpellCheckerSession.aidl \
+       core/java/com/android/internal/textservice/ISpellCheckerSessionListener.aidl \
+       core/java/com/android/internal/textservice/ITextServicesManager.aidl \
+       core/java/com/android/internal/textservice/ITextServicesSessionListener.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 \
@@ -266,6 +271,11 @@ aidl_files := \
        frameworks/base/core/java/android/view/Surface.aidl \
        frameworks/base/core/java/android/view/WindowManager.aidl \
        frameworks/base/core/java/android/widget/RemoteViews.aidl \
+       frameworks/base/core/java/com/android/internal/textservice/ISpellCheckerService.aidl \
+       frameworks/base/core/java/com/android/internal/textservice/ISpellCheckerSession.aidl \
+       frameworks/base/core/java/com/android/internal/textservice/ISpellCheckerSessionListener.aidl \
+       frameworks/base/core/java/com/android/internal/textservice/ITextServicesManager.aidl \
+       frameworks/base/core/java/com/android/internal/textservice/ITextServicesSessionListener.aidl \
        frameworks/base/core/java/com/android/internal/view/IInputContext.aidl \
        frameworks/base/core/java/com/android/internal/view/IInputMethod.aidl \
        frameworks/base/core/java/com/android/internal/view/IInputMethodCallback.aidl \
index d25d2b9..2a1bcac 100644 (file)
@@ -19820,8 +19820,8 @@ package android.util {
     field public static final java.util.regex.Pattern IP_ADDRESS;
     field public static final java.util.regex.Pattern PHONE;
     field public static final java.util.regex.Pattern TOP_LEVEL_DOMAIN;
-    field public static final java.lang.String TOP_LEVEL_DOMAIN_STR = "((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\\-\\-mgbaam7a8h|xn\\-\\-mgberp4a5d4ar|xn\\-\\-wgbh1c|xn\\-\\-zckzah)|y[et]|z[amw])";
-    field public static final java.lang.String TOP_LEVEL_DOMAIN_STR_FOR_WEB_URL = "(?:(?: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\\-\\-mgbaam7a8h|xn\\-\\-mgberp4a5d4ar|xn\\-\\-wgbh1c|xn\\-\\-zckzah)|y[et]|z[amw]))";
+    field public static final java.lang.String TOP_LEVEL_DOMAIN_STR = "((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]|(\u03b4\u03bf\u03ba\u03b9\u03bc\u03ae|\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435|\u0440\u0444|\u0441\u0440\u0431|\u05d8\u05e2\u05e1\u05d8|\u0622\u0632\u0645\u0627\u06cc\u0634\u06cc|\u0625\u062e\u062a\u0628\u0627\u0631|\u0627\u0644\u0627\u0631\u062f\u0646|\u0627\u0644\u062c\u0632\u0627\u0626\u0631|\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629|\u0627\u0644\u0645\u063a\u0631\u0628|\u0627\u0645\u0627\u0631\u0627\u062a|\u0628\u06be\u0627\u0631\u062a|\u062a\u0648\u0646\u0633|\u0633\u0648\u0631\u064a\u0629|\u0641\u0644\u0633\u0637\u064a\u0646|\u0642\u0637\u0631|\u0645\u0635\u0631|\u092a\u0930\u0940\u0915\u094d\u0937\u093e|\u092d\u093e\u0930\u0924|\u09ad\u09be\u09b0\u09a4|\u0a2d\u0a3e\u0a30\u0a24|\u0aad\u0abe\u0ab0\u0aa4|\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe|\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8|\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd|\u0baa\u0bb0\u0bbf\u0b9f\u0bcd\u0b9a\u0bc8|\u0c2d\u0c3e\u0c30\u0c24\u0c4d|\u0dbd\u0d82\u0d9a\u0dcf|\u0e44\u0e17\u0e22|\u30c6\u30b9\u30c8|\u4e2d\u56fd|\u4e2d\u570b|\u53f0\u6e7e|\u53f0\u7063|\u65b0\u52a0\u5761|\u6d4b\u8bd5|\u6e2c\u8a66|\u9999\u6e2f|\ud14c\uc2a4\ud2b8|\ud55c\uad6d|xn\\-\\-0zwm56d|xn\\-\\-11b5bs3a9aj6g|xn\\-\\-3e0b707e|xn\\-\\-45brj9c|xn\\-\\-80akhbyknj4f|xn\\-\\-90a3ac|xn\\-\\-9t4b11yi5a|xn\\-\\-clchc0ea0b2g2a9gcd|xn\\-\\-deba0ad|xn\\-\\-fiqs8s|xn\\-\\-fiqz9s|xn\\-\\-fpcrj9c3d|xn\\-\\-fzc2c9e2c|xn\\-\\-g6w251d|xn\\-\\-gecrj9c|xn\\-\\-h2brj9c|xn\\-\\-hgbk6aj7f53bba|xn\\-\\-hlcj6aya9esc7a|xn\\-\\-j6w193g|xn\\-\\-jxalpdlp|xn\\-\\-kgbechtv|xn\\-\\-kprw13d|xn\\-\\-kpry57d|xn\\-\\-lgbbat1ad8j|xn\\-\\-mgbaam7a8h|xn\\-\\-mgbayh7gpa|xn\\-\\-mgbbh1a71e|xn\\-\\-mgbc0a9azcg|xn\\-\\-mgberp4a5d4ar|xn\\-\\-o3cw4h|xn\\-\\-ogbpf8fl|xn\\-\\-p1ai|xn\\-\\-pgbs0dh|xn\\-\\-s9brj9c|xn\\-\\-wgbh1c|xn\\-\\-wgbl6a|xn\\-\\-xkc2al3hye2a|xn\\-\\-xkc2dl3a5ee0h|xn\\-\\-yfro4i67o|xn\\-\\-ygbi2ammx|xn\\-\\-zckzah|xxx)|y[et]|z[amw])";
+    field public static final java.lang.String TOP_LEVEL_DOMAIN_STR_FOR_WEB_URL = "(?:(?: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]|(?:\u03b4\u03bf\u03ba\u03b9\u03bc\u03ae|\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435|\u0440\u0444|\u0441\u0440\u0431|\u05d8\u05e2\u05e1\u05d8|\u0622\u0632\u0645\u0627\u06cc\u0634\u06cc|\u0625\u062e\u062a\u0628\u0627\u0631|\u0627\u0644\u0627\u0631\u062f\u0646|\u0627\u0644\u062c\u0632\u0627\u0626\u0631|\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629|\u0627\u0644\u0645\u063a\u0631\u0628|\u0627\u0645\u0627\u0631\u0627\u062a|\u0628\u06be\u0627\u0631\u062a|\u062a\u0648\u0646\u0633|\u0633\u0648\u0631\u064a\u0629|\u0641\u0644\u0633\u0637\u064a\u0646|\u0642\u0637\u0631|\u0645\u0635\u0631|\u092a\u0930\u0940\u0915\u094d\u0937\u093e|\u092d\u093e\u0930\u0924|\u09ad\u09be\u09b0\u09a4|\u0a2d\u0a3e\u0a30\u0a24|\u0aad\u0abe\u0ab0\u0aa4|\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe|\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8|\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd|\u0baa\u0bb0\u0bbf\u0b9f\u0bcd\u0b9a\u0bc8|\u0c2d\u0c3e\u0c30\u0c24\u0c4d|\u0dbd\u0d82\u0d9a\u0dcf|\u0e44\u0e17\u0e22|\u30c6\u30b9\u30c8|\u4e2d\u56fd|\u4e2d\u570b|\u53f0\u6e7e|\u53f0\u7063|\u65b0\u52a0\u5761|\u6d4b\u8bd5|\u6e2c\u8a66|\u9999\u6e2f|\ud14c\uc2a4\ud2b8|\ud55c\uad6d|xn\\-\\-0zwm56d|xn\\-\\-11b5bs3a9aj6g|xn\\-\\-3e0b707e|xn\\-\\-45brj9c|xn\\-\\-80akhbyknj4f|xn\\-\\-90a3ac|xn\\-\\-9t4b11yi5a|xn\\-\\-clchc0ea0b2g2a9gcd|xn\\-\\-deba0ad|xn\\-\\-fiqs8s|xn\\-\\-fiqz9s|xn\\-\\-fpcrj9c3d|xn\\-\\-fzc2c9e2c|xn\\-\\-g6w251d|xn\\-\\-gecrj9c|xn\\-\\-h2brj9c|xn\\-\\-hgbk6aj7f53bba|xn\\-\\-hlcj6aya9esc7a|xn\\-\\-j6w193g|xn\\-\\-jxalpdlp|xn\\-\\-kgbechtv|xn\\-\\-kprw13d|xn\\-\\-kpry57d|xn\\-\\-lgbbat1ad8j|xn\\-\\-mgbaam7a8h|xn\\-\\-mgbayh7gpa|xn\\-\\-mgbbh1a71e|xn\\-\\-mgbc0a9azcg|xn\\-\\-mgberp4a5d4ar|xn\\-\\-o3cw4h|xn\\-\\-ogbpf8fl|xn\\-\\-p1ai|xn\\-\\-pgbs0dh|xn\\-\\-s9brj9c|xn\\-\\-wgbh1c|xn\\-\\-wgbl6a|xn\\-\\-xkc2al3hye2a|xn\\-\\-xkc2dl3a5ee0h|xn\\-\\-yfro4i67o|xn\\-\\-ygbi2ammx|xn\\-\\-zckzah|xxx)|y[et]|z[amw]))";
     field public static final java.util.regex.Pattern WEB_URL;
   }
 
index 4997ae6..f88001d 100644 (file)
@@ -21,6 +21,7 @@ package android {
     field public static final java.lang.String BIND_DEVICE_ADMIN = "android.permission.BIND_DEVICE_ADMIN";
     field public static final java.lang.String BIND_INPUT_METHOD = "android.permission.BIND_INPUT_METHOD";
     field public static final java.lang.String BIND_REMOTEVIEWS = "android.permission.BIND_REMOTEVIEWS";
+    field public static final java.lang.String BIND_TEXT_SERVICE = "android.permission.BIND_TEXT_SERVICE";
     field public static final java.lang.String BIND_WALLPAPER = "android.permission.BIND_WALLPAPER";
     field public static final java.lang.String BLUETOOTH = "android.permission.BLUETOOTH";
     field public static final java.lang.String BLUETOOTH_ADMIN = "android.permission.BLUETOOTH_ADMIN";
@@ -82,6 +83,7 @@ package android {
     field public static final java.lang.String READ_SMS = "android.permission.READ_SMS";
     field public static final java.lang.String READ_SYNC_SETTINGS = "android.permission.READ_SYNC_SETTINGS";
     field public static final java.lang.String READ_SYNC_STATS = "android.permission.READ_SYNC_STATS";
+    field public static final java.lang.String READ_WRITE_OWN_VOICEMAIL = "com.android.voicemail.permission.READ_WRITE_OWN_VOICEMAIL";
     field public static final java.lang.String REBOOT = "android.permission.REBOOT";
     field public static final java.lang.String RECEIVE_BOOT_COMPLETED = "android.permission.RECEIVE_BOOT_COMPLETED";
     field public static final java.lang.String RECEIVE_MMS = "android.permission.RECEIVE_MMS";
@@ -183,14 +185,14 @@ package android {
   public static final class R.attr {
     ctor public R.attr();
     field public static final int absListViewStyle = 16842858; // 0x101006a
-    field public static final int accessibilityEventTypes = 16843649; // 0x1010381
-    field public static final int accessibilityFeedbackType = 16843651; // 0x1010383
-    field public static final int accessibilityFlags = 16843653; // 0x1010385
+    field public static final int accessibilityEventTypes = 16843647; // 0x101037f
+    field public static final int accessibilityFeedbackType = 16843649; // 0x1010381
+    field public static final int accessibilityFlags = 16843651; // 0x1010383
     field public static final int accountPreferences = 16843423; // 0x101029f
     field public static final int accountType = 16843407; // 0x101028f
     field public static final int action = 16842797; // 0x101002d
     field public static final int actionBarSize = 16843499; // 0x10102eb
-    field public static final int actionBarSplitStyle = 16843675; // 0x101039b
+    field public static final int actionBarSplitStyle = 16843669; // 0x1010395
     field public static final int actionBarStyle = 16843470; // 0x10102ce
     field public static final int actionBarTabBarStyle = 16843508; // 0x10102f4
     field public static final int actionBarTabStyle = 16843507; // 0x10102f3
@@ -206,10 +208,10 @@ package android {
     field public static final int actionModeCopyDrawable = 16843538; // 0x1010312
     field public static final int actionModeCutDrawable = 16843537; // 0x1010311
     field public static final int actionModePasteDrawable = 16843539; // 0x1010313
-    field public static final int actionModeSelectAllDrawable = 16843647; // 0x101037f
-    field public static final int actionModeStyle = 16843688; // 0x10103a8
+    field public static final int actionModeSelectAllDrawable = 16843645; // 0x101037d
+    field public static final int actionModeStyle = 16843681; // 0x10103a1
     field public static final int actionOverflowButtonStyle = 16843510; // 0x10102f6
-    field public static final int actionProviderClass = 16843677; // 0x101039d
+    field public static final int actionProviderClass = 16843670; // 0x1010396
     field public static final int actionViewClass = 16843516; // 0x10102fc
     field public static final int activatedBackgroundIndicator = 16843517; // 0x10102fd
     field public static final int activityCloseEnterAnimation = 16842938; // 0x10100ba
@@ -221,7 +223,7 @@ package android {
     field public static final int alertDialogIcon = 16843605; // 0x1010355
     field public static final int alertDialogStyle = 16842845; // 0x101005d
     field public static final int alertDialogTheme = 16843529; // 0x1010309
-    field public static final int alignmentMode = 16843641; // 0x1010379
+    field public static final int alignmentMode = 16843639; // 0x1010377
     field public static final int allContactsName = 16843468; // 0x10102cc
     field public static final int allowBackup = 16843392; // 0x1010280
     field public static final int allowClearUserData = 16842757; // 0x1010005
@@ -255,8 +257,8 @@ package android {
     field public static final int background = 16842964; // 0x10100d4
     field public static final int backgroundDimAmount = 16842802; // 0x1010032
     field public static final int backgroundDimEnabled = 16843295; // 0x101021f
-    field public static final int backgroundSplit = 16843679; // 0x101039f
-    field public static final int backgroundStacked = 16843678; // 0x101039e
+    field public static final int backgroundSplit = 16843672; // 0x1010398
+    field public static final int backgroundStacked = 16843671; // 0x1010397
     field public static final int backupAgent = 16843391; // 0x101027f
     field public static final int baseline = 16843548; // 0x101031c
     field public static final int baselineAlignBottom = 16843042; // 0x1010122
@@ -265,7 +267,7 @@ package android {
     field public static final int borderlessButtonStyle = 16843563; // 0x101032b
     field public static final int bottom = 16843184; // 0x10101b0
     field public static final int bottomBright = 16842957; // 0x10100cd
-    field public static final int bottomChevronDrawable = 16843660; // 0x101038c
+    field public static final int bottomChevronDrawable = 16843658; // 0x101038a
     field public static final int bottomDark = 16842953; // 0x10100c9
     field public static final int bottomLeftRadius = 16843179; // 0x10101ab
     field public static final int bottomMedium = 16842958; // 0x10100ce
@@ -284,7 +286,7 @@ package android {
     field public static final int cacheColorHint = 16843009; // 0x1010101
     field public static final int calendarViewShown = 16843596; // 0x101034c
     field public static final int calendarViewStyle = 16843613; // 0x101035d
-    field public static final int canRetrieveWindowContent = 16843654; // 0x1010386
+    field public static final int canRetrieveWindowContent = 16843652; // 0x1010384
     field public static final int candidatesTextStyleSpans = 16843312; // 0x1010230
     field public static final deprecated int capitalize = 16843113; // 0x1010169
     field public static final int centerBright = 16842956; // 0x10100cc
@@ -313,18 +315,18 @@ package android {
     field public static final int codes = 16843330; // 0x1010242
     field public static final int collapseColumns = 16843083; // 0x101014b
     field public static final int color = 16843173; // 0x10101a5
-    field public static final int colorActivatedHighlight = 16843684; // 0x10103a4
+    field public static final int colorActivatedHighlight = 16843677; // 0x101039d
     field public static final int colorBackground = 16842801; // 0x1010031
     field public static final int colorBackgroundCacheHint = 16843435; // 0x10102ab
-    field public static final int colorFocusedHighlight = 16843683; // 0x10103a3
+    field public static final int colorFocusedHighlight = 16843676; // 0x101039c
     field public static final int colorForeground = 16842800; // 0x1010030
     field public static final int colorForegroundInverse = 16843270; // 0x1010206
-    field public static final int colorLongPressedHighlight = 16843682; // 0x10103a2
-    field public static final int colorMultiSelectHighlight = 16843685; // 0x10103a5
-    field public static final int colorPressedHighlight = 16843681; // 0x10103a1
-    field public static final int columnCount = 16843638; // 0x1010376
+    field public static final int colorLongPressedHighlight = 16843675; // 0x101039b
+    field public static final int colorMultiSelectHighlight = 16843678; // 0x101039e
+    field public static final int colorPressedHighlight = 16843674; // 0x101039a
+    field public static final int columnCount = 16843636; // 0x1010374
     field public static final int columnDelay = 16843215; // 0x10101cf
-    field public static final int columnOrderPreserved = 16843639; // 0x1010377
+    field public static final int columnOrderPreserved = 16843637; // 0x1010375
     field public static final int columnWidth = 16843031; // 0x1010117
     field public static final int compatibleWidthLimitDp = 16843621; // 0x1010365
     field public static final int completionHint = 16843122; // 0x1010172
@@ -378,11 +380,11 @@ package android {
     field public static final int drawSelectorOnTop = 16843004; // 0x10100fc
     field public static final int drawable = 16843161; // 0x1010199
     field public static final int drawableBottom = 16843118; // 0x101016e
-    field public static final int drawableEnd = 16843687; // 0x10103a7
+    field public static final int drawableEnd = 16843680; // 0x10103a0
     field public static final int drawableLeft = 16843119; // 0x101016f
     field public static final int drawablePadding = 16843121; // 0x1010171
     field public static final int drawableRight = 16843120; // 0x1010170
-    field public static final int drawableStart = 16843686; // 0x10103a6
+    field public static final int drawableStart = 16843679; // 0x101039f
     field public static final int drawableTop = 16843117; // 0x101016d
     field public static final int drawingCacheQuality = 16842984; // 0x10100e8
     field public static final int dropDownAnchor = 16843363; // 0x1010263
@@ -439,7 +441,7 @@ package android {
     field public static final int fastScrollTextColor = 16843609; // 0x1010359
     field public static final int fastScrollThumbDrawable = 16843574; // 0x1010336
     field public static final int fastScrollTrackDrawable = 16843577; // 0x1010339
-    field public static final int feedbackCount = 16843666; // 0x1010392
+    field public static final int feedbackCount = 16843664; // 0x1010390
     field public static final int fillAfter = 16843197; // 0x10101bd
     field public static final int fillBefore = 16843196; // 0x10101bc
     field public static final int fillEnabled = 16843343; // 0x101024f
@@ -492,7 +494,7 @@ package android {
     field public static final int hand_hour = 16843011; // 0x1010103
     field public static final int hand_minute = 16843012; // 0x1010104
     field public static final int handle = 16843354; // 0x101025a
-    field public static final int handleDrawable = 16843656; // 0x1010388
+    field public static final int handleDrawable = 16843654; // 0x1010386
     field public static final int handleProfiling = 16842786; // 0x1010022
     field public static final int hapticFeedbackEnabled = 16843358; // 0x101025e
     field public static final int hardwareAccelerated = 16843475; // 0x10102d3
@@ -501,12 +503,12 @@ package android {
     field public static final int headerDividersEnabled = 16843310; // 0x101022e
     field public static final int height = 16843093; // 0x1010155
     field public static final int hint = 16843088; // 0x1010150
-    field public static final int hitRadius = 16843663; // 0x101038f
+    field public static final int hitRadius = 16843661; // 0x101038d
     field public static final int homeAsUpIndicator = 16843531; // 0x101030b
     field public static final int homeLayout = 16843549; // 0x101031d
     field public static final int horizontalDivider = 16843053; // 0x101012d
     field public static final int horizontalGap = 16843327; // 0x101023f
-    field public static final int horizontalOffset = 16843668; // 0x1010394
+    field public static final int horizontalOffset = 16843666; // 0x1010392
     field public static final int horizontalScrollViewStyle = 16843603; // 0x1010353
     field public static final int horizontalSpacing = 16843028; // 0x1010114
     field public static final int host = 16842792; // 0x1010028
@@ -552,7 +554,7 @@ package android {
     field public static final int installLocation = 16843447; // 0x10102b7
     field public static final int interpolator = 16843073; // 0x1010141
     field public static final int isAlwaysSyncable = 16843571; // 0x1010333
-    field public static final int isAuxiliary = 16843648; // 0x1010380
+    field public static final int isAuxiliary = 16843646; // 0x101037e
     field public static final int isDefault = 16843297; // 0x1010221
     field public static final int isIndicator = 16843079; // 0x1010147
     field public static final int isModifier = 16843334; // 0x1010246
@@ -589,7 +591,6 @@ package android {
     field public static final int layerType = 16843604; // 0x1010354
     field public static final int layout = 16842994; // 0x10100f2
     field public static final int layoutAnimation = 16842988; // 0x10100ec
-    field public static final int layoutDirection = 16843634; // 0x1010372
     field public static final int layout_above = 16843140; // 0x1010184
     field public static final int layout_alignBaseline = 16843142; // 0x1010186
     field public static final int layout_alignBottom = 16843146; // 0x101018a
@@ -606,20 +607,18 @@ package android {
     field public static final int layout_centerInParent = 16843151; // 0x101018f
     field public static final int layout_centerVertical = 16843153; // 0x1010191
     field public static final int layout_column = 16843084; // 0x101014c
-    field public static final int layout_columnFlexibility = 16843646; // 0x101037e
-    field public static final int layout_columnSpan = 16843645; // 0x101037d
+    field public static final int layout_columnFlexibility = 16843644; // 0x101037c
+    field public static final int layout_columnSpan = 16843643; // 0x101037b
     field public static final int layout_gravity = 16842931; // 0x10100b3
     field public static final int layout_height = 16842997; // 0x10100f5
     field public static final int layout_margin = 16842998; // 0x10100f6
     field public static final int layout_marginBottom = 16843002; // 0x10100fa
-    field public static final int layout_marginEnd = 16843674; // 0x101039a
     field public static final int layout_marginLeft = 16842999; // 0x10100f7
     field public static final int layout_marginRight = 16843001; // 0x10100f9
-    field public static final int layout_marginStart = 16843673; // 0x1010399
     field public static final int layout_marginTop = 16843000; // 0x10100f8
-    field public static final int layout_row = 16843642; // 0x101037a
-    field public static final int layout_rowFlexibility = 16843644; // 0x101037c
-    field public static final int layout_rowSpan = 16843643; // 0x101037b
+    field public static final int layout_row = 16843640; // 0x1010378
+    field public static final int layout_rowFlexibility = 16843642; // 0x101037a
+    field public static final int layout_rowSpan = 16843641; // 0x1010379
     field public static final int layout_scale = 16843155; // 0x1010193
     field public static final int layout_span = 16843085; // 0x101014d
     field public static final int layout_toLeftOf = 16843138; // 0x1010182
@@ -629,7 +628,7 @@ package android {
     field public static final int layout_x = 16843135; // 0x101017f
     field public static final int layout_y = 16843136; // 0x1010180
     field public static final int left = 16843181; // 0x10101ad
-    field public static final int leftChevronDrawable = 16843657; // 0x1010389
+    field public static final int leftChevronDrawable = 16843655; // 0x1010387
     field public static final int lineSpacingExtra = 16843287; // 0x1010217
     field public static final int lineSpacingMultiplier = 16843288; // 0x1010218
     field public static final int lines = 16843092; // 0x1010154
@@ -641,8 +640,8 @@ package android {
     field public static final int listDividerAlertDialog = 16843525; // 0x1010305
     field public static final int listPopupWindowStyle = 16843519; // 0x10102ff
     field public static final int listPreferredItemHeight = 16842829; // 0x101004d
-    field public static final int listPreferredItemHeightLarge = 16843669; // 0x1010395
-    field public static final int listPreferredItemHeightSmall = 16843670; // 0x1010396
+    field public static final int listPreferredItemHeightLarge = 16843667; // 0x1010393
+    field public static final int listPreferredItemHeightSmall = 16843668; // 0x1010394
     field public static final int listSelector = 16843003; // 0x10100fb
     field public static final int listSeparatorTextViewStyle = 16843272; // 0x1010208
     field public static final int listViewStyle = 16842868; // 0x1010074
@@ -673,6 +672,8 @@ package android {
     field public static final int minHeight = 16843072; // 0x1010140
     field public static final int minLevel = 16843185; // 0x10101b1
     field public static final int minLines = 16843094; // 0x1010156
+    field public static final int minResizeHeight = 16843683; // 0x10103a3
+    field public static final int minResizeWidth = 16843682; // 0x10103a2
     field public static final int minSdkVersion = 16843276; // 0x101020c
     field public static final int minWidth = 16843071; // 0x101013f
     field public static final int mode = 16843134; // 0x101017e
@@ -688,7 +689,7 @@ package android {
     field public static final int nextFocusUp = 16842979; // 0x10100e3
     field public static final int noHistory = 16843309; // 0x101022d
     field public static final int normalScreens = 16843397; // 0x1010285
-    field public static final int notificationTimeout = 16843652; // 0x1010384
+    field public static final int notificationTimeout = 16843650; // 0x1010382
     field public static final int numColumns = 16843032; // 0x1010118
     field public static final int numStars = 16843076; // 0x1010144
     field public static final deprecated int numeric = 16843109; // 0x1010165
@@ -702,17 +703,15 @@ package android {
     field public static final int orderingFromXml = 16843239; // 0x10101e7
     field public static final int orientation = 16842948; // 0x10100c4
     field public static final int outAnimation = 16843128; // 0x1010178
-    field public static final int outerRadius = 16843662; // 0x101038e
+    field public static final int outerRadius = 16843660; // 0x101038c
     field public static final int overScrollFooter = 16843459; // 0x10102c3
     field public static final int overScrollHeader = 16843458; // 0x10102c2
     field public static final int overScrollMode = 16843457; // 0x10102c1
-    field public static final int packageNames = 16843650; // 0x1010382
+    field public static final int packageNames = 16843648; // 0x1010380
     field public static final int padding = 16842965; // 0x10100d5
     field public static final int paddingBottom = 16842969; // 0x10100d9
-    field public static final int paddingEnd = 16843672; // 0x1010398
     field public static final int paddingLeft = 16842966; // 0x10100d6
     field public static final int paddingRight = 16842968; // 0x10100d8
-    field public static final int paddingStart = 16843671; // 0x1010397
     field public static final int paddingTop = 16842967; // 0x10100d7
     field public static final int panelBackground = 16842846; // 0x101005e
     field public static final int panelColorBackground = 16842849; // 0x1010061
@@ -793,17 +792,17 @@ package android {
     field public static final int restoreAnyVersion = 16843450; // 0x10102ba
     field public static final deprecated int restoreNeedsApplication = 16843421; // 0x101029d
     field public static final int right = 16843183; // 0x10101af
-    field public static final int rightChevronDrawable = 16843658; // 0x101038a
+    field public static final int rightChevronDrawable = 16843656; // 0x1010388
     field public static final int ringtonePreferenceStyle = 16842899; // 0x1010093
     field public static final int ringtoneType = 16843257; // 0x10101f9
     field public static final int rotation = 16843558; // 0x1010326
     field public static final int rotationX = 16843559; // 0x1010327
     field public static final int rotationY = 16843560; // 0x1010328
-    field public static final int rowCount = 16843636; // 0x1010374
+    field public static final int rowCount = 16843634; // 0x1010372
     field public static final int rowDelay = 16843216; // 0x10101d0
     field public static final int rowEdgeFlags = 16843329; // 0x1010241
     field public static final int rowHeight = 16843058; // 0x1010132
-    field public static final int rowOrderPreserved = 16843637; // 0x1010375
+    field public static final int rowOrderPreserved = 16843635; // 0x1010373
     field public static final int saveEnabled = 16842983; // 0x10100e7
     field public static final int scaleGravity = 16843262; // 0x10101fe
     field public static final int scaleHeight = 16843261; // 0x10101fd
@@ -869,7 +868,7 @@ package android {
     field public static final int smallIcon = 16843422; // 0x101029e
     field public static final int smallScreens = 16843396; // 0x1010284
     field public static final int smoothScrollbar = 16843313; // 0x1010231
-    field public static final int snapMargin = 16843665; // 0x1010391
+    field public static final int snapMargin = 16843663; // 0x101038f
     field public static final int soundEffectsEnabled = 16843285; // 0x1010215
     field public static final int spacing = 16843027; // 0x1010113
     field public static final int spinnerDropDownItemStyle = 16842887; // 0x1010087
@@ -917,7 +916,7 @@ package android {
     field public static final int subtitleTextStyle = 16843513; // 0x10102f9
     field public static final int suggestActionMsg = 16843228; // 0x10101dc
     field public static final int suggestActionMsgColumn = 16843229; // 0x10101dd
-    field public static final int suggestionsEnabled = 16843635; // 0x1010373
+    field public static final int suggestionsEnabled = 16843633; // 0x1010371
     field public static final int summary = 16843241; // 0x10101e9
     field public static final int summaryColumn = 16843426; // 0x10102a2
     field public static final int summaryOff = 16843248; // 0x10101f0
@@ -934,7 +933,7 @@ package android {
     field public static final int tag = 16842961; // 0x10100d1
     field public static final int targetActivity = 16843266; // 0x1010202
     field public static final int targetClass = 16842799; // 0x101002f
-    field public static final int targetDrawables = 16843655; // 0x1010387
+    field public static final int targetDrawables = 16843653; // 0x1010385
     field public static final int targetPackage = 16842785; // 0x1010021
     field public static final int targetSdkVersion = 16843376; // 0x1010270
     field public static final int taskAffinity = 16842770; // 0x1010012
@@ -949,7 +948,7 @@ package android {
     field public static final int tension = 16843370; // 0x101026a
     field public static final int testOnly = 16843378; // 0x1010272
     field public static final int text = 16843087; // 0x101014f
-    field public static final int textAllCaps = 16843680; // 0x10103a0
+    field public static final int textAllCaps = 16843673; // 0x1010399
     field public static final int textAppearance = 16842804; // 0x1010034
     field public static final int textAppearanceButton = 16843271; // 0x1010207
     field public static final int textAppearanceInverse = 16842805; // 0x1010035
@@ -986,14 +985,12 @@ package android {
     field public static final int textColorTertiary = 16843282; // 0x1010212
     field public static final int textColorTertiaryInverse = 16843283; // 0x1010213
     field public static final int textCursorDrawable = 16843618; // 0x1010362
-    field public static final int textDirection = 16843676; // 0x101039c
     field public static final int textEditNoPasteWindowLayout = 16843541; // 0x1010315
     field public static final int textEditPasteWindowLayout = 16843540; // 0x1010314
     field public static final int textEditSideNoPasteWindowLayout = 16843615; // 0x101035f
     field public static final int textEditSidePasteWindowLayout = 16843614; // 0x101035e
-    field public static final int textEditSuggestionItemLayout = 16843633; // 0x1010371
-    field public static final int textEditSuggestionsBottomWindowLayout = 16843631; // 0x101036f
-    field public static final int textEditSuggestionsTopWindowLayout = 16843632; // 0x1010370
+    field public static final int textEditSuggestionItemLayout = 16843632; // 0x1010370
+    field public static final int textEditSuggestionsWindowLayout = 16843631; // 0x101036f
     field public static final int textFilterEnabled = 16843007; // 0x10100ff
     field public static final int textIsSelectable = 16843542; // 0x1010316
     field public static final int textOff = 16843045; // 0x1010125
@@ -1026,7 +1023,7 @@ package android {
     field public static final int toYScale = 16843205; // 0x10101c5
     field public static final int top = 16843182; // 0x10101ae
     field public static final int topBright = 16842955; // 0x10100cb
-    field public static final int topChevronDrawable = 16843659; // 0x101038b
+    field public static final int topChevronDrawable = 16843657; // 0x1010389
     field public static final int topDark = 16842951; // 0x10100c7
     field public static final int topLeftRadius = 16843177; // 0x10101a9
     field public static final int topOffset = 16843352; // 0x1010258
@@ -1042,7 +1039,7 @@ package android {
     field public static final int unfocusedMonthDateColor = 16843588; // 0x1010344
     field public static final int unselectedAlpha = 16843278; // 0x101020e
     field public static final int updatePeriodMillis = 16843344; // 0x1010250
-    field public static final int useDefaultMargins = 16843640; // 0x1010378
+    field public static final int useDefaultMargins = 16843638; // 0x1010376
     field public static final int useIntrinsicSizeAsMinimum = 16843536; // 0x1010310
     field public static final int useLevel = 16843167; // 0x101019f
     field public static final int userVisible = 16843409; // 0x1010291
@@ -1056,10 +1053,10 @@ package android {
     field public static final int verticalCorrection = 16843322; // 0x101023a
     field public static final int verticalDivider = 16843054; // 0x101012e
     field public static final int verticalGap = 16843328; // 0x1010240
-    field public static final int verticalOffset = 16843667; // 0x1010393
+    field public static final int verticalOffset = 16843665; // 0x1010391
     field public static final int verticalScrollbarPosition = 16843572; // 0x1010334
     field public static final int verticalSpacing = 16843029; // 0x1010115
-    field public static final int vibrationDuration = 16843664; // 0x1010390
+    field public static final int vibrationDuration = 16843662; // 0x101038e
     field public static final int visibility = 16842972; // 0x10100dc
     field public static final int visible = 16843156; // 0x1010194
     field public static final int vmSafeMode = 16843448; // 0x10102b8
@@ -1076,7 +1073,7 @@ package android {
     field public static final int wallpaperIntraOpenExitAnimation = 16843416; // 0x1010298
     field public static final int wallpaperOpenEnterAnimation = 16843411; // 0x1010293
     field public static final int wallpaperOpenExitAnimation = 16843412; // 0x1010294
-    field public static final int waveDrawable = 16843661; // 0x101038d
+    field public static final int waveDrawable = 16843659; // 0x101038b
     field public static final int webTextViewStyle = 16843449; // 0x10102b9
     field public static final int webViewStyle = 16842885; // 0x1010085
     field public static final int weekDayTextAppearance = 16843592; // 0x1010348
@@ -3929,6 +3926,8 @@ package android.appwidget {
     field public int initialLayout;
     field public java.lang.String label;
     field public int minHeight;
+    field public int minResizeHeight;
+    field public int minResizeWidth;
     field public int minWidth;
     field public int previewImage;
     field public android.content.ComponentName provider;
@@ -4785,6 +4784,7 @@ package android.content {
     field public static final java.lang.String SENSOR_SERVICE = "sensor";
     field public static final java.lang.String STORAGE_SERVICE = "storage";
     field public static final java.lang.String TELEPHONY_SERVICE = "phone";
+    field public static final java.lang.String TEXT_SERVICES_MANAGER_SERVICE = "textservices";
     field public static final java.lang.String UI_MODE_SERVICE = "uimode";
     field public static final java.lang.String USB_SERVICE = "usb";
     field public static final java.lang.String VIBRATOR_SERVICE = "vibrator";
@@ -8905,6 +8905,8 @@ package android.hardware {
     method public final void takePicture(android.hardware.Camera.ShutterCallback, android.hardware.Camera.PictureCallback, android.hardware.Camera.PictureCallback);
     method public final void takePicture(android.hardware.Camera.ShutterCallback, android.hardware.Camera.PictureCallback, android.hardware.Camera.PictureCallback, android.hardware.Camera.PictureCallback);
     method public final void unlock();
+    field public static final java.lang.String ACTION_NEW_PICTURE = "android.hardware.action.NEW_PICTURE";
+    field public static final java.lang.String ACTION_NEW_VIDEO = "android.hardware.action.NEW_VIDEO";
     field public static final int CAMERA_ERROR_SERVER_DIED = 100; // 0x64
     field public static final int CAMERA_ERROR_UNKNOWN = 1; // 0x1
   }
@@ -11285,6 +11287,7 @@ package android.net {
     method public static long getMobileRxPackets();
     method public static long getMobileTxBytes();
     method public static long getMobileTxPackets();
+    method public static int getThreadStatsTag();
     method public static long getTotalRxBytes();
     method public static long getTotalRxPackets();
     method public static long getTotalTxBytes();
@@ -11910,6 +11913,7 @@ package android.net.wifi {
     field public static final java.lang.String EXTRA_PREVIOUS_WIFI_STATE = "previous_wifi_state";
     field public static final java.lang.String EXTRA_SUPPLICANT_CONNECTED = "connected";
     field public static final java.lang.String EXTRA_SUPPLICANT_ERROR = "supplicantError";
+    field public static final java.lang.String EXTRA_WIFI_INFO = "wifiInfo";
     field public static final java.lang.String EXTRA_WIFI_STATE = "wifi_state";
     field public static final java.lang.String NETWORK_IDS_CHANGED_ACTION = "android.net.wifi.NETWORK_IDS_CHANGED";
     field public static final java.lang.String NETWORK_STATE_CHANGED_ACTION = "android.net.wifi.STATE_CHANGE";
@@ -14432,6 +14436,7 @@ package android.os {
   public class RecoverySystem {
     ctor public RecoverySystem();
     method public static void installPackage(android.content.Context, java.io.File) throws java.io.IOException;
+    method public static void rebootWipeCache(android.content.Context) throws java.io.IOException;
     method public static void rebootWipeUserData(android.content.Context) throws java.io.IOException;
     method public static void verifyPackage(java.io.File, android.os.RecoverySystem.ProgressListener, java.io.File) throws java.security.GeneralSecurityException, java.io.IOException;
   }
@@ -16227,12 +16232,14 @@ package android.provider {
   }
 
   public static final class ContactsContract.StreamItemPhotos implements android.provider.BaseColumns android.provider.ContactsContract.StreamItemPhotosColumns {
+    field public static final java.lang.String PHOTO = "photo";
   }
 
   protected static abstract interface ContactsContract.StreamItemPhotosColumns {
     field public static final java.lang.String ACTION = "action";
     field public static final java.lang.String ACTION_URI = "action_uri";
-    field public static final java.lang.String PICTURE = "picture";
+    field public static final java.lang.String PHOTO_FILE_ID = "photo_file_id";
+    field public static final java.lang.String PHOTO_URI = "photo_uri";
     field public static final java.lang.String SORT_INDEX = "sort_index";
     field public static final java.lang.String STREAM_ITEM_ID = "stream_item_id";
   }
@@ -16242,7 +16249,6 @@ package android.provider {
     field public static final android.net.Uri CONTENT_PHOTO_URI;
     field public static final android.net.Uri CONTENT_URI;
     field public static final java.lang.String MAX_ITEMS = "max_items";
-    field public static final java.lang.String PHOTO_MAX_BYTES = "photo_max_bytes";
   }
 
   public static final class ContactsContract.StreamItems.StreamItemPhotos implements android.provider.BaseColumns android.provider.ContactsContract.StreamItemPhotosColumns {
@@ -16721,18 +16727,18 @@ package android.provider {
     field public static final java.lang.String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = "wifi_networks_available_repeat_delay";
     field public static final java.lang.String WIFI_NUM_OPEN_NETWORKS_KEPT = "wifi_num_open_networks_kept";
     field public static final java.lang.String WIFI_ON = "wifi_on";
-    field public static final java.lang.String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE = "wifi_watchdog_acceptable_packet_loss_percentage";
-    field public static final java.lang.String WIFI_WATCHDOG_AP_COUNT = "wifi_watchdog_ap_count";
-    field public static final java.lang.String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS = "wifi_watchdog_background_check_delay_ms";
-    field public static final java.lang.String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED = "wifi_watchdog_background_check_enabled";
-    field public static final java.lang.String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS = "wifi_watchdog_background_check_timeout_ms";
-    field public static final java.lang.String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT = "wifi_watchdog_initial_ignored_ping_count";
-    field public static final java.lang.String WIFI_WATCHDOG_MAX_AP_CHECKS = "wifi_watchdog_max_ap_checks";
+    field public static final deprecated java.lang.String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE = "wifi_watchdog_acceptable_packet_loss_percentage";
+    field public static final deprecated java.lang.String WIFI_WATCHDOG_AP_COUNT = "wifi_watchdog_ap_count";
+    field public static final deprecated java.lang.String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS = "wifi_watchdog_background_check_delay_ms";
+    field public static final deprecated java.lang.String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED = "wifi_watchdog_background_check_enabled";
+    field public static final deprecated java.lang.String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS = "wifi_watchdog_background_check_timeout_ms";
+    field public static final deprecated java.lang.String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT = "wifi_watchdog_initial_ignored_ping_count";
+    field public static final deprecated java.lang.String WIFI_WATCHDOG_MAX_AP_CHECKS = "wifi_watchdog_max_ap_checks";
     field public static final java.lang.String WIFI_WATCHDOG_ON = "wifi_watchdog_on";
-    field public static final java.lang.String WIFI_WATCHDOG_PING_COUNT = "wifi_watchdog_ping_count";
-    field public static final java.lang.String WIFI_WATCHDOG_PING_DELAY_MS = "wifi_watchdog_ping_delay_ms";
-    field public static final java.lang.String WIFI_WATCHDOG_PING_TIMEOUT_MS = "wifi_watchdog_ping_timeout_ms";
-    field public static final java.lang.String WIFI_WATCHDOG_WATCH_LIST = "wifi_watchdog_watch_list";
+    field public static final deprecated java.lang.String WIFI_WATCHDOG_PING_COUNT = "wifi_watchdog_ping_count";
+    field public static final deprecated java.lang.String WIFI_WATCHDOG_PING_DELAY_MS = "wifi_watchdog_ping_delay_ms";
+    field public static final deprecated java.lang.String WIFI_WATCHDOG_PING_TIMEOUT_MS = "wifi_watchdog_ping_timeout_ms";
+    field public static final deprecated java.lang.String WIFI_WATCHDOG_WATCH_LIST = "wifi_watchdog_watch_list";
   }
 
   public static class Settings.SettingNotFoundException extends android.util.AndroidException {
@@ -16914,6 +16920,49 @@ package android.provider {
     field public static final java.lang.String _ID = "_id";
   }
 
+  public class VoicemailContract {
+    field public static final java.lang.String ACTION_NEW_VOICEMAIL = "android.intent.action.NEW_VOICEMAIL";
+    field public static final java.lang.String AUTHORITY = "com.android.voicemail";
+    field public static final java.lang.String EXTRA_SELF_CHANGE = "com.android.voicemail.extra.SELF_CHANGE";
+    field public static final java.lang.String PARAM_KEY_SOURCE_PACKAGE = "source_package";
+  }
+
+  public static final class VoicemailContract.Status implements android.provider.BaseColumns {
+    method public static android.net.Uri buildSourceUri(java.lang.String);
+    field public static final java.lang.String CONFIGURATION_STATE = "configuration_state";
+    field public static final int CONFIGURATION_STATE_CAN_BE_CONFIGURED = 2; // 0x2
+    field public static final int CONFIGURATION_STATE_NOT_CONFIGURED = 1; // 0x1
+    field public static final int CONFIGURATION_STATE_OK = 0; // 0x0
+    field public static final android.net.Uri CONTENT_URI;
+    field public static final java.lang.String DATA_CHANNEL_STATE = "data_channel_state";
+    field public static final int DATA_CHANNEL_STATE_NO_CONNECTION = 1; // 0x1
+    field public static final int DATA_CHANNEL_STATE_OK = 0; // 0x0
+    field public static final java.lang.String DIR_TYPE = "vnd.android.cursor.dir/voicemail.source.status";
+    field public static final java.lang.String ITEM_TYPE = "vnd.android.cursor.item/voicemail.source.status";
+    field public static final java.lang.String NOTIFICATION_CHANNEL_STATE = "notification_channel_state";
+    field public static final int NOTIFICATION_CHANNEL_STATE_MESSAGE_WAITING = 2; // 0x2
+    field public static final int NOTIFICATION_CHANNEL_STATE_NO_CONNECTION = 1; // 0x1
+    field public static final int NOTIFICATION_CHANNEL_STATE_OK = 0; // 0x0
+    field public static final java.lang.String SETTINGS_URI = "settings_uri";
+    field public static final java.lang.String SOURCE_PACKAGE = "source_package";
+    field public static final java.lang.String VOICEMAIL_ACCESS_URI = "voicemail_access_uri";
+  }
+
+  public static final class VoicemailContract.Voicemails implements android.provider.BaseColumns {
+    method public static android.net.Uri buildSourceUri(java.lang.String);
+    field public static final android.net.Uri CONTENT_URI;
+    field public static final java.lang.String DATE = "date";
+    field public static final java.lang.String DIR_TYPE = "vnd.android.cursor.dir/voicemails";
+    field public static final java.lang.String DURATION = "duration";
+    field public static final java.lang.String HAS_CONTENT = "has_content";
+    field public static final java.lang.String ITEM_TYPE = "vnd.android.cursor.item/voicemail";
+    field public static final java.lang.String MIME_TYPE = "mime_type";
+    field public static final java.lang.String NEW = "new";
+    field public static final java.lang.String NUMBER = "number";
+    field public static final java.lang.String SOURCE_DATA = "source_data";
+    field public static final java.lang.String SOURCE_PACKAGE = "source_package";
+  }
+
 }
 
 package android.renderscript {
@@ -17894,6 +17943,30 @@ package android.security {
 
 }
 
+package android.service.textservice {
+
+  public abstract class SpellCheckerService extends android.app.Service {
+    ctor public SpellCheckerService();
+    method public void cancel();
+    method public abstract android.view.textservice.SuggestionsInfo getSuggestions(android.view.textservice.TextInfo, int, java.lang.String);
+    method public android.view.textservice.SuggestionsInfo[] getSuggestionsMultiple(android.view.textservice.TextInfo[], java.lang.String, int, boolean);
+    method public final android.os.IBinder onBind(android.content.Intent);
+    field public static final java.lang.String SERVICE_INTERFACE;
+  }
+
+  public class SpellCheckerSession {
+    method public void close();
+    method public void getSuggestions(android.view.textservice.TextInfo, int);
+    method public void getSuggestions(android.view.textservice.TextInfo[], int, boolean);
+    method public boolean isSessionDisconnected();
+  }
+
+  public static abstract interface SpellCheckerSession.SpellCheckerSessionListener {
+    method public abstract void onGetSuggestions(android.view.textservice.SuggestionsInfo[]);
+  }
+
+}
+
 package android.service.wallpaper {
 
   public abstract class WallpaperService extends android.app.Service {
@@ -20713,8 +20786,8 @@ package android.util {
     field public static final java.util.regex.Pattern IP_ADDRESS;
     field public static final java.util.regex.Pattern PHONE;
     field public static final java.util.regex.Pattern TOP_LEVEL_DOMAIN;
-    field public static final java.lang.String TOP_LEVEL_DOMAIN_STR = "((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\\-\\-mgbaam7a8h|xn\\-\\-mgberp4a5d4ar|xn\\-\\-wgbh1c|xn\\-\\-zckzah)|y[et]|z[amw])";
-    field public static final java.lang.String TOP_LEVEL_DOMAIN_STR_FOR_WEB_URL = "(?:(?: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\\-\\-mgbaam7a8h|xn\\-\\-mgberp4a5d4ar|xn\\-\\-wgbh1c|xn\\-\\-zckzah)|y[et]|z[amw]))";
+    field public static final java.lang.String TOP_LEVEL_DOMAIN_STR = "((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]|(\u03b4\u03bf\u03ba\u03b9\u03bc\u03ae|\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435|\u0440\u0444|\u0441\u0440\u0431|\u05d8\u05e2\u05e1\u05d8|\u0622\u0632\u0645\u0627\u06cc\u0634\u06cc|\u0625\u062e\u062a\u0628\u0627\u0631|\u0627\u0644\u0627\u0631\u062f\u0646|\u0627\u0644\u062c\u0632\u0627\u0626\u0631|\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629|\u0627\u0644\u0645\u063a\u0631\u0628|\u0627\u0645\u0627\u0631\u0627\u062a|\u0628\u06be\u0627\u0631\u062a|\u062a\u0648\u0646\u0633|\u0633\u0648\u0631\u064a\u0629|\u0641\u0644\u0633\u0637\u064a\u0646|\u0642\u0637\u0631|\u0645\u0635\u0631|\u092a\u0930\u0940\u0915\u094d\u0937\u093e|\u092d\u093e\u0930\u0924|\u09ad\u09be\u09b0\u09a4|\u0a2d\u0a3e\u0a30\u0a24|\u0aad\u0abe\u0ab0\u0aa4|\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe|\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8|\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd|\u0baa\u0bb0\u0bbf\u0b9f\u0bcd\u0b9a\u0bc8|\u0c2d\u0c3e\u0c30\u0c24\u0c4d|\u0dbd\u0d82\u0d9a\u0dcf|\u0e44\u0e17\u0e22|\u30c6\u30b9\u30c8|\u4e2d\u56fd|\u4e2d\u570b|\u53f0\u6e7e|\u53f0\u7063|\u65b0\u52a0\u5761|\u6d4b\u8bd5|\u6e2c\u8a66|\u9999\u6e2f|\ud14c\uc2a4\ud2b8|\ud55c\uad6d|xn\\-\\-0zwm56d|xn\\-\\-11b5bs3a9aj6g|xn\\-\\-3e0b707e|xn\\-\\-45brj9c|xn\\-\\-80akhbyknj4f|xn\\-\\-90a3ac|xn\\-\\-9t4b11yi5a|xn\\-\\-clchc0ea0b2g2a9gcd|xn\\-\\-deba0ad|xn\\-\\-fiqs8s|xn\\-\\-fiqz9s|xn\\-\\-fpcrj9c3d|xn\\-\\-fzc2c9e2c|xn\\-\\-g6w251d|xn\\-\\-gecrj9c|xn\\-\\-h2brj9c|xn\\-\\-hgbk6aj7f53bba|xn\\-\\-hlcj6aya9esc7a|xn\\-\\-j6w193g|xn\\-\\-jxalpdlp|xn\\-\\-kgbechtv|xn\\-\\-kprw13d|xn\\-\\-kpry57d|xn\\-\\-lgbbat1ad8j|xn\\-\\-mgbaam7a8h|xn\\-\\-mgbayh7gpa|xn\\-\\-mgbbh1a71e|xn\\-\\-mgbc0a9azcg|xn\\-\\-mgberp4a5d4ar|xn\\-\\-o3cw4h|xn\\-\\-ogbpf8fl|xn\\-\\-p1ai|xn\\-\\-pgbs0dh|xn\\-\\-s9brj9c|xn\\-\\-wgbh1c|xn\\-\\-wgbl6a|xn\\-\\-xkc2al3hye2a|xn\\-\\-xkc2dl3a5ee0h|xn\\-\\-yfro4i67o|xn\\-\\-ygbi2ammx|xn\\-\\-zckzah|xxx)|y[et]|z[amw])";
+    field public static final java.lang.String TOP_LEVEL_DOMAIN_STR_FOR_WEB_URL = "(?:(?: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]|(?:\u03b4\u03bf\u03ba\u03b9\u03bc\u03ae|\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435|\u0440\u0444|\u0441\u0440\u0431|\u05d8\u05e2\u05e1\u05d8|\u0622\u0632\u0645\u0627\u06cc\u0634\u06cc|\u0625\u062e\u062a\u0628\u0627\u0631|\u0627\u0644\u0627\u0631\u062f\u0646|\u0627\u0644\u062c\u0632\u0627\u0626\u0631|\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629|\u0627\u0644\u0645\u063a\u0631\u0628|\u0627\u0645\u0627\u0631\u0627\u062a|\u0628\u06be\u0627\u0631\u062a|\u062a\u0648\u0646\u0633|\u0633\u0648\u0631\u064a\u0629|\u0641\u0644\u0633\u0637\u064a\u0646|\u0642\u0637\u0631|\u0645\u0635\u0631|\u092a\u0930\u0940\u0915\u094d\u0937\u093e|\u092d\u093e\u0930\u0924|\u09ad\u09be\u09b0\u09a4|\u0a2d\u0a3e\u0a30\u0a24|\u0aad\u0abe\u0ab0\u0aa4|\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe|\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8|\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd|\u0baa\u0bb0\u0bbf\u0b9f\u0bcd\u0b9a\u0bc8|\u0c2d\u0c3e\u0c30\u0c24\u0c4d|\u0dbd\u0d82\u0d9a\u0dcf|\u0e44\u0e17\u0e22|\u30c6\u30b9\u30c8|\u4e2d\u56fd|\u4e2d\u570b|\u53f0\u6e7e|\u53f0\u7063|\u65b0\u52a0\u5761|\u6d4b\u8bd5|\u6e2c\u8a66|\u9999\u6e2f|\ud14c\uc2a4\ud2b8|\ud55c\uad6d|xn\\-\\-0zwm56d|xn\\-\\-11b5bs3a9aj6g|xn\\-\\-3e0b707e|xn\\-\\-45brj9c|xn\\-\\-80akhbyknj4f|xn\\-\\-90a3ac|xn\\-\\-9t4b11yi5a|xn\\-\\-clchc0ea0b2g2a9gcd|xn\\-\\-deba0ad|xn\\-\\-fiqs8s|xn\\-\\-fiqz9s|xn\\-\\-fpcrj9c3d|xn\\-\\-fzc2c9e2c|xn\\-\\-g6w251d|xn\\-\\-gecrj9c|xn\\-\\-h2brj9c|xn\\-\\-hgbk6aj7f53bba|xn\\-\\-hlcj6aya9esc7a|xn\\-\\-j6w193g|xn\\-\\-jxalpdlp|xn\\-\\-kgbechtv|xn\\-\\-kprw13d|xn\\-\\-kpry57d|xn\\-\\-lgbbat1ad8j|xn\\-\\-mgbaam7a8h|xn\\-\\-mgbayh7gpa|xn\\-\\-mgbbh1a71e|xn\\-\\-mgbc0a9azcg|xn\\-\\-mgberp4a5d4ar|xn\\-\\-o3cw4h|xn\\-\\-ogbpf8fl|xn\\-\\-p1ai|xn\\-\\-pgbs0dh|xn\\-\\-s9brj9c|xn\\-\\-wgbh1c|xn\\-\\-wgbl6a|xn\\-\\-xkc2al3hye2a|xn\\-\\-xkc2dl3a5ee0h|xn\\-\\-yfro4i67o|xn\\-\\-ygbi2ammx|xn\\-\\-zckzah|xxx)|y[et]|z[amw]))";
     field public static final java.util.regex.Pattern WEB_URL;
   }
 
@@ -20957,6 +21030,11 @@ package android.view {
     method public void onPrepareSubMenu(android.view.SubMenu);
   }
 
+  public abstract interface CollapsibleActionView {
+    method public abstract void onActionViewCollapsed();
+    method public abstract void onActionViewExpanded();
+  }
+
   public abstract interface ContextMenu implements android.view.Menu {
     method public abstract void clearHeader();
     method public abstract android.view.ContextMenu setHeaderIcon(int);
@@ -22667,10 +22745,8 @@ package android.view {
     ctor public ViewDebug();
     method public static void dumpCapturedView(java.lang.String, java.lang.Object);
     method public static void startHierarchyTracing(java.lang.String, android.view.View);
-    method public static void startLooperProfiling(java.io.File);
     method public static void startRecyclerTracing(java.lang.String, android.view.View);
     method public static void stopHierarchyTracing();
-    method public static void stopLooperProfiling();
     method public static void stopRecyclerTracing();
     method public static void trace(android.view.View, android.view.ViewDebug.RecyclerTraceType, int...);
     method public static void trace(android.view.View, android.view.ViewDebug.HierarchyTraceType);
@@ -23971,6 +24047,54 @@ package android.view.inputmethod {
 
 }
 
+package android.view.textservice {
+
+  public final class SpellCheckerInfo implements android.os.Parcelable {
+    method public int describeContents();
+    method public android.content.ComponentName getComponent();
+    method public java.lang.String getId();
+    method public java.lang.String getPackageName();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator CREATOR;
+  }
+
+  public final class SuggestionsInfo implements android.os.Parcelable {
+    ctor public SuggestionsInfo(int, java.lang.String[]);
+    ctor public SuggestionsInfo(int, java.lang.String[], int, int);
+    ctor public SuggestionsInfo(android.os.Parcel);
+    method public int describeContents();
+    method public int getCookie();
+    method public int getSequence();
+    method public java.lang.String getSuggestionAt(int);
+    method public int getSuggestionsAttributes();
+    method public int getSuggestionsCount();
+    method public void setCookieAndSequence(int, int);
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator CREATOR;
+    field public static final int RESULT_ATTR_IN_THE_DICTIONARY = 1; // 0x1
+    field public static final int RESULT_ATTR_LOOKS_TYPO = 4; // 0x4
+    field public static final int RESULT_ATTR_SUGGESTIONS_AVAILABLE = 2; // 0x2
+  }
+
+  public final class TextInfo implements android.os.Parcelable {
+    ctor public TextInfo(java.lang.String);
+    ctor public TextInfo(java.lang.String, int, int);
+    ctor public TextInfo(android.os.Parcel);
+    method public int describeContents();
+    method public int getCookie();
+    method public int getSequence();
+    method public java.lang.String getText();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator CREATOR;
+  }
+
+  public final class TextServicesManager {
+    method public android.view.textservice.SpellCheckerInfo getCurrentSpellChecker(java.util.Locale);
+    method public android.service.textservice.SpellCheckerSession newSpellCheckerSession(android.view.textservice.SpellCheckerInfo, java.util.Locale, android.service.textservice.SpellCheckerSession.SpellCheckerSessionListener);
+  }
+
+}
+
 package android.webkit {
 
   public final deprecated class CacheManager {
@@ -29742,7 +29866,7 @@ package java.lang.ref {
     ctor public ReferenceQueue();
     method public synchronized java.lang.ref.Reference<? extends T> poll();
     method public java.lang.ref.Reference<? extends T> remove() throws java.lang.InterruptedException;
-    method public synchronized java.lang.ref.Reference<? extends T> remove(long) throws java.lang.IllegalArgumentException, java.lang.InterruptedException;
+    method public synchronized java.lang.ref.Reference<? extends T> remove(long) throws java.lang.InterruptedException;
   }
 
   public class SoftReference extends java.lang.ref.Reference {
index 3fb1736..6dfa12b 100644 (file)
@@ -468,10 +468,16 @@ public class Am {
         String profileFile = null;
         boolean start = false;
         boolean wall = false;
+        int profileType = 0;
         
         String process = null;
         
         String cmd = nextArgRequired();
+        if ("looper".equals(cmd)) {
+            cmd = nextArgRequired();
+            profileType = 1;
+        }
+
         if ("start".equals(cmd)) {
             start = true;
             wall = "--wall".equals(nextOption());
@@ -516,7 +522,7 @@ public class Am {
             } else if (start) {
                 //removeWallOption();
             }
-            if (!mAm.profileControl(process, start, profileFile, fd)) {
+            if (!mAm.profileControl(process, start, profileFile, fd, profileType)) {
                 wall = false;
                 throw new AndroidException("PROFILE FAILED on process " + process);
             }
@@ -1076,8 +1082,8 @@ public class Am {
                 "       am broadcast <INTENT>\n" +
                 "       am instrument [-r] [-e <NAME> <VALUE>] [-p] [-w]\n" +
                 "               [--no-window-animation] <COMPONENT>\n" +
-                "       am profile start <PROCESS> <FILE>\n" +
-                "       am profile stop <PROCESS>\n" +
+                "       am profile [looper] start <PROCESS> <FILE>\n" +
+                "       am profile [looper] stop <PROCESS>\n" +
                 "       am dumpheap [flags] <PROCESS> <FILE>\n" +
                 "       am monitor [--gdb <port>]\n" +
                 "       am screen-compat [on|off] <PACKAGE>\n" +
index 56f1324..d602500 100644 (file)
@@ -11,4 +11,9 @@ LOCAL_MODULE := dumpstate
 
 LOCAL_SHARED_LIBRARIES := libcutils
 
+ifdef BOARD_LIB_DUMPSTATE
+LOCAL_STATIC_LIBRARIES := $(BOARD_LIB_DUMPSTATE)
+LOCAL_CFLAGS += -DBOARD_HAS_DUMPSTATE
+endif
+
 include $(BUILD_EXECUTABLE)
index 42c35af..4926db2 100644 (file)
@@ -197,6 +197,15 @@ static void dumpstate() {
     dump_file(NULL, "/sys/class/leds/lcd-backlight/registers");
     printf("\n");
 
+#ifdef BOARD_HAS_DUMPSTATE
+    printf("========================================================\n");
+    printf("== Board\n");
+    printf("========================================================\n");
+
+    dumpstate_board();
+    printf("\n");
+#endif
+
     printf("========================================================\n");
     printf("== Android Framework Services\n");
     printf("========================================================\n");
@@ -218,6 +227,9 @@ static void dumpstate() {
 
     run_command("APP SERVICES", 30, "dumpsys", "activity", "service", "all", NULL);
 
+    printf("========================================================\n");
+    printf("== dumpstate: done\n");
+    printf("========================================================\n");
 }
 
 static void usage() {
index 83b1d11..597ab1f 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <time.h>
 #include <unistd.h>
+#include <stdio.h>
 
 /* prints the contents of a file */
 int dump_file(const char *title, const char* path);
@@ -47,4 +48,7 @@ void show_wchan(int pid, const char *name);
 /* Play a sound via Stagefright */
 void play_sound(const char* path);
 
+/* Implemented by libdumpstate_board to dump board-specific info */
+void dumpstate_board();
+
 #endif /* _DUMPSTATE_H_ */
index fdf4a3a..b7cd829 100644 (file)
@@ -1104,10 +1104,11 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
             data.enforceInterface(IActivityManager.descriptor);
             String process = data.readString();
             boolean start = data.readInt() != 0;
+            int profileType = data.readInt();
             String path = data.readString();
             ParcelFileDescriptor fd = data.readInt() != 0
                     ? data.readFileDescriptor() : null;
-            boolean res = profileControl(process, start, path, fd);
+            boolean res = profileControl(process, start, path, fd, profileType);
             reply.writeNoException();
             reply.writeInt(res ? 1 : 0);
             return true;
@@ -1514,6 +1515,14 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
             return true;
         }
 
+        case UPDATE_PERSISTENT_CONFIGURATION_TRANSACTION: {
+            data.enforceInterface(IActivityManager.descriptor);
+            Configuration config = Configuration.CREATOR.createFromParcel(data);
+            updatePersistentConfiguration(config);
+            reply.writeNoException();
+            return true;
+        }
+
         }
 
         return super.onTransact(code, data, reply, flags);
@@ -2880,13 +2889,14 @@ class ActivityManagerProxy implements IActivityManager
     }
     
     public boolean profileControl(String process, boolean start,
-            String path, ParcelFileDescriptor fd) throws RemoteException
+            String path, ParcelFileDescriptor fd, int profileType) throws RemoteException
     {
         Parcel data = Parcel.obtain();
         Parcel reply = Parcel.obtain();
         data.writeInterfaceToken(IActivityManager.descriptor);
         data.writeString(process);
         data.writeInt(start ? 1 : 0);
+        data.writeInt(profileType);
         data.writeString(path);
         if (fd != null) {
             data.writeInt(1);
@@ -3410,5 +3420,17 @@ class ActivityManagerProxy implements IActivityManager
         return res;
     }
 
+    public void updatePersistentConfiguration(Configuration values) throws RemoteException
+    {
+        Parcel data = Parcel.obtain();
+        Parcel reply = Parcel.obtain();
+        data.writeInterfaceToken(IActivityManager.descriptor);
+        values.writeToParcel(data, 0);
+        mRemote.transact(UPDATE_PERSISTENT_CONFIGURATION_TRANSACTION, data, reply, 0);
+        reply.readException();
+        data.recycle();
+        reply.recycle();
+    }
+
     private IBinder mRemote;
 }
index f6cd866..9bbbd6c 100644 (file)
@@ -676,11 +676,12 @@ public final class ActivityThread {
             queueOrSendMessage(H.ACTIVITY_CONFIGURATION_CHANGED, token);
         }
 
-        public void profilerControl(boolean start, String path, ParcelFileDescriptor fd) {
+        public void profilerControl(boolean start, String path, ParcelFileDescriptor fd,
+                int profileType) {
             ProfilerControlData pcd = new ProfilerControlData();
             pcd.path = path;
             pcd.fd = fd;
-            queueOrSendMessage(H.PROFILER_CONTROL, pcd, start ? 1 : 0);
+            queueOrSendMessage(H.PROFILER_CONTROL, pcd, start ? 1 : 0, profileType);
         }
 
         public void dumpHeap(boolean managed, String path, ParcelFileDescriptor fd) {
@@ -954,7 +955,7 @@ public final class ActivityThread {
         }
 
         public void scheduleTrimMemory(int level) {
-            queueOrSendMessage(H.TRIM_MEMORY, level);
+            queueOrSendMessage(H.TRIM_MEMORY, null, level);
         }
     }
 
@@ -1148,7 +1149,7 @@ public final class ActivityThread {
                     handleActivityConfigurationChanged((IBinder)msg.obj);
                     break;
                 case PROFILER_CONTROL:
-                    handleProfilerControl(msg.arg1 != 0, (ProfilerControlData)msg.obj);
+                    handleProfilerControl(msg.arg1 != 0, (ProfilerControlData)msg.obj, msg.arg2);
                     break;
                 case CREATE_BACKUP_AGENT:
                     handleCreateBackupAgent((CreateBackupAgentData)msg.obj);
@@ -1184,8 +1185,10 @@ public final class ActivityThread {
                     break;
                 case UPDATE_PACKAGE_COMPATIBILITY_INFO:
                     handleUpdatePackageCompatibilityInfo((UpdateCompatibilityData)msg.obj);
+                    break;
                 case TRIM_MEMORY:
                     handleTrimMemory(msg.arg1);
+                    break;
             }
             if (DEBUG_MESSAGES) Slog.v(TAG, "<<< done: " + msg.what);
         }
@@ -3469,11 +3472,18 @@ public final class ActivityThread {
         performConfigurationChanged(r.activity, mCompatConfiguration);
     }
 
-    final void handleProfilerControl(boolean start, ProfilerControlData pcd) {
+    final void handleProfilerControl(boolean start, ProfilerControlData pcd, int profileType) {
         if (start) {
             try {
-                Debug.startMethodTracing(pcd.path, pcd.fd.getFileDescriptor(),
-                        8 * 1024 * 1024, 0);
+                switch (profileType) {
+                    case 1:
+                        ViewDebug.startLooperProfiling(pcd.path, pcd.fd.getFileDescriptor());
+                        break;
+                    default:
+                        Debug.startMethodTracing(pcd.path, pcd.fd.getFileDescriptor(),
+                                8 * 1024 * 1024, 0);
+                        break;
+                }
             } catch (RuntimeException e) {
                 Slog.w(TAG, "Profiling failed on path " + pcd.path
                         + " -- can the process access this path?");
@@ -3485,7 +3495,15 @@ public final class ActivityThread {
                 }
             }
         } else {
-            Debug.stopMethodTracing();
+            switch (profileType) {
+                case 1:
+                    ViewDebug.stopLooperProfiling();
+                    break;
+                default:
+                    Debug.stopMethodTracing();
+                    break;
+                    
+            }
         }
     }
 
index 942f245..9a5b527 100644 (file)
@@ -376,10 +376,11 @@ public abstract class ApplicationThreadNative extends Binder
         {
             data.enforceInterface(IApplicationThread.descriptor);
             boolean start = data.readInt() != 0;
+            int profileType = data.readInt();
             String path = data.readString();
             ParcelFileDescriptor fd = data.readInt() != 0
                     ? data.readFileDescriptor() : null;
-            profilerControl(start, path, fd);
+            profilerControl(start, path, fd, profileType);
             return true;
         }
         
@@ -936,10 +937,11 @@ class ApplicationThreadProxy implements IApplicationThread {
     }
     
     public void profilerControl(boolean start, String path,
-            ParcelFileDescriptor fd) throws RemoteException {
+            ParcelFileDescriptor fd, int profileType) throws RemoteException {
         Parcel data = Parcel.obtain();
         data.writeInterfaceToken(IApplicationThread.descriptor);
         data.writeInt(start ? 1 : 0);
+        data.writeInt(profileType);
         data.writeString(path);
         if (fd != null) {
             data.writeInt(1);
index d2323e7..6289730 100644 (file)
@@ -83,6 +83,7 @@ import android.view.ContextThemeWrapper;
 import android.view.WindowManagerImpl;
 import android.view.accessibility.AccessibilityManager;
 import android.view.inputmethod.InputMethodManager;
+import android.view.textservice.TextServicesManager;
 import android.accounts.AccountManager;
 import android.accounts.IAccountManager;
 import android.app.admin.DevicePolicyManager;
@@ -320,6 +321,11 @@ class ContextImpl extends Context {
                     return InputMethodManager.getInstance(ctx);
                 }});
 
+        registerService(TEXT_SERVICES_MANAGER_SERVICE, new ServiceFetcher() {
+                public Object createService(ContextImpl ctx) {
+                    return TextServicesManager.getInstance();
+                }});
+
         registerService(KEYGUARD_SERVICE, new ServiceFetcher() {
                 public Object getService(ContextImpl ctx) {
                     // TODO: why isn't this caching it?  It wasn't
index 9e20764..64d77e8 100644 (file)
@@ -284,7 +284,7 @@ public interface IActivityManager extends IInterface {
     
     // Turn on/off profiling in a particular process.
     public boolean profileControl(String process, boolean start,
-            String path, ParcelFileDescriptor fd) throws RemoteException;
+            String path, ParcelFileDescriptor fd, int profileType) throws RemoteException;
     
     public boolean shutdown(int timeout) throws RemoteException;
     
@@ -363,6 +363,8 @@ public interface IActivityManager extends IInterface {
 
     public boolean isIntentSenderTargetedToPackage(IIntentSender sender) throws RemoteException;
 
+    public void updatePersistentConfiguration(Configuration values) throws RemoteException;
+    
     /*
      * Private non-Binder interfaces
      */
@@ -590,4 +592,5 @@ public interface IActivityManager extends IInterface {
     int REGISTER_PROCESS_OBSERVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+132;
     int UNREGISTER_PROCESS_OBSERVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+133;
     int IS_INTENT_SENDER_TARGETED_TO_PACKAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+134;
+    int UPDATE_PERSISTENT_CONFIGURATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+135;
 }
index 9de0bf4..d0607d0 100644 (file)
@@ -105,7 +105,7 @@ public interface IApplicationThread extends IInterface {
             throws RemoteException;
     void scheduleLowMemory() throws RemoteException;
     void scheduleActivityConfigurationChanged(IBinder token) throws RemoteException;
-    void profilerControl(boolean start, String path, ParcelFileDescriptor fd)
+    void profilerControl(boolean start, String path, ParcelFileDescriptor fd, int profileType)
             throws RemoteException;
     void dumpHeap(boolean managed, String path, ParcelFileDescriptor fd)
             throws RemoteException;
index 2952e6b..f99b420 100644 (file)
@@ -536,9 +536,11 @@ public class Instrumentation {
          */
         public final Activity waitForActivityWithTimeout(long timeOut) {
             synchronized (this) {
-                try {
-                    wait(timeOut);
-                } catch (InterruptedException e) {
+                if (mLastActivity == null) {
+                    try {
+                        wait(timeOut);
+                    } catch (InterruptedException e) {
+                    }
                 }
                 if (mLastActivity == null) {
                     return null;
index 1af0983..ca64c88 100644 (file)
@@ -97,9 +97,10 @@ public class StatusBarManager {
         }
     }
 
-    public void setIcon(String slot, int iconId, int iconLevel) {
+    public void setIcon(String slot, int iconId, int iconLevel, String contentDescription) {
         try {
-            mService.setIcon(slot, mContext.getPackageName(), iconId, iconLevel);
+            mService.setIcon(slot, mContext.getPackageName(), iconId, iconLevel,
+                    contentDescription);
         } catch (RemoteException ex) {
             // system process is dead anyway.
             throw new RuntimeException(ex);
index 8204a4f..08bc0ac 100644 (file)
@@ -261,6 +261,10 @@ public class AppWidgetHost {
             TypedValue.complexToDimensionPixelSize(appWidget.minWidth, mDisplayMetrics);
         appWidget.minHeight =
             TypedValue.complexToDimensionPixelSize(appWidget.minHeight, mDisplayMetrics);
+        appWidget.minResizeWidth =
+            TypedValue.complexToDimensionPixelSize(appWidget.minResizeWidth, mDisplayMetrics);
+        appWidget.minResizeHeight =
+            TypedValue.complexToDimensionPixelSize(appWidget.minResizeHeight, mDisplayMetrics);
 
         synchronized (mViews) {
             v = mViews.get(appWidgetId);
index b46802e..b8c5b02 100644 (file)
@@ -54,7 +54,8 @@ public class AppWidgetProviderInfo implements Parcelable {
     public ComponentName provider;
 
     /**
-     * Minimum width of the AppWidget, in dp.
+     * The default height of the widget when added to a host, in dp. The widget will get
+     * at least this width, and will often be given more, depending on the host.
      *
      * <p>This field corresponds to the <code>android:minWidth</code> attribute in
      * the AppWidget meta-data file.
@@ -62,7 +63,8 @@ public class AppWidgetProviderInfo implements Parcelable {
     public int minWidth;
 
     /**
-     * Minimum height of the AppWidget, in dp.
+     * The default height of the widget when added to a host, in dp. The widget will get
+     * at least this height, and will often be given more, depending on the host.
      *
      * <p>This field corresponds to the <code>android:minHeight</code> attribute in
      * the AppWidget meta-data file.
@@ -70,6 +72,24 @@ public class AppWidgetProviderInfo implements Parcelable {
     public int minHeight;
 
     /**
+     * Minimum width (in dp) which the widget can be resized to. This field has no effect if it
+     * is greater than minWidth or if horizontal resizing isn't enabled (see {@link #resizeMode}).
+     *
+     * <p>This field corresponds to the <code>android:minResizeWidth</code> attribute in
+     * the AppWidget meta-data file.
+     */
+    public int minResizeWidth;
+
+    /**
+     * Minimum height (in dp) which the widget can be resized to. This field has no effect if it
+     * is greater than minHeight or if vertical resizing isn't enabled (see {@link #resizeMode}).
+     *
+     * <p>This field corresponds to the <code>android:minResizeHeight</code> attribute in
+     * the AppWidget meta-data file.
+     */
+    public int minResizeHeight;
+
+    /**
      * How often, in milliseconds, that this AppWidget wants to be updated.
      * The AppWidget manager may place a limit on how often a AppWidget is updated.
      *
index ab3a426..095cd11 100644 (file)
@@ -120,6 +120,7 @@ public final class BluetoothDeviceProfileState extends StateMachine {
     private Pair<Integer, String> mIncomingConnections;
     private PowerManager.WakeLock mWakeLock;
     private PowerManager mPowerManager;
+    private boolean mPairingRequestRcvd = false;
 
     private BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
         @Override
@@ -187,27 +188,38 @@ public final class BluetoothDeviceProfileState extends StateMachine {
                 Message msg = obtainMessage(CONNECTION_ACCESS_REQUEST_REPLY);
                 msg.arg1 = val;
                 sendMessage(msg);
+            } else if (action.equals(BluetoothDevice.ACTION_PAIRING_REQUEST)) {
+                mPairingRequestRcvd = true;
+            } else if (action.equals(BluetoothDevice.ACTION_BOND_STATE_CHANGED)) {
+                int state = intent.getIntExtra(BluetoothDevice.EXTRA_BOND_STATE,
+                        BluetoothDevice.ERROR);
+                if (state == BluetoothDevice.BOND_BONDED && mPairingRequestRcvd) {
+                    setTrust(BluetoothDevice.CONNECTION_ACCESS_YES);
+                    mPairingRequestRcvd = false;
+                } else if (state == BluetoothDevice.BOND_NONE) {
+                    mPairingRequestRcvd = false;
+                }
             }
         }
     };
 
     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;
-  }
+        // 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) {
+          BluetoothService service, BluetoothA2dpService a2dpService, boolean setTrust) {
         super(address);
         mContext = context;
         mDevice = new BluetoothDevice(address);
@@ -231,6 +243,8 @@ public final class BluetoothDeviceProfileState extends StateMachine {
         filter.addAction(BluetoothInputDevice.ACTION_CONNECTION_STATE_CHANGED);
         filter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED);
         filter.addAction(BluetoothDevice.ACTION_CONNECTION_ACCESS_REPLY);
+        filter.addAction(BluetoothDevice.ACTION_PAIRING_REQUEST);
+        filter.addAction(BluetoothDevice.ACTION_BOND_STATE_CHANGED);
 
         mContext.registerReceiver(mBroadcastReceiver, filter);
 
@@ -247,6 +261,10 @@ public final class BluetoothDeviceProfileState extends StateMachine {
                                               PowerManager.ACQUIRE_CAUSES_WAKEUP |
                                               PowerManager.ON_AFTER_RELEASE, TAG);
         mWakeLock.setReferenceCounted(false);
+
+        if (setTrust) {
+            setTrust(BluetoothDevice.CONNECTION_ACCESS_YES);
+        }
     }
 
     private BluetoothProfile.ServiceListener mBluetoothProfileServiceListener =
index 3284361..8f2b3d8 100644 (file)
@@ -661,7 +661,7 @@ public final class BluetoothHeadset implements BluetoothProfile {
      */
     public boolean disconnectHeadsetInternal(BluetoothDevice device) {
         if (DBG) log("disconnectHeadsetInternal");
-        if (mService != null && isEnabled()) {
+        if (mService != null && !isDisabled()) {
             try {
                  return mService.disconnectHeadsetInternal(device);
             } catch (RemoteException e) {Log.e(TAG, e.toString());}
index 92b98fd..37cc141 100644 (file)
@@ -56,11 +56,8 @@ public interface ComponentCallbacks {
     static final int TRIM_MEMORY_COMPLETE = 80;
 
     /** @hide */
-    static final int TRIM_MEMORY_MODERATE = 60;
+    static final int TRIM_MEMORY_MODERATE = 50;
 
     /** @hide */
-    static final int TRIM_MEMORY_BACKGROUND = 40;
-
-    /** @hide */
-    static final int TRIM_MEMORY_INVISIBLE = 20;
+    static final int TRIM_MEMORY_BACKGROUND = 20;
 }
index fed6d81..0a2253c 100644 (file)
@@ -1612,6 +1612,15 @@ public abstract class Context {
 
     /**
      * Use with {@link #getSystemService} to retrieve a
+     * {@link android.view.textservice.TextServicesManager} for accessing
+     * text services.
+     *
+     * @see #getSystemService
+     */
+    public static final String TEXT_SERVICES_MANAGER_SERVICE = "textservices";
+
+    /**
+     * Use with {@link #getSystemService} to retrieve a
      * {@link android.appwidget.AppWidgetManager} for accessing AppWidgets.
      *
      * @hide
index 5c1b968..6e68b6b 100644 (file)
@@ -272,6 +272,12 @@ public class MatrixCursor extends AbstractCursor {
     }
 
     @Override
+    public byte[] getBlob(int column) {
+        Object value = get(column);
+        return (byte[]) value;
+    }
+
+    @Override
     public int getType(int column) {
         return DatabaseUtils.getTypeOfObject(get(column));
     }
index 7d67e11..a168260 100644 (file)
@@ -16,6 +16,8 @@
 
 package android.hardware;
 
+import android.annotation.SdkConstant;
+import android.annotation.SdkConstant.SdkConstantType;
 import android.graphics.ImageFormat;
 import android.graphics.Rect;
 import android.graphics.SurfaceTexture;
@@ -142,6 +144,22 @@ public class Camera {
     private boolean mWithBuffer;
 
     /**
+     * Broadcast Action:  A new picture is taken by the camera, and the entry of
+     * the picture has been added to the media store.
+     * {@link android.content.Intent#getData} is URI of the picture.
+     */
+    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+    public static final String ACTION_NEW_PICTURE = "android.hardware.action.NEW_PICTURE";
+
+    /**
+     * Broadcast Action:  A new video is recorded by the camera, and the entry
+     * of the video has been added to the media store.
+     * {@link android.content.Intent#getData} is URI of the video.
+     */
+    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+    public static final String ACTION_NEW_VIDEO = "android.hardware.action.NEW_VIDEO";
+
+    /**
      * Returns the number of physical cameras available on this device.
      */
     public native static int getNumberOfCameras();
index eafff49..5cfa998 100644 (file)
@@ -172,7 +172,10 @@ public class ExtractEditLayout extends LinearLayout {
 
         @Override
         public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) {
-            return mCallback.onActionItemClicked(this, item);
+            if (mCallback != null) {
+                return mCallback.onActionItemClicked(this, item);
+            }
+            return false;
         }
 
         @Override
index a866436..b035c51 100644 (file)
@@ -103,6 +103,10 @@ public class EthernetDataTracker implements NetworkStateTracker {
         public void interfaceRemoved(String iface) {
             mTracker.interfaceRemoved(iface);
         }
+
+        public void limitReached(String limitName, String iface) {
+            // Ignored.
+        }
     }
 
     private EthernetDataTracker() {
index 4436e6e..a97f203 100644 (file)
@@ -52,4 +52,14 @@ interface INetworkManagementEventObserver {
      * @param iface The interface.
      */
     void interfaceRemoved(String iface);
+
+    /**
+     * A networking quota limit has been reached. The quota might not
+     * be specific to an interface.
+     *
+     * @param limitName The name of the limit that triggered.
+     * @param iface The interface on which the limit was detected.
+     */
+    void limitReached(String limitName, String iface);
+
 }
index 2b59dba..e054930 100644 (file)
@@ -97,6 +97,15 @@ public class TrafficStats {
     }
 
     /**
+     * Get the active tag used when accounting {@link Socket} traffic originating
+     * from the current thread. Only one active tag per thread is supported.
+     * {@link #tagSocket(Socket)}.
+     */
+    public static int getThreadStatsTag() {
+        return NetworkManagementSocketTagger.getThreadSocketStatsTag();
+    }
+
+    /**
      * @deprecated unsupported, will eventually be removed
      */
     @Deprecated
diff --git a/core/java/android/net/VpnBuilder.java b/core/java/android/net/VpnBuilder.java
new file mode 100644 (file)
index 0000000..4582523
--- /dev/null
@@ -0,0 +1,413 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.app.Activity;
+import android.app.PendingIntent;
+import android.content.Context;
+import android.content.Intent;
+import android.os.ParcelFileDescriptor;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+
+import com.android.internal.net.VpnConfig;
+
+import java.net.InetAddress;
+import java.net.Inet4Address;
+import java.net.Inet6Address;
+import java.net.DatagramSocket;
+import java.net.Socket;
+import java.util.ArrayList;
+
+/**
+ * VpnBuilder is a framework which enables applications to build their
+ * own VPN solutions. In general, it creates a virtual network interface,
+ * configures addresses and routing rules, and returns a file descriptor
+ * to the application. Each read from the descriptor retrieves an outgoing
+ * packet which was routed to the interface. Each write to the descriptor
+ * injects an incoming packet just like it was received from the interface.
+ * The framework is running on Internet Protocol (IP), so packets are
+ * always started with IP headers. The application then completes a VPN
+ * connection by processing and exchanging packets with a remote server
+ * over a secured tunnel.
+ *
+ * <p>Letting applications intercept packets raises huge security concerns.
+ * Besides, a VPN application can easily break the network, and two of them
+ * may conflict with each other. The framework takes several actions to
+ * address these issues. Here are some key points:
+ * <ul>
+ *   <li>User action is required to create a VPN connection.</li>
+ *   <li>There can be only one VPN connection running at the same time. The
+ *       existing interface is deactivated when a new one is created.</li>
+ *   <li>A system-managed notification is shown during the lifetime of a
+ *       VPN connection.</li>
+ *   <li>A system-managed dialog gives the information of the current VPN
+ *       connection. It also provides a button to disconnect.</li>
+ *   <li>The network is restored automatically when the file descriptor is
+ *       closed. It also covers the cases when a VPN application is crashed
+ *       or killed by the system.</li>
+ * </ul>
+ *
+ * <p>There are two primary methods in this class: {@link #prepare} and
+ * {@link #establish}. The former deals with the user action and stops
+ * the existing VPN connection created by another application. The latter
+ * creates a VPN interface using the parameters supplied to this builder.
+ * An application must call {@link #prepare} to grant the right to create
+ * an interface, and it can be revoked at any time by another application.
+ * The application got revoked is notified by an {@link #ACTION_VPN_REVOKED}
+ * broadcast. Here are the general steps to create a VPN connection:
+ * <ol>
+ *   <li>When the user press the button to connect, call {@link #prepare}
+ *       and launch the intent if necessary.</li>
+ *   <li>Register a receiver for {@link #ACTION_VPN_REVOKED} broadcasts.
+ *   <li>Connect to the remote server and negotiate the network parameters
+ *       of the VPN connection.</li>
+ *   <li>Use those parameters to configure a VpnBuilder and create a VPN
+ *       interface by calling {@link #establish}.</li>
+ *   <li>Start processing packets between the returned file descriptor and
+ *       the VPN tunnel.</li>
+ *   <li>When an {@link #ACTION_VPN_REVOKED} broadcast is received, the
+ *       interface is already deactivated by the framework. Close the file
+ *       descriptor and shut down the VPN tunnel gracefully.
+ * </ol>
+ * Methods in this class can be used in activities and services. However,
+ * the intent returned from {@link #prepare} must be launched from an
+ * activity. The broadcast receiver can be registered at any time, but doing
+ * it before calling {@link #establish} effectively avoids race conditions.
+ *
+ * <p class="note">Using this class requires
+ * {@link android.Manifest.permission#VPN} permission.
+ * @hide
+ */
+public class VpnBuilder {
+
+    /**
+     * Broadcast intent action indicating that the VPN application has been
+     * revoked. This can be only received by the target application on the
+     * receiver explicitly registered using {@link Context#registerReceiver}.
+     *
+     * <p>This is a protected intent that can only be sent by the system.
+     */
+    public static final String ACTION_VPN_REVOKED = VpnConfig.ACTION_VPN_REVOKED;
+
+    /**
+     * Use IConnectivityManager instead since those methods are hidden and
+     * not available in ConnectivityManager.
+     */
+    private static IConnectivityManager getService() {
+        return IConnectivityManager.Stub.asInterface(
+                ServiceManager.getService(Context.CONNECTIVITY_SERVICE));
+    }
+
+    /**
+     * Prepare to establish a VPN connection. This method returns {@code null}
+     * if the VPN application is already prepared. Otherwise, it returns an
+     * {@link Intent} to a system activity. The application should launch the
+     * activity using {@link Activity#startActivityForResult} to get itself
+     * prepared. The activity may pop up a dialog to require user action, and
+     * the result will come back to the application through its
+     * {@link Activity#onActivityResult}. The application becomes prepared if
+     * the result is {@link Activity#RESULT_OK}, and it is granted to create a
+     * VPN interface by calling {@link #establish}.
+     *
+     * <p>Only one application can be granted at the same time. The right
+     * is revoked when another application is granted. The application
+     * losing the right will be notified by an {@link #ACTION_VPN_REVOKED}
+     * broadcast, and its VPN interface will be deactivated by the system.
+     * The application should then notify the remote server and disconnect
+     * gracefully. Unless the application becomes prepared again, subsequent
+     * calls to {@link #establish} will return {@code null}.
+     *
+     * @see #establish
+     * @see #ACTION_VPN_REVOKED
+     */
+    public static Intent prepare(Context context) {
+        try {
+            if (getService().prepareVpn(context.getPackageName(), null)) {
+                return null;
+            }
+        } catch (RemoteException e) {
+            // ignore
+        }
+        return VpnConfig.getIntentForConfirmation();
+    }
+
+    private VpnConfig mConfig = new VpnConfig();
+    private StringBuilder mAddresses = new StringBuilder();
+    private StringBuilder mRoutes = new StringBuilder();
+
+    /**
+     * Set the name of this session. It will be displayed in system-managed
+     * dialogs and notifications. This is recommended not required.
+     */
+    public VpnBuilder setSession(String session) {
+        mConfig.session = session;
+        return this;
+    }
+
+    /**
+     * Set the {@link PendingIntent} to an activity for users to configure
+     * the VPN connection. If it is not set, the button to configure will
+     * not be shown in system-managed dialogs.
+     */
+    public VpnBuilder setConfigureIntent(PendingIntent intent) {
+        mConfig.configureIntent = intent;
+        return this;
+    }
+
+    /**
+     * Set the maximum transmission unit (MTU) of the VPN interface. If it
+     * is not set, the default value in the operating system will be used.
+     *
+     * @throws IllegalArgumentException if the value is not positive.
+     */
+    public VpnBuilder setMtu(int mtu) {
+        if (mtu <= 0) {
+            throw new IllegalArgumentException("Bad mtu");
+        }
+        mConfig.mtu = mtu;
+        return this;
+    }
+
+    /**
+     * Private method to validate address and prefixLength.
+     */
+    private static void check(InetAddress address, int prefixLength) {
+        if (address.isLoopbackAddress()) {
+            throw new IllegalArgumentException("Bad address");
+        }
+        if (address instanceof Inet4Address) {
+            if (prefixLength < 0 || prefixLength > 32) {
+                throw new IllegalArgumentException("Bad prefixLength");
+            }
+        } else if (address instanceof Inet6Address) {
+            if (prefixLength < 0 || prefixLength > 128) {
+                throw new IllegalArgumentException("Bad prefixLength");
+            }
+        } else {
+            throw new IllegalArgumentException("Unsupported family");
+        }
+    }
+
+    /**
+     * Convenience method to add a network address to the VPN interface
+     * using a numeric address string. See {@link InetAddress} for the
+     * definitions of numeric address formats.
+     *
+     * @throws IllegalArgumentException if the address is invalid.
+     * @see #addAddress(InetAddress, int)
+     */
+    public VpnBuilder addAddress(String address, int prefixLength) {
+        return addAddress(InetAddress.parseNumericAddress(address), prefixLength);
+    }
+
+    /**
+     * Add a network address to the VPN interface. Both IPv4 and IPv6
+     * addresses are supported. At least one address must be set before
+     * calling {@link #establish}.
+     *
+     * @throws IllegalArgumentException if the address is invalid.
+     */
+    public VpnBuilder addAddress(InetAddress address, int prefixLength) {
+        check(address, prefixLength);
+
+        if (address.isAnyLocalAddress()) {
+            throw new IllegalArgumentException("Bad address");
+        }
+
+        mAddresses.append(String.format(" %s/%d", address.getHostAddress(), prefixLength));
+        return this;
+    }
+
+    /**
+     * Convenience method to add a network route to the VPN interface
+     * using a numeric address string. See {@link InetAddress} for the
+     * definitions of numeric address formats.
+     *
+     * @see #addRoute(InetAddress, int)
+     * @throws IllegalArgumentException if the route is invalid.
+     */
+    public VpnBuilder addRoute(String address, int prefixLength) {
+        return addRoute(InetAddress.parseNumericAddress(address), prefixLength);
+    }
+
+    /**
+     * Add a network route to the VPN interface. Both IPv4 and IPv6
+     * routes are supported.
+     *
+     * @throws IllegalArgumentException if the route is invalid.
+     */
+    public VpnBuilder addRoute(InetAddress address, int prefixLength) {
+        check(address, prefixLength);
+
+        int offset = prefixLength / 8;
+        byte[] bytes = address.getAddress();
+        if (offset < bytes.length) {
+            if ((byte)(bytes[offset] << (prefixLength % 8)) != 0) {
+                throw new IllegalArgumentException("Bad address");
+            }
+            while (++offset < bytes.length) {
+                if (bytes[offset] != 0) {
+                    throw new IllegalArgumentException("Bad address");
+                }
+            }
+        }
+
+        mRoutes.append(String.format(" %s/%d", address.getHostAddress(), prefixLength));
+        return this;
+    }
+
+    /**
+     * Convenience method to add a DNS server to the VPN connection
+     * using a numeric address string. See {@link InetAddress} for the
+     * definitions of numeric address formats.
+     *
+     * @throws IllegalArgumentException if the address is invalid.
+     * @see #addDnsServer(InetAddress)
+     */
+    public VpnBuilder addDnsServer(String address) {
+        return addDnsServer(InetAddress.parseNumericAddress(address));
+    }
+
+    /**
+     * Add a DNS server to the VPN connection. Both IPv4 and IPv6
+     * addresses are supported. If none is set, the DNS servers of
+     * the default network will be used.
+     *
+     * @throws IllegalArgumentException if the address is invalid.
+     */
+    public VpnBuilder addDnsServer(InetAddress address) {
+        if (address.isLoopbackAddress() || address.isAnyLocalAddress()) {
+            throw new IllegalArgumentException("Bad address");
+        }
+        if (mConfig.dnsServers == null) {
+            mConfig.dnsServers = new ArrayList<String>();
+        }
+        mConfig.dnsServers.add(address.getHostAddress());
+        return this;
+    }
+
+    /**
+     * Add a search domain to the DNS resolver.
+     */
+    public VpnBuilder addSearchDomain(String domain) {
+        if (mConfig.searchDomains == null) {
+            mConfig.searchDomains = new ArrayList<String>();
+        }
+        mConfig.searchDomains.add(domain);
+        return this;
+    }
+
+    /**
+     * Create a VPN interface using the parameters supplied to this builder.
+     * The interface works on IP packets, and a file descriptor is returned
+     * for the application to access them. Each read retrieves an outgoing
+     * packet which was routed to the interface. Each write injects an
+     * incoming packet just like it was received from the interface. The file
+     * descriptor is put into non-blocking mode by default to avoid blocking
+     * Java threads. To use the file descriptor completely in native space,
+     * see {@link ParcelFileDescriptor#detachFd()}. The application MUST
+     * close the file descriptor when the VPN connection is terminated. The
+     * VPN interface will be removed and the network will be restored by the
+     * framework automatically.
+     *
+     * <p>To avoid conflicts, there can be only one active VPN interface at
+     * the same time. Usually network parameters are never changed during the
+     * lifetime of a VPN connection. It is also common for an application to
+     * create a new file descriptor after closing the previous one. However,
+     * it is rare but not impossible to have two interfaces while performing a
+     * seamless handover. In this case, the old interface will be deactivated
+     * when the new one is configured successfully. Both file descriptors are
+     * valid but now outgoing packets will be routed to the new interface.
+     * Therefore, after draining the old file descriptor, the application MUST
+     * close it and start using the new file descriptor. If the new interface
+     * cannot be created, the existing interface and its file descriptor remain
+     * untouched.
+     *
+     * <p>An exception will be thrown if the interface cannot be created for
+     * any reason. However, this method returns {@code null} if the application
+     * is not prepared or is revoked by another application. This helps solve
+     * possible race conditions while handling {@link #ACTION_VPN_REVOKED}
+     * broadcasts.
+     *
+     * @return {@link ParcelFileDescriptor} of the VPN interface, or
+     *         {@code null} if the application is not prepared.
+     * @throws IllegalArgumentException if a parameter is not accepted by the
+     *         operating system.
+     * @throws IllegalStateException if a parameter cannot be applied by the
+     *         operating system.
+     * @see #prepare
+     */
+    public ParcelFileDescriptor establish() {
+        mConfig.addresses = mAddresses.toString();
+        mConfig.routes = mRoutes.toString();
+
+        try {
+            return getService().establishVpn(mConfig);
+        } catch (RemoteException e) {
+            throw new IllegalStateException(e);
+        }
+    }
+
+    /**
+     * Protect a socket from VPN connections. The socket will be bound to the
+     * current default network interface, so its traffic will not be forwarded
+     * through VPN. This method is useful if some connections need to be kept
+     * outside of VPN. For example, a VPN tunnel should protect itself if its
+     * destination is covered by VPN routes. Otherwise its outgoing packets
+     * will be sent back to the VPN interface and cause an infinite loop.
+     *
+     * <p>The socket is NOT closed by this method.
+     *
+     * @return {@code true} on success.
+     */
+    public static boolean protect(int socket) {
+        ParcelFileDescriptor dup = null;
+        try {
+            dup = ParcelFileDescriptor.fromFd(socket);
+            return getService().protectVpn(dup);
+        } catch (Exception e) {
+            return false;
+        } finally {
+            try {
+                dup.close();
+            } catch (Exception e) {
+                // ignore
+            }
+        }
+    }
+
+    /**
+     * Protect a {@link Socket} from VPN connections.
+     *
+     * @return {@code true} on success.
+     * @see #protect(int)
+     */
+    public static boolean protect(Socket socket) {
+        return protect(socket.getFileDescriptor$().getInt$());
+    }
+
+    /**
+     * Protect a {@link DatagramSocket} from VPN connections.
+     *
+     * @return {@code true} on success.
+     * @see #protect(int)
+     */
+    public static boolean protect(DatagramSocket socket) {
+        return protect(socket.getFileDescriptor$().getInt$());
+    }
+}
index dcbe9da..2ed6619 100644 (file)
@@ -46,8 +46,6 @@ interface INfcAdapter
 
     // NfcAdapter-class related methods
     boolean isEnabled();
-    NdefMessage localGet();
-    void localSet(in NdefMessage message);
     void enableForegroundDispatch(in ComponentName activity, in PendingIntent intent,
             in IntentFilter[] filters, in TechListParcel techLists);
     void disableForegroundDispatch(in ComponentName activity);
@@ -62,4 +60,7 @@ interface INfcAdapter
     int createLlcpSocket(int sap, int miu, int rw, int linearBufferLength);
     boolean disable();
     boolean enable();
+    boolean enableZeroClick();
+    boolean disableZeroClick();
+    boolean zeroClickEnabled();
 }
index aa5937e..7bdefe7 100644 (file)
@@ -44,5 +44,6 @@ interface INfcTag
     Tag rediscover(int nativehandle);
 
     int setTimeout(int technology, int timeout);
+    int getTimeout(int technology);
     void resetTimeouts();
 }
index 738e75f..4d04027 100644 (file)
@@ -684,44 +684,45 @@ public final class NfcAdapter {
     }
 
     /**
-     * Set the NDEF Message that this NFC adapter should appear as to Tag
-     * readers.
-     * <p>
-     * Any Tag reader can read the contents of the local tag when it is in
-     * proximity, without any further user confirmation.
-     * <p>
-     * The implementation of this method must either
-     * <ul>
-     * <li>act as a passive tag containing this NDEF message
-     * <li>provide the NDEF message on over LLCP to peer NFC adapters
-     * </ul>
-     * The NDEF message is preserved across reboot.
-     * <p>Requires {@link android.Manifest.permission#NFC} permission.
-     *
-     * @param message NDEF message to make public
+     * Enable zero-click sharing.
+     *
      * @hide
      */
-    public void setLocalNdefMessage(NdefMessage message) {
+    public boolean enableZeroClick() {
         try {
-            sService.localSet(message);
+            return sService.enableZeroClick();
         } catch (RemoteException e) {
             attemptDeadServiceRecovery(e);
+            return false;
         }
     }
 
     /**
-     * Get the NDEF Message that this adapter appears as to Tag readers.
-     * <p>Requires {@link android.Manifest.permission#NFC} permission.
+     * Disable zero-click sharing.
      *
-     * @return NDEF Message that is publicly readable
      * @hide
      */
-    public NdefMessage getLocalNdefMessage() {
+    public boolean disableZeroClick() {
         try {
-            return sService.localGet();
+            return sService.disableZeroClick();
         } catch (RemoteException e) {
             attemptDeadServiceRecovery(e);
-            return null;
+            return false;
+        }
+    }
+
+    /**
+     * Return true if zero-click sharing is enabled.
+     *
+     * @return true if zero-click sharing is enabled
+     * @hide
+     */
+    public boolean zeroClickEnabled() {
+        try {
+            return sService.zeroClickEnabled();
+        } catch (RemoteException e) {
+            attemptDeadServiceRecovery(e);
+            return false;
         }
     }
 
index d02086f..0672a4e 100644 (file)
@@ -101,6 +101,24 @@ public final class IsoDep extends BasicTagTechnology {
     }
 
     /**
+     * Gets the currently set timeout of {@link #transceive} in milliseconds.
+     *
+     * <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
+     *
+     * @return timeout value in milliseconds
+     * @hide
+     */
+    // TODO Unhide for ICS
+    public int getTimeout() {
+        try {
+            return mTag.getTagService().getTimeout(TagTechnology.ISO_DEP);
+        } catch (RemoteException e) {
+            Log.e(TAG, "NFC service dead", e);
+            return 0;
+        }
+    }
+
+    /**
      * Return the ISO-DEP historical bytes for {@link NfcA} tags.
      * <p>Does not cause any RF activity and does not block.
      * <p>The historical bytes can be used to help identify a tag. They are present
index 5cafe5b..93e7cbd 100644 (file)
@@ -597,6 +597,24 @@ public final class MifareClassic extends BasicTagTechnology {
         }
     }
 
+    /**
+     * Gets the currently set timeout of {@link #transceive} in milliseconds.
+     *
+     * <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
+     *
+     * @return timeout value in milliseconds
+     * @hide
+     */
+    // TODO Unhide for ICS
+    public int getTimeout() {
+        try {
+            return mTag.getTagService().getTimeout(TagTechnology.MIFARE_CLASSIC);
+        } catch (RemoteException e) {
+            Log.e(TAG, "NFC service dead", e);
+            return 0;
+        }
+    }
+
     private static void validateSector(int sector) {
         // Do not be too strict on upper bounds checking, since some cards
         // have more addressable memory than they report. For example,
index 3d4cdd1..ca74ebe 100644 (file)
@@ -238,6 +238,24 @@ public final class MifareUltralight extends BasicTagTechnology {
         }
     }
 
+    /**
+     * Gets the currently set timeout of {@link #transceive} in milliseconds.
+     *
+     * <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
+     *
+     * @return timeout value in milliseconds
+     * @hide
+     */
+    // TODO Unhide for ICS
+    public int getTimeout() {
+        try {
+            return mTag.getTagService().getTimeout(TagTechnology.MIFARE_ULTRALIGHT);
+        } catch (RemoteException e) {
+            Log.e(TAG, "NFC service dead", e);
+            return 0;
+        }
+    }
+
     private static void validatePageIndex(int pageIndex) {
         // Do not be too strict on upper bounds checking, since some cards
         // may have more addressable memory than they report.
index 08095e6..bd1f95a 100644 (file)
@@ -141,4 +141,22 @@ public final class NfcA extends BasicTagTechnology {
             Log.e(TAG, "NFC service dead", e);
         }
     }
+
+    /**
+     * Gets the currently set timeout of {@link #transceive} in milliseconds.
+     *
+     * <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
+     *
+     * @return timeout value in milliseconds
+     * @hide
+     */
+    // TODO Unhide for ICS
+    public int getTimeout() {
+        try {
+            return mTag.getTagService().getTimeout(TagTechnology.NFC_A);
+        } catch (RemoteException e) {
+            Log.e(TAG, "NFC service dead", e);
+            return 0;
+        }
+    }
 }
index 85abf89..7b25a72 100644 (file)
@@ -140,4 +140,22 @@ public final class NfcF extends BasicTagTechnology {
             Log.e(TAG, "NFC service dead", e);
         }
     }
+
+    /**
+     * Gets the currently set timeout of {@link #transceive} in milliseconds.
+     *
+     * <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
+     *
+     * @return timeout value in milliseconds
+     * @hide
+     */
+    // TODO Unhide for ICS
+    public int getTimeout() {
+        try {
+            return mTag.getTagService().getTimeout(TagTechnology.NFC_F);
+        } catch (RemoteException e) {
+            Log.e(TAG, "NFC service dead", e);
+            return 0;
+        }
+    }
 }
index cd39d5c..bc37244 100644 (file)
@@ -361,7 +361,8 @@ public class Handler {
 
     /**
      * Remove any pending posts of Runnable <var>r</var> with Object
-     * <var>token</var> that are in the message queue.
+     * <var>token</var> that are in the message queue.  If <var>token</var> is null,
+     * all callbacks will be removed.
      */
     public final void removeCallbacks(Runnable r, Object token)
     {
@@ -517,7 +518,8 @@ public class Handler {
 
     /**
      * Remove any pending posts of messages with code 'what' and whose obj is
-     * 'object' that are in the message queue.
+     * 'object' that are in the message queue.  If <var>token</var> is null,
+     * all messages will be removed.
      */
     public final void removeMessages(int what, Object object) {
         mQueue.removeMessages(this, what, object, true);
@@ -525,7 +527,8 @@ public class Handler {
 
     /**
      * Remove any pending posts of callbacks and sent messages whose
-     * <var>obj</var> is <var>token</var>.
+     * <var>obj</var> is <var>token</var>.  If <var>token</var> is null,
+     * all callbacks and messages will be removed.
      */
     public final void removeCallbacksAndMessages(Object token) {
         mQueue.removeCallbacksAndMessages(this, token);
index 720e802..c61f28a 100644 (file)
@@ -130,19 +130,20 @@ public class Looper {
                 if (logging != null) {
                     logging.println(">>>>> Dispatching to " + msg.target + " " +
                             msg.callback + ": " + msg.what);
-                    wallStart = System.currentTimeMillis();
-                    threadStart = SystemClock.currentThreadTimeMillis();
+                    wallStart = SystemClock.currentTimeMicro();
+                    threadStart = SystemClock.currentThreadTimeMicro();
                 }
 
                 msg.target.dispatchMessage(msg);
 
                 if (logging != null) {
-                    long wallTime = System.currentTimeMillis() - wallStart;
-                    long threadTime = SystemClock.currentThreadTimeMillis() - threadStart;
+                    long wallTime = SystemClock.currentTimeMicro() - wallStart;
+                    long threadTime = SystemClock.currentThreadTimeMicro() - threadStart;
 
                     logging.println("<<<<< Finished to " + msg.target + " " + msg.callback);
                     if (logging instanceof Profiler) {
-                        ((Profiler) logging).profile(msg, wallStart, wallTime, threadTime);
+                        ((Profiler) logging).profile(msg, wallStart, wallTime,
+                                threadStart, threadTime);
                     }
                 }
 
@@ -247,6 +248,7 @@ public class Looper {
      * @hide
      */
     public static interface Profiler {
-        void profile(Message message, long wallStart, long wallTime, long threadTime);
+        void profile(Message message, long wallStart, long wallTime,
+                long threadStart, long threadTime);
     }
 }
index ae605fb..73e8d98 100644 (file)
@@ -357,20 +357,11 @@ public class RecoverySystem {
     }
 
     /**
-     * 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.
+     * Reboot into the recovery system to wipe the /cache partition.
      * @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");
-        }
+    public static void rebootWipeCache(Context context) throws IOException {
+        bootCommand(context, "--wipe_cache");
     }
 
     /**
index 2dd6749..7291739 100644 (file)
@@ -157,4 +157,22 @@ public final class SystemClock {
      * @return elapsed milliseconds in the thread
      */
     public static native long currentThreadTimeMillis();
+
+    /**
+     * Returns microseconds running in the current thread.
+     * 
+     * @return elapsed microseconds in the thread
+     * 
+     * @hide
+     */
+    public static native long currentThreadTimeMicro();
+
+    /**
+     * Returns current wall time in  microseconds.
+     * 
+     * @return elapsed microseconds in wall time
+     * 
+     * @hide
+     */
+    public static native long currentTimeMicro();
 }
index c90de17..78c9010 100644 (file)
@@ -563,6 +563,12 @@ public abstract class PreferenceActivity extends ListActivity implements
             // Single pane, showing just a prefs fragment.
             findViewById(com.android.internal.R.id.headers).setVisibility(View.GONE);
             mPrefsContainer.setVisibility(View.VISIBLE);
+            if (initialTitle != 0) {
+                CharSequence initialTitleStr = getText(initialTitle);
+                CharSequence initialShortTitleStr = initialShortTitle != 0
+                        ? getText(initialShortTitle) : null;
+                showBreadCrumbs(initialTitleStr, initialShortTitleStr);
+            }
         } else if (mHeaders.size() > 0) {
             setListAdapter(new HeaderAdapter(this, mHeaders));
             if (!mSinglePane) {
@@ -1093,6 +1099,10 @@ public abstract class PreferenceActivity extends ListActivity implements
         } else {
             getListView().clearChoices();
         }
+        showBreadCrumbs(header);
+    }
+
+    void showBreadCrumbs(Header header) {
         if (header != null) {
             CharSequence title = header.getBreadCrumbTitle(getResources());
             if (title == null) title = header.getTitle(getResources());
index 76f198c..4a719ec 100644 (file)
@@ -1439,6 +1439,13 @@ public final class ContactsContract {
                 CONTENT_URI, "strequent");
 
         /**
+         * The content:// style URI for showing frequently contacted person listing.
+         * @hide
+         */
+        public static final Uri CONTENT_FREQUENT_URI = Uri.withAppendedPath(
+                CONTENT_URI, "frequent");
+
+        /**
          * The content:// style URI used for "type-to-filter" functionality on the
          * {@link #CONTENT_STREQUENT_URI} URI. The filter string will be used to match
          * various parts of the contact name. The filter argument should be passed
@@ -1747,9 +1754,9 @@ public final class ContactsContract {
          *     Uri displayPhotoUri = Uri.withAppendedPath(contactUri, Contacts.Photo.DISPLAY_PHOTO);
          *     try {
          *         AssetFileDescriptor fd =
-         *             getContentResolver().openAssetFile(displayPhotoUri, "r");
+         *             getContentResolver().openAssetFileDescriptor(displayPhotoUri, "r");
          *         return fd.createInputStream();
-         *     } catch (FileNotFoundException e) {
+         *     } catch (IOException e) {
          *         return null;
          *     }
          * }
@@ -2586,7 +2593,7 @@ public final class ContactsContract {
          * display photo.  To access this directory append
          * {@link RawContacts.DisplayPhoto#CONTENT_DIRECTORY} to the raw contact URI.
          * The resulting URI represents an image file, and should be interacted with
-         * using ContentProvider.openAssetFile.
+         * using ContentResolver.openAssetFileDescriptor.
          * <p>
          * <p>
          * Note that this sub-directory also supports opening the photo as an asset file
@@ -2605,7 +2612,7 @@ public final class ContactsContract {
          *             RawContacts.DisplayPhoto.CONTENT_DIRECTORY);
          *     try {
          *         AssetFileDescriptor fd =
-         *             getContentResolver().openAssetFile(rawContactPhotoUri, "rw");
+         *             getContentResolver().openAssetFileDescriptor(rawContactPhotoUri, "rw");
          *         OutputStream os = fd.createOutputStream();
          *         os.write(photo);
          *         os.close();
@@ -2804,7 +2811,7 @@ public final class ContactsContract {
 
         /**
          * The package containing resources for this status: label and icon.
-         * <p>Type: NUMBER</p>
+         * <p>Type: TEXT</p>
          */
         public static final String STATUS_RES_PACKAGE = "status_res_package";
 
@@ -2872,7 +2879,7 @@ public final class ContactsContract {
      * ContentValues values = new ContentValues();
      * values.put(StreamItems.TEXT, "Breakfasted at Tiffanys");
      * values.put(StreamItems.TIMESTAMP, timestamp);
-     * values.put(StreamItems.COMMENT, "3 people reshared this");
+     * values.put(StreamItems.COMMENTS, "3 people reshared this");
      * values.put(StreamItems.ACTION, action);
      * values.put(StreamItems.ACTION_URI, actionUri);
      * Uri streamItemUri = getContentResolver().insert(
@@ -2887,7 +2894,7 @@ public final class ContactsContract {
      * values.put(StreamItems.RAW_CONTACT_ID, rawContactId);
      * values.put(StreamItems.TEXT, "Breakfasted at Tiffanys");
      * values.put(StreamItems.TIMESTAMP, timestamp);
-     * values.put(StreamItems.COMMENT, "3 people reshared this");
+     * values.put(StreamItems.COMMENTS, "3 people reshared this");
      * values.put(StreamItems.ACTION, action);
      * values.put(StreamItems.ACTION_URI, actionUri);
      * Uri streamItemUri = getContentResolver().insert(StreamItems.CONTENT_URI, values);
@@ -2906,7 +2913,7 @@ public final class ContactsContract {
      * <pre>
      * values.clear();
      * values.put(StreamItemPhotos.SORT_INDEX, 1);
-     * values.put(StreamItemPhotos.PICTURE, photoData);
+     * values.put(StreamItemPhotos.PHOTO, photoData);
      * values.put(StreamItemPhotos.ACTION, action);
      * values.put(StreamItemPhotos.ACTION_URI, actionUri);
      * getContentResolver().insert(Uri.withAppendedPath(
@@ -2920,7 +2927,7 @@ public final class ContactsContract {
      * values.clear();
      * values.put(StreamItemPhotos.STREAM_ITEM_ID, streamItemId);
      * values.put(StreamItemPhotos.SORT_INDEX, 1);
-     * values.put(StreamItemPhotos.PICTURE, photoData);
+     * values.put(StreamItemPhotos.PHOTO, photoData);
      * values.put(StreamItemPhotos.ACTION, action);
      * values.put(StreamItemPhotos.ACTION_URI, actionUri);
      * getContentResolver().insert(StreamItems.CONTENT_PHOTO_URI, values);
@@ -3008,8 +3015,7 @@ public final class ContactsContract {
 
         /**
          * This URI allows the caller to query for the maximum number of stream items
-         * that will be stored under any single raw contact, as well as the maximum
-         * photo size (in bytes) accepted in stream item photos.
+         * that will be stored under any single raw contact.
          */
         public static final Uri CONTENT_LIMIT_URI =
                 Uri.withAppendedPath(AUTHORITY_URI, "stream_items_limit");
@@ -3022,13 +3028,6 @@ public final class ContactsContract {
         public static final String MAX_ITEMS = "max_items";
 
         /**
-         * Queries to {@link ContactsContract.StreamItems#CONTENT_LIMIT_URI} will
-         * contain this column, with the value indicating the byte limit for
-         * individual photos.
-         */
-        public static final String PHOTO_MAX_BYTES = "photo_max_bytes";
-
-        /**
          * <p>
          * A sub-directory of a single stream item entry that contains all of its
          * photo rows. To access this
@@ -3067,7 +3066,7 @@ public final class ContactsContract {
          * The package name to use when creating {@link Resources} objects for
          * this stream item. This value is only designed for use when building
          * user interfaces, and should not be used to infer the owner.
-         * <P>Type: NUMBER</P>
+         * <P>Type: TEXT</P>
          */
         public static final String RES_PACKAGE = "res_package";
 
@@ -3161,7 +3160,7 @@ public final class ContactsContract {
      * <pre>
      * ContentValues values = new ContentValues();
      * values.put(StreamItemPhotos.SORT_INDEX, 1);
-     * values.put(StreamItemPhotos.PICTURE, photoData);
+     * values.put(StreamItemPhotos.PHOTO, photoData);
      * values.put(StreamItemPhotos.ACTION, action);
      * values.put(StreamItemPhotos.ACTION_URI, actionUri);
      * Uri photoUri = getContentResolver().insert(Uri.withAppendedPath(
@@ -3176,7 +3175,7 @@ public final class ContactsContract {
      * ContentValues values = new ContentValues();
      * values.put(StreamItemPhotos.STREAM_ITEM_ID, streamItemId);
      * values.put(StreamItemPhotos.SORT_INDEX, 1);
-     * values.put(StreamItemPhotos.PICTURE, photoData);
+     * values.put(StreamItemPhotos.PHOTO, photoData);
      * values.put(StreamItemPhotos.ACTION, action);
      * values.put(StreamItemPhotos.ACTION_URI, actionUri);
      * Uri photoUri = getContentResolver().insert(StreamItems.CONTENT_PHOTO_URI, values);
@@ -3198,7 +3197,7 @@ public final class ContactsContract {
      * <dd>
      * <pre>
      * ContentValues values = new ContentValues();
-     * values.put(StreamItemPhotos.PICTURE, newPhotoData);
+     * values.put(StreamItemPhotos.PHOTO, newPhotoData);
      * getContentResolver().update(
      *     ContentUris.withAppendedId(
      *         Uri.withAppendedPath(
@@ -3212,7 +3211,7 @@ public final class ContactsContract {
      * <pre>
      * ContentValues values = new ContentValues();
      * values.put(StreamItemPhotos.STREAM_ITEM_ID, streamItemId);
-     * values.put(StreamItemPhotos.PICTURE, newPhotoData);
+     * values.put(StreamItemPhotos.PHOTO, newPhotoData);
      * getContentResolver().update(StreamItems.CONTENT_PHOTO_URI, values);
      * </pre>
      * </dd>
@@ -3271,6 +3270,21 @@ public final class ContactsContract {
      *     null, null, null, StreamItemPhotos.SORT_INDEX);
      * </pre>
      * </dl>
+     * The record will contain both a {@link StreamItemPhotos#PHOTO_FILE_ID} and a
+     * {@link StreamItemPhotos#PHOTO_URI}.  The {@link StreamItemPhotos#PHOTO_FILE_ID}
+     * can be used in conjunction with the {@link ContactsContract.DisplayPhoto} API to
+     * retrieve photo content, or you can open the {@link StreamItemPhotos#PHOTO_URI} as
+     * an asset file, as follows:
+     * <pre>
+     * public InputStream openDisplayPhoto(String photoUri) {
+     *     try {
+     *         AssetFileDescriptor fd = getContentResolver().openAssetFileDescriptor(photoUri, "r");
+     *         return fd.createInputStream();
+     *     } catch (IOException e) {
+     *         return null;
+     *     }
+     * }
+     * <pre>
      * </dd>
      * </dl>
      */
@@ -3280,6 +3294,20 @@ public final class ContactsContract {
          */
         private StreamItemPhotos() {
         }
+
+        /**
+         * <p>
+         * The binary representation of the photo.  Any size photo can be inserted;
+         * the provider will resize it appropriately for storage and display.
+         * </p>
+         * <p>
+         * This is only intended for use when inserting or updating a stream item photo.
+         * To retrieve the photo that was stored, open {@link StreamItemPhotos#PHOTO_URI}
+         * as an asset file.
+         * </p>
+         * <P>Type: BLOB</P>
+         */
+        public static final String PHOTO = "photo";
     }
 
     /**
@@ -3302,13 +3330,18 @@ public final class ContactsContract {
         public static final String SORT_INDEX = "sort_index";
 
         /**
-         * The binary representation of the picture.  Pictures larger than
-         * {@link ContactsContract.StreamItems#PHOTO_MAX_BYTES} bytes in size (as
-         * queryable from {@link ContactsContract.StreamItems#CONTENT_LIMIT_URI})
-         * will be rejected.
-         * <P>Type: BLOB</P>
+         * Photo file ID for the photo.
+         * See {@link ContactsContract.DisplayPhoto}.
+         * <P>Type: NUMBER</P>
          */
-        public static final String PICTURE = "picture";
+        public static final String PHOTO_FILE_ID = "photo_file_id";
+
+        /**
+         * URI for retrieving the photo content, automatically populated.  Callers
+         * may retrieve the photo content by opening this URI as an asset file.
+         * <P>Type: TEXT</P>
+         */
+        public static final String PHOTO_URI = "photo_uri";
 
         /**
          * The activity action to execute when the photo is tapped.
@@ -7273,9 +7306,10 @@ public final class ContactsContract {
      * public InputStream openDisplayPhoto(long photoFileId) {
      *     Uri displayPhotoUri = ContentUris.withAppendedId(DisplayPhoto.CONTENT_URI, photoKey);
      *     try {
-     *         AssetFileDescriptor fd = getContentResolver().openAssetFile(displayPhotoUri, "r");
+     *         AssetFileDescriptor fd = getContentResolver().openAssetFileDescriptor(
+     *             displayPhotoUri, "r");
      *         return fd.createInputStream();
-     *     } catch (FileNotFoundException e) {
+     *     } catch (IOException e) {
      *         return null;
      *     }
      * }
index f3bcedb..f799af3 100644 (file)
@@ -283,13 +283,6 @@ public final class MediaStore {
          */
         public static final String IS_DRM = "is_drm";
 
-        /**
-         * Used by the media scanner to suppress files from being processed as media files.
-         *
-         * <P>Type: INTEGER (boolean)</P>
-         * @hide
-         */
-        public static final String NO_MEDIA = "no_media";
      }
 
     /**
index 34699e2..1cd46de 100644 (file)
@@ -16,8 +16,6 @@
 
 package android.provider;
 
-
-
 import android.annotation.SdkConstant;
 import android.annotation.SdkConstant.SdkConstantType;
 import android.app.SearchManager;
@@ -48,7 +46,6 @@ import java.net.URISyntaxException;
 import java.util.HashMap;
 import java.util.HashSet;
 
-
 /**
  * The Settings provider contains global system-level device preferences.
  */
@@ -1045,6 +1042,14 @@ public final class Settings {
         }
 
         /**
+         * @hide Erase the fields in the Configuration that should be applied
+         * by the settings.
+         */
+        public static void clearConfiguration(Configuration inoutConfig) {
+            inoutConfig.fontScale = 0;
+        }
+        
+        /**
          * Convenience function to write a batch of configuration-related
          * settings from a {@link Configuration} object.
          *
@@ -2869,6 +2874,7 @@ public final class Settings {
          * The acceptable packet loss percentage (range 0 - 100) before trying
          * another AP on the same network.
          */
+        @Deprecated
         public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE =
                 "wifi_watchdog_acceptable_packet_loss_percentage";
 
@@ -2876,11 +2882,13 @@ public final class Settings {
          * The number of access points required for a network in order for the
          * watchdog to monitor it.
          */
+        @Deprecated
         public static final String WIFI_WATCHDOG_AP_COUNT = "wifi_watchdog_ap_count";
 
         /**
          * The delay between background checks.
          */
+        @Deprecated
         public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS =
                 "wifi_watchdog_background_check_delay_ms";
 
@@ -2888,12 +2896,14 @@ public final class Settings {
          * Whether the Wi-Fi watchdog is enabled for background checking even
          * after it thinks the user has connected to a good access point.
          */
+        @Deprecated
         public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED =
                 "wifi_watchdog_background_check_enabled";
 
         /**
          * The timeout for a background ping
          */
+        @Deprecated
         public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS =
                 "wifi_watchdog_background_check_timeout_ms";
 
@@ -2903,6 +2913,7 @@ public final class Settings {
          * calculation. For example, one network always seemed to time out for
          * the first couple pings, so this is set to 3 by default.
          */
+        @Deprecated
         public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT =
             "wifi_watchdog_initial_ignored_ping_count";
 
@@ -2912,6 +2923,7 @@ public final class Settings {
          * initial connection state for the network. This is a safeguard for
          * networks containing multiple APs whose DNS does not respond to pings.
          */
+        @Deprecated
         public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = "wifi_watchdog_max_ap_checks";
 
         /**
@@ -2922,24 +2934,85 @@ public final class Settings {
         /**
          * A comma-separated list of SSIDs for which the Wi-Fi watchdog should be enabled.
          */
+        @Deprecated
         public static final String WIFI_WATCHDOG_WATCH_LIST = "wifi_watchdog_watch_list";
 
         /**
          * The number of pings to test if an access point is a good connection.
          */
+        @Deprecated
         public static final String WIFI_WATCHDOG_PING_COUNT = "wifi_watchdog_ping_count";
 
         /**
          * The delay between pings.
          */
+        @Deprecated
         public static final String WIFI_WATCHDOG_PING_DELAY_MS = "wifi_watchdog_ping_delay_ms";
 
         /**
          * The timeout per ping.
          */
+        @Deprecated
         public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = "wifi_watchdog_ping_timeout_ms";
 
         /**
+         * ms delay before rechecking an 'online' wifi connection when it is thought to be unstable.
+         * @hide
+         */
+        public static final String WIFI_WATCHDOG_DNS_CHECK_SHORT_INTERVAL_MS =
+                "wifi_watchdog_dns_check_short_interval_ms";
+
+        /**
+         * ms delay before rechecking an 'online' wifi connection when it is thought to be stable.
+         * @hide
+         */
+        public static final String WIFI_WATCHDOG_DNS_CHECK_LONG_INTERVAL_MS =
+                "wifi_watchdog_dns_check_long_interval_ms";
+
+        /**
+         * ms delay before rechecking a connect SSID for walled garden with a http download.
+         * @hide
+         */
+        public static final String WIFI_WATCHDOG_WALLED_GARDEN_INTERVAL_MS =
+                "wifi_watchdog_walled_garden_interval_ms";
+
+        /**
+         * max blacklist calls on an SSID before full dns check failures disable the network.
+         * @hide
+         */
+        public static final String WIFI_WATCHDOG_MAX_SSID_BLACKLISTS =
+                "wifi_watchdog_max_ssid_blacklists";
+
+        /**
+         * Number of dns pings per check.
+         * @hide
+         */
+        public static final String WIFI_WATCHDOG_NUM_DNS_PINGS = "wifi_watchdog_num_dns_pings";
+
+        /**
+         * Minimum number of responses to the dns pings to consider the test 'successful'.
+         * @hide
+         */
+        public static final String WIFI_WATCHDOG_MIN_DNS_RESPONSES =
+                "wifi_watchdog_min_dns_responses";
+
+        /**
+         * Timeout on dns pings
+         * @hide
+         */
+        public static final String WIFI_WATCHDOG_DNS_PING_TIMEOUT_MS =
+                "wifi_watchdog_dns_ping_timeout_ms";
+
+        /**
+         * We consider action from a 'blacklist' call to have finished by the end of
+         * this interval.  If we are connected to the same AP with no network connection,
+         * we are likely stuck on an SSID with no external connectivity.
+         * @hide
+         */
+        public static final String WIFI_WATCHDOG_BLACKLIST_FOLLOWUP_INTERVAL_MS =
+                "wifi_watchdog_blacklist_followup_interval_ms";
+
+        /**
          * Setting to turn off walled garden test on Wi-Fi. Feature is enabled by default and
          * the setting needs to be set to 0 to disable it.
          * @hide
@@ -2964,6 +3037,14 @@ public final class Settings {
                 "wifi_watchdog_walled_garden_pattern";
 
         /**
+         * Boolean to determine whether to notify on disabling a network.  Secure setting used
+         * to notify user only once.  This setting is not monitored continuously.
+         * @hide
+         */
+        public static final String WIFI_WATCHDOG_SHOW_DISABLED_NETWORK_POPUP =
+                "wifi_watchdog_show_disabled_network_popup";
+
+        /**
          * The maximum number of times we will retry a connection to an access
          * point for which we have failed in acquiring an IP address from DHCP.
          * A value of N means that we will make N+1 connection attempts in all.
@@ -3653,6 +3734,15 @@ public final class Settings {
          */
         public static final String VOICE_RECOGNITION_SERVICE = "voice_recognition_service";
 
+
+        /**
+         * The {@link ComponentName} string of the service to be used as the spell checker
+         * service which is one of the services managed by the text service manager.
+         *
+         * @hide
+         */
+        public static final String SPELL_CHECKER_SERVICE = "spell_checker_service";
+
         /**
          * What happens when the user presses the Power button while in-call
          * and the screen is on.<br/>
index d0712d5..2ad7395 100644 (file)
@@ -16,6 +16,9 @@
 
 package android.provider;
 
+import android.Manifest;
+import android.annotation.SdkConstant;
+import android.annotation.SdkConstant.SdkConstantType;
 import android.content.Intent;
 import android.database.ContentObserver;
 import android.net.Uri;
@@ -25,11 +28,26 @@ import android.provider.CallLog.Calls;
  * The contract between the voicemail provider and applications. Contains
  * definitions for the supported URIs and columns.
  *
+ * <P>The content providers exposes two tables through this interface:
+ * <ul>
+ *   <li> Voicemails table: This stores the actual voicemail records. The
+ *   columns and URIs for accessing this table are defined by the
+ *   {@link Voicemails} class.
+ *   </li>
+ *   <li> Status table: This provides a way for the voicemail source application
+ *   to convey its current state to the system. The columns and URIS for
+ *   accessing this table are defined by the {@link Status} class.
+ *   </li>
+ * </ul>
+ *
+ * <P> The minimum permission needed to access this content provider is
+ * {@link Manifest.permission#READ_WRITE_OWN_VOICEMAIL}
+ *
  * <P>Voicemails are inserted by what is called as a "voicemail source"
  * application, which is responsible for syncing voicemail data between a remote
  * server and the local voicemail content provider. "voicemail source"
- * application should use the source specific {@link #CONTENT_URI_SOURCE} URI
- * to insert and retrieve voicemails.
+ * application should always set the {@link #PARAM_KEY_SOURCE_PACKAGE} in the
+ * URI to identify its package.
  *
  * <P>In addition to the {@link ContentObserver} notifications the voicemail
  * provider also generates broadcast intents to notify change for applications
@@ -43,9 +61,7 @@ import android.provider.CallLog.Calls;
  *    made into the database, including new voicemail.
  *   </li>
  * </ul>
- * @hide
  */
-// TODO: unhide when the API is approved by android-api-council
 public class VoicemailContract {
     /** Not instantiable. */
     private VoicemailContract() {
@@ -59,18 +75,18 @@ public class VoicemailContract {
      */
     public static final String PARAM_KEY_SOURCE_PACKAGE = "source_package";
 
-    // TODO: Move ACTION_NEW_VOICEMAIL to the Intent class.
     /** Broadcast intent when a new voicemail record is inserted. */
+    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
     public static final String ACTION_NEW_VOICEMAIL = "android.intent.action.NEW_VOICEMAIL";
     /**
-     * Extra included in {@value Intent#ACTION_PROVIDER_CHANGED} and
-     * {@value #ACTION_NEW_VOICEMAIL} broadcast intents to indicate if the receiving
-     * package made this change.
+     * Extra included in {@link Intent#ACTION_PROVIDER_CHANGED} broadcast intents to indicate if the
+     * receiving package made this change.
      */
     public static final String EXTRA_SELF_CHANGE = "com.android.voicemail.extra.SELF_CHANGE";
 
     /**
      * Name of the source package field, which must be same across all voicemail related tables.
+     * This is an internal field.
      * @hide
      */
     public static final String SOURCE_PACKAGE_FIELD = "source_package";
@@ -85,9 +101,12 @@ public class VoicemailContract {
         public static final Uri CONTENT_URI =
             Uri.parse("content://" + AUTHORITY + "/voicemail");
 
-        /** The mime type for a collection of voicemails. */
+        /** The MIME type for a collection of voicemails. */
         public static final String DIR_TYPE = "vnd.android.cursor.dir/voicemails";
 
+        /** The MIME type for a single voicemail. */
+        public static final String ITEM_TYPE = "vnd.android.cursor.item/voicemail";
+
         /**
          * Phone number of the voicemail sender.
          * <P>Type: TEXT</P>
@@ -109,17 +128,27 @@ public class VoicemailContract {
          */
         public static final String NEW = Calls.NEW;
         /**
-         * The mail box state of the voicemail.
+         * The mail box state of the voicemail. This field is currently not used by the system.
          * <P> Possible values: {@link #STATE_INBOX}, {@link #STATE_DELETED},
          * {@link #STATE_UNDELETED}.
          * <P>Type: INTEGER</P>
+         * @hide
          */
         public static final String STATE = "state";
-        /** Value of {@link #STATE} when the voicemail is in inbox. */
+        /**
+         * Value of {@link #STATE} when the voicemail is in inbox.
+         * @hide
+         */
         public static int STATE_INBOX = 0;
-        /** Value of {@link #STATE} when the voicemail has been marked as deleted. */
+        /**
+         * Value of {@link #STATE} when the voicemail has been marked as deleted.
+         * @hide
+         */
         public static int STATE_DELETED = 1;
-        /** Value of {@link #STATE} when the voicemail has marked as undeleted. */
+        /**
+         * Value of {@link #STATE} when the voicemail has marked as undeleted.
+         * @hide
+         */
         public static int STATE_UNDELETED = 2;
         /**
          * Package name of the source application that inserted the voicemail.
@@ -166,9 +195,9 @@ public class VoicemailContract {
     public static final class Status implements BaseColumns {
         /** URI to insert/retrieve status of voicemail source. */
         public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/status");
-        /** The mime type for a collection of voicemail source statuses. */
+        /** The MIME type for a collection of voicemail source statuses. */
         public static final String DIR_TYPE = "vnd.android.cursor.dir/voicemail.source.status";
-        /** The mime type for a collection of voicemails. */
+        /** The MIME type for a single voicemail source status entry. */
         public static final String ITEM_TYPE = "vnd.android.cursor.item/voicemail.source.status";
 
         /** Not instantiable. */
@@ -201,10 +230,17 @@ public class VoicemailContract {
          * <P>Type: INTEGER</P>
          */
         public static final String CONFIGURATION_STATE = "configuration_state";
+        /** Value of {@link #CONFIGURATION_STATE} to indicate an all OK configuration status. */
         public static final int CONFIGURATION_STATE_OK = 0;
+        /**
+         * Value of {@link #CONFIGURATION_STATE} to indicate the visual voicemail is not
+         * yet configured on this device.
+         */
         public static final int CONFIGURATION_STATE_NOT_CONFIGURED = 1;
         /**
-         * This state must be used when the source has verified that the current user can be
+         * Value of {@link #CONFIGURATION_STATE} to indicate the visual voicemail is not
+         * yet configured on this device but can be configured by the user.
+         * <p> This state must be used when the source has verified that the current user can be
          * upgraded to visual voicemail and would like to show a set up invitation message.
          */
         public static final int CONFIGURATION_STATE_CAN_BE_CONFIGURED = 2;
@@ -218,7 +254,14 @@ public class VoicemailContract {
          * <P>Type: INTEGER</P>
          */
         public static final String DATA_CHANNEL_STATE = "data_channel_state";
+        /**
+         *  Value of {@link #DATA_CHANNEL_STATE} to indicate that data channel is working fine.
+         */
         public static final int DATA_CHANNEL_STATE_OK = 0;
+        /**
+         * Value of {@link #DATA_CHANNEL_STATE} to indicate that data channel connection is not
+         * working.
+         */
         public static final int DATA_CHANNEL_STATE_NO_CONNECTION = 1;
         /**
          * The notification channel state of the voicemail source. This is the channel through which
@@ -231,10 +274,20 @@ public class VoicemailContract {
          * <P>Type: INTEGER</P>
          */
         public static final String NOTIFICATION_CHANNEL_STATE = "notification_channel_state";
+        /**
+         * Value of {@link #NOTIFICATION_CHANNEL_STATE} to indicate that the notification channel is
+         * working fine.
+         */
         public static final int NOTIFICATION_CHANNEL_STATE_OK = 0;
+        /**
+         * Value of {@link #NOTIFICATION_CHANNEL_STATE} to indicate that the notification channel
+         * connection is not working.
+         */
         public static final int NOTIFICATION_CHANNEL_STATE_NO_CONNECTION = 1;
         /**
-         * Use this state when the notification can only tell that there are pending messages on
+         * Value of {@link #NOTIFICATION_CHANNEL_STATE} to indicate that there are messages waiting
+         * on the server but the details are not known.
+         * <p> Use this state when the notification can only tell that there are pending messages on
          * the server but no details of the sender/time etc are known.
          */
         public static final int NOTIFICATION_CHANNEL_STATE_MESSAGE_WAITING = 2;
index 75f38f9..30a8b2a 100644 (file)
@@ -21,8 +21,13 @@ import android.bluetooth.BluetoothDevice;
 import android.bluetooth.BluetoothProfile;
 import android.bluetooth.BluetoothA2dp;
 import android.bluetooth.BluetoothHeadset;
+import android.content.BroadcastReceiver;
+import android.content.ContentResolver;
 import android.content.Context;
 import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.SharedPreferences;
+import android.provider.Settings;
 import android.util.Log;
 
 import java.io.BufferedReader;
@@ -74,11 +79,17 @@ class BluetoothBondState {
     private BluetoothA2dp mA2dpProxy;
     private BluetoothHeadset mHeadsetProxy;
 
+    private ArrayList<String> mPairingRequestRcvd = new ArrayList<String>();
+
     BluetoothBondState(Context context, BluetoothService service) {
         mContext = context;
         mService = service;
         mBluetoothInputProfileHandler =
             BluetoothInputProfileHandler.getInstance(mContext, mService);
+
+        IntentFilter filter = new IntentFilter();
+        filter.addAction(BluetoothDevice.ACTION_PAIRING_REQUEST);
+        mContext.registerReceiver(mReceiver, filter);
     }
 
     synchronized void setPendingOutgoingBonding(String address) {
@@ -137,11 +148,18 @@ class BluetoothBondState {
         }
 
         if (state == BluetoothDevice.BOND_BONDED) {
-            mService.addProfileState(address);
+            boolean setTrust = false;
+            if (mPairingRequestRcvd.contains(address)) setTrust = true;
+
+            mService.addProfileState(address, setTrust);
+            mPairingRequestRcvd.remove(address);
+
         } else if (state == BluetoothDevice.BOND_BONDING) {
             if (mA2dpProxy == null || mHeadsetProxy == null) {
                 getProfileProxy();
             }
+        } else if (state == BluetoothDevice.BOND_NONE) {
+            mPairingRequestRcvd.remove(address);
         }
 
         setProfilePriorities(address, state);
@@ -452,4 +470,17 @@ class BluetoothBondState {
         }
     }
 
+    private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            if (intent == null) return;
+
+            String action = intent.getAction();
+            if (action.equals(BluetoothDevice.ACTION_PAIRING_REQUEST)) {
+                BluetoothDevice dev = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
+                String address = dev.getAddress();
+                mPairingRequestRcvd.add(address);
+            }
+        }
+    };
 }
index ff16c18..d68d8ba 100755 (executable)
@@ -527,10 +527,19 @@ public class BluetoothService extends IBluetooth.Stub {
                 break;
             case MESSAGE_AUTO_PAIRING_FAILURE_ATTEMPT_DELAY:
                 address = (String)msg.obj;
-                if (address != null) {
+                if (address == null) return;
+                int attempt = mBondState.getAttempt(address);
+
+                // Try only if attemps are in progress and cap it 2 attempts
+                // The 2 attempts cap is a fail safe if the stack returns
+                // an incorrect error code for bonding failures and if the pin
+                // is entered wrongly twice we should abort.
+                if (attempt > 0 && attempt <= 2) {
+                    mBondState.attempt(address);
                     createBond(address);
                     return;
                 }
+                if (attempt > 0) mBondState.clearPinAttempts(address);
                 break;
             }
         }
@@ -741,7 +750,6 @@ public class BluetoothService extends IBluetooth.Stub {
                     BluetoothDevice.BOND_NONE, result);
             return;
         }
-        mBondState.attempt(address);
     }
 
     /*package*/ BluetoothDevice getRemoteDevice(String address) {
@@ -2277,11 +2285,11 @@ public class BluetoothService extends IBluetooth.Stub {
         return false;
     }
 
-    BluetoothDeviceProfileState addProfileState(String address) {
+    BluetoothDeviceProfileState addProfileState(String address, boolean setTrust) {
         BluetoothDeviceProfileState state = mDeviceProfileState.get(address);
         if (state != null) return state;
 
-        state = new BluetoothDeviceProfileState(mContext, address, this, mA2dpService);
+        state = new BluetoothDeviceProfileState(mContext, address, this, mA2dpService, setTrust);
         mDeviceProfileState.put(address, state);
         state.start();
         return state;
@@ -2311,7 +2319,7 @@ public class BluetoothService extends IBluetooth.Stub {
         }
         for (String path : bonds) {
             String address = getAddressFromObjectPath(path);
-            BluetoothDeviceProfileState state = addProfileState(address);
+            BluetoothDeviceProfileState state = addProfileState(address, false);
         }
     }
 
diff --git a/core/java/android/service/textservice/SpellCheckerService.java b/core/java/android/service/textservice/SpellCheckerService.java
new file mode 100644 (file)
index 0000000..6ac99ca
--- /dev/null
@@ -0,0 +1,140 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * 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.service.textservice;
+
+import com.android.internal.textservice.ISpellCheckerService;
+import com.android.internal.textservice.ISpellCheckerSession;
+import com.android.internal.textservice.ISpellCheckerSessionListener;
+
+import android.app.Service;
+import android.content.Intent;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.view.textservice.SuggestionsInfo;
+import android.view.textservice.TextInfo;
+
+import java.lang.ref.WeakReference;
+
+/**
+ * SpellCheckerService provides an abstract base class for a spell checker.
+ * This class combines a service to the system with the spell checker service interface that
+ * spell checker must implement.
+ */
+public abstract class SpellCheckerService extends Service {
+    private static final String TAG = SpellCheckerService.class.getSimpleName();
+    public static final String SERVICE_INTERFACE = SpellCheckerService.class.getName();
+
+    private final SpellCheckerServiceBinder mBinder = new SpellCheckerServiceBinder(this);
+
+    /**
+     * Get suggestions for specified text in TextInfo.
+     * This function will run on the incoming IPC thread. So, this is not called on the main thread,
+     * but will be called in series on another thread.
+     * @param textInfo the text metadata
+     * @param suggestionsLimit the number of limit of suggestions returned
+     * @param locale the locale for getting suggestions
+     * @return SuggestionInfo which contains suggestions for textInfo
+     */
+    public abstract SuggestionsInfo getSuggestions(
+            TextInfo textInfo, int suggestionsLimit, String locale);
+
+    /**
+     * A batch process of onGetSuggestions.
+     * This function will run on the incoming IPC thread. So, this is not called on the main thread,
+     * but will be called in series on another thread.
+     * @param textInfos an array of the text metadata
+     * @param locale the locale for getting suggestions
+     * @param suggestionsLimit the number of limit of suggestions returned
+     * @param sequentialWords true if textInfos can be treated as sequential words.
+     * @return an array of SuggestionInfo of onGetSuggestions
+     */
+    public SuggestionsInfo[] getSuggestionsMultiple(
+            TextInfo[] textInfos, String locale, int suggestionsLimit, boolean sequentialWords) {
+        final int length = textInfos.length;
+        final SuggestionsInfo[] retval = new SuggestionsInfo[length];
+        for (int i = 0; i < length; ++i) {
+            retval[i] = getSuggestions(textInfos[i], suggestionsLimit, locale);
+            retval[i].setCookieAndSequence(textInfos[i].getCookie(), textInfos[i].getSequence());
+        }
+        return retval;
+    }
+
+    /**
+     * Request to abort all tasks executed in SpellChecker.
+     * This function will run on the incoming IPC thread. So, this is not called on the main thread,
+     * but will be called in series on another thread.
+     */
+    public void cancel() {}
+
+    /**
+     * Implement to return the implementation of the internal spell checker
+     * service interface. Subclasses should not override.
+     */
+    @Override
+    public final IBinder onBind(final Intent intent) {
+        return mBinder;
+    }
+
+    private static class SpellCheckerSessionImpl extends ISpellCheckerSession.Stub {
+        private final WeakReference<SpellCheckerService> mInternalServiceRef;
+        private final String mLocale;
+        private final ISpellCheckerSessionListener mListener;
+
+        public SpellCheckerSessionImpl(
+                SpellCheckerService service, String locale, ISpellCheckerSessionListener listener) {
+            mInternalServiceRef = new WeakReference<SpellCheckerService>(service);
+            mLocale = locale;
+            mListener = listener;
+        }
+
+        @Override
+        public void getSuggestionsMultiple(
+                TextInfo[] textInfos, int suggestionsLimit, boolean sequentialWords) {
+            final SpellCheckerService service = mInternalServiceRef.get();
+            if (service == null) return;
+            try {
+                mListener.onGetSuggestions(
+                        service.getSuggestionsMultiple(textInfos, mLocale,
+                                suggestionsLimit, sequentialWords));
+            } catch (RemoteException e) {
+            }
+        }
+
+        @Override
+        public void cancel() {
+            final SpellCheckerService service = mInternalServiceRef.get();
+            if (service == null) return;
+            service.cancel();
+        }
+    }
+
+    private static class SpellCheckerServiceBinder extends ISpellCheckerService.Stub {
+        private final WeakReference<SpellCheckerService> mInternalServiceRef;
+
+        public SpellCheckerServiceBinder(SpellCheckerService service) {
+            mInternalServiceRef = new WeakReference<SpellCheckerService>(service);
+        }
+
+        @Override
+        public ISpellCheckerSession getISpellCheckerSession(
+                String locale, ISpellCheckerSessionListener listener) {
+            final SpellCheckerService service = mInternalServiceRef.get();
+            if (service == null) return null;
+            return new SpellCheckerSessionImpl(service, locale, listener);
+        }
+    }
+}
diff --git a/core/java/android/service/textservice/SpellCheckerSession.java b/core/java/android/service/textservice/SpellCheckerSession.java
new file mode 100644 (file)
index 0000000..a575220
--- /dev/null
@@ -0,0 +1,271 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.service.textservice;
+
+import com.android.internal.textservice.ISpellCheckerSession;
+import com.android.internal.textservice.ISpellCheckerSessionListener;
+import com.android.internal.textservice.ITextServicesManager;
+import com.android.internal.textservice.ITextServicesSessionListener;
+
+import android.os.Handler;
+import android.os.Message;
+import android.os.RemoteException;
+import android.util.Log;
+import android.view.textservice.SuggestionsInfo;
+import android.view.textservice.TextInfo;
+
+import java.util.LinkedList;
+import java.util.Queue;
+
+/**
+ * The SpellCheckerSession interface provides the per client functionality of SpellCheckerService.
+ */
+public class SpellCheckerSession {
+    private static final String TAG = SpellCheckerSession.class.getSimpleName();
+    private static final boolean DBG = false;
+
+    private static final int MSG_ON_GET_SUGGESTION_MULTIPLE = 1;
+
+    private final InternalListener mInternalListener;
+    private final ITextServicesManager mTextServicesManager;
+    private final SpellCheckerSessionListenerImpl mSpellCheckerSessionListenerImpl;
+
+    private boolean mIsUsed;
+    private SpellCheckerSessionListener mSpellCheckerSessionListener;
+
+    /** Handler that will execute the main tasks */
+    private final Handler mHandler = new Handler() {
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what) {
+                case MSG_ON_GET_SUGGESTION_MULTIPLE:
+                    handleOnGetSuggestionsMultiple((SuggestionsInfo[]) msg.obj);
+                    break;
+            }
+        }
+    };
+
+    /**
+     * Constructor
+     * @hide
+     */
+    public SpellCheckerSession(ITextServicesManager tsm, SpellCheckerSessionListener listener) {
+        if (listener == null || tsm == null) {
+            throw new NullPointerException();
+        }
+        mSpellCheckerSessionListenerImpl = new SpellCheckerSessionListenerImpl(mHandler);
+        mInternalListener = new InternalListener();
+        mTextServicesManager = tsm;
+        mIsUsed = true;
+        mSpellCheckerSessionListener = listener;
+    }
+
+    /**
+     * @return true if the connection to a text service of this session is disconnected and not
+     * alive.
+     */
+    public boolean isSessionDisconnected() {
+        return mSpellCheckerSessionListenerImpl.isDisconnected();
+    }
+
+    /**
+     * Finish this session and allow TextServicesManagerService to disconnect the bound spell
+     * checker.
+     */
+    public void close() {
+        mIsUsed = false;
+        try {
+            mTextServicesManager.finishSpellCheckerService(mSpellCheckerSessionListenerImpl);
+        } catch (RemoteException e) {
+            // do nothing
+        }
+    }
+
+    /**
+     * Get candidate strings for a substring of the specified text.
+     * @param textInfo text metadata for a spell checker
+     * @param suggestionsLimit the number of limit of suggestions returned
+     */
+    public void getSuggestions(TextInfo textInfo, int suggestionsLimit) {
+        getSuggestions(new TextInfo[] {textInfo}, suggestionsLimit, false);
+    }
+
+    /**
+     * A batch process of getSuggestions
+     * @param textInfos an array of text metadata for a spell checker
+     * @param suggestionsLimit the number of limit of suggestions returned
+     * @param sequentialWords true if textInfos can be treated as sequential words.
+     */
+    public void getSuggestions(
+            TextInfo[] textInfos, int suggestionsLimit, boolean sequentialWords) {
+        // TODO: Handle multiple words suggestions by using WordBreakIterator
+        mSpellCheckerSessionListenerImpl.getSuggestionsMultiple(
+                textInfos, suggestionsLimit, sequentialWords);
+    }
+
+    private void handleOnGetSuggestionsMultiple(SuggestionsInfo[] suggestionInfos) {
+        mSpellCheckerSessionListener.onGetSuggestions(suggestionInfos);
+    }
+
+    private static class SpellCheckerSessionListenerImpl extends ISpellCheckerSessionListener.Stub {
+        private static final int TASK_CANCEL = 1;
+        private static final int TASK_GET_SUGGESTIONS_MULTIPLE = 2;
+        private final Queue<SpellCheckerParams> mPendingTasks =
+                new LinkedList<SpellCheckerParams>();
+        private final Handler mHandler;
+
+        private boolean mOpened;
+        private ISpellCheckerSession mISpellCheckerSession;
+
+        public SpellCheckerSessionListenerImpl(Handler handler) {
+            mOpened = false;
+            mHandler = handler;
+        }
+
+        private static class SpellCheckerParams {
+            public final int mWhat;
+            public final TextInfo[] mTextInfos;
+            public final int mSuggestionsLimit;
+            public final boolean mSequentialWords;
+            public SpellCheckerParams(int what, TextInfo[] textInfos, int suggestionsLimit,
+                    boolean sequentialWords) {
+                mWhat = what;
+                mTextInfos = textInfos;
+                mSuggestionsLimit = suggestionsLimit;
+                mSequentialWords = sequentialWords;
+            }
+        }
+
+        private void processTask(SpellCheckerParams scp) {
+            switch (scp.mWhat) {
+                case TASK_CANCEL:
+                    processCancel();
+                    break;
+                case TASK_GET_SUGGESTIONS_MULTIPLE:
+                    processGetSuggestionsMultiple(scp);
+                    break;
+            }
+        }
+
+        public synchronized void onServiceConnected(ISpellCheckerSession session) {
+            mISpellCheckerSession = session;
+            mOpened = true;
+            if (DBG)
+                Log.d(TAG, "onServiceConnected - Success");
+            while (!mPendingTasks.isEmpty()) {
+                processTask(mPendingTasks.poll());
+            }
+        }
+
+        public void getSuggestionsMultiple(
+                TextInfo[] textInfos, int suggestionsLimit, boolean sequentialWords) {
+            processOrEnqueueTask(
+                    new SpellCheckerParams(TASK_GET_SUGGESTIONS_MULTIPLE, textInfos,
+                            suggestionsLimit, sequentialWords));
+        }
+
+        public boolean isDisconnected() {
+            return mOpened && mISpellCheckerSession == null;
+        }
+
+        public boolean checkOpenConnection() {
+            if (mISpellCheckerSession != null) {
+                return true;
+            }
+            Log.e(TAG, "not connected to the spellchecker service.");
+            return false;
+        }
+
+        private void processOrEnqueueTask(SpellCheckerParams scp) {
+            if (mISpellCheckerSession == null) {
+                mPendingTasks.offer(scp);
+            } else {
+                processTask(scp);
+            }
+        }
+
+        private void processCancel() {
+            if (!checkOpenConnection()) {
+                return;
+            }
+            try {
+                mISpellCheckerSession.cancel();
+            } catch (RemoteException e) {
+                Log.e(TAG, "Failed to cancel " + e);
+            }
+        }
+
+        private void processGetSuggestionsMultiple(SpellCheckerParams scp) {
+            if (!checkOpenConnection()) {
+                return;
+            }
+            try {
+                mISpellCheckerSession.getSuggestionsMultiple(
+                        scp.mTextInfos, scp.mSuggestionsLimit, scp.mSequentialWords);
+            } catch (RemoteException e) {
+                Log.e(TAG, "Failed to get suggestions " + e);
+            }
+        }
+
+        @Override
+        public void onGetSuggestions(SuggestionsInfo[] results) {
+            mHandler.sendMessage(Message.obtain(mHandler, MSG_ON_GET_SUGGESTION_MULTIPLE, results));
+        }
+    }
+
+    /**
+     * Callback for getting results from text services
+     */
+    public interface SpellCheckerSessionListener {
+        /**
+         * Callback for "getSuggestions"
+         * @param results an array of results of getSuggestions
+         */
+        public void onGetSuggestions(SuggestionsInfo[] results);
+    }
+
+    private class InternalListener extends ITextServicesSessionListener.Stub {
+        @Override
+        public void onServiceConnected(ISpellCheckerSession session) {
+            mSpellCheckerSessionListenerImpl.onServiceConnected(session);
+        }
+    }
+
+    @Override
+    protected void finalize() throws Throwable {
+        super.finalize();
+        if (mIsUsed) {
+            Log.e(TAG, "SpellCheckerSession was not finished properly." +
+                    "You should call finishShession() when you finished to use a spell checker.");
+            close();
+        }
+    }
+
+    /**
+     * @hide
+     */
+    public ITextServicesSessionListener getTextServicesSessionListener() {
+        return mInternalListener;
+    }
+
+    /**
+     * @hide
+     */
+    public ISpellCheckerSessionListener getSpellCheckerSessionListener() {
+        return mSpellCheckerSessionListenerImpl;
+    }
+}
index 96864c4..89b6f32 100644 (file)
@@ -356,9 +356,7 @@ class AudioPlaybackHandler {
         mLastSynthesisRequest = param;
 
         // Create the audio track.
-        final AudioTrack audioTrack = createStreamingAudioTrack(
-                param.mStreamType, param.mSampleRateInHz, param.mAudioFormat,
-                param.mChannelCount, param.mVolume, param.mPan);
+        final AudioTrack audioTrack = createStreamingAudioTrack(param);
 
         if (DBG) Log.d(TAG, "Created audio track [" + audioTrack.hashCode() + "]");
 
@@ -405,37 +403,50 @@ class AudioPlaybackHandler {
         param.mLogger.onPlaybackStart();
     }
 
+    // Wait for the audio track to stop playing, and then release its resources.
     private void handleSynthesisDone(MessageParams msg) {
         final SynthesisMessageParams params = (SynthesisMessageParams) msg;
-        handleSynthesisDone(params);
-        // This call is delayed more than it should be, but we are
-        // certain at this point that we have all the data we want.
-        params.mLogger.onWriteData();
-    }
 
-    // Wait for the audio track to stop playing, and then release it's resources.
-    private void handleSynthesisDone(SynthesisMessageParams params) {
         if (DBG) Log.d(TAG, "handleSynthesisDone()");
         final AudioTrack audioTrack = params.getAudioTrack();
 
-        try {
-            if (audioTrack != null) {
-                if (DBG) Log.d(TAG, "Waiting for audio track to complete : " +
-                        audioTrack.hashCode());
-                blockUntilDone(params);
-                if (DBG) Log.d(TAG, "Releasing audio track [" + audioTrack.hashCode() + "]");
-                // The last call to AudioTrack.write( ) will return only after
-                // all data from the audioTrack has been sent to the mixer, so
-                // it's safe to release at this point.
-                audioTrack.release();
-            }
-        } finally {
+        if (audioTrack == null) {
+            return;
+        }
+
+        if (params.mBytesWritten < params.mAudioBufferSize) {
+            audioTrack.stop();
+        }
+
+        if (DBG) Log.d(TAG, "Waiting for audio track to complete : " +
+                audioTrack.hashCode());
+        blockUntilDone(params);
+        if (DBG) Log.d(TAG, "Releasing audio track [" + audioTrack.hashCode() + "]");
+
+        // The last call to AudioTrack.write( ) will return only after
+        // all data from the audioTrack has been sent to the mixer, so
+        // it's safe to release at this point. Make sure release() and the call
+        // that set the audio track to null are performed atomically.
+        synchronized (this) {
+            // Never allow the audioTrack to be observed in a state where
+            // it is released but non null. The only case this might happen
+            // is in the various stopFoo methods that call AudioTrack#stop from
+            // different threads, but they are synchronized on AudioPlayBackHandler#this
+            // too.
+            audioTrack.release();
             params.setAudioTrack(null);
-            params.getDispatcher().dispatchUtteranceCompleted();
-            mLastSynthesisRequest = null;
         }
+        params.getDispatcher().dispatchUtteranceCompleted();
+        mLastSynthesisRequest = null;
+        params.mLogger.onWriteData();
     }
 
+    /**
+     * The minimum increment of time to wait for an audiotrack to finish
+     * playing.
+     */
+    private static final long MIN_SLEEP_TIME_MS = 20;
+
     private static void blockUntilDone(SynthesisMessageParams params) {
         if (params.mAudioTrack == null || params.mBytesWritten <= 0) {
             return;
@@ -452,36 +463,41 @@ class AudioPlaybackHandler {
                 break;
             }
 
-            long estimatedTimeMs = ((lengthInFrames - currentPosition) * 1000) /
+            final long estimatedTimeMs = ((lengthInFrames - currentPosition) * 1000) /
                     audioTrack.getSampleRate();
 
-            if (DBG) Log.d(TAG, "About to sleep for : " + estimatedTimeMs + " ms," +
-                    " Playback position : " + currentPosition);
+            final long sleepTimeMs = Math.max(estimatedTimeMs, MIN_SLEEP_TIME_MS);
+
+            if (DBG) Log.d(TAG, "About to sleep for : " + sleepTimeMs + " ms," +
+                    " Playback position : " + currentPosition + ", Length in frames : "
+                    + lengthInFrames);
             try {
-                Thread.sleep(estimatedTimeMs);
+                Thread.sleep(sleepTimeMs);
             } catch (InterruptedException ie) {
                 break;
             }
         }
     }
 
-    private static AudioTrack createStreamingAudioTrack(int streamType, int sampleRateInHz,
-            int audioFormat, int channelCount, float volume, float pan) {
-        int channelConfig = getChannelConfig(channelCount);
+    private static AudioTrack createStreamingAudioTrack(SynthesisMessageParams params) {
+        final int channelConfig = getChannelConfig(params.mChannelCount);
+        final int sampleRateInHz = params.mSampleRateInHz;
+        final int audioFormat = params.mAudioFormat;
 
         int minBufferSizeInBytes
                 = AudioTrack.getMinBufferSize(sampleRateInHz, channelConfig, audioFormat);
         int bufferSizeInBytes = Math.max(MIN_AUDIO_BUFFER_SIZE, minBufferSizeInBytes);
 
-        AudioTrack audioTrack = new AudioTrack(streamType, sampleRateInHz, channelConfig,
+        AudioTrack audioTrack = new AudioTrack(params.mStreamType, sampleRateInHz, channelConfig,
                 audioFormat, bufferSizeInBytes, AudioTrack.MODE_STREAM);
         if (audioTrack.getState() != AudioTrack.STATE_INITIALIZED) {
             Log.w(TAG, "Unable to create audio track.");
             audioTrack.release();
             return null;
         }
+        params.mAudioBufferSize = bufferSizeInBytes;
 
-        setupVolume(audioTrack, volume, pan);
+        setupVolume(audioTrack, params.mVolume, params.mPan);
         return audioTrack;
     }
 
index ffe70e2..7da5daa 100644 (file)
@@ -35,6 +35,7 @@ final class SynthesisMessageParams extends MessageParams {
     volatile AudioTrack mAudioTrack;
     // Not volatile, accessed only from the synthesis thread.
     int mBytesWritten;
+    int mAudioBufferSize;
 
     private final LinkedList<ListEntry> mDataBufferList = new LinkedList<ListEntry>();
 
@@ -55,6 +56,7 @@ final class SynthesisMessageParams extends MessageParams {
         // initially null.
         mAudioTrack = null;
         mBytesWritten = 0;
+        mAudioBufferSize = 0;
     }
 
     @Override
index 09ce8e4..f139372 100644 (file)
@@ -738,6 +738,14 @@ public final class JsonReader implements Closeable {
         int total;
         while ((total = in.read(buffer, limit, buffer.length - limit)) != -1) {
             limit += total;
+
+            // if this is the first read, consume an optional byte order mark (BOM) if it exists
+            if (bufferStartLine == 1 && bufferStartColumn == 1
+                    && limit > 0 && buffer[0] == '\ufeff') {
+                pos++;
+                bufferStartColumn--;
+            }
+
             if (limit >= minimum) {
                 return true;
             }
index 3bcd266..152827d 100644 (file)
@@ -25,9 +25,9 @@ import java.util.regex.Pattern;
 public class Patterns {
     /**
      *  Regular expression to match all IANA top-level domains.
-     *  List accurate as of 2010/05/06.  List taken from:
+     *  List accurate as of 2011/07/18.  List taken from:
      *  http://data.iana.org/TLD/tlds-alpha-by-domain.txt
-     *  This pattern is auto-generated by frameworks/base/common/tools/make-iana-tld-pattern.py
+     *  This pattern is auto-generated by frameworks/ex/common/tools/make-iana-tld-pattern.py
      */
     public static final String TOP_LEVEL_DOMAIN_STR =
         "((aero|arpa|asia|a[cdefgilmnoqrstuwxz])"
@@ -53,7 +53,7 @@ public class Patterns {
         + "|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\\-\\-mgbaam7a8h|xn\\-\\-mgberp4a5d4ar|xn\\-\\-wgbh1c|xn\\-\\-zckzah)"
+        + "|(\u03b4\u03bf\u03ba\u03b9\u03bc\u03ae|\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435|\u0440\u0444|\u0441\u0440\u0431|\u05d8\u05e2\u05e1\u05d8|\u0622\u0632\u0645\u0627\u06cc\u0634\u06cc|\u0625\u062e\u062a\u0628\u0627\u0631|\u0627\u0644\u0627\u0631\u062f\u0646|\u0627\u0644\u062c\u0632\u0627\u0626\u0631|\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629|\u0627\u0644\u0645\u063a\u0631\u0628|\u0627\u0645\u0627\u0631\u0627\u062a|\u0628\u06be\u0627\u0631\u062a|\u062a\u0648\u0646\u0633|\u0633\u0648\u0631\u064a\u0629|\u0641\u0644\u0633\u0637\u064a\u0646|\u0642\u0637\u0631|\u0645\u0635\u0631|\u092a\u0930\u0940\u0915\u094d\u0937\u093e|\u092d\u093e\u0930\u0924|\u09ad\u09be\u09b0\u09a4|\u0a2d\u0a3e\u0a30\u0a24|\u0aad\u0abe\u0ab0\u0aa4|\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe|\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8|\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd|\u0baa\u0bb0\u0bbf\u0b9f\u0bcd\u0b9a\u0bc8|\u0c2d\u0c3e\u0c30\u0c24\u0c4d|\u0dbd\u0d82\u0d9a\u0dcf|\u0e44\u0e17\u0e22|\u30c6\u30b9\u30c8|\u4e2d\u56fd|\u4e2d\u570b|\u53f0\u6e7e|\u53f0\u7063|\u65b0\u52a0\u5761|\u6d4b\u8bd5|\u6e2c\u8a66|\u9999\u6e2f|\ud14c\uc2a4\ud2b8|\ud55c\uad6d|xn\\-\\-0zwm56d|xn\\-\\-11b5bs3a9aj6g|xn\\-\\-3e0b707e|xn\\-\\-45brj9c|xn\\-\\-80akhbyknj4f|xn\\-\\-90a3ac|xn\\-\\-9t4b11yi5a|xn\\-\\-clchc0ea0b2g2a9gcd|xn\\-\\-deba0ad|xn\\-\\-fiqs8s|xn\\-\\-fiqz9s|xn\\-\\-fpcrj9c3d|xn\\-\\-fzc2c9e2c|xn\\-\\-g6w251d|xn\\-\\-gecrj9c|xn\\-\\-h2brj9c|xn\\-\\-hgbk6aj7f53bba|xn\\-\\-hlcj6aya9esc7a|xn\\-\\-j6w193g|xn\\-\\-jxalpdlp|xn\\-\\-kgbechtv|xn\\-\\-kprw13d|xn\\-\\-kpry57d|xn\\-\\-lgbbat1ad8j|xn\\-\\-mgbaam7a8h|xn\\-\\-mgbayh7gpa|xn\\-\\-mgbbh1a71e|xn\\-\\-mgbc0a9azcg|xn\\-\\-mgberp4a5d4ar|xn\\-\\-o3cw4h|xn\\-\\-ogbpf8fl|xn\\-\\-p1ai|xn\\-\\-pgbs0dh|xn\\-\\-s9brj9c|xn\\-\\-wgbh1c|xn\\-\\-wgbl6a|xn\\-\\-xkc2al3hye2a|xn\\-\\-xkc2dl3a5ee0h|xn\\-\\-yfro4i67o|xn\\-\\-ygbi2ammx|xn\\-\\-zckzah|xxx)"
         + "|y[et]"
         + "|z[amw])";
 
@@ -65,9 +65,9 @@ public class Patterns {
 
     /**
      *  Regular expression to match all IANA top-level domains for WEB_URL.
-     *  List accurate as of 2010/05/06.  List taken from:
+     *  List accurate as of 2011/07/18.  List taken from:
      *  http://data.iana.org/TLD/tlds-alpha-by-domain.txt
-     *  This pattern is auto-generated by frameworks/base/common/tools/make-iana-tld-pattern.py
+     *  This pattern is auto-generated by frameworks/ex/common/tools/make-iana-tld-pattern.py
      */
     public static final String TOP_LEVEL_DOMAIN_STR_FOR_WEB_URL =
         "(?:"
@@ -94,7 +94,7 @@ public class Patterns {
         + "|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\\-\\-mgbaam7a8h|xn\\-\\-mgberp4a5d4ar|xn\\-\\-wgbh1c|xn\\-\\-zckzah)"
+        + "|(?:\u03b4\u03bf\u03ba\u03b9\u03bc\u03ae|\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435|\u0440\u0444|\u0441\u0440\u0431|\u05d8\u05e2\u05e1\u05d8|\u0622\u0632\u0645\u0627\u06cc\u0634\u06cc|\u0625\u062e\u062a\u0628\u0627\u0631|\u0627\u0644\u0627\u0631\u062f\u0646|\u0627\u0644\u062c\u0632\u0627\u0626\u0631|\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629|\u0627\u0644\u0645\u063a\u0631\u0628|\u0627\u0645\u0627\u0631\u0627\u062a|\u0628\u06be\u0627\u0631\u062a|\u062a\u0648\u0646\u0633|\u0633\u0648\u0631\u064a\u0629|\u0641\u0644\u0633\u0637\u064a\u0646|\u0642\u0637\u0631|\u0645\u0635\u0631|\u092a\u0930\u0940\u0915\u094d\u0937\u093e|\u092d\u093e\u0930\u0924|\u09ad\u09be\u09b0\u09a4|\u0a2d\u0a3e\u0a30\u0a24|\u0aad\u0abe\u0ab0\u0aa4|\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe|\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8|\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd|\u0baa\u0bb0\u0bbf\u0b9f\u0bcd\u0b9a\u0bc8|\u0c2d\u0c3e\u0c30\u0c24\u0c4d|\u0dbd\u0d82\u0d9a\u0dcf|\u0e44\u0e17\u0e22|\u30c6\u30b9\u30c8|\u4e2d\u56fd|\u4e2d\u570b|\u53f0\u6e7e|\u53f0\u7063|\u65b0\u52a0\u5761|\u6d4b\u8bd5|\u6e2c\u8a66|\u9999\u6e2f|\ud14c\uc2a4\ud2b8|\ud55c\uad6d|xn\\-\\-0zwm56d|xn\\-\\-11b5bs3a9aj6g|xn\\-\\-3e0b707e|xn\\-\\-45brj9c|xn\\-\\-80akhbyknj4f|xn\\-\\-90a3ac|xn\\-\\-9t4b11yi5a|xn\\-\\-clchc0ea0b2g2a9gcd|xn\\-\\-deba0ad|xn\\-\\-fiqs8s|xn\\-\\-fiqz9s|xn\\-\\-fpcrj9c3d|xn\\-\\-fzc2c9e2c|xn\\-\\-g6w251d|xn\\-\\-gecrj9c|xn\\-\\-h2brj9c|xn\\-\\-hgbk6aj7f53bba|xn\\-\\-hlcj6aya9esc7a|xn\\-\\-j6w193g|xn\\-\\-jxalpdlp|xn\\-\\-kgbechtv|xn\\-\\-kprw13d|xn\\-\\-kpry57d|xn\\-\\-lgbbat1ad8j|xn\\-\\-mgbaam7a8h|xn\\-\\-mgbayh7gpa|xn\\-\\-mgbbh1a71e|xn\\-\\-mgbc0a9azcg|xn\\-\\-mgberp4a5d4ar|xn\\-\\-o3cw4h|xn\\-\\-ogbpf8fl|xn\\-\\-p1ai|xn\\-\\-pgbs0dh|xn\\-\\-s9brj9c|xn\\-\\-wgbh1c|xn\\-\\-wgbl6a|xn\\-\\-xkc2al3hye2a|xn\\-\\-xkc2dl3a5ee0h|xn\\-\\-yfro4i67o|xn\\-\\-ygbi2ammx|xn\\-\\-zckzah|xxx)"
         + "|y[et]"
         + "|z[amw]))";
 
diff --git a/core/java/android/view/CollapsibleActionView.java b/core/java/android/view/CollapsibleActionView.java
new file mode 100644 (file)
index 0000000..ab2365e
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.view.MenuItem.OnActionExpandListener;
+
+/**
+ * When a {@link View} implements this interface it will receive callbacks
+ * when expanded or collapsed as an action view alongside the optional,
+ * app-specified callbacks to {@link OnActionExpandListener}.
+ *
+ * <p>See {@link MenuItem} for more information about action views.
+ * See {@link android.app.ActionBar} for more information about the action bar.
+ */
+public interface CollapsibleActionView {
+    /**
+     * Called when this view is expanded as an action view.
+     * See {@link MenuItem#expandActionView()}.
+     */
+    public void onActionViewExpanded();
+
+    /**
+     * Called when this view is collapsed as an action view.
+     * See {@link MenuItem#collapseActionView()}.
+     */
+    public void onActionViewCollapsed();
+}
index 2be5a49..5ab2024 100644 (file)
@@ -118,6 +118,7 @@ public class Display {
             } else {
                 // This is just for boot-strapping, initializing the
                 // system process before the window manager is up.
+                outSize.x = getRealWidth();
                 outSize.y = getRealHeight();
             }
             if (DEBUG_COMPAT && doCompat) Slog.v(TAG, "Returning display size: " + outSize);
index 4484d59..f4c0249 100644 (file)
@@ -41,15 +41,6 @@ public abstract class DisplayList {
     abstract void end();
 
     /**
-     * Indicates whether this display list can be replayed or not.
-     * 
-     * @return True if the display list can be replayed, false otherwise.
-     * 
-     * @see android.view.HardwareCanvas#drawDisplayList(DisplayList) 
-     */
-    abstract boolean isReady();
-
-    /**
      * Invalidates the display list, indicating that it should be repopulated
      * with new drawing commands prior to being used again. Calling this method
      * causes calls to {@link #isValid()} to return <code>false</code>.
index 80244bb..d22fa6e 100644 (file)
@@ -51,6 +51,7 @@ class GLES20Canvas extends HardwareCanvas {
 
     // The native renderer will be destroyed when this object dies.
     // DO NOT overwrite this reference once it is set.
+    @SuppressWarnings("unused")
     private CanvasFinalizer mFinalizer;
 
     private int mWidth;
@@ -97,12 +98,8 @@ class GLES20Canvas extends HardwareCanvas {
     protected GLES20Canvas(boolean record, boolean translucent) {
         mOpaque = !translucent;
 
-        setupRenderer(record);
-    }
-
-    protected void setupRenderer(boolean record) {
         if (record) {
-            mRenderer = nGetDisplayListRenderer(mRenderer);
+            mRenderer = nCreateDisplayListRenderer();
         } else {
             mRenderer = nCreateRenderer();
         }
@@ -114,43 +111,31 @@ class GLES20Canvas extends HardwareCanvas {
         if (mRenderer == 0) {
             throw new IllegalStateException("Could not create GLES20Canvas renderer");
         } else {
-            mFinalizer = CanvasFinalizer.getFinalizer(mFinalizer, mRenderer);
+            mFinalizer = new CanvasFinalizer(mRenderer);
         }
     }
 
+    protected void resetDisplayListRenderer() {
+        nResetDisplayListRenderer(mRenderer);
+    }
+
     private static native int nCreateRenderer();
     private static native int nCreateLayerRenderer(int layer);
-    private static native int nGetDisplayListRenderer(int renderer);
+    private static native int nCreateDisplayListRenderer();
+    private static native void nResetDisplayListRenderer(int renderer);
     private static native void nDestroyRenderer(int renderer);
 
-    private static class CanvasFinalizer {
-        int mRenderer;
-
-        // Factory method returns new instance if old one is null, or old instance
-        // otherwise, destroying native renderer along the way as necessary
-        static CanvasFinalizer getFinalizer(CanvasFinalizer oldFinalizer, int renderer) {
-            if (oldFinalizer == null) {
-                return new CanvasFinalizer(renderer);
-            }
-            oldFinalizer.replaceNativeObject(renderer);
-            return oldFinalizer;
-        }
+    private static final class CanvasFinalizer {
+        private final int mRenderer;
 
-        private CanvasFinalizer(int renderer) {
+        public CanvasFinalizer(int renderer) {
             mRenderer = renderer;
         }
 
-        private void replaceNativeObject(int newRenderer) {
-            if (mRenderer != 0 && newRenderer != mRenderer) {
-                nDestroyRenderer(mRenderer);
-            }
-            mRenderer = newRenderer;
-        }
-
         @Override
         protected void finalize() throws Throwable {
             try {
-                replaceNativeObject(0);
+                nDestroyRenderer(mRenderer);
             } finally {
                 super.finalize();
             }
@@ -322,11 +307,11 @@ class GLES20Canvas extends HardwareCanvas {
     // Display list
     ///////////////////////////////////////////////////////////////////////////
 
-    int getDisplayList() {
-        return nGetDisplayList(mRenderer);
+    int getDisplayList(int displayList) {
+        return nGetDisplayList(mRenderer, displayList);
     }
 
-    private static native int nGetDisplayList(int renderer);
+    private static native int nGetDisplayList(int renderer, int displayList);
     
     static void destroyDisplayList(int displayList) {
         nDestroyDisplayList(displayList);
@@ -337,7 +322,7 @@ class GLES20Canvas extends HardwareCanvas {
     @Override
     public boolean drawDisplayList(DisplayList displayList, int width, int height, Rect dirty) {
         return nDrawDisplayList(mRenderer,
-                ((GLES20DisplayList) displayList).mNativeDisplayList, width, height, dirty);
+                ((GLES20DisplayList) displayList).getNativeDisplayList(), width, height, dirty);
     }
 
     private static native boolean nDrawDisplayList(int renderer, int displayList,
@@ -345,7 +330,7 @@ class GLES20Canvas extends HardwareCanvas {
 
     @Override
     void outputDisplayList(DisplayList displayList) {
-        nOutputDisplayList(mRenderer, ((GLES20DisplayList) displayList).mNativeDisplayList);
+        nOutputDisplayList(mRenderer, ((GLES20DisplayList) displayList).getNativeDisplayList());
     }
 
     private static native void nOutputDisplayList(int renderer, int displayList);
index aeff31f..9e649ce 100644 (file)
 
 package android.view;
 
-import java.lang.ref.WeakReference;
+import android.graphics.Bitmap;
+
+import java.util.ArrayList;
 
 /**
  * An implementation of display list for OpenGL ES 2.0.
  */
 class GLES20DisplayList extends DisplayList {
-    private GLES20Canvas mCanvas;
-
-    private boolean mStarted = false;
-    private boolean mRecorded = false;
-    private boolean mValid = false;
+    // These lists ensure that any Bitmaps recorded by a DisplayList are kept alive as long
+    // as the DisplayList is alive.  The Bitmaps are populated by the GLES20RecordingCanvas.
+    final ArrayList<Bitmap> mBitmaps = new ArrayList<Bitmap>(5);
 
-    int mNativeDisplayList;
-    WeakReference<View> hostView;
+    private GLES20RecordingCanvas mCanvas;
+    private boolean mValid;
 
     // The native display list will be destroyed when this object dies.
     // DO NOT overwrite this reference once it is set.
-    @SuppressWarnings("unused")
     private DisplayListFinalizer mFinalizer;
 
-    public GLES20DisplayList(View view) {
-        hostView = new WeakReference<View>(view);
+    int getNativeDisplayList() {
+        if (!mValid || mFinalizer == null) {
+            throw new IllegalStateException("The display list is not valid.");
+        }
+        return mFinalizer.mNativeDisplayList;
     }
 
     @Override
     HardwareCanvas start() {
-        if (mStarted) {
-            throw new IllegalStateException("Recording has already started");
-        }
-
         if (mCanvas != null) {
-            ((GLES20RecordingCanvas) mCanvas).reset();
-        } else {
-            mCanvas = new GLES20RecordingCanvas(true);
+            throw new IllegalStateException("Recording has already started");
         }
-        mStarted = true;
-        mRecorded = false;
-        mValid = true;
 
+        mValid = false;
+        mCanvas = GLES20RecordingCanvas.obtain(this);
+        mCanvas.start();
         return mCanvas;
     }
 
     @Override
     void invalidate() {
-        mStarted = false;
-        mRecorded = false;
+        if (mCanvas != null) {
+            mCanvas.recycle();
+            mCanvas = null;
+        }
         mValid = false;
     }
 
@@ -73,48 +71,28 @@ class GLES20DisplayList extends DisplayList {
     @Override
     void end() {
         if (mCanvas != null) {
-            mStarted = false;
-            mRecorded = true;
-
-            mNativeDisplayList = mCanvas.getDisplayList();
-            mFinalizer = DisplayListFinalizer.getFinalizer(mFinalizer, mNativeDisplayList);
+            if (mFinalizer != null) {
+                mCanvas.end(mFinalizer.mNativeDisplayList);
+            } else {
+                mFinalizer = new DisplayListFinalizer(mCanvas.end(0));
+            }
+            mCanvas.recycle();
+            mCanvas = null;
+            mValid = true;
         }
     }
 
-    @Override
-    boolean isReady() {
-        return !mStarted && mRecorded;
-    }
-
     private static class DisplayListFinalizer {
-        int mNativeDisplayList;
-
-        // Factory method returns new instance if old one is null, or old instance
-        // otherwise, destroying native display list along the way as necessary
-        static DisplayListFinalizer getFinalizer(DisplayListFinalizer oldFinalizer,
-                int nativeDisplayList) {
-            if (oldFinalizer == null) {
-                return new DisplayListFinalizer(nativeDisplayList);
-            }
-            oldFinalizer.replaceNativeObject(nativeDisplayList);
-            return oldFinalizer;
-        }
+        final int mNativeDisplayList;
 
-        private DisplayListFinalizer(int nativeDisplayList) {
+        public DisplayListFinalizer(int nativeDisplayList) {
             mNativeDisplayList = nativeDisplayList;
         }
 
-        private void replaceNativeObject(int newNativeDisplayList) {
-            if (mNativeDisplayList != 0 && mNativeDisplayList != newNativeDisplayList) {
-                GLES20Canvas.destroyDisplayList(mNativeDisplayList);
-            }
-            mNativeDisplayList = newNativeDisplayList;
-        }
-
         @Override
         protected void finalize() throws Throwable {
             try {
-                replaceNativeObject(0);
+                GLES20Canvas.destroyDisplayList(mNativeDisplayList);
             } finally {
                 super.finalize();
             }
index ec94fe7..078222b 100644 (file)
@@ -24,8 +24,10 @@ import android.graphics.Path;
 import android.graphics.Rect;
 import android.graphics.RectF;
 import android.graphics.Shader;
-
-import java.util.ArrayList;
+import android.util.Pool;
+import android.util.Poolable;
+import android.util.PoolableManager;
+import android.util.Pools;
 
 /**
  * An implementation of a GL canvas that records drawing operations.
@@ -33,62 +35,94 @@ import java.util.ArrayList;
  * Bitmap objects that it draws, preventing the backing memory of Bitmaps from being freed while
  * the DisplayList is still holding a native reference to the memory.
  */
-class GLES20RecordingCanvas extends GLES20Canvas {
-    // These lists ensure that any Bitmaps recorded by a DisplayList are kept alive as long
-    // as the DisplayList is alive.
-    @SuppressWarnings({"MismatchedQueryAndUpdateOfCollection"})
-    private final ArrayList<Bitmap> mBitmaps = new ArrayList<Bitmap>(5);
+class GLES20RecordingCanvas extends GLES20Canvas implements Poolable<GLES20RecordingCanvas> {
+    // The recording canvas pool should be large enough to handle a deeply nested
+    // view hierarchy because display lists are generated recursively.
+    private static final int POOL_LIMIT = 50;
+
+    private static final Pool<GLES20RecordingCanvas> sPool = Pools.synchronizedPool(
+            Pools.finitePool(new PoolableManager<GLES20RecordingCanvas>() {
+                public GLES20RecordingCanvas newInstance() {
+                    return new GLES20RecordingCanvas();
+                }
+                @Override
+                public void onAcquired(GLES20RecordingCanvas element) {
+                }
+                @Override
+                public void onReleased(GLES20RecordingCanvas element) {
+                }
+            }, POOL_LIMIT));
+
+    private GLES20RecordingCanvas mNextPoolable;
+    private boolean mIsPooled;
+
+    private GLES20DisplayList mDisplayList;
 
-    GLES20RecordingCanvas(boolean translucent) {
-        super(true, translucent);
+    private GLES20RecordingCanvas() {
+        super(true /*record*/, true /*translucent*/);
+    }
+
+    static GLES20RecordingCanvas obtain(GLES20DisplayList displayList) {
+        GLES20RecordingCanvas canvas = sPool.acquire();
+        canvas.mDisplayList = displayList;
+        return canvas;
+    }
+
+    void recycle() {
+        mDisplayList = null;
+        resetDisplayListRenderer();
+        sPool.release(this);
+    }
+
+    void start() {
+        mDisplayList.mBitmaps.clear();
+    }
+
+    int end(int nativeDisplayList) {
+        return getDisplayList(nativeDisplayList);
     }
 
     private void recordShaderBitmap(Paint paint) {
         if (paint != null) {
             final Shader shader = paint.getShader();
             if (shader instanceof BitmapShader) {
-                mBitmaps.add(((BitmapShader) shader).mBitmap);
+                mDisplayList.mBitmaps.add(((BitmapShader) shader).mBitmap);
             }
         }
     }
 
-    void reset() {
-        mBitmaps.clear();
-        setupRenderer(true);
-    }
-
     @Override
     public void drawPatch(Bitmap bitmap, byte[] chunks, RectF dst, Paint paint) {
         super.drawPatch(bitmap, chunks, dst, paint);
-        mBitmaps.add(bitmap);
+        mDisplayList.mBitmaps.add(bitmap);
         // Shaders in the Paint are ignored when drawing a Bitmap
     }
 
     @Override
     public void drawBitmap(Bitmap bitmap, float left, float top, Paint paint) {
         super.drawBitmap(bitmap, left, top, paint);
-        mBitmaps.add(bitmap);
+        mDisplayList.mBitmaps.add(bitmap);
         // Shaders in the Paint are ignored when drawing a Bitmap
     }
 
     @Override
     public void drawBitmap(Bitmap bitmap, Matrix matrix, Paint paint) {
         super.drawBitmap(bitmap, matrix, paint);
-        mBitmaps.add(bitmap);
+        mDisplayList.mBitmaps.add(bitmap);
         // Shaders in the Paint are ignored when drawing a Bitmap
     }
 
     @Override
     public void drawBitmap(Bitmap bitmap, Rect src, Rect dst, Paint paint) {
         super.drawBitmap(bitmap, src, dst, paint);
-        mBitmaps.add(bitmap);
+        mDisplayList.mBitmaps.add(bitmap);
         // Shaders in the Paint are ignored when drawing a Bitmap
     }
 
     @Override
     public void drawBitmap(Bitmap bitmap, Rect src, RectF dst, Paint paint) {
         super.drawBitmap(bitmap, src, dst, paint);
-        mBitmaps.add(bitmap);
+        mDisplayList.mBitmaps.add(bitmap);
         // Shaders in the Paint are ignored when drawing a Bitmap
     }
 
@@ -111,7 +145,7 @@ class GLES20RecordingCanvas extends GLES20Canvas {
             int vertOffset, int[] colors, int colorOffset, Paint paint) {
         super.drawBitmapMesh(bitmap, meshWidth, meshHeight, verts, vertOffset, colors, colorOffset,
                 paint);
-        mBitmaps.add(bitmap);
+        mDisplayList.mBitmaps.add(bitmap);
         // Shaders in the Paint are ignored when drawing a Bitmap
     }
 
@@ -270,4 +304,24 @@ class GLES20RecordingCanvas extends GLES20Canvas {
                 colorOffset, indices, indexOffset, indexCount, paint);
         recordShaderBitmap(paint);
     }
+
+    @Override
+    public GLES20RecordingCanvas getNextPoolable() {
+        return mNextPoolable;
+    }
+
+    @Override
+    public void setNextPoolable(GLES20RecordingCanvas element) {
+        mNextPoolable = element;
+    }
+
+    @Override
+    public boolean isPooled() {
+        return mIsPooled;
+    }
+
+    @Override
+    public void setPooled(boolean isPooled) {
+        mIsPooled = isPooled;
+    }
 }
index 9a2564f..503b54b 100644 (file)
@@ -189,7 +189,7 @@ public abstract class HardwareRenderer {
      * 
      * @return A new display list.
      */
-    abstract DisplayList createDisplayList(View v);
+    abstract DisplayList createDisplayList();
 
     /**
      * Creates a new hardware layer. A hardware layer built by calling this
@@ -325,12 +325,15 @@ public abstract class HardwareRenderer {
         private static final int SURFACE_STATE_SUCCESS = 1;
         private static final int SURFACE_STATE_UPDATED = 2;
         
-        static EGLContext sEglContext;
         static EGL10 sEgl;
         static EGLDisplay sEglDisplay;
         static EGLConfig sEglConfig;
+        static final Object[] sEglLock = new Object[0];
 
-        private static Thread sEglThread;
+        static final ThreadLocal<EGLContext> sEglContextStorage = new ThreadLocal<EGLContext>();
+
+        EGLContext mEglContext;
+        Thread mEglThread;
 
         EGLSurface mEglSurface;
         
@@ -355,7 +358,7 @@ public abstract class HardwareRenderer {
         final boolean mTranslucent;
 
         private boolean mDestroyed;
-        
+
         private final Rect mRedrawClip = new Rect();
 
         GlRenderer(int glVersion, boolean translucent) {
@@ -487,45 +490,48 @@ public abstract class HardwareRenderer {
         abstract GLES20Canvas createCanvas();
 
         void initializeEgl() {
-            if (sEglContext != null) return;
-
-            sEglThread = Thread.currentThread();
-            sEgl = (EGL10) EGLContext.getEGL();
-            
-            // Get to the default display.
-            sEglDisplay = sEgl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
-            
-            if (sEglDisplay == EGL10.EGL_NO_DISPLAY) {
-                throw new RuntimeException("eglGetDisplay failed "
-                        + getEGLErrorString(sEgl.eglGetError()));
-            }
-            
-            // We can now initialize EGL for that display
-            int[] version = new int[2];
-            if (!sEgl.eglInitialize(sEglDisplay, version)) {
-                throw new RuntimeException("eglInitialize failed " +
-                        getEGLErrorString(sEgl.eglGetError()));
-            }
-
-            sEglConfig = chooseEglConfig();
-            if (sEglConfig == null) {
-                // We tried to use EGL_SWAP_BEHAVIOR_PRESERVED_BIT, try again without
-                if (sDirtyRegions) {
-                    sDirtyRegions = false;
+            synchronized (sEglLock) {
+                if (sEgl == null && sEglConfig == null) {
+                    sEgl = (EGL10) EGLContext.getEGL();
+                    
+                    // Get to the default display.
+                    sEglDisplay = sEgl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
+                    
+                    if (sEglDisplay == EGL10.EGL_NO_DISPLAY) {
+                        throw new RuntimeException("eglGetDisplay failed "
+                                + getEGLErrorString(sEgl.eglGetError()));
+                    }
+                    
+                    // We can now initialize EGL for that display
+                    int[] version = new int[2];
+                    if (!sEgl.eglInitialize(sEglDisplay, version)) {
+                        throw new RuntimeException("eglInitialize failed " +
+                                getEGLErrorString(sEgl.eglGetError()));
+                    }
+        
                     sEglConfig = chooseEglConfig();
                     if (sEglConfig == null) {
-                        throw new RuntimeException("eglConfig not initialized");
+                        // We tried to use EGL_SWAP_BEHAVIOR_PRESERVED_BIT, try again without
+                        if (sDirtyRegions) {
+                            sDirtyRegions = false;
+                            sEglConfig = chooseEglConfig();
+                            if (sEglConfig == null) {
+                                throw new RuntimeException("eglConfig not initialized");
+                            }
+                        } else {
+                            throw new RuntimeException("eglConfig not initialized");
+                        }
                     }
-                } else {
-                    throw new RuntimeException("eglConfig not initialized");
                 }
             }
-            
-            /*
-            * Create an EGL context. We want to do this as rarely as we can, because an
-            * EGL context is a somewhat heavy object.
-            */
-            sEglContext = createContext(sEgl, sEglDisplay, sEglConfig);
+
+            mEglContext = sEglContextStorage.get();
+            mEglThread = Thread.currentThread();
+
+            if (mEglContext == null) {
+                mEglContext = createContext(sEgl, sEglDisplay, sEglConfig);
+                sEglContextStorage.set(mEglContext);
+            }
         }
 
         private EGLConfig chooseEglConfig() {
@@ -554,7 +560,7 @@ public abstract class HardwareRenderer {
             if (sEglConfig == null) {
                 throw new RuntimeException("eglConfig not initialized");
             }
-            if (Thread.currentThread() != sEglThread) {
+            if (Thread.currentThread() != mEglThread) {
                 throw new IllegalStateException("HardwareRenderer cannot be used " 
                         + "from multiple threads");
             }
@@ -590,7 +596,7 @@ public abstract class HardwareRenderer {
              * Before we can issue GL commands, we need to make sure
              * the context is current and bound to a surface.
              */
-            if (!sEgl.eglMakeCurrent(sEglDisplay, mEglSurface, mEglSurface, sEglContext)) {
+            if (!sEgl.eglMakeCurrent(sEglDisplay, mEglSurface, mEglSurface, mEglContext)) {
                 throw new Surface.OutOfResourcesException("eglMakeCurrent failed "
                         + getEGLErrorString(sEgl.eglGetError()));
             }
@@ -611,7 +617,7 @@ public abstract class HardwareRenderer {
                 mDirtyRegionsEnabled = GLES20Canvas.isBackBufferPreserved();
             }
 
-            return sEglContext.getGL();
+            return mEglContext.getGL();
         }
 
         EGLContext createContext(EGL10 egl, EGLDisplay eglDisplay, EGLConfig eglConfig) {
@@ -752,22 +758,22 @@ public abstract class HardwareRenderer {
         }
 
         /**
-         * Ensures the currnet EGL context is the one we expect.
+         * Ensures the current EGL context is the one we expect.
          * 
          * @return {@link #SURFACE_STATE_ERROR} if the correct EGL context cannot be made current,
          *         {@link #SURFACE_STATE_UPDATED} if the EGL context was changed or
          *         {@link #SURFACE_STATE_SUCCESS} if the EGL context was the correct one
          */
         private int checkCurrent() {
-            if (sEglThread != Thread.currentThread()) {
+            if (mEglThread != Thread.currentThread()) {
                 throw new IllegalStateException("Hardware acceleration can only be used with a " +
-                        "single UI thread.\nOriginal thread: " + sEglThread + "\n" +
+                        "single UI thread.\nOriginal thread: " + mEglThread + "\n" +
                         "Current thread: " + Thread.currentThread());
             }
 
-            if (!sEglContext.equals(sEgl.eglGetCurrentContext()) ||
+            if (!mEglContext.equals(sEgl.eglGetCurrentContext()) ||
                     !mEglSurface.equals(sEgl.eglGetCurrentSurface(EGL10.EGL_DRAW))) {
-                if (!sEgl.eglMakeCurrent(sEglDisplay, mEglSurface, mEglSurface, sEglContext)) {
+                if (!sEgl.eglMakeCurrent(sEglDisplay, mEglSurface, mEglSurface, mEglContext)) {
                     fallback(true);
                     Log.e(LOG_TAG, "eglMakeCurrent failed " +
                             getEGLErrorString(sEgl.eglGetError()));
@@ -846,8 +852,8 @@ public abstract class HardwareRenderer {
         }
 
         @Override
-        DisplayList createDisplayList(View v) {
-            return new GLES20DisplayList(v);
+        DisplayList createDisplayList() {
+            return new GLES20DisplayList();
         }
 
         @Override
index 59cb216..ecb391d 100644 (file)
@@ -607,8 +607,6 @@ import java.util.concurrent.CopyOnWriteArrayList;
  * @attr ref android.R.styleable#View_paddingLeft
  * @attr ref android.R.styleable#View_paddingRight
  * @attr ref android.R.styleable#View_paddingTop
- * @attr ref android.R.styleable#View_paddingStart
- * @attr ref android.R.styleable#View_paddingEnd
  * @attr ref android.R.styleable#View_saveEnabled
  * @attr ref android.R.styleable#View_rotation
  * @attr ref android.R.styleable#View_rotationX
@@ -9101,7 +9099,10 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit
         mPrivateFlags2 |= LAYOUT_DIRECTION_RESOLVED;
     }
 
-    private void resolvePadding() {
+    /**
+     * @hide
+     */
+    protected void resolvePadding() {
         // If the user specified the absolute padding (either with android:padding or
         // android:paddingLeft/Top/Right/Bottom), use this padding, otherwise
         // use the default padding or the padding from the background drawable
@@ -9832,7 +9833,7 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit
             // we copy in child display lists into ours in drawChild()
             mRecreateDisplayList = true;
             if (mDisplayList == null) {
-                mDisplayList = mAttachInfo.mHardwareRenderer.createDisplayList(this);
+                mDisplayList = mAttachInfo.mHardwareRenderer.createDisplayList();
                 // If we're creating a new display list, make sure our parent gets invalidated
                 // since they will need to recreate their display list to account for this
                 // new child display list.
@@ -10317,6 +10318,26 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit
     }
 
     /**
+     * @hide
+     * @param offsetRequired
+     */
+    protected int getFadeTop(boolean offsetRequired) {
+        int top = mPaddingTop;
+        if (offsetRequired) top += getTopPaddingOffset();
+        return top;
+    }
+    
+    /**
+     * @hide
+     * @param offsetRequired
+     */
+    protected int getFadeHeight(boolean offsetRequired) {
+        int padding = mPaddingTop;
+        if (offsetRequired) padding += getTopPaddingOffset();        
+        return mBottom - mTop - mPaddingBottom - padding;
+    }
+    
+    /**
      * <p>Indicates whether this view is attached to an hardware accelerated
      * window or not.</p>
      *
@@ -10427,18 +10448,16 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit
 
         // Step 2, save the canvas' layers
         int paddingLeft = mPaddingLeft;
-        int paddingTop = mPaddingTop;
 
         final boolean offsetRequired = isPaddingOffsetRequired();
         if (offsetRequired) {
             paddingLeft += getLeftPaddingOffset();
-            paddingTop += getTopPaddingOffset();
         }
 
         int left = mScrollX + paddingLeft;
         int right = left + mRight - mLeft - mPaddingRight - paddingLeft;
-        int top = mScrollY + paddingTop;
-        int bottom = top + mBottom - mTop - mPaddingBottom - paddingTop;
+        int top = mScrollY + getFadeTop(offsetRequired);
+        int bottom = top + getFadeHeight(offsetRequired);
 
         if (offsetRequired) {
             right += getRightPaddingOffset();
index b85159b..4acf48c 100644 (file)
@@ -25,7 +25,9 @@ import android.os.Debug;
 import android.os.Environment;
 import android.os.Looper;
 import android.os.Message;
+import android.os.ParcelFileDescriptor;
 import android.os.RemoteException;
+import android.os.SystemClock;
 import android.util.DisplayMetrics;
 import android.util.Log;
 import android.util.Printer;
@@ -35,7 +37,7 @@ import java.io.BufferedWriter;
 import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;
 import java.io.File;
-import java.io.FileNotFoundException;
+import java.io.FileDescriptor;
 import java.io.FileOutputStream;
 import java.io.FileWriter;
 import java.io.IOException;
@@ -49,10 +51,14 @@ import java.lang.reflect.AccessibleObject;
 import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.nio.channels.FileChannel;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Map;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
@@ -424,22 +430,22 @@ public class ViewDebug {
      * and obtain the traces. Both methods must be invoked on the
      * same thread.
      * 
-     * @param traceFile The path where to write the looper traces
-     * 
-     * @see #stopLooperProfiling() 
+     * @hide
      */
-    public static void startLooperProfiling(File traceFile) {
+    public static void startLooperProfiling(String path, FileDescriptor fileDescriptor) {
         if (sLooperProfilerStorage.get() == null) {
-            LooperProfiler profiler = new LooperProfiler(traceFile);
+            LooperProfiler profiler = new LooperProfiler(path, fileDescriptor);
             sLooperProfilerStorage.set(profiler);
             Looper.myLooper().setMessageLogging(profiler);
         }
-    }
+    }    
 
     /**
      * Stops profiling the looper associated with the current thread.
      * 
-     * @see #startLooperProfiling(java.io.File) 
+     * @see #startLooperProfiling(String, java.io.FileDescriptor) 
+     * 
+     * @hide
      */
     public static void stopLooperProfiling() {
         LooperProfiler profiler = sLooperProfilerStorage.get();
@@ -451,15 +457,35 @@ public class ViewDebug {
     }
 
     private static class LooperProfiler implements Looper.Profiler, Printer {
-        private static final int LOOPER_PROFILER_VERSION = 1;
-
         private static final String LOG_TAG = "LooperProfiler";
 
+        private static final int TRACE_VERSION_NUMBER = 3;
+        private static final int ACTION_EXIT_METHOD = 0x1;
+        private static final int HEADER_SIZE = 32;
+        private static final String HEADER_MAGIC = "SLOW";
+        private static final short HEADER_RECORD_SIZE = (short) 14;
+
+        private final long mTraceWallStart;
+        private final long mTraceThreadStart;
+        
         private final ArrayList<Entry> mTraces = new ArrayList<Entry>(512);
-        private final File mTraceFile;
 
-        public LooperProfiler(File traceFile) {
-            mTraceFile = traceFile;
+        private final HashMap<String, Integer> mTraceNames = new HashMap<String, Integer>(32);
+        private int mTraceId = 0;
+
+        private final String mPath;
+        private ParcelFileDescriptor mFileDescriptor;
+
+        LooperProfiler(String path, FileDescriptor fileDescriptor) {
+            mPath = path;
+            try {
+                mFileDescriptor = ParcelFileDescriptor.dup(fileDescriptor);
+            } catch (IOException e) {
+                Log.e(LOG_TAG, "Could not write trace file " + mPath, e);
+                throw new RuntimeException(e);
+            }
+            mTraceWallStart = SystemClock.currentTimeMicro();
+            mTraceThreadStart = SystemClock.currentThreadTimeMicro();            
         }
 
         @Override
@@ -468,17 +494,28 @@ public class ViewDebug {
         }
 
         @Override
-        public void profile(Message message, long wallStart, long wallTime, long threadTime) {
+        public void profile(Message message, long wallStart, long wallTime,
+                long threadStart, long threadTime) {
             Entry entry = new Entry();
-            entry.messageId = message.what;
-            entry.name = message.getTarget().getMessageName(message);
+            entry.traceId = getTraceId(message);
             entry.wallStart = wallStart;
             entry.wallTime = wallTime;
+            entry.threadStart = threadStart;
             entry.threadTime = threadTime;
 
             mTraces.add(entry);
         }
 
+        private int getTraceId(Message message) {
+            String name = message.getTarget().getMessageName(message);
+            Integer traceId = mTraceNames.get(name);
+            if (traceId == null) {
+                traceId = mTraceId++ << 4;
+                mTraceNames.put(name, traceId);
+            }
+            return traceId;
+        }
+
         void save() {
             // Don't block the UI thread
             new Thread(new Runnable() {
@@ -486,52 +523,138 @@ public class ViewDebug {
                 public void run() {
                     saveTraces();
                 }
-            }, "LooperProfiler[" + mTraceFile + "]").start();
+            }, "LooperProfiler[" + mPath + "]").start();
         }
 
         private void saveTraces() {
-            FileOutputStream fos;
-            try {
-                fos = new FileOutputStream(mTraceFile);
-            } catch (FileNotFoundException e) {
-                Log.e(LOG_TAG, "Could not open trace file: " + mTraceFile);
-                return;
-            }
-
+            FileOutputStream fos = new FileOutputStream(mFileDescriptor.getFileDescriptor());
             DataOutputStream out = new DataOutputStream(new BufferedOutputStream(fos));
 
             try {
-                out.writeInt(LOOPER_PROFILER_VERSION);
-                out.writeInt(mTraces.size());
-                for (Entry entry : mTraces) {
-                    saveTrace(entry, out);
-                }
+                writeHeader(out, mTraceWallStart, mTraceNames, mTraces);
+                out.flush();
 
-                Log.d(LOG_TAG, "Looper traces ready: " + mTraceFile);
+                writeTraces(fos, out.size(), mTraceWallStart, mTraceThreadStart, mTraces);
+
+                Log.d(LOG_TAG, "Looper traces ready: " + mPath);
             } catch (IOException e) {
-                Log.e(LOG_TAG, "Could not write trace file: ", e);
+                Log.e(LOG_TAG, "Could not write trace file " + mPath, e);
             } finally {
                 try {
                     out.close();
                 } catch (IOException e) {
-                    // Ignore
+                    Log.e(LOG_TAG, "Could not write trace file " + mPath, e);
+                }
+                try {
+                    mFileDescriptor.close();
+                } catch (IOException e) {
+                    Log.e(LOG_TAG, "Could not write trace file " + mPath, e);
                 }
             }
         }
+        
+        private static void writeTraces(FileOutputStream out, long offset, long wallStart,
+                long threadStart, ArrayList<Entry> entries) throws IOException {
+    
+            FileChannel channel = out.getChannel();
+    
+            // Header
+            ByteBuffer buffer = ByteBuffer.allocateDirect(HEADER_SIZE);
+            buffer.put(HEADER_MAGIC.getBytes());
+            buffer = buffer.order(ByteOrder.LITTLE_ENDIAN);
+            buffer.putShort((short) TRACE_VERSION_NUMBER);    // version
+            buffer.putShort((short) HEADER_SIZE);             // offset to data
+            buffer.putLong(wallStart);                        // start time in usec
+            buffer.putShort(HEADER_RECORD_SIZE);              // size of a record in bytes
+            // padding to 32 bytes
+            for (int i = 0; i < HEADER_SIZE - 18; i++) {
+                buffer.put((byte) 0);
+            }
+    
+            buffer.flip();
+            channel.position(offset).write(buffer);
+            
+            buffer = ByteBuffer.allocateDirect(14).order(ByteOrder.LITTLE_ENDIAN);
+            for (Entry entry : entries) {
+                buffer.putShort((short) 1);   // we simulate only one thread
+                buffer.putInt(entry.traceId); // entering method
+                buffer.putInt((int) (entry.threadStart - threadStart));
+                buffer.putInt((int) (entry.wallStart - wallStart));
+    
+                buffer.flip();
+                channel.write(buffer);
+                buffer.clear();
+    
+                buffer.putShort((short) 1);
+                buffer.putInt(entry.traceId | ACTION_EXIT_METHOD); // exiting method
+                buffer.putInt((int) (entry.threadStart + entry.threadTime - threadStart));
+                buffer.putInt((int) (entry.wallStart + entry.wallTime - wallStart));
+    
+                buffer.flip();
+                channel.write(buffer);
+                buffer.clear();
+            }
+    
+            channel.close();
+        }
+    
+        private static void writeHeader(DataOutputStream out, long start,
+                HashMap<String, Integer> names, ArrayList<Entry> entries) throws IOException {
+    
+            Entry last = entries.get(entries.size() - 1);
+            long wallTotal = (last.wallStart + last.wallTime) - start;
+    
+            startSection("version", out);
+            addValue(null, Integer.toString(TRACE_VERSION_NUMBER), out);
+            addValue("data-file-overflow", "false", out);
+            addValue("clock", "dual", out);
+            addValue("elapsed-time-usec", Long.toString(wallTotal), out);
+            addValue("num-method-calls", Integer.toString(entries.size()), out);
+            addValue("clock-call-overhead-nsec", "1", out);
+            addValue("vm", "dalvik", out);
+    
+            startSection("threads", out);
+            addThreadId(1, "main", out);
+    
+            startSection("methods", out);
+            addMethods(names, out);
+    
+            startSection("end", out);
+        }
+    
+        private static void addMethods(HashMap<String, Integer> names, DataOutputStream out)
+                throws IOException {
+    
+            for (Map.Entry<String, Integer> name : names.entrySet()) {
+                out.writeBytes(String.format("0x%08x\tEventQueue\t%s\t()V\tLooper\t-2\n",
+                        name.getValue(), name.getKey()));
+            }
+        }
+    
+        private static void addThreadId(int id, String name, DataOutputStream out)
+                throws IOException {
 
-        private void saveTrace(Entry entry, DataOutputStream out) throws IOException {
-            out.writeInt(entry.messageId);
-            out.writeUTF(entry.name);
-            out.writeLong(entry.wallStart);
-            out.writeLong(entry.wallTime);
-            out.writeLong(entry.threadTime);
+            out.writeBytes(Integer.toString(id) + '\t' + name + '\n');
+        }
+    
+        private static void addValue(String name, String value, DataOutputStream out)
+                throws IOException {
+    
+            if (name != null) {
+                out.writeBytes(name + "=");
+            }
+            out.writeBytes(value + '\n');
+        }
+    
+        private static void startSection(String name, DataOutputStream out) throws IOException {
+            out.writeBytes("*" + name + '\n');
         }
 
         static class Entry {
-            int messageId;
-            String name;
+            int traceId;
             long wallStart;
             long wallTime;
+            long threadStart;
             long threadTime;
         }
     }
index 5f7673a..92a8ce7 100644 (file)
@@ -843,7 +843,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
      * @param child
      * @param visibility
      */
-    void onChildVisibilityChanged(View child, int visibility) {
+    protected void onChildVisibilityChanged(View child, int visibility) {
         if (mTransition != null) {
             if (visibility == VISIBLE) {
                 mTransition.showChild(this, child);
@@ -2148,9 +2148,12 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
         onPopulateAccessibilityEvent(event);
         // Let our children have a shot in populating the event.
         for (int i = 0, count = getChildCount(); i < count; i++) {
-            boolean handled = getChildAt(i).dispatchPopulateAccessibilityEvent(event);
-            if (handled) {
-                return handled;
+            View child = getChildAt(i);
+            if ((child.mViewFlags & VISIBILITY_MASK) == VISIBLE) {
+                boolean handled = getChildAt(i).dispatchPopulateAccessibilityEvent(event);
+                if (handled) {
+                    return handled;
+                }
             }
         }
         return false;
@@ -3183,6 +3186,24 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
     }
 
     /**
+     * @hide
+     */
+    protected void onViewAdded(View child) {
+        if (mOnHierarchyChangeListener != null) {
+            mOnHierarchyChangeListener.onChildViewAdded(this, child);
+        }
+    }
+
+    /**
+     * @hide
+     */
+    protected void onViewRemoved(View child) {
+        if (mOnHierarchyChangeListener != null) {
+            mOnHierarchyChangeListener.onChildViewRemoved(this, child);
+        }
+    }
+
+    /**
      * Adds a view during layout. This is useful if in your onLayout() method,
      * you need to add more views (as does the list view for example).
      *
@@ -3283,9 +3304,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
             ai.mKeepScreenOn = lastKeepOn;
         }
 
-        if (mOnHierarchyChangeListener != null) {
-            mOnHierarchyChangeListener.onChildViewAdded(this, child);
-        }
+        onViewAdded(child);
 
         if ((child.mViewFlags & DUPLICATE_PARENT_STATE) == DUPLICATE_PARENT_STATE) {
             mGroupFlags |= FLAG_NOTIFY_CHILDREN_ON_DRAWABLE_STATE_CHANGE;
@@ -3486,9 +3505,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
            view.dispatchDetachedFromWindow();
         }
 
-        if (mOnHierarchyChangeListener != null) {
-            mOnHierarchyChangeListener.onChildViewRemoved(this, view);
-        }
+        onViewRemoved(view);
 
         needGlobalAttributesUpdate(false);
 
@@ -3533,8 +3550,6 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
     }
 
     private void removeViewsInternal(int start, int count) {
-        final OnHierarchyChangeListener onHierarchyChangeListener = mOnHierarchyChangeListener;
-        final boolean notifyListener = onHierarchyChangeListener != null;
         final View focused = mFocused;
         final boolean detach = mAttachInfo != null;
         View clearChildFocus = null;
@@ -3563,9 +3578,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
 
             needGlobalAttributesUpdate(false);
 
-            if (notifyListener) {
-                onHierarchyChangeListener.onChildViewRemoved(this, view);
-            }
+            onViewRemoved(view);
         }
 
         removeFromArray(start, count);
@@ -3603,8 +3616,6 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
         final View[] children = mChildren;
         mChildrenCount = 0;
 
-        final OnHierarchyChangeListener listener = mOnHierarchyChangeListener;
-        final boolean notify = listener != null;
         final View focused = mFocused;
         final boolean detach = mAttachInfo != null;
         View clearChildFocus = null;
@@ -3630,9 +3641,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
                view.dispatchDetachedFromWindow();
             }
 
-            if (notify) {
-                listener.onChildViewRemoved(this, view);
-            }
+            onViewRemoved(view);
 
             view.mParent = null;
             children[i] = null;
@@ -3672,9 +3681,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
             child.dispatchDetachedFromWindow();
         }
 
-        if (mOnHierarchyChangeListener != null) {
-            mOnHierarchyChangeListener.onChildViewRemoved(this, child);
-        }
+        onViewRemoved(child);
     }
 
     /**
@@ -3960,7 +3967,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
                 final int left = mLeft;
                 final int top = mTop;
 
-                if (dirty.intersect(0, 0, mRight - left, mBottom - top) ||
+                if ((mGroupFlags & FLAG_CLIP_CHILDREN) != FLAG_CLIP_CHILDREN ||
+                        dirty.intersect(0, 0, mRight - left, mBottom - top) ||
                         (mPrivateFlags & DRAW_ANIMATION) == DRAW_ANIMATION) {
                     mPrivateFlags &= ~DRAWING_CACHE_VALID;
 
@@ -3978,8 +3986,12 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
 
                 location[CHILD_LEFT_INDEX] = mLeft;
                 location[CHILD_TOP_INDEX] = mTop;
-
-                dirty.set(0, 0, mRight - mLeft, mBottom - mTop);
+                if ((mGroupFlags & FLAG_CLIP_CHILDREN) == FLAG_CLIP_CHILDREN) {
+                    dirty.set(0, 0, mRight - mLeft, mBottom - mTop);
+                } else {
+                    // in case the dirty rect extends outside the bounds of this container
+                    dirty.union(0, 0, mRight - mLeft, mBottom - mTop);
+                }
 
                 if (mLayerType != LAYER_TYPE_NONE) {
                     mLocalDirtyRect.union(dirty);
diff --git a/core/java/android/view/textservice/SpellCheckerInfo.aidl b/core/java/android/view/textservice/SpellCheckerInfo.aidl
new file mode 100644 (file)
index 0000000..eb5dfcc
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.textservice;
+
+parcelable SpellCheckerInfo;
diff --git a/core/java/android/view/textservice/SpellCheckerInfo.java b/core/java/android/view/textservice/SpellCheckerInfo.java
new file mode 100644 (file)
index 0000000..1205adf
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * 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.textservice;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.pm.ResolveInfo;
+import android.content.pm.ServiceInfo;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * This class is used to specify meta information of an spell checker.
+ */
+public final class SpellCheckerInfo implements Parcelable {
+    private final ResolveInfo mService;
+    private final String mId;
+
+    /**
+     * Constructor.
+     * @hide
+     */
+    public SpellCheckerInfo(Context context, ResolveInfo service) {
+        mService = service;
+        ServiceInfo si = service.serviceInfo;
+        mId = new ComponentName(si.packageName, si.name).flattenToShortString();
+    }
+
+    /**
+     * Constructor.
+     * @hide
+     */
+    public SpellCheckerInfo(Parcel source) {
+        mId = source.readString();
+        mService = ResolveInfo.CREATOR.createFromParcel(source);
+    }
+
+    /**
+     * Return a unique ID for this spell checker.  The ID is generated from
+     * the package and class name implementing the method.
+     */
+    public String getId() {
+        return mId;
+    }
+
+
+    /**
+     * Return the component of the service that implements.
+     */
+    public ComponentName getComponent() {
+        return new ComponentName(
+                mService.serviceInfo.packageName, mService.serviceInfo.name);
+    }
+
+    /**
+     * Return the .apk package that implements this input method.
+     */
+    public String getPackageName() {
+        return mService.serviceInfo.packageName;
+    }
+
+    /**
+     * Used to package this object into a {@link Parcel}.
+     *
+     * @param dest The {@link Parcel} to be written.
+     * @param flags The flags used for parceling.
+     */
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeString(mId);
+        mService.writeToParcel(dest, flags);
+    }
+
+
+    /**
+     * Used to make this class parcelable.
+     */
+    public static final Parcelable.Creator<SpellCheckerInfo> CREATOR
+            = new Parcelable.Creator<SpellCheckerInfo>() {
+        @Override
+        public SpellCheckerInfo createFromParcel(Parcel source) {
+            return new SpellCheckerInfo(source);
+        }
+
+        @Override
+        public SpellCheckerInfo[] newArray(int size) {
+            return new SpellCheckerInfo[size];
+        }
+    };
+
+    /**
+     * Used to make this class parcelable.
+     */
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+}
diff --git a/core/java/android/view/textservice/SuggestionsInfo.aidl b/core/java/android/view/textservice/SuggestionsInfo.aidl
new file mode 100644 (file)
index 0000000..66e20d2
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.textservice;
+
+parcelable SuggestionsInfo;
diff --git a/core/java/android/view/textservice/SuggestionsInfo.java b/core/java/android/view/textservice/SuggestionsInfo.java
new file mode 100644 (file)
index 0000000..b0ccbea
--- /dev/null
@@ -0,0 +1,176 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * 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.textservice;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * This class contains a metadata of suggestions from the text service
+ */
+public final class SuggestionsInfo implements Parcelable {
+    /**
+     * Flag of the attributes of the suggestions that can be obtained by
+     * {@link #getSuggestionsAttributes}: this tells that the requested word was found
+     * in the dictionary in the text service.
+     */
+    public static final int RESULT_ATTR_IN_THE_DICTIONARY = 0x0001;
+    /** Flag of the attributes of the suggestions that can be obtained by
+     * {@link #getSuggestionsAttributes}: this tells that there are one or more suggestions
+     * available for the requested word.  This doesn't necessarily mean that the suggestions
+     * are actually in this SuggestionsInfo.  For instance, the caller could have been asked to
+     * limit the maximum number of suggestions returned.
+     */
+    public static final int RESULT_ATTR_SUGGESTIONS_AVAILABLE = 0x0002;
+    /**
+     * Flag of the attributes of the suggestions that can be obtained by
+     * {@link #getSuggestionsAttributes}: this tells that the text service thinks the requested
+     * word looks a typo.
+     */
+    public static final int RESULT_ATTR_LOOKS_TYPO = 0x0004;
+    private final int mSuggestionsAttributes;
+    private final String[] mSuggestions;
+    private int mCookie;
+    private int mSequence;
+
+    /**
+     * Constructor.
+     * @param suggestionsAttributes from the text service
+     * @param suggestions from the text service
+     */
+    public SuggestionsInfo(int suggestionsAttributes, String[] suggestions) {
+        if (suggestions == null) {
+            throw new NullPointerException();
+        }
+        mSuggestionsAttributes = suggestionsAttributes;
+        mSuggestions = suggestions;
+        mCookie = 0;
+        mSequence = 0;
+    }
+
+    /**
+     * Constructor.
+     * @param suggestionsAttributes from the text service
+     * @param suggestions from the text service
+     * @param cookie the cookie of the input TextInfo
+     * @param sequence the cookie of the input TextInfo
+     */
+    public SuggestionsInfo(
+            int suggestionsAttributes, String[] suggestions, int cookie, int sequence) {
+        if (suggestions == null) {
+            throw new NullPointerException();
+        }
+        mSuggestionsAttributes = suggestionsAttributes;
+        mSuggestions = suggestions;
+        mCookie = cookie;
+        mSequence = sequence;
+    }
+
+    public SuggestionsInfo(Parcel source) {
+        mSuggestionsAttributes = source.readInt();
+        mSuggestions = source.readStringArray();
+        mCookie = source.readInt();
+        mSequence = source.readInt();
+    }
+
+    /**
+     * Used to package this object into a {@link Parcel}.
+     *
+     * @param dest The {@link Parcel} to be written.
+     * @param flags The flags used for parceling.
+     */
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeInt(mSuggestionsAttributes);
+        dest.writeStringArray(mSuggestions);
+        dest.writeInt(mCookie);
+        dest.writeInt(mSequence);
+    }
+
+    /**
+     * Set the cookie and the sequence of SuggestionsInfo which are set to TextInfo from a client
+     * application
+     * @param cookie the cookie of an input TextInfo
+     * @param sequence the cookie of an input TextInfo
+     */
+    public void setCookieAndSequence(int cookie, int sequence) {
+        mCookie = cookie;
+        mSequence = sequence;
+    }
+
+    /**
+     * @return the cookie which may be set by a client application
+     */
+    public int getCookie() {
+        return mCookie;
+    }
+
+    /**
+     * @return the sequence which may be set by a client application
+     */
+    public int getSequence() {
+        return mSequence;
+    }
+
+    /**
+     * @return the attributes of suggestions. This includes whether the spell checker has the word
+     * in its dictionary or not and whether the spell checker has confident suggestions for the
+     * word or not.
+     */
+    public int getSuggestionsAttributes() {
+        return mSuggestionsAttributes;
+    }
+
+    /**
+     * @return the count of suggestions
+     */
+    public int getSuggestionsCount() {
+        return mSuggestions.length;
+    }
+
+    /**
+     * @param i the id of suggestions
+     * @return the suggestion at the specified id
+     */
+    public String getSuggestionAt(int i) {
+        return mSuggestions[i];
+    }
+
+    /**
+     * Used to make this class parcelable.
+     */
+    public static final Parcelable.Creator<SuggestionsInfo> CREATOR
+            = new Parcelable.Creator<SuggestionsInfo>() {
+        @Override
+        public SuggestionsInfo createFromParcel(Parcel source) {
+            return new SuggestionsInfo(source);
+        }
+
+        @Override
+        public SuggestionsInfo[] newArray(int size) {
+            return new SuggestionsInfo[size];
+        }
+    };
+
+    /**
+     * Used to make this class parcelable.
+     */
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+}
diff --git a/core/java/android/view/textservice/TextInfo.aidl b/core/java/android/view/textservice/TextInfo.aidl
new file mode 100644 (file)
index 0000000..d231d76
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.textservice;
+
+parcelable TextInfo;
diff --git a/core/java/android/view/textservice/TextInfo.java b/core/java/android/view/textservice/TextInfo.java
new file mode 100644 (file)
index 0000000..b534eb0
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * 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.textservice;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.text.TextUtils;
+
+/**
+ * This class contains a metadata of the input of TextService
+ */
+public final class TextInfo implements Parcelable {
+    private final String mText;
+    private final int mCookie;
+    private final int mSequence;
+
+    /**
+     * Constructor.
+     * @param text the text which will be input to TextService
+     */
+    public TextInfo(String text) {
+        this(text, 0, 0);
+    }
+
+    /**
+     * Constructor.
+     * @param text the text which will be input to TextService
+     * @param cookie the cookie for this TextInfo
+     * @param sequence the sequence number for this TextInfo
+     */
+    public TextInfo(String text, int cookie, int sequence) {
+        if (TextUtils.isEmpty(text)) {
+            throw new IllegalArgumentException(text);
+        }
+        mText = text;
+        mCookie = cookie;
+        mSequence = sequence;
+    }
+
+    public TextInfo(Parcel source) {
+        mText = source.readString();
+        mCookie = source.readInt();
+        mSequence = source.readInt();
+    }
+
+    /**
+     * Used to package this object into a {@link Parcel}.
+     *
+     * @param dest The {@link Parcel} to be written.
+     * @param flags The flags used for parceling.
+     */
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeString(mText);
+        dest.writeInt(mCookie);
+        dest.writeInt(mSequence);
+    }
+
+    /**
+     * @return the text which is an input of a text service
+     */
+    public String getText() {
+        return mText;
+    }
+
+    /**
+     * @return the cookie of TextInfo
+     */
+    public int getCookie() {
+        return mCookie;
+    }
+
+    /**
+     * @return the sequence of TextInfo
+     */
+    public int getSequence() {
+        return mSequence;
+    }
+
+    /**
+     * Used to make this class parcelable.
+     */
+    public static final Parcelable.Creator<TextInfo> CREATOR
+            = new Parcelable.Creator<TextInfo>() {
+        @Override
+        public TextInfo createFromParcel(Parcel source) {
+            return new TextInfo(source);
+        }
+
+        @Override
+        public TextInfo[] newArray(int size) {
+            return new TextInfo[size];
+        }
+    };
+
+    /**
+     * Used to make this class parcelable.
+     */
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+}
diff --git a/core/java/android/view/textservice/TextServicesManager.java b/core/java/android/view/textservice/TextServicesManager.java
new file mode 100644 (file)
index 0000000..6fa7e4d
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * 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.textservice;
+
+import com.android.internal.textservice.ITextServicesManager;
+
+import android.content.Context;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.view.textservice.SpellCheckerInfo;
+import android.service.textservice.SpellCheckerSession;
+import android.service.textservice.SpellCheckerSession.SpellCheckerSessionListener;
+
+import java.util.Locale;
+
+/**
+ * System API to the overall text services, which arbitrates interaction between applications
+ * and text services. You can retrieve an instance of this interface with
+ * {@link Context#getSystemService(String) Context.getSystemService()}.
+ *
+ * The user can change the current text services in Settings. And also applications can specify
+ * the target text services.
+ */
+public final class TextServicesManager {
+    private static final String TAG = TextServicesManager.class.getSimpleName();
+
+    private static TextServicesManager sInstance;
+    private static ITextServicesManager sService;
+
+    private TextServicesManager() {
+        if (sService == null) {
+            IBinder b = ServiceManager.getService(Context.TEXT_SERVICES_MANAGER_SERVICE);
+            sService = ITextServicesManager.Stub.asInterface(b);
+        }
+    }
+
+    /**
+     * Retrieve the global TextServicesManager instance, creating it if it doesn't already exist.
+     * @hide
+     */
+    public static TextServicesManager getInstance() {
+        synchronized (TextServicesManager.class) {
+            if (sInstance != null) {
+                return sInstance;
+            }
+            sInstance = new TextServicesManager();
+        }
+        return sInstance;
+    }
+
+
+    /**
+     * Get the current spell checker service info for the specified locale.
+     * @param locale locale of a spell checker
+     * @return SpellCheckerInfo for the specified locale.
+     */
+    // TODO: Add a method to get enabled spell checkers.
+    public SpellCheckerInfo getCurrentSpellChecker(Locale locale) {
+        if (locale == null) {
+            throw new NullPointerException("locale is null");
+        }
+        try {
+            return sService.getCurrentSpellChecker(locale.toString());
+        } catch (RemoteException e) {
+            return null;
+        }
+    }
+
+    /**
+     * Get a spell checker session for a specified spell checker
+     * @param info SpellCheckerInfo of the spell checker
+     * @param locale the locale for the spell checker
+     * @param listener a spell checker session lister for getting results from a spell checker.
+     * @return the spell checker session of the spell checker
+     */
+    public SpellCheckerSession newSpellCheckerSession(
+            SpellCheckerInfo info, Locale locale, SpellCheckerSessionListener listener) {
+        if (info == null || locale == null || listener == null) {
+            throw new NullPointerException();
+        }
+        final SpellCheckerSession session = new SpellCheckerSession(sService, listener);
+        try {
+            sService.getSpellCheckerService(
+                    info, locale.toString(), session.getTextServicesSessionListener(),
+                    session.getSpellCheckerSessionListener());
+        } catch (RemoteException e) {
+            return null;
+        }
+        return session;
+    }
+}
index b22c57b..6a3b2ff 100644 (file)
@@ -6330,8 +6330,8 @@ public class WebView extends AbsoluteLayout
         if (action == MotionEvent.ACTION_POINTER_DOWN) {
             cancelTouch();
             action = MotionEvent.ACTION_DOWN;
-        } else if (action == MotionEvent.ACTION_POINTER_UP && ev.getPointerCount() == 2) {
-            // set mLastTouchX/Y to the remaining point
+        } else if (action == MotionEvent.ACTION_POINTER_UP && ev.getPointerCount() >= 2) {
+            // set mLastTouchX/Y to the remaining points for multi-touch.
             mLastTouchX = Math.round(x);
             mLastTouchY = Math.round(y);
         } else if (action == MotionEvent.ACTION_MOVE) {
@@ -9119,20 +9119,12 @@ public class WebView extends AbsoluteLayout
         return nativeTileProfilingNumTilesInFrame(frame);
     }
     /** @hide only used by profiling tests */
-    public int tileProfilingGetX(int frame, int tile) {
-        return nativeTileProfilingGetX(frame, tile);
+    public int tileProfilingGetInt(int frame, int tile, String key) {
+        return nativeTileProfilingGetInt(frame, tile, key);
     }
     /** @hide only used by profiling tests */
-    public int tileProfilingGetY(int frame, int tile) {
-        return nativeTileProfilingGetY(frame, tile);
-    }
-    /** @hide only used by profiling tests */
-    public boolean tileProfilingGetReady(int frame, int tile) {
-        return nativeTileProfilingGetReady(frame, tile);
-    }
-    /** @hide only used by profiling tests */
-    public int tileProfilingGetLevel(int frame, int tile) {
-        return nativeTileProfilingGetLevel(frame, tile);
+    public float tileProfilingGetFloat(int frame, int tile, String key) {
+        return nativeTileProfilingGetFloat(frame, tile, key);
     }
 
     private native int nativeCacheHitFramePointer();
@@ -9262,10 +9254,8 @@ public class WebView extends AbsoluteLayout
     private native void     nativeTileProfilingClear();
     private native int      nativeTileProfilingNumFrames();
     private native int      nativeTileProfilingNumTilesInFrame(int frame);
-    private native int      nativeTileProfilingGetX(int frame, int tile);
-    private native int      nativeTileProfilingGetY(int frame, int tile);
-    private native boolean  nativeTileProfilingGetReady(int frame, int tile);
-    private native int      nativeTileProfilingGetLevel(int frame, int tile);
+    private native int      nativeTileProfilingGetInt(int frame, int tile, String key);
+    private native float    nativeTileProfilingGetFloat(int frame, int tile, String key);
     // Never call this version except by updateCachedTextfield(String) -
     // we always want to pass in our generation number.
     private native void     nativeUpdateCachedTextfield(String updatedText,
index 5414b79..8d8023b 100644 (file)
@@ -1069,6 +1069,15 @@ public final class WebViewCore {
                                 + " arg1=" + msg.arg1 + " arg2=" + msg.arg2
                                 + " obj=" + msg.obj);
                     }
+                    if (mWebView == null
+                            && msg.what != EventHub.RESUME_TIMERS
+                            && msg.what != EventHub.PAUSE_TIMERS) {
+                        if (DebugFlags.WEB_VIEW_CORE) {
+                            Log.v(LOGTAG, "Rejecting message " + msg.what
+                                    + " because we are destroyed");
+                        }
+                        return;
+                    }
                     switch (msg.what) {
                         case WEBKIT_DRAW:
                             webkitDraw();
@@ -1757,30 +1766,17 @@ public final class WebViewCore {
     }
 
     /**
-     * Removes pending messages and trigger a DESTROY message to send to
-     * WebCore.
+     * Sends a DESTROY message to WebCore.
      * Called from UI thread.
      */
     void destroy() {
-        // We don't want anyone to post a message between removing pending
-        // messages and sending the destroy message.
         synchronized (mEventHub) {
-            // RESUME_TIMERS and PAUSE_TIMERS are per process base. They need to
-            // be preserved even the WebView is destroyed.
-            // Note: we should not have more than one RESUME_TIMERS/PAUSE_TIMERS
-            boolean hasResume = mEventHub.hasMessages(EventHub.RESUME_TIMERS);
-            boolean hasPause = mEventHub.hasMessages(EventHub.PAUSE_TIMERS);
-            mEventHub.removeMessages();
+            // Do not call removeMessages as then we risk removing PAUSE_TIMERS
+            // or RESUME_TIMERS messages, which we must still handle as they
+            // are per process. DESTROY will instead trigger a white list in
+            // mEventHub, skipping any remaining messages in the queue
             mEventHub.sendMessageAtFrontOfQueue(
                     Message.obtain(null, EventHub.DESTROY));
-            if (hasPause) {
-                mEventHub.sendMessageAtFrontOfQueue(
-                        Message.obtain(null, EventHub.PAUSE_TIMERS));
-            }
-            if (hasResume) {
-                mEventHub.sendMessageAtFrontOfQueue(
-                        Message.obtain(null, EventHub.RESUME_TIMERS));
-            }
             mEventHub.blockMessages();
         }
     }
@@ -2113,13 +2109,17 @@ public final class WebViewCore {
 
     // called from JNI or WebView thread
     /* package */ void contentDraw() {
-        // don't update the Picture until we have an initial width and finish
-        // the first layout
-        if (mCurrentViewWidth == 0 || !mBrowserFrame.firstLayoutDone()) {
-            return;
-        }
-        // only fire an event if this is our first request
         synchronized (this) {
+            if (mWebView == null || mBrowserFrame == null) {
+                // We were destroyed
+                return;
+            }
+            // don't update the Picture until we have an initial width and finish
+            // the first layout
+            if (mCurrentViewWidth == 0 || !mBrowserFrame.firstLayoutDone()) {
+                return;
+            }
+            // only fire an event if this is our first request
             if (mDrawIsScheduled) return;
             mDrawIsScheduled = true;
             if (mDrawIsPaused) return;
@@ -2344,7 +2344,9 @@ public final class WebViewCore {
             webViewWidth = mWebView.getViewWidth();
             viewportWidth = (int) (webViewWidth / adjust);
             if (viewportWidth == 0) {
-                Log.w(LOGTAG, "Can't get the viewWidth after the first layout");
+                if (DebugFlags.WEB_VIEW_CORE) {
+                    Log.v(LOGTAG, "Can't get the viewWidth yet");
+                }
             }
         } else {
             webViewWidth = Math.round(viewportWidth * mCurrentViewScale);
index 49ea944..70e48ad 100644 (file)
@@ -794,6 +794,8 @@ class ZoomManager {
             mInitialZoomOverview = false;
             dismissZoomPicker();
             mFocusMovementQueue.clear();
+            mFocusX = detector.getFocusX();
+            mFocusY = detector.getFocusY();
             mWebView.mViewManager.startZoom();
             mWebView.onPinchToZoomAnimationStart();
             mAccumulatedSpan = 0;
index 8f8c1d0..b7c1687 100644 (file)
@@ -4638,9 +4638,6 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
                             childrenTop += getVerticalFadingEdgeLength();
                         }
                     }
-                    // Don't ever focus a disabled item.
-                    if (!mAdapter.isEnabled(i)) continue;
-
                     if (top >= childrenTop) {
                         // Found a view whose top is fully visisble
                         selectedPos = firstPosition + i;
index d7429b3..4b0a6da 100644 (file)
@@ -317,6 +317,7 @@ public class ActivityChooserModel extends DataSetObservable {
                 dataModel = new ActivityChooserModel(context, historyFileName);
                 sDataModelRegistry.put(historyFileName, dataModel);
             }
+            dataModel.readHistoricalData();
             return dataModel;
         }
     }
@@ -505,7 +506,7 @@ public class ActivityChooserModel extends DataSetObservable {
      *       data is read until this method is invoked.
      * <p>
      */
-    public void readHistoricalData() {
+    private void readHistoricalData() {
         synchronized (mInstanceLock) {
             if (!mCanReadHistoricalData || !mHistoricalRecordsChanged) {
                 return;
@@ -527,7 +528,7 @@ public class ActivityChooserModel extends DataSetObservable {
      * @throws IllegalStateException If this method is called before a call to
      *         {@link #readHistoricalData()}.
      */
-    public void persistHistoricalData() {
+    private void persistHistoricalData() {
         synchronized (mInstanceLock) {
             if (!mReadShareHistoryCalled) {
                 throw new IllegalStateException("No preceding call to #readHistoricalData");
@@ -629,6 +630,7 @@ public class ActivityChooserModel extends DataSetObservable {
             if (added) {
                 mHistoricalRecordsChanged = true;
                 pruneExcessiveHistoricalRecordsLocked();
+                persistHistoricalData();
                 sortActivities();
             }
             return added;
index 5b69aa8..d85f8a4 100644 (file)
@@ -307,7 +307,6 @@ public class ActivityChooserView extends ViewGroup implements ActivityChooserMod
         ActivityChooserModel dataModel = mAdapter.getDataModel();
         if (dataModel != null) {
             dataModel.registerObserver(mModelDataSetOberver);
-            dataModel.readHistoricalData();
         }
         mIsAttachedToWindow = true;
     }
@@ -318,7 +317,6 @@ public class ActivityChooserView extends ViewGroup implements ActivityChooserMod
         ActivityChooserModel dataModel = mAdapter.getDataModel();
         if (dataModel != null) {
             dataModel.unregisterObserver(mModelDataSetOberver);
-            dataModel.persistHistoricalData();
         }
         mIsAttachedToWindow = false;
     }
index 755d4e0..00c75a9 100644 (file)
@@ -902,15 +902,16 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup {
 
     @Override
     public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) {
-        // Add a record for ourselves as well.
-        AccessibilityEvent record = AccessibilityEvent.obtain();
-        record.setSource(this);
-        // Set the class since it is not populated in #dispatchPopulateAccessibilityEvent
-        record.setClassName(getClass().getName());
-        child.onInitializeAccessibilityEvent(record);
-        child.dispatchPopulateAccessibilityEvent(record);
-        event.appendRecord(record);
-        return true;
+        if (super.onRequestSendAccessibilityEvent(child, event)) {
+            // Add a record for ourselves as well.
+            AccessibilityEvent record = AccessibilityEvent.obtain();
+            onInitializeAccessibilityEvent(record);
+            // Populate with the text of the requesting child.
+            child.dispatchPopulateAccessibilityEvent(record);
+            event.appendRecord(record);
+            return true;
+        }
+        return false;
     }
 
     @Override
index 49616cc..f3a6da7 100644 (file)
@@ -39,8 +39,9 @@ public class CheckedTextView extends TextView implements Checkable {
     private boolean mChecked;
     private int mCheckMarkResource;
     private Drawable mCheckMarkDrawable;
-    private int mBasePaddingRight;
+    private int mBasePadding;
     private int mCheckMarkWidth;
+    private boolean mNeedRequestlayout;
 
     private static final int[] CHECKED_STATE_SET = {
         R.attr.state_checked
@@ -123,6 +124,7 @@ public class CheckedTextView extends TextView implements Checkable {
             mCheckMarkDrawable.setCallback(null);
             unscheduleDrawable(mCheckMarkDrawable);
         }
+        mNeedRequestlayout = (d != mCheckMarkDrawable);
         if (d != null) {
             d.setCallback(this);
             d.setVisible(getVisibility() == VISIBLE, false);
@@ -130,19 +132,35 @@ public class CheckedTextView extends TextView implements Checkable {
             setMinHeight(d.getIntrinsicHeight());
             
             mCheckMarkWidth = d.getIntrinsicWidth();
-            mUserPaddingRight = mCheckMarkWidth + mBasePaddingRight;
             d.setState(getDrawableState());
         } else {
-            mUserPaddingRight = mBasePaddingRight;
+            mCheckMarkWidth = 0;
         }
         mCheckMarkDrawable = d;
-        requestLayout();
+        // Do padding resolution. This will call setPadding() and do a requestLayout() if needed.
+        resolvePadding();
+    }
+
+    /**
+     * @hide
+     */
+    @Override
+    protected void resolvePadding() {
+        super.resolvePadding();
+        int newPadding = (mCheckMarkDrawable != null) ?
+                mCheckMarkWidth + mBasePadding : mBasePadding;
+        mNeedRequestlayout |= (mPaddingRight != newPadding);
+        mPaddingRight = newPadding;
+        if (mNeedRequestlayout) {
+            requestLayout();
+            mNeedRequestlayout = false;
+        }
     }
     
     @Override
     public void setPadding(int left, int top, int right, int bottom) {
         super.setPadding(left, top, right, bottom);
-        mBasePaddingRight = mUserPaddingRight;
+        mBasePadding = mPaddingRight;
     }
 
     @Override
@@ -167,9 +185,9 @@ public class CheckedTextView extends TextView implements Checkable {
             
             int right = getWidth();
             checkMarkDrawable.setBounds(
-                    right - mUserPaddingRight,
+                    right - mPaddingRight,
                     y, 
-                    right - mUserPaddingRight + mCheckMarkWidth,
+                    right - mPaddingRight + mCheckMarkWidth,
                     y + height);
             checkMarkDrawable.draw(canvas);
         }
index 0ffd087..3f5b571 100644 (file)
 
 package android.widget;
 
-import com.android.internal.R;
-
 import android.annotation.Widget;
 import android.content.Context;
 import android.content.res.TypedArray;
 import android.graphics.Rect;
 import android.util.AttributeSet;
 import android.util.Log;
+import android.view.ContextMenu.ContextMenuInfo;
 import android.view.GestureDetector;
 import android.view.Gravity;
 import android.view.HapticFeedbackConstants;
 import android.view.KeyEvent;
 import android.view.MotionEvent;
+import android.view.SoundEffectConstants;
 import android.view.View;
 import android.view.ViewConfiguration;
 import android.view.ViewGroup;
-import android.view.SoundEffectConstants;
-import android.view.ContextMenu.ContextMenuInfo;
 import android.view.accessibility.AccessibilityEvent;
 import android.view.accessibility.AccessibilityNodeInfo;
 import android.view.animation.Transformation;
 
+import com.android.internal.R;
+
 /**
  * A view that shows items in a center-locked, horizontally scrolling list.
  * <p>
@@ -122,6 +122,7 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
      * in the future. It will also trigger a selection changed.
      */
     private Runnable mDisableSuppressSelectionChangedRunnable = new Runnable() {
+        @Override
         public void run() {
             mSuppressSelectionChanged = false;
             selectionChanged();
@@ -171,6 +172,12 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
      * drag sends many onScrolls).
      */
     private boolean mIsFirstScroll;
+
+    /**
+     * If true, mFirstPosition is the position of the rightmost child, and
+     * the children are ordered right to left.
+     */
+    private boolean mIsRtl = true;
     
     public Gallery(Context context) {
         this(context, null);
@@ -418,7 +425,7 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
     }
 
     int getLimitedMotionScrollAmount(boolean motionToLeft, int deltaX) {
-        int extremeItemPosition = motionToLeft ? mItemCount - 1 : 0;
+        int extremeItemPosition = motionToLeft != mIsRtl ? mItemCount - 1 : 0;
         View extremeChild = getChildAt(extremeItemPosition - mFirstPosition);
         
         if (extremeChild == null) {
@@ -490,31 +497,40 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
         if (toLeft) {
             final int galleryLeft = mPaddingLeft;
             for (int i = 0; i < numChildren; i++) {
-                final View child = getChildAt(i);
+                int n = mIsRtl ? (numChildren - 1 - i) : i;
+                final View child = getChildAt(n);
                 if (child.getRight() >= galleryLeft) {
                     break;
                 } else {
+                    start = n;
                     count++;
-                    mRecycler.put(firstPosition + i, child);
+                    mRecycler.put(firstPosition + n, child);
                 }
             }
+            if (!mIsRtl) {
+                start = 0;
+            }
         } else {
             final int galleryRight = getWidth() - mPaddingRight;
             for (int i = numChildren - 1; i >= 0; i--) {
-                final View child = getChildAt(i);
+                int n = mIsRtl ? numChildren - 1 - i : i;
+                final View child = getChildAt(n);
                 if (child.getLeft() <= galleryRight) {
                     break;
                 } else {
-                    start = i;
+                    start = n;
                     count++;
-                    mRecycler.put(firstPosition + i, child);
+                    mRecycler.put(firstPosition + n, child);
                 }
             }
+            if (mIsRtl) {
+                start = 0;
+            }
         }
 
         detachViewsFromParent(start, count);
         
-        if (toLeft) {
+        if (toLeft != mIsRtl) {
             mFirstPosition += count;
         }
     }
@@ -614,6 +630,8 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
     @Override
     void layout(int delta, boolean animate) {
 
+        mIsRtl = isLayoutRtl();
+
         int childrenLeft = mSpinnerPadding.left;
         int childrenWidth = mRight - mLeft - mSpinnerPadding.left - mSpinnerPadding.right;
 
@@ -676,6 +694,45 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
     }
 
     private void fillToGalleryLeft() {
+        if (mIsRtl) {
+            fillToGalleryLeftRtl();
+        } else {
+            fillToGalleryLeftLtr();
+        }
+    }
+
+    private void fillToGalleryLeftRtl() {
+        int itemSpacing = mSpacing;
+        int galleryLeft = mPaddingLeft;
+        int numChildren = getChildCount();
+        int numItems = mItemCount;
+
+        // Set state for initial iteration
+        View prevIterationView = getChildAt(numChildren - 1);
+        int curPosition;
+        int curRightEdge;
+
+        if (prevIterationView != null) {
+            curPosition = mFirstPosition + numChildren;
+            curRightEdge = prevIterationView.getLeft() - itemSpacing;
+        } else {
+            // No children available!
+            mFirstPosition = curPosition = mItemCount - 1;
+            curRightEdge = mRight - mLeft - mPaddingRight;
+            mShouldStopFling = true;
+        }
+
+        while (curRightEdge > galleryLeft && curPosition < mItemCount) {
+            prevIterationView = makeAndAddView(curPosition, curPosition - mSelectedPosition,
+                    curRightEdge, false);
+
+            // Set state for next iteration
+            curRightEdge = prevIterationView.getLeft() - itemSpacing;
+            curPosition++;
+        }
+    }
+
+    private void fillToGalleryLeftLtr() {
         int itemSpacing = mSpacing;
         int galleryLeft = mPaddingLeft;
         
@@ -708,6 +765,45 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
     }
     
     private void fillToGalleryRight() {
+        if (mIsRtl) {
+            fillToGalleryRightRtl();
+        } else {
+            fillToGalleryRightLtr();
+        }
+    }
+
+    private void fillToGalleryRightRtl() {
+        int itemSpacing = mSpacing;
+        int galleryRight = mRight - mLeft - mPaddingRight;
+
+        // Set state for initial iteration
+        View prevIterationView = getChildAt(0);
+        int curPosition;
+        int curLeftEdge;
+
+        if (prevIterationView != null) {
+            curPosition = mFirstPosition -1;
+            curLeftEdge = prevIterationView.getRight() + itemSpacing;
+        } else {
+            curPosition = 0;
+            curLeftEdge = mPaddingLeft;
+            mShouldStopFling = true;
+        }
+
+        while (curLeftEdge < galleryRight && curPosition >= 0) {
+            prevIterationView = makeAndAddView(curPosition, curPosition - mSelectedPosition,
+                    curLeftEdge, true);
+
+            // Remember some state
+            mFirstPosition = curPosition;
+
+            // Set state for next iteration
+            curLeftEdge = prevIterationView.getRight() + itemSpacing;
+            curPosition--;
+        }
+    }
+
+    private void fillToGalleryRightLtr() {
         int itemSpacing = mSpacing;
         int galleryRight = mRight - mLeft - mPaddingRight;
         int numChildren = getChildCount();
@@ -745,18 +841,16 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
      * 
      * @param position Position in the gallery for the view to obtain
      * @param offset Offset from the selected position
-     * @param x X-coordintate indicating where this view should be placed. This
+     * @param x X-coordinate indicating where this view should be placed. This
      *        will either be the left or right edge of the view, depending on
-     *        the fromLeft paramter
-     * @param fromLeft Are we posiitoning views based on the left edge? (i.e.,
+     *        the fromLeft parameter
+     * @param fromLeft Are we positioning views based on the left edge? (i.e.,
      *        building from left to right)?
      * @return A view that has been added to the gallery
      */
-    private View makeAndAddView(int position, int offset, int x,
-            boolean fromLeft) {
+    private View makeAndAddView(int position, int offset, int x, boolean fromLeft) {
 
         View child;
-
         if (!mDataChanged) {
             child = mRecycler.get(position);
             if (child != null) {
@@ -786,27 +880,26 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
 
     /**
      * Helper for makeAndAddView to set the position of a view and fill out its
-     * layout paramters.
+     * layout parameters.
      * 
      * @param child The view to position
      * @param offset Offset from the selected position
-     * @param x X-coordintate indicating where this view should be placed. This
+     * @param x X-coordinate indicating where this view should be placed. This
      *        will either be the left or right edge of the view, depending on
-     *        the fromLeft paramter
-     * @param fromLeft Are we posiitoning views based on the left edge? (i.e.,
+     *        the fromLeft parameter
+     * @param fromLeft Are we positioning views based on the left edge? (i.e.,
      *        building from left to right)?
      */
     private void setUpChild(View child, int offset, int x, boolean fromLeft) {
 
         // Respect layout params that are already in the view. Otherwise
         // make some up...
-        Gallery.LayoutParams lp = (Gallery.LayoutParams) 
-            child.getLayoutParams();
+        Gallery.LayoutParams lp = (Gallery.LayoutParams) child.getLayoutParams();
         if (lp == null) {
             lp = (Gallery.LayoutParams) generateDefaultLayoutParams();
         }
 
-        addViewInLayout(child, fromLeft ? -1 : 0, lp);
+        addViewInLayout(child, fromLeft != mIsRtl ? -1 : 0, lp);
 
         child.setSelected(offset == 0);
 
@@ -883,9 +976,7 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
         return retValue;
     }
     
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public boolean onSingleTapUp(MotionEvent e) {
 
         if (mDownTouchPosition >= 0) {
@@ -905,9 +996,7 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
         return false;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
         
         if (!mShouldCallbackDuringFling) {
@@ -926,9 +1015,7 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
         return true;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
 
         if (localLOGV) Log.v(TAG, String.valueOf(e2.getX() - e1.getX()));
@@ -967,9 +1054,7 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
         return true;
     }
     
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public boolean onDown(MotionEvent e) {
 
         // Kill any existing fling/scroll
@@ -1009,9 +1094,7 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
         onUp();
     }
     
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public void onLongPress(MotionEvent e) {
         
         if (mDownTouchPosition < 0) {
@@ -1025,9 +1108,7 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
 
     // Unused methods from GestureDetector.OnGestureListener below
     
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public void onShowPress(MotionEvent e) {
     }
 
@@ -1164,6 +1245,7 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
     
                     dispatchPress(mSelectedChild);
                     postDelayed(new Runnable() {
+                        @Override
                         public void run() {
                             dispatchUnpress();
                         }
@@ -1278,10 +1360,10 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
             // Draw the selected child last
             return selectedIndex;
         } else if (i >= selectedIndex) {
-            // Move the children to the right of the selected child earlier one
+            // Move the children after the selected child earlier one
             return i + 1;
         } else {
-            // Keep the children to the left of the selected child the same
+            // Keep the children before the selected child the same
             return i;
         }
     }
@@ -1306,7 +1388,6 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
      * Responsible for fling behavior. Use {@link #startUsingVelocity(int)} to
      * initiate a fling. Each frame of the fling is handled in {@link #run()}.
      * A FlingRunnable will keep re-posting itself until the fling is done.
-     *
      */
     private class FlingRunnable implements Runnable {
         /**
@@ -1365,6 +1446,7 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
             if (scrollIntoSlots) scrollIntoSlots();
         }
 
+        @Override
         public void run() {
 
             if (mItemCount == 0) {
@@ -1384,15 +1466,17 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
 
             // Pretend that each frame of a fling scroll is a touch scroll
             if (delta > 0) {
-                // Moving towards the left. Use first view as mDownTouchPosition
-                mDownTouchPosition = mFirstPosition;
+                // Moving towards the left. Use leftmost view as mDownTouchPosition
+                mDownTouchPosition = mIsRtl ? (mFirstPosition + getChildCount() - 1) :
+                    mFirstPosition;
 
                 // Don't fling more than 1 screen
                 delta = Math.min(getWidth() - mPaddingLeft - mPaddingRight - 1, delta);
             } else {
-                // Moving towards the right. Use last view as mDownTouchPosition
+                // Moving towards the right. Use rightmost view as mDownTouchPosition
                 int offsetToLast = getChildCount() - 1;
-                mDownTouchPosition = mFirstPosition + offsetToLast;
+                mDownTouchPosition = mIsRtl ? mFirstPosition :
+                    (mFirstPosition + getChildCount() - 1);
 
                 // Don't fling more than 1 screen
                 delta = Math.max(-(getWidth() - mPaddingRight - mPaddingLeft - 1), delta);
@@ -1414,7 +1498,6 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
      * Gallery extends LayoutParams to provide a place to hold current
      * Transformation information along with previous position/transformation
      * info.
-     * 
      */
     public static class LayoutParams extends ViewGroup.LayoutParams {
         public LayoutParams(Context c, AttributeSet attrs) {
index f82c61a..3bd7fab 100644 (file)
@@ -596,7 +596,6 @@ public class GridLayout extends ViewGroup {
                 int col = 0;
                 for (int i = 0, N = getChildCount(); i < N; i++) {
                     View c = getChildAt(i);
-                    if (isGone(c)) continue;
                     LayoutParams lp = getLayoutParams1(c);
 
                     final Spec colSpec = lp.columnSpec;
@@ -757,39 +756,33 @@ public class GridLayout extends ViewGroup {
 
     // Add/remove
 
+    /**
+     * @hide
+     */
     @Override
-    public void addView(View child, int index, ViewGroup.LayoutParams params) {
-        super.addView(child, index, params);
-        invalidateStructure();
-    }
-
-    @Override
-    public void removeView(View view) {
-        super.removeView(view);
-        invalidateStructure();
-    }
-
-    @Override
-    public void removeViewInLayout(View view) {
-        super.removeViewInLayout(view);
-        invalidateStructure();
-    }
-
-    @Override
-    public void removeViewsInLayout(int start, int count) {
-        super.removeViewsInLayout(start, count);
+    protected void onViewAdded(View child) {
+        super.onViewAdded(child);
         invalidateStructure();
     }
 
+    /**
+     * @hide
+     */
     @Override
-    public void removeViewAt(int index) {
-        super.removeViewAt(index);
+    protected void onViewRemoved(View child) {
+        super.onViewRemoved(child);
         invalidateStructure();
     }
 
+    /**
+     * We need to call invalidateStructure() when a child's GONE flag changes state.
+     * This implementation is a catch-all, invalidating on any change in the visibility flags.
+     *
+     * @hide
+     */
     @Override
-    public void removeAllViews() {
-        super.removeAllViews();
+    protected void onChildVisibilityChanged(View child, int visibility) {
+        super.onChildVisibilityChanged(child, visibility);
         invalidateStructure();
     }
 
@@ -1008,7 +1001,6 @@ public class GridLayout extends ViewGroup {
             int count = -1;
             for (int i = 0, N = getChildCount(); i < N; i++) {
                 View c = getChildAt(i);
-                if (isGone(c)) continue;
                 LayoutParams params = getLayoutParams(c);
                 Spec spec = horizontal ? params.columnSpec : params.rowSpec;
                 count = max(count, spec.span.min);
@@ -2301,25 +2293,6 @@ public class GridLayout extends ViewGroup {
     }
 
     /**
-     * Temporary backward compatibility class for Launcher - to avoid
-     * dependent multi-project commit. This class will be deleted after
-     * AppsCustomizePagedView is updated to new API.
-     *
-     * @hide
-     */
-    @Deprecated
-    public static class Group extends Spec {
-        /**
-         * @deprecated Please replace with {@link #spec(int, int, Alignment)}
-         * @hide
-         */
-        @Deprecated
-        public Group(int start, int size, Alignment alignment) {
-            super(start, size, alignment, UNDEFINED_FLEXIBILITY);
-        }
-    }
-
-    /**
      * Return a Spec, {@code spec}, where:
      * <ul>
      *     <li> {@code spec.span = [start, start + size]} </li>
index 161b404..299e1ff 100644 (file)
@@ -30,14 +30,15 @@ import android.graphics.RectF;
 import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.Drawable;
 import android.net.Uri;
+import android.text.TextUtils;
 import android.util.AttributeSet;
 import android.util.Log;
 import android.view.RemotableViewMethod;
 import android.view.View;
 import android.view.ViewDebug;
+import android.view.accessibility.AccessibilityEvent;
 import android.widget.RemoteViews.RemoteView;
 
-
 /**
  * Displays an arbitrary image, such as an icon.  The ImageView class
  * can load images from various sources (such as resources or content
@@ -208,7 +209,15 @@ public class ImageView extends View {
         }
         return false;
     }
-    
+
+    @Override
+    public void onPopulateAccessibilityEvent(AccessibilityEvent event) {
+        CharSequence contentDescription = getContentDescription();
+        if (!TextUtils.isEmpty(contentDescription)) {
+            event.getText().add(contentDescription);
+        }
+    }
+
     /**
      * Set this to true if you want the ImageView to adjust its bounds
      * to preserve the aspect ratio of its drawable.
index 66a07d3..a7324b0 100644 (file)
 
 package android.widget;
 
-import com.android.internal.util.FastMath;
-import com.android.internal.widget.EditableInputConnection;
-
-import org.xmlpull.v1.XmlPullParserException;
-
 import android.R;
 import android.content.ClipData;
 import android.content.ClipData.Item;
@@ -117,12 +112,12 @@ import android.view.Menu;
 import android.view.MenuItem;
 import android.view.MotionEvent;
 import android.view.View;
-import android.view.ViewRootImpl;
 import android.view.ViewConfiguration;
 import android.view.ViewDebug;
 import android.view.ViewGroup;
 import android.view.ViewGroup.LayoutParams;
 import android.view.ViewParent;
+import android.view.ViewRootImpl;
 import android.view.ViewTreeObserver;
 import android.view.WindowManager;
 import android.view.accessibility.AccessibilityEvent;
@@ -139,6 +134,11 @@ import android.view.inputmethod.InputConnection;
 import android.view.inputmethod.InputMethodManager;
 import android.widget.RemoteViews.RemoteView;
 
+import com.android.internal.util.FastMath;
+import com.android.internal.widget.EditableInputConnection;
+
+import org.xmlpull.v1.XmlPullParserException;
+
 import java.io.IOException;
 import java.lang.ref.WeakReference;
 import java.text.BreakIterator;
@@ -329,7 +329,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
     private int mTextEditPasteWindowLayout, mTextEditSidePasteWindowLayout;
     private int mTextEditNoPasteWindowLayout, mTextEditSideNoPasteWindowLayout;
 
-    private int mTextEditSuggestionsBottomWindowLayout, mTextEditSuggestionsTopWindowLayout;
+    private int mTextEditSuggestionsWindowLayout;
     private int mTextEditSuggestionItemLayout;
     private SuggestionsPopupWindow mSuggestionsPopupWindow;
     private SuggestionRangeSpan mSuggestionRangeSpan;
@@ -362,7 +362,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
         INHERIT, GRAVITY, TEXT_START, TEXT_END, CENTER, VIEW_START, VIEW_END;
     }
 
-    private boolean bResolvedDrawables = false;
+    private boolean mResolvedDrawables = false;
 
     /*
      * Kick-start the font cache for the zygote process (to pay the cost of
@@ -830,12 +830,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                 mTextEditSideNoPasteWindowLayout = a.getResourceId(attr, 0);
                 break;
 
-            case com.android.internal.R.styleable.TextView_textEditSuggestionsBottomWindowLayout:
-                mTextEditSuggestionsBottomWindowLayout = a.getResourceId(attr, 0);
-                break;
-
-            case com.android.internal.R.styleable.TextView_textEditSuggestionsTopWindowLayout:
-                mTextEditSuggestionsTopWindowLayout = a.getResourceId(attr, 0);
+            case com.android.internal.R.styleable.TextView_textEditSuggestionsWindowLayout:
+                mTextEditSuggestionsWindowLayout = a.getResourceId(attr, 0);
                 break;
 
             case com.android.internal.R.styleable.TextView_textEditSuggestionItemLayout:
@@ -3424,7 +3420,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
         return mHint;
     }
 
-    private boolean isMultilineInputType(int type) {
+    private static boolean isMultilineInputType(int type) {
         return (type & (EditorInfo.TYPE_MASK_CLASS | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE)) ==
             (EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE);
     }
@@ -3500,7 +3496,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
         return mTransformation instanceof PasswordTransformationMethod;
     }
 
-    private boolean isPasswordInputType(int inputType) {
+    private static boolean isPasswordInputType(int inputType) {
         final int variation =
                 inputType & (EditorInfo.TYPE_MASK_CLASS | EditorInfo.TYPE_MASK_VARIATION);
         return variation
@@ -3511,7 +3507,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                 == (EditorInfo.TYPE_CLASS_NUMBER | EditorInfo.TYPE_NUMBER_VARIATION_PASSWORD);
     }
 
-    private boolean isVisiblePasswordInputType(int inputType) {
+    private static boolean isVisiblePasswordInputType(int inputType) {
         final int variation =
                 inputType & (EditorInfo.TYPE_MASK_CLASS | EditorInfo.TYPE_MASK_VARIATION);
         return variation
@@ -5062,6 +5058,67 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
         return getExtendedPaddingTop() + voffset + mLayout.getLineBaseline(0);
     }
 
+    /**
+     * @hide
+     * @param offsetRequired
+     */
+    @Override
+    protected int getFadeTop(boolean offsetRequired) {
+        if (mLayout == null) return 0;
+
+        int voffset = 0;
+        if ((mGravity & Gravity.VERTICAL_GRAVITY_MASK) != Gravity.TOP) {
+            voffset = getVerticalOffset(true);
+        }
+        
+        if (offsetRequired) voffset += getTopPaddingOffset();
+
+        return getExtendedPaddingTop() + voffset;
+    }
+
+    /**
+     * @hide
+     * @param offsetRequired
+     */
+    @Override
+    protected int getFadeHeight(boolean offsetRequired) {
+        return mLayout != null ? mLayout.getHeight() : 0;
+    }
+
+    @Override
+    public boolean onKeyPreIme(int keyCode, KeyEvent event) {
+        if (keyCode == KeyEvent.KEYCODE_BACK) {
+            boolean areSuggestionsShown = areSuggestionsShown();
+            boolean isInSelectionMode = mSelectionActionMode != null;
+
+            if (areSuggestionsShown || isInSelectionMode) {
+                if (event.getAction() == KeyEvent.ACTION_DOWN && event.getRepeatCount() == 0) {
+                    KeyEvent.DispatcherState state = getKeyDispatcherState();
+                    if (state != null) {
+                        state.startTracking(event, this);
+                    }
+                    return true;
+                } else if (event.getAction() == KeyEvent.ACTION_UP) {
+                    KeyEvent.DispatcherState state = getKeyDispatcherState();
+                    if (state != null) {
+                        state.handleUpEvent(event);
+                    }
+                    if (event.isTracking() && !event.isCanceled()) {
+                        if (areSuggestionsShown) {
+                            hideSuggestions();
+                            return true;
+                        }
+                        if (isInSelectionMode) {
+                            stopSelectionActionMode();
+                            return true;
+                        }
+                    }
+                }
+            }
+        }
+        return super.onKeyPreIme(keyCode, event);
+    }
+
     @Override
     public boolean onKeyDown(int keyCode, KeyEvent event) {
         int which = doKeyDown(keyCode, event, null);
@@ -5214,6 +5271,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
 
                 // Has to be done on key down (and not on key up) to correctly be intercepted.
             case KeyEvent.KEYCODE_BACK:
+                if (areSuggestionsShown()) {
+                    hideSuggestions();
+                    return -1;
+                }
                 if (mSelectionActionMode != null) {
                     stopSelectionActionMode();
                     return -1;
@@ -7590,9 +7651,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
         // Because of View recycling in ListView, there is no easy way to know when a TextView with
         // selection becomes visible again. Until a better solution is found, stop text selection
         // mode (if any) as soon as this TextView is recycled.
-        stopSelectionActionMode();
+        hideControllers();
     }
-    
+
     @Override
     public void onFinishTemporaryDetach() {
         super.onFinishTemporaryDetach();
@@ -7600,7 +7661,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
         // usually because this instance is an editable field in a list
         if (!mDispatchTemporaryDetach) mTemporaryDetach = false;
     }
-    
+
     @Override
     protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
         if (mTemporaryDetach) {
@@ -7862,8 +7923,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                 if (!selectAllGotFocus && hasSelection()) {
                     startSelectionActionMode();
                 } else {
-                    stopSelectionActionMode();
-                    hideSuggestions();
+                    hideControllers();
                     if (hasInsertionController() && !selectAllGotFocus && mText.length() > 0) {
                         getInsertionController().show();
                     }
@@ -8721,9 +8781,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
         private static final int MAX_NUMBER_SUGGESTIONS = 5;
         private static final int NO_SUGGESTIONS = -1;
         private final PopupWindow mContainer;
-        private final ViewGroup[] mSuggestionViews = new ViewGroup[2];
-        private final int[] mSuggestionViewLayouts = new int[] {
-                mTextEditSuggestionsBottomWindowLayout, mTextEditSuggestionsTopWindowLayout};
+        private ViewGroup mSuggestionViewGroup;
         private WordIterator mSuggestionWordIterator;
         private TextAppearanceSpan[] mHighlightSpans = new TextAppearanceSpan[0];
 
@@ -8745,12 +8803,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
             int suggestionIndex; // the index of the suggestion inside suggestionSpan
         }
 
-        private ViewGroup getViewGroup(boolean under) {
-            final int viewIndex = under ? 0 : 1;
-            ViewGroup viewGroup = mSuggestionViews[viewIndex];
-
-            if (viewGroup == null) {
-                final int layout = mSuggestionViewLayouts[viewIndex];
+        private void initSuggestionViewGroup() {
+            if (mSuggestionViewGroup == null) {
                 LayoutInflater inflater = (LayoutInflater) TextView.this.mContext.
                         getSystemService(Context.LAYOUT_INFLATER_SERVICE);
 
@@ -8759,19 +8813,19 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                             "Unable to create TextEdit suggestion window inflater");
                 }
 
-                View view = inflater.inflate(layout, null);
+                View view = inflater.inflate(mTextEditSuggestionsWindowLayout, null);
 
                 if (! (view instanceof ViewGroup)) {
                     throw new IllegalArgumentException(
                             "Inflated TextEdit suggestion window is not a ViewGroup: " + view);
                 }
 
-                viewGroup = (ViewGroup) view;
+                mSuggestionViewGroup = (ViewGroup) view;
 
                 // Inflate the suggestion items once and for all.
                 for (int i = 0; i < MAX_NUMBER_SUGGESTIONS; i++) {
-                    View childView = inflater.inflate(mTextEditSuggestionItemLayout, viewGroup,
-                            false);
+                    View childView = inflater.inflate(mTextEditSuggestionItemLayout,
+                            mSuggestionViewGroup, false);
 
                     if (! (childView instanceof TextView)) {
                         throw new IllegalArgumentException(
@@ -8779,14 +8833,12 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                     }
 
                     childView.setTag(new SuggestionInfo());
-                    viewGroup.addView(childView);
+                    mSuggestionViewGroup.addView(childView);
                     childView.setOnClickListener(this);
                 }
 
-                mSuggestionViews[viewIndex] = viewGroup;
+                mContainer.setContentView(mSuggestionViewGroup);
             }
-
-            return viewGroup;
         }
 
         public void show() {
@@ -8797,8 +8849,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
             SuggestionSpan[] suggestionSpans = spannable.getSpans(pos, pos, SuggestionSpan.class);
             final int nbSpans = suggestionSpans.length;
 
-            ViewGroup viewGroup = getViewGroup(true);
-            mContainer.setContentView(viewGroup);
+            initSuggestionViewGroup();
 
             int totalNbSuggestions = 0;
             int spanUnionStart = mText.length();
@@ -8814,7 +8865,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                 String[] suggestions = suggestionSpan.getSuggestions();
                 int nbSuggestions = suggestions.length;
                 for (int suggestionIndex = 0; suggestionIndex < nbSuggestions; suggestionIndex++) {
-                    TextView textView = (TextView) viewGroup.getChildAt(totalNbSuggestions);
+                    TextView textView = (TextView) mSuggestionViewGroup.getChildAt(
+                            totalNbSuggestions);
                     textView.setText(suggestions[suggestionIndex]);
                     SuggestionInfo suggestionInfo = (SuggestionInfo) textView.getTag();
                     suggestionInfo.spanStart = spanStart;
@@ -8833,7 +8885,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
 
             if (totalNbSuggestions == 0) {
                 // TODO Replace by final text, use a dedicated layout, add a fade out timer...
-                TextView textView = (TextView) viewGroup.getChildAt(0);
+                TextView textView = (TextView) mSuggestionViewGroup.getChildAt(0);
                 textView.setText("No suggestions available");
                 SuggestionInfo suggestionInfo = (SuggestionInfo) textView.getTag();
                 suggestionInfo.spanStart = NO_SUGGESTIONS;
@@ -8844,17 +8896,24 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                         Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
 
                 for (int i = 0; i < totalNbSuggestions; i++) {
-                    final TextView textView = (TextView) viewGroup.getChildAt(i);
+                    final TextView textView = (TextView) mSuggestionViewGroup.getChildAt(i);
                     highlightTextDifferences(textView, spanUnionStart, spanUnionEnd);
                 }
             }
 
-            for (int i = 0; i < MAX_NUMBER_SUGGESTIONS; i++) {
-                viewGroup.getChildAt(i).setVisibility(i < totalNbSuggestions ? VISIBLE : GONE);
+            for (int i = 0; i < totalNbSuggestions; i++) {
+                mSuggestionViewGroup.getChildAt(i).setVisibility(VISIBLE);
+            }
+            for (int i = totalNbSuggestions; i < MAX_NUMBER_SUGGESTIONS; i++) {
+                mSuggestionViewGroup.getChildAt(i).setVisibility(GONE);
             }
 
-            final int size = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
-            viewGroup.measure(size, size);
+            final DisplayMetrics displayMetrics = mContext.getResources().getDisplayMetrics();
+            final int screenWidth = displayMetrics.widthPixels;
+            final int screenHeight = displayMetrics.heightPixels;
+            mSuggestionViewGroup.measure(
+                    View.MeasureSpec.makeMeasureSpec(screenWidth, View.MeasureSpec.AT_MOST),
+                    View.MeasureSpec.makeMeasureSpec(screenHeight, View.MeasureSpec.AT_MOST));
 
             positionAtCursor();
         }
@@ -9015,6 +9074,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
             mContainer.dismiss();
         }
 
+        public boolean isShowing() {
+            return mContainer.isShowing();
+        }
+
         @Override
         public void onClick(View view) {
             if (view instanceof TextView) {
@@ -9103,23 +9166,12 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
 
             // Vertical clipping
             if (coords[1] + height > screenHeight) {
-                // Try to position above current line instead
-                // TODO use top layout instead, reverse suggestion order,
-                // try full screen vertical down if it still does not fit. TBD with designers.
-
-                // Update dimensions from new view
-                contentView = mContainer.getContentView();
-                width = contentView.getMeasuredWidth();
-                height = contentView.getMeasuredHeight();
-
-                final int lineTop = mLayout.getLineTop(line);
-                final int lineHeight = lineBottom - lineTop;
-                coords[1] -= height + lineHeight;
+                coords[1] = screenHeight - height;
             }
 
             // Horizontal clipping
-            coords[0] = Math.max(0, coords[0]);
             coords[0] = Math.min(displayMetrics.widthPixels - width, coords[0]);
+            coords[0] = Math.max(0, coords[0]);
 
             mContainer.showAtLocation(TextView.this, Gravity.NO_GRAVITY, coords[0], coords[1]);
         }
@@ -9141,6 +9193,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
         }
     }
 
+    boolean areSuggestionsShown() {
+        return mSuggestionsPopupWindow != null && mSuggestionsPopupWindow.isShowing();
+    } 
+
     /**
      * Some parts of the text can have alternate suggestion text attached. This is typically done by
      * the IME by adding {@link SuggestionSpan}s to the text.
@@ -9174,16 +9230,17 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
      * Paste actions, depending on what this View supports.
      *
      * A custom implementation can add new entries in the default menu in its
-     * {@link ActionMode.Callback#onPrepareActionMode(ActionMode, Menu)} method. The default actions
-     * can also be removed from the menu using {@link Menu#removeItem(int)} and passing
-     * {@link android.R.id#selectAll}, {@link android.R.id#cut}, {@link android.R.id#copy} or
-     * {@link android.R.id#paste} ids as parameters.
+     * {@link android.view.ActionMode.Callback#onPrepareActionMode(ActionMode, Menu)} method. The
+     * default actions can also be removed from the menu using {@link Menu#removeItem(int)} and
+     * passing {@link android.R.id#selectAll}, {@link android.R.id#cut}, {@link android.R.id#copy}
+     * or {@link android.R.id#paste} ids as parameters.
      *
-     * Returning false from {@link ActionMode.Callback#onCreateActionMode(ActionMode, Menu)} will
-     * prevent the action mode from being started.
+     * Returning false from 
+     * {@link android.view.ActionMode.Callback#onCreateActionMode(ActionMode, Menu)} will prevent
+     * the action mode from being started.
      *
      * Action click events should be handled by the custom implementation of
-     * {@link ActionMode.Callback#onActionItemClicked(ActionMode, MenuItem)}.
+     * {@link android.view.ActionMode.Callback#onActionItemClicked(ActionMode, MenuItem)}.
      *
      * Note that text selection mode is not started when a TextView receives focus and the
      * {@link android.R.attr#selectAllOnFocus} flag has been set. The content is highlighted in
@@ -9739,9 +9796,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                         mLastParentX = mTempCoords[0];
                         mLastParentY = mTempCoords[1];
                     }
-                }
 
-                onHandleMoved();
+                    onHandleMoved();
+                }
 
                 if (isPositionVisible()) {
                     mContainer.update(mContainerPositionX, mContainerPositionY,
@@ -10184,7 +10241,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
 
                     mPreviousTapPositionX = x;
                     mPreviousTapPositionY = y;
-
                     break;
 
                 case MotionEvent.ACTION_POINTER_DOWN:
@@ -10500,6 +10556,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                 mTextDir = TextDirectionHeuristics.RTL;
                 break;
         }
+
     }
 
     /**
@@ -10511,7 +10568,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
      */
     protected void resolveDrawables() {
         // No need to resolve twice
-        if (bResolvedDrawables) {
+        if (mResolvedDrawables) {
             return;
         }
         // No drawable to resolve
@@ -10520,7 +10577,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
         }
         // No relative drawable to resolve
         if (mDrawables.mDrawableStart == null && mDrawables.mDrawableEnd == null) {
-            bResolvedDrawables = true;
+            mResolvedDrawables = true;
             return;
         }
 
@@ -10557,11 +10614,11 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                 }
                 break;
         }
-        bResolvedDrawables = true;
+        mResolvedDrawables = true;
     }
 
     protected void resetResolvedDrawables() {
-        bResolvedDrawables = false;
+        mResolvedDrawables = false;
     }
 
     @ViewDebug.ExportedProperty(category = "text")
index f0a9441..95f1f98 100644 (file)
@@ -76,7 +76,9 @@ public class ActionBarImpl extends ActionBar {
     private TabImpl mSelectedTab;
     private int mSavedTabPosition = INVALID_POSITION;
     
-    private ActionMode mActionMode;
+    ActionModeImpl mActionMode;
+    ActionMode mDeferredDestroyActionMode;
+    ActionMode.Callback mDeferredModeDestroyCallback;
     
     private boolean mLastMenuVisibility;
     private ArrayList<OnMenuVisibilityListener> mMenuVisibilityListeners =
@@ -104,10 +106,12 @@ public class ActionBarImpl extends ActionBar {
         public void onAnimationEnd(Animator animation) {
             if (mContentView != null) {
                 mContentView.setTranslationY(0);
+                mContainerView.setTranslationY(0);
             }
             mContainerView.setVisibility(View.GONE);
             mContainerView.setTransitioning(false);
             mCurrentShowAnim = null;
+            completeDeferredDestroyActionMode();
         }
     };
 
@@ -207,6 +211,14 @@ public class ActionBarImpl extends ActionBar {
         mTabScrollView = tabScroller;
     }
 
+    void completeDeferredDestroyActionMode() {
+        if (mDeferredModeDestroyCallback != null) {
+            mDeferredModeDestroyCallback.onDestroyActionMode(mDeferredDestroyActionMode);
+            mDeferredDestroyActionMode = null;
+            mDeferredModeDestroyCallback = null;
+        }
+    }
+
     /**
      * Enables or disables animation between show/hide states.
      * If animation is disabled using this method, animations in progress
@@ -357,14 +369,16 @@ public class ActionBarImpl extends ActionBar {
     }
 
     public ActionMode startActionMode(ActionMode.Callback callback) {
+        boolean wasHidden = false;
         if (mActionMode != null) {
+            wasHidden = mWasHiddenBeforeMode;
             mActionMode.finish();
         }
 
         mContextView.killMode();
         ActionModeImpl mode = new ActionModeImpl(callback);
         if (mode.dispatchOnCreate()) {
-            mWasHiddenBeforeMode = !isShowing();
+            mWasHiddenBeforeMode = !isShowing() || wasHidden;
             mode.invalidate();
             mContextView.initForMode(mode);
             animateToMode(true);
@@ -577,7 +591,9 @@ public class ActionBarImpl extends ActionBar {
     }
 
     void animateToMode(boolean toActionMode) {
-        show(false);
+        if (toActionMode) {
+            show(false);
+        }
         if (mCurrentModeAnim != null) {
             mCurrentModeAnim.end();
         }
@@ -621,7 +637,16 @@ public class ActionBarImpl extends ActionBar {
                 return;
             }
 
-            mCallback.onDestroyActionMode(this);
+            // If we were hidden before the mode was shown, defer the onDestroy
+            // callback until the animation is finished and associated relayout
+            // is about to happen. This lets apps better anticipate visibility
+            // and layout behavior.
+            if (mWasHiddenBeforeMode) {
+                mDeferredDestroyActionMode = this;
+                mDeferredModeDestroyCallback = mCallback;
+            } else {
+                mCallback.onDestroyActionMode(this);
+            }
             mCallback = null;
             animateToMode(false);
 
index 8d6caa1..2061c90 100644 (file)
@@ -438,7 +438,7 @@ public class AlertController {
             LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
                     LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
             
-            topPanel.addView(mCustomTitleView, lp);
+            topPanel.addView(mCustomTitleView, 0, lp);
             
             // Hide the title template
             View titleTemplate = mWindow.findViewById(R.id.title_template);
index a9e5057..07430e7 100644 (file)
@@ -27,7 +27,7 @@ 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 setIcon(String slot, String iconPackage, int iconId, int iconLevel, String contentDescription);
     void setIconVisibility(String slot, boolean visible);
     void removeIcon(String slot);
     void topAppWindowChanged(boolean menuVisible);
index ae2cac2..3333c82 100644 (file)
@@ -19,42 +19,35 @@ 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;
+    public CharSequence contentDescription;
 
-    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) {
+    public StatusBarIcon(String iconPackage, int iconId, int iconLevel, int number,
+            CharSequence contentDescription) {
         this.iconPackage = iconPackage;
         this.iconId = iconId;
         this.iconLevel = iconLevel;
         this.number = number;
+        this.contentDescription = contentDescription;
     }
 
+    @Override
     public String toString() {
         return "StatusBarIcon(pkg=" + this.iconPackage + " id=0x" + Integer.toHexString(this.iconId)
                 + " level=" + this.iconLevel + " visible=" + visible
                 + " num=" + this.number + " )";
     }
 
+    @Override
     public StatusBarIcon clone() {
-        StatusBarIcon that = new StatusBarIcon(this.iconPackage, this.iconId, this.iconLevel);
+        StatusBarIcon that = new StatusBarIcon(this.iconPackage, this.iconId, this.iconLevel,
+                this.number, this.contentDescription);
         that.visible = this.visible;
-        that.number = this.number;
         return that;
     }
 
@@ -71,6 +64,7 @@ public class StatusBarIcon implements Parcelable {
         this.iconLevel = in.readInt();
         this.visible = in.readInt() != 0;
         this.number = in.readInt();
+        this.contentDescription = in.readCharSequence();
     }
 
     public void writeToParcel(Parcel out, int flags) {
@@ -79,6 +73,7 @@ public class StatusBarIcon implements Parcelable {
         out.writeInt(this.iconLevel);
         out.writeInt(this.visible ? 1 : 0);
         out.writeInt(this.number);
+        out.writeCharSequence(this.contentDescription);
     }
 
     public int describeContents() {
diff --git a/core/java/com/android/internal/textservice/ISpellCheckerService.aidl b/core/java/com/android/internal/textservice/ISpellCheckerService.aidl
new file mode 100644 (file)
index 0000000..ff00492
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.textservice;
+
+import com.android.internal.textservice.ISpellCheckerSession;
+import com.android.internal.textservice.ISpellCheckerSessionListener;
+
+/**
+ * Public interface to the global spell checker.
+ * @hide
+ */
+interface ISpellCheckerService {
+    ISpellCheckerSession getISpellCheckerSession(
+            String locale, ISpellCheckerSessionListener listener);
+}
diff --git a/core/java/com/android/internal/textservice/ISpellCheckerSession.aidl b/core/java/com/android/internal/textservice/ISpellCheckerSession.aidl
new file mode 100644 (file)
index 0000000..79e4351
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.textservice;
+
+import android.view.textservice.TextInfo;
+
+/**
+ * @hide
+ */
+oneway interface ISpellCheckerSession {
+    void getSuggestionsMultiple(
+            in TextInfo[] textInfos, int suggestionsLimit, boolean multipleWords);
+    void cancel();
+}
diff --git a/core/java/com/android/internal/textservice/ISpellCheckerSessionListener.aidl b/core/java/com/android/internal/textservice/ISpellCheckerSessionListener.aidl
new file mode 100644 (file)
index 0000000..796b06e
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.textservice;
+
+import android.view.textservice.SuggestionsInfo;
+
+/**
+ * @hide
+ */
+oneway interface ISpellCheckerSessionListener {
+    void onGetSuggestions(in SuggestionsInfo[] results);
+}
diff --git a/core/java/com/android/internal/textservice/ITextServicesManager.aidl b/core/java/com/android/internal/textservice/ITextServicesManager.aidl
new file mode 100644 (file)
index 0000000..ad0c1ff
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.textservice;
+
+import com.android.internal.textservice.ISpellCheckerSessionListener;
+import com.android.internal.textservice.ITextServicesSessionListener;
+
+import android.content.ComponentName;
+import android.view.textservice.SpellCheckerInfo;
+
+/**
+ * Interface to the text service manager.
+ * @hide
+ */
+interface ITextServicesManager {
+    SpellCheckerInfo getCurrentSpellChecker(String locale);
+    oneway void getSpellCheckerService(in SpellCheckerInfo info, in String locale,
+            in ITextServicesSessionListener tsListener,
+            in ISpellCheckerSessionListener scListener);
+    oneway void finishSpellCheckerService(in ISpellCheckerSessionListener listener);
+}
diff --git a/core/java/com/android/internal/textservice/ITextServicesSessionListener.aidl b/core/java/com/android/internal/textservice/ITextServicesSessionListener.aidl
new file mode 100644 (file)
index 0000000..ecb6cd0
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.textservice;
+
+import com.android.internal.textservice.ISpellCheckerSession;
+
+import android.view.textservice.SpellCheckerInfo;
+
+/**
+ * Interface to the text service session.
+ * @hide
+ */
+interface ITextServicesSessionListener {
+    oneway void onServiceConnected(in ISpellCheckerSession spellCheckerSession);
+}
index 80f68ac..06f753f 100644 (file)
@@ -48,6 +48,7 @@ public class ActionMenuPresenter extends BaseMenuPresenter {
     private boolean mMaxItemsSet;
     private boolean mStrictWidthLimit;
     private boolean mWidthLimitSet;
+    private boolean mExpandedActionViewsExclusive;
 
     private int mMinCellSize;
 
@@ -124,6 +125,10 @@ public class ActionMenuPresenter extends BaseMenuPresenter {
         mMaxItemsSet = true;
     }
 
+    public void setExpandedActionViewsExclusive(boolean isExclusive) {
+        mExpandedActionViewsExclusive = isExclusive;
+    }
+
     @Override
     public MenuView getMenuView(ViewGroup root) {
         MenuView result = super.getMenuView(root);
@@ -326,6 +331,11 @@ public class ActionMenuPresenter extends BaseMenuPresenter {
             } else {
                 hasOverflow = true;
             }
+            if (mExpandedActionViewsExclusive && item.isActionViewExpanded()) {
+                // Overflow everything if we have an expanded action view and we're
+                // space constrained.
+                maxActions = 0;
+            }
         }
 
         // Reserve a spot for the overflow item if needed.
index 164d581..159b3da 100644 (file)
@@ -50,6 +50,8 @@ public class MenuBuilder implements Menu {
     private static final String LOGTAG = "MenuBuilder";
 
     private static final String PRESENTER_KEY = "android:menu:presenters";
+    private static final String ACTION_VIEW_STATES_KEY = "android:menu:actionviewstates";
+    private static final String EXPANDED_ACTION_VIEW_ID = "android:menu:expandedactionview";
 
     private static final int[]  sCategoryToOrder = new int[] {
         1, /* No category */
@@ -308,6 +310,67 @@ public class MenuBuilder implements Menu {
         dispatchRestoreInstanceState(state);
     }
 
+    public void saveActionViewStates(Bundle outStates) {
+        SparseArray<Parcelable> viewStates = null;
+
+        final int itemCount = size();
+        for (int i = 0; i < itemCount; i++) {
+            final MenuItem item = getItem(i);
+            final View v = item.getActionView();
+            if (v != null && v.getId() != View.NO_ID) {
+                if (viewStates == null) {
+                    viewStates = new SparseArray<Parcelable>();
+                }
+                v.saveHierarchyState(viewStates);
+                if (item.isActionViewExpanded()) {
+                    outStates.putInt(EXPANDED_ACTION_VIEW_ID, item.getItemId());
+                }
+            }
+            if (item.hasSubMenu()) {
+                final SubMenuBuilder subMenu = (SubMenuBuilder) item.getSubMenu();
+                subMenu.saveActionViewStates(outStates);
+            }
+        }
+
+        if (viewStates != null) {
+            outStates.putSparseParcelableArray(getActionViewStatesKey(), viewStates);
+        }
+    }
+
+    public void restoreActionViewStates(Bundle states) {
+        if (states == null) {
+            return;
+        }
+
+        SparseArray<Parcelable> viewStates = states.getSparseParcelableArray(
+                getActionViewStatesKey());
+
+        final int itemCount = size();
+        for (int i = 0; i < itemCount; i++) {
+            final MenuItem item = getItem(i);
+            final View v = item.getActionView();
+            if (v != null && v.getId() != View.NO_ID) {
+                v.restoreHierarchyState(viewStates);
+            }
+            if (item.hasSubMenu()) {
+                final SubMenuBuilder subMenu = (SubMenuBuilder) item.getSubMenu();
+                subMenu.restoreActionViewStates(states);
+            }
+        }
+
+        final int expandedId = states.getInt(EXPANDED_ACTION_VIEW_ID);
+        if (expandedId > 0) {
+            MenuItem itemToExpand = findItem(expandedId);
+            if (itemToExpand != null) {
+                itemToExpand.expandActionView();
+            }
+        }
+    }
+
+    protected String getActionViewStatesKey() {
+        return ACTION_VIEW_STATES_KEY;
+    }
+
     public void setCallback(Callback cb) {
         mCallback = cb;
     }
index 541d101..b0a002d 100644 (file)
@@ -553,6 +553,9 @@ public final class MenuItemImpl implements MenuItem {
     public MenuItem setActionView(View view) {
         mActionView = view;
         mActionProvider = null;
+        if (view != null && view.getId() == View.NO_ID && mId > 0) {
+            view.setId(mId);
+        }
         mMenu.onItemActionRequestChanged(this);
         return this;
     }
index fb1cd5e..92acf8c 100644 (file)
@@ -121,4 +121,13 @@ public class SubMenuBuilder extends MenuBuilder implements SubMenu {
     public boolean collapseItemActionView(MenuItemImpl item) {
         return mParentMenu.collapseItemActionView(item);
     }
+
+    @Override
+    public String getActionViewStatesKey() {
+        final int itemId = mItem != null ? mItem.getItemId() : 0;
+        if (itemId == 0) {
+            return null;
+        }
+        return super.getActionViewStatesKey() + ":" + itemId;
+    }
 }
index 678751c..8b74f3d 100644 (file)
@@ -42,6 +42,7 @@ import android.text.TextUtils;
 import android.util.AttributeSet;
 import android.util.DisplayMetrics;
 import android.util.Log;
+import android.view.CollapsibleActionView;
 import android.view.Gravity;
 import android.view.LayoutInflater;
 import android.view.Menu;
@@ -345,11 +346,15 @@ public class ActionBarView extends AbsActionBarView {
         final LayoutParams layoutParams = new LayoutParams(LayoutParams.WRAP_CONTENT,
                 LayoutParams.MATCH_PARENT);
         if (!mSplitActionBar) {
+            mActionMenuPresenter.setExpandedActionViewsExclusive(
+                    getResources().getBoolean(
+                    com.android.internal.R.bool.action_bar_expanded_action_views_exclusive));
             builder.addMenuPresenter(mActionMenuPresenter);
             builder.addMenuPresenter(mExpandedMenuPresenter);
             menuView = (ActionMenuView) mActionMenuPresenter.getMenuView(this);
             addView(menuView, layoutParams);
         } else {
+            mActionMenuPresenter.setExpandedActionViewsExclusive(false);
             // Allow full screen width in split mode.
             mActionMenuPresenter.setWidthLimit(
                     getContext().getResources().getDisplayMetrics().widthPixels, true);
@@ -1300,6 +1305,10 @@ public class ActionBarView extends AbsActionBarView {
             if (mCustomNavView != null) mCustomNavView.setVisibility(GONE);
             requestLayout();
             item.setActionViewExpanded(true);
+
+            if (mExpandedActionView instanceof CollapsibleActionView) {
+                ((CollapsibleActionView) mExpandedActionView).onActionViewExpanded();
+            }
             return true;
         }
 
@@ -1326,11 +1335,16 @@ public class ActionBarView extends AbsActionBarView {
             if (mCustomNavView != null && (mDisplayOptions & ActionBar.DISPLAY_SHOW_CUSTOM) != 0) {
                 mCustomNavView.setVisibility(VISIBLE);
             }
+            View collapsedView = mExpandedActionView;
             mExpandedActionView = null;
             mExpandedHomeLayout.setIcon(null);
             mCurrentExpandedItem = null;
             requestLayout();
             item.setActionViewExpanded(false);
+
+            if (collapsedView instanceof CollapsibleActionView) {
+                ((CollapsibleActionView) collapsedView).onActionViewCollapsed();
+            }
             return true;
         }
 
index c446cfb..59bef92 100644 (file)
@@ -18,8 +18,8 @@ package com.android.server;
 
 import android.os.SystemProperties;
 import android.util.Log;
-
 import dalvik.system.SocketTagger;
+import libcore.io.IoUtils;
 
 import java.io.FileDescriptor;
 import java.io.FileOutputStream;
@@ -28,8 +28,6 @@ import java.math.BigInteger;
 import java.net.SocketException;
 import java.nio.charset.Charsets;
 
-import libcore.io.IoUtils;
-
 /**
  * Assigns tags to sockets for traffic stats.
  */
@@ -59,6 +57,10 @@ public final class NetworkManagementSocketTagger extends SocketTagger {
         threadSocketTags.get().statsTag = tag;
     }
 
+    public static int getThreadSocketStatsTag() {
+        return threadSocketTags.get().statsTag;
+    }
+
     public static void setThreadSocketStatsUid(int uid) {
         threadSocketTags.get().statsUid = uid;
     }
index 50d9ca1..9be3779 100644 (file)
@@ -127,7 +127,7 @@ static void recorderCallback(int event, void* user, void *info) {
 static int
 android_media_AudioRecord_setup(JNIEnv *env, jobject thiz, jobject weak_this,
         jint source, jint sampleRateInHertz, jint channels,
-        jint audioFormat, jint buffSizeInBytes)
+        jint audioFormat, jint buffSizeInBytes, jintArray jSession)
 {
     //LOGV(">> Entering android_media_AudioRecord_setup");
     //LOGV("sampleRate=%d, audioFormat=%d, channels=%x, buffSizeInBytes=%d",
@@ -162,6 +162,20 @@ android_media_AudioRecord_setup(JNIEnv *env, jobject thiz, jobject weak_this,
         return AUDIORECORD_ERROR_SETUP_INVALIDSOURCE;
     }
 
+    if (jSession == NULL) {
+        LOGE("Error creating AudioRecord: invalid session ID pointer");
+        return AUDIORECORD_ERROR;
+    }
+
+    jint* nSession = (jint *) env->GetPrimitiveArrayCritical(jSession, NULL);
+    if (nSession == NULL) {
+        LOGE("Error creating AudioRecord: Error retrieving session id pointer");
+        return AUDIORECORD_ERROR;
+    }
+    int sessionId = nSession[0];
+    env->ReleasePrimitiveArrayCritical(jSession, nSession, 0);
+    nSession = NULL;
+
     audiorecord_callback_cookie *lpCallbackData = NULL;
     AudioRecord* lpRecorder = NULL;
 
@@ -193,13 +207,24 @@ android_media_AudioRecord_setup(JNIEnv *env, jobject thiz, jobject weak_this,
         recorderCallback,// callback_t
         lpCallbackData,// void* user
         0,             // notificationFrames,
-        true);         // threadCanCallJava)
+        true,          // threadCanCallJava)
+        sessionId);
 
     if(lpRecorder->initCheck() != NO_ERROR) {
         LOGE("Error creating AudioRecord instance: initialization check failed.");
         goto native_init_failure;
     }
 
+    nSession = (jint *) env->GetPrimitiveArrayCritical(jSession, NULL);
+    if (nSession == NULL) {
+        LOGE("Error creating AudioRecord: Error retrieving session id pointer");
+        goto native_init_failure;
+    }
+    // read the audio session ID back from AudioTrack in case a new session was created during set()
+    nSession[0] = lpRecorder->getSessionId();
+    env->ReleasePrimitiveArrayCritical(jSession, nSession, 0);
+    nSession = NULL;
+
     // save our newly created C++ AudioRecord in the "nativeRecorderInJavaObj" field 
     // of the Java object
     env->SetIntField(thiz, javaAudioRecordFields.nativeRecorderInJavaObj, (int)lpRecorder);
@@ -485,7 +510,7 @@ static JNINativeMethod gMethods[] = {
     // name,               signature,  funcPtr
     {"native_start",         "()I",    (void *)android_media_AudioRecord_start},
     {"native_stop",          "()V",    (void *)android_media_AudioRecord_stop},
-    {"native_setup",         "(Ljava/lang/Object;IIIII)I",
+    {"native_setup",         "(Ljava/lang/Object;IIIII[I)I",
                                        (void *)android_media_AudioRecord_setup},
     {"native_finalize",      "()V",    (void *)android_media_AudioRecord_finalize},
     {"native_release",       "()V",    (void *)android_media_AudioRecord_release},
index e930c5c..0c81634 100644 (file)
@@ -315,26 +315,56 @@ static jboolean android_net_wifi_stopDriverCommand(JNIEnv* env, jobject)
     return doBooleanCommand("OK", "DRIVER STOP");
 }
 
-static jboolean android_net_wifi_startPacketFiltering(JNIEnv* env, jobject)
+/*
+    Multicast filtering rules work as follows:
+
+    The driver can filter multicast (v4 and/or v6) and broadcast packets when in
+    a power optimized mode (typically when screen goes off).
+
+    In order to prevent the driver from filtering the multicast/broadcast packets, we have to
+    add a DRIVER RXFILTER-ADD rule followed by DRIVER RXFILTER-START to make the rule effective
+
+    DRIVER RXFILTER-ADD Num
+        where Num = 0 - Unicast, 1 - Broadcast, 2 - Mutil4 or 3 - Multi6
+
+    and DRIVER RXFILTER-START
+
+    In order to stop the usage of these rules, we do
+
+    DRIVER RXFILTER-STOP
+    DRIVER RXFILTER-REMOVE Num
+        where Num is as described for RXFILTER-ADD
+
+    The  SETSUSPENDOPT driver command overrides the filtering rules
+*/
+
+static jboolean android_net_wifi_startMultiV4Filtering(JNIEnv* env, jobject)
 {
-    return doBooleanCommand("OK", "DRIVER RXFILTER-ADD 0")
-            && doBooleanCommand("OK", "DRIVER RXFILTER-ADD 1")
-            && doBooleanCommand("OK", "DRIVER RXFILTER-ADD 3")
+    return doBooleanCommand("OK", "DRIVER RXFILTER-STOP")
+            && doBooleanCommand("OK", "DRIVER RXFILTER-REMOVE 2")
             && doBooleanCommand("OK", "DRIVER RXFILTER-START");
 }
 
-static jboolean android_net_wifi_stopPacketFiltering(JNIEnv* env, jobject)
+static jboolean android_net_wifi_stopMultiV4Filtering(JNIEnv* env, jobject)
 {
-    jboolean result = doBooleanCommand("OK", "DRIVER RXFILTER-STOP");
-    if (result) {
-        (void)doBooleanCommand("OK", "DRIVER RXFILTER-REMOVE 3");
-        (void)doBooleanCommand("OK", "DRIVER RXFILTER-REMOVE 1");
-        (void)doBooleanCommand("OK", "DRIVER RXFILTER-REMOVE 0");
-    }
+    return doBooleanCommand("OK", "DRIVER RXFILTER-ADD 2")
+            && doBooleanCommand("OK", "DRIVER RXFILTER-START");
+}
 
-    return result;
+static jboolean android_net_wifi_startMultiV6Filtering(JNIEnv* env, jobject)
+{
+    return doBooleanCommand("OK", "DRIVER RXFILTER-STOP")
+            && doBooleanCommand("OK", "DRIVER RXFILTER-REMOVE 3")
+            && doBooleanCommand("OK", "DRIVER RXFILTER-START");
 }
 
+static jboolean android_net_wifi_stopMultiV6Filtering(JNIEnv* env, jobject)
+{
+    return doBooleanCommand("OK", "DRIVER RXFILTER-ADD 3")
+        && doBooleanCommand("OK", "DRIVER RXFILTER-START");
+}
+
+
 static jint android_net_wifi_getRssiHelper(const char *cmd)
 {
     char reply[BUF_SIZE];
@@ -545,8 +575,10 @@ static JNINativeMethod gWifiMethods[] = {
     { "setScanModeCommand", "(Z)Z", (void*) android_net_wifi_setScanModeCommand },
     { "startDriverCommand", "()Z", (void*) android_net_wifi_startDriverCommand },
     { "stopDriverCommand", "()Z", (void*) android_net_wifi_stopDriverCommand },
-    { "startPacketFiltering", "()Z", (void*) android_net_wifi_startPacketFiltering },
-    { "stopPacketFiltering", "()Z", (void*) android_net_wifi_stopPacketFiltering },
+    { "startFilteringMulticastV4Packets", "()Z", (void*) android_net_wifi_startMultiV4Filtering},
+    { "stopFilteringMulticastV4Packets", "()Z", (void*) android_net_wifi_stopMultiV4Filtering},
+    { "startFilteringMulticastV6Packets", "()Z", (void*) android_net_wifi_startMultiV6Filtering},
+    { "stopFilteringMulticastV6Packets", "()Z", (void*) android_net_wifi_stopMultiV6Filtering},
     { "setPowerModeCommand", "(I)Z", (void*) android_net_wifi_setPowerModeCommand },
     { "getPowerModeCommand", "()I", (void*) android_net_wifi_getPowerModeCommand },
     { "setBandCommand", "(I)Z", (void*) android_net_wifi_setBandCommand},
index ffd0c1e..66d58cd 100644 (file)
@@ -80,6 +80,38 @@ static jlong android_os_SystemClock_currentThreadTimeMillis(JNIEnv* env,
 }
 
 /*
+ * native public static long currentThreadTimeMicro();
+ */
+static jlong android_os_SystemClock_currentThreadTimeMicro(JNIEnv* env,
+        jobject clazz)
+{
+#if defined(HAVE_POSIX_CLOCKS)
+    struct timespec tm;
+
+    clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tm);
+
+    return tm.tv_sec * 1000000LL + tm.tv_nsec / 1000;
+#else
+    struct timeval tv;
+
+    gettimeofday(&tv, NULL);
+    return tv.tv_sec * 1000000LL + tv.tv_nsec / 1000;
+#endif
+}
+
+/*
+ * native public static long currentTimeMicro();
+ */
+static jlong android_os_SystemClock_currentTimeMicro(JNIEnv* env,
+        jobject clazz)
+{
+    struct timeval tv;
+
+    gettimeofday(&tv, NULL);
+    return tv.tv_sec * 1000000LL + tv.tv_usec;
+}
+
+/*
  * JNI registration.
  */
 static JNINativeMethod gMethods[] = {
@@ -92,6 +124,10 @@ static JNINativeMethod gMethods[] = {
             (void*) android_os_SystemClock_elapsedRealtime },
     { "currentThreadTimeMillis",      "()J",
             (void*) android_os_SystemClock_currentThreadTimeMillis },
+    { "currentThreadTimeMicro",       "()J",
+            (void*) android_os_SystemClock_currentThreadTimeMicro },
+    { "currentTimeMicro",             "()J",
+            (void*) android_os_SystemClock_currentTimeMicro },
 };
 int register_android_os_SystemClock(JNIEnv* env)
 {
index b0c2f2c..b06de9d 100644 (file)
@@ -576,18 +576,18 @@ static void android_view_GLES20Canvas_drawTextRun(JNIEnv* env, jobject clazz,
 // ----------------------------------------------------------------------------
 
 static DisplayList* android_view_GLES20Canvas_getDisplayList(JNIEnv* env,
-        jobject clazz, DisplayListRenderer* renderer) {
-    return renderer->getDisplayList();
+        jobject clazz, DisplayListRenderer* renderer, DisplayList* displayList) {
+    return renderer->getDisplayList(displayList);
+}
+
+static OpenGLRenderer* android_view_GLES20Canvas_createDisplayListRenderer(JNIEnv* env,
+        jobject clazz) {
+    return new DisplayListRenderer;
 }
 
-static OpenGLRenderer* android_view_GLES20Canvas_getDisplayListRenderer(JNIEnv* env,
+static void android_view_GLES20Canvas_resetDisplayListRenderer(JNIEnv* env,
         jobject clazz, DisplayListRenderer* renderer) {
-    if (renderer == NULL) {
-        renderer = new DisplayListRenderer;
-    } else {
-        renderer->reset();
-    }
-    return renderer;
+    renderer->reset();
 }
 
 static void android_view_GLES20Canvas_destroyDisplayList(JNIEnv* env,
@@ -812,9 +812,10 @@ static JNINativeMethod gMethods[] = {
     { "nGetClipBounds",     "(ILandroid/graphics/Rect;)Z",
             (void*) android_view_GLES20Canvas_getClipBounds },
 
-    { "nGetDisplayList",         "(I)I",       (void*) android_view_GLES20Canvas_getDisplayList },
+    { "nGetDisplayList",         "(II)I",      (void*) android_view_GLES20Canvas_getDisplayList },
     { "nDestroyDisplayList",     "(I)V",       (void*) android_view_GLES20Canvas_destroyDisplayList },
-    { "nGetDisplayListRenderer", "(I)I",       (void*) android_view_GLES20Canvas_getDisplayListRenderer },
+    { "nCreateDisplayListRenderer", "()I",     (void*) android_view_GLES20Canvas_createDisplayListRenderer },
+    { "nResetDisplayListRenderer", "(I)V",     (void*) android_view_GLES20Canvas_resetDisplayListRenderer },
     { "nDrawDisplayList",        "(IIIILandroid/graphics/Rect;)Z",
                                                (void*) android_view_GLES20Canvas_drawDisplayList },
     { "nOutputDisplayList",      "(II)V",      (void*) android_view_GLES20Canvas_outputDisplayList },
index 0397dfa..91003d1 100644 (file)
         android:description="@string/permdesc_setAlarm"
         android:protectionLevel="normal" />
 
+   <!-- Allows an application to read/write the voicemails owned by its own
+        package. -->
+    <permission android:name="com.android.voicemail.permission.READ_WRITE_OWN_VOICEMAIL"
+        android:permissionGroup="android.permission-group.PERSONAL_INFO"
+        android:protectionLevel="dangerous"
+        android:label="@string/permlab_readWriteOwnVoicemail"
+        android:description="@string/permdesc_readWriteOwnVoicemail" />
+
     <!-- ======================================= -->
     <!-- Permissions for accessing location info -->
     <!-- ======================================= -->
         android:description="@string/permdesc_bindInputMethod"
         android:protectionLevel="signature" />
 
+    <!-- Must be required by a TextService (e.g. SpellCheckerService)
+         to ensure that only the system can bind to it. -->
+    <permission android:name="android.permission.BIND_TEXT_SERVICE"
+        android:label="@string/permlab_bindTextService"
+        android:description="@string/permdesc_bindTextService"
+        android:protectionLevel="signature" />
+
     <!-- Must be required by a {@link android.service.wallpaper.WallpaperService},
          to ensure that only the system can bind to it. -->
     <permission android:name="android.permission.BIND_WALLPAPER"
     <permission android:name="android.permission.READ_FRAME_BUFFER"
         android:label="@string/permlab_readFrameBuffer"
         android:description="@string/permdesc_readFrameBuffer"
-        android:protectionLevel="signature" />
+        android:protectionLevel="signatureOrSystem" />
 
     <!-- Required to be able to disable the device (very dangerous!). -->
     <permission android:name="android.permission.BRICK"
diff --git a/core/res/res/drawable-hdpi/text_edit_suggestions_top_window.9.png b/core/res/res/drawable-hdpi/text_edit_suggestions_top_window.9.png
deleted file mode 100644 (file)
index ff6b34a..0000000
Binary files a/core/res/res/drawable-hdpi/text_edit_suggestions_top_window.9.png and /dev/null differ
diff --git a/core/res/res/drawable-mdpi/text_edit_suggestions_top_window.9.png b/core/res/res/drawable-mdpi/text_edit_suggestions_top_window.9.png
deleted file mode 100644 (file)
index 41886eb..0000000
Binary files a/core/res/res/drawable-mdpi/text_edit_suggestions_top_window.9.png and /dev/null differ
index a5320a7..5b67d71 100644 (file)
@@ -46,7 +46,6 @@
                 android:layout_weight="1"
                 android:paddingTop="16dp"
                 android:paddingBottom="16dp"
-
                 android:drawSelectorOnTop="false"
                 android:cacheColorHint="@android:color/transparent"
                 android:listPreferredItemHeight="48dp"
index ef537d9..082c5ec 100644 (file)
@@ -22,6 +22,8 @@
           android:paddingTop="8dip"
           android:paddingBottom="8dip"
           android:layout_gravity="left|center_vertical"
+          android:singleLine="true"
+          android:ellipsize="marquee"
           android:textAppearance="?android:attr/textAppearanceMedium"
           android:textColor="@android:color/dim_foreground_light" />
 
@@ -18,6 +18,6 @@
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:orientation="vertical"
-    android:background="@android:drawable/text_edit_suggestions_top_window">
+    android:background="@android:drawable/text_edit_suggestions_window">
 
 </LinearLayout>
index ec2313c..388eb38 100644 (file)
@@ -25,8 +25,6 @@
     <dimen name="password_keyboard_key_height_numeric">60dip</dimen>
     <!-- Default correction for the space key in the password keyboard -->
     <dimen name="password_keyboard_spacebar_vertical_correction">2dip</dimen>
-    <dimen name="preference_screen_side_margin">16dp</dimen>
-    <dimen name="preference_screen_side_margin_negative">-20dp</dimen>
     <dimen name="preference_widget_width">72dp</dimen>
 
     <!-- Default height of an action bar. -->
index d73ff99..a453ac1 100644 (file)
@@ -17,4 +17,5 @@
 <resources>
     <bool name="preferences_prefer_dual_pane">true</bool>
     <bool name="show_ongoing_ime_switcher">false</bool>
+    <bool name="action_bar_expanded_action_views_exclusive">false</bool>
 </resources>
index 17bf561..553632b 100644 (file)
     <dimen name="keyguard_pattern_unlock_status_line_font_size">14sp</dimen>
 
     <!-- Preference activity, vertical padding for the header list -->
-    <dimen name="reference_screen_header_vertical_padding">16dp</dimen>
+    <dimen name="preference_screen_header_vertical_padding">16dp</dimen>
+
+    <!-- Reduce the margin when using dual pane -->
+    <!-- Preference activity side margins -->
+    <dimen name="preference_screen_side_margin">0dp</dimen>
+    <!-- Preference activity side margins negative-->
+    <dimen name="preference_screen_side_margin_negative">-4dp</dimen>
+
 </resources>
 
@@ -4,9 +4,9 @@
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
-  
+
           http://www.apache.org/licenses/LICENSE-2.0
-  
+
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      limitations under the License.
 -->
 
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="wrap_content"
-    android:layout_height="wrap_content"
-    android:orientation="vertical"
-    android:background="@android:drawable/text_edit_suggestions_bottom_window">
-
-</LinearLayout>
+<resources>
+    <!-- Increase size (used to be 0 for dual pane -->
+    <!-- Preference activity side margins -->
+    <dimen name="preference_screen_side_margin">48dp</dimen>
+    <!-- Preference activity side margins negative-->
+    <dimen name="preference_screen_side_margin_negative">-52dp</dimen>
+</resources>
index e67b3a9..28aea55 100644 (file)
@@ -18,6 +18,7 @@
 -->
 <resources>
     <dimen name="preference_screen_side_margin">96dp</dimen>
+    <!-- Compensate for double margin : preference_screen_side_margin + 4 (frame background shadow) = -preference_screen_side_margin_negative -->
     <dimen name="preference_screen_side_margin_negative">-100dp</dimen>
     <dimen name="preference_widget_width">64dp</dimen>
     <!-- Preference fragment padding, bottom -->
index d0361ca..7d7aea9 100755 (executable)
 
         <!-- Layout of a the view that is used to create the text suggestions popup window in an
              EditText. This window will be displayed below the text line. -->
-        <attr name="textEditSuggestionsBottomWindowLayout" format="reference" />
-        <!-- Same as textEditSuggestionsBottomWindowLayout, but used when the popup is displayed
-             above the current line of text instead of below. -->
-        <attr name="textEditSuggestionsTopWindowLayout" format="reference" />
+        <attr name="textEditSuggestionsWindowLayout" format="reference" />
         <!-- Layout of the TextView item that will populate the suggestion popup window. -->
         <attr name="textEditSuggestionItemLayout" format="reference" />
 
 
         <!-- Layout of a the view that is used to create the text suggestions popup window in an
              EditText. This window will be displayed below the text line. -->
-        <attr name="textEditSuggestionsBottomWindowLayout" />
-        <!-- Same as textEditSuggestionsBottomWindowLayout, but used when the popup is displayed
-             above the current line of text instead of below. -->
-        <attr name="textEditSuggestionsTopWindowLayout" />
+        <attr name="textEditSuggestionsWindowLayout" />
         <!-- Layout of the TextView item that will populate the suggestion popup window. -->
         <attr name="textEditSuggestionItemLayout" />
 
         <attr name="minWidth"/>
         <!-- Minimum height of the AppWidget. -->
         <attr name="minHeight"/>
+        <!-- Minimum width that the AppWidget can be resized to. -->
+        <attr name="minResizeWidth" format="dimension"/>
+        <!-- Minimum height that the AppWidget can be resized to. -->
+        <attr name="minResizeHeight" format="dimension"/>
         <!-- Update period in milliseconds, or 0 if the AppWidget will update itself. -->
         <attr name="updatePeriodMillis" format="integer" />
         <!-- A resource id of a layout. -->
index e51fc66..6e4db5e 100644 (file)
@@ -19,4 +19,5 @@
     <bool name="split_action_bar_is_narrow">true</bool>
     <bool name="preferences_prefer_dual_pane">false</bool>
     <bool name="show_ongoing_ime_switcher">true</bool>
+    <bool name="action_bar_expanded_action_views_exclusive">true</bool>
 </resources>
index 2ba4e66..0ed8076 100644 (file)
@@ -67,9 +67,9 @@
     <dimen name="multiwaveview_hit_radius">60dip</dimen>
 
     <!-- Preference activity side margins -->
-    <dimen name="preference_screen_side_margin">0dp</dimen>
+    <dimen name="preference_screen_side_margin">16dp</dimen>
     <!-- Preference activity side margins negative-->
-    <dimen name="preference_screen_side_margin_negative">0dp</dimen>
+    <dimen name="preference_screen_side_margin_negative">16dp</dimen>
     <!-- Preference activity top margin -->
     <dimen name="preference_screen_top_margin">0dp</dimen>
     <!-- Preference activity bottom margin -->
index f464623..b2b7025 100644 (file)
   <public type="attr" name="switchPreferenceStyle" />
 
   <public type="attr" name="textSuggestionsWindowStyle" />
-  <public type="attr" name="textEditSuggestionsBottomWindowLayout" />
-  <public type="attr" name="textEditSuggestionsTopWindowLayout" />
+  <public type="attr" name="textEditSuggestionsWindowLayout" />
   <public type="attr" name="textEditSuggestionItemLayout" />
 
-  <public type="attr" name="layoutDirection" />
-
   <public type="attr" name="suggestionsEnabled" />
 
   <public type="attr" name="rowCount" />
   <public type="attr" name="listPreferredItemHeightLarge" />
   <public type="attr" name="listPreferredItemHeightSmall" />
 
-  <public type="attr" name="paddingStart"/>
-  <public type="attr" name="paddingEnd"/>
-  <public type="attr" name="layout_marginStart"/>
-  <public type="attr" name="layout_marginEnd"/>
-
   <public type="attr" name="actionBarSplitStyle" />
 
-  <public type="attr" name="textDirection"/>
-
   <public type="attr" name="actionProviderClass" />
 
   <public type="attr" name="backgroundStacked" />
   <public type="color" name="holo_purple" />
   <public type="color" name="holo_blue_bright" />
 
+  <public type="attr" name="minResizeWidth" />
+  <public type="attr" name="minResizeHeight" />
 </resources>
index d0e3f14..feac38d 100755 (executable)
         interface of an input method. Should never be needed for normal applications.</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_bindTextService">bind to a text service</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_bindTextService">Allows the holder to bind to the top-level
+        interface of a text service(e.g. SpellCheckerService). Should never be needed for normal applications.</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_bindWallpaper">bind to a wallpaper</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_bindWallpaper">Allows the holder to bind to the top-level
       not implement this feature.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether
+        they want to allow the application to do this. [CHAR LIMIT=NONE] -->
+    <string name="permlab_readWriteOwnVoicemail">Access voicemails managed by this application</string>
+    <!-- Description of an application permission, listed so the user can choose whether
+        they want to allow the application to do this. [CHAR LIMIT=NONE] -->
+    <string name="permdesc_readWriteOwnVoicemail">Allows the application to store and retrieve only
+      voicemails that its associated service can access.</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_writeGeolocationPermissions">Modify Browser geolocation permissions</string>
     <!-- Description of an application permission, listed so the user can choose whether
         <item quantity="one">Open Wi-Fi network available</item>
         <item quantity="other">Open Wi-Fi networks available</item>
     </plurals>
+
+     <!-- A notification is shown the first time a wireless network is disabled due to bad connectivity.  This is the notification's title / ticker. -->
+    <string name="wifi_watchdog_network_disabled">A Wi-Fi network was disabled</string>
+    <!--  A notification is shown the first time a wireless network is disabled due to bad connectivity.  This is the notification's message which leads to the settings pane -->
+    <string name="wifi_watchdog_network_disabled_detailed">A Wi-Fi network was temporarily disabled due to bad connectivity.</string>
+
     <!-- Do not translate. Default access point SSID used for tethering -->
     <string name="wifi_tether_configure_ssid_default" translatable="false">AndroidAP</string>
 
     <!-- USB_STORAGE_ERROR dialog  ok button-->
     <string name="dlg_ok">OK</string>
 
-    <!-- USB_PREFERENCES: Notification for wehen the user connects the phone to a computer via USB in MTP mode.  This is the title -->
+    <!-- USB_PREFERENCES: Notification for when the user connects the phone to a computer via USB in MTP mode.  This is the title -->
     <string name="usb_mtp_notification_title">Connected as a media device</string>
-    <!-- USB_PREFERENCES: Notification for wehen the user connects the phone to a computer via USB in PTP mode.  This is the title -->
+    <!-- USB_PREFERENCES: Notification for when the user connects the phone to a computer via USB in PTP mode.  This is the title -->
     <string name="usb_ptp_notification_title">Connected as a camera</string>
-    <!-- USB_PREFERENCES: Notification for wehen the user connects the phone to a computer via USB in mass storage mode (for installer CD image).  This is the title -->
+    <!-- USB_PREFERENCES: Notification for when the user connects the phone to a computer via USB in mass storage mode (for installer CD image).  This is the title -->
     <string name="usb_cd_installer_notification_title">Connected as an installer</string>
+    <!-- USB_PREFERENCES: Notification for when a USB accessory is attached.  This is the title -->
+    <string name="usb_accessory_notification_title">Connected to a USB accessory</string>
     <!-- See USB_PREFERENCES. This is the message. -->
     <string name="usb_notification_message">Touch for other USB options</string>
 
     <!-- Title for a dialog showing possible activities for sharing in ShareActionProvider [CHAR LIMIT=25] -->
     <string name="share_action_provider_share_with">Share with...</string>
 
+    <!-- Status Bar icon descriptions -->
+
+    <!-- Description of for the status bar's icon that the device is locked for accessibility. [CHAR LIMIT=NONE] -->
+    <string name="status_bar_device_locked">Device locked.</string>
+
 </resources>
index d647467..9b6c442 100644 (file)
         <item name="android:textEditNoPasteWindowLayout">?android:attr/textEditNoPasteWindowLayout</item>
         <item name="android:textEditSidePasteWindowLayout">?android:attr/textEditSidePasteWindowLayout</item>
         <item name="android:textEditSideNoPasteWindowLayout">?android:attr/textEditSideNoPasteWindowLayout</item>
-        <item name="android:textEditSuggestionsBottomWindowLayout">?android:attr/textEditSuggestionsBottomWindowLayout</item>
-        <item name="android:textEditSuggestionsTopWindowLayout">?android:attr/textEditSuggestionsTopWindowLayout</item>
+        <item name="android:textEditSuggestionsWindowLayout">?android:attr/textEditSuggestionsWindowLayout</item>
         <item name="android:textEditSuggestionItemLayout">?android:attr/textEditSuggestionItemLayout</item>
         <item name="android:textCursorDrawable">?android:attr/textCursorDrawable</item>
     </style>
index 90f3602..93ccfe3 100644 (file)
         <item name="textEditSidePasteWindowLayout">@android:layout/text_edit_side_paste_window</item>
         <item name="textEditSideNoPasteWindowLayout">@android:layout/text_edit_side_no_paste_window</item>
         <item name="textSuggestionsWindowStyle">@android:style/Widget.TextSuggestions</item>
-        <item name="textEditSuggestionsBottomWindowLayout">@android:layout/text_edit_suggestions_bottom_window</item>
-        <item name="textEditSuggestionsTopWindowLayout">@android:layout/text_edit_suggestions_top_window</item>
+        <item name="textEditSuggestionsWindowLayout">@android:layout/text_edit_suggestions_window</item>
         <item name="textEditSuggestionItemLayout">@android:layout/text_edit_suggestion_item</item>
         <item name="textCursorDrawable">@null</item>
 
index cddc6c4..cdab638 100644 (file)
@@ -16,6 +16,8 @@
 
 package android.database;
 
+import android.test.MoreAsserts;
+
 import junit.framework.TestCase;
 
 import java.util.*;
@@ -33,6 +35,7 @@ public class MatrixCursorTest extends TestCase {
         cursor.moveToNext();
         assertTrue(cursor.isNull(0));
         assertNull(cursor.getString(0));
+        assertNull(cursor.getBlob(0));
         assertEquals(0, cursor.getShort(0));
         assertEquals(0, cursor.getInt(0));
         assertEquals(0L, cursor.getLong(0));
@@ -49,7 +52,8 @@ public class MatrixCursorTest extends TestCase {
                 .add(2)
                 .add(3)
                 .add(4)
-                .add(5);
+                .add(5)
+                .add(new byte[] {(byte) 0xaa, (byte) 0x55});
 
         cursor.moveToNext();
 
@@ -61,7 +65,8 @@ public class MatrixCursorTest extends TestCase {
                 .add("2")
                 .add("3")
                 .add("4")
-                .add("5");
+                .add("5")
+                .add(new byte[] {(byte) 0xaa, (byte) 0x55});
 
         cursor.moveToNext();
         checkValues(cursor);
@@ -73,7 +78,7 @@ public class MatrixCursorTest extends TestCase {
     public void testAddArray() {
         MatrixCursor cursor = newMatrixCursor();
 
-        cursor.addRow(new Object[] { "a", 1, 2, 3, 4, 5 });
+        cursor.addRow(new Object[] { "a", 1, 2, 3, 4, 5, new byte[] {(byte) 0xaa, (byte) 0x55} });
         cursor.moveToNext();
         checkValues(cursor);
 
@@ -86,7 +91,7 @@ public class MatrixCursorTest extends TestCase {
     public void testAddIterable() {
         MatrixCursor cursor = newMatrixCursor();
 
-        cursor.addRow(Arrays.asList("a", 1, 2, 3, 4, 5));
+        cursor.addRow(Arrays.asList("a", 1, 2, 3, 4, 5, new byte[] {(byte) 0xaa, (byte) 0x55}));
         cursor.moveToNext();
         checkValues(cursor);
 
@@ -96,7 +101,8 @@ public class MatrixCursorTest extends TestCase {
         } catch (IllegalArgumentException e) { /* expected */ }
 
         try {
-            cursor.addRow(Arrays.asList("a", 1, 2, 3, 4, 5, "Too many!"));
+            cursor.addRow(Arrays.asList("a", 1, 2, 3, 4, 5,
+                    new byte[] {(byte) 0xaa, (byte) 0x55}, "Too many!"));
             fail();
         } catch (IllegalArgumentException e) { /* expected */ }
     }
@@ -105,7 +111,7 @@ public class MatrixCursorTest extends TestCase {
         MatrixCursor cursor = newMatrixCursor();
 
         cursor.addRow(new NonIterableArrayList<Object>(
-                Arrays.asList("a", 1, 2, 3, 4, 5)));
+                Arrays.asList("a", 1, 2, 3, 4, 5, new byte[] {(byte) 0xaa, (byte) 0x55})));
         cursor.moveToNext();
         checkValues(cursor);
 
@@ -116,7 +122,8 @@ public class MatrixCursorTest extends TestCase {
 
         try {
             cursor.addRow(new NonIterableArrayList<Object>(
-                    Arrays.asList("a", 1, 2, 3, 4, 5, "Too many!")));
+                    Arrays.asList("a", 1, 2, 3, 4, 5,
+                    new byte[] {(byte) 0xaa, (byte) 0x55}, "Too many!")));
             fail();
         } catch (IllegalArgumentException e) { /* expected */ }
     }
@@ -137,7 +144,7 @@ public class MatrixCursorTest extends TestCase {
 
     private MatrixCursor newMatrixCursor() {
         return new MatrixCursor(new String[] {
-                "string", "short", "int", "long", "float", "double" });
+                "string", "short", "int", "long", "float", "double", "blob" });
     }
 
     private void checkValues(MatrixCursor cursor) {
@@ -147,6 +154,7 @@ public class MatrixCursorTest extends TestCase {
         assertEquals(3, cursor.getLong(3));
         assertEquals(4.0f, cursor.getFloat(4));
         assertEquals(5.0D, cursor.getDouble(5));
+        MoreAsserts.assertEquals(new byte[] {(byte) 0xaa, (byte) 0x55}, cursor.getBlob(6));
     }
 
 }
index 440aeb5..42b7640 100644 (file)
@@ -857,11 +857,32 @@ public final class JsonReaderTest extends TestCase {
         }
     }
 
+    public void testBomIgnoredAsFirstCharacterOfDocument() throws IOException {
+        JsonReader reader = new JsonReader(new StringReader("\ufeff[]"));
+        reader.beginArray();
+        reader.endArray();
+    }
+
+    public void testBomForbiddenAsOtherCharacterInDocument() throws IOException {
+        JsonReader reader = new JsonReader(new StringReader("[\ufeff]"));
+        reader.beginArray();
+        try {
+            reader.endArray();
+            fail();
+        } catch (IOException expected) {
+        }
+    }
+
     public void testFailWithPosition() throws IOException {
-        testFailWithPosition("Expected literal value at line 6 column   3",
+        testFailWithPosition("Expected literal value at line 6 column 3",
                 "[\n\n\n\n\n0,}]");
     }
 
+    public void testFailWithPositionIsOffsetByBom() throws IOException {
+        testFailWithPosition("Expected literal value at line 1 column 4",
+                "\ufeff[0,}]");
+    }
+
     public void testFailWithPositionGreaterThanBufferSize() throws IOException {
         String spaces = repeat(' ', 8192);
         testFailWithPosition("Expected literal value at line 6 column 3",
index aad3fe1..9519b9f 100644 (file)
@@ -39,6 +39,10 @@ public class PatternsTest extends TestCase {
         t = Patterns.TOP_LEVEL_DOMAIN.matcher("xn--0zwm56d").matches();
         assertTrue("Missed valid TLD", t);
 
+        // One of the new top level internationalized domain.
+        t = Patterns.TOP_LEVEL_DOMAIN.matcher("\uD55C\uAD6D").matches();
+        assertTrue("Missed valid TLD", t);
+
         t = Patterns.TOP_LEVEL_DOMAIN.matcher("mem").matches();
         assertFalse("Matched invalid TLD!", t);
 
@@ -80,6 +84,9 @@ public class PatternsTest extends TestCase {
         assertTrue("Valid URL", t);
         t = Patterns.WEB_URL.matcher("\uD604\uAE08\uC601\uC218\uC99D.kr").matches();
         assertTrue("Valid URL", t);
+        // URL with international TLD.
+        t = Patterns.WEB_URL.matcher("\uB3C4\uBA54\uC778.\uD55C\uAD6D").matches();
+        assertTrue("Valid URL", t);
 
         t = Patterns.WEB_URL.matcher("http://brainstormtech.blogs.fortune.cnn.com/2010/03/11/" +
             "top-five-moments-from-eric-schmidt\u2019s-talk-in-abu-dhabi/").matches();
diff --git a/data/fonts/DroidKufi-Bold.ttf b/data/fonts/DroidKufi-Bold.ttf
new file mode 100644 (file)
index 0000000..650919e
Binary files /dev/null and b/data/fonts/DroidKufi-Bold.ttf differ
diff --git a/data/fonts/DroidKufi-Regular.ttf b/data/fonts/DroidKufi-Regular.ttf
new file mode 100644 (file)
index 0000000..af85975
Binary files /dev/null and b/data/fonts/DroidKufi-Regular.ttf differ
diff --git a/data/fonts/DroidNaskh-Bold.ttf b/data/fonts/DroidNaskh-Bold.ttf
new file mode 100644 (file)
index 0000000..6b7d4f0
Binary files /dev/null and b/data/fonts/DroidNaskh-Bold.ttf differ
diff --git a/data/fonts/DroidNaskh-Regular.ttf b/data/fonts/DroidNaskh-Regular.ttf
new file mode 100644 (file)
index 0000000..d11e1ae
Binary files /dev/null and b/data/fonts/DroidNaskh-Regular.ttf differ
diff --git a/data/fonts/DroidSansArabic.ttf b/data/fonts/DroidSansArabic.ttf
deleted file mode 100644 (file)
index bdefaac..0000000
Binary files a/data/fonts/DroidSansArabic.ttf and /dev/null differ
index c0d9153..6ac615d 100644 (file)
 <familyset>
     <family>
         <fileset>
-            <file>DroidSansArabic.ttf</file>
+            <file>DroidNaskh-Regular.ttf</file>
+        </fileset>
+    </family>
+    <family>
+        <fileset>
+            <file>DroidSansEthiopic-Regular.ttf</file>
         </fileset>
     </family>
     <family>
index 57a1bab..9a590bb 100644 (file)
@@ -17,7 +17,8 @@
 PRODUCT_COPY_FILES := \
     frameworks/base/data/fonts/DroidSans.ttf:system/fonts/DroidSans.ttf \
     frameworks/base/data/fonts/DroidSans-Bold.ttf:system/fonts/DroidSans-Bold.ttf \
-    frameworks/base/data/fonts/DroidSansArabic.ttf:system/fonts/DroidSansArabic.ttf \
+    frameworks/base/data/fonts/DroidNaskh-Regular.ttf:system/fonts/DroidNaskh-Regular.ttf \
+    frameworks/base/data/fonts/DroidSansEthiopic-Regular.ttf:system/fonts/DroidSansEthiopic-Regular.ttf \
     frameworks/base/data/fonts/DroidSansHebrew-Regular.ttf:system/fonts/DroidSansHebrew-Regular.ttf \
     frameworks/base/data/fonts/DroidSansHebrew-Bold.ttf:system/fonts/DroidSansHebrew-Bold.ttf \
     frameworks/base/data/fonts/DroidSansThai.ttf:system/fonts/DroidSansThai.ttf \
index 5c18a83..7a0e17f 100644 (file)
@@ -82,20 +82,71 @@ API Level 1 and subsequent releases have incremented the API Level.</p>
 Android platform.</p>
 
 <table>
-  <tr><th>Platform Version</th><th>API Level</th></tr>
-  <tr><td>Android 3.1</td><td>12</td></tr>
-  <tr><td>Android 3.0</td><td>11</td></tr>
-  <tr><td>Android 2.3.4</td><td rowspan="2">10</td></tr>
-  <tr><td>Android 2.3.3</td></tr>
-  <tr><td>Android 2.3</td><td>9</td></tr>
-  <tr><td>Android 2.2</td><td>8</td></tr>
-  <tr><td>Android 2.1</td><td>7</td></tr>
-  <tr><td>Android 2.0.1</td><td>6</td></tr>
-  <tr><td>Android 2.0</td><td>5</td></tr>
-  <tr><td>Android 1.6</td><td>4</td></tr>
-  <tr><td>Android 1.5</td><td>3</td></tr>
-  <tr><td>Android 1.1</td><td>2</td></tr>
-  <tr><td>Android 1.0</td><td>1</td></tr>
+  <tr><th>Platform Version</th><th>API Level</th><th>VERSION_CODE</th><th>Notes</th></tr>
+  
+    <tr><td><a href="{@docRoot}sdk/android-3.2.html">Android 3.2</a></td>
+    <td><a href="{@docRoot}sdk/api_diff/13/changes.html" title="Diff Report">13</a></td>
+    <td>{@link android.os.Build.VERSION_CODES#HONEYCOMB_MR2}</td>
+    <td><!-- <a href="{@docRoot}sdk/android-3.2-highlights.html">Platform Highlights</a>--></td></tr>
+  
+  <tr><td><a href="{@docRoot}sdk/android-3.1.html">Android 3.1.x</a></td>
+    <td><a href="{@docRoot}sdk/api_diff/12/changes.html" title="Diff Report">12</a></td>
+    <td>{@link android.os.Build.VERSION_CODES#HONEYCOMB_MR1}</td>
+    <td><a href="{@docRoot}sdk/android-3.1-highlights.html">Platform Highlights</a></td></tr>
+    
+  <tr><td><a href="{@docRoot}sdk/android-3.0.html">Android 3.0.x</td>
+    <td><a href="{@docRoot}sdk/api_diff/11/changes.html" title="Diff Report">11</a></td>
+    <td>{@link android.os.Build.VERSION_CODES#HONEYCOMB}</td>
+    <td><a href="{@docRoot}sdk/android-3.0-highlights.html">Platform Highlights</a></td></tr>
+    
+  <tr><td><a href="{@docRoot}sdk/android-2.3.3.html">Android 2.3.4<br>Android 2.3.3</td>
+    <td><a href="{@docRoot}sdk/api_diff/10/changes.html" title="Diff Report">10</a></td>
+    <td>{@link android.os.Build.VERSION_CODES#GINGERBREAD_MR1}</td>
+    <td rowspan="2"><a href="{@docRoot}sdk/android-2.3-highlights.html">Platform Highlights</a></td></tr>
+  
+  <tr><td><a href="{@docRoot}sdk/android-2.3.html">Android 2.3.2<br>Android 2.3.1<br>Android 2.3</td>
+    <td><a href="{@docRoot}sdk/api_diff/9/changes.html" title="Diff Report">9</a></td>
+    <td>{@link android.os.Build.VERSION_CODES#GINGERBREAD}</td>
+    </tr>
+  
+  <tr><td><a href="{@docRoot}sdk/android-2.2.html">Android 2.2.x</td>
+    <td ><a href="{@docRoot}sdk/api_diff/8/changes.html" title="Diff Report">8</a></td>
+    <td>{@link android.os.Build.VERSION_CODES#FROYO}</td>
+    <td><a href="{@docRoot}sdk/android-2.2-highlights.html">Platform Highlights</a></td></tr>
+  
+  <tr><td><a href="{@docRoot}sdk/android-2.1.html">Android 2.1.x</td>
+    <td><a href="{@docRoot}sdk/api_diff/7/changes.html" title="Diff Report">7</a></td>
+    <td>{@link android.os.Build.VERSION_CODES#ECLAIR_MR1}</td>
+    <td rowspan="3" ><a href="{@docRoot}sdk/android-2.0-highlights.html">Platform Highlights</a></td></tr>
+    
+  <tr><td><a href="{@docRoot}sdk/android-2.0.1.html">Android 2.0.1</td>
+    <td><a href="{@docRoot}sdk/api_diff/6/changes.html" title="Diff Report">6</a></td>
+    <td>{@link android.os.Build.VERSION_CODES#ECLAIR_0_1}</td>
+    </tr>
+    
+  <tr><td><a href="{@docRoot}sdk/android-2.0.html">Android 2.0</td>
+    <td><a href="{@docRoot}sdk/api_diff/5/changes.html" title="Diff Report">5</a></td>
+    <td>{@link android.os.Build.VERSION_CODES#ECLAIR}</td>
+    </tr>
+    
+  <tr><td><a href="{@docRoot}sdk/android-1.6.html">Android 1.6</td>
+    <td><a href="{@docRoot}sdk/api_diff/4/changes.html" title="Diff Report">4</a></td>
+    <td>{@link android.os.Build.VERSION_CODES#DONUT}</td>
+    <td><a href="{@docRoot}sdk/android-1.6-highlights.html">Platform Highlights</a></td></tr>
+    
+  <tr><td><a href="{@docRoot}sdk/android-1.5.html">Android 1.5</td>
+    <td><a href="{@docRoot}sdk/api_diff/3/changes.html" title="Diff Report">3</a></td>
+    <td>{@link android.os.Build.VERSION_CODES#CUPCAKE}</td>
+    <td><a href="{@docRoot}sdk/android-1.5-highlights.html">Platform Highlights</a></td></tr>
+    
+  <tr><td><a href="{@docRoot}sdk/android-1.1.html">Android 1.1</td>
+    <td>2</td>
+    <td>{@link android.os.Build.VERSION_CODES#BASE_1_1}</td><td></td></tr>
+    
+  <tr><td><a href="{@docRoot}sdk/android-1.0.html">Android 1.0</td>
+    <td>1</td>
+    <td>{@link android.os.Build.VERSION_CODES#BASE}</td>
+    <td></td></tr>
 </table>
 
 
index 78d12ef..d32cf66 100644 (file)
@@ -280,7 +280,7 @@ instance, see <a href="{@docRoot}guide/developing/building/index.html">Building
 <td>Run PPP over USB.
 <ul>
 <li><code>&lt;tty&gt;</code> &mdash; the tty for PPP stream. For example <code>dev:/dev/omap_csmi_ttyl</code>. </li>
-<li><code>[parm]... </code> &mdash zero or more PPP/PPPD options, such as <code>defaultroute</code>, <code>local</code>, <code>notty</code>, etc.</li></ul>
+<li><code>[parm]... </code> &mdash; zero or more PPP/PPPD options, such as <code>defaultroute</code>, <code>local</code>, <code>notty</code>, etc.</li></ul>
 
 <p>Note that you should not automatically start a PPP connection. </p></td>
 <td></td>
index 3e9ddc4..39624f5 100644 (file)
@@ -175,8 +175,8 @@ The global reference is guaranteed to be valid until you call
 
 <p>This pattern is commonly used when caching copies of class objects obtained
 from <code>FindClass</code>, e.g.:</p>
-<pre>jclass* localClass = env-&gt;FindClass("MyClass");
-jclass* globalClass = (jclass*) env-&gt;NewGlobalRef(localClass);</pre>
+<pre>jclass localClass = env-&gt;FindClass("MyClass");
+jclass globalClass = reinterpret_cast&lt;jclass&gt;(env-&gt;NewGlobalRef(localClass));</pre>
 
 <p>All JNI methods accept both local and global references as arguments.
 It's possible for references to the same object to have different values;
@@ -215,10 +215,9 @@ to detach the thread soon.</p>
 <a name="UTF_8_and_UTF_16_strings" id="UTF_8_and_UTF_16_strings"></a>
 <h2>UTF-8 and UTF-16 Strings</h2>
 
-<p>The Java programming language uses UTF-16.  For convenience, JNI provides methods that work with "modified UTF-8" encoding
-as well.  (Some VMs use the modified UTF-8 internally to store strings; ours do not.)  The
-modified encoding only supports the 8- and 16-bit forms, and stores ASCII NUL values in a 16-bit encoding.
-The nice thing about it is that you can count on having C-style zero-terminated strings,
+<p>The Java programming language uses UTF-16.  For convenience, JNI provides methods that work with <a href="http://en.wikipedia.org/wiki/UTF-8#Modified_UTF-8">Modified UTF-8</a> as well.  The
+modified encoding is useful for C code because it encodes \u0000 as 0xc0 0x80 instead of 0x00.
+The nice thing about this is that you can count on having C-style zero-terminated strings,
 suitable for use with standard libc string functions.  The down side is that you cannot pass
 arbitrary UTF-8 data into the VM and expect it to work correctly.</p>
 
@@ -235,11 +234,11 @@ are C-style pointers to primitive data rather than local references.  They
 are guaranteed valid until Release is called, which means they are not
 released when the native method returns.</p>
 
-<p><strong>Data passed to NewStringUTF must be in "modified" UTF-8 format</strong>.  A
+<p><strong>Data passed to NewStringUTF must be in Modified UTF-8 format</strong>.  A
 common mistake is reading character data from a file or network stream
 and handing it to <code>NewStringUTF</code> without filtering it.
 Unless you know the data is 7-bit ASCII, you need to strip out high-ASCII
-characters or convert them to proper "modified" UTF-8 form.  If you don't,
+characters or convert them to proper Modified UTF-8 form.  If you don't,
 the UTF-16 conversion will likely not be what you expect.  The extended
 JNI checks will scan strings and warn you about invalid data, but they
 won't catch everything.</p>
@@ -321,10 +320,10 @@ and <code>GetStringChars</code> that may be very helpful when all you want
 to do is copy data in or out.  Consider the following:</p>
 
 <pre>
-    jbyte* data = env->GetByteArrayElements(array, NULL);
+    jbyte* data = env-&gt;GetByteArrayElements(array, NULL);
     if (data != NULL) {
         memcpy(buffer, data, len);
-        env->ReleaseByteArrayElements(array, data, JNI_ABORT);
+        env-&gt;ReleaseByteArrayElements(array, data, JNI_ABORT);
     }</pre>
 
 <p>This grabs the array, copies the first <code>len</code> byte
@@ -335,7 +334,7 @@ we use <code>JNI_ABORT</code> so there's no chance of a third copy.</p>
 
 <p>We can accomplish the same thing with this:</p>
 <pre>
-    env->GetByteArrayRegion(array, 0, len, buffer);</pre>
+    env-&gt;GetByteArrayRegion(array, 0, len, buffer);</pre>
 
 <p>This has several advantages:</p>
 <ul>
@@ -433,7 +432,7 @@ method call.</li>
 <li> Check for calls to inappropriate functions between Critical get/release calls.</li>
 <li> Check that JNIEnv structs aren't being shared between threads.</li>
 <li> Make sure local references aren't used outside their allowed lifespan.</li>
-<li> UTF-8 strings contain only valid "modified UTF-8" data.</li>
+<li> UTF-8 strings contain only valid <a href="http://en.wikipedia.org/wiki/UTF-8#Modified_UTF-8">Modified UTF-8</a> data.</li>
 </ul>
 
 <p>Accessibility of methods and fields (i.e. public vs. private) is not
@@ -476,20 +475,21 @@ library name, e.g. to load "libfubar.so" you would pass in "fubar".</li>
 <li> Provide a native function: <code><strong>jint JNI_OnLoad(JavaVM* vm, void* reserved)</strong></code></li>
 <li>In <code>JNI_OnLoad</code>, register all of your native methods.  You
 should declare
-the methods "static" so the names don't take up space in the symbol table
+the functions <code>static</code> so the names don't take up space in the symbol table
 on the device.</li>
 </ul>
 
 <p>The <code>JNI_OnLoad</code> function should look something like this if
-written in C:</p>
+written in C++:</p>
 <pre>jint JNI_OnLoad(JavaVM* vm, void* reserved)
 {
     JNIEnv* env;
-    if ((*vm)->GetEnv(vm, (void**) &env, JNI_VERSION_1_6) != JNI_OK)
+    if (vm-&gt;GetEnv(reinterpret_cast&lt;void**&gt;(&env), JNI_VERSION_1_6) != JNI_OK) {
         return -1;
+    }
 
-    /* get class with (*env)->FindClass */
-    /* register methods with (*env)->RegisterNatives */
+    // Get jclass with env-&gt;FindClass.
+    // Register methods with env-&gt;RegisterNatives.
 
     return JNI_VERSION_1_6;
 }</pre>
@@ -603,7 +603,7 @@ Some common reasons for this are:</p>
     is commonly caused by:
     <ul>
         <li>For lazy method lookup, failing to declare C++ functions
-        with <code>extern C</code>.  You can use <code>arm-eabi-nm</code>
+        with <code>extern "C"</code>.  You can use <code>arm-eabi-nm</code>
         to see the symbols as they appear in the library; if they look
         mangled (e.g. <code>_Z15Java_Foo_myfuncP7_JNIEnvP7_jclass</code>
         rather than <code>Java_Foo_myfunc</code>) then you need to
index 5905214..3f94553 100644 (file)
@@ -927,7 +927,7 @@ as described by its two intent filters:
 
 <p>
 The first, primary, purpose of this activity is to enable the user to 
-interact with a single note &mdash to either {@code VIEW} the note or 
+interact with a single note &mdash; to either {@code VIEW} the note or 
 {@code EDIT} it.  (The {@code EDIT_NOTE} category is a synonym for 
 {@code EDIT}.)  The intent would contain the URI for data matching the 
 MIME type <code>vnd.android.cursor.item/vnd.google.note</code> &mdash;
index 3486212..743832c 100644 (file)
@@ -710,7 +710,7 @@ the soft keyboard.</li>
 The setting must be one of the values listed in the following table, or a 
 combination of one "{@code state...}" value plus one "{@code adjust...}" 
 value.  Setting multiple values in either group &mdash; multiple 
-"{@code state...}" values, for example &mdash has undefined results.  
+"{@code state...}" values, for example &mdash; has undefined results.  
 Individual values are separated by a vertical bar ({@code |}).  For example:
 </p>
 
@@ -801,4 +801,4 @@ Level 3.</dd>
 <dt>see also:</dt>
 <dd><code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code> 
 <br/><code><a href="{@docRoot}guide/topics/manifest/activity-alias-element.html">&lt;activity-alias&gt;</a></code></dd>
-</dl>
\ No newline at end of file
+</dl>
index 2a84c26..513886a 100644 (file)
@@ -277,7 +277,7 @@ are returned.  All the content providers that come with the platform define
 constants for their columns.  For example, the 
 {@link android.provider.Contacts.Phones android.provider.Contacts.Phones} class 
 defines constants for the names of the columns in the phone table illustrated 
-earlier &mdash {@code _ID}, {@code NUMBER}, {@code NUMBER_KEY}, {@code NAME},
+earlier &mdash; {@code _ID}, {@code NUMBER}, {@code NUMBER_KEY}, {@code NAME},
 and so on.</li>
 
 <li><p>A filter detailing which rows to return, formatted as an SQL {@code WHERE} 
index 992b7d1..1614722 100644 (file)
@@ -19,14 +19,14 @@ sdk.platform.apiLevel=12
 <h2>Reference</h2>
 <ol>
 <li><a
-href="{@docRoot}sdk/api_diff/11/changes.html">API
+href="{@docRoot}sdk/api_diff/12/changes.html">API
 Differences Report &raquo;</a> </li>
 </ol>
 
 <h2>See Also</h2>
 <ol>
   <li><a href="{@docRoot}guide/practices/optimizing-for-3.0.html">Optimizing
-Apps for Android 3.0</a></li>
+Apps for Android 3.x</a></li>
 </ol>
 
 </div>
@@ -765,7 +765,7 @@ was upgraded while it was in started state (not in a stopped state).</p></li>
 
 </ul>
 
-<h3 if="other">Core utilities</h3>
+<h3 id="other">Core utilities</h3>
 
 <ul>
 <li>LRU cache
diff --git a/docs/html/sdk/android-3.2.jd b/docs/html/sdk/android-3.2.jd
new file mode 100644 (file)
index 0000000..5618eae
--- /dev/null
@@ -0,0 +1,737 @@
+page.title=Android 3.2 Platform
+sdk.platform.version=3.2
+sdk.platform.apiLevel=13
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+<ol>
+  <li><a href="#relnotes">Revisions</a></li>
+  <li><a href="#highlights">Highlights</a></li>
+  <li><a href="#api">API Overview</a></li>
+  <li><a href="#api-level">API Level</a></li>
+  <li><a href="#apps">Built-in Applications</a></li>
+  <li><a href="#locs">Locales</a></li>
+  <li><a href="#skins">Emulator Skins</a></li>
+</ol>
+
+<h2>Reference</h2>
+<ol>
+<li><a
+href="{@docRoot}sdk/api_diff/13/changes.html">API
+Differences Report &raquo;</a> </li>
+</ol>
+
+<h2>See Also</h2>
+<ol>
+  <li><a href="{@docRoot}guide/practices/screens_support.html">Supporting
+  Multiple Screens</a></li>
+  <li><a href="{@docRoot}guide/practices/optimizing-for-3.0.html">Optimizing
+Apps for Android 3.x</a></li>
+</ol>
+
+</div>
+</div>
+
+
+<p><em>API Level:</em>&nbsp;<strong>{@sdkPlatformApiLevel}</strong></p>
+
+<p>Welcome to Android 3.2!</p>
+
+<p>Android 3.2 is an incremental platform release that adds new
+capabilities for users and developers. The sections below provide an overview
+of the new features and developer APIs.</p>
+
+<p>For developers, the Android {@sdkPlatformVersion} platform is available as a
+downloadable component for the Android SDK. The downloadable platform includes
+an Android library and system image, as well as a set of emulator skins and
+more. The downloadable platform includes no external libraries.</p>
+
+<p>To get started developing or testing against Android {@sdkPlatformVersion},
+use the Android SDK Manager to download the platform into your SDK. For more
+information, see <a href="{@docRoot}sdk/adding-components.html">Adding SDK
+Components</a>. If you are new to Android, <a
+href="{@docRoot}sdk/index.html">download the SDK Starter Package</a> first.</p>
+
+<p class="note"><strong>Reminder:</strong> If you've already published an
+Android application, please test and optimize your application on Android 3.2 as
+soon as possible. You should do so to be sure your application provides the best
+experience possible on the latest Android-powered devices. For information about
+what you can do, read <a
+href="{@docRoot}guide/practices/optimizing-for-3.0.html">Optimizing Apps for
+Android 3.x</a>.</p>
+
+
+<h2 id="relnotes">Revisions</h2>
+
+<p>To determine what revision of the Android {@sdkPlatformVersion} platform you
+have installed, refer to the "Installed Packages" listing in the Android SDK and
+AVD Manager.</p>
+
+
+<div class="toggle-content opened" style="padding-left:1em;">
+
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-opened.png"
+class="toggle-content-img" alt="" />
+    Android {@sdkPlatformVersion}, Revision 1</a> <em>(July 2011)</em>
+  </a></p>
+
+  <div class="toggle-content-toggleme" style="padding-left:2em;">
+
+<dl>
+<dt>Initial release. SDK Tools r12 or higher is recommended.</dt>
+</dl>
+
+  </div>
+</div>
+
+<h2 id="highlights" style="margin-top:1.5em;">Platform Highlights</h2>
+
+<h3>New user features</h3>
+
+<ul>
+<li><strong>Optimizations for a wider range of tablets</strong>
+
+<p>Android 3.2 includes a variety of optimizations across the system
+to ensure a great user experience on a wider range of tablet devices.</p></li>
+
+<li><strong>Compatibility zoom for fixed-sized apps</strong>
+
+<p>Android 3.2 introduces a new <em>compatibility zoom</em> mode that gives
+users a new way to view fixed-sized apps on larger devices. The new mode provides a
+pixel-scaled alternative to the standard UI stretching for apps that are not
+designed to run on larger screen sizes, such as on tablets. The new mode is
+accessible to users from a menu icon in the system bar, for apps that need
+compatibility support.</p></li>
+
+<li><strong>Media sync from SD card</strong>
+<p>On devices that support an SD card, users can now load media files directly
+from the SD card to apps that use them. A system facility makes the files
+accessible to apps from the system media store.</p></li>
+</ul>
+
+
+<h3>New developer features</h3>
+
+<ul>
+<li><strong>Extended API for managing screens support</strong>
+
+<p>Android 3.2 introduces extensions to the platform's screen support API to
+give developers additional ways to manage application UI across the range of
+Android-powered devices. The API includes new resource qualifiers and new
+manifest attributes that give you more precise control over how your
+apps are displayed on different sizes, rather than relying on generalized
+size categories.</p>
+
+<p>To ensure the best possible display for fixed-sized apps and apps with limited
+support for various screen sizes, the platform also provides a new zoom
+compatibility mode that renders the UI on a smaller screen area, then scales it
+up to fill the space available on the display. For more information about the
+screen support API and the controls it provides, see the sections below. </p></li>
+</ul>
+
+
+<h2 id="api">API Overview</h2>
+
+<h3 id="usb">Screens Support APIs</h3>
+
+<p>Android 3.2 introduces new screens support APIs that give you more
+control over how their applications are displayed across different screen sizes.
+The API builds on the existing screens-support API, including the platform's
+generalized screen density model, but extends it with the ability to precisely
+target specific screen ranges by their dimensions, measured in
+density-independent pixel units (such as 600dp or 720dp wide), rather than
+by their generalized screen sizes (such as large or xlarge)</p>
+
+<p>When designing an application's UI, you can still rely on the platform to
+provide density abstraction, which means that applications do not need to
+compensate for the differences in actual pixel density across devices. You
+can design the application UI according to the amount of horizontal or vertical
+space available. The platform expresses the amount of space available using three new
+characteristics: <em>smallestWidth</em>, <em>width</em>, and
+<em>height</em>.</p>
+
+<ul>
+<li>A screen's <em>smallestWidth</em> is its fundamental minimum size,
+measured in density-independent pixel ("dp") units. Of the screen's height or
+width, it is the shorter of the two. For a screen in portrait orientation, the
+smallestWidth is normally based on its width, while in landscape orientation it is based
+on its height. In all cases, the smallestWidth is derived from a fixed characteristic of the
+screen and the value does not change, regardless of orientation. The smallestWidth
+is important for applications because it represents the shortest possible width
+in which the application UI will need to be drawn, not including screen areas
+reserved by the system.
+</li>
+
+<li>In constrast, a screen's <em>width</em> and <em>height</em> represent the
+current horizontal or vertical space available for application layout, measured
+in "dp" units, not including screen areas reserved by the system. The width and
+height of a screen change when the user switches orientation between landscape
+and portrait. </li>
+
+</ul>
+
+<p>The new screens support API is designed to let you manage application UI
+according to the smallestWidth of the current screen. You can also manage the
+UI according to current width or height, as needed. For those purposes, the API
+provides these tools:</p>
+
+<ul>
+<li>New resource qualifiers for targeting layouts and other resources to a
+minimum smallestWidth, width, or height, and</li> 
+<li>New manifest attributes, for specifying the app's maximum
+screen compatibility range</li>
+</ul>
+
+<p>Additionally, applications can still query the system and manage UI and
+resource loading at runtime, as in the previous versions of the platform.</p>
+
+<p>Since the new API lets you target screens more directly through smallestWidth,
+width, and height, it's helpful to understand the typical
+characteristics of the different screen types. The table below provides some
+examples, measured in "dp" units. </p>
+
+<p class="caption"><strong>Table 1.</strong> Typical devices, with density
+and size in dp.</p>
+
+<table>
+<tr>
+<th>Type</th>
+<th>Density (generalized)</th>
+<th>Dimensions (dp)</th>
+<th>smallestWidth (dp)</th>
+</tr>
+<tr>
+<td>Baseline phone</td>
+<td>mdpi</td>
+<td>320x480</td>
+<td>320</td>
+</td>
+<tr>
+<td>Small tablet/large phone</td>
+<td>mdpi</td>
+<td>480x800</td>
+<td>480</td>
+</tr>
+<tr>
+<td>7-inch tablet</td>
+<td>mdpi</td>
+<td>600x1024</td>
+<td>600</td>
+</tr>
+<tr>
+<td>10-inch tablet</td>
+<td>mdpi</td>
+<td>800x1280</td>
+<td>800</td>
+</tr>
+</table>
+
+<p>The sections below provide more information about the new screen qualifiers
+and manifest attributes. For complete information about how to use the screen
+support API, see <a
+href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
+Screens</a>.</p>
+
+<h4>New resource qualifiers for screens support</h4>
+
+<p>The new resource qualifiers in Android 3.2 let you better target your layouts
+for ranges of screen sizes. Using the qualifiers, you can create resource
+configurations designed for a specific minimum smallestWidth, current width, or
+current height, measured in density-independent pixels.</p>
+
+<p>The new qualifiers are:</p>
+<ul>
+<li><code>swNNNdp</code> &mdash; Specifies the minimum smallestWidth on which
+the resource should be used, measured in "dp" units. As mentioned above, a
+screen's smallestWidth is constant, regardless of orientation. Examples:
+<code>sw320dp</code>, <code>sw720dp</code>, <code>sw720dp</code>.</li>
+
+<li><code>wNNNdp</code> and <code>hNNNdp</code> &mdash; Specifies the minimum 
+width or height on which the resource should be used, measured in "dp" units. As
+mentioned above, a screen's width and height are relative to the orientation of
+the screen and change whenever the orientation changes. Examples:
+<code>w320dp</code>, <code>w720dp</code>, <code>h1024dp</code>.</p></li>
+</ul>
+
+<p>You can also create multiple overlapping resource configurations if needed.
+For example, you could tag some resources for use on any screen wider than 480
+dp, others for wider than 600  dp, and others for wider than 720 dp. When
+multiple resource configurations are qualified for a given screen, the system
+selects the configuration that is the closest match. For precise control over
+which resources are loaded on a given screen, you can tag resources with one
+qualifier or combine several new or existing qualifiers. 
+
+<p>Based on the typical dimensions listed earlier, here are some examples of how
+you could use the new qualifiers:</p>
+
+<pre class="classic prettyprint">res/layout/main_activity.xml   # For phones
+res/layout-sw600dp/main_activity.xml   # For 7” tablets
+res/layout-sw720dp/main_activity.xml   # For 10” tablets
+res/layout-w600dp/main_activity.xml   # Multi-pane when enough width
+res/layout-sw600dp-w720dp/main_activity.xml   # For large width</pre>
+
+<p>Older versions of the platform will ignore the new qualifiers, so you can
+mix them as needed to ensure that your app looks great on any device. Here
+are some examples:</p>
+
+<pre class="classic prettyprint">res/layout/main_activity.xml   # For phones
+res/layout-xlarge/main_activity.xml   # For pre-3.2 tablets
+res/layout-sw600dp/main_activity.xml   # For 3.2 and up tablets</pre>
+
+<p>For complete information about how to use the new qualifiers, see <a href="{@docRoot}guide/practices/screens_support.html#NewQualifiers">Using new
+size qualifiers</a>.</p>
+
+<h4>New manifest attributes for screen-size compatibility</h4>
+
+<p>The framework offers a new set of <a
+href="{@docRoot}"><code>&lt;supports-screens&gt;</code></a> manifest attributes that let
+you manage your app's support for different screen sizess.
+Specifically, you can specify the largest and smallest screens on which your app
+is designed to run, as well as the largest screen on which it is designed run
+without needing the system's new <a href="{@docRoot}guide/practices/screen-compat-mode.html">screen
+compatibility mode</a>. Like the resource qualifiers described above, the new
+manifest attributes specify the range of screens that the application supports,
+as specified by the smallestWidth. </p>
+
+<p>The new manifest attributes for screen support are: </p>
+
+<ul>
+<li><code>android:compatibleWidthLimitDp="<em>numDp"</em></code> &mdash; This
+attribute lets you specify the maximum smallestWidth on which the application
+can run without needing compatibility mode. If the current screen is larger than
+the value specified, the system displays the application in normal mode but
+allows the user to optionally switch to compatibility mode through a setting in
+the system bar.</li>
+
+<li><code>android:largestWidthLimitDp="<em>numDp</em>"</code> &mdash; This
+attribute lets you specify the maximum smallestWidth on which the application
+is designed to run.  If the current screen is larger than the value specified,
+the system forces the application into screen compatibility mode, to ensure best
+display on the current screen.</li>
+
+<li><code>android:smallestWidthLimitDp="<em>numDp"</em></code> &mdash; This
+attribute lets you specify the minimum smallestWidth on which the application
+can run. If the current screen is smaller than the value specified, the system
+considers the application incompatible with the device, but does not prevent it
+from being installed and run.</li>
+</ul>
+
+<p class="note"><strong>Note:</strong> Android Market does not currently filter
+apps based on any of the attributes above. Support for filtering will be
+added in a later platform release. Applications that require
+filtering based on screen size can use the existing <code>&lt;supports-screens&gt;</code>
+attributes.</p>
+
+<p>For complete information about how to use the new attributes, see <a href="{@docRoot}guide/practices/screens_support.html#DeclaringScreenSizeSupport">Declaring
+screen size support</a>.</p>
+
+<h4>Screen compatibility mode</h4>
+
+<p>Android 3.2 provides a new screen compatibility mode for applications
+explicitly declaring that they do not support screens as large as the one on
+which they are running. This new "zoom" mode is a pixel-scaled &mdash; it
+renders the application in a smaller screen area and then scales the pixels to
+fill the current screen.</p>
+
+<p>By default, the system offers screen compatibility mode as an user option, for apps
+that require it. Users can turn the zoom mode on and off using a control available
+in the system bar. </p>
+
+<p>Because the new screen compatibility mode may not be appropriate for all
+applications, the platform allows the application to disable it using manifest
+attributes. When disabled by the app, the system does not offer "zoom" compatibility
+mode as an option for users when the app is running.</p>
+
+<p class="note"><strong>Note:</strong> For important information about how
+to control compatibility mode in your applications, please review the <a
+href="http://android-developers.blogspot.com/2011/07/new-mode-for-apps-on-large-
+screens.html">New Mode for Apps on Large Screens</a> article on the Android
+Developers Blog. </p>
+
+<h4>New screen density for 720p televisions and similar devices</h4>
+
+<p>To meet the needs of applications running on 720p televisions or similar with
+moderate density screens, Android 3.2 introduces a new generalized density,
+<code>tvdpi</code>, with an approximate dpi of 213. Applications can query for
+the new density in {@link android.util.DisplayMetrics#densityDpi} and can use
+the new <code>tvdpi</code> qualifier to tag resources for televisions and
+similar devices. For example:</p>
+
+<pre class="classic prettyprint">res/drawable-tvdpi/my_icon.png   # Bitmap for tv density</pre>
+
+<p>In general, applications should not need to work with this density. For situations
+where output is needed for a 720p screen, the UI elements can be scaled
+automatically by the platform.</p>
+
+
+<h3 id="ui" style="margin-top:1.25em;">UI framework</h3>
+<ul>
+<li>Fragments
+  <ul>
+    <li>New {@link android.app.Fragment.SavedState} class holds the state
+    information retrieved from a fragment instance through
+    {@link android.app.FragmentManager#saveFragmentInstanceState(android.app.Fragment) saveFragmentInstanceState()}.</li>
+    <li>New method {@link android.app.FragmentManager#saveFragmentInstanceState(android.app.Fragment) saveFragmentInstanceState()}
+    saves the current instance state of
+    the given Fragment. The state can be used later when creating a new instance
+    of the Fragment that matches the current state.</li>
+    <li>New method {@link android.app.Fragment#setInitialSavedState(SavedState) setInitialSavedState()}
+    sets the initial saved state for a Fragment when first constructed.</li>
+    <li>New {@link android.app.Fragment#onViewCreated(android.view.View, android.os.Bundle)
+    onViewCreated()} callback method notifies the Fragment that
+    {@link android.app.Fragment#onCreateView(LayoutInflater, ViewGroup, Bundle) onCreateView()}
+    has returned, but before any saved state has been restored in to the View.</li>
+    <li>{@link android.app.Fragment#isDetached()} method determines whether
+    the Fragment has been explicitly detached from the UI.</li>
+    <li>New {@link android.app.FragmentTransaction#attach(android.app.Fragment) attach()}
+    and {@link android.app.FragmentTransaction#detach(android.app.Fragment) detach()}
+    methods let an application re-attach or detach fragments in the UI.</li>
+    <li>A new {@link android.app.FragmentTransaction#setCustomAnimations(int, int, int, int)
+    setCustomAnimations()} overload method lets you set specific animation
+    resources to run for enter/exit operations and specifically when
+    popping the back stack. The existing implementation does not account
+    for the different behavior of fragments when popping the back stack.</li>
+  </ul>
+</li>
+<li>Screen size information in ActivityInfo and ApplicationInfo
+  <ul>
+    <li>{@link android.content.pm.ActivityInfo} adds {@link android.content.pm.ActivityInfo#CONFIG_SCREEN_SIZE}
+    and {@link android.content.pm.ActivityInfo#CONFIG_SMALLEST_SCREEN_SIZE} as bit masks
+    in {@link android.R.attr#configChanges}. The bits indicate whether an Activity can
+    itself handle the screen size and smallest screen size.</li>
+    <li>{@link android.content.pm.ApplicationInfo} adds
+    {@link android.content.pm.ApplicationInfo#largestWidthLimitDp}, {@link android.content.pm.ApplicationInfo#compatibleWidthLimitDp},
+    and {@link android.content.pm.ApplicationInfo#requiresSmallestWidthDp} fields,
+    derived from the corresponding <code>&lt;supports-screens&gt;</code> attributes
+    in the application manifest file.</li>
+  </ul>
+</li>
+<li>Helpers for getting display size from WindowManager
+  <ul>
+    <li>New methods {@link android.view.Display#getSize(android.graphics.Point)
+    getSize()} and {@link android.view.Display#getRectSize(android.graphics.Rect)
+    getRectSize()} let applications get the raw size of the display.</li>
+  </ul>
+</li>
+<li>New public "holographic" styles
+  <ul>
+    <li>The platform now exposes a variety of public "holographic" styles
+    for text, actionbar widgets and tabs, and more. See
+    {@link android.R.style} for a full list.</li>
+  </ul>
+</li>
+<li>{@link android.app.LocalActivityManager}, {@link android.app.ActivityGroup}, and
+    {@link android.app.LocalActivityManager} are now deprecated
+  <ul>
+    <li>New applications should use Fragments instead of these classes. To
+    continue to run on older versions of the platform, you can use the v4 Support
+    Library (compatibility library), available in the Android SDK. The v4 Support
+    Library provides a version of the Fragment API that is compatible down to
+    Android 1.6 (API level 4).
+    <li>For apps developing against Android 3.0 (API level
+    11) or higher, tabs are typically presented in the UI using the new
+    {@link android.app.ActionBar#newTab() ActionBar.newTab()} and related APIs
+    for placing tabs within their action bar area.</p></li>
+  </ul>
+</li>
+</ul>
+
+<h3 id="media" style="margin-top:1em;">Media framework</h3>
+<ul>
+    <li>Applications that use the platform's media provider ({@link
+    android.provider.MediaStore}) can now read media data directly from the
+    removeable SD card, where supported by the device. Applications can also
+    interact with the SD card files directly, using the MTP API. </li>
+
+</ul>
+<h3 id="graphics" style="margin-top:1.25em;">Graphics</h3>
+<ul>
+<li>Parcelable utilities in Point and PointF
+  <ul>
+    <li>{@link android.graphics.Point} and {@link android.graphics.PointF}
+    classes now include the {@link android.os.Parcelable} interface and utility methods {@link
+    android.graphics.Point#describeContents()}, {@link
+    android.graphics.Point#readFromParcel(android.os.Parcel) readFromParcel()}, and {@link
+    android.graphics.Point#writeToParcel(android.os.Parcel, int) writeToParcel()}.</li>
+  </ul>
+</li>
+</ul>
+
+
+<h3 id="ime" style="margin-top:1.25em;">IME framework</h3>
+<ul>
+    <li>New {@link android.view.KeyEvent#getModifiers()} method for
+    retrieving the current state of the modifier keys.</li>
+</ul>
+
+
+<h3 id="usb" style="margin-top:1.25em;">USB framework</h3>
+<ul>
+    <li>New {@link
+    android.hardware.usb.UsbDeviceConnection#getRawDescriptors()} method for
+    retrieving the raw USB descriptors for the device. You can use the
+    method to access descriptors not supported directly via the higher
+    level APIs.</li>
+</ul>
+
+
+<h3 id="network" style="margin-top:1.25em;">Network</h3>
+<ul>
+<li>Network type constants
+   <ul>
+     <li>{@link android.net.ConnectivityManager} adds the constants {@link
+     android.net.ConnectivityManager#TYPE_ETHERNET} and {@link
+     android.net.ConnectivityManager#TYPE_BLUETOOTH}.</li>
+  </ul>
+</li>
+</ul>
+
+
+<h3 id="telephony" style="margin-top:1.25em;">Telephony</h3>
+<ul>
+    <li>New {@link android.telephony.TelephonyManager#NETWORK_TYPE_HSPAP} network type constant.</li>
+</ul>
+
+<h3 id="other" style="margin-top:1.25em;">Core utilities</h3>
+<ul>
+<li>Parcelable utilities
+  <ul>
+    <li>New interface {@link android.os.Parcelable.ClassLoaderCreator} allows
+    the application to receive the ClassLoader in which the object is being created.</li>
+    <li>New {@link android.os.ParcelFileDescriptor#adoptFd(int) adoptFd}, {@link
+    android.os.ParcelFileDescriptor#dup(java.io.FileDescriptor) dup()}, and {@link
+    android.os.ParcelFileDescriptor#fromFd(int) fromFd()} for managing
+    {@link android.os.ParcelFileDescriptor} objects.</li>
+  </ul>
+</li>
+<li>Binder and IBinder
+  <ul>
+    <li>New method {@link android.os.Binder#dumpAsync(java.io.FileDescriptor, java.lang.String[]) dumpAsync()}
+    in {@link android.os.Binder} and {@link android.os.IBinder} let applications
+    dump to a specified file, ensuring that the target executes asynchronously.</li>
+    <li>New {@link android.os.IBinder} protocol transaction code {@link
+    android.os.IBinder#TWEET_TRANSACTION} lets applications send a tweet
+    to the target object.</li>
+  </ul>
+</li>
+</ul>
+
+
+
+
+<h3 id="features">New feature constants</h3>
+
+<p>The platform adds new hardware feature constants that you can declare
+in their application manifests, to inform external entities such as Android
+Market of required hardware and software capabilities. You declare these
+and other feature constants in <a
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code
+&lt;uses-feature&gt;}</a> manifest elements.
+
+<p>Android Market filters applications based on their <code>&lt;uses-feature&gt;</code> attributes, to ensure that they are available only to devices on which their requirements are met. </p>
+
+<ul>
+<li>Feature constants for landscape or portrait requirements
+
+<p>Android 3.2 introduces new feature constants that let applications specify whether they require display in landscape orientation, portrait orientation, or both. Declaring these constants indicates that the application must not be installed on a device that doesn't offer the associated orientation. Conversely, if one or both of the constants are not declared, it indicates that the application does not have a preference for the undeclared orientations and may be installed on a device that doesn't offer them. </p>
+
+<ul>
+  <li>{@link android.content.pm.PackageManager#FEATURE_SCREEN_LANDSCAPE
+android.hardware.screen.landscape} &mdash; The application requires display in
+landscape orientation.</li>
+  <li>{@link android.content.pm.PackageManager#FEATURE_SCREEN_PORTRAIT
+android.hardware.screen.portrait} &mdash; The application requires display in
+portrait orientation.</li>
+</ul>
+
+<p>A typical application that functions properly in both landscape and portrait orientations would not normally need to declare an orientation requirement. Rather, an application designed primarily for one orientation, such as an app designed for a television, could declare one of the constants to ensure that it isn't available to devices that don't provide that orientation.</p>
+
+<p>If the application is targeting API level 12 or lower, the platform assumes that if app has not specified whether it requires portrait or landscape, both orientations are required.</p>
+</li>
+<li>Other feature constants
+
+<ul>
+  <li>{@link android.content.pm.PackageManager#FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT
+android.hardware.faketouch.multitouch.distinct} &mdash; The application requires support for emulated mulitouch input with distinct tracking of two or more points.</li>
+
+  <li>{@link android.content.pm.PackageManager#FEATURE_FAKETOUCH_MULTITOUCH_JAZZHAND
+android.hardware.faketouch.multitouch.jazzhand} &mdash; The application requires support for emulated mulitouch input with distinct tracking of five or more points.</li>
+</ul>
+
+</li>
+</ul>
+
+
+<h3 id="api-diff">API Differences Report</h3>
+
+<p>For a detailed view of all API changes in Android {@sdkPlatformVersion} (API
+Level
+{@sdkPlatformApiLevel}), see the <a
+href="{@docRoot}sdk/api_diff/{@sdkPlatformApiLevel}/changes.html">API
+Differences Report</a>.</p>
+
+
+
+
+
+<h2 id="api-level">API Level</h2>
+
+<p>The Android {@sdkPlatformVersion} platform delivers an updated version of
+the framework API. The Android {@sdkPlatformVersion} API
+is assigned an integer identifier &mdash;
+<strong>{@sdkPlatformApiLevel}</strong> &mdash; that is
+stored in the system itself. This identifier, called the "API Level", allows the
+system to correctly determine whether an application is compatible with
+the system, prior to installing the application. </p>
+
+<p>To use APIs introduced in Android {@sdkPlatformVersion} in your application,
+you need compile the application against the Android library that is provided in
+the Android {@sdkPlatformVersion} SDK platform. Depending on your needs, you
+might
+also need to add an <code>android:minSdkVersion="{@sdkPlatformApiLevel}"</code>
+attribute to the <code>&lt;uses-sdk&gt;</code> element in the application's
+manifest.</p>
+
+<p>For more information about how to use API Level, see the <a
+href="{@docRoot}guide/appendix/api-levels.html">API Levels</a> document. </p>
+
+
+<h2 id="apps">Built-in Applications</h2>
+
+<p>The system image included in the downloadable platform provides these
+built-in applications:</p>
+
+<table style="border:0;padding-bottom:0;margin-bottom:0;">
+<tr>
+<td style="border:0;padding-bottom:0;margin-bottom:0;">
+<ul>
+<li>API Demos</li>
+<li>Browser</li>
+<li>Calculator</li>
+<li>Camera</li>
+<li>Clock</li>
+<li>Contacts</li>
+<li>Custom Locale</li>
+<li>Dev Tools</li>
+<li>Downloads</li>
+<li>Email</li>
+</ul>
+</td>
+<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
+<ul>
+<li>Gallery</li>
+<li>Gestures Builder</li>
+<li>Messaging</li>
+<li>Music</li>
+<li>Search</li>
+<li>Settings</li>
+<li>Spare Parts</li>
+<li>Speech Recorder</li>
+<li>Widget Preview</li>
+</ul>
+</td>
+</tr>
+</table>
+
+
+<h2 id="locs" style="margin-top:.75em;">Locales</h2>
+
+<p>The system image included in the downloadable SDK platform provides a variety
+of
+built-in locales. In some cases, region-specific strings are available for the
+locales. In other cases, a default version of the language is used. The
+languages that are available in the Android 3.0 system
+image are listed below (with <em>language</em>_<em>country/region</em> locale
+descriptor).</p>
+
+<table style="border:0;padding-bottom:0;margin-bottom:0;">
+<tr>
+<td style="border:0;padding-bottom:0;margin-bottom:0;">
+<ul>
+<li>Arabic, Egypt (ar_EG)</li>
+<li>Arabic, Israel (ar_IL)</li>
+<li>Bulgarian, Bulgaria (bg_BG)</li>
+<li>Catalan, Spain (ca_ES)</li>
+<li>Czech, Czech Republic (cs_CZ)</li>
+<li>Danish, Denmark(da_DK)</li>
+<li>German, Austria (de_AT)</li>
+<li>German, Switzerland (de_CH)</li>
+<li>German, Germany (de_DE)</li>
+<li>German, Liechtenstein (de_LI)</li>
+<li>Greek, Greece (el_GR)</li>
+<li>English, Australia (en_AU)</li>
+<li>English, Canada (en_CA)</li>
+<li>English, Britain (en_GB)</li>
+<li>English, Ireland (en_IE)</li>
+<li>English, India (en_IN)</li>
+<li>English, New Zealand (en_NZ)</li>
+<li>English, Singapore(en_SG)</li>
+<li>English, US (en_US)</li>
+<li>English, Zimbabwe (en_ZA)</li>
+<li>Spanish (es_ES)</li>
+<li>Spanish, US (es_US)</li>
+<li>Finnish, Finland (fi_FI)</li>
+<li>French, Belgium (fr_BE)</li>
+<li>French, Canada (fr_CA)</li>
+<li>French, Switzerland (fr_CH)</li>
+<li>French, France (fr_FR)</li>
+<li>Hebrew, Israel (he_IL)</li>
+<li>Hindi, India (hi_IN)</li>
+</ul>
+</td>
+<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
+<li>Croatian, Croatia (hr_HR)</li>
+<li>Hungarian, Hungary (hu_HU)</li>
+<li>Indonesian, Indonesia (id_ID)</li>
+<li>Italian, Switzerland (it_CH)</li>
+<li>Italian, Italy (it_IT)</li>
+<li>Japanese (ja_JP)</li>
+<li>Korean (ko_KR)</li>
+<li>Lithuanian, Lithuania (lt_LT)</li>
+<li>Latvian, Latvia (lv_LV)</li>
+<li>Norwegian bokmål, Norway (nb_NO)</li>
+<li>Dutch, Belgium (nl_BE)</li>
+<li>Dutch, Netherlands (nl_NL)</li>
+<li>Polish (pl_PL)</li>
+<li>Portuguese, Brazil (pt_BR)</li>
+<li>Portuguese, Portugal (pt_PT)</li>
+<li>Romanian, Romania (ro_RO)</li>
+<li>Russian (ru_RU)</li></li>
+<li>Slovak, Slovakia (sk_SK)</li>
+<li>Slovenian, Slovenia (sl_SI)</li>
+<li>Serbian (sr_RS)</li>
+<li>Swedish, Sweden (sv_SE)</li>
+<li>Thai, Thailand (th_TH)</li>
+<li>Tagalog, Philippines (tl_PH)</li>
+<li>Turkish, Turkey (tr_TR)</li>
+<li>Ukrainian, Ukraine (uk_UA)</li>
+<li>Vietnamese, Vietnam (vi_VN)</li>
+<li>Chinese, PRC (zh_CN)</li>
+<li>Chinese, Taiwan (zh_TW)</li>
+</td>
+</tr>
+</table>
+
+<p class="note"><strong>Note:</strong> The Android platform may support more
+locales than are included in the SDK system image. All of the supported locales
+are available in the <a href="http://source.android.com/">Android Open Source
+Project</a>.</p>
+
+<h2 id="skins">Emulator Skins</h2>
+
+<p>The downloadable platform includes the following emulator skin:</p>
+
+<ul>
+  <li>
+    WXGA (1280x800, medium density, xlarge screen)
+  </li>
+</ul>
+
+<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>
diff --git a/docs/html/sdk/api_diff/13/changes.html b/docs/html/sdk/api_diff/13/changes.html
new file mode 100644 (file)
index 0000000..0a25fca
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<!-- on Wed Jun 29 10:50:35 PDT 2011 -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+API Differences between 12 and 13
+</TITLE>
+<link href="../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</head>
+<frameset cols="242,**" framespacing="1" frameborder="yes" border="1" bordercolor="#e9e9e9"> 
+<frameset rows="174,**" framespacing="1" frameborder="yes"  border="1" bordercolor="#e9e9e9">
+    <frame src="changes/jdiff_topleftframe.html" scrolling="no" name="topleftframe" frameborder="1">
+    <frame src="changes/alldiffs_index_all.html" scrolling="auto" name="bottomleftframe" frameborder="1">
+  </frameset>
+  <frame src="changes/changes-summary.html" scrolling="auto" name="rightframe" frameborder="1">
+</frameset>
+<noframes>
+<h2>
+Frame Alert
+</h2>
+
+<p>
+This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
+<br>
+Link to <a href="changes/changes-summary.html" target="_top">Non-frame version.</A>
+</noframes>
+</html>
diff --git a/docs/html/sdk/api_diff/13/changes/alldiffs_index_additions.html b/docs/html/sdk/api_diff/13/changes/alldiffs_index_additions.html
new file mode 100644 (file)
index 0000000..1d53429
--- /dev/null
@@ -0,0 +1,663 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+All Additions Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for All Differences" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<a href="alldiffs_index_all.html" xclass="hiddenlink">All Differences</a>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<b>Additions</b>
+  <br>
+<A HREF="alldiffs_index_changes.html"xclass="hiddenlink">Changes</A>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<!-- Method adoptFd -->
+<A NAME="A"></A>
+<br><font size="+2">A</font>&nbsp;
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.os.ParcelFileDescriptor.html#android.os.ParcelFileDescriptor.adoptFd_added(int)" class="hiddenlink" target="rightframe"><b>adoptFd</b>
+(<code>int</code>)</A></nobr><br>
+<!-- Method attach -->
+<nobr><A HREF="android.app.FragmentTransaction.html#android.app.FragmentTransaction.attach_added(android.app.Fragment)" class="hiddenlink" target="rightframe"><b>attach</b>
+(<code>Fragment</code>)</A></nobr><br>
+<!-- Field compatibleWidthLimitDp -->
+<A NAME="C"></A>
+<br><font size="+2">C</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<i>compatibleWidthLimitDp</i><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.R.attr.html#android.R.attr.compatibleWidthLimitDp" class="hiddenlink" target="rightframe">android.R.attr</A>
+</nobr><br>
+<!-- Field compatibleWidthLimitDp -->
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.content.pm.ApplicationInfo.html#android.content.pm.ApplicationInfo.compatibleWidthLimitDp" class="hiddenlink" target="rightframe">android.content.pm.ApplicationInfo</A>
+</nobr><br>
+<!-- Field CONFIG_SCREEN_SIZE -->
+<nobr><A HREF="android.content.pm.ActivityInfo.html#android.content.pm.ActivityInfo.CONFIG_SCREEN_SIZE" class="hiddenlink" target="rightframe">CONFIG_SCREEN_SIZE</A>
+</nobr><br>
+<!-- Field CONFIG_SMALLEST_SCREEN_SIZE -->
+<nobr><A HREF="android.content.pm.ActivityInfo.html#android.content.pm.ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE" class="hiddenlink" target="rightframe">CONFIG_SMALLEST_SCREEN_SIZE</A>
+</nobr><br>
+<!-- Field CREATOR -->
+<i>CREATOR</i><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.graphics.Point.html#android.graphics.Point.CREATOR" class="hiddenlink" target="rightframe">android.graphics.Point</A>
+</nobr><br>
+<!-- Field CREATOR -->
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.graphics.PointF.html#android.graphics.PointF.CREATOR" class="hiddenlink" target="rightframe">android.graphics.PointF</A>
+</nobr><br>
+<!-- Field DENSITY_TV -->
+<A NAME="D"></A>
+<br><font size="+2">D</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.util.DisplayMetrics.html#android.util.DisplayMetrics.DENSITY_TV" class="hiddenlink" target="rightframe">DENSITY_TV</A>
+</nobr><br>
+<!-- Method describeContents -->
+<i>describeContents</i><br>
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.Point.html#android.graphics.Point.describeContents_added()" class="hiddenlink" target="rightframe">type&nbsp;<b>
+()</b>&nbsp;in&nbsp;android.graphics.Point
+</A></nobr><br>
+<!-- Method describeContents -->
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.PointF.html#android.graphics.PointF.describeContents_added()" class="hiddenlink" target="rightframe">type&nbsp;<b>
+()</b>&nbsp;in&nbsp;android.graphics.PointF
+</A></nobr><br>
+<!-- Method detach -->
+<nobr><A HREF="android.app.FragmentTransaction.html#android.app.FragmentTransaction.detach_added(android.app.Fragment)" class="hiddenlink" target="rightframe"><b>detach</b>
+(<code>Fragment</code>)</A></nobr><br>
+<!-- Method dumpAsync -->
+<i>dumpAsync</i><br>
+&nbsp;&nbsp;<nobr><A HREF="android.os.Binder.html#android.os.Binder.dumpAsync_added(java.io.FileDescriptor, java.lang.String[])" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>FileDescriptor, String[]</code>)</b>&nbsp;in&nbsp;android.os.Binder
+</A></nobr><br>
+<!-- Method dumpAsync -->
+&nbsp;&nbsp;<nobr><A HREF="android.os.IBinder.html#android.os.IBinder.dumpAsync_added(java.io.FileDescriptor, java.lang.String[])" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>FileDescriptor, String[]</code>)</b>&nbsp;in&nbsp;android.os.IBinder
+</A></nobr><br>
+<!-- Method dup -->
+<nobr><A HREF="android.os.ParcelFileDescriptor.html#android.os.ParcelFileDescriptor.dup_added(java.io.FileDescriptor)" class="hiddenlink" target="rightframe"><b>dup</b>
+(<code>FileDescriptor</code>)</A></nobr><br>
+<!-- Field FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT -->
+<A NAME="F"></A>
+<br><font size="+2">F</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.content.pm.PackageManager.html#android.content.pm.PackageManager.FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT" class="hiddenlink" target="rightframe">FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT</A>
+</nobr><br>
+<!-- Field FEATURE_FAKETOUCH_MULTITOUCH_JAZZHAND -->
+<nobr><A HREF="android.content.pm.PackageManager.html#android.content.pm.PackageManager.FEATURE_FAKETOUCH_MULTITOUCH_JAZZHAND" class="hiddenlink" target="rightframe">FEATURE_FAKETOUCH_MULTITOUCH_JAZZHAND</A>
+</nobr><br>
+<!-- Field FEATURE_SCREEN_LANDSCAPE -->
+<nobr><A HREF="android.content.pm.PackageManager.html#android.content.pm.PackageManager.FEATURE_SCREEN_LANDSCAPE" class="hiddenlink" target="rightframe">FEATURE_SCREEN_LANDSCAPE</A>
+</nobr><br>
+<!-- Field FEATURE_SCREEN_PORTRAIT -->
+<nobr><A HREF="android.content.pm.PackageManager.html#android.content.pm.PackageManager.FEATURE_SCREEN_PORTRAIT" class="hiddenlink" target="rightframe">FEATURE_SCREEN_PORTRAIT</A>
+</nobr><br>
+<!-- Class Fragment.SavedState -->
+<A HREF="pkg_android.app.html#Fragment.SavedState" class="hiddenlink" target="rightframe"><b>Fragment.SavedState</b></A><br>
+<!-- Method fromFd -->
+<nobr><A HREF="android.os.ParcelFileDescriptor.html#android.os.ParcelFileDescriptor.fromFd_added(int)" class="hiddenlink" target="rightframe"><b>fromFd</b>
+(<code>int</code>)</A></nobr><br>
+<!-- Method getModifiers -->
+<A NAME="G"></A>
+<br><font size="+2">G</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.view.KeyEvent.html#android.view.KeyEvent.getModifiers_added()" class="hiddenlink" target="rightframe"><b>getModifiers</b>
+()</A></nobr><br>
+<!-- Method getRawDescriptors -->
+<nobr><A HREF="android.hardware.usb.UsbDeviceConnection.html#android.hardware.usb.UsbDeviceConnection.getRawDescriptors_added()" class="hiddenlink" target="rightframe"><b>getRawDescriptors</b>
+()</A></nobr><br>
+<!-- Method getRectSize -->
+<nobr><A HREF="android.view.Display.html#android.view.Display.getRectSize_added(android.graphics.Rect)" class="hiddenlink" target="rightframe"><b>getRectSize</b>
+(<code>Rect</code>)</A></nobr><br>
+<!-- Method getSize -->
+<nobr><A HREF="android.view.Display.html#android.view.Display.getSize_added(android.graphics.Point)" class="hiddenlink" target="rightframe"><b>getSize</b>
+(<code>Point</code>)</A></nobr><br>
+<!-- Field HONEYCOMB_MR2 -->
+<A NAME="H"></A>
+<br><font size="+2">H</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.os.Build.VERSION_CODES.html#android.os.Build.VERSION_CODES.HONEYCOMB_MR2" class="hiddenlink" target="rightframe">HONEYCOMB_MR2</A>
+</nobr><br>
+<!-- Method isDetached -->
+<A NAME="I"></A>
+<br><font size="+2">I</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.Fragment.html#android.app.Fragment.isDetached_added()" class="hiddenlink" target="rightframe"><b>isDetached</b>
+()</A></nobr><br>
+<!-- Field largestWidthLimitDp -->
+<A NAME="L"></A>
+<br><font size="+2">L</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<i>largestWidthLimitDp</i><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.R.attr.html#android.R.attr.largestWidthLimitDp" class="hiddenlink" target="rightframe">android.R.attr</A>
+</nobr><br>
+<!-- Field largestWidthLimitDp -->
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.content.pm.ApplicationInfo.html#android.content.pm.ApplicationInfo.largestWidthLimitDp" class="hiddenlink" target="rightframe">android.content.pm.ApplicationInfo</A>
+</nobr><br>
+<!-- Field NETWORK_TYPE_HSPAP -->
+<A NAME="N"></A>
+<br><font size="+2">N</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.telephony.TelephonyManager.html#android.telephony.TelephonyManager.NETWORK_TYPE_HSPAP" class="hiddenlink" target="rightframe">NETWORK_TYPE_HSPAP</A>
+</nobr><br>
+<!-- Method onViewCreated -->
+<A NAME="O"></A>
+<br><font size="+2">O</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.Fragment.html#android.app.Fragment.onViewCreated_added(android.view.View, android.os.Bundle)" class="hiddenlink" target="rightframe"><b>onViewCreated</b>
+(<code>View, Bundle</code>)</A></nobr><br>
+<!-- Class Parcelable.ClassLoaderCreator -->
+<A NAME="P"></A>
+<br><font size="+2">P</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="pkg_android.os.html#Parcelable.ClassLoaderCreator" class="hiddenlink" target="rightframe"><b><i>Parcelable.ClassLoaderCreator</i></b></A><br>
+<!-- Method readFromParcel -->
+<A NAME="R"></A>
+<br><font size="+2">R</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<i>readFromParcel</i><br>
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.Point.html#android.graphics.Point.readFromParcel_added(android.os.Parcel)" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>Parcel</code>)</b>&nbsp;in&nbsp;android.graphics.Point
+</A></nobr><br>
+<!-- Method readFromParcel -->
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.PointF.html#android.graphics.PointF.readFromParcel_added(android.os.Parcel)" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>Parcel</code>)</b>&nbsp;in&nbsp;android.graphics.PointF
+</A></nobr><br>
+<!-- Field requiresSmallestWidthDp -->
+<i>requiresSmallestWidthDp</i><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.R.attr.html#android.R.attr.requiresSmallestWidthDp" class="hiddenlink" target="rightframe">android.R.attr</A>
+</nobr><br>
+<!-- Field requiresSmallestWidthDp -->
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.content.pm.ApplicationInfo.html#android.content.pm.ApplicationInfo.requiresSmallestWidthDp" class="hiddenlink" target="rightframe">android.content.pm.ApplicationInfo</A>
+</nobr><br>
+<!-- Method saveFragmentInstanceState -->
+<A NAME="S"></A>
+<br><font size="+2">S</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.FragmentManager.html#android.app.FragmentManager.saveFragmentInstanceState_added(android.app.Fragment)" class="hiddenlink" target="rightframe"><b>saveFragmentInstanceState</b>
+(<code>Fragment</code>)</A></nobr><br>
+<!-- Field SCREEN_HEIGHT_DP_UNDEFINED -->
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.SCREEN_HEIGHT_DP_UNDEFINED" class="hiddenlink" target="rightframe">SCREEN_HEIGHT_DP_UNDEFINED</A>
+</nobr><br>
+<!-- Field SCREEN_WIDTH_DP_UNDEFINED -->
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.SCREEN_WIDTH_DP_UNDEFINED" class="hiddenlink" target="rightframe">SCREEN_WIDTH_DP_UNDEFINED</A>
+</nobr><br>
+<!-- Field screenHeightDp -->
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.screenHeightDp" class="hiddenlink" target="rightframe">screenHeightDp</A>
+</nobr><br>
+<!-- Field screenWidthDp -->
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.screenWidthDp" class="hiddenlink" target="rightframe">screenWidthDp</A>
+</nobr><br>
+<!-- Field SET_POINTER_SPEED -->
+<nobr><A HREF="android.Manifest.permission.html#android.Manifest.permission.SET_POINTER_SPEED" class="hiddenlink" target="rightframe">SET_POINTER_SPEED</A>
+</nobr><br>
+<!-- Method setCustomAnimations -->
+<nobr><A HREF="android.app.FragmentTransaction.html#android.app.FragmentTransaction.setCustomAnimations_added(int, int, int, int)" class="hiddenlink" target="rightframe"><b>setCustomAnimations</b>
+(<code>int, int, int, int</code>)</A></nobr><br>
+<!-- Method setInitialSavedState -->
+<nobr><A HREF="android.app.Fragment.html#android.app.Fragment.setInitialSavedState_added(android.app.Fragment.SavedState)" class="hiddenlink" target="rightframe"><b>setInitialSavedState</b>
+(<code>SavedState</code>)</A></nobr><br>
+<!-- Field SMALLEST_SCREEN_WIDTH_DP_UNDEFINED -->
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.SMALLEST_SCREEN_WIDTH_DP_UNDEFINED" class="hiddenlink" target="rightframe">SMALLEST_SCREEN_WIDTH_DP_UNDEFINED</A>
+</nobr><br>
+<!-- Field smallestScreenWidthDp -->
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.smallestScreenWidthDp" class="hiddenlink" target="rightframe">smallestScreenWidthDp</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo -->
+<A NAME="T"></A>
+<br><font size="+2">T</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo" class="hiddenlink" target="rightframe">TextAppearance_Holo</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_DialogWindowTitle -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_DialogWindowTitle" class="hiddenlink" target="rightframe">TextAppearance_Holo_DialogWindowTitle</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Inverse -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Inverse" class="hiddenlink" target="rightframe">TextAppearance_Holo_Inverse</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Large -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Large" class="hiddenlink" target="rightframe">TextAppearance_Holo_Large</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Large_Inverse -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Large_Inverse" class="hiddenlink" target="rightframe">TextAppearance_Holo_Large_Inverse</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Medium -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Medium" class="hiddenlink" target="rightframe">TextAppearance_Holo_Medium</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Medium_Inverse -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Medium_Inverse" class="hiddenlink" target="rightframe">TextAppearance_Holo_Medium_Inverse</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_SearchResult_Subtitle -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_SearchResult_Subtitle" class="hiddenlink" target="rightframe">TextAppearance_Holo_SearchResult_Subtitle</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_SearchResult_Title -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_SearchResult_Title" class="hiddenlink" target="rightframe">TextAppearance_Holo_SearchResult_Title</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Small -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Small" class="hiddenlink" target="rightframe">TextAppearance_Holo_Small</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Small_Inverse -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Small_Inverse" class="hiddenlink" target="rightframe">TextAppearance_Holo_Small_Inverse</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_ActionBar_Subtitle -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_ActionBar_Subtitle" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_ActionBar_Subtitle</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_ActionBar_Title -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_ActionBar_Title" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_ActionBar_Title</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_ActionMode_Subtitle -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_ActionMode_Subtitle" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_ActionMode_Subtitle</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_ActionMode_Title -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_ActionMode_Title" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_ActionMode_Title</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_Button -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_Button" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_Button</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_DropDownHint -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_DropDownHint" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_DropDownHint</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_DropDownItem -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_DropDownItem" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_DropDownItem</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_EditText -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_EditText" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_EditText</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_IconMenu_Item -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_IconMenu_Item" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_IconMenu_Item</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_PopupMenu -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_PopupMenu" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_PopupMenu</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_PopupMenu_Large -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_PopupMenu_Large" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_PopupMenu_Large</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_PopupMenu_Small -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_PopupMenu_Small" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_PopupMenu_Small</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_TabWidget -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_TabWidget" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_TabWidget</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_TextView -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_TextView" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_TextView</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_TextView_PopupMenu -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_TextView_PopupMenu" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_TextView_PopupMenu</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_TextView_SpinnerItem -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_TextView_SpinnerItem" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_TextView_SpinnerItem</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_WindowTitle -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_WindowTitle" class="hiddenlink" target="rightframe">TextAppearance_Holo_WindowTitle</A>
+</nobr><br>
+<!-- Field Theme_Holo_Light_NoActionBar -->
+<nobr><A HREF="android.R.style.html#android.R.style.Theme_Holo_Light_NoActionBar" class="hiddenlink" target="rightframe">Theme_Holo_Light_NoActionBar</A>
+</nobr><br>
+<!-- Field Theme_Holo_Light_NoActionBar_Fullscreen -->
+<nobr><A HREF="android.R.style.html#android.R.style.Theme_Holo_Light_NoActionBar_Fullscreen" class="hiddenlink" target="rightframe">Theme_Holo_Light_NoActionBar_Fullscreen</A>
+</nobr><br>
+<!-- Field TWEET_TRANSACTION -->
+<nobr><A HREF="android.os.IBinder.html#android.os.IBinder.TWEET_TRANSACTION" class="hiddenlink" target="rightframe">TWEET_TRANSACTION</A>
+</nobr><br>
+<!-- Field TYPE_BLUETOOTH -->
+<nobr><A HREF="android.net.ConnectivityManager.html#android.net.ConnectivityManager.TYPE_BLUETOOTH" class="hiddenlink" target="rightframe">TYPE_BLUETOOTH</A>
+</nobr><br>
+<!-- Field TYPE_ETHERNET -->
+<nobr><A HREF="android.net.ConnectivityManager.html#android.net.ConnectivityManager.TYPE_ETHERNET" class="hiddenlink" target="rightframe">TYPE_ETHERNET</A>
+</nobr><br>
+<!-- Field UI_MODE_TYPE_TELEVISION -->
+<A NAME="U"></A>
+<br><font size="+2">U</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.UI_MODE_TYPE_TELEVISION" class="hiddenlink" target="rightframe">UI_MODE_TYPE_TELEVISION</A>
+</nobr><br>
+<!-- Field Widget_ActionBar_TabBar -->
+<A NAME="W"></A>
+<br><font size="+2">W</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_ActionBar_TabBar" class="hiddenlink" target="rightframe">Widget_ActionBar_TabBar</A>
+</nobr><br>
+<!-- Field Widget_ActionBar_TabText -->
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_ActionBar_TabText" class="hiddenlink" target="rightframe">Widget_ActionBar_TabText</A>
+</nobr><br>
+<!-- Field Widget_ActionBar_TabView -->
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_ActionBar_TabView" class="hiddenlink" target="rightframe">Widget_ActionBar_TabView</A>
+</nobr><br>
+<!-- Field Widget_Holo_ActionBar_TabBar -->
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_ActionBar_TabBar" class="hiddenlink" target="rightframe">Widget_Holo_ActionBar_TabBar</A>
+</nobr><br>
+<!-- Field Widget_Holo_ActionBar_TabText -->
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_ActionBar_TabText" class="hiddenlink" target="rightframe">Widget_Holo_ActionBar_TabText</A>
+</nobr><br>
+<!-- Field Widget_Holo_ActionBar_TabView -->
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_ActionBar_TabView" class="hiddenlink" target="rightframe">Widget_Holo_ActionBar_TabView</A>
+</nobr><br>
+<!-- Field Widget_Holo_Light_ActionBar_TabBar -->
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_Light_ActionBar_TabBar" class="hiddenlink" target="rightframe">Widget_Holo_Light_ActionBar_TabBar</A>
+</nobr><br>
+<!-- Field Widget_Holo_Light_ActionBar_TabText -->
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_Light_ActionBar_TabText" class="hiddenlink" target="rightframe">Widget_Holo_Light_ActionBar_TabText</A>
+</nobr><br>
+<!-- Field Widget_Holo_Light_ActionBar_TabView -->
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_Light_ActionBar_TabView" class="hiddenlink" target="rightframe">Widget_Holo_Light_ActionBar_TabView</A>
+</nobr><br>
+<!-- Method writeToParcel -->
+<i>writeToParcel</i><br>
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.Point.html#android.graphics.Point.writeToParcel_added(android.os.Parcel, int)" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>Parcel, int</code>)</b>&nbsp;in&nbsp;android.graphics.Point
+</A></nobr><br>
+<!-- Method writeToParcel -->
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.PointF.html#android.graphics.PointF.writeToParcel_added(android.os.Parcel, int)" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>Parcel, int</code>)</b>&nbsp;in&nbsp;android.graphics.PointF
+</A></nobr><br>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/alldiffs_index_all.html b/docs/html/sdk/api_diff/13/changes/alldiffs_index_all.html
new file mode 100644 (file)
index 0000000..a4e428e
--- /dev/null
@@ -0,0 +1,941 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+All Differences Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for All Differences" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<b>All Differences</b>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<A HREF="alldiffs_index_additions.html"xclass="hiddenlink">Additions</A>
+  <br>
+<A HREF="alldiffs_index_changes.html"xclass="hiddenlink">Changes</A>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<!-- Class Activity -->
+<A NAME="A"></A>
+<br><font size="+2">A</font>&nbsp;
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.app.Activity.html" class="hiddenlink" target="rightframe">Activity</A><br>
+<!-- Class ActivityGroup -->
+<A HREF="android.app.ActivityGroup.html" class="hiddenlink" target="rightframe">ActivityGroup</A><br>
+<!-- Class ActivityInfo -->
+<A HREF="android.content.pm.ActivityInfo.html" class="hiddenlink" target="rightframe">ActivityInfo</A><br>
+<!-- Method adoptFd -->
+<nobr><A HREF="android.os.ParcelFileDescriptor.html#android.os.ParcelFileDescriptor.adoptFd_added(int)" class="hiddenlink" target="rightframe"><b>adoptFd</b>
+(<code>int</code>)</A></nobr><br>
+<!-- Package android -->
+<A HREF="pkg_android.html" class="hiddenlink" target="rightframe">android</A><br>
+<!-- Package android.app -->
+<A HREF="pkg_android.app.html" class="hiddenlink" target="rightframe">android.app</A><br>
+<!-- Package android.content.pm -->
+<A HREF="pkg_android.content.pm.html" class="hiddenlink" target="rightframe">android.content.pm</A><br>
+<!-- Package android.content.res -->
+<A HREF="pkg_android.content.res.html" class="hiddenlink" target="rightframe">android.content.res</A><br>
+<!-- Package android.graphics -->
+<A HREF="pkg_android.graphics.html" class="hiddenlink" target="rightframe">android.graphics</A><br>
+<!-- Package android.hardware.usb -->
+<A HREF="pkg_android.hardware.usb.html" class="hiddenlink" target="rightframe">android.hardware.usb</A><br>
+<!-- Package android.net -->
+<A HREF="pkg_android.net.html" class="hiddenlink" target="rightframe">android.net</A><br>
+<!-- Package android.os -->
+<A HREF="pkg_android.os.html" class="hiddenlink" target="rightframe">android.os</A><br>
+<!-- Package android.telephony -->
+<A HREF="pkg_android.telephony.html" class="hiddenlink" target="rightframe">android.telephony</A><br>
+<!-- Package android.util -->
+<A HREF="pkg_android.util.html" class="hiddenlink" target="rightframe">android.util</A><br>
+<!-- Package android.view -->
+<A HREF="pkg_android.view.html" class="hiddenlink" target="rightframe">android.view</A><br>
+<!-- Class ApplicationInfo -->
+<A HREF="android.content.pm.ApplicationInfo.html" class="hiddenlink" target="rightframe">ApplicationInfo</A><br>
+<!-- Method attach -->
+<nobr><A HREF="android.app.FragmentTransaction.html#android.app.FragmentTransaction.attach_added(android.app.Fragment)" class="hiddenlink" target="rightframe"><b>attach</b>
+(<code>Fragment</code>)</A></nobr><br>
+<!-- Class Binder -->
+<A NAME="B"></A>
+<br><font size="+2">B</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.os.Binder.html" class="hiddenlink" target="rightframe">Binder</A><br>
+<!-- Class Build.VERSION_CODES -->
+<A HREF="android.os.Build.VERSION_CODES.html" class="hiddenlink" target="rightframe">Build.VERSION_CODES</A><br>
+<!-- Field compatibleWidthLimitDp -->
+<A NAME="C"></A>
+<br><font size="+2">C</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<i>compatibleWidthLimitDp</i><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.R.attr.html#android.R.attr.compatibleWidthLimitDp" class="hiddenlink" target="rightframe">android.R.attr</A>
+</nobr><br>
+<!-- Field compatibleWidthLimitDp -->
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.content.pm.ApplicationInfo.html#android.content.pm.ApplicationInfo.compatibleWidthLimitDp" class="hiddenlink" target="rightframe">android.content.pm.ApplicationInfo</A>
+</nobr><br>
+<!-- Field CONFIG_SCREEN_SIZE -->
+<nobr><A HREF="android.content.pm.ActivityInfo.html#android.content.pm.ActivityInfo.CONFIG_SCREEN_SIZE" class="hiddenlink" target="rightframe">CONFIG_SCREEN_SIZE</A>
+</nobr><br>
+<!-- Field CONFIG_SMALLEST_SCREEN_SIZE -->
+<nobr><A HREF="android.content.pm.ActivityInfo.html#android.content.pm.ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE" class="hiddenlink" target="rightframe">CONFIG_SMALLEST_SCREEN_SIZE</A>
+</nobr><br>
+<!-- Class Configuration -->
+<A HREF="android.content.res.Configuration.html" class="hiddenlink" target="rightframe">Configuration</A><br>
+<!-- Class ConnectivityManager -->
+<A HREF="android.net.ConnectivityManager.html" class="hiddenlink" target="rightframe">ConnectivityManager</A><br>
+<!-- Field CREATOR -->
+<i>CREATOR</i><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.graphics.Point.html#android.graphics.Point.CREATOR" class="hiddenlink" target="rightframe">android.graphics.Point</A>
+</nobr><br>
+<!-- Field CREATOR -->
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.graphics.PointF.html#android.graphics.PointF.CREATOR" class="hiddenlink" target="rightframe">android.graphics.PointF</A>
+</nobr><br>
+<!-- Field DENSITY_TV -->
+<A NAME="D"></A>
+<br><font size="+2">D</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.util.DisplayMetrics.html#android.util.DisplayMetrics.DENSITY_TV" class="hiddenlink" target="rightframe">DENSITY_TV</A>
+</nobr><br>
+<!-- Method describeContents -->
+<i>describeContents</i><br>
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.Point.html#android.graphics.Point.describeContents_added()" class="hiddenlink" target="rightframe">type&nbsp;<b>
+()</b>&nbsp;in&nbsp;android.graphics.Point
+</A></nobr><br>
+<!-- Method describeContents -->
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.PointF.html#android.graphics.PointF.describeContents_added()" class="hiddenlink" target="rightframe">type&nbsp;<b>
+()</b>&nbsp;in&nbsp;android.graphics.PointF
+</A></nobr><br>
+<!-- Method detach -->
+<nobr><A HREF="android.app.FragmentTransaction.html#android.app.FragmentTransaction.detach_added(android.app.Fragment)" class="hiddenlink" target="rightframe"><b>detach</b>
+(<code>Fragment</code>)</A></nobr><br>
+<!-- Method dismissDialog -->
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.dismissDialog_changed(int)" class="hiddenlink" target="rightframe">dismissDialog
+(<code>int</code>)</A></nobr><br>
+<!-- Class Display -->
+<A HREF="android.view.Display.html" class="hiddenlink" target="rightframe">Display</A><br>
+<!-- Class DisplayMetrics -->
+<A HREF="android.util.DisplayMetrics.html" class="hiddenlink" target="rightframe">DisplayMetrics</A><br>
+<!-- Method dumpAsync -->
+<i>dumpAsync</i><br>
+&nbsp;&nbsp;<nobr><A HREF="android.os.Binder.html#android.os.Binder.dumpAsync_added(java.io.FileDescriptor, java.lang.String[])" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>FileDescriptor, String[]</code>)</b>&nbsp;in&nbsp;android.os.Binder
+</A></nobr><br>
+<!-- Method dumpAsync -->
+&nbsp;&nbsp;<nobr><A HREF="android.os.IBinder.html#android.os.IBinder.dumpAsync_added(java.io.FileDescriptor, java.lang.String[])" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>FileDescriptor, String[]</code>)</b>&nbsp;in&nbsp;android.os.IBinder
+</A></nobr><br>
+<!-- Method dup -->
+<nobr><A HREF="android.os.ParcelFileDescriptor.html#android.os.ParcelFileDescriptor.dup_added(java.io.FileDescriptor)" class="hiddenlink" target="rightframe"><b>dup</b>
+(<code>FileDescriptor</code>)</A></nobr><br>
+<!-- Method exitKeyguardSecurely -->
+<A NAME="E"></A>
+<br><font size="+2">E</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.KeyguardManager.html#android.app.KeyguardManager.exitKeyguardSecurely_changed(android.app.KeyguardManager.OnKeyguardExitResult)" class="hiddenlink" target="rightframe">exitKeyguardSecurely
+(<code>OnKeyguardExitResult</code>)</A></nobr><br>
+<!-- Field FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT -->
+<A NAME="F"></A>
+<br><font size="+2">F</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.content.pm.PackageManager.html#android.content.pm.PackageManager.FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT" class="hiddenlink" target="rightframe">FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT</A>
+</nobr><br>
+<!-- Field FEATURE_FAKETOUCH_MULTITOUCH_JAZZHAND -->
+<nobr><A HREF="android.content.pm.PackageManager.html#android.content.pm.PackageManager.FEATURE_FAKETOUCH_MULTITOUCH_JAZZHAND" class="hiddenlink" target="rightframe">FEATURE_FAKETOUCH_MULTITOUCH_JAZZHAND</A>
+</nobr><br>
+<!-- Field FEATURE_SCREEN_LANDSCAPE -->
+<nobr><A HREF="android.content.pm.PackageManager.html#android.content.pm.PackageManager.FEATURE_SCREEN_LANDSCAPE" class="hiddenlink" target="rightframe">FEATURE_SCREEN_LANDSCAPE</A>
+</nobr><br>
+<!-- Field FEATURE_SCREEN_PORTRAIT -->
+<nobr><A HREF="android.content.pm.PackageManager.html#android.content.pm.PackageManager.FEATURE_SCREEN_PORTRAIT" class="hiddenlink" target="rightframe">FEATURE_SCREEN_PORTRAIT</A>
+</nobr><br>
+<!-- Class Fragment -->
+<A HREF="android.app.Fragment.html" class="hiddenlink" target="rightframe">Fragment</A><br>
+<!-- Class Fragment.SavedState -->
+<A HREF="pkg_android.app.html#Fragment.SavedState" class="hiddenlink" target="rightframe"><b>Fragment.SavedState</b></A><br>
+<!-- Class FragmentManager -->
+<A HREF="android.app.FragmentManager.html" class="hiddenlink" target="rightframe">FragmentManager</A><br>
+<!-- Class FragmentTransaction -->
+<A HREF="android.app.FragmentTransaction.html" class="hiddenlink" target="rightframe">FragmentTransaction</A><br>
+<!-- Method fromFd -->
+<nobr><A HREF="android.os.ParcelFileDescriptor.html#android.os.ParcelFileDescriptor.fromFd_added(int)" class="hiddenlink" target="rightframe"><b>fromFd</b>
+(<code>int</code>)</A></nobr><br>
+<!-- Method getHeight -->
+<A NAME="G"></A>
+<br><font size="+2">G</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.view.Display.html#android.view.Display.getHeight_changed()" class="hiddenlink" target="rightframe">getHeight
+()</A></nobr><br>
+<!-- Method getLastNonConfigurationInstance -->
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.getLastNonConfigurationInstance_changed()" class="hiddenlink" target="rightframe">getLastNonConfigurationInstance
+()</A></nobr><br>
+<!-- Method getModifiers -->
+<nobr><A HREF="android.view.KeyEvent.html#android.view.KeyEvent.getModifiers_added()" class="hiddenlink" target="rightframe"><b>getModifiers</b>
+()</A></nobr><br>
+<!-- Method getRawDescriptors -->
+<nobr><A HREF="android.hardware.usb.UsbDeviceConnection.html#android.hardware.usb.UsbDeviceConnection.getRawDescriptors_added()" class="hiddenlink" target="rightframe"><b>getRawDescriptors</b>
+()</A></nobr><br>
+<!-- Method getRectSize -->
+<nobr><A HREF="android.view.Display.html#android.view.Display.getRectSize_added(android.graphics.Rect)" class="hiddenlink" target="rightframe"><b>getRectSize</b>
+(<code>Rect</code>)</A></nobr><br>
+<!-- Method getSize -->
+<nobr><A HREF="android.view.Display.html#android.view.Display.getSize_added(android.graphics.Point)" class="hiddenlink" target="rightframe"><b>getSize</b>
+(<code>Point</code>)</A></nobr><br>
+<!-- Method getWidth -->
+<nobr><A HREF="android.view.Display.html#android.view.Display.getWidth_changed()" class="hiddenlink" target="rightframe">getWidth
+()</A></nobr><br>
+<!-- Field HONEYCOMB_MR2 -->
+<A NAME="H"></A>
+<br><font size="+2">H</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.os.Build.VERSION_CODES.html#android.os.Build.VERSION_CODES.HONEYCOMB_MR2" class="hiddenlink" target="rightframe">HONEYCOMB_MR2</A>
+</nobr><br>
+<!-- Class IBinder -->
+<A NAME="I"></A>
+<br><font size="+2">I</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.os.IBinder.html" class="hiddenlink" target="rightframe"><i>IBinder</i></A><br>
+<!-- Method isDetached -->
+<nobr><A HREF="android.app.Fragment.html#android.app.Fragment.isDetached_added()" class="hiddenlink" target="rightframe"><b>isDetached</b>
+()</A></nobr><br>
+<!-- Class KeyEvent -->
+<A NAME="K"></A>
+<br><font size="+2">K</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.view.KeyEvent.html" class="hiddenlink" target="rightframe">KeyEvent</A><br>
+<!-- Class KeyguardManager -->
+<A HREF="android.app.KeyguardManager.html" class="hiddenlink" target="rightframe">KeyguardManager</A><br>
+<!-- Class KeyguardManager.KeyguardLock -->
+<A HREF="android.app.KeyguardManager.KeyguardLock.html" class="hiddenlink" target="rightframe">KeyguardManager.KeyguardLock</A><br>
+<!-- Field largestWidthLimitDp -->
+<A NAME="L"></A>
+<br><font size="+2">L</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<i>largestWidthLimitDp</i><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.R.attr.html#android.R.attr.largestWidthLimitDp" class="hiddenlink" target="rightframe">android.R.attr</A>
+</nobr><br>
+<!-- Field largestWidthLimitDp -->
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.content.pm.ApplicationInfo.html#android.content.pm.ApplicationInfo.largestWidthLimitDp" class="hiddenlink" target="rightframe">android.content.pm.ApplicationInfo</A>
+</nobr><br>
+<!-- Class LocalActivityManager -->
+<A HREF="android.app.LocalActivityManager.html" class="hiddenlink" target="rightframe">LocalActivityManager</A><br>
+<!-- Class Manifest.permission -->
+<A NAME="M"></A>
+<br><font size="+2">M</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.Manifest.permission.html" class="hiddenlink" target="rightframe">Manifest.permission</A><br>
+<!-- Field NETWORK_TYPE_HSPAP -->
+<A NAME="N"></A>
+<br><font size="+2">N</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.telephony.TelephonyManager.html#android.telephony.TelephonyManager.NETWORK_TYPE_HSPAP" class="hiddenlink" target="rightframe">NETWORK_TYPE_HSPAP</A>
+</nobr><br>
+<!-- Method newKeyguardLock -->
+<nobr><A HREF="android.app.KeyguardManager.html#android.app.KeyguardManager.newKeyguardLock_changed(java.lang.String)" class="hiddenlink" target="rightframe">newKeyguardLock
+(<code>String</code>)</A></nobr><br>
+<!-- Method onCreateDialog -->
+<A NAME="O"></A>
+<br><font size="+2">O</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.onCreateDialog_changed(int, android.os.Bundle)" class="hiddenlink" target="rightframe">onCreateDialog
+(<code>int, Bundle</code>)</A></nobr><br>
+<!-- Method onPrepareDialog -->
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.onPrepareDialog_changed(int, android.app.Dialog, android.os.Bundle)" class="hiddenlink" target="rightframe">onPrepareDialog
+(<code>int, Dialog, Bundle</code>)</A></nobr><br>
+<!-- Method onRetainNonConfigurationInstance -->
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.onRetainNonConfigurationInstance_changed()" class="hiddenlink" target="rightframe">onRetainNonConfigurationInstance
+()</A></nobr><br>
+<!-- Method onViewCreated -->
+<nobr><A HREF="android.app.Fragment.html#android.app.Fragment.onViewCreated_added(android.view.View, android.os.Bundle)" class="hiddenlink" target="rightframe"><b>onViewCreated</b>
+(<code>View, Bundle</code>)</A></nobr><br>
+<!-- Class PackageManager -->
+<A NAME="P"></A>
+<br><font size="+2">P</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.content.pm.PackageManager.html" class="hiddenlink" target="rightframe">PackageManager</A><br>
+<!-- Class Parcelable.ClassLoaderCreator -->
+<A HREF="pkg_android.os.html#Parcelable.ClassLoaderCreator" class="hiddenlink" target="rightframe"><b><i>Parcelable.ClassLoaderCreator</i></b></A><br>
+<!-- Class ParcelFileDescriptor -->
+<A HREF="android.os.ParcelFileDescriptor.html" class="hiddenlink" target="rightframe">ParcelFileDescriptor</A><br>
+<!-- Class Point -->
+<A HREF="android.graphics.Point.html" class="hiddenlink" target="rightframe">Point</A><br>
+<!-- Class PointF -->
+<A HREF="android.graphics.PointF.html" class="hiddenlink" target="rightframe">PointF</A><br>
+<!-- Class PowerManager -->
+<A HREF="android.os.PowerManager.html" class="hiddenlink" target="rightframe">PowerManager</A><br>
+<!-- Class R.attr -->
+<A NAME="R"></A>
+<br><font size="+2">R</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.R.attr.html" class="hiddenlink" target="rightframe">R.attr</A><br>
+<!-- Class R.style -->
+<A HREF="android.R.style.html" class="hiddenlink" target="rightframe">R.style</A><br>
+<!-- Method readFromParcel -->
+<i>readFromParcel</i><br>
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.Point.html#android.graphics.Point.readFromParcel_added(android.os.Parcel)" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>Parcel</code>)</b>&nbsp;in&nbsp;android.graphics.Point
+</A></nobr><br>
+<!-- Method readFromParcel -->
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.PointF.html#android.graphics.PointF.readFromParcel_added(android.os.Parcel)" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>Parcel</code>)</b>&nbsp;in&nbsp;android.graphics.PointF
+</A></nobr><br>
+<!-- Method removeDialog -->
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.removeDialog_changed(int)" class="hiddenlink" target="rightframe">removeDialog
+(<code>int</code>)</A></nobr><br>
+<!-- Field requiresSmallestWidthDp -->
+<i>requiresSmallestWidthDp</i><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.R.attr.html#android.R.attr.requiresSmallestWidthDp" class="hiddenlink" target="rightframe">android.R.attr</A>
+</nobr><br>
+<!-- Field requiresSmallestWidthDp -->
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.content.pm.ApplicationInfo.html#android.content.pm.ApplicationInfo.requiresSmallestWidthDp" class="hiddenlink" target="rightframe">android.content.pm.ApplicationInfo</A>
+</nobr><br>
+<!-- Method saveFragmentInstanceState -->
+<A NAME="S"></A>
+<br><font size="+2">S</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.FragmentManager.html#android.app.FragmentManager.saveFragmentInstanceState_added(android.app.Fragment)" class="hiddenlink" target="rightframe"><b>saveFragmentInstanceState</b>
+(<code>Fragment</code>)</A></nobr><br>
+<!-- Field SCREEN_BRIGHT_WAKE_LOCK -->
+<nobr><A HREF="android.os.PowerManager.html#android.os.PowerManager.SCREEN_BRIGHT_WAKE_LOCK" class="hiddenlink" target="rightframe">SCREEN_BRIGHT_WAKE_LOCK</A>
+</nobr><br>
+<!-- Field SCREEN_HEIGHT_DP_UNDEFINED -->
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.SCREEN_HEIGHT_DP_UNDEFINED" class="hiddenlink" target="rightframe">SCREEN_HEIGHT_DP_UNDEFINED</A>
+</nobr><br>
+<!-- Field SCREEN_WIDTH_DP_UNDEFINED -->
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.SCREEN_WIDTH_DP_UNDEFINED" class="hiddenlink" target="rightframe">SCREEN_WIDTH_DP_UNDEFINED</A>
+</nobr><br>
+<!-- Field screenHeightDp -->
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.screenHeightDp" class="hiddenlink" target="rightframe">screenHeightDp</A>
+</nobr><br>
+<!-- Field screenWidthDp -->
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.screenWidthDp" class="hiddenlink" target="rightframe">screenWidthDp</A>
+</nobr><br>
+<!-- Field SET_POINTER_SPEED -->
+<nobr><A HREF="android.Manifest.permission.html#android.Manifest.permission.SET_POINTER_SPEED" class="hiddenlink" target="rightframe">SET_POINTER_SPEED</A>
+</nobr><br>
+<!-- Method setCustomAnimations -->
+<nobr><A HREF="android.app.FragmentTransaction.html#android.app.FragmentTransaction.setCustomAnimations_added(int, int, int, int)" class="hiddenlink" target="rightframe"><b>setCustomAnimations</b>
+(<code>int, int, int, int</code>)</A></nobr><br>
+<!-- Method setInitialSavedState -->
+<nobr><A HREF="android.app.Fragment.html#android.app.Fragment.setInitialSavedState_added(android.app.Fragment.SavedState)" class="hiddenlink" target="rightframe"><b>setInitialSavedState</b>
+(<code>SavedState</code>)</A></nobr><br>
+<!-- Method showDialog -->
+<i>showDialog</i><br>
+&nbsp;&nbsp;<nobr><A HREF="android.app.Activity.html#android.app.Activity.showDialog_changed(int, android.os.Bundle)" class="hiddenlink" target="rightframe">type&nbsp;
+(<code>int, Bundle</code>)&nbsp;in&nbsp;android.app.Activity
+</A></nobr><br>
+<!-- Method showDialog -->
+&nbsp;&nbsp;<nobr><A HREF="android.app.Activity.html#android.app.Activity.showDialog_changed(int)" class="hiddenlink" target="rightframe">type&nbsp;
+(<code>int</code>)&nbsp;in&nbsp;android.app.Activity
+</A></nobr><br>
+<!-- Field SMALLEST_SCREEN_WIDTH_DP_UNDEFINED -->
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.SMALLEST_SCREEN_WIDTH_DP_UNDEFINED" class="hiddenlink" target="rightframe">SMALLEST_SCREEN_WIDTH_DP_UNDEFINED</A>
+</nobr><br>
+<!-- Field smallestScreenWidthDp -->
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.smallestScreenWidthDp" class="hiddenlink" target="rightframe">smallestScreenWidthDp</A>
+</nobr><br>
+<!-- Class TabActivity -->
+<A NAME="T"></A>
+<br><font size="+2">T</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.app.TabActivity.html" class="hiddenlink" target="rightframe">TabActivity</A><br>
+<!-- Class TelephonyManager -->
+<A HREF="android.telephony.TelephonyManager.html" class="hiddenlink" target="rightframe">TelephonyManager</A><br>
+<!-- Field TextAppearance_Holo -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo" class="hiddenlink" target="rightframe">TextAppearance_Holo</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_DialogWindowTitle -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_DialogWindowTitle" class="hiddenlink" target="rightframe">TextAppearance_Holo_DialogWindowTitle</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Inverse -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Inverse" class="hiddenlink" target="rightframe">TextAppearance_Holo_Inverse</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Large -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Large" class="hiddenlink" target="rightframe">TextAppearance_Holo_Large</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Large_Inverse -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Large_Inverse" class="hiddenlink" target="rightframe">TextAppearance_Holo_Large_Inverse</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Medium -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Medium" class="hiddenlink" target="rightframe">TextAppearance_Holo_Medium</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Medium_Inverse -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Medium_Inverse" class="hiddenlink" target="rightframe">TextAppearance_Holo_Medium_Inverse</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_SearchResult_Subtitle -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_SearchResult_Subtitle" class="hiddenlink" target="rightframe">TextAppearance_Holo_SearchResult_Subtitle</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_SearchResult_Title -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_SearchResult_Title" class="hiddenlink" target="rightframe">TextAppearance_Holo_SearchResult_Title</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Small -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Small" class="hiddenlink" target="rightframe">TextAppearance_Holo_Small</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Small_Inverse -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Small_Inverse" class="hiddenlink" target="rightframe">TextAppearance_Holo_Small_Inverse</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_ActionBar_Subtitle -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_ActionBar_Subtitle" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_ActionBar_Subtitle</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_ActionBar_Title -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_ActionBar_Title" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_ActionBar_Title</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_ActionMode_Subtitle -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_ActionMode_Subtitle" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_ActionMode_Subtitle</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_ActionMode_Title -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_ActionMode_Title" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_ActionMode_Title</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_Button -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_Button" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_Button</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_DropDownHint -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_DropDownHint" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_DropDownHint</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_DropDownItem -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_DropDownItem" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_DropDownItem</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_EditText -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_EditText" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_EditText</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_IconMenu_Item -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_IconMenu_Item" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_IconMenu_Item</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_PopupMenu -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_PopupMenu" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_PopupMenu</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_PopupMenu_Large -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_PopupMenu_Large" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_PopupMenu_Large</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_PopupMenu_Small -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_PopupMenu_Small" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_PopupMenu_Small</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_TabWidget -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_TabWidget" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_TabWidget</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_TextView -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_TextView" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_TextView</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_TextView_PopupMenu -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_TextView_PopupMenu" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_TextView_PopupMenu</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_Widget_TextView_SpinnerItem -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_TextView_SpinnerItem" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_TextView_SpinnerItem</A>
+</nobr><br>
+<!-- Field TextAppearance_Holo_WindowTitle -->
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_WindowTitle" class="hiddenlink" target="rightframe">TextAppearance_Holo_WindowTitle</A>
+</nobr><br>
+<!-- Field Theme_Holo_Light_NoActionBar -->
+<nobr><A HREF="android.R.style.html#android.R.style.Theme_Holo_Light_NoActionBar" class="hiddenlink" target="rightframe">Theme_Holo_Light_NoActionBar</A>
+</nobr><br>
+<!-- Field Theme_Holo_Light_NoActionBar_Fullscreen -->
+<nobr><A HREF="android.R.style.html#android.R.style.Theme_Holo_Light_NoActionBar_Fullscreen" class="hiddenlink" target="rightframe">Theme_Holo_Light_NoActionBar_Fullscreen</A>
+</nobr><br>
+<!-- Field TWEET_TRANSACTION -->
+<nobr><A HREF="android.os.IBinder.html#android.os.IBinder.TWEET_TRANSACTION" class="hiddenlink" target="rightframe">TWEET_TRANSACTION</A>
+</nobr><br>
+<!-- Field TYPE_BLUETOOTH -->
+<nobr><A HREF="android.net.ConnectivityManager.html#android.net.ConnectivityManager.TYPE_BLUETOOTH" class="hiddenlink" target="rightframe">TYPE_BLUETOOTH</A>
+</nobr><br>
+<!-- Field TYPE_ETHERNET -->
+<nobr><A HREF="android.net.ConnectivityManager.html#android.net.ConnectivityManager.TYPE_ETHERNET" class="hiddenlink" target="rightframe">TYPE_ETHERNET</A>
+</nobr><br>
+<!-- Field UI_MODE_TYPE_TELEVISION -->
+<A NAME="U"></A>
+<br><font size="+2">U</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.UI_MODE_TYPE_TELEVISION" class="hiddenlink" target="rightframe">UI_MODE_TYPE_TELEVISION</A>
+</nobr><br>
+<!-- Class UsbDeviceConnection -->
+<A HREF="android.hardware.usb.UsbDeviceConnection.html" class="hiddenlink" target="rightframe">UsbDeviceConnection</A><br>
+<!-- Field Widget_ActionBar_TabBar -->
+<A NAME="W"></A>
+<br><font size="+2">W</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_ActionBar_TabBar" class="hiddenlink" target="rightframe">Widget_ActionBar_TabBar</A>
+</nobr><br>
+<!-- Field Widget_ActionBar_TabText -->
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_ActionBar_TabText" class="hiddenlink" target="rightframe">Widget_ActionBar_TabText</A>
+</nobr><br>
+<!-- Field Widget_ActionBar_TabView -->
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_ActionBar_TabView" class="hiddenlink" target="rightframe">Widget_ActionBar_TabView</A>
+</nobr><br>
+<!-- Field Widget_Holo_ActionBar_TabBar -->
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_ActionBar_TabBar" class="hiddenlink" target="rightframe">Widget_Holo_ActionBar_TabBar</A>
+</nobr><br>
+<!-- Field Widget_Holo_ActionBar_TabText -->
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_ActionBar_TabText" class="hiddenlink" target="rightframe">Widget_Holo_ActionBar_TabText</A>
+</nobr><br>
+<!-- Field Widget_Holo_ActionBar_TabView -->
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_ActionBar_TabView" class="hiddenlink" target="rightframe">Widget_Holo_ActionBar_TabView</A>
+</nobr><br>
+<!-- Field Widget_Holo_Light_ActionBar_TabBar -->
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_Light_ActionBar_TabBar" class="hiddenlink" target="rightframe">Widget_Holo_Light_ActionBar_TabBar</A>
+</nobr><br>
+<!-- Field Widget_Holo_Light_ActionBar_TabText -->
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_Light_ActionBar_TabText" class="hiddenlink" target="rightframe">Widget_Holo_Light_ActionBar_TabText</A>
+</nobr><br>
+<!-- Field Widget_Holo_Light_ActionBar_TabView -->
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_Light_ActionBar_TabView" class="hiddenlink" target="rightframe">Widget_Holo_Light_ActionBar_TabView</A>
+</nobr><br>
+<!-- Method writeToParcel -->
+<i>writeToParcel</i><br>
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.Point.html#android.graphics.Point.writeToParcel_added(android.os.Parcel, int)" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>Parcel, int</code>)</b>&nbsp;in&nbsp;android.graphics.Point
+</A></nobr><br>
+<!-- Method writeToParcel -->
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.PointF.html#android.graphics.PointF.writeToParcel_added(android.os.Parcel, int)" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>Parcel, int</code>)</b>&nbsp;in&nbsp;android.graphics.PointF
+</A></nobr><br>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/alldiffs_index_changes.html b/docs/html/sdk/api_diff/13/changes/alldiffs_index_changes.html
new file mode 100644 (file)
index 0000000..59e766b
--- /dev/null
@@ -0,0 +1,561 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+All Changes Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for All Differences" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<a href="alldiffs_index_all.html" xclass="hiddenlink">All Differences</a>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<A HREF="alldiffs_index_additions.html"xclass="hiddenlink">Additions</A>
+  <br>
+<b>Changes</b>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<!-- Class Activity -->
+<A NAME="A"></A>
+<br><font size="+2">A</font>&nbsp;
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.app.Activity.html" class="hiddenlink" target="rightframe">Activity</A><br>
+<!-- Class ActivityGroup -->
+<A HREF="android.app.ActivityGroup.html" class="hiddenlink" target="rightframe">ActivityGroup</A><br>
+<!-- Class ActivityInfo -->
+<A HREF="android.content.pm.ActivityInfo.html" class="hiddenlink" target="rightframe">ActivityInfo</A><br>
+<!-- Package android -->
+<A HREF="pkg_android.html" class="hiddenlink" target="rightframe">android</A><br>
+<!-- Package android.app -->
+<A HREF="pkg_android.app.html" class="hiddenlink" target="rightframe">android.app</A><br>
+<!-- Package android.content.pm -->
+<A HREF="pkg_android.content.pm.html" class="hiddenlink" target="rightframe">android.content.pm</A><br>
+<!-- Package android.content.res -->
+<A HREF="pkg_android.content.res.html" class="hiddenlink" target="rightframe">android.content.res</A><br>
+<!-- Package android.graphics -->
+<A HREF="pkg_android.graphics.html" class="hiddenlink" target="rightframe">android.graphics</A><br>
+<!-- Package android.hardware.usb -->
+<A HREF="pkg_android.hardware.usb.html" class="hiddenlink" target="rightframe">android.hardware.usb</A><br>
+<!-- Package android.net -->
+<A HREF="pkg_android.net.html" class="hiddenlink" target="rightframe">android.net</A><br>
+<!-- Package android.os -->
+<A HREF="pkg_android.os.html" class="hiddenlink" target="rightframe">android.os</A><br>
+<!-- Package android.telephony -->
+<A HREF="pkg_android.telephony.html" class="hiddenlink" target="rightframe">android.telephony</A><br>
+<!-- Package android.util -->
+<A HREF="pkg_android.util.html" class="hiddenlink" target="rightframe">android.util</A><br>
+<!-- Package android.view -->
+<A HREF="pkg_android.view.html" class="hiddenlink" target="rightframe">android.view</A><br>
+<!-- Class ApplicationInfo -->
+<A HREF="android.content.pm.ApplicationInfo.html" class="hiddenlink" target="rightframe">ApplicationInfo</A><br>
+<!-- Class Binder -->
+<A NAME="B"></A>
+<br><font size="+2">B</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.os.Binder.html" class="hiddenlink" target="rightframe">Binder</A><br>
+<!-- Class Build.VERSION_CODES -->
+<A HREF="android.os.Build.VERSION_CODES.html" class="hiddenlink" target="rightframe">Build.VERSION_CODES</A><br>
+<!-- Class Configuration -->
+<A NAME="C"></A>
+<br><font size="+2">C</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.content.res.Configuration.html" class="hiddenlink" target="rightframe">Configuration</A><br>
+<!-- Class ConnectivityManager -->
+<A HREF="android.net.ConnectivityManager.html" class="hiddenlink" target="rightframe">ConnectivityManager</A><br>
+<!-- Method dismissDialog -->
+<A NAME="D"></A>
+<br><font size="+2">D</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.dismissDialog_changed(int)" class="hiddenlink" target="rightframe">dismissDialog
+(<code>int</code>)</A></nobr><br>
+<!-- Class Display -->
+<A HREF="android.view.Display.html" class="hiddenlink" target="rightframe">Display</A><br>
+<!-- Class DisplayMetrics -->
+<A HREF="android.util.DisplayMetrics.html" class="hiddenlink" target="rightframe">DisplayMetrics</A><br>
+<!-- Method exitKeyguardSecurely -->
+<A NAME="E"></A>
+<br><font size="+2">E</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.KeyguardManager.html#android.app.KeyguardManager.exitKeyguardSecurely_changed(android.app.KeyguardManager.OnKeyguardExitResult)" class="hiddenlink" target="rightframe">exitKeyguardSecurely
+(<code>OnKeyguardExitResult</code>)</A></nobr><br>
+<!-- Class Fragment -->
+<A NAME="F"></A>
+<br><font size="+2">F</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.app.Fragment.html" class="hiddenlink" target="rightframe">Fragment</A><br>
+<!-- Class FragmentManager -->
+<A HREF="android.app.FragmentManager.html" class="hiddenlink" target="rightframe">FragmentManager</A><br>
+<!-- Class FragmentTransaction -->
+<A HREF="android.app.FragmentTransaction.html" class="hiddenlink" target="rightframe">FragmentTransaction</A><br>
+<!-- Method getHeight -->
+<A NAME="G"></A>
+<br><font size="+2">G</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.view.Display.html#android.view.Display.getHeight_changed()" class="hiddenlink" target="rightframe">getHeight
+()</A></nobr><br>
+<!-- Method getLastNonConfigurationInstance -->
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.getLastNonConfigurationInstance_changed()" class="hiddenlink" target="rightframe">getLastNonConfigurationInstance
+()</A></nobr><br>
+<!-- Method getWidth -->
+<nobr><A HREF="android.view.Display.html#android.view.Display.getWidth_changed()" class="hiddenlink" target="rightframe">getWidth
+()</A></nobr><br>
+<!-- Class IBinder -->
+<A NAME="I"></A>
+<br><font size="+2">I</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.os.IBinder.html" class="hiddenlink" target="rightframe"><i>IBinder</i></A><br>
+<!-- Class KeyEvent -->
+<A NAME="K"></A>
+<br><font size="+2">K</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.view.KeyEvent.html" class="hiddenlink" target="rightframe">KeyEvent</A><br>
+<!-- Class KeyguardManager -->
+<A HREF="android.app.KeyguardManager.html" class="hiddenlink" target="rightframe">KeyguardManager</A><br>
+<!-- Class KeyguardManager.KeyguardLock -->
+<A HREF="android.app.KeyguardManager.KeyguardLock.html" class="hiddenlink" target="rightframe">KeyguardManager.KeyguardLock</A><br>
+<!-- Class LocalActivityManager -->
+<A NAME="L"></A>
+<br><font size="+2">L</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.app.LocalActivityManager.html" class="hiddenlink" target="rightframe">LocalActivityManager</A><br>
+<!-- Class Manifest.permission -->
+<A NAME="M"></A>
+<br><font size="+2">M</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.Manifest.permission.html" class="hiddenlink" target="rightframe">Manifest.permission</A><br>
+<!-- Method newKeyguardLock -->
+<A NAME="N"></A>
+<br><font size="+2">N</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.KeyguardManager.html#android.app.KeyguardManager.newKeyguardLock_changed(java.lang.String)" class="hiddenlink" target="rightframe">newKeyguardLock
+(<code>String</code>)</A></nobr><br>
+<!-- Method onCreateDialog -->
+<A NAME="O"></A>
+<br><font size="+2">O</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.onCreateDialog_changed(int, android.os.Bundle)" class="hiddenlink" target="rightframe">onCreateDialog
+(<code>int, Bundle</code>)</A></nobr><br>
+<!-- Method onPrepareDialog -->
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.onPrepareDialog_changed(int, android.app.Dialog, android.os.Bundle)" class="hiddenlink" target="rightframe">onPrepareDialog
+(<code>int, Dialog, Bundle</code>)</A></nobr><br>
+<!-- Method onRetainNonConfigurationInstance -->
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.onRetainNonConfigurationInstance_changed()" class="hiddenlink" target="rightframe">onRetainNonConfigurationInstance
+()</A></nobr><br>
+<!-- Class PackageManager -->
+<A NAME="P"></A>
+<br><font size="+2">P</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.content.pm.PackageManager.html" class="hiddenlink" target="rightframe">PackageManager</A><br>
+<!-- Class ParcelFileDescriptor -->
+<A HREF="android.os.ParcelFileDescriptor.html" class="hiddenlink" target="rightframe">ParcelFileDescriptor</A><br>
+<!-- Class Point -->
+<A HREF="android.graphics.Point.html" class="hiddenlink" target="rightframe">Point</A><br>
+<!-- Class PointF -->
+<A HREF="android.graphics.PointF.html" class="hiddenlink" target="rightframe">PointF</A><br>
+<!-- Class PowerManager -->
+<A HREF="android.os.PowerManager.html" class="hiddenlink" target="rightframe">PowerManager</A><br>
+<!-- Class R.attr -->
+<A NAME="R"></A>
+<br><font size="+2">R</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.R.attr.html" class="hiddenlink" target="rightframe">R.attr</A><br>
+<!-- Class R.style -->
+<A HREF="android.R.style.html" class="hiddenlink" target="rightframe">R.style</A><br>
+<!-- Method removeDialog -->
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.removeDialog_changed(int)" class="hiddenlink" target="rightframe">removeDialog
+(<code>int</code>)</A></nobr><br>
+<!-- Field SCREEN_BRIGHT_WAKE_LOCK -->
+<A NAME="S"></A>
+<br><font size="+2">S</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.os.PowerManager.html#android.os.PowerManager.SCREEN_BRIGHT_WAKE_LOCK" class="hiddenlink" target="rightframe">SCREEN_BRIGHT_WAKE_LOCK</A>
+</nobr><br>
+<!-- Method showDialog -->
+<i>showDialog</i><br>
+&nbsp;&nbsp;<nobr><A HREF="android.app.Activity.html#android.app.Activity.showDialog_changed(int, android.os.Bundle)" class="hiddenlink" target="rightframe">type&nbsp;
+(<code>int, Bundle</code>)&nbsp;in&nbsp;android.app.Activity
+</A></nobr><br>
+<!-- Method showDialog -->
+&nbsp;&nbsp;<nobr><A HREF="android.app.Activity.html#android.app.Activity.showDialog_changed(int)" class="hiddenlink" target="rightframe">type&nbsp;
+(<code>int</code>)&nbsp;in&nbsp;android.app.Activity
+</A></nobr><br>
+<!-- Class TabActivity -->
+<A NAME="T"></A>
+<br><font size="+2">T</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.app.TabActivity.html" class="hiddenlink" target="rightframe">TabActivity</A><br>
+<!-- Class TelephonyManager -->
+<A HREF="android.telephony.TelephonyManager.html" class="hiddenlink" target="rightframe">TelephonyManager</A><br>
+<!-- Class UsbDeviceConnection -->
+<A NAME="U"></A>
+<br><font size="+2">U</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.hardware.usb.UsbDeviceConnection.html" class="hiddenlink" target="rightframe">UsbDeviceConnection</A><br>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/alldiffs_index_removals.html b/docs/html/sdk/api_diff/13/changes/alldiffs_index_removals.html
new file mode 100644 (file)
index 0000000..68d2c20
--- /dev/null
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+All Removals Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for All Differences" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<a href="alldiffs_index_all.html" xclass="hiddenlink">All Differences</a>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<A HREF="alldiffs_index_additions.html"xclass="hiddenlink">Additions</A>
+  <br>
+<A HREF="alldiffs_index_changes.html"xclass="hiddenlink">Changes</A>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.Manifest.permission.html b/docs/html/sdk/api_diff/13/changes/android.Manifest.permission.html
new file mode 100644 (file)
index 0000000..5d3cbda
--- /dev/null
@@ -0,0 +1,122 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.Manifest.permission
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.<A HREF="../../../../reference/android/Manifest.permission.html" target="_top"><font size="+2"><code>Manifest.permission</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<a NAME="fields"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Fields" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Fields</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.Manifest.permission.SET_POINTER_SPEED"></A>
+  <nobr><code>String</code>&nbsp;<A HREF="../../../../reference/android/Manifest.permission.html#SET_POINTER_SPEED" target="_top"><code>SET_POINTER_SPEED</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.R.attr.html b/docs/html/sdk/api_diff/13/changes/android.R.attr.html
new file mode 100644 (file)
index 0000000..f8eb54b
--- /dev/null
@@ -0,0 +1,136 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.R.attr
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.<A HREF="../../../../reference/android/R.attr.html" target="_top"><font size="+2"><code>R.attr</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<a NAME="fields"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Fields" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Fields</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.attr.compatibleWidthLimitDp"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.attr.html#compatibleWidthLimitDp" target="_top"><code>compatibleWidthLimitDp</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.attr.largestWidthLimitDp"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.attr.html#largestWidthLimitDp" target="_top"><code>largestWidthLimitDp</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.attr.requiresSmallestWidthDp"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.attr.html#requiresSmallestWidthDp" target="_top"><code>requiresSmallestWidthDp</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.R.style.html b/docs/html/sdk/api_diff/13/changes/android.R.style.html
new file mode 100644 (file)
index 0000000..9e385e2
--- /dev/null
@@ -0,0 +1,395 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.R.style
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.<A HREF="../../../../reference/android/R.style.html" target="_top"><font size="+2"><code>R.style</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<a NAME="fields"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Fields" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Fields</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo" target="_top"><code>TextAppearance_Holo</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_DialogWindowTitle"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_DialogWindowTitle" target="_top"><code>TextAppearance_Holo_DialogWindowTitle</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Inverse"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Inverse" target="_top"><code>TextAppearance_Holo_Inverse</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Large"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Large" target="_top"><code>TextAppearance_Holo_Large</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Large_Inverse"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Large_Inverse" target="_top"><code>TextAppearance_Holo_Large_Inverse</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Medium"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Medium" target="_top"><code>TextAppearance_Holo_Medium</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Medium_Inverse"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Medium_Inverse" target="_top"><code>TextAppearance_Holo_Medium_Inverse</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_SearchResult_Subtitle"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_SearchResult_Subtitle" target="_top"><code>TextAppearance_Holo_SearchResult_Subtitle</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_SearchResult_Title"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_SearchResult_Title" target="_top"><code>TextAppearance_Holo_SearchResult_Title</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Small"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Small" target="_top"><code>TextAppearance_Holo_Small</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Small_Inverse"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Small_Inverse" target="_top"><code>TextAppearance_Holo_Small_Inverse</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Widget"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Widget" target="_top"><code>TextAppearance_Holo_Widget</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Widget_ActionBar_Subtitle"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Widget_ActionBar_Subtitle" target="_top"><code>TextAppearance_Holo_Widget_ActionBar_Subtitle</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Widget_ActionBar_Title"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Widget_ActionBar_Title" target="_top"><code>TextAppearance_Holo_Widget_ActionBar_Title</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Widget_ActionMode_Subtitle"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Widget_ActionMode_Subtitle" target="_top"><code>TextAppearance_Holo_Widget_ActionMode_Subtitle</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Widget_ActionMode_Title"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Widget_ActionMode_Title" target="_top"><code>TextAppearance_Holo_Widget_ActionMode_Title</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Widget_Button"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Widget_Button" target="_top"><code>TextAppearance_Holo_Widget_Button</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Widget_DropDownHint"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Widget_DropDownHint" target="_top"><code>TextAppearance_Holo_Widget_DropDownHint</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Widget_DropDownItem"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Widget_DropDownItem" target="_top"><code>TextAppearance_Holo_Widget_DropDownItem</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Widget_EditText"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Widget_EditText" target="_top"><code>TextAppearance_Holo_Widget_EditText</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Widget_IconMenu_Item"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Widget_IconMenu_Item" target="_top"><code>TextAppearance_Holo_Widget_IconMenu_Item</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Widget_PopupMenu"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Widget_PopupMenu" target="_top"><code>TextAppearance_Holo_Widget_PopupMenu</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Widget_PopupMenu_Large"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Widget_PopupMenu_Large" target="_top"><code>TextAppearance_Holo_Widget_PopupMenu_Large</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Widget_PopupMenu_Small"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Widget_PopupMenu_Small" target="_top"><code>TextAppearance_Holo_Widget_PopupMenu_Small</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Widget_TabWidget"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Widget_TabWidget" target="_top"><code>TextAppearance_Holo_Widget_TabWidget</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Widget_TextView"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Widget_TextView" target="_top"><code>TextAppearance_Holo_Widget_TextView</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Widget_TextView_PopupMenu"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Widget_TextView_PopupMenu" target="_top"><code>TextAppearance_Holo_Widget_TextView_PopupMenu</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_Widget_TextView_SpinnerItem"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_Widget_TextView_SpinnerItem" target="_top"><code>TextAppearance_Holo_Widget_TextView_SpinnerItem</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.TextAppearance_Holo_WindowTitle"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#TextAppearance_Holo_WindowTitle" target="_top"><code>TextAppearance_Holo_WindowTitle</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.Theme_Holo_Light_NoActionBar"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#Theme_Holo_Light_NoActionBar" target="_top"><code>Theme_Holo_Light_NoActionBar</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.Theme_Holo_Light_NoActionBar_Fullscreen"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#Theme_Holo_Light_NoActionBar_Fullscreen" target="_top"><code>Theme_Holo_Light_NoActionBar_Fullscreen</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.Widget_ActionBar_TabBar"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#Widget_ActionBar_TabBar" target="_top"><code>Widget_ActionBar_TabBar</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.Widget_ActionBar_TabText"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#Widget_ActionBar_TabText" target="_top"><code>Widget_ActionBar_TabText</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.Widget_ActionBar_TabView"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#Widget_ActionBar_TabView" target="_top"><code>Widget_ActionBar_TabView</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.Widget_Holo_ActionBar_TabBar"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#Widget_Holo_ActionBar_TabBar" target="_top"><code>Widget_Holo_ActionBar_TabBar</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.Widget_Holo_ActionBar_TabText"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#Widget_Holo_ActionBar_TabText" target="_top"><code>Widget_Holo_ActionBar_TabText</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.Widget_Holo_ActionBar_TabView"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#Widget_Holo_ActionBar_TabView" target="_top"><code>Widget_Holo_ActionBar_TabView</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.Widget_Holo_Light_ActionBar_TabBar"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#Widget_Holo_Light_ActionBar_TabBar" target="_top"><code>Widget_Holo_Light_ActionBar_TabBar</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.Widget_Holo_Light_ActionBar_TabText"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#Widget_Holo_Light_ActionBar_TabText" target="_top"><code>Widget_Holo_Light_ActionBar_TabText</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.R.style.Widget_Holo_Light_ActionBar_TabView"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/R.style.html#Widget_Holo_Light_ActionBar_TabView" target="_top"><code>Widget_Holo_Light_ActionBar_TabView</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.app.Activity.html b/docs/html/sdk/api_diff/13/changes/android.app.Activity.html
new file mode 100644 (file)
index 0000000..b27816b
--- /dev/null
@@ -0,0 +1,195 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.app.Activity
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.app.<A HREF="../../../../reference/android/app/Activity.html" target="_top"><font size="+2"><code>Activity</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<p>
+<a NAME="Changed"></a>
+<TABLE summary="Changed Methods" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=3>Changed Methods</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.app.Activity.dismissDialog_changed(int)"></A>
+  <nobr><code>void</code>&nbsp;<A HREF="../../../../reference/android/app/Activity.html#dismissDialog(int)" target="_top"><code>dismissDialog</code></A>(<code>int</code>)  </nobr>
+  </TD>
+  <TD VALIGN="TOP" WIDTH="30%">
+<b>Now deprecated</b>.<br>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.app.Activity.getLastNonConfigurationInstance_changed()"></A>
+  <nobr><code>Object</code>&nbsp;<A HREF="../../../../reference/android/app/Activity.html#getLastNonConfigurationInstance()" target="_top"><code>getLastNonConfigurationInstance</code></A>()  </nobr>
+  </TD>
+  <TD VALIGN="TOP" WIDTH="30%">
+<b>Now deprecated</b>.<br>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.app.Activity.onRetainNonConfigurationInstance_changed()"></A>
+  <nobr><code>Object</code>&nbsp;<A HREF="../../../../reference/android/app/Activity.html#onRetainNonConfigurationInstance()" target="_top"><code>onRetainNonConfigurationInstance</code></A>()  </nobr>
+  </TD>
+  <TD VALIGN="TOP" WIDTH="30%">
+<b>Now deprecated</b>.<br>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.app.Activity.removeDialog_changed(int)"></A>
+  <nobr><code>void</code>&nbsp;<A HREF="../../../../reference/android/app/Activity.html#removeDialog(int)" target="_top"><code>removeDialog</code></A>(<code>int</code>)  </nobr>
+  </TD>
+  <TD VALIGN="TOP" WIDTH="30%">
+<b>Now deprecated</b>.<br>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.app.Activity.onCreateDialog_changed(int, android.os.Bundle)"></A>
+  <nobr><code>Dialog</code>&nbsp;<A HREF="../../../../reference/android/app/Activity.html#onCreateDialog(int, android.os.Bundle)" target="_top"><code>onCreateDialog</code></A>(<code>int,</nobr> Bundle<nobr><nobr></code>)  </nobr>
+  </TD>
+  <TD VALIGN="TOP" WIDTH="30%">
+<b>Now deprecated</b>.<br>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.app.Activity.onPrepareDialog_changed(int, android.app.Dialog, android.os.Bundle)"></A>
+  <nobr><code>void</code>&nbsp;<A HREF="../../../../reference/android/app/Activity.html#onPrepareDialog(int, android.app.Dialog, android.os.Bundle)" target="_top"><code>onPrepareDialog</code></A>(<code>int,</nobr> Dialog<nobr>,</nobr> Bundle<nobr><nobr></code>)  </nobr>
+  </TD>
+  <TD VALIGN="TOP" WIDTH="30%">
+<b>Now deprecated</b>.<br>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.app.Activity.showDialog_changed(int, android.os.Bundle)"></A>
+  <nobr><code>boolean</code>&nbsp;<A HREF="../../../../reference/android/app/Activity.html#showDialog(int, android.os.Bundle)" target="_top"><code>showDialog</code></A>(<code>int,</nobr> Bundle<nobr><nobr></code>)  </nobr>
+  </TD>
+  <TD VALIGN="TOP" WIDTH="30%">
+<b>Now deprecated</b>.<br>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.app.Activity.showDialog_changed(int)"></A>
+  <nobr><code>void</code>&nbsp;<A HREF="../../../../reference/android/app/Activity.html#showDialog(int)" target="_top"><code>showDialog</code></A>(<code>int</code>)  </nobr>
+  </TD>
+  <TD VALIGN="TOP" WIDTH="30%">
+<b>Now deprecated</b>.<br>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<a NAME="fields"></a>
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.app.ActivityGroup.html b/docs/html/sdk/api_diff/13/changes/android.app.ActivityGroup.html
new file mode 100644 (file)
index 0000000..c755228
--- /dev/null
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.app.ActivityGroup
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.app.<A HREF="../../../../reference/android/app/ActivityGroup.html" target="_top"><font size="+2"><code>ActivityGroup</code></font></A>
+</H2>
+<p><b>Now deprecated</b>.<br>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<a NAME="fields"></a>
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.app.Fragment.html b/docs/html/sdk/api_diff/13/changes/android.app.Fragment.html
new file mode 100644 (file)
index 0000000..074d4b3
--- /dev/null
@@ -0,0 +1,136 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.app.Fragment
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.app.<A HREF="../../../../reference/android/app/Fragment.html" target="_top"><font size="+2"><code>Fragment</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Methods" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Methods</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.app.Fragment.isDetached_added()"></A>
+  <nobr><code>boolean</code>&nbsp;<A HREF="../../../../reference/android/app/Fragment.html#isDetached()" target="_top"><code>isDetached</code></A>()</nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.app.Fragment.onViewCreated_added(android.view.View, android.os.Bundle)"></A>
+  <nobr><code>void</code>&nbsp;<A HREF="../../../../reference/android/app/Fragment.html#onViewCreated(android.view.View, android.os.Bundle)" target="_top"><code>onViewCreated</code></A>(<code>View,</nobr> Bundle<nobr><nobr></code>)</nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.app.Fragment.setInitialSavedState_added(android.app.Fragment.SavedState)"></A>
+  <nobr><code>void</code>&nbsp;<A HREF="../../../../reference/android/app/Fragment.html#setInitialSavedState(android.app.Fragment.SavedState)" target="_top"><code>setInitialSavedState</code></A>(<code>SavedState</code>)</nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<a NAME="fields"></a>
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.app.FragmentManager.html b/docs/html/sdk/api_diff/13/changes/android.app.FragmentManager.html
new file mode 100644 (file)
index 0000000..159b9c9
--- /dev/null
@@ -0,0 +1,122 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.app.FragmentManager
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.app.<A HREF="../../../../reference/android/app/FragmentManager.html" target="_top"><font size="+2"><code>FragmentManager</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Methods" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Methods</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.app.FragmentManager.saveFragmentInstanceState_added(android.app.Fragment)"></A>
+  <nobr><code>SavedState</code>&nbsp;<A HREF="../../../../reference/android/app/FragmentManager.html#saveFragmentInstanceState(android.app.Fragment)" target="_top"><code>saveFragmentInstanceState</code></A>(<code>Fragment</code>)</nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<a NAME="fields"></a>
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.app.FragmentTransaction.html b/docs/html/sdk/api_diff/13/changes/android.app.FragmentTransaction.html
new file mode 100644 (file)
index 0000000..dbb7deb
--- /dev/null
@@ -0,0 +1,136 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.app.FragmentTransaction
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.app.<A HREF="../../../../reference/android/app/FragmentTransaction.html" target="_top"><font size="+2"><code>FragmentTransaction</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Methods" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Methods</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.app.FragmentTransaction.attach_added(android.app.Fragment)"></A>
+  <nobr><code>FragmentTransaction</code>&nbsp;<A HREF="../../../../reference/android/app/FragmentTransaction.html#attach(android.app.Fragment)" target="_top"><code>attach</code></A>(<code>Fragment</code>)</nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.app.FragmentTransaction.detach_added(android.app.Fragment)"></A>
+  <nobr><code>FragmentTransaction</code>&nbsp;<A HREF="../../../../reference/android/app/FragmentTransaction.html#detach(android.app.Fragment)" target="_top"><code>detach</code></A>(<code>Fragment</code>)</nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.app.FragmentTransaction.setCustomAnimations_added(int, int, int, int)"></A>
+  <nobr><code>FragmentTransaction</code>&nbsp;<A HREF="../../../../reference/android/app/FragmentTransaction.html#setCustomAnimations(int, int, int, int)" target="_top"><code>setCustomAnimations</code></A>(<code>int,</nobr> int<nobr>,</nobr> int<nobr>,</nobr> int<nobr><nobr></code>)</nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<a NAME="fields"></a>
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.app.KeyguardManager.KeyguardLock.html b/docs/html/sdk/api_diff/13/changes/android.app.KeyguardManager.KeyguardLock.html
new file mode 100644 (file)
index 0000000..3ae02ea
--- /dev/null
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.app.KeyguardManager.KeyguardLock
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.app.<A HREF="../../../../reference/android/app/KeyguardManager.KeyguardLock.html" target="_top"><font size="+2"><code>KeyguardManager.KeyguardLock</code></font></A>
+</H2>
+<p><b>Now deprecated</b>.<br>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<a NAME="fields"></a>
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.app.KeyguardManager.html b/docs/html/sdk/api_diff/13/changes/android.app.KeyguardManager.html
new file mode 100644 (file)
index 0000000..bc38771
--- /dev/null
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.app.KeyguardManager
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.app.<A HREF="../../../../reference/android/app/KeyguardManager.html" target="_top"><font size="+2"><code>KeyguardManager</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<p>
+<a NAME="Changed"></a>
+<TABLE summary="Changed Methods" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=3>Changed Methods</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.app.KeyguardManager.exitKeyguardSecurely_changed(android.app.KeyguardManager.OnKeyguardExitResult)"></A>
+  <nobr><code>void</code>&nbsp;<A HREF="../../../../reference/android/app/KeyguardManager.html#exitKeyguardSecurely(android.app.KeyguardManager.OnKeyguardExitResult)" target="_top"><code>exitKeyguardSecurely</code></A>(<code>OnKeyguardExitResult</code>)  </nobr>
+  </TD>
+  <TD VALIGN="TOP" WIDTH="30%">
+<b>Now deprecated</b>.<br>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.app.KeyguardManager.newKeyguardLock_changed(java.lang.String)"></A>
+  <nobr><code>KeyguardLock</code>&nbsp;<A HREF="../../../../reference/android/app/KeyguardManager.html#newKeyguardLock(java.lang.String)" target="_top"><code>newKeyguardLock</code></A>(<code>String</code>)  </nobr>
+  </TD>
+  <TD VALIGN="TOP" WIDTH="30%">
+<b>Now deprecated</b>.<br>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<a NAME="fields"></a>
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.app.LocalActivityManager.html b/docs/html/sdk/api_diff/13/changes/android.app.LocalActivityManager.html
new file mode 100644 (file)
index 0000000..4ea0848
--- /dev/null
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.app.LocalActivityManager
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.app.<A HREF="../../../../reference/android/app/LocalActivityManager.html" target="_top"><font size="+2"><code>LocalActivityManager</code></font></A>
+</H2>
+<p><b>Now deprecated</b>.<br>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<a NAME="fields"></a>
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.app.TabActivity.html b/docs/html/sdk/api_diff/13/changes/android.app.TabActivity.html
new file mode 100644 (file)
index 0000000..405f7d8
--- /dev/null
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.app.TabActivity
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.app.<A HREF="../../../../reference/android/app/TabActivity.html" target="_top"><font size="+2"><code>TabActivity</code></font></A>
+</H2>
+<p><b>Now deprecated</b>.<br>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<a NAME="fields"></a>
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.content.pm.ActivityInfo.html b/docs/html/sdk/api_diff/13/changes/android.content.pm.ActivityInfo.html
new file mode 100644 (file)
index 0000000..70149a3
--- /dev/null
@@ -0,0 +1,129 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.content.pm.ActivityInfo
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.content.pm.<A HREF="../../../../reference/android/content/pm/ActivityInfo.html" target="_top"><font size="+2"><code>ActivityInfo</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<a NAME="fields"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Fields" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Fields</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.content.pm.ActivityInfo.CONFIG_SCREEN_SIZE"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/content/pm/ActivityInfo.html#CONFIG_SCREEN_SIZE" target="_top"><code>CONFIG_SCREEN_SIZE</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.content.pm.ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/content/pm/ActivityInfo.html#CONFIG_SMALLEST_SCREEN_SIZE" target="_top"><code>CONFIG_SMALLEST_SCREEN_SIZE</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.content.pm.ApplicationInfo.html b/docs/html/sdk/api_diff/13/changes/android.content.pm.ApplicationInfo.html
new file mode 100644 (file)
index 0000000..4aef492
--- /dev/null
@@ -0,0 +1,136 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.content.pm.ApplicationInfo
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.content.pm.<A HREF="../../../../reference/android/content/pm/ApplicationInfo.html" target="_top"><font size="+2"><code>ApplicationInfo</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<a NAME="fields"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Fields" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Fields</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.content.pm.ApplicationInfo.compatibleWidthLimitDp"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/content/pm/ApplicationInfo.html#compatibleWidthLimitDp" target="_top"><code>compatibleWidthLimitDp</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.content.pm.ApplicationInfo.largestWidthLimitDp"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/content/pm/ApplicationInfo.html#largestWidthLimitDp" target="_top"><code>largestWidthLimitDp</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.content.pm.ApplicationInfo.requiresSmallestWidthDp"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/content/pm/ApplicationInfo.html#requiresSmallestWidthDp" target="_top"><code>requiresSmallestWidthDp</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.content.pm.PackageManager.html b/docs/html/sdk/api_diff/13/changes/android.content.pm.PackageManager.html
new file mode 100644 (file)
index 0000000..ca75d7a
--- /dev/null
@@ -0,0 +1,143 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.content.pm.PackageManager
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.content.pm.<A HREF="../../../../reference/android/content/pm/PackageManager.html" target="_top"><font size="+2"><code>PackageManager</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<a NAME="fields"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Fields" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Fields</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.content.pm.PackageManager.FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT"></A>
+  <nobr><code>String</code>&nbsp;<A HREF="../../../../reference/android/content/pm/PackageManager.html#FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT" target="_top"><code>FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.content.pm.PackageManager.FEATURE_FAKETOUCH_MULTITOUCH_JAZZHAND"></A>
+  <nobr><code>String</code>&nbsp;<A HREF="../../../../reference/android/content/pm/PackageManager.html#FEATURE_FAKETOUCH_MULTITOUCH_JAZZHAND" target="_top"><code>FEATURE_FAKETOUCH_MULTITOUCH_JAZZHAND</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.content.pm.PackageManager.FEATURE_SCREEN_LANDSCAPE"></A>
+  <nobr><code>String</code>&nbsp;<A HREF="../../../../reference/android/content/pm/PackageManager.html#FEATURE_SCREEN_LANDSCAPE" target="_top"><code>FEATURE_SCREEN_LANDSCAPE</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.content.pm.PackageManager.FEATURE_SCREEN_PORTRAIT"></A>
+  <nobr><code>String</code>&nbsp;<A HREF="../../../../reference/android/content/pm/PackageManager.html#FEATURE_SCREEN_PORTRAIT" target="_top"><code>FEATURE_SCREEN_PORTRAIT</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.content.res.Configuration.html b/docs/html/sdk/api_diff/13/changes/android.content.res.Configuration.html
new file mode 100644 (file)
index 0000000..110a142
--- /dev/null
@@ -0,0 +1,164 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.content.res.Configuration
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.content.res.<A HREF="../../../../reference/android/content/res/Configuration.html" target="_top"><font size="+2"><code>Configuration</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<a NAME="fields"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Fields" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Fields</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.content.res.Configuration.SCREEN_HEIGHT_DP_UNDEFINED"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/content/res/Configuration.html#SCREEN_HEIGHT_DP_UNDEFINED" target="_top"><code>SCREEN_HEIGHT_DP_UNDEFINED</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.content.res.Configuration.SCREEN_WIDTH_DP_UNDEFINED"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/content/res/Configuration.html#SCREEN_WIDTH_DP_UNDEFINED" target="_top"><code>SCREEN_WIDTH_DP_UNDEFINED</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.content.res.Configuration.SMALLEST_SCREEN_WIDTH_DP_UNDEFINED"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/content/res/Configuration.html#SMALLEST_SCREEN_WIDTH_DP_UNDEFINED" target="_top"><code>SMALLEST_SCREEN_WIDTH_DP_UNDEFINED</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.content.res.Configuration.UI_MODE_TYPE_TELEVISION"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/content/res/Configuration.html#UI_MODE_TYPE_TELEVISION" target="_top"><code>UI_MODE_TYPE_TELEVISION</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.content.res.Configuration.screenHeightDp"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/content/res/Configuration.html#screenHeightDp" target="_top"><code>screenHeightDp</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.content.res.Configuration.screenWidthDp"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/content/res/Configuration.html#screenWidthDp" target="_top"><code>screenWidthDp</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.content.res.Configuration.smallestScreenWidthDp"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/content/res/Configuration.html#smallestScreenWidthDp" target="_top"><code>smallestScreenWidthDp</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.graphics.Point.html b/docs/html/sdk/api_diff/13/changes/android.graphics.Point.html
new file mode 100644 (file)
index 0000000..e3324d2
--- /dev/null
@@ -0,0 +1,152 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.graphics.Point
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.graphics.<A HREF="../../../../reference/android/graphics/Point.html" target="_top"><font size="+2"><code>Point</code></font></A>
+</H2>
+<p><font xsize="+1">Added interface <code>android.os.Parcelable</code>.<br></font>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Methods" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Methods</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.graphics.Point.describeContents_added()"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/graphics/Point.html#describeContents()" target="_top"><code>describeContents</code></A>()</nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.graphics.Point.readFromParcel_added(android.os.Parcel)"></A>
+  <nobr><code>void</code>&nbsp;<A HREF="../../../../reference/android/graphics/Point.html#readFromParcel(android.os.Parcel)" target="_top"><code>readFromParcel</code></A>(<code>Parcel</code>)</nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.graphics.Point.writeToParcel_added(android.os.Parcel, int)"></A>
+  <nobr><code>void</code>&nbsp;<A HREF="../../../../reference/android/graphics/Point.html#writeToParcel(android.os.Parcel, int)" target="_top"><code>writeToParcel</code></A>(<code>Parcel,</nobr> int<nobr><nobr></code>)</nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<a NAME="fields"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Fields" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Fields</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.graphics.Point.CREATOR"></A>
+  <nobr><code>Creator</code>&nbsp;<A HREF="../../../../reference/android/graphics/Point.html#CREATOR" target="_top"><code>CREATOR</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.graphics.PointF.html b/docs/html/sdk/api_diff/13/changes/android.graphics.PointF.html
new file mode 100644 (file)
index 0000000..665c259
--- /dev/null
@@ -0,0 +1,152 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.graphics.PointF
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.graphics.<A HREF="../../../../reference/android/graphics/PointF.html" target="_top"><font size="+2"><code>PointF</code></font></A>
+</H2>
+<p><font xsize="+1">Added interface <code>android.os.Parcelable</code>.<br></font>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Methods" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Methods</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.graphics.PointF.describeContents_added()"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/graphics/PointF.html#describeContents()" target="_top"><code>describeContents</code></A>()</nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.graphics.PointF.readFromParcel_added(android.os.Parcel)"></A>
+  <nobr><code>void</code>&nbsp;<A HREF="../../../../reference/android/graphics/PointF.html#readFromParcel(android.os.Parcel)" target="_top"><code>readFromParcel</code></A>(<code>Parcel</code>)</nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.graphics.PointF.writeToParcel_added(android.os.Parcel, int)"></A>
+  <nobr><code>void</code>&nbsp;<A HREF="../../../../reference/android/graphics/PointF.html#writeToParcel(android.os.Parcel, int)" target="_top"><code>writeToParcel</code></A>(<code>Parcel,</nobr> int<nobr><nobr></code>)</nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<a NAME="fields"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Fields" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Fields</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.graphics.PointF.CREATOR"></A>
+  <nobr><code>Creator</code>&nbsp;<A HREF="../../../../reference/android/graphics/PointF.html#CREATOR" target="_top"><code>CREATOR</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.hardware.usb.UsbDeviceConnection.html b/docs/html/sdk/api_diff/13/changes/android.hardware.usb.UsbDeviceConnection.html
new file mode 100644 (file)
index 0000000..1eb15ed
--- /dev/null
@@ -0,0 +1,122 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.hardware.usb.UsbDeviceConnection
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.hardware.usb.<A HREF="../../../../reference/android/hardware/usb/UsbDeviceConnection.html" target="_top"><font size="+2"><code>UsbDeviceConnection</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Methods" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Methods</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.hardware.usb.UsbDeviceConnection.getRawDescriptors_added()"></A>
+  <nobr><code>byte[]</code>&nbsp;<A HREF="../../../../reference/android/hardware/usb/UsbDeviceConnection.html#getRawDescriptors()" target="_top"><code>getRawDescriptors</code></A>()</nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<a NAME="fields"></a>
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.net.ConnectivityManager.html b/docs/html/sdk/api_diff/13/changes/android.net.ConnectivityManager.html
new file mode 100644 (file)
index 0000000..977649f
--- /dev/null
@@ -0,0 +1,129 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.net.ConnectivityManager
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.net.<A HREF="../../../../reference/android/net/ConnectivityManager.html" target="_top"><font size="+2"><code>ConnectivityManager</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<a NAME="fields"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Fields" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Fields</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.net.ConnectivityManager.TYPE_BLUETOOTH"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/net/ConnectivityManager.html#TYPE_BLUETOOTH" target="_top"><code>TYPE_BLUETOOTH</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.net.ConnectivityManager.TYPE_ETHERNET"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/net/ConnectivityManager.html#TYPE_ETHERNET" target="_top"><code>TYPE_ETHERNET</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.os.Binder.html b/docs/html/sdk/api_diff/13/changes/android.os.Binder.html
new file mode 100644 (file)
index 0000000..fd11dd1
--- /dev/null
@@ -0,0 +1,122 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.os.Binder
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.os.<A HREF="../../../../reference/android/os/Binder.html" target="_top"><font size="+2"><code>Binder</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Methods" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Methods</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.os.Binder.dumpAsync_added(java.io.FileDescriptor, java.lang.String[])"></A>
+  <nobr><code>void</code>&nbsp;<A HREF="../../../../reference/android/os/Binder.html#dumpAsync(java.io.FileDescriptor, java.lang.String[])" target="_top"><code>dumpAsync</code></A>(<code>FileDescriptor,</nobr> String[]<nobr><nobr></code>)</nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<a NAME="fields"></a>
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.os.Build.VERSION_CODES.html b/docs/html/sdk/api_diff/13/changes/android.os.Build.VERSION_CODES.html
new file mode 100644 (file)
index 0000000..0e50af4
--- /dev/null
@@ -0,0 +1,122 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.os.Build.VERSION_CODES
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.os.<A HREF="../../../../reference/android/os/Build.VERSION_CODES.html" target="_top"><font size="+2"><code>Build.VERSION_CODES</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<a NAME="fields"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Fields" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Fields</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.os.Build.VERSION_CODES.HONEYCOMB_MR2"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/os/Build.VERSION_CODES.html#HONEYCOMB_MR2" target="_top"><code>HONEYCOMB_MR2</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.os.IBinder.html b/docs/html/sdk/api_diff/13/changes/android.os.IBinder.html
new file mode 100644 (file)
index 0000000..1a251cd
--- /dev/null
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.os.IBinder
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Interface android.os.<A HREF="../../../../reference/android/os/IBinder.html" target="_top"><font size="+2"><code>IBinder</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Methods" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Methods</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.os.IBinder.dumpAsync_added(java.io.FileDescriptor, java.lang.String[])"></A>
+  <nobr><code>void</code>&nbsp;<A HREF="../../../../reference/android/os/IBinder.html#dumpAsync(java.io.FileDescriptor, java.lang.String[])" target="_top"><code>dumpAsync</code></A>(<code>FileDescriptor,</nobr> String[]<nobr><nobr></code>)</nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<a NAME="fields"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Fields" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Fields</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.os.IBinder.TWEET_TRANSACTION"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/os/IBinder.html#TWEET_TRANSACTION" target="_top"><code>TWEET_TRANSACTION</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.os.ParcelFileDescriptor.html b/docs/html/sdk/api_diff/13/changes/android.os.ParcelFileDescriptor.html
new file mode 100644 (file)
index 0000000..3d3d1c3
--- /dev/null
@@ -0,0 +1,136 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.os.ParcelFileDescriptor
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.os.<A HREF="../../../../reference/android/os/ParcelFileDescriptor.html" target="_top"><font size="+2"><code>ParcelFileDescriptor</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Methods" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Methods</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.os.ParcelFileDescriptor.adoptFd_added(int)"></A>
+  <nobr><code>ParcelFileDescriptor</code>&nbsp;<A HREF="../../../../reference/android/os/ParcelFileDescriptor.html#adoptFd(int)" target="_top"><code>adoptFd</code></A>(<code>int</code>)</nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.os.ParcelFileDescriptor.dup_added(java.io.FileDescriptor)"></A>
+  <nobr><code>ParcelFileDescriptor</code>&nbsp;<A HREF="../../../../reference/android/os/ParcelFileDescriptor.html#dup(java.io.FileDescriptor)" target="_top"><code>dup</code></A>(<code>FileDescriptor</code>)</nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.os.ParcelFileDescriptor.fromFd_added(int)"></A>
+  <nobr><code>ParcelFileDescriptor</code>&nbsp;<A HREF="../../../../reference/android/os/ParcelFileDescriptor.html#fromFd(int)" target="_top"><code>fromFd</code></A>(<code>int</code>)</nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<a NAME="fields"></a>
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.os.PowerManager.html b/docs/html/sdk/api_diff/13/changes/android.os.PowerManager.html
new file mode 100644 (file)
index 0000000..4af746d
--- /dev/null
@@ -0,0 +1,124 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.os.PowerManager
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.os.<A HREF="../../../../reference/android/os/PowerManager.html" target="_top"><font size="+2"><code>PowerManager</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<a NAME="fields"></a>
+<p>
+<a NAME="Changed"></a>
+<TABLE summary="Changed Fields" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=3>Changed Fields</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.os.PowerManager.SCREEN_BRIGHT_WAKE_LOCK"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/os/PowerManager.html#SCREEN_BRIGHT_WAKE_LOCK" target="_top"><code>SCREEN_BRIGHT_WAKE_LOCK</code></font></A></nobr>  </TD>
+  <TD VALIGN="TOP" WIDTH="30%">
+<b>Now deprecated</b>.<br>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.telephony.TelephonyManager.html b/docs/html/sdk/api_diff/13/changes/android.telephony.TelephonyManager.html
new file mode 100644 (file)
index 0000000..43d6cf6
--- /dev/null
@@ -0,0 +1,122 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.telephony.TelephonyManager
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.telephony.<A HREF="../../../../reference/android/telephony/TelephonyManager.html" target="_top"><font size="+2"><code>TelephonyManager</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<a NAME="fields"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Fields" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Fields</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.telephony.TelephonyManager.NETWORK_TYPE_HSPAP"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/telephony/TelephonyManager.html#NETWORK_TYPE_HSPAP" target="_top"><code>NETWORK_TYPE_HSPAP</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.util.DisplayMetrics.html b/docs/html/sdk/api_diff/13/changes/android.util.DisplayMetrics.html
new file mode 100644 (file)
index 0000000..01c329f
--- /dev/null
@@ -0,0 +1,122 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.util.DisplayMetrics
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.util.<A HREF="../../../../reference/android/util/DisplayMetrics.html" target="_top"><font size="+2"><code>DisplayMetrics</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<a NAME="fields"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Fields" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Fields</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.util.DisplayMetrics.DENSITY_TV"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/util/DisplayMetrics.html#DENSITY_TV" target="_top"><code>DENSITY_TV</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.view.Display.html b/docs/html/sdk/api_diff/13/changes/android.view.Display.html
new file mode 100644 (file)
index 0000000..872532a
--- /dev/null
@@ -0,0 +1,157 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.view.Display
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.view.<A HREF="../../../../reference/android/view/Display.html" target="_top"><font size="+2"><code>Display</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Methods" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Methods</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.view.Display.getRectSize_added(android.graphics.Rect)"></A>
+  <nobr><code>void</code>&nbsp;<A HREF="../../../../reference/android/view/Display.html#getRectSize(android.graphics.Rect)" target="_top"><code>getRectSize</code></A>(<code>Rect</code>)</nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.view.Display.getSize_added(android.graphics.Point)"></A>
+  <nobr><code>void</code>&nbsp;<A HREF="../../../../reference/android/view/Display.html#getSize(android.graphics.Point)" target="_top"><code>getSize</code></A>(<code>Point</code>)</nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<p>
+<a NAME="Changed"></a>
+<TABLE summary="Changed Methods" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=3>Changed Methods</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.view.Display.getHeight_changed()"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/view/Display.html#getHeight()" target="_top"><code>getHeight</code></A>()  </nobr>
+  </TD>
+  <TD VALIGN="TOP" WIDTH="30%">
+<b>Now deprecated</b>.<br>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.view.Display.getWidth_changed()"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/view/Display.html#getWidth()" target="_top"><code>getWidth</code></A>()  </nobr>
+  </TD>
+  <TD VALIGN="TOP" WIDTH="30%">
+<b>Now deprecated</b>.<br>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<a NAME="fields"></a>
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/android.view.KeyEvent.html b/docs/html/sdk/api_diff/13/changes/android.view.KeyEvent.html
new file mode 100644 (file)
index 0000000..eaccac4
--- /dev/null
@@ -0,0 +1,122 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.view.KeyEvent
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Class android.view.<A HREF="../../../../reference/android/view/KeyEvent.html" target="_top"><font size="+2"><code>KeyEvent</code></font></A>
+</H2>
+<a NAME="constructors"></a>
+<a NAME="methods"></a>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Methods" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Methods</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.view.KeyEvent.getModifiers_added()"></A>
+  <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/view/KeyEvent.html#getModifiers()" target="_top"><code>getModifiers</code></A>()</nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<a NAME="fields"></a>
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/changes-summary.html b/docs/html/sdk/api_diff/13/changes/changes-summary.html
new file mode 100644 (file)
index 0000000..082fcfb
--- /dev/null
@@ -0,0 +1,205 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+Android API Differences Report
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<body class="gc-documentation">
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+    <div id="docTitleContainer">
+<h1>Android&nbsp;API&nbsp;Differences&nbsp;Report</h1>
+<p>This report details the changes in the core Android framework API between two <a 
+href="http://developer.android.com/guide/appendix/api-levels.html" target="_top">API Level</a> 
+specifications. It shows additions, modifications, and removals for packages, classes, methods, and fields. 
+The report also includes general statistics that characterize the extent and type of the differences.</p>
+<p>This report is based a comparison of the Android API specifications 
+whose API Level identifiers are given in the upper-right corner of this page. It compares a 
+newer "to" API to an older "from" API, noting all changes relative to the 
+older API. So, for example, API elements marked as removed are no longer present in the "to" 
+API specification.</p>
+<p>To navigate the report, use the "Select a Diffs Index" and "Filter the Index" 
+controls on the left. The report uses text formatting to indicate <em>interface names</em>, 
+<a href= ><code>links to reference documentation</code></a>, and <a href= >links to change 
+description</a>. The statistics are accessible from the "Statistics" link in the upper-right corner.</p>
+<p>For more information about the Android framework API and SDK, 
+see the <a href="http://developer.android.com/index.html" target="_top">Android Developers site</a>.</p>
+<p>
+<a NAME="Changed"></a>
+<TABLE summary="Changed Packages" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=3>Changed Packages</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android"></A>
+  <nobr><A HREF="pkg_android.html">android</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.app"></A>
+  <nobr><A HREF="pkg_android.app.html">android.app</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.content.pm"></A>
+  <nobr><A HREF="pkg_android.content.pm.html">android.content.pm</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.content.res"></A>
+  <nobr><A HREF="pkg_android.content.res.html">android.content.res</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.graphics"></A>
+  <nobr><A HREF="pkg_android.graphics.html">android.graphics</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.hardware.usb"></A>
+  <nobr><A HREF="pkg_android.hardware.usb.html">android.hardware.usb</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.net"></A>
+  <nobr><A HREF="pkg_android.net.html">android.net</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.os"></A>
+  <nobr><A HREF="pkg_android.os.html">android.os</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.telephony"></A>
+  <nobr><A HREF="pkg_android.telephony.html">android.telephony</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.util"></A>
+  <nobr><A HREF="pkg_android.util.html">android.util</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="android.view"></A>
+  <nobr><A HREF="pkg_android.view.html">android.view</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<!-- End of API section -->
+<!-- Start of packages section -->
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/classes_index_additions.html b/docs/html/sdk/api_diff/13/changes/classes_index_additions.html
new file mode 100644 (file)
index 0000000..9ca1958
--- /dev/null
@@ -0,0 +1,73 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+Class Additions Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for Classes" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<a href="classes_index_all.html" class="staysblack">All Classes</a>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<b>Additions</b>
+  <br>
+<A HREF="classes_index_changes.html"xclass="hiddenlink">Changes</A>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<A NAME="F"></A>
+<br><font size="+2">F</font>&nbsp;
+<a href="#P"><font size="-2">P</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="pkg_android.app.html#Fragment.SavedState" class="hiddenlink" target="rightframe"><b>Fragment.SavedState</b></A><br>
+<A NAME="P"></A>
+<br><font size="+2">P</font>&nbsp;
+<a href="#F"><font size="-2">F</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="pkg_android.os.html#Parcelable.ClassLoaderCreator" class="hiddenlink" target="rightframe"><b><i>Parcelable.ClassLoaderCreator</i></b></A><br>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/classes_index_all.html b/docs/html/sdk/api_diff/13/changes/classes_index_all.html
new file mode 100644 (file)
index 0000000..6bd1021
--- /dev/null
@@ -0,0 +1,300 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+Class Differences Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for Classes" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<b>Classes</b>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<A HREF="classes_index_additions.html"xclass="hiddenlink">Additions</A>
+  <br>
+<A HREF="classes_index_changes.html"xclass="hiddenlink">Changes</A>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<A NAME="A"></A>
+<br><font size="+2">A</font>&nbsp;
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.app.Activity.html" class="hiddenlink" target="rightframe">Activity</A><br>
+<A HREF="android.app.ActivityGroup.html" class="hiddenlink" target="rightframe">ActivityGroup</A><br>
+<A HREF="android.content.pm.ActivityInfo.html" class="hiddenlink" target="rightframe">ActivityInfo</A><br>
+<A HREF="android.content.pm.ApplicationInfo.html" class="hiddenlink" target="rightframe">ApplicationInfo</A><br>
+<A NAME="B"></A>
+<br><font size="+2">B</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.os.Binder.html" class="hiddenlink" target="rightframe">Binder</A><br>
+<A HREF="android.os.Build.VERSION_CODES.html" class="hiddenlink" target="rightframe">Build.VERSION_CODES</A><br>
+<A NAME="C"></A>
+<br><font size="+2">C</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.content.res.Configuration.html" class="hiddenlink" target="rightframe">Configuration</A><br>
+<A HREF="android.net.ConnectivityManager.html" class="hiddenlink" target="rightframe">ConnectivityManager</A><br>
+<A NAME="D"></A>
+<br><font size="+2">D</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.view.Display.html" class="hiddenlink" target="rightframe">Display</A><br>
+<A HREF="android.util.DisplayMetrics.html" class="hiddenlink" target="rightframe">DisplayMetrics</A><br>
+<A NAME="F"></A>
+<br><font size="+2">F</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.app.Fragment.html" class="hiddenlink" target="rightframe">Fragment</A><br>
+<A HREF="pkg_android.app.html#Fragment.SavedState" class="hiddenlink" target="rightframe"><b>Fragment.SavedState</b></A><br>
+<A HREF="android.app.FragmentManager.html" class="hiddenlink" target="rightframe">FragmentManager</A><br>
+<A HREF="android.app.FragmentTransaction.html" class="hiddenlink" target="rightframe">FragmentTransaction</A><br>
+<A NAME="I"></A>
+<br><font size="+2">I</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.os.IBinder.html" class="hiddenlink" target="rightframe"><i>IBinder</i></A><br>
+<A NAME="K"></A>
+<br><font size="+2">K</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.view.KeyEvent.html" class="hiddenlink" target="rightframe">KeyEvent</A><br>
+<A HREF="android.app.KeyguardManager.html" class="hiddenlink" target="rightframe">KeyguardManager</A><br>
+<A HREF="android.app.KeyguardManager.KeyguardLock.html" class="hiddenlink" target="rightframe">KeyguardManager.KeyguardLock</A><br>
+<A NAME="L"></A>
+<br><font size="+2">L</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.app.LocalActivityManager.html" class="hiddenlink" target="rightframe">LocalActivityManager</A><br>
+<A NAME="M"></A>
+<br><font size="+2">M</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.Manifest.permission.html" class="hiddenlink" target="rightframe">Manifest.permission</A><br>
+<A NAME="P"></A>
+<br><font size="+2">P</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.content.pm.PackageManager.html" class="hiddenlink" target="rightframe">PackageManager</A><br>
+<A HREF="pkg_android.os.html#Parcelable.ClassLoaderCreator" class="hiddenlink" target="rightframe"><b><i>Parcelable.ClassLoaderCreator</i></b></A><br>
+<A HREF="android.os.ParcelFileDescriptor.html" class="hiddenlink" target="rightframe">ParcelFileDescriptor</A><br>
+<A HREF="android.graphics.Point.html" class="hiddenlink" target="rightframe">Point</A><br>
+<A HREF="android.graphics.PointF.html" class="hiddenlink" target="rightframe">PointF</A><br>
+<A HREF="android.os.PowerManager.html" class="hiddenlink" target="rightframe">PowerManager</A><br>
+<A NAME="R"></A>
+<br><font size="+2">R</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.R.attr.html" class="hiddenlink" target="rightframe">R.attr</A><br>
+<A HREF="android.R.style.html" class="hiddenlink" target="rightframe">R.style</A><br>
+<A NAME="T"></A>
+<br><font size="+2">T</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.app.TabActivity.html" class="hiddenlink" target="rightframe">TabActivity</A><br>
+<A HREF="android.telephony.TelephonyManager.html" class="hiddenlink" target="rightframe">TelephonyManager</A><br>
+<A NAME="U"></A>
+<br><font size="+2">U</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.hardware.usb.UsbDeviceConnection.html" class="hiddenlink" target="rightframe">UsbDeviceConnection</A><br>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/classes_index_changes.html b/docs/html/sdk/api_diff/13/changes/classes_index_changes.html
new file mode 100644 (file)
index 0000000..d76983f
--- /dev/null
@@ -0,0 +1,298 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+Class Changes Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for Classes" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<a href="classes_index_all.html" class="staysblack">All Classes</a>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<A HREF="classes_index_additions.html"xclass="hiddenlink">Additions</A>
+  <br>
+<b>Changes</b>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<A NAME="A"></A>
+<br><font size="+2">A</font>&nbsp;
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.app.Activity.html" class="hiddenlink" target="rightframe">Activity</A><br>
+<A HREF="android.app.ActivityGroup.html" class="hiddenlink" target="rightframe">ActivityGroup</A><br>
+<A HREF="android.content.pm.ActivityInfo.html" class="hiddenlink" target="rightframe">ActivityInfo</A><br>
+<A HREF="android.content.pm.ApplicationInfo.html" class="hiddenlink" target="rightframe">ApplicationInfo</A><br>
+<A NAME="B"></A>
+<br><font size="+2">B</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.os.Binder.html" class="hiddenlink" target="rightframe">Binder</A><br>
+<A HREF="android.os.Build.VERSION_CODES.html" class="hiddenlink" target="rightframe">Build.VERSION_CODES</A><br>
+<A NAME="C"></A>
+<br><font size="+2">C</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.content.res.Configuration.html" class="hiddenlink" target="rightframe">Configuration</A><br>
+<A HREF="android.net.ConnectivityManager.html" class="hiddenlink" target="rightframe">ConnectivityManager</A><br>
+<A NAME="D"></A>
+<br><font size="+2">D</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.view.Display.html" class="hiddenlink" target="rightframe">Display</A><br>
+<A HREF="android.util.DisplayMetrics.html" class="hiddenlink" target="rightframe">DisplayMetrics</A><br>
+<A NAME="F"></A>
+<br><font size="+2">F</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.app.Fragment.html" class="hiddenlink" target="rightframe">Fragment</A><br>
+<A HREF="android.app.FragmentManager.html" class="hiddenlink" target="rightframe">FragmentManager</A><br>
+<A HREF="android.app.FragmentTransaction.html" class="hiddenlink" target="rightframe">FragmentTransaction</A><br>
+<A NAME="I"></A>
+<br><font size="+2">I</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.os.IBinder.html" class="hiddenlink" target="rightframe"><i>IBinder</i></A><br>
+<A NAME="K"></A>
+<br><font size="+2">K</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.view.KeyEvent.html" class="hiddenlink" target="rightframe">KeyEvent</A><br>
+<A HREF="android.app.KeyguardManager.html" class="hiddenlink" target="rightframe">KeyguardManager</A><br>
+<A HREF="android.app.KeyguardManager.KeyguardLock.html" class="hiddenlink" target="rightframe">KeyguardManager.KeyguardLock</A><br>
+<A NAME="L"></A>
+<br><font size="+2">L</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.app.LocalActivityManager.html" class="hiddenlink" target="rightframe">LocalActivityManager</A><br>
+<A NAME="M"></A>
+<br><font size="+2">M</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.Manifest.permission.html" class="hiddenlink" target="rightframe">Manifest.permission</A><br>
+<A NAME="P"></A>
+<br><font size="+2">P</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.content.pm.PackageManager.html" class="hiddenlink" target="rightframe">PackageManager</A><br>
+<A HREF="android.os.ParcelFileDescriptor.html" class="hiddenlink" target="rightframe">ParcelFileDescriptor</A><br>
+<A HREF="android.graphics.Point.html" class="hiddenlink" target="rightframe">Point</A><br>
+<A HREF="android.graphics.PointF.html" class="hiddenlink" target="rightframe">PointF</A><br>
+<A HREF="android.os.PowerManager.html" class="hiddenlink" target="rightframe">PowerManager</A><br>
+<A NAME="R"></A>
+<br><font size="+2">R</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.R.attr.html" class="hiddenlink" target="rightframe">R.attr</A><br>
+<A HREF="android.R.style.html" class="hiddenlink" target="rightframe">R.style</A><br>
+<A NAME="T"></A>
+<br><font size="+2">T</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.app.TabActivity.html" class="hiddenlink" target="rightframe">TabActivity</A><br>
+<A HREF="android.telephony.TelephonyManager.html" class="hiddenlink" target="rightframe">TelephonyManager</A><br>
+<A NAME="U"></A>
+<br><font size="+2">U</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#B"><font size="-2">B</font></a> 
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#K"><font size="-2">K</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#M"><font size="-2">M</font></a> 
+<a href="#P"><font size="-2">P</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<A HREF="android.hardware.usb.UsbDeviceConnection.html" class="hiddenlink" target="rightframe">UsbDeviceConnection</A><br>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/classes_index_removals.html b/docs/html/sdk/api_diff/13/changes/classes_index_removals.html
new file mode 100644 (file)
index 0000000..e6da73f
--- /dev/null
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+Class Removals Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for Classes" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<a href="classes_index_all.html" class="staysblack">All Classes</a>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<A HREF="classes_index_additions.html"xclass="hiddenlink">Additions</A>
+  <br>
+<A HREF="classes_index_changes.html"xclass="hiddenlink">Changes</A>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/constructors_index_additions.html b/docs/html/sdk/api_diff/13/changes/constructors_index_additions.html
new file mode 100644 (file)
index 0000000..3237ba3
--- /dev/null
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+Constructor Additions Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for Constructors" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<a href="constructors_index_all.html" class="staysblack">All Constructors</a>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<font color="#999999">Additions</font>
+  <br>
+<font color="#999999">Changes</font>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/constructors_index_all.html b/docs/html/sdk/api_diff/13/changes/constructors_index_all.html
new file mode 100644 (file)
index 0000000..637582e
--- /dev/null
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+Constructor Differences Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for Constructors" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<b>Constructors</b>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<font color="#999999">Additions</font>
+  <br>
+<font color="#999999">Changes</font>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/constructors_index_changes.html b/docs/html/sdk/api_diff/13/changes/constructors_index_changes.html
new file mode 100644 (file)
index 0000000..728fa2d
--- /dev/null
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+Constructor Changes Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for Constructors" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<a href="constructors_index_all.html" class="staysblack">All Constructors</a>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<font color="#999999">Additions</font>
+  <br>
+<font color="#999999">Changes</font>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/constructors_index_removals.html b/docs/html/sdk/api_diff/13/changes/constructors_index_removals.html
new file mode 100644 (file)
index 0000000..1b95544
--- /dev/null
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+Constructor Removals Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for Constructors" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<a href="constructors_index_all.html" class="staysblack">All Constructors</a>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<font color="#999999">Additions</font>
+  <br>
+<font color="#999999">Changes</font>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/fields_index_additions.html b/docs/html/sdk/api_diff/13/changes/fields_index_additions.html
new file mode 100644 (file)
index 0000000..271c9aa
--- /dev/null
@@ -0,0 +1,363 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+Field Additions Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for Fields" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<a href="fields_index_all.html" class="staysblack">All Fields</a>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<b>Additions</b>
+  <br>
+<A HREF="fields_index_changes.html"xclass="hiddenlink">Changes</A>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<A NAME="C"></A>
+<br><font size="+2">C</font>&nbsp;
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<i>compatibleWidthLimitDp</i><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.R.attr.html#android.R.attr.compatibleWidthLimitDp" class="hiddenlink" target="rightframe">android.R.attr</A>
+</nobr><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.content.pm.ApplicationInfo.html#android.content.pm.ApplicationInfo.compatibleWidthLimitDp" class="hiddenlink" target="rightframe">android.content.pm.ApplicationInfo</A>
+</nobr><br>
+<nobr><A HREF="android.content.pm.ActivityInfo.html#android.content.pm.ActivityInfo.CONFIG_SCREEN_SIZE" class="hiddenlink" target="rightframe">CONFIG_SCREEN_SIZE</A>
+</nobr><br>
+<nobr><A HREF="android.content.pm.ActivityInfo.html#android.content.pm.ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE" class="hiddenlink" target="rightframe">CONFIG_SMALLEST_SCREEN_SIZE</A>
+</nobr><br>
+<i>CREATOR</i><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.graphics.Point.html#android.graphics.Point.CREATOR" class="hiddenlink" target="rightframe">android.graphics.Point</A>
+</nobr><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.graphics.PointF.html#android.graphics.PointF.CREATOR" class="hiddenlink" target="rightframe">android.graphics.PointF</A>
+</nobr><br>
+<A NAME="D"></A>
+<br><font size="+2">D</font>&nbsp;
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.util.DisplayMetrics.html#android.util.DisplayMetrics.DENSITY_TV" class="hiddenlink" target="rightframe">DENSITY_TV</A>
+</nobr><br>
+<A NAME="F"></A>
+<br><font size="+2">F</font>&nbsp;
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.content.pm.PackageManager.html#android.content.pm.PackageManager.FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT" class="hiddenlink" target="rightframe">FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT</A>
+</nobr><br>
+<nobr><A HREF="android.content.pm.PackageManager.html#android.content.pm.PackageManager.FEATURE_FAKETOUCH_MULTITOUCH_JAZZHAND" class="hiddenlink" target="rightframe">FEATURE_FAKETOUCH_MULTITOUCH_JAZZHAND</A>
+</nobr><br>
+<nobr><A HREF="android.content.pm.PackageManager.html#android.content.pm.PackageManager.FEATURE_SCREEN_LANDSCAPE" class="hiddenlink" target="rightframe">FEATURE_SCREEN_LANDSCAPE</A>
+</nobr><br>
+<nobr><A HREF="android.content.pm.PackageManager.html#android.content.pm.PackageManager.FEATURE_SCREEN_PORTRAIT" class="hiddenlink" target="rightframe">FEATURE_SCREEN_PORTRAIT</A>
+</nobr><br>
+<A NAME="H"></A>
+<br><font size="+2">H</font>&nbsp;
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.os.Build.VERSION_CODES.html#android.os.Build.VERSION_CODES.HONEYCOMB_MR2" class="hiddenlink" target="rightframe">HONEYCOMB_MR2</A>
+</nobr><br>
+<A NAME="L"></A>
+<br><font size="+2">L</font>&nbsp;
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<i>largestWidthLimitDp</i><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.R.attr.html#android.R.attr.largestWidthLimitDp" class="hiddenlink" target="rightframe">android.R.attr</A>
+</nobr><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.content.pm.ApplicationInfo.html#android.content.pm.ApplicationInfo.largestWidthLimitDp" class="hiddenlink" target="rightframe">android.content.pm.ApplicationInfo</A>
+</nobr><br>
+<A NAME="N"></A>
+<br><font size="+2">N</font>&nbsp;
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.telephony.TelephonyManager.html#android.telephony.TelephonyManager.NETWORK_TYPE_HSPAP" class="hiddenlink" target="rightframe">NETWORK_TYPE_HSPAP</A>
+</nobr><br>
+<A NAME="R"></A>
+<br><font size="+2">R</font>&nbsp;
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<i>requiresSmallestWidthDp</i><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.R.attr.html#android.R.attr.requiresSmallestWidthDp" class="hiddenlink" target="rightframe">android.R.attr</A>
+</nobr><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.content.pm.ApplicationInfo.html#android.content.pm.ApplicationInfo.requiresSmallestWidthDp" class="hiddenlink" target="rightframe">android.content.pm.ApplicationInfo</A>
+</nobr><br>
+<A NAME="S"></A>
+<br><font size="+2">S</font>&nbsp;
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.SCREEN_HEIGHT_DP_UNDEFINED" class="hiddenlink" target="rightframe">SCREEN_HEIGHT_DP_UNDEFINED</A>
+</nobr><br>
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.SCREEN_WIDTH_DP_UNDEFINED" class="hiddenlink" target="rightframe">SCREEN_WIDTH_DP_UNDEFINED</A>
+</nobr><br>
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.screenHeightDp" class="hiddenlink" target="rightframe">screenHeightDp</A>
+</nobr><br>
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.screenWidthDp" class="hiddenlink" target="rightframe">screenWidthDp</A>
+</nobr><br>
+<nobr><A HREF="android.Manifest.permission.html#android.Manifest.permission.SET_POINTER_SPEED" class="hiddenlink" target="rightframe">SET_POINTER_SPEED</A>
+</nobr><br>
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.SMALLEST_SCREEN_WIDTH_DP_UNDEFINED" class="hiddenlink" target="rightframe">SMALLEST_SCREEN_WIDTH_DP_UNDEFINED</A>
+</nobr><br>
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.smallestScreenWidthDp" class="hiddenlink" target="rightframe">smallestScreenWidthDp</A>
+</nobr><br>
+<A NAME="T"></A>
+<br><font size="+2">T</font>&nbsp;
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo" class="hiddenlink" target="rightframe">TextAppearance_Holo</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_DialogWindowTitle" class="hiddenlink" target="rightframe">TextAppearance_Holo_DialogWindowTitle</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Inverse" class="hiddenlink" target="rightframe">TextAppearance_Holo_Inverse</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Large" class="hiddenlink" target="rightframe">TextAppearance_Holo_Large</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Large_Inverse" class="hiddenlink" target="rightframe">TextAppearance_Holo_Large_Inverse</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Medium" class="hiddenlink" target="rightframe">TextAppearance_Holo_Medium</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Medium_Inverse" class="hiddenlink" target="rightframe">TextAppearance_Holo_Medium_Inverse</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_SearchResult_Subtitle" class="hiddenlink" target="rightframe">TextAppearance_Holo_SearchResult_Subtitle</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_SearchResult_Title" class="hiddenlink" target="rightframe">TextAppearance_Holo_SearchResult_Title</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Small" class="hiddenlink" target="rightframe">TextAppearance_Holo_Small</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Small_Inverse" class="hiddenlink" target="rightframe">TextAppearance_Holo_Small_Inverse</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_ActionBar_Subtitle" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_ActionBar_Subtitle</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_ActionBar_Title" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_ActionBar_Title</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_ActionMode_Subtitle" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_ActionMode_Subtitle</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_ActionMode_Title" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_ActionMode_Title</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_Button" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_Button</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_DropDownHint" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_DropDownHint</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_DropDownItem" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_DropDownItem</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_EditText" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_EditText</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_IconMenu_Item" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_IconMenu_Item</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_PopupMenu" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_PopupMenu</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_PopupMenu_Large" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_PopupMenu_Large</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_PopupMenu_Small" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_PopupMenu_Small</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_TabWidget" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_TabWidget</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_TextView" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_TextView</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_TextView_PopupMenu" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_TextView_PopupMenu</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_TextView_SpinnerItem" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_TextView_SpinnerItem</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_WindowTitle" class="hiddenlink" target="rightframe">TextAppearance_Holo_WindowTitle</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.Theme_Holo_Light_NoActionBar" class="hiddenlink" target="rightframe">Theme_Holo_Light_NoActionBar</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.Theme_Holo_Light_NoActionBar_Fullscreen" class="hiddenlink" target="rightframe">Theme_Holo_Light_NoActionBar_Fullscreen</A>
+</nobr><br>
+<nobr><A HREF="android.os.IBinder.html#android.os.IBinder.TWEET_TRANSACTION" class="hiddenlink" target="rightframe">TWEET_TRANSACTION</A>
+</nobr><br>
+<nobr><A HREF="android.net.ConnectivityManager.html#android.net.ConnectivityManager.TYPE_BLUETOOTH" class="hiddenlink" target="rightframe">TYPE_BLUETOOTH</A>
+</nobr><br>
+<nobr><A HREF="android.net.ConnectivityManager.html#android.net.ConnectivityManager.TYPE_ETHERNET" class="hiddenlink" target="rightframe">TYPE_ETHERNET</A>
+</nobr><br>
+<A NAME="U"></A>
+<br><font size="+2">U</font>&nbsp;
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.UI_MODE_TYPE_TELEVISION" class="hiddenlink" target="rightframe">UI_MODE_TYPE_TELEVISION</A>
+</nobr><br>
+<A NAME="W"></A>
+<br><font size="+2">W</font>&nbsp;
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_ActionBar_TabBar" class="hiddenlink" target="rightframe">Widget_ActionBar_TabBar</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_ActionBar_TabText" class="hiddenlink" target="rightframe">Widget_ActionBar_TabText</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_ActionBar_TabView" class="hiddenlink" target="rightframe">Widget_ActionBar_TabView</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_ActionBar_TabBar" class="hiddenlink" target="rightframe">Widget_Holo_ActionBar_TabBar</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_ActionBar_TabText" class="hiddenlink" target="rightframe">Widget_Holo_ActionBar_TabText</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_ActionBar_TabView" class="hiddenlink" target="rightframe">Widget_Holo_ActionBar_TabView</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_Light_ActionBar_TabBar" class="hiddenlink" target="rightframe">Widget_Holo_Light_ActionBar_TabBar</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_Light_ActionBar_TabText" class="hiddenlink" target="rightframe">Widget_Holo_Light_ActionBar_TabText</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_Light_ActionBar_TabView" class="hiddenlink" target="rightframe">Widget_Holo_Light_ActionBar_TabView</A>
+</nobr><br>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/fields_index_all.html b/docs/html/sdk/api_diff/13/changes/fields_index_all.html
new file mode 100644 (file)
index 0000000..f183408
--- /dev/null
@@ -0,0 +1,365 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+Field Differences Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for Fields" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<b>Fields</b>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<A HREF="fields_index_additions.html"xclass="hiddenlink">Additions</A>
+  <br>
+<A HREF="fields_index_changes.html"xclass="hiddenlink">Changes</A>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<A NAME="C"></A>
+<br><font size="+2">C</font>&nbsp;
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<i>compatibleWidthLimitDp</i><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.R.attr.html#android.R.attr.compatibleWidthLimitDp" class="hiddenlink" target="rightframe">android.R.attr</A>
+</nobr><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.content.pm.ApplicationInfo.html#android.content.pm.ApplicationInfo.compatibleWidthLimitDp" class="hiddenlink" target="rightframe">android.content.pm.ApplicationInfo</A>
+</nobr><br>
+<nobr><A HREF="android.content.pm.ActivityInfo.html#android.content.pm.ActivityInfo.CONFIG_SCREEN_SIZE" class="hiddenlink" target="rightframe">CONFIG_SCREEN_SIZE</A>
+</nobr><br>
+<nobr><A HREF="android.content.pm.ActivityInfo.html#android.content.pm.ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE" class="hiddenlink" target="rightframe">CONFIG_SMALLEST_SCREEN_SIZE</A>
+</nobr><br>
+<i>CREATOR</i><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.graphics.Point.html#android.graphics.Point.CREATOR" class="hiddenlink" target="rightframe">android.graphics.Point</A>
+</nobr><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.graphics.PointF.html#android.graphics.PointF.CREATOR" class="hiddenlink" target="rightframe">android.graphics.PointF</A>
+</nobr><br>
+<A NAME="D"></A>
+<br><font size="+2">D</font>&nbsp;
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.util.DisplayMetrics.html#android.util.DisplayMetrics.DENSITY_TV" class="hiddenlink" target="rightframe">DENSITY_TV</A>
+</nobr><br>
+<A NAME="F"></A>
+<br><font size="+2">F</font>&nbsp;
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.content.pm.PackageManager.html#android.content.pm.PackageManager.FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT" class="hiddenlink" target="rightframe">FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT</A>
+</nobr><br>
+<nobr><A HREF="android.content.pm.PackageManager.html#android.content.pm.PackageManager.FEATURE_FAKETOUCH_MULTITOUCH_JAZZHAND" class="hiddenlink" target="rightframe">FEATURE_FAKETOUCH_MULTITOUCH_JAZZHAND</A>
+</nobr><br>
+<nobr><A HREF="android.content.pm.PackageManager.html#android.content.pm.PackageManager.FEATURE_SCREEN_LANDSCAPE" class="hiddenlink" target="rightframe">FEATURE_SCREEN_LANDSCAPE</A>
+</nobr><br>
+<nobr><A HREF="android.content.pm.PackageManager.html#android.content.pm.PackageManager.FEATURE_SCREEN_PORTRAIT" class="hiddenlink" target="rightframe">FEATURE_SCREEN_PORTRAIT</A>
+</nobr><br>
+<A NAME="H"></A>
+<br><font size="+2">H</font>&nbsp;
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.os.Build.VERSION_CODES.html#android.os.Build.VERSION_CODES.HONEYCOMB_MR2" class="hiddenlink" target="rightframe">HONEYCOMB_MR2</A>
+</nobr><br>
+<A NAME="L"></A>
+<br><font size="+2">L</font>&nbsp;
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<i>largestWidthLimitDp</i><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.R.attr.html#android.R.attr.largestWidthLimitDp" class="hiddenlink" target="rightframe">android.R.attr</A>
+</nobr><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.content.pm.ApplicationInfo.html#android.content.pm.ApplicationInfo.largestWidthLimitDp" class="hiddenlink" target="rightframe">android.content.pm.ApplicationInfo</A>
+</nobr><br>
+<A NAME="N"></A>
+<br><font size="+2">N</font>&nbsp;
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.telephony.TelephonyManager.html#android.telephony.TelephonyManager.NETWORK_TYPE_HSPAP" class="hiddenlink" target="rightframe">NETWORK_TYPE_HSPAP</A>
+</nobr><br>
+<A NAME="R"></A>
+<br><font size="+2">R</font>&nbsp;
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<i>requiresSmallestWidthDp</i><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.R.attr.html#android.R.attr.requiresSmallestWidthDp" class="hiddenlink" target="rightframe">android.R.attr</A>
+</nobr><br>
+<nobr>&nbsp;in&nbsp;
+<A HREF="android.content.pm.ApplicationInfo.html#android.content.pm.ApplicationInfo.requiresSmallestWidthDp" class="hiddenlink" target="rightframe">android.content.pm.ApplicationInfo</A>
+</nobr><br>
+<A NAME="S"></A>
+<br><font size="+2">S</font>&nbsp;
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.os.PowerManager.html#android.os.PowerManager.SCREEN_BRIGHT_WAKE_LOCK" class="hiddenlink" target="rightframe">SCREEN_BRIGHT_WAKE_LOCK</A>
+</nobr><br>
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.SCREEN_HEIGHT_DP_UNDEFINED" class="hiddenlink" target="rightframe">SCREEN_HEIGHT_DP_UNDEFINED</A>
+</nobr><br>
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.SCREEN_WIDTH_DP_UNDEFINED" class="hiddenlink" target="rightframe">SCREEN_WIDTH_DP_UNDEFINED</A>
+</nobr><br>
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.screenHeightDp" class="hiddenlink" target="rightframe">screenHeightDp</A>
+</nobr><br>
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.screenWidthDp" class="hiddenlink" target="rightframe">screenWidthDp</A>
+</nobr><br>
+<nobr><A HREF="android.Manifest.permission.html#android.Manifest.permission.SET_POINTER_SPEED" class="hiddenlink" target="rightframe">SET_POINTER_SPEED</A>
+</nobr><br>
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.SMALLEST_SCREEN_WIDTH_DP_UNDEFINED" class="hiddenlink" target="rightframe">SMALLEST_SCREEN_WIDTH_DP_UNDEFINED</A>
+</nobr><br>
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.smallestScreenWidthDp" class="hiddenlink" target="rightframe">smallestScreenWidthDp</A>
+</nobr><br>
+<A NAME="T"></A>
+<br><font size="+2">T</font>&nbsp;
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo" class="hiddenlink" target="rightframe">TextAppearance_Holo</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_DialogWindowTitle" class="hiddenlink" target="rightframe">TextAppearance_Holo_DialogWindowTitle</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Inverse" class="hiddenlink" target="rightframe">TextAppearance_Holo_Inverse</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Large" class="hiddenlink" target="rightframe">TextAppearance_Holo_Large</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Large_Inverse" class="hiddenlink" target="rightframe">TextAppearance_Holo_Large_Inverse</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Medium" class="hiddenlink" target="rightframe">TextAppearance_Holo_Medium</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Medium_Inverse" class="hiddenlink" target="rightframe">TextAppearance_Holo_Medium_Inverse</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_SearchResult_Subtitle" class="hiddenlink" target="rightframe">TextAppearance_Holo_SearchResult_Subtitle</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_SearchResult_Title" class="hiddenlink" target="rightframe">TextAppearance_Holo_SearchResult_Title</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Small" class="hiddenlink" target="rightframe">TextAppearance_Holo_Small</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Small_Inverse" class="hiddenlink" target="rightframe">TextAppearance_Holo_Small_Inverse</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_ActionBar_Subtitle" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_ActionBar_Subtitle</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_ActionBar_Title" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_ActionBar_Title</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_ActionMode_Subtitle" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_ActionMode_Subtitle</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_ActionMode_Title" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_ActionMode_Title</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_Button" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_Button</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_DropDownHint" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_DropDownHint</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_DropDownItem" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_DropDownItem</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_EditText" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_EditText</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_IconMenu_Item" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_IconMenu_Item</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_PopupMenu" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_PopupMenu</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_PopupMenu_Large" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_PopupMenu_Large</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_PopupMenu_Small" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_PopupMenu_Small</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_TabWidget" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_TabWidget</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_TextView" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_TextView</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_TextView_PopupMenu" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_TextView_PopupMenu</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_Widget_TextView_SpinnerItem" class="hiddenlink" target="rightframe">TextAppearance_Holo_Widget_TextView_SpinnerItem</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.TextAppearance_Holo_WindowTitle" class="hiddenlink" target="rightframe">TextAppearance_Holo_WindowTitle</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.Theme_Holo_Light_NoActionBar" class="hiddenlink" target="rightframe">Theme_Holo_Light_NoActionBar</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.Theme_Holo_Light_NoActionBar_Fullscreen" class="hiddenlink" target="rightframe">Theme_Holo_Light_NoActionBar_Fullscreen</A>
+</nobr><br>
+<nobr><A HREF="android.os.IBinder.html#android.os.IBinder.TWEET_TRANSACTION" class="hiddenlink" target="rightframe">TWEET_TRANSACTION</A>
+</nobr><br>
+<nobr><A HREF="android.net.ConnectivityManager.html#android.net.ConnectivityManager.TYPE_BLUETOOTH" class="hiddenlink" target="rightframe">TYPE_BLUETOOTH</A>
+</nobr><br>
+<nobr><A HREF="android.net.ConnectivityManager.html#android.net.ConnectivityManager.TYPE_ETHERNET" class="hiddenlink" target="rightframe">TYPE_ETHERNET</A>
+</nobr><br>
+<A NAME="U"></A>
+<br><font size="+2">U</font>&nbsp;
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.content.res.Configuration.html#android.content.res.Configuration.UI_MODE_TYPE_TELEVISION" class="hiddenlink" target="rightframe">UI_MODE_TYPE_TELEVISION</A>
+</nobr><br>
+<A NAME="W"></A>
+<br><font size="+2">W</font>&nbsp;
+<a href="#C"><font size="-2">C</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#H"><font size="-2">H</font></a> 
+<a href="#L"><font size="-2">L</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#T"><font size="-2">T</font></a> 
+<a href="#U"><font size="-2">U</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_ActionBar_TabBar" class="hiddenlink" target="rightframe">Widget_ActionBar_TabBar</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_ActionBar_TabText" class="hiddenlink" target="rightframe">Widget_ActionBar_TabText</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_ActionBar_TabView" class="hiddenlink" target="rightframe">Widget_ActionBar_TabView</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_ActionBar_TabBar" class="hiddenlink" target="rightframe">Widget_Holo_ActionBar_TabBar</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_ActionBar_TabText" class="hiddenlink" target="rightframe">Widget_Holo_ActionBar_TabText</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_ActionBar_TabView" class="hiddenlink" target="rightframe">Widget_Holo_ActionBar_TabView</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_Light_ActionBar_TabBar" class="hiddenlink" target="rightframe">Widget_Holo_Light_ActionBar_TabBar</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_Light_ActionBar_TabText" class="hiddenlink" target="rightframe">Widget_Holo_Light_ActionBar_TabText</A>
+</nobr><br>
+<nobr><A HREF="android.R.style.html#android.R.style.Widget_Holo_Light_ActionBar_TabView" class="hiddenlink" target="rightframe">Widget_Holo_Light_ActionBar_TabView</A>
+</nobr><br>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/fields_index_changes.html b/docs/html/sdk/api_diff/13/changes/fields_index_changes.html
new file mode 100644 (file)
index 0000000..953047c
--- /dev/null
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+Field Changes Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for Fields" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<a href="fields_index_all.html" class="staysblack">All Fields</a>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<A HREF="fields_index_additions.html"xclass="hiddenlink">Additions</A>
+  <br>
+<b>Changes</b>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<A NAME="S"></A>
+<br><font size="+2">S</font>&nbsp;
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.os.PowerManager.html#android.os.PowerManager.SCREEN_BRIGHT_WAKE_LOCK" class="hiddenlink" target="rightframe">SCREEN_BRIGHT_WAKE_LOCK</A>
+</nobr><br>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/fields_index_removals.html b/docs/html/sdk/api_diff/13/changes/fields_index_removals.html
new file mode 100644 (file)
index 0000000..9f62d88
--- /dev/null
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+Field Removals Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for Fields" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<a href="fields_index_all.html" class="staysblack">All Fields</a>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<A HREF="fields_index_additions.html"xclass="hiddenlink">Additions</A>
+  <br>
+<A HREF="fields_index_changes.html"xclass="hiddenlink">Changes</A>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/jdiff_help.html b/docs/html/sdk/api_diff/13/changes/jdiff_help.html
new file mode 100644 (file)
index 0000000..ec659d4
--- /dev/null
@@ -0,0 +1,134 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+JDiff Help
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<TABLE summary="Navigation bar" BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+  <TABLE summary="Navigation bar" BORDER="0" CELLPADDING="0" CELLSPACING="3">
+    <TR ALIGN="center" VALIGN="top">
+      <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../reference/index.html" target="_top"><FONT CLASS="NavBarFont1"><B><code>13</code></B></FONT></A>&nbsp;</TD>
+      <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="changes-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+      <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> &nbsp;<FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+      <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1"> &nbsp;<FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+      <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="jdiff_statistics.html"><FONT CLASS="NavBarFont1"><B>Statistics</B></FONT></A>&nbsp;</TD>
+      <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Help</B></FONT>&nbsp;</TD>
+    </TR>
+  </TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Generated by<br><a href="http://www.jdiff.org" class="staysblack" target="_top">JDiff</a></b></EM></TD>
+</TR>
+<TR>
+  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell2"><FONT SIZE="-2"></FONT>
+</TD>
+  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell2"><FONT SIZE="-2">
+  <A HREF="../changes.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
+  &nbsp;<A HREF="jdiff_help.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
+</TR>
+</TABLE>
+<HR>
+<!-- End of nav bar -->
+<center>
+<H1>JDiff Documentation</H1>
+</center>
+<BLOCKQUOTE>
+JDiff is a <a href="http://java.sun.com/j2se/javadoc/" target="_top">Javadoc</a> doclet which generates a report of the API differences between two versions of a product. It does not report changes in Javadoc comments, or changes in what a class or method does. 
+This help page describes the different parts of the output from JDiff.
+</BLOCKQUOTE>
+<BLOCKQUOTE>
+ See the reference page in the <a href="http://www.jdiff.org">source for JDiff</a> for information about how to generate a report like this one.
+</BLOCKQUOTE>
+<BLOCKQUOTE>
+The indexes shown in the top-left frame help show each type of change in more detail. The index "All Differences" contains all the differences between the APIs, in alphabetical order. 
+These indexes all use the same format:
+<ul>
+<li>Removed packages, classes, constructors, methods and fields are <strike>struck through</strike>.</li>
+<li>Added packages, classes, constructors, methods and fields appear in <b>bold</b>.</li>
+<li>Changed packages, classes, constructors, methods and fields appear in normal text.</li>
+</ul>
+</BLOCKQUOTE>
+<BLOCKQUOTE>
+You can always tell when you are reading a JDiff page, rather than a Javadoc page, by the color of the index bar and the color of the background. 
+Links which take you to a Javadoc page are always in a <code>typewriter</code> font. 
+Just like Javadoc, all interface names are in <i>italic</i>, and class names are not italicized. Where there are multiple entries in an index with the same name, the heading for them is also in italics, but is not a link.
+</BLOCKQUOTE>
+<BLOCKQUOTE>
+<H3><b><code>Javadoc</code></b></H3>
+This is a link to the <a href="../../../../reference/index.html" target="_top">top-level</a> Javadoc page for the new version of the product.
+</BLOCKQUOTE>
+<BLOCKQUOTE>
+<H3>Overview</H3>
+The <a href="changes-summary.html">overview</a> is the top-level summary of what was removed, added and changed between versions.
+</BLOCKQUOTE>
+<BLOCKQUOTE>
+<H3>Package</H3>
+This is a link to the package containing the current changed class or interface.
+</BLOCKQUOTE>
+<BLOCKQUOTE>
+<H3>Class</H3>
+This is highlighted when you are looking at the changed class or interface.
+</BLOCKQUOTE>
+<BLOCKQUOTE>
+<H3>Text Changes</H3>
+This is a link to the top-level index of all documentation changes for the current package or class. 
+If it is not present, then there are no documentation changes for the current package or class. 
+This link can be removed entirely by not using the <code>-docchanges</code> option.
+</BLOCKQUOTE>
+<BLOCKQUOTE>
+<H3>Statistics</H3>
+This is a link to a page which shows statistics about the changes between the two APIs.
+This link can be removed entirely by not using the <code>-stats</code> option.
+</BLOCKQUOTE>
+<BLOCKQUOTE>
+<H3>Help</H3>
+A link to this Help page for JDiff.
+</BLOCKQUOTE>
+<BLOCKQUOTE>
+<H3>Prev/Next</H3>
+These links take you to the previous  and next changed package or class.
+</BLOCKQUOTE>
+<BLOCKQUOTE>
+<H3>Frames/No Frames</H3>
+These links show and hide the HTML frames. All pages are available with or without frames.
+</BLOCKQUOTE>
+<BLOCKQUOTE>
+<H2>Complex Changes</H2>
+There are some complex changes which can occur between versions, for example, when two or more methods with the same name change simultaneously, or when a method or field is moved into or from a superclass. 
+In these cases, the change will be seen as a removal and an addition, rather than as a change. Unexpected removals or additions are often part of one of these type of changes. 
+</BLOCKQUOTE>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/jdiff_statistics.html b/docs/html/sdk/api_diff/13/changes/jdiff_statistics.html
new file mode 100644 (file)
index 0000000..626c765
--- /dev/null
@@ -0,0 +1,382 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+API Change Statistics
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<body class="gc-documentation">
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;xborder-bottom:none;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="../changes.html" target="_top">Top of Report</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<h1>API&nbsp;Change&nbsp;Statistics</h1>
+<p>The overall difference between API Levels 12 and 13 is approximately <span style="color:222;font-weight:bold;">0.04%</span>.
+</p>
+<br>
+<a name="numbers"></a>
+<h2>Total of Differences, by Number and Type</h2>
+<p>
+The table below lists the numbers of program elements (packages, classes, constructors, methods, and fields) that were added, changed, or removed. The table includes only the highest-level program elements &mdash; that is, if a class with two methods was added, the number of methods added does not include those two methods, but the number of classes added does include that class.
+</p>
+<TABLE summary="Number of differences" WIDTH="100%">
+<TR>
+  <th>Type</th>
+  <TH ALIGN="center"><b>Additions</b></TH>
+  <TH ALIGN="center"><b>Changes</b></TH>
+  <TH ALIGN="center">Removals</TH>
+  <TH ALIGN="center"><b>Total</b></TH>
+</TR>
+<TR>
+  <TD>Packages</TD>
+  <TD ALIGN="right">0</TD>
+  <TD ALIGN="right">11</TD>
+  <TD ALIGN="right">0</TD>
+  <TD ALIGN="right">11</TD>
+</TR>
+<TR>
+  <TD>Classes and <i>Interfaces</i></TD>
+  <TD ALIGN="right">2</TD>
+  <TD ALIGN="right">29</TD>
+  <TD ALIGN="right">0</TD>
+  <TD ALIGN="right">31</TD>
+</TR>
+<TR>
+  <TD>Constructors</TD>
+  <TD ALIGN="right">0</TD>
+  <TD ALIGN="right">0</TD>
+  <TD ALIGN="right">0</TD>
+  <TD ALIGN="right">0</TD>
+</TR>
+<TR>
+  <TD>Methods</TD>
+  <TD ALIGN="right">22</TD>
+  <TD ALIGN="right">12</TD>
+  <TD ALIGN="right">0</TD>
+  <TD ALIGN="right">34</TD>
+</TR>
+<TR>
+  <TD>Fields</TD>
+  <TD ALIGN="right">68</TD>
+  <TD ALIGN="right">1</TD>
+  <TD ALIGN="right">0</TD>
+  <TD ALIGN="right">69</TD>
+</TR>
+<TR>
+  <TD style="background-color:#FAFAFA"><b>Total</b></TD>
+  <TD  style="background-color:#FAFAFA" ALIGN="right"><strong>92</strong></TD>
+  <TD  style="background-color:#FAFAFA" ALIGN="right"><strong>53</strong></TD>
+  <TD  style="background-color:#FAFAFA" ALIGN="right"><strong>0</strong></TD>
+  <TD  style="background-color:#FAFAFA" ALIGN="right"><strong>145</strong></TD>
+</TR>
+</TABLE>
+<br>
+<a name="packages"></a>
+<h2>Changed Packages, Sorted by Percentage Difference</h2>
+<TABLE summary="Packages sorted by percentage difference" WIDTH="100%">
+<TR>
+  <TH  WIDTH="10%">Percentage Difference*</TH>
+  <TH>Package</TH>
+</TR>
+<TR>
+  <TD ALIGN="center">2</TD>
+  <TD><A HREF="pkg_android.app.html">android.app</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">1</TD>
+  <TD><A HREF="pkg_android.os.html">android.os</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">&lt;1</TD>
+  <TD><A HREF="pkg_android.hardware.usb.html">android.hardware.usb</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">&lt;1</TD>
+  <TD><A HREF="pkg_android.graphics.html">android.graphics</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">&lt;1</TD>
+  <TD><A HREF="pkg_android.html">android</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">&lt;1</TD>
+  <TD><A HREF="pkg_android.content.res.html">android.content.res</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">&lt;1</TD>
+  <TD><A HREF="pkg_android.content.pm.html">android.content.pm</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">&lt;1</TD>
+  <TD><A HREF="pkg_android.view.html">android.view</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">&lt;1</TD>
+  <TD><A HREF="pkg_android.net.html">android.net</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">&lt;1</TD>
+  <TD><A HREF="pkg_android.util.html">android.util</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">&lt;1</TD>
+  <TD><A HREF="pkg_android.telephony.html">android.telephony</A></TD>
+</TR>
+</TABLE>
+<p style="font-size:10px">* See <a href="#calculation">Calculation of Change Percentages</a>, below.</p>
+<br>
+<a name="classes"></a>
+<h2>Changed Classes and <i>Interfaces</i>, Sorted by Percentage Difference</h2>
+<TABLE summary="Classes sorted by percentage difference" WIDTH="100%">
+<TR WIDTH="20%">
+  <TH WIDTH="10%">Percentage<br>Difference*</TH>
+  <TH><b>Class or <i>Interface</i></b></TH>
+</TR>
+<TR>
+  <TD ALIGN="center">33</TD>
+  <TD><A HREF="android.app.KeyguardManager.html">
+android.app.KeyguardManager</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">25</TD>
+  <TD><A HREF="android.app.KeyguardManager.KeyguardLock.html">
+android.app.KeyguardManager.KeyguardLock</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">20</TD>
+  <TD><A HREF="android.view.Display.html">
+android.view.Display</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">18</TD>
+  <TD><A HREF="android.graphics.Point.html">
+android.graphics.Point</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">14</TD>
+  <TD><A HREF="android.graphics.PointF.html">
+android.graphics.PointF</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">12</TD>
+  <TD><A HREF="android.app.ActivityGroup.html">
+android.app.ActivityGroup</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">10</TD>
+  <TD><A HREF="android.app.TabActivity.html">
+android.app.TabActivity</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">7</TD>
+  <TD><A HREF="android.R.style.html">
+android.R.style</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">6</TD>
+  <TD><A HREF="android.os.ParcelFileDescriptor.html">
+android.os.ParcelFileDescriptor</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">6</TD>
+  <TD><A HREF="android.os.IBinder.html">
+<i>android.os.IBinder</i></A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">5</TD>
+  <TD><A HREF="android.hardware.usb.UsbDeviceConnection.html">
+android.hardware.usb.UsbDeviceConnection</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">4</TD>
+  <TD><A HREF="android.app.FragmentTransaction.html">
+android.app.FragmentTransaction</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">4</TD>
+  <TD><A HREF="android.content.res.Configuration.html">
+android.content.res.Configuration</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">4</TD>
+  <TD><A HREF="android.os.PowerManager.html">
+android.os.PowerManager</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">3</TD>
+  <TD><A HREF="android.app.LocalActivityManager.html">
+android.app.LocalActivityManager</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">3</TD>
+  <TD><A HREF="android.net.ConnectivityManager.html">
+android.net.ConnectivityManager</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">3</TD>
+  <TD><A HREF="android.app.Activity.html">
+android.app.Activity</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">3</TD>
+  <TD><A HREF="android.os.Build.VERSION_CODES.html">
+android.os.Build.VERSION_CODES</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">3</TD>
+  <TD><A HREF="android.content.pm.ApplicationInfo.html">
+android.content.pm.ApplicationInfo</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">3</TD>
+  <TD><A HREF="android.util.DisplayMetrics.html">
+android.util.DisplayMetrics</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">2</TD>
+  <TD><A HREF="android.os.Binder.html">
+android.os.Binder</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">2</TD>
+  <TD><A HREF="android.app.Fragment.html">
+android.app.Fragment</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">2</TD>
+  <TD><A HREF="android.app.FragmentManager.html">
+android.app.FragmentManager</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">1</TD>
+  <TD><A HREF="android.content.pm.ActivityInfo.html">
+android.content.pm.ActivityInfo</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">1</TD>
+  <TD><A HREF="android.content.pm.PackageManager.html">
+android.content.pm.PackageManager</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">&lt;1</TD>
+  <TD><A HREF="android.telephony.TelephonyManager.html">
+android.telephony.TelephonyManager</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">&lt;1</TD>
+  <TD><A HREF="android.Manifest.permission.html">
+android.Manifest.permission</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">&lt;1</TD>
+  <TD><A HREF="android.R.attr.html">
+android.R.attr</A></TD>
+</TR>
+<TR>
+  <TD ALIGN="center">&lt;1</TD>
+  <TD><A HREF="android.view.KeyEvent.html">
+android.view.KeyEvent</A></TD>
+</TR>
+</TABLE>
+<p style="font-size:10px">* See <a href="#calculation">Calculation of Change Percentages</a>, below.</p>
+<br>
+<h2 id="calculation">Calculation of Change Percentages</h2>
+<p>
+The percent change statistic reported for all elements in the &quot;to&quot; API Level specification is defined recursively as follows:</p>
+<pre>
+Percentage difference = 100 * (added + removed + 2*changed)
+                        -----------------------------------
+                        sum of public elements in BOTH APIs
+</pre>
+<p>where <code>added</code> is the number of packages added, <code>removed</code> is the number of packages removed, and <code>changed</code> is the number of packages changed.
+This definition is applied recursively for the classes and their program elements, so the value for a changed package will be less than 1, unless every class in that package has changed.
+The definition ensures that if all packages are removed and all new packages are
+added, the change will be 100%.</p>
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY></HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/jdiff_topleftframe.html b/docs/html/sdk/api_diff/13/changes/jdiff_topleftframe.html
new file mode 100644 (file)
index 0000000..36f9836
--- /dev/null
@@ -0,0 +1,63 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+Android API Version Differences
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<table class="jdiffIndex" summary="Links to diff index files" BORDER="0" WIDTH="100%" cellspacing="0" cellpadding="0" style="margin:0">
+<TR>
+  <th class="indexHeader" nowrap>
+  Select a Diffs Index:</th>
+</TR>
+<TR>
+  <TD><FONT CLASS="indexText" size="-2"><A HREF="alldiffs_index_all.html" TARGET="bottomleftframe">All Differences</A></FONT><br></TD>
+</TR>
+<TR>
+  <TD NOWRAP><FONT CLASS="indexText" size="-2"><A HREF="packages_index_all.html" TARGET="bottomleftframe">By Package</A></FONT><br></TD>
+</TR>
+<TR>
+  <TD NOWRAP><FONT CLASS="indexText" size="-2"><A HREF="classes_index_all.html" TARGET="bottomleftframe">By Class</A></FONT><br></TD>
+</TR>
+<TR>
+  <TD NOWRAP><FONT CLASS="indexText" size="-2"><A HREF="constructors_index_all.html" TARGET="bottomleftframe">By Constructor</A></FONT><br></TD>
+</TR>
+<TR>
+  <TD NOWRAP><FONT CLASS="indexText" size="-2"><A HREF="methods_index_all.html" TARGET="bottomleftframe">By Method</A></FONT><br></TD>
+</TR>
+<TR>
+  <TD NOWRAP><FONT CLASS="indexText" size="-2"><A HREF="fields_index_all.html" TARGET="bottomleftframe">By Field</A></FONT><br></TD>
+</TR>
+</TABLE>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/methods_index_additions.html b/docs/html/sdk/api_diff/13/changes/methods_index_additions.html
new file mode 100644 (file)
index 0000000..fbbf5a6
--- /dev/null
@@ -0,0 +1,225 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+Method Additions Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for Methods" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<a href="methods_index_all.html" class="staysblack">All Methods</a>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<b>Additions</b>
+  <br>
+<A HREF="methods_index_changes.html"xclass="hiddenlink">Changes</A>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<A NAME="A"></A>
+<br><font size="+2">A</font>&nbsp;
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.os.ParcelFileDescriptor.html#android.os.ParcelFileDescriptor.adoptFd_added(int)" class="hiddenlink" target="rightframe"><b>adoptFd</b>
+(<code>int</code>)</A></nobr><br>
+<nobr><A HREF="android.app.FragmentTransaction.html#android.app.FragmentTransaction.attach_added(android.app.Fragment)" class="hiddenlink" target="rightframe"><b>attach</b>
+(<code>Fragment</code>)</A></nobr><br>
+<A NAME="D"></A>
+<br><font size="+2">D</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<i>describeContents</i><br>
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.Point.html#android.graphics.Point.describeContents_added()" class="hiddenlink" target="rightframe">type&nbsp;<b>
+()</b>&nbsp;in&nbsp;android.graphics.Point
+</A></nobr><br>
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.PointF.html#android.graphics.PointF.describeContents_added()" class="hiddenlink" target="rightframe">type&nbsp;<b>
+()</b>&nbsp;in&nbsp;android.graphics.PointF
+</A></nobr><br>
+<nobr><A HREF="android.app.FragmentTransaction.html#android.app.FragmentTransaction.detach_added(android.app.Fragment)" class="hiddenlink" target="rightframe"><b>detach</b>
+(<code>Fragment</code>)</A></nobr><br>
+<i>dumpAsync</i><br>
+&nbsp;&nbsp;<nobr><A HREF="android.os.Binder.html#android.os.Binder.dumpAsync_added(java.io.FileDescriptor, java.lang.String[])" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>FileDescriptor, String[]</code>)</b>&nbsp;in&nbsp;android.os.Binder
+</A></nobr><br>
+&nbsp;&nbsp;<nobr><A HREF="android.os.IBinder.html#android.os.IBinder.dumpAsync_added(java.io.FileDescriptor, java.lang.String[])" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>FileDescriptor, String[]</code>)</b>&nbsp;in&nbsp;android.os.IBinder
+</A></nobr><br>
+<nobr><A HREF="android.os.ParcelFileDescriptor.html#android.os.ParcelFileDescriptor.dup_added(java.io.FileDescriptor)" class="hiddenlink" target="rightframe"><b>dup</b>
+(<code>FileDescriptor</code>)</A></nobr><br>
+<A NAME="F"></A>
+<br><font size="+2">F</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.os.ParcelFileDescriptor.html#android.os.ParcelFileDescriptor.fromFd_added(int)" class="hiddenlink" target="rightframe"><b>fromFd</b>
+(<code>int</code>)</A></nobr><br>
+<A NAME="G"></A>
+<br><font size="+2">G</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.view.KeyEvent.html#android.view.KeyEvent.getModifiers_added()" class="hiddenlink" target="rightframe"><b>getModifiers</b>
+()</A></nobr><br>
+<nobr><A HREF="android.hardware.usb.UsbDeviceConnection.html#android.hardware.usb.UsbDeviceConnection.getRawDescriptors_added()" class="hiddenlink" target="rightframe"><b>getRawDescriptors</b>
+()</A></nobr><br>
+<nobr><A HREF="android.view.Display.html#android.view.Display.getRectSize_added(android.graphics.Rect)" class="hiddenlink" target="rightframe"><b>getRectSize</b>
+(<code>Rect</code>)</A></nobr><br>
+<nobr><A HREF="android.view.Display.html#android.view.Display.getSize_added(android.graphics.Point)" class="hiddenlink" target="rightframe"><b>getSize</b>
+(<code>Point</code>)</A></nobr><br>
+<A NAME="I"></A>
+<br><font size="+2">I</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.Fragment.html#android.app.Fragment.isDetached_added()" class="hiddenlink" target="rightframe"><b>isDetached</b>
+()</A></nobr><br>
+<A NAME="O"></A>
+<br><font size="+2">O</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.Fragment.html#android.app.Fragment.onViewCreated_added(android.view.View, android.os.Bundle)" class="hiddenlink" target="rightframe"><b>onViewCreated</b>
+(<code>View, Bundle</code>)</A></nobr><br>
+<A NAME="R"></A>
+<br><font size="+2">R</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<i>readFromParcel</i><br>
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.Point.html#android.graphics.Point.readFromParcel_added(android.os.Parcel)" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>Parcel</code>)</b>&nbsp;in&nbsp;android.graphics.Point
+</A></nobr><br>
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.PointF.html#android.graphics.PointF.readFromParcel_added(android.os.Parcel)" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>Parcel</code>)</b>&nbsp;in&nbsp;android.graphics.PointF
+</A></nobr><br>
+<A NAME="S"></A>
+<br><font size="+2">S</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.FragmentManager.html#android.app.FragmentManager.saveFragmentInstanceState_added(android.app.Fragment)" class="hiddenlink" target="rightframe"><b>saveFragmentInstanceState</b>
+(<code>Fragment</code>)</A></nobr><br>
+<nobr><A HREF="android.app.FragmentTransaction.html#android.app.FragmentTransaction.setCustomAnimations_added(int, int, int, int)" class="hiddenlink" target="rightframe"><b>setCustomAnimations</b>
+(<code>int, int, int, int</code>)</A></nobr><br>
+<nobr><A HREF="android.app.Fragment.html#android.app.Fragment.setInitialSavedState_added(android.app.Fragment.SavedState)" class="hiddenlink" target="rightframe"><b>setInitialSavedState</b>
+(<code>SavedState</code>)</A></nobr><br>
+<A NAME="W"></A>
+<br><font size="+2">W</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<i>writeToParcel</i><br>
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.Point.html#android.graphics.Point.writeToParcel_added(android.os.Parcel, int)" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>Parcel, int</code>)</b>&nbsp;in&nbsp;android.graphics.Point
+</A></nobr><br>
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.PointF.html#android.graphics.PointF.writeToParcel_added(android.os.Parcel, int)" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>Parcel, int</code>)</b>&nbsp;in&nbsp;android.graphics.PointF
+</A></nobr><br>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/methods_index_all.html b/docs/html/sdk/api_diff/13/changes/methods_index_all.html
new file mode 100644 (file)
index 0000000..84d0a2c
--- /dev/null
@@ -0,0 +1,298 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+Method Differences Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for Methods" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<b>Methods</b>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<A HREF="methods_index_additions.html"xclass="hiddenlink">Additions</A>
+  <br>
+<A HREF="methods_index_changes.html"xclass="hiddenlink">Changes</A>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<A NAME="A"></A>
+<br><font size="+2">A</font>&nbsp;
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.os.ParcelFileDescriptor.html#android.os.ParcelFileDescriptor.adoptFd_added(int)" class="hiddenlink" target="rightframe"><b>adoptFd</b>
+(<code>int</code>)</A></nobr><br>
+<nobr><A HREF="android.app.FragmentTransaction.html#android.app.FragmentTransaction.attach_added(android.app.Fragment)" class="hiddenlink" target="rightframe"><b>attach</b>
+(<code>Fragment</code>)</A></nobr><br>
+<A NAME="D"></A>
+<br><font size="+2">D</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<i>describeContents</i><br>
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.Point.html#android.graphics.Point.describeContents_added()" class="hiddenlink" target="rightframe">type&nbsp;<b>
+()</b>&nbsp;in&nbsp;android.graphics.Point
+</A></nobr><br>
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.PointF.html#android.graphics.PointF.describeContents_added()" class="hiddenlink" target="rightframe">type&nbsp;<b>
+()</b>&nbsp;in&nbsp;android.graphics.PointF
+</A></nobr><br>
+<nobr><A HREF="android.app.FragmentTransaction.html#android.app.FragmentTransaction.detach_added(android.app.Fragment)" class="hiddenlink" target="rightframe"><b>detach</b>
+(<code>Fragment</code>)</A></nobr><br>
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.dismissDialog_changed(int)" class="hiddenlink" target="rightframe">dismissDialog
+(<code>int</code>)</A></nobr><br>
+<i>dumpAsync</i><br>
+&nbsp;&nbsp;<nobr><A HREF="android.os.Binder.html#android.os.Binder.dumpAsync_added(java.io.FileDescriptor, java.lang.String[])" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>FileDescriptor, String[]</code>)</b>&nbsp;in&nbsp;android.os.Binder
+</A></nobr><br>
+&nbsp;&nbsp;<nobr><A HREF="android.os.IBinder.html#android.os.IBinder.dumpAsync_added(java.io.FileDescriptor, java.lang.String[])" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>FileDescriptor, String[]</code>)</b>&nbsp;in&nbsp;android.os.IBinder
+</A></nobr><br>
+<nobr><A HREF="android.os.ParcelFileDescriptor.html#android.os.ParcelFileDescriptor.dup_added(java.io.FileDescriptor)" class="hiddenlink" target="rightframe"><b>dup</b>
+(<code>FileDescriptor</code>)</A></nobr><br>
+<A NAME="E"></A>
+<br><font size="+2">E</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.KeyguardManager.html#android.app.KeyguardManager.exitKeyguardSecurely_changed(android.app.KeyguardManager.OnKeyguardExitResult)" class="hiddenlink" target="rightframe">exitKeyguardSecurely
+(<code>OnKeyguardExitResult</code>)</A></nobr><br>
+<A NAME="F"></A>
+<br><font size="+2">F</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.os.ParcelFileDescriptor.html#android.os.ParcelFileDescriptor.fromFd_added(int)" class="hiddenlink" target="rightframe"><b>fromFd</b>
+(<code>int</code>)</A></nobr><br>
+<A NAME="G"></A>
+<br><font size="+2">G</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.view.Display.html#android.view.Display.getHeight_changed()" class="hiddenlink" target="rightframe">getHeight
+()</A></nobr><br>
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.getLastNonConfigurationInstance_changed()" class="hiddenlink" target="rightframe">getLastNonConfigurationInstance
+()</A></nobr><br>
+<nobr><A HREF="android.view.KeyEvent.html#android.view.KeyEvent.getModifiers_added()" class="hiddenlink" target="rightframe"><b>getModifiers</b>
+()</A></nobr><br>
+<nobr><A HREF="android.hardware.usb.UsbDeviceConnection.html#android.hardware.usb.UsbDeviceConnection.getRawDescriptors_added()" class="hiddenlink" target="rightframe"><b>getRawDescriptors</b>
+()</A></nobr><br>
+<nobr><A HREF="android.view.Display.html#android.view.Display.getRectSize_added(android.graphics.Rect)" class="hiddenlink" target="rightframe"><b>getRectSize</b>
+(<code>Rect</code>)</A></nobr><br>
+<nobr><A HREF="android.view.Display.html#android.view.Display.getSize_added(android.graphics.Point)" class="hiddenlink" target="rightframe"><b>getSize</b>
+(<code>Point</code>)</A></nobr><br>
+<nobr><A HREF="android.view.Display.html#android.view.Display.getWidth_changed()" class="hiddenlink" target="rightframe">getWidth
+()</A></nobr><br>
+<A NAME="I"></A>
+<br><font size="+2">I</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.Fragment.html#android.app.Fragment.isDetached_added()" class="hiddenlink" target="rightframe"><b>isDetached</b>
+()</A></nobr><br>
+<A NAME="N"></A>
+<br><font size="+2">N</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.KeyguardManager.html#android.app.KeyguardManager.newKeyguardLock_changed(java.lang.String)" class="hiddenlink" target="rightframe">newKeyguardLock
+(<code>String</code>)</A></nobr><br>
+<A NAME="O"></A>
+<br><font size="+2">O</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.onCreateDialog_changed(int, android.os.Bundle)" class="hiddenlink" target="rightframe">onCreateDialog
+(<code>int, Bundle</code>)</A></nobr><br>
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.onPrepareDialog_changed(int, android.app.Dialog, android.os.Bundle)" class="hiddenlink" target="rightframe">onPrepareDialog
+(<code>int, Dialog, Bundle</code>)</A></nobr><br>
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.onRetainNonConfigurationInstance_changed()" class="hiddenlink" target="rightframe">onRetainNonConfigurationInstance
+()</A></nobr><br>
+<nobr><A HREF="android.app.Fragment.html#android.app.Fragment.onViewCreated_added(android.view.View, android.os.Bundle)" class="hiddenlink" target="rightframe"><b>onViewCreated</b>
+(<code>View, Bundle</code>)</A></nobr><br>
+<A NAME="R"></A>
+<br><font size="+2">R</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<i>readFromParcel</i><br>
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.Point.html#android.graphics.Point.readFromParcel_added(android.os.Parcel)" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>Parcel</code>)</b>&nbsp;in&nbsp;android.graphics.Point
+</A></nobr><br>
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.PointF.html#android.graphics.PointF.readFromParcel_added(android.os.Parcel)" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>Parcel</code>)</b>&nbsp;in&nbsp;android.graphics.PointF
+</A></nobr><br>
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.removeDialog_changed(int)" class="hiddenlink" target="rightframe">removeDialog
+(<code>int</code>)</A></nobr><br>
+<A NAME="S"></A>
+<br><font size="+2">S</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#W"><font size="-2">W</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.FragmentManager.html#android.app.FragmentManager.saveFragmentInstanceState_added(android.app.Fragment)" class="hiddenlink" target="rightframe"><b>saveFragmentInstanceState</b>
+(<code>Fragment</code>)</A></nobr><br>
+<nobr><A HREF="android.app.FragmentTransaction.html#android.app.FragmentTransaction.setCustomAnimations_added(int, int, int, int)" class="hiddenlink" target="rightframe"><b>setCustomAnimations</b>
+(<code>int, int, int, int</code>)</A></nobr><br>
+<nobr><A HREF="android.app.Fragment.html#android.app.Fragment.setInitialSavedState_added(android.app.Fragment.SavedState)" class="hiddenlink" target="rightframe"><b>setInitialSavedState</b>
+(<code>SavedState</code>)</A></nobr><br>
+<i>showDialog</i><br>
+&nbsp;&nbsp;<nobr><A HREF="android.app.Activity.html#android.app.Activity.showDialog_changed(int, android.os.Bundle)" class="hiddenlink" target="rightframe">type&nbsp;
+(<code>int, Bundle</code>)&nbsp;in&nbsp;android.app.Activity
+</A></nobr><br>
+&nbsp;&nbsp;<nobr><A HREF="android.app.Activity.html#android.app.Activity.showDialog_changed(int)" class="hiddenlink" target="rightframe">type&nbsp;
+(<code>int</code>)&nbsp;in&nbsp;android.app.Activity
+</A></nobr><br>
+<A NAME="W"></A>
+<br><font size="+2">W</font>&nbsp;
+<a href="#A"><font size="-2">A</font></a> 
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#F"><font size="-2">F</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#I"><font size="-2">I</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<i>writeToParcel</i><br>
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.Point.html#android.graphics.Point.writeToParcel_added(android.os.Parcel, int)" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>Parcel, int</code>)</b>&nbsp;in&nbsp;android.graphics.Point
+</A></nobr><br>
+&nbsp;&nbsp;<nobr><A HREF="android.graphics.PointF.html#android.graphics.PointF.writeToParcel_added(android.os.Parcel, int)" class="hiddenlink" target="rightframe">type&nbsp;<b>
+(<code>Parcel, int</code>)</b>&nbsp;in&nbsp;android.graphics.PointF
+</A></nobr><br>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/methods_index_changes.html b/docs/html/sdk/api_diff/13/changes/methods_index_changes.html
new file mode 100644 (file)
index 0000000..97cc3ef
--- /dev/null
@@ -0,0 +1,158 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+Method Changes Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for Methods" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<a href="methods_index_all.html" class="staysblack">All Methods</a>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<A HREF="methods_index_additions.html"xclass="hiddenlink">Additions</A>
+  <br>
+<b>Changes</b>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<A NAME="D"></A>
+<br><font size="+2">D</font>&nbsp;
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.dismissDialog_changed(int)" class="hiddenlink" target="rightframe">dismissDialog
+(<code>int</code>)</A></nobr><br>
+<A NAME="E"></A>
+<br><font size="+2">E</font>&nbsp;
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.KeyguardManager.html#android.app.KeyguardManager.exitKeyguardSecurely_changed(android.app.KeyguardManager.OnKeyguardExitResult)" class="hiddenlink" target="rightframe">exitKeyguardSecurely
+(<code>OnKeyguardExitResult</code>)</A></nobr><br>
+<A NAME="G"></A>
+<br><font size="+2">G</font>&nbsp;
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.view.Display.html#android.view.Display.getHeight_changed()" class="hiddenlink" target="rightframe">getHeight
+()</A></nobr><br>
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.getLastNonConfigurationInstance_changed()" class="hiddenlink" target="rightframe">getLastNonConfigurationInstance
+()</A></nobr><br>
+<nobr><A HREF="android.view.Display.html#android.view.Display.getWidth_changed()" class="hiddenlink" target="rightframe">getWidth
+()</A></nobr><br>
+<A NAME="N"></A>
+<br><font size="+2">N</font>&nbsp;
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.KeyguardManager.html#android.app.KeyguardManager.newKeyguardLock_changed(java.lang.String)" class="hiddenlink" target="rightframe">newKeyguardLock
+(<code>String</code>)</A></nobr><br>
+<A NAME="O"></A>
+<br><font size="+2">O</font>&nbsp;
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.onCreateDialog_changed(int, android.os.Bundle)" class="hiddenlink" target="rightframe">onCreateDialog
+(<code>int, Bundle</code>)</A></nobr><br>
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.onPrepareDialog_changed(int, android.app.Dialog, android.os.Bundle)" class="hiddenlink" target="rightframe">onPrepareDialog
+(<code>int, Dialog, Bundle</code>)</A></nobr><br>
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.onRetainNonConfigurationInstance_changed()" class="hiddenlink" target="rightframe">onRetainNonConfigurationInstance
+()</A></nobr><br>
+<A NAME="R"></A>
+<br><font size="+2">R</font>&nbsp;
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#S"><font size="-2">S</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<nobr><A HREF="android.app.Activity.html#android.app.Activity.removeDialog_changed(int)" class="hiddenlink" target="rightframe">removeDialog
+(<code>int</code>)</A></nobr><br>
+<A NAME="S"></A>
+<br><font size="+2">S</font>&nbsp;
+<a href="#D"><font size="-2">D</font></a> 
+<a href="#E"><font size="-2">E</font></a> 
+<a href="#G"><font size="-2">G</font></a> 
+<a href="#N"><font size="-2">N</font></a> 
+<a href="#O"><font size="-2">O</font></a> 
+<a href="#R"><font size="-2">R</font></a> 
+ <a href="#topheader"><font size="-2">TOP</font></a>
+<p><div style="line-height:1.5em;color:black">
+<i>showDialog</i><br>
+&nbsp;&nbsp;<nobr><A HREF="android.app.Activity.html#android.app.Activity.showDialog_changed(int, android.os.Bundle)" class="hiddenlink" target="rightframe">type&nbsp;
+(<code>int, Bundle</code>)&nbsp;in&nbsp;android.app.Activity
+</A></nobr><br>
+&nbsp;&nbsp;<nobr><A HREF="android.app.Activity.html#android.app.Activity.showDialog_changed(int)" class="hiddenlink" target="rightframe">type&nbsp;
+(<code>int</code>)&nbsp;in&nbsp;android.app.Activity
+</A></nobr><br>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/methods_index_removals.html b/docs/html/sdk/api_diff/13/changes/methods_index_removals.html
new file mode 100644 (file)
index 0000000..b5aea4f
--- /dev/null
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+Method Removals Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for Methods" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<a href="methods_index_all.html" class="staysblack">All Methods</a>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<A HREF="methods_index_additions.html"xclass="hiddenlink">Additions</A>
+  <br>
+<A HREF="methods_index_changes.html"xclass="hiddenlink">Changes</A>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/packages_index_additions.html b/docs/html/sdk/api_diff/13/changes/packages_index_additions.html
new file mode 100644 (file)
index 0000000..1776064
--- /dev/null
@@ -0,0 +1,63 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+Package Additions Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for Packages" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<a href="packages_index_all.html" class="staysblack">All Packages</a>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<font color="#999999">Additions</font>
+  <br>
+<A HREF="packages_index_changes.html"xclass="hiddenlink">Changes</A>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<br>
+<div id="indexTableEntries">
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/packages_index_all.html b/docs/html/sdk/api_diff/13/changes/packages_index_all.html
new file mode 100644 (file)
index 0000000..c23f4a6
--- /dev/null
@@ -0,0 +1,75 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+Package Differences Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for Packages" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<b>Packages</b>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<font color="#999999">Additions</font>
+  <br>
+<A HREF="packages_index_changes.html"xclass="hiddenlink">Changes</A>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<br>
+<div id="indexTableEntries">
+<A NAME="A"></A>
+<A HREF="pkg_android.html" class="hiddenlink" target="rightframe">android</A><br>
+<A HREF="pkg_android.app.html" class="hiddenlink" target="rightframe">android.app</A><br>
+<A HREF="pkg_android.content.pm.html" class="hiddenlink" target="rightframe">android.content.pm</A><br>
+<A HREF="pkg_android.content.res.html" class="hiddenlink" target="rightframe">android.content.res</A><br>
+<A HREF="pkg_android.graphics.html" class="hiddenlink" target="rightframe">android.graphics</A><br>
+<A HREF="pkg_android.hardware.usb.html" class="hiddenlink" target="rightframe">android.hardware.usb</A><br>
+<A HREF="pkg_android.net.html" class="hiddenlink" target="rightframe">android.net</A><br>
+<A HREF="pkg_android.os.html" class="hiddenlink" target="rightframe">android.os</A><br>
+<A HREF="pkg_android.telephony.html" class="hiddenlink" target="rightframe">android.telephony</A><br>
+<A HREF="pkg_android.util.html" class="hiddenlink" target="rightframe">android.util</A><br>
+<A HREF="pkg_android.view.html" class="hiddenlink" target="rightframe">android.view</A><br>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/packages_index_changes.html b/docs/html/sdk/api_diff/13/changes/packages_index_changes.html
new file mode 100644 (file)
index 0000000..d00b449
--- /dev/null
@@ -0,0 +1,75 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+Package Changes Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for Packages" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<a href="packages_index_all.html" class="staysblack">All Packages</a>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<font color="#999999">Additions</font>
+  <br>
+<b>Changes</b>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<br>
+<div id="indexTableEntries">
+<A NAME="A"></A>
+<A HREF="pkg_android.html" class="hiddenlink" target="rightframe">android</A><br>
+<A HREF="pkg_android.app.html" class="hiddenlink" target="rightframe">android.app</A><br>
+<A HREF="pkg_android.content.pm.html" class="hiddenlink" target="rightframe">android.content.pm</A><br>
+<A HREF="pkg_android.content.res.html" class="hiddenlink" target="rightframe">android.content.res</A><br>
+<A HREF="pkg_android.graphics.html" class="hiddenlink" target="rightframe">android.graphics</A><br>
+<A HREF="pkg_android.hardware.usb.html" class="hiddenlink" target="rightframe">android.hardware.usb</A><br>
+<A HREF="pkg_android.net.html" class="hiddenlink" target="rightframe">android.net</A><br>
+<A HREF="pkg_android.os.html" class="hiddenlink" target="rightframe">android.os</A><br>
+<A HREF="pkg_android.telephony.html" class="hiddenlink" target="rightframe">android.telephony</A><br>
+<A HREF="pkg_android.util.html" class="hiddenlink" target="rightframe">android.util</A><br>
+<A HREF="pkg_android.view.html" class="hiddenlink" target="rightframe">android.view</A><br>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/packages_index_removals.html b/docs/html/sdk/api_diff/13/changes/packages_index_removals.html
new file mode 100644 (file)
index 0000000..9fd0f7e
--- /dev/null
@@ -0,0 +1,63 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+Package Removals Index
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY class="gc-documentation" style="padding:12px;">
+<a NAME="topheader"></a>
+<table summary="Index for Packages" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;">
+  <tr>
+  <th class="indexHeader">
+    Filter the Index:
+  </th>
+  </tr>
+  <tr>
+  <td class="indexText" style="line-height:1.3em;padding-left:2em;">
+<a href="packages_index_all.html" class="staysblack">All Packages</a>
+  <br>
+<font color="#999999">Removals</font>
+  <br>
+<font color="#999999">Additions</font>
+  <br>
+<A HREF="packages_index_changes.html"xclass="hiddenlink">Changes</A>
+  </td>
+  </tr>
+</table>
+<div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;">
+Listed as: <span style="color:#069"><strong>Added</strong></span>,  <span style="color:#069"><strike>Removed</strike></span>,  <span style="color:#069">Changed</span></font>
+</div>
+<br>
+<div id="indexTableEntries">
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/pkg_android.app.html b/docs/html/sdk/api_diff/13/changes/pkg_android.app.html
new file mode 100644 (file)
index 0000000..d728895
--- /dev/null
@@ -0,0 +1,190 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.app
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Package <A HREF="../../../../reference/android/app/package-summary.html" target="_top"><font size="+1"><code>android.app</code></font></A>
+</H2>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Classes" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Classes</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="Fragment.SavedState"></A>
+  <nobr><A HREF="../../../../reference/android/app/Fragment.SavedState.html" target="_top"><code>Fragment.SavedState</code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<p>
+<a NAME="Changed"></a>
+<TABLE summary="Changed Classes" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Changed Classes</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="Activity"></A>
+  <nobr><A HREF="android.app.Activity.html">Activity</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="ActivityGroup"></A>
+  <nobr><A HREF="android.app.ActivityGroup.html">ActivityGroup</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="Fragment"></A>
+  <nobr><A HREF="android.app.Fragment.html">Fragment</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="FragmentManager"></A>
+  <nobr><A HREF="android.app.FragmentManager.html">FragmentManager</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="FragmentTransaction"></A>
+  <nobr><A HREF="android.app.FragmentTransaction.html">FragmentTransaction</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="KeyguardManager"></A>
+  <nobr><A HREF="android.app.KeyguardManager.html">KeyguardManager</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="KeyguardManager.KeyguardLock"></A>
+  <nobr><A HREF="android.app.KeyguardManager.KeyguardLock.html">KeyguardManager.KeyguardLock</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="LocalActivityManager"></A>
+  <nobr><A HREF="android.app.LocalActivityManager.html">LocalActivityManager</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="TabActivity"></A>
+  <nobr><A HREF="android.app.TabActivity.html">TabActivity</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/pkg_android.content.pm.html b/docs/html/sdk/api_diff/13/changes/pkg_android.content.pm.html
new file mode 100644 (file)
index 0000000..60ab502
--- /dev/null
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.content.pm
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Package <A HREF="../../../../reference/android/content/pm/package-summary.html" target="_top"><font size="+1"><code>android.content.pm</code></font></A>
+</H2>
+<p>
+<a NAME="Changed"></a>
+<TABLE summary="Changed Classes" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Changed Classes</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="ActivityInfo"></A>
+  <nobr><A HREF="android.content.pm.ActivityInfo.html">ActivityInfo</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="ApplicationInfo"></A>
+  <nobr><A HREF="android.content.pm.ApplicationInfo.html">ApplicationInfo</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="PackageManager"></A>
+  <nobr><A HREF="android.content.pm.PackageManager.html">PackageManager</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/pkg_android.content.res.html b/docs/html/sdk/api_diff/13/changes/pkg_android.content.res.html
new file mode 100644 (file)
index 0000000..01c31d0
--- /dev/null
@@ -0,0 +1,119 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.content.res
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Package <A HREF="../../../../reference/android/content/res/package-summary.html" target="_top"><font size="+1"><code>android.content.res</code></font></A>
+</H2>
+<p>
+<a NAME="Changed"></a>
+<TABLE summary="Changed Classes" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Changed Classes</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="Configuration"></A>
+  <nobr><A HREF="android.content.res.Configuration.html">Configuration</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/pkg_android.graphics.html b/docs/html/sdk/api_diff/13/changes/pkg_android.graphics.html
new file mode 100644 (file)
index 0000000..31ddb13
--- /dev/null
@@ -0,0 +1,126 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.graphics
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Package <A HREF="../../../../reference/android/graphics/package-summary.html" target="_top"><font size="+1"><code>android.graphics</code></font></A>
+</H2>
+<p>
+<a NAME="Changed"></a>
+<TABLE summary="Changed Classes" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Changed Classes</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="Point"></A>
+  <nobr><A HREF="android.graphics.Point.html">Point</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="PointF"></A>
+  <nobr><A HREF="android.graphics.PointF.html">PointF</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/pkg_android.hardware.usb.html b/docs/html/sdk/api_diff/13/changes/pkg_android.hardware.usb.html
new file mode 100644 (file)
index 0000000..ec768c9
--- /dev/null
@@ -0,0 +1,119 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.hardware.usb
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Package <A HREF="../../../../reference/android/hardware/usb/package-summary.html" target="_top"><font size="+1"><code>android.hardware.usb</code></font></A>
+</H2>
+<p>
+<a NAME="Changed"></a>
+<TABLE summary="Changed Classes" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Changed Classes</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="UsbDeviceConnection"></A>
+  <nobr><A HREF="android.hardware.usb.UsbDeviceConnection.html">UsbDeviceConnection</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/pkg_android.html b/docs/html/sdk/api_diff/13/changes/pkg_android.html
new file mode 100644 (file)
index 0000000..6b14637
--- /dev/null
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Package <A HREF="../../../../reference/android/package-summary.html" target="_top"><font size="+1"><code>android</code></font></A>
+</H2>
+<p>
+<a NAME="Changed"></a>
+<TABLE summary="Changed Classes" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Changed Classes</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="Manifest.permission"></A>
+  <nobr><A HREF="android.Manifest.permission.html">Manifest.permission</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="R.attr"></A>
+  <nobr><A HREF="android.R.attr.html">R.attr</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="R.style"></A>
+  <nobr><A HREF="android.R.style.html">R.style</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/pkg_android.net.html b/docs/html/sdk/api_diff/13/changes/pkg_android.net.html
new file mode 100644 (file)
index 0000000..f3f82cc
--- /dev/null
@@ -0,0 +1,119 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.net
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Package <A HREF="../../../../reference/android/net/package-summary.html" target="_top"><font size="+1"><code>android.net</code></font></A>
+</H2>
+<p>
+<a NAME="Changed"></a>
+<TABLE summary="Changed Classes" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Changed Classes</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="ConnectivityManager"></A>
+  <nobr><A HREF="android.net.ConnectivityManager.html">ConnectivityManager</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/pkg_android.os.html b/docs/html/sdk/api_diff/13/changes/pkg_android.os.html
new file mode 100644 (file)
index 0000000..b9a8c09
--- /dev/null
@@ -0,0 +1,162 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.os
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Package <A HREF="../../../../reference/android/os/package-summary.html" target="_top"><font size="+1"><code>android.os</code></font></A>
+</H2>
+<p>
+<a NAME="Added"></a>
+<TABLE summary="Added Interfaces" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Added Interfaces</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="Parcelable.ClassLoaderCreator"></A>
+  <nobr><A HREF="../../../../reference/android/os/Parcelable.ClassLoaderCreator.html" target="_top"><code><I>Parcelable.ClassLoaderCreator</I></code></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<p>
+<a NAME="Changed"></a>
+<TABLE summary="Changed Classes and Interfaces" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Changed Classes and Interfaces</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="Binder"></A>
+  <nobr><A HREF="android.os.Binder.html">Binder</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="Build.VERSION_CODES"></A>
+  <nobr><A HREF="android.os.Build.VERSION_CODES.html">Build.VERSION_CODES</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="IBinder"></A>
+  <nobr><A HREF="android.os.IBinder.html"><I>IBinder</I></A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="ParcelFileDescriptor"></A>
+  <nobr><A HREF="android.os.ParcelFileDescriptor.html">ParcelFileDescriptor</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="PowerManager"></A>
+  <nobr><A HREF="android.os.PowerManager.html">PowerManager</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/pkg_android.telephony.html b/docs/html/sdk/api_diff/13/changes/pkg_android.telephony.html
new file mode 100644 (file)
index 0000000..9a00876
--- /dev/null
@@ -0,0 +1,119 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.telephony
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Package <A HREF="../../../../reference/android/telephony/package-summary.html" target="_top"><font size="+1"><code>android.telephony</code></font></A>
+</H2>
+<p>
+<a NAME="Changed"></a>
+<TABLE summary="Changed Classes" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Changed Classes</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="TelephonyManager"></A>
+  <nobr><A HREF="android.telephony.TelephonyManager.html">TelephonyManager</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/pkg_android.util.html b/docs/html/sdk/api_diff/13/changes/pkg_android.util.html
new file mode 100644 (file)
index 0000000..0d92956
--- /dev/null
@@ -0,0 +1,119 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.util
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Package <A HREF="../../../../reference/android/util/package-summary.html" target="_top"><font size="+1"><code>android.util</code></font></A>
+</H2>
+<p>
+<a NAME="Changed"></a>
+<TABLE summary="Changed Classes" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Changed Classes</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="DisplayMetrics"></A>
+  <nobr><A HREF="android.util.DisplayMetrics.html">DisplayMetrics</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/changes/pkg_android.view.html b/docs/html/sdk/api_diff/13/changes/pkg_android.view.html
new file mode 100644 (file)
index 0000000..22fde46
--- /dev/null
@@ -0,0 +1,126 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML style="overflow:auto;">
+<HEAD>
+<meta name="generator" content="JDiff v1.1.0">
+<!-- Generated by the JDiff Javadoc doclet -->
+<!-- (http://www.jdiff.org) -->
+<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
+<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
+<TITLE>
+android.view
+</TITLE>
+<link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
+<link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" />
+<noscript>
+<style type="text/css">
+body{overflow:auto;}
+#body-content{position:relative; top:0;}
+#doc-content{overflow:visible;border-left:3px solid #666;}
+#side-nav{padding:0;}
+#side-nav .toggle-list ul {display:block;}
+#resize-packages-nav{border-bottom:3px solid #666;}
+</style>
+</noscript>
+<style type="text/css">
+</style>
+</HEAD>
+<BODY>
+<!-- Start of nav bar -->
+<a name="top"></a>
+<div id="header" style="margin-bottom:0;padding-bottom:0;">
+<div id="headerLeft">
+<a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a>
+</div>
+  <div id="headerRight">
+  <div id="headerLinks">
+<!-- <img src="/assets/images/icon_world.jpg" alt="" /> -->
+<span class="text">
+<!-- &nbsp;<a href="#">English</a> | -->
+<nobr><a href="http://developer.android.com" target="_top">Android Developers</a> | <a href="http://www.android.com" target="_top">Android.com</a></nobr>
+</span>
+</div>
+  <div class="and-diff-id" style="margin-top:6px;margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td colspan="2" class="diffspechead">API Diff Specification</td>
+      </tr>
+      <tr>
+        <td class="diffspec" style="padding-top:.25em">To Level:</td>
+        <td class="diffvaluenew" style="padding-top:.25em">13</td>
+      </tr>
+      <tr>
+        <td class="diffspec">From Level:</td>
+        <td class="diffvalueold">12</td>
+      </tr>
+      <tr>
+        <td class="diffspec">Generated</td>
+        <td class="diffvalue">2011.06.29 10:50</td>
+      </tr>
+    </table>
+    </div><!-- End and-diff-id -->
+  <div class="and-diff-id" style="margin-right:8px;">
+    <table class="diffspectable">
+      <tr>
+        <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a>
+      </tr>
+    </table>
+  </div> <!-- End and-diff-id -->
+  </div> <!-- End headerRight -->
+  </div> <!-- End header -->
+<div id="body-content" xstyle="padding:12px;padding-right:18px;">
+<div id="doc-content" style="position:relative;">
+<div id="mainBodyFluid">
+<H2>
+Package <A HREF="../../../../reference/android/view/package-summary.html" target="_top"><font size="+1"><code>android.view</code></font></A>
+</H2>
+<p>
+<a NAME="Changed"></a>
+<TABLE summary="Changed Classes" WIDTH="100%">
+<TR>
+  <TH VALIGN="TOP" COLSPAN=2>Changed Classes</FONT></TD>
+</TH>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="Display"></A>
+  <nobr><A HREF="android.view.Display.html">Display</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+  <TD VALIGN="TOP" WIDTH="25%">
+  <A NAME="KeyEvent"></A>
+  <nobr><A HREF="android.view.KeyEvent.html">KeyEvent</A></nobr>
+  </TD>
+  <TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+      </div>   
+      <div id="footer">
+        <div id="copyright">
+        Except as noted, this content is licensed under 
+        <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>.
+        For details and restrictions, see the <a href="/license.html">Content License</a>.
+        </div>
+      <div id="footerlinks">
+      <p>
+        <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+        <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+        <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+      </p>
+    </div>
+    </div> <!-- end footer -->
+    </div><!-- end doc-content -->
+    </div> <!-- end body-content --> 
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+  try {
+    var pageTracker = _gat._getTracker("UA-5831155-1");
+    pageTracker._setAllowAnchor(true);
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  } catch(e) {}
+</script>
+</BODY>
+</HTML>
diff --git a/docs/html/sdk/api_diff/13/stylesheet-jdiff.css b/docs/html/sdk/api_diff/13/stylesheet-jdiff.css
new file mode 100644 (file)
index 0000000..edafaa3
--- /dev/null
@@ -0,0 +1,44 @@
+
+/* (http://www.jdiff.org) */
+
+div.and-diff-id {border: 1px solid #eee;position:relative;float:right;clear:both;padding:0px;}
+table.diffspectable {border:1px;padding:0px;margin:0px;}
+.diffspechead {background-color:#eee;}
+.diffspectable tr {border:0px;padding:0px;}
+.diffspectable td  {background-color:eee;border:0px;font-size:90%;font-weight:normal;padding:0px;padding-left:1px;padding-right:1px;text-align:center;color:777;}
+td.diffvalueold {color:orange;background-color:white;border:0px;font-size:80%;font-style:normal;text-align:left;padding:0px;padding-left:1px;padding-right:1px;line-height:.95em;}
+td.diffvaluenew {color:green;background-color:white;border:0px;font-size:80%;font-weight:normal;text-align:left;padding:0px;padding-left:1px;padding-right:1px;line-height:.95em;}
+td.diffvalue {color:444;background-color:white;border:0px;font-size:80%;font-weight:normal;text-align:left;padding:0px;padding-left:1px;padding-right:1px;line-height:.95em;}
+td.diffspec {background-color:white;border:0px;font-size:80%;font-weight:normal;padding:1px;color:444;text-align:right;padding-right:.5em;line-height:.95em;}
+tt {font-size:11pt;font-family:monospace;}
+.indexHeader {
+  font-size:96%;
+  line-height:.8em;}
+.jdiffIndex td {
+  font-size:96%;
+  xline-height:.8em;
+  padding:2px;
+  padding-left:1em;}
+.indexText {
+  font-size:100%;
+  padding-left:1em;}
+#indexTableCaption {
+  font-size:96%;
+  margin-top:.25em;
+  margin-bottom:0;
+  }
+.hiddenlink {
+  font-size:96%;
+  line-height:.8em;
+  text-decoration:none;}
+a {
+  text-decoration:none;}
+a:hover {
+  text-decoration:underline;}
+.indexBox {
+  border: 1px solid red;
+  margin:1em 0 0 0;}
+.letterIndexHead {
+  font-size: 1.5em;font-weight:9;
+  margin:0 0 0em 0;
+  border: 1px solid red;}
index 0539adb..829ed52 100644 (file)
@@ -76,6 +76,14 @@ class="new">new!</span></li>
     </ul>
     <ul>
       <li class="toggle-list">
+        <div><a href="<?cs var:toroot ?>sdk/android-3.2.html">
+        <span class="en">Android 3.2 Platform</span></a> <span class="new">new!</span></div>
+        <ul>
+          <!-- <li><a href="<?cs var:toroot ?>sdk/android-3.2-highlights.html">Platform Highlights</a></li> -->
+          <li><a href="<?cs var:toroot ?>sdk/api_diff/13/changes.html">API Differences Report &raquo;</a></li>
+        </ul>
+      </li>
+      <li class="toggle-list">
         <div><a href="<?cs var:toroot ?>sdk/android-3.1.html">
         <span class="en">Android 3.1 Platform</span></a></div>
         <ul>
index 4a85faf..3476bd5 100644 (file)
@@ -504,6 +504,7 @@ nAllocationCopyToBitmap(JNIEnv *_env, jobject _this, RsContext con, jint alloc,
     void* ptr = bitmap.getPixels();
     rsAllocationCopyToBitmap(con, (RsAllocation)alloc, ptr, bitmap.getSize());
     bitmap.unlockPixels();
+    bitmap.notifyPixelsChanged();
 }
 
 static void ReleaseBitmapCallback(void *bmp)
index 5b5b731..bc630ae 100644 (file)
@@ -78,7 +78,12 @@ protected:
     // client for this buffer. The timestamp is measured in nanoseconds, and
     // must be monotonically increasing. Its other properties (zero point, etc)
     // are client-dependent, and should be documented by the client.
-    virtual status_t queueBuffer(int slot, int64_t timestamp) = 0;
+    //
+    // outWidth, outHeight and outTransform are filled with the default width
+    // and height of the window and current transform applied to buffers,
+    // respectively.
+    virtual status_t queueBuffer(int slot, int64_t timestamp,
+            uint32_t* outWidth, uint32_t* outHeight, uint32_t* outTransform) = 0;
 
     // cancelBuffer indicates that the client does not wish to fill in the
     // buffer associated with slot and transfers ownership of the slot back to
@@ -87,6 +92,7 @@ protected:
 
     virtual status_t setCrop(const Rect& reg) = 0;
     virtual status_t setTransform(uint32_t transform) = 0;
+    virtual status_t setScalingMode(int mode) = 0;
 
     // getAllocator retrieves the binder object that must be referenced as long
     // as the GraphicBuffers dequeued from this ISurfaceTexture are referenced.
index 4080f27..945f4bc 100644 (file)
@@ -84,10 +84,12 @@ public:
     // nanoseconds, and must be monotonically increasing. Its other semantics
     // (zero point, etc) are client-dependent and should be documented by the
     // client.
-    virtual status_t queueBuffer(int buf, int64_t timestamp);
+    virtual status_t queueBuffer(int buf, int64_t timestamp,
+            uint32_t* outWidth, uint32_t* outHeight, uint32_t* outTransform);
     virtual void cancelBuffer(int buf);
     virtual status_t setCrop(const Rect& reg);
     virtual status_t setTransform(uint32_t transform);
+    virtual status_t setScalingMode(int mode);
 
     virtual int query(int what, int* value);
 
@@ -185,6 +187,9 @@ public:
     // getCurrentTransform returns the transform of the current buffer
     uint32_t getCurrentTransform() const;
 
+    // getCurrentScalingMode returns the scaling mode of the current buffer
+    uint32_t getCurrentScalingMode() const;
+
     // dump our state in a String
     void dump(String8& result) const;
     void dump(String8& result, const char* prefix, char* buffer, size_t SIZE) const;
@@ -220,6 +225,7 @@ private:
               mBufferState(BufferSlot::FREE),
               mRequestBufferCalled(false),
               mTransform(0),
+              mScalingMode(NATIVE_WINDOW_SCALING_MODE_FREEZE),
               mTimestamp(0) {
             mCrop.makeInvalid();
         }
@@ -281,6 +287,11 @@ private:
         // slot.
         uint32_t mTransform;
 
+        // mScalingMode is the current scaling mode for this buffer slot. This
+        // gets set to mNextScalingMode each time queueBuffer gets called for
+        // this slot.
+        uint32_t mScalingMode;
+
         // mTimestamp is the current timestamp for this buffer slot. This gets
         // to set by queueBuffer each time this slot is queued.
         int64_t mTimestamp;
@@ -337,20 +348,24 @@ private:
     sp<GraphicBuffer> mCurrentTextureBuf;
 
     // mCurrentCrop is the crop rectangle that applies to the current texture.
-    // It gets set to mLastQueuedCrop each time updateTexImage is called.
+    // It gets set each time updateTexImage is called.
     Rect mCurrentCrop;
 
     // mCurrentTransform is the transform identifier for the current texture. It
-    // gets set to mLastQueuedTransform each time updateTexImage is called.
+    // gets set each time updateTexImage is called.
     uint32_t mCurrentTransform;
 
+    // mCurrentScalingMode is the scaling mode for the current texture. It gets
+    // set to each time updateTexImage is called.
+    uint32_t mCurrentScalingMode;
+
     // mCurrentTransformMatrix is the transform matrix for the current texture.
     // It gets computed by computeTransformMatrix each time updateTexImage is
     // called.
     float mCurrentTransformMatrix[16];
 
     // mCurrentTimestamp is the timestamp for the current texture. It
-    // gets set to mLastQueuedTimestamp each time updateTexImage is called.
+    // gets set each time updateTexImage is called.
     int64_t mCurrentTimestamp;
 
     // mNextCrop is the crop rectangle that will be used for the next buffer
@@ -361,6 +376,10 @@ private:
     // buffer that gets queued. It is set by calling setTransform.
     uint32_t mNextTransform;
 
+    // mNextScalingMode is the scaling mode that will be used for the next
+    // buffers that get queued. It is set by calling setScalingMode.
+    int mNextScalingMode;
+
     // mTexName is the name of the OpenGL texture to which streamed images will
     // be bound when updateTexImage is called. It is set at construction time
     // changed with a call to setTexName.
index cfe2aa1..829d8ab 100644 (file)
@@ -63,6 +63,7 @@ private:
     int dispatchSetBuffersGeometry(va_list args);
     int dispatchSetBuffersDimensions(va_list args);
     int dispatchSetBuffersFormat(va_list args);
+    int dispatchSetScalingMode(va_list args);
     int dispatchSetBuffersTransform(va_list args);
     int dispatchSetBuffersTimestamp(va_list args);
     int dispatchSetCrop(va_list args);
@@ -84,6 +85,7 @@ protected:
     virtual int setBufferCount(int bufferCount);
     virtual int setBuffersDimensions(int w, int h);
     virtual int setBuffersFormat(int format);
+    virtual int setScalingMode(int mode);
     virtual int setBuffersTransform(int transform);
     virtual int setBuffersTimestamp(int64_t timestamp);
     virtual int setCrop(Rect const* rect);
@@ -149,6 +151,18 @@ private:
     // dequeued format or to mReqFormat if no buffer was dequeued.
     uint32_t mQueryFormat;
 
+    // mDefaultWidth is default width of the window, regardless of the
+    // set_dimension call
+    uint32_t mDefaultWidth;
+
+    // mDefaultHeight is default width of the window, regardless of the
+    // set_dimension call
+    uint32_t mDefaultHeight;
+
+    // mTransformHint is the transform probably applied to buffers of this
+    // window. this is only a hint, actual transform may differ.
+    uint32_t mTransformHint;
+
     // mMutex is the mutex used to prevent concurrent access to the member
     // variables of SurfaceTexture objects. It must be locked whenever the
     // member variables are accessed.
index dd93fd8..496b23e 100644 (file)
@@ -188,7 +188,7 @@ public:
      * 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
+     * io:  HAL audio output or input stream to which this effect must be attached. Leave at 0 for
      *      automatic output selection by AudioFlinger.
      */
 
@@ -198,7 +198,7 @@ public:
                   effect_callback_t cbf = 0,
                   void* user = 0,
                   int sessionId = 0,
-                  audio_io_handle_t output = 0
+                  audio_io_handle_t io = 0
                   );
 
     /* Constructor.
@@ -210,7 +210,7 @@ public:
                     effect_callback_t cbf = 0,
                     void* user = 0,
                     int sessionId = 0,
-                    audio_io_handle_t output = 0
+                    audio_io_handle_t io = 0
                     );
 
     /* Terminates the AudioEffect and unregisters it from AudioFlinger.
@@ -232,7 +232,7 @@ public:
                             effect_callback_t cbf = 0,
                             void* user = 0,
                             int sessionId = 0,
-                            audio_io_handle_t output = 0
+                            audio_io_handle_t io = 0
                             );
 
     /* Result of constructing the AudioEffect. This must be checked
index 89213b7..f20e234 100644 (file)
@@ -160,7 +160,8 @@ public:
                                     uint32_t samplingRate = 0,
                                     uint32_t format = AUDIO_FORMAT_DEFAULT,
                                     uint32_t channels = AUDIO_CHANNEL_IN_MONO,
-                                    audio_in_acoustics_t acoustics = (audio_in_acoustics_t)0);
+                                    audio_in_acoustics_t acoustics = (audio_in_acoustics_t)0,
+                                    int sessionId = 0);
     static status_t startInput(audio_io_handle_t input);
     static status_t stopInput(audio_io_handle_t input);
     static void releaseInput(audio_io_handle_t input);
@@ -175,7 +176,7 @@ public:
 
     static audio_io_handle_t getOutputForEffect(effect_descriptor_t *desc);
     static status_t registerEffect(effect_descriptor_t *desc,
-                                    audio_io_handle_t output,
+                                    audio_io_handle_t io,
                                     uint32_t strategy,
                                     int session,
                                     int id);
index 0fc8dbf..86b9f85 100644 (file)
@@ -65,7 +65,8 @@ public:
                                     uint32_t samplingRate = 0,
                                     uint32_t format = AUDIO_FORMAT_DEFAULT,
                                     uint32_t channels = 0,
-                                    audio_in_acoustics_t acoustics = (audio_in_acoustics_t)0) = 0;
+                                    audio_in_acoustics_t acoustics = (audio_in_acoustics_t)0,
+                                    int audioSession = 0) = 0;
     virtual status_t startInput(audio_io_handle_t input) = 0;
     virtual status_t stopInput(audio_io_handle_t input) = 0;
     virtual void releaseInput(audio_io_handle_t input) = 0;
@@ -78,7 +79,7 @@ public:
     virtual uint32_t getDevicesForStream(audio_stream_type_t stream) = 0;
     virtual audio_io_handle_t getOutputForEffect(effect_descriptor_t *desc) = 0;
     virtual status_t registerEffect(effect_descriptor_t *desc,
-                                    audio_io_handle_t output,
+                                    audio_io_handle_t io,
                                     uint32_t strategy,
                                     int session,
                                     int id) = 0;
index ed26e63..69d5001 100644 (file)
@@ -45,6 +45,18 @@ enum camcorder_quality {
     CAMCORDER_QUALITY_TIME_LAPSE_LIST_END = 1006,
 };
 
+/**
+ *Set CIF as default maximum import and export resolution of video editor.
+ *The maximum import and export resolutions are platform specific,
+ *which should be defined in media_profiles.xml.
+ */
+enum videoeditor_capability {
+    VIDEOEDITOR_DEFAULT_MAX_INPUT_FRAME_WIDTH = 352,
+    VIDEOEDITOR_DEFUALT_MAX_INPUT_FRAME_HEIGHT = 288,
+    VIDEOEDITOR_DEFAULT_MAX_OUTPUT_FRAME_WIDTH = 352,
+    VIDEOEDITOR_DEFUALT_MAX_OUTPUT_FRAME_HEIGHT = 288,
+};
+
 enum video_decoder {
     VIDEO_DECODER_WMV,
 };
@@ -117,6 +129,17 @@ public:
     int getVideoEncoderParamByName(const char *name, video_encoder codec) const;
 
     /**
+     * Returns the value for the given param name for the video editor cap
+     * param or -1 if error.
+     * Supported param name are:
+     * videoeditor.input.width.max - max input video frame width
+     * videoeditor.input.height.max - max input video frame height
+     * videoeditor.output.width.max - max output video frame width
+     * videoeditor.output.height.max - max output video frame height
+     */
+    int getVideoEditorCapParamByName(const char *name) const;
+
+    /**
      * Returns the audio encoders supported.
      */
     Vector<audio_encoder> getAudioEncoders() const;
@@ -164,7 +187,7 @@ private:
 
     MediaProfiles& operator=(const MediaProfiles&);  // Don't call me
     MediaProfiles(const MediaProfiles&);             // Don't call me
-    MediaProfiles() {}                               // Dummy default constructor
+    MediaProfiles() { mVideoEditorCap = NULL; }        // Dummy default constructor
     ~MediaProfiles();                                // Don't delete me
 
     struct VideoCodec {
@@ -310,6 +333,22 @@ private:
         Vector<int> mLevels;
     };
 
+    struct VideoEditorCap {
+        VideoEditorCap(int inFrameWidth, int inFrameHeight,
+            int outFrameWidth, int outFrameHeight)
+            : mMaxInputFrameWidth(inFrameWidth),
+              mMaxInputFrameHeight(inFrameHeight),
+              mMaxOutputFrameWidth(outFrameWidth),
+              mMaxOutputFrameHeight(outFrameHeight) {}
+
+        ~VideoEditorCap() {}
+
+        int mMaxInputFrameWidth;
+        int mMaxInputFrameHeight;
+        int mMaxOutputFrameWidth;
+        int mMaxOutputFrameHeight;
+    };
+
     int getCamcorderProfileIndex(int cameraId, camcorder_quality quality) const;
     void initRequiredProfileRefs(const Vector<int>& cameraIds);
     int getRequiredProfileRefIndex(int cameraId);
@@ -321,6 +360,7 @@ private:
     static void logAudioEncoderCap(const AudioEncoderCap& cap);
     static void logVideoDecoderCap(const VideoDecoderCap& cap);
     static void logAudioDecoderCap(const AudioDecoderCap& cap);
+    static void logVideoEditorCap(const VideoEditorCap& cap);
 
     // If the xml configuration file does exist, use the settings
     // from the xml
@@ -332,6 +372,8 @@ private:
     static VideoDecoderCap* createVideoDecoderCap(const char **atts);
     static VideoEncoderCap* createVideoEncoderCap(const char **atts);
     static AudioEncoderCap* createAudioEncoderCap(const char **atts);
+    static VideoEditorCap* createVideoEditorCap(
+                const char **atts, MediaProfiles *profiles);
 
     static CamcorderProfile* createCamcorderProfile(
                 int cameraId, const char **atts, Vector<int>& cameraIds);
@@ -375,6 +417,7 @@ private:
     static void createDefaultEncoderOutputFileFormats(MediaProfiles *profiles);
     static void createDefaultImageEncodingQualityLevels(MediaProfiles *profiles);
     static void createDefaultImageDecodingMaxMemory(MediaProfiles *profiles);
+    static void createDefaultVideoEditorCap(MediaProfiles *profiles);
     static VideoEncoderCap* createDefaultH263VideoEncoderCap();
     static VideoEncoderCap* createDefaultM4vVideoEncoderCap();
     static AudioEncoderCap* createDefaultAmrNBEncoderCap();
@@ -431,6 +474,7 @@ private:
 
     RequiredProfiles *mRequiredProfileRefs;
     Vector<int>              mCameraIds;
+    VideoEditorCap* mVideoEditorCap;
 };
 
 }; // namespace android
index 765c039..803bffb 100644 (file)
 #include <utils/Errors.h>
 #include <pthread.h>
 
+struct dirent;
+
 namespace android {
 
 class MediaScannerClient;
 class StringArray;
 
+enum MediaScanResult {
+    // This file or directory was scanned successfully.
+    MEDIA_SCAN_RESULT_OK,
+    // This file or directory was skipped because it was not found, could
+    // not be opened, was of an unsupported type, or was malfored in some way.
+    MEDIA_SCAN_RESULT_SKIPPED,
+    // The scan should be aborted due to a fatal error such as out of memory
+    // or an exception.
+    MEDIA_SCAN_RESULT_ERROR,
+};
+
 struct MediaScanner {
     MediaScanner();
     virtual ~MediaScanner();
 
-    virtual status_t processFile(
-            const char *path, const char *mimeType,
-            MediaScannerClient &client) = 0;
+    virtual MediaScanResult processFile(
+            const char *path, const char *mimeType, MediaScannerClient &client) = 0;
 
-    typedef bool (*ExceptionCheck)(void* env);
-    virtual status_t processDirectory(
-            const char *path, MediaScannerClient &client,
-            ExceptionCheck exceptionCheck, void *exceptionEnv);
+    virtual MediaScanResult processDirectory(
+            const char *path, MediaScannerClient &client);
 
     void setLocale(const char *locale);
 
@@ -53,9 +63,11 @@ private:
     // current locale (like "ja_JP"), created/destroyed with strdup()/free()
     char *mLocale;
 
-    status_t doProcessDirectory(
-            char *path, int pathRemaining, MediaScannerClient &client,
-            bool noMedia, ExceptionCheck exceptionCheck, void *exceptionEnv);
+    MediaScanResult doProcessDirectory(
+            char *path, int pathRemaining, MediaScannerClient &client, bool noMedia);
+    MediaScanResult doProcessDirectoryEntry(
+            char *path, int pathRemaining, MediaScannerClient &client, bool noMedia,
+            struct dirent* entry, char* fileSpot);
 
     MediaScanner(const MediaScanner &);
     MediaScanner &operator=(const MediaScanner &);
@@ -68,13 +80,13 @@ public:
     virtual ~MediaScannerClient();
     void setLocale(const char* locale);
     void beginFile();
-    bool addStringTag(const char* name, const char* value);
+    status_t addStringTag(const char* name, const char* value);
     void endFile();
 
-    virtual bool scanFile(const char* path, long long lastModified,
+    virtual status_t scanFile(const char* path, long long lastModified,
             long long fileSize, bool isDirectory, bool noMedia) = 0;
-    virtual bool handleStringTag(const char* name, const char* value) = 0;
-    virtual bool setMimeType(const char* mimeType) = 0;
+    virtual status_t handleStringTag(const char* name, const char* value) = 0;
+    virtual status_t setMimeType(const char* mimeType) = 0;
 
 protected:
     void convertValues(uint32_t encoding);
index 108acb4..6510a59 100644 (file)
@@ -26,7 +26,7 @@ struct StagefrightMediaScanner : public MediaScanner {
     StagefrightMediaScanner();
     virtual ~StagefrightMediaScanner();
 
-    virtual status_t processFile(
+    virtual MediaScanResult processFile(
             const char *path, const char *mimeType,
             MediaScannerClient &client);
 
@@ -35,6 +35,10 @@ struct StagefrightMediaScanner : public MediaScanner {
 private:
     StagefrightMediaScanner(const StagefrightMediaScanner &);
     StagefrightMediaScanner &operator=(const StagefrightMediaScanner &);
+
+    MediaScanResult processFileInternal(
+            const char *path, const char *mimeType,
+            MediaScannerClient &client);
 };
 
 }  // namespace android
index 7ed072b..97170d7 100644 (file)
  * -------------------------------------------------------------------
  */
 /**
- * Copyright (c) 2008 The Khronos Group Inc. 
- * 
+ * Copyright (c) 2008 The Khronos Group Inc.
+ *
  * Permission is hereby granted, free of charge, to any person obtaining
  * a copy of this software and associated documentation files (the
  * "Software"), to deal in the Software without restriction, including
  * without limitation the rights to use, copy, modify, merge, publish,
  * distribute, sublicense, and/or sell copies of the Software, and to
  * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions: 
+ * to the following conditions:
  * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software. 
- * 
+ * in all copies or substantial portions of the Software.
+ *
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  *
  */
 
-/** 
+/**
  * @file OMX_IVCommon.h - OpenMax IL version 1.1.2
  *  The structures needed by Video and Image components to exchange
  *  parameters and configuration data with the components.
@@ -53,7 +53,7 @@ extern "C" {
 /**
  * Each OMX header must include all required header files to allow the header
  * to compile without errors.  The includes below are required for this header
- * file to compile successfully 
+ * file to compile successfully
  */
 
 #include <OMX_Core.h>
@@ -64,8 +64,8 @@ extern "C" {
  */
 
 
-/** 
- * Enumeration defining possible uncompressed image/video formats. 
+/**
+ * Enumeration defining possible uncompressed image/video formats.
  *
  * ENUMS:
  *  Unused                 : Placeholder value when format is N/A
@@ -113,7 +113,7 @@ typedef enum OMX_COLOR_FORMATTYPE {
     OMX_COLOR_Format16bitBGR565,
     OMX_COLOR_Format18bitRGB666,
     OMX_COLOR_Format18bitARGB1665,
-    OMX_COLOR_Format19bitARGB1666, 
+    OMX_COLOR_Format19bitARGB1666,
     OMX_COLOR_Format24bitRGB888,
     OMX_COLOR_Format24bitBGR888,
     OMX_COLOR_Format24bitARGB1887,
@@ -136,55 +136,62 @@ typedef enum OMX_COLOR_FORMATTYPE {
     OMX_COLOR_FormatRawBayer8bit,
     OMX_COLOR_FormatRawBayer10bit,
     OMX_COLOR_FormatRawBayer8bitcompressed,
-    OMX_COLOR_FormatL2, 
-    OMX_COLOR_FormatL4, 
-    OMX_COLOR_FormatL8, 
-    OMX_COLOR_FormatL16, 
-    OMX_COLOR_FormatL24, 
+    OMX_COLOR_FormatL2,
+    OMX_COLOR_FormatL4,
+    OMX_COLOR_FormatL8,
+    OMX_COLOR_FormatL16,
+    OMX_COLOR_FormatL24,
     OMX_COLOR_FormatL32,
     OMX_COLOR_FormatYUV420PackedSemiPlanar,
     OMX_COLOR_FormatYUV422PackedSemiPlanar,
     OMX_COLOR_Format18BitBGR666,
     OMX_COLOR_Format24BitARGB6666,
     OMX_COLOR_Format24BitABGR6666,
-    OMX_COLOR_FormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_COLOR_FormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_COLOR_FormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
+    /**<Reserved android opaque colorformat. Tells the encoder that
+     * the actual colorformat will be  relayed by the
+     * Gralloc Buffers.
+     * FIXME: In the process of reserving some enum values for
+     * Android-specific OMX IL colorformats. Change this enum to
+     * an acceptable range once that is done.*/
+    OMX_COLOR_FormatAndroidOpaque = 0x7F000001,
     OMX_TI_COLOR_FormatYUV420PackedSemiPlanar = 0x7F000100,
     OMX_QCOM_COLOR_FormatYVU420SemiPlanar = 0x7FA30C00,
     OMX_COLOR_FormatMax = 0x7FFFFFFF
 } OMX_COLOR_FORMATTYPE;
 
 
-/** 
+/**
  * Defines the matrix for conversion from RGB to YUV or vice versa.
- * iColorMatrix should be initialized with the fixed point values 
+ * iColorMatrix should be initialized with the fixed point values
  * used in converting between formats.
  */
 typedef struct OMX_CONFIG_COLORCONVERSIONTYPE {
     OMX_U32 nSize;              /**< Size of the structure in bytes */
-    OMX_VERSIONTYPE nVersion;   /**< OMX specification version info */ 
+    OMX_VERSIONTYPE nVersion;   /**< OMX specification version info */
     OMX_U32 nPortIndex;         /**< Port that this struct applies to */
     OMX_S32 xColorMatrix[3][3]; /**< Stored in signed Q16 format */
     OMX_S32 xColorOffset[4];    /**< Stored in signed Q16 format */
 }OMX_CONFIG_COLORCONVERSIONTYPE;
 
 
-/** 
- * Structure defining percent to scale each frame dimension.  For example:  
+/**
+ * Structure defining percent to scale each frame dimension.  For example:
  * To make the width 50% larger, use fWidth = 1.5 and to make the width
  * 1/2 the original size, use fWidth = 0.5
  */
 typedef struct OMX_CONFIG_SCALEFACTORTYPE {
     OMX_U32 nSize;            /**< Size of the structure in bytes */
-    OMX_VERSIONTYPE nVersion; /**< OMX specification version info */ 
+    OMX_VERSIONTYPE nVersion; /**< OMX specification version info */
     OMX_U32 nPortIndex;       /**< Port that this struct applies to */
     OMX_S32 xWidth;           /**< Fixed point value stored as Q16 */
     OMX_S32 xHeight;          /**< Fixed point value stored as Q16 */
 }OMX_CONFIG_SCALEFACTORTYPE;
 
 
-/** 
- * Enumeration of possible image filter types 
+/**
+ * Enumeration of possible image filter types
  */
 typedef enum OMX_IMAGEFILTERTYPE {
     OMX_ImageFilterNone,
@@ -195,23 +202,23 @@ typedef enum OMX_IMAGEFILTERTYPE {
     OMX_ImageFilterOilPaint,
     OMX_ImageFilterHatch,
     OMX_ImageFilterGpen,
-    OMX_ImageFilterAntialias, 
-    OMX_ImageFilterDeRing,       
+    OMX_ImageFilterAntialias,
+    OMX_ImageFilterDeRing,
     OMX_ImageFilterSolarize,
-    OMX_ImageFilterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_ImageFilterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_ImageFilterVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
     OMX_ImageFilterMax = 0x7FFFFFFF
 } OMX_IMAGEFILTERTYPE;
 
 
-/** 
- * Image filter configuration 
+/**
+ * Image filter configuration
  *
  * STRUCT MEMBERS:
- *  nSize        : Size of the structure in bytes       
+ *  nSize        : Size of the structure in bytes
  *  nVersion     : OMX specification version information
- *  nPortIndex   : Port that this structure applies to 
- *  eImageFilter : Image filter type enumeration      
+ *  nPortIndex   : Port that this structure applies to
+ *  eImageFilter : Image filter type enumeration
  */
 typedef struct OMX_CONFIG_IMAGEFILTERTYPE {
     OMX_U32 nSize;
@@ -221,22 +228,22 @@ typedef struct OMX_CONFIG_IMAGEFILTERTYPE {
 } OMX_CONFIG_IMAGEFILTERTYPE;
 
 
-/** 
- * Customized U and V for color enhancement 
+/**
+ * Customized U and V for color enhancement
  *
  * STRUCT MEMBERS:
  *  nSize             : Size of the structure in bytes
- *  nVersion          : OMX specification version information 
+ *  nVersion          : OMX specification version information
  *  nPortIndex        : Port that this structure applies to
  *  bColorEnhancement : Enable/disable color enhancement
- *  nCustomizedU      : Practical values: 16-240, range: 0-255, value set for 
+ *  nCustomizedU      : Practical values: 16-240, range: 0-255, value set for
  *                      U component
- *  nCustomizedV      : Practical values: 16-240, range: 0-255, value set for 
+ *  nCustomizedV      : Practical values: 16-240, range: 0-255, value set for
  *                      V component
  */
 typedef struct OMX_CONFIG_COLORENHANCEMENTTYPE {
     OMX_U32 nSize;
-    OMX_VERSIONTYPE nVersion; 
+    OMX_VERSIONTYPE nVersion;
     OMX_U32 nPortIndex;
     OMX_BOOL bColorEnhancement;
     OMX_U8 nCustomizedU;
@@ -244,12 +251,12 @@ typedef struct OMX_CONFIG_COLORENHANCEMENTTYPE {
 } OMX_CONFIG_COLORENHANCEMENTTYPE;
 
 
-/** 
- * Define color key and color key mask 
+/**
+ * Define color key and color key mask
  *
  * STRUCT MEMBERS:
  *  nSize      : Size of the structure in bytes
- *  nVersion   : OMX specification version information 
+ *  nVersion   : OMX specification version information
  *  nPortIndex : Port that this structure applies to
  *  nARGBColor : 32bit Alpha, Red, Green, Blue Color
  *  nARGBMask  : 32bit Mask for Alpha, Red, Green, Blue channels
@@ -263,12 +270,12 @@ typedef struct OMX_CONFIG_COLORKEYTYPE {
 } OMX_CONFIG_COLORKEYTYPE;
 
 
-/** 
- * List of color blend types for pre/post processing 
+/**
+ * List of color blend types for pre/post processing
  *
  * ENUMS:
  *  None          : No color blending present
- *  AlphaConstant : Function is (alpha_constant * src) + 
+ *  AlphaConstant : Function is (alpha_constant * src) +
  *                  (1 - alpha_constant) * dst)
  *  AlphaPerPixel : Function is (alpha * src) + (1 - alpha) * dst)
  *  Alternate     : Function is alternating pixels from src and dst
@@ -284,21 +291,21 @@ typedef enum OMX_COLORBLENDTYPE {
     OMX_ColorBlendAnd,
     OMX_ColorBlendOr,
     OMX_ColorBlendInvert,
-    OMX_ColorBlendKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_ColorBlendKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_ColorBlendVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
     OMX_ColorBlendMax = 0x7FFFFFFF
 } OMX_COLORBLENDTYPE;
 
 
-/** 
- * Color blend configuration 
+/**
+ * Color blend configuration
  *
  * STRUCT MEMBERS:
- *  nSize             : Size of the structure in bytes                        
- *  nVersion          : OMX specification version information                
- *  nPortIndex        : Port that this structure applies to                   
+ *  nSize             : Size of the structure in bytes
+ *  nVersion          : OMX specification version information
+ *  nPortIndex        : Port that this structure applies to
  *  nRGBAlphaConstant : Constant global alpha values when global alpha is used
- *  eColorBlend       : Color blend type enumeration                         
+ *  eColorBlend       : Color blend type enumeration
  */
 typedef struct OMX_CONFIG_COLORBLENDTYPE {
     OMX_U32 nSize;
@@ -309,15 +316,15 @@ typedef struct OMX_CONFIG_COLORBLENDTYPE {
 } OMX_CONFIG_COLORBLENDTYPE;
 
 
-/** 
+/**
  * Hold frame dimension
  *
  * STRUCT MEMBERS:
- *  nSize      : Size of the structure in bytes      
+ *  nSize      : Size of the structure in bytes
  *  nVersion   : OMX specification version information
- *  nPortIndex : Port that this structure applies to     
- *  nWidth     : Frame width in pixels                 
- *  nHeight    : Frame height in pixels                
+ *  nPortIndex : Port that this structure applies to
+ *  nWidth     : Frame width in pixels
+ *  nHeight    : Frame height in pixels
  */
 typedef struct OMX_FRAMESIZETYPE {
     OMX_U32 nSize;
@@ -329,69 +336,69 @@ typedef struct OMX_FRAMESIZETYPE {
 
 
 /**
- * Rotation configuration 
+ * Rotation configuration
  *
  * STRUCT MEMBERS:
- *  nSize      : Size of the structure in bytes             
+ *  nSize      : Size of the structure in bytes
  *  nVersion   : OMX specification version information
  *  nPortIndex : Port that this structure applies to
- *  nRotation  : +/- integer rotation value               
+ *  nRotation  : +/- integer rotation value
  */
 typedef struct OMX_CONFIG_ROTATIONTYPE {
     OMX_U32 nSize;
     OMX_VERSIONTYPE nVersion;
     OMX_U32 nPortIndex;
-    OMX_S32 nRotation; 
+    OMX_S32 nRotation;
 } OMX_CONFIG_ROTATIONTYPE;
 
 
-/** 
- * Possible mirroring directions for pre/post processing 
+/**
+ * Possible mirroring directions for pre/post processing
  *
  * ENUMS:
- *  None       : No mirroring                         
- *  Vertical   : Vertical mirroring, flip on X axis   
- *  Horizontal : Horizontal mirroring, flip on Y axis  
+ *  None       : No mirroring
+ *  Vertical   : Vertical mirroring, flip on X axis
+ *  Horizontal : Horizontal mirroring, flip on Y axis
  *  Both       : Both vertical and horizontal mirroring
  */
 typedef enum OMX_MIRRORTYPE {
     OMX_MirrorNone = 0,
     OMX_MirrorVertical,
     OMX_MirrorHorizontal,
-    OMX_MirrorBoth, 
-    OMX_MirrorKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_MirrorBoth,
+    OMX_MirrorKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_MirrorVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
-    OMX_MirrorMax = 0x7FFFFFFF   
+    OMX_MirrorMax = 0x7FFFFFFF
 } OMX_MIRRORTYPE;
 
 
-/** 
- * Mirroring configuration 
+/**
+ * Mirroring configuration
  *
  * STRUCT MEMBERS:
- *  nSize      : Size of the structure in bytes      
+ *  nSize      : Size of the structure in bytes
  *  nVersion   : OMX specification version information
- *  nPortIndex : Port that this structure applies to  
- *  eMirror    : Mirror type enumeration              
+ *  nPortIndex : Port that this structure applies to
+ *  eMirror    : Mirror type enumeration
  */
 typedef struct OMX_CONFIG_MIRRORTYPE {
     OMX_U32 nSize;
-    OMX_VERSIONTYPE nVersion; 
+    OMX_VERSIONTYPE nVersion;
     OMX_U32 nPortIndex;
     OMX_MIRRORTYPE  eMirror;
 } OMX_CONFIG_MIRRORTYPE;
 
 
-/** 
- * Position information only 
+/**
+ * Position information only
  *
  * STRUCT MEMBERS:
- *  nSize      : Size of the structure in bytes               
+ *  nSize      : Size of the structure in bytes
  *  nVersion   : OMX specification version information
  *  nPortIndex : Port that this structure applies to
- *  nX         : X coordinate for the point                     
- *  nY         : Y coordinate for the point 
- */                      
+ *  nX         : X coordinate for the point
+ *  nY         : Y coordinate for the point
+ */
 typedef struct OMX_CONFIG_POINTTYPE {
     OMX_U32 nSize;
     OMX_VERSIONTYPE nVersion;
@@ -401,37 +408,37 @@ typedef struct OMX_CONFIG_POINTTYPE {
 } OMX_CONFIG_POINTTYPE;
 
 
-/** 
- * Frame size plus position 
+/**
+ * Frame size plus position
  *
  * STRUCT MEMBERS:
- *  nSize      : Size of the structure in bytes                    
- *  nVersion   : OMX specification version information      
- *  nPortIndex : Port that this structure applies to    
+ *  nSize      : Size of the structure in bytes
+ *  nVersion   : OMX specification version information
+ *  nPortIndex : Port that this structure applies to
  *  nLeft      : X Coordinate of the top left corner of the rectangle
  *  nTop       : Y Coordinate of the top left corner of the rectangle
- *  nWidth     : Width of the rectangle                              
- *  nHeight    : Height of the rectangle                             
+ *  nWidth     : Width of the rectangle
+ *  nHeight    : Height of the rectangle
  */
 typedef struct OMX_CONFIG_RECTTYPE {
     OMX_U32 nSize;
-    OMX_VERSIONTYPE nVersion;  
-    OMX_U32 nPortIndex; 
-    OMX_S32 nLeft; 
+    OMX_VERSIONTYPE nVersion;
+    OMX_U32 nPortIndex;
+    OMX_S32 nLeft;
     OMX_S32 nTop;
     OMX_U32 nWidth;
     OMX_U32 nHeight;
 } OMX_CONFIG_RECTTYPE;
 
 
-/** 
- * Deblocking state; it is required to be set up before starting the codec 
+/**
+ * Deblocking state; it is required to be set up before starting the codec
  *
  * STRUCT MEMBERS:
- *  nSize       : Size of the structure in bytes      
- *  nVersion    : OMX specification version information 
+ *  nSize       : Size of the structure in bytes
+ *  nVersion    : OMX specification version information
  *  nPortIndex  : Port that this structure applies to
- *  bDeblocking : Enable/disable deblocking mode    
+ *  bDeblocking : Enable/disable deblocking mode
  */
 typedef struct OMX_PARAM_DEBLOCKINGTYPE {
     OMX_U32 nSize;
@@ -441,13 +448,13 @@ typedef struct OMX_PARAM_DEBLOCKINGTYPE {
 } OMX_PARAM_DEBLOCKINGTYPE;
 
 
-/** 
- * Stabilization state 
+/**
+ * Stabilization state
  *
  * STRUCT MEMBERS:
- *  nSize      : Size of the structure in bytes          
- *  nVersion   : OMX specification version information    
- *  nPortIndex : Port that this structure applies to   
+ *  nSize      : Size of the structure in bytes
+ *  nVersion   : OMX specification version information
+ *  nPortIndex : Port that this structure applies to
  *  bStab      : Enable/disable frame stabilization state
  */
 typedef struct OMX_CONFIG_FRAMESTABTYPE {
@@ -458,8 +465,8 @@ typedef struct OMX_CONFIG_FRAMESTABTYPE {
 } OMX_CONFIG_FRAMESTABTYPE;
 
 
-/** 
- * White Balance control type 
+/**
+ * White Balance control type
  *
  * STRUCT MEMBERS:
  *  SunLight : Referenced in JSR-234
@@ -476,20 +483,20 @@ typedef enum OMX_WHITEBALCONTROLTYPE {
     OMX_WhiteBalControlIncandescent,
     OMX_WhiteBalControlFlash,
     OMX_WhiteBalControlHorizon,
-    OMX_WhiteBalControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_WhiteBalControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_WhiteBalControlVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
     OMX_WhiteBalControlMax = 0x7FFFFFFF
 } OMX_WHITEBALCONTROLTYPE;
 
 
-/** 
- * White Balance control configuration 
+/**
+ * White Balance control configuration
  *
  * STRUCT MEMBERS:
- *  nSize            : Size of the structure in bytes       
+ *  nSize            : Size of the structure in bytes
  *  nVersion         : OMX specification version information
- *  nPortIndex       : Port that this structure applies to                 
- *  eWhiteBalControl : White balance enumeration            
+ *  nPortIndex       : Port that this structure applies to
+ *  eWhiteBalControl : White balance enumeration
  */
 typedef struct OMX_CONFIG_WHITEBALCONTROLTYPE {
     OMX_U32 nSize;
@@ -499,8 +506,8 @@ typedef struct OMX_CONFIG_WHITEBALCONTROLTYPE {
 } OMX_CONFIG_WHITEBALCONTROLTYPE;
 
 
-/** 
- * Exposure control type 
+/**
+ * Exposure control type
  */
 typedef enum OMX_EXPOSURECONTROLTYPE {
     OMX_ExposureControlOff = 0,
@@ -513,20 +520,20 @@ typedef enum OMX_EXPOSURECONTROLTYPE {
     OMX_ExposureControlBeach,
     OMX_ExposureControlLargeAperture,
     OMX_ExposureControlSmallApperture,
-    OMX_ExposureControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_ExposureControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_ExposureControlVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
     OMX_ExposureControlMax = 0x7FFFFFFF
 } OMX_EXPOSURECONTROLTYPE;
 
 
-/** 
- * White Balance control configuration 
+/**
+ * White Balance control configuration
  *
  * STRUCT MEMBERS:
- *  nSize            : Size of the structure in bytes      
+ *  nSize            : Size of the structure in bytes
  *  nVersion         : OMX specification version information
- *  nPortIndex       : Port that this structure applies to                
- *  eExposureControl : Exposure control enumeration         
+ *  nPortIndex       : Port that this structure applies to
+ *  eExposureControl : Exposure control enumeration
  */
 typedef struct OMX_CONFIG_EXPOSURECONTROLTYPE {
     OMX_U32 nSize;
@@ -536,16 +543,16 @@ typedef struct OMX_CONFIG_EXPOSURECONTROLTYPE {
 } OMX_CONFIG_EXPOSURECONTROLTYPE;
 
 
-/** 
- * Defines sensor supported mode. 
+/**
+ * Defines sensor supported mode.
  *
  * STRUCT MEMBERS:
- *  nSize      : Size of the structure in bytes           
+ *  nSize      : Size of the structure in bytes
  *  nVersion   : OMX specification version information
- *  nPortIndex : Port that this structure applies to 
- *  nFrameRate : Single shot mode is indicated by a 0     
+ *  nPortIndex : Port that this structure applies to
+ *  nFrameRate : Single shot mode is indicated by a 0
  *  bOneShot   : Enable for single shot, disable for streaming
- *  sFrameSize : Framesize                                          
+ *  sFrameSize : Framesize
  */
 typedef struct OMX_PARAM_SENSORMODETYPE {
     OMX_U32 nSize;
@@ -557,13 +564,13 @@ typedef struct OMX_PARAM_SENSORMODETYPE {
 } OMX_PARAM_SENSORMODETYPE;
 
 
-/** 
- * Defines contrast level 
+/**
+ * Defines contrast level
  *
  * STRUCT MEMBERS:
- *  nSize      : Size of the structure in bytes                              
- *  nVersion   : OMX specification version information                
- *  nPortIndex : Port that this structure applies to                 
+ *  nSize      : Size of the structure in bytes
+ *  nVersion   : OMX specification version information
+ *  nPortIndex : Port that this structure applies to
  *  nContrast  : Values allowed for contrast -100 to 100, zero means no change
  */
 typedef struct OMX_CONFIG_CONTRASTTYPE {
@@ -574,14 +581,14 @@ typedef struct OMX_CONFIG_CONTRASTTYPE {
 } OMX_CONFIG_CONTRASTTYPE;
 
 
-/** 
- * Defines brightness level 
+/**
+ * Defines brightness level
  *
  * STRUCT MEMBERS:
- *  nSize       : Size of the structure in bytes          
- *  nVersion    : OMX specification version information 
- *  nPortIndex  : Port that this structure applies to 
- *  nBrightness : 0-100%        
+ *  nSize       : Size of the structure in bytes
+ *  nVersion    : OMX specification version information
+ *  nPortIndex  : Port that this structure applies to
+ *  nBrightness : 0-100%
  */
 typedef struct OMX_CONFIG_BRIGHTNESSTYPE {
     OMX_U32 nSize;
@@ -591,16 +598,16 @@ typedef struct OMX_CONFIG_BRIGHTNESSTYPE {
 } OMX_CONFIG_BRIGHTNESSTYPE;
 
 
-/** 
- * Defines backlight level configuration for a video sink, e.g. LCD panel 
+/**
+ * Defines backlight level configuration for a video sink, e.g. LCD panel
  *
  * STRUCT MEMBERS:
  *  nSize      : Size of the structure in bytes
- *  nVersion   : OMX specification version information 
+ *  nVersion   : OMX specification version information
  *  nPortIndex : Port that this structure applies to
  *  nBacklight : Values allowed for backlight 0-100%
- *  nTimeout   : Number of milliseconds before backlight automatically turns 
- *               off.  A value of 0x0 disables backight timeout 
+ *  nTimeout   : Number of milliseconds before backlight automatically turns
+ *               off.  A value of 0x0 disables backight timeout
  */
 typedef struct OMX_CONFIG_BACKLIGHTTYPE {
     OMX_U32 nSize;
@@ -611,12 +618,12 @@ typedef struct OMX_CONFIG_BACKLIGHTTYPE {
 } OMX_CONFIG_BACKLIGHTTYPE;
 
 
-/** 
- * Defines setting for Gamma 
+/**
+ * Defines setting for Gamma
  *
  * STRUCT MEMBERS:
  *  nSize      : Size of the structure in bytes
- *  nVersion   : OMX specification version information 
+ *  nVersion   : OMX specification version information
  *  nPortIndex : Port that this structure applies to
  *  nGamma     : Values allowed for gamma -100 to 100, zero means no change
  */
@@ -628,14 +635,14 @@ typedef struct OMX_CONFIG_GAMMATYPE {
 } OMX_CONFIG_GAMMATYPE;
 
 
-/** 
- * Define for setting saturation 
- * 
+/**
+ * Define for setting saturation
+ *
  * STRUCT MEMBERS:
  *  nSize       : Size of the structure in bytes
  *  nVersion    : OMX specification version information
  *  nPortIndex  : Port that this structure applies to
- *  nSaturation : Values allowed for saturation -100 to 100, zero means 
+ *  nSaturation : Values allowed for saturation -100 to 100, zero means
  *                no change
  */
 typedef struct OMX_CONFIG_SATURATIONTYPE {
@@ -646,14 +653,14 @@ typedef struct OMX_CONFIG_SATURATIONTYPE {
 } OMX_CONFIG_SATURATIONTYPE;
 
 
-/** 
- * Define for setting Lightness 
+/**
+ * Define for setting Lightness
  *
  * STRUCT MEMBERS:
  *  nSize      : Size of the structure in bytes
  *  nVersion   : OMX specification version information
  *  nPortIndex : Port that this structure applies to
- *  nLightness : Values allowed for lightness -100 to 100, zero means no 
+ *  nLightness : Values allowed for lightness -100 to 100, zero means no
  *               change
  */
 typedef struct OMX_CONFIG_LIGHTNESSTYPE {
@@ -664,17 +671,17 @@ typedef struct OMX_CONFIG_LIGHTNESSTYPE {
 } OMX_CONFIG_LIGHTNESSTYPE;
 
 
-/** 
- * Plane blend configuration 
+/**
+ * Plane blend configuration
  *
  * STRUCT MEMBERS:
- *  nSize      : Size of the structure in bytes 
+ *  nSize      : Size of the structure in bytes
  *  nVersion   : OMX specification version information
  *  nPortIndex : Index of input port associated with the plane.
- *  nDepth     : Depth of the plane in relation to the screen. Higher 
- *               numbered depths are "behind" lower number depths.  
+ *  nDepth     : Depth of the plane in relation to the screen. Higher
+ *               numbered depths are "behind" lower number depths.
  *               This number defaults to the Port Index number.
- *  nAlpha     : Transparency blending component for the entire plane.  
+ *  nAlpha     : Transparency blending component for the entire plane.
  *               See blending modes for more detail.
  */
 typedef struct OMX_CONFIG_PLANEBLENDTYPE {
@@ -686,17 +693,17 @@ typedef struct OMX_CONFIG_PLANEBLENDTYPE {
 } OMX_CONFIG_PLANEBLENDTYPE;
 
 
-/** 
+/**
  * Define interlace type
  *
  * STRUCT MEMBERS:
- *  nSize                 : Size of the structure in bytes 
- *  nVersion              : OMX specification version information 
+ *  nSize                 : Size of the structure in bytes
+ *  nVersion              : OMX specification version information
  *  nPortIndex            : Port that this structure applies to
- *  bEnable               : Enable control variable for this functionality 
+ *  bEnable               : Enable control variable for this functionality
  *                          (see below)
- *  nInterleavePortIndex  : Index of input or output port associated with  
- *                          the interleaved plane. 
+ *  nInterleavePortIndex  : Index of input or output port associated with
+ *                          the interleaved plane.
  *  pPlanarPortIndexes[4] : Index of input or output planar ports.
  */
 typedef struct OMX_PARAM_INTERLEAVETYPE {
@@ -708,8 +715,8 @@ typedef struct OMX_PARAM_INTERLEAVETYPE {
 } OMX_PARAM_INTERLEAVETYPE;
 
 
-/** 
- * Defines the picture effect used for an input picture 
+/**
+ * Defines the picture effect used for an input picture
  */
 typedef enum OMX_TRANSITIONEFFECTTYPE {
     OMX_EffectNone,
@@ -719,18 +726,18 @@ typedef enum OMX_TRANSITIONEFFECTTYPE {
     OMX_EffectDissolve,
     OMX_EffectWipe,
     OMX_EffectUnspecifiedMixOfTwoScenes,
-    OMX_EffectKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_EffectKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_EffectVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
     OMX_EffectMax = 0x7FFFFFFF
 } OMX_TRANSITIONEFFECTTYPE;
 
 
-/** 
- * Structure used to configure current transition effect 
+/**
+ * Structure used to configure current transition effect
  *
  * STRUCT MEMBERS:
  * nSize      : Size of the structure in bytes
- * nVersion   : OMX specification version information 
+ * nVersion   : OMX specification version information
  * nPortIndex : Port that this structure applies to
  * eEffect    : Effect to enable
  */
@@ -742,43 +749,43 @@ typedef struct OMX_CONFIG_TRANSITIONEFFECTTYPE {
 } OMX_CONFIG_TRANSITIONEFFECTTYPE;
 
 
-/** 
- * Defines possible data unit types for encoded video data. The data unit 
+/**
+ * Defines possible data unit types for encoded video data. The data unit
  * types are used both for encoded video input for playback as well as
- * encoded video output from recording. 
+ * encoded video output from recording.
  */
 typedef enum OMX_DATAUNITTYPE {
     OMX_DataUnitCodedPicture,
     OMX_DataUnitVideoSegment,
     OMX_DataUnitSeveralSegments,
     OMX_DataUnitArbitraryStreamSection,
-    OMX_DataUnitKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_DataUnitKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_DataUnitVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
     OMX_DataUnitMax = 0x7FFFFFFF
 } OMX_DATAUNITTYPE;
 
 
-/** 
- * Defines possible encapsulation types for coded video data unit. The 
- * encapsulation information is used both for encoded video input for 
- * playback as well as encoded video output from recording. 
+/**
+ * Defines possible encapsulation types for coded video data unit. The
+ * encapsulation information is used both for encoded video input for
+ * playback as well as encoded video output from recording.
  */
 typedef enum OMX_DATAUNITENCAPSULATIONTYPE {
     OMX_DataEncapsulationElementaryStream,
     OMX_DataEncapsulationGenericPayload,
     OMX_DataEncapsulationRtpPayload,
-    OMX_DataEncapsulationKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_DataEncapsulationKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_DataEncapsulationVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
     OMX_DataEncapsulationMax = 0x7FFFFFFF
 } OMX_DATAUNITENCAPSULATIONTYPE;
 
 
-/** 
- * Structure used to configure the type of being decoded/encoded 
+/**
+ * Structure used to configure the type of being decoded/encoded
  */
 typedef struct OMX_PARAM_DATAUNITTYPE {
     OMX_U32 nSize;            /**< Size of the structure in bytes */
-    OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 
+    OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
     OMX_U32 nPortIndex;       /**< Port that this structure applies to */
     OMX_DATAUNITTYPE eUnitType;
     OMX_DATAUNITENCAPSULATIONTYPE eEncapsulationType;
@@ -786,25 +793,25 @@ typedef struct OMX_PARAM_DATAUNITTYPE {
 
 
 /**
- * Defines dither types 
+ * Defines dither types
  */
 typedef enum OMX_DITHERTYPE {
     OMX_DitherNone,
     OMX_DitherOrdered,
     OMX_DitherErrorDiffusion,
     OMX_DitherOther,
-    OMX_DitherKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_DitherKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_DitherVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
     OMX_DitherMax = 0x7FFFFFFF
 } OMX_DITHERTYPE;
 
 
-/** 
- * Structure used to configure current type of dithering 
+/**
+ * Structure used to configure current type of dithering
  */
 typedef struct OMX_CONFIG_DITHERTYPE {
     OMX_U32 nSize;            /**< Size of the structure in bytes */
-    OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 
+    OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
     OMX_U32 nPortIndex;       /**< Port that this structure applies to */
     OMX_DITHERTYPE eDither;   /**< Type of dithering to use */
 } OMX_CONFIG_DITHERTYPE;
@@ -813,28 +820,28 @@ typedef struct OMX_CONFIG_CAPTUREMODETYPE {
     OMX_U32 nSize;
     OMX_VERSIONTYPE nVersion;
     OMX_U32 nPortIndex;     /**< Port that this structure applies to */
-    OMX_BOOL bContinuous;   /**< If true then ignore frame rate and emit capture 
+    OMX_BOOL bContinuous;   /**< If true then ignore frame rate and emit capture
                              *   data as fast as possible (otherwise obey port's frame rate). */
-    OMX_BOOL bFrameLimited; /**< If true then terminate capture after the port emits the 
-                             *   specified number of frames (otherwise the port does not 
-                             *   terminate the capture until instructed to do so by the client). 
-                             *   Even if set, the client may manually terminate the capture prior 
+    OMX_BOOL bFrameLimited; /**< If true then terminate capture after the port emits the
+                             *   specified number of frames (otherwise the port does not
+                             *   terminate the capture until instructed to do so by the client).
+                             *   Even if set, the client may manually terminate the capture prior
                              *   to reaching the limit. */
     OMX_U32 nFrameLimit;      /**< Limit on number of frames emitted during a capture (only
                                *   valid if bFrameLimited is set). */
 } OMX_CONFIG_CAPTUREMODETYPE;
 
 typedef enum OMX_METERINGTYPE {
+
     OMX_MeteringModeAverage,     /**< Center-weighted average metering. */
     OMX_MeteringModeSpot,            /**< Spot (partial) metering. */
     OMX_MeteringModeMatrix,      /**< Matrix or evaluative metering. */
-    OMX_MeteringKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+
+    OMX_MeteringKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_MeteringVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
     OMX_EVModeMax = 0x7fffffff
 } OMX_METERINGTYPE;
+
 typedef struct OMX_CONFIG_EXPOSUREVALUETYPE {
     OMX_U32 nSize;
     OMX_VERSIONTYPE nVersion;
@@ -843,14 +850,14 @@ typedef struct OMX_CONFIG_EXPOSUREVALUETYPE {
     OMX_S32 xEVCompensation;      /**< Fixed point value stored as Q16 */
     OMX_U32 nApertureFNumber;     /**< e.g. nApertureFNumber = 2 implies "f/2" - Q16 format */
     OMX_BOOL bAutoAperture;            /**< Whether aperture number is defined automatically */
-    OMX_U32 nShutterSpeedMsec;    /**< Shutterspeed in milliseconds */ 
-    OMX_BOOL bAutoShutterSpeed;        /**< Whether shutter speed is defined automatically */ 
+    OMX_U32 nShutterSpeedMsec;    /**< Shutterspeed in milliseconds */
+    OMX_BOOL bAutoShutterSpeed;        /**< Whether shutter speed is defined automatically */
     OMX_U32 nSensitivity;         /**< e.g. nSensitivity = 100 implies "ISO 100" */
     OMX_BOOL bAutoSensitivity; /**< Whether sensitivity is defined automatically */
 } OMX_CONFIG_EXPOSUREVALUETYPE;
 
-/** 
- * Focus region configuration 
+/**
+ * Focus region configuration
  *
  * STRUCT MEMBERS:
  *  nSize           : Size of the structure in bytes
@@ -881,8 +888,8 @@ typedef struct OMX_CONFIG_FOCUSREGIONTYPE {
     OMX_BOOL bBottomRight;
 } OMX_CONFIG_FOCUSREGIONTYPE;
 
-/** 
- * Focus Status type 
+/**
+ * Focus Status type
  */
 typedef enum OMX_FOCUSSTATUSTYPE {
     OMX_FocusStatusOff = 0,
@@ -890,13 +897,13 @@ typedef enum OMX_FOCUSSTATUSTYPE {
     OMX_FocusStatusReached,
     OMX_FocusStatusUnableToReach,
     OMX_FocusStatusLost,
-    OMX_FocusStatusKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_FocusStatusKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_FocusStatusVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
     OMX_FocusStatusMax = 0x7FFFFFFF
 } OMX_FOCUSSTATUSTYPE;
 
-/** 
- * Focus status configuration 
+/**
+ * Focus status configuration
  *
  * STRUCT MEMBERS:
  *  nSize               : Size of the structure in bytes
index 6e9a654..02cabc1 100644 (file)
@@ -45,9 +45,6 @@ public:
     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;
     };
index c2a494d..9c352ad 100644 (file)
@@ -57,7 +57,6 @@ public:
     static bool isSameSurface(
             const sp<SurfaceControl>& lhs, const sp<SurfaceControl>& rhs);
         
-    uint32_t    getFlags() const { return mFlags; }
     uint32_t    getIdentity() const { return mIdentity; }
 
     // release surface data from java
@@ -86,25 +85,13 @@ private:
     SurfaceControl& operator = (SurfaceControl& rhs);
     SurfaceControl(const SurfaceControl& rhs);
 
-    
     friend class SurfaceComposerClient;
-
-    // camera and camcorder need access to the ISurface binder interface for preview
-    friend class CameraService;
-    friend class MediaRecorder;
-    // mediaplayer needs access to ISurface for display
-    friend class MediaPlayer;
-    // for testing
-    friend class Test;
-    // videoEditor preview classes
-    friend class VideoEditorPreviewController;
     friend class Surface;
 
     SurfaceControl(
             const sp<SurfaceComposerClient>& client,
             const sp<ISurface>& surface,
-            const ISurfaceComposerClient::surface_data_t& data,
-            uint32_t w, uint32_t h, PixelFormat format, uint32_t flags);
+            const ISurfaceComposerClient::surface_data_t& data);
 
     ~SurfaceControl();
 
@@ -115,10 +102,6 @@ private:
     sp<ISurface>                mSurface;
     SurfaceID                   mToken;
     uint32_t                    mIdentity;
-    uint32_t                    mWidth;
-    uint32_t                    mHeight;
-    PixelFormat                 mFormat;
-    uint32_t                    mFlags;
     mutable Mutex               mLock;
     
     mutable sp<Surface>         mSurfaceData;
@@ -139,17 +122,13 @@ public:
         uint32_t    reserved[2];
     };
 
-    static status_t writeToParcel(
-            const sp<Surface>& control, Parcel* parcel);
-
+    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();
     }
 
     bool        isValid();
-    uint32_t    getFlags() const    { return mFlags; }
     uint32_t    getIdentity() const { return mIdentity; }
     sp<ISurfaceTexture> getSurfaceTexture();
 
@@ -176,22 +155,14 @@ private:
      *  private stuff...
      */
     void init();
-    status_t validate(bool inCancelBuffer = false) const;
 
     static void cleanCachedSurfacesLocked();
 
     virtual int query(int what, int* value) const;
 
     // constants
-    status_t                    mInitCheck;
     sp<ISurface>                mSurface;
     uint32_t                    mIdentity;
-    PixelFormat                 mFormat;
-    uint32_t                    mFlags;
-
-    // query() must be called from dequeueBuffer() thread
-    uint32_t                    mWidth;
-    uint32_t                    mHeight;
 
     // A cache of Surface objects that have been deserialized into this process.
     static Mutex sCachedSurfacesLock;
diff --git a/include/utils/Pool.h b/include/utils/Pool.h
deleted file mode 100644 (file)
index 2ee768e..0000000
+++ /dev/null
@@ -1,71 +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 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
index bc97cac..ace16aa 100644 (file)
@@ -132,9 +132,6 @@ status_t ISurfaceComposerClient::surface_data_t::readFromParcel(const Parcel& pa
 {
     token    = parcel.readInt32();
     identity = parcel.readInt32();
-    width    = parcel.readInt32();
-    height   = parcel.readInt32();
-    format   = parcel.readInt32();
     return NO_ERROR;
 }
 
@@ -142,9 +139,6 @@ status_t ISurfaceComposerClient::surface_data_t::writeToParcel(Parcel* parcel) c
 {
     parcel->writeInt32(token);
     parcel->writeInt32(identity);
-    parcel->writeInt32(width);
-    parcel->writeInt32(height);
-    parcel->writeInt32(format);
     return NO_ERROR;
 }
 
index 41434a4..be90e2e 100644 (file)
@@ -43,6 +43,7 @@ enum {
     SET_SYNCHRONOUS_MODE,
     CONNECT,
     DISCONNECT,
+    SET_SCALING_MODE,
 };
 
 
@@ -92,12 +93,16 @@ public:
         return result;
     }
 
-    virtual status_t queueBuffer(int buf, int64_t timestamp) {
+    virtual status_t queueBuffer(int buf, int64_t timestamp,
+            uint32_t* outWidth, uint32_t* outHeight, uint32_t* outTransform) {
         Parcel data, reply;
         data.writeInterfaceToken(ISurfaceTexture::getInterfaceDescriptor());
         data.writeInt32(buf);
         data.writeInt64(timestamp);
         remote()->transact(QUEUE_BUFFER, data, &reply);
+        *outWidth = reply.readInt32();
+        *outHeight = reply.readInt32();
+        *outTransform = reply.readInt32();
         status_t result = reply.readInt32();
         return result;
     }
@@ -130,6 +135,15 @@ public:
         return result;
     }
 
+    virtual status_t setScalingMode(int mode) {
+        Parcel data, reply;
+        data.writeInterfaceToken(ISurfaceTexture::getInterfaceDescriptor());
+        data.writeInt32(mode);
+        remote()->transact(SET_SCALING_MODE, data, &reply);
+        status_t result = reply.readInt32();
+        return result;
+    }
+
     virtual sp<IBinder> getAllocator() {
         Parcel data, reply;
         data.writeInterfaceToken(ISurfaceTexture::getInterfaceDescriptor());
@@ -216,7 +230,12 @@ status_t BnSurfaceTexture::onTransact(
             CHECK_INTERFACE(ISurfaceTexture, data, reply);
             int buf = data.readInt32();
             int64_t timestamp = data.readInt64();
-            status_t result = queueBuffer(buf, timestamp);
+            uint32_t outWidth, outHeight, outTransform;
+            status_t result = queueBuffer(buf, timestamp,
+                    &outWidth, &outHeight, &outTransform);
+            reply->writeInt32(outWidth);
+            reply->writeInt32(outHeight);
+            reply->writeInt32(outTransform);
             reply->writeInt32(result);
             return NO_ERROR;
         } break;
@@ -244,6 +263,13 @@ status_t BnSurfaceTexture::onTransact(
             reply->writeInt32(result);
             return NO_ERROR;
         } break;
+        case SET_SCALING_MODE: {
+            CHECK_INTERFACE(ISurfaceTexture, data, reply);
+            int mode = data.readInt32();
+            status_t result = setScalingMode(mode);
+            reply->writeInt32(result);
+            return NO_ERROR;
+        } break;
         case GET_ALLOCATOR: {
             CHECK_INTERFACE(ISurfaceTexture, data, reply);
             sp<IBinder> result = getAllocator();
index dabe643..c4f9e53 100644 (file)
 #include <utils/Log.h>
 #include <utils/threads.h>
 
-#include <binder/IMemory.h>
 #include <binder/IPCThreadState.h>
 
 #include <gui/SurfaceTextureClient.h>
 
 #include <ui/DisplayInfo.h>
 #include <ui/GraphicBuffer.h>
-#include <ui/GraphicBufferMapper.h>
-#include <ui/GraphicLog.h>
 #include <ui/Rect.h>
 
 #include <surfaceflinger/ISurface.h>
@@ -42,8 +39,6 @@
 #include <surfaceflinger/Surface.h>
 #include <surfaceflinger/SurfaceComposerClient.h>
 
-#include <private/surfaceflinger/LayerState.h>
-
 namespace android {
 
 // ============================================================================
@@ -53,12 +48,9 @@ namespace android {
 SurfaceControl::SurfaceControl(
         const sp<SurfaceComposerClient>& client, 
         const sp<ISurface>& surface,
-        const ISurfaceComposerClient::surface_data_t& data,
-        uint32_t w, uint32_t h, PixelFormat format, uint32_t flags)
+        const ISurfaceComposerClient::surface_data_t& data)
     : mClient(client), mSurface(surface),
-      mToken(data.token), mIdentity(data.identity),
-      mWidth(data.width), mHeight(data.height), mFormat(data.format),
-      mFlags(flags)
+      mToken(data.token), mIdentity(data.identity)
 {
 }
         
@@ -187,24 +179,12 @@ status_t SurfaceControl::writeSurfaceToParcel(
 {
     sp<ISurface> sur;
     uint32_t identity = 0;
-    uint32_t width = 0;
-    uint32_t height = 0;
-    uint32_t format = 0;
-    uint32_t flags = 0;
     if (SurfaceControl::isValid(control)) {
         sur      = control->mSurface;
         identity = control->mIdentity;
-        width    = control->mWidth;
-        height   = control->mHeight;
-        format   = control->mFormat;
-        flags    = control->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;
 }
 
@@ -225,25 +205,17 @@ sp<Surface> SurfaceControl::getSurface() const
 
 Surface::Surface(const sp<SurfaceControl>& surface)
     : SurfaceTextureClient(),
-      mInitCheck(NO_INIT),
       mSurface(surface->mSurface),
-      mIdentity(surface->mIdentity),
-      mFormat(surface->mFormat), mFlags(surface->mFlags),
-      mWidth(surface->mWidth), mHeight(surface->mHeight)
+      mIdentity(surface->mIdentity)
 {
     init();
 }
 
 Surface::Surface(const Parcel& parcel, const sp<IBinder>& ref)
-    : SurfaceTextureClient(),
-      mInitCheck(NO_INIT)
+    : SurfaceTextureClient()
 {
     mSurface    = interface_cast<ISurface>(ref);
     mIdentity   = parcel.readInt32();
-    mWidth      = parcel.readInt32();
-    mHeight     = parcel.readInt32();
-    mFormat     = parcel.readInt32();
-    mFlags      = parcel.readInt32();
     init();
 }
 
@@ -252,31 +224,16 @@ status_t Surface::writeToParcel(
 {
     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;
     } else if (surface != 0 && surface->mSurface != 0) {
         LOGW("Parceling invalid surface with non-NULL ISurface as NULL: "
-             "mSurface = %p, mIdentity = %d, mWidth = %d, mHeight = %d, "
-             "mFormat = %d, mFlags = 0x%08x, mInitCheck = %d",
-             surface->mSurface.get(), surface->mIdentity, surface->mWidth,
-             surface->mHeight, surface->mFormat, surface->mFlags,
-             surface->mInitCheck);
+             "mSurface = %p, mIdentity = %d",
+             surface->mSurface.get(), surface->mIdentity);
     }
     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;
 
 }
@@ -325,10 +282,6 @@ void Surface::init()
         const_cast<float&>(ANativeWindow::xdpi) = dinfo.xdpi;
         const_cast<float&>(ANativeWindow::ydpi) = dinfo.ydpi;
         const_cast<uint32_t&>(ANativeWindow::flags) = 0;
-
-        if (surfaceTexture != NULL) {
-            mInitCheck = NO_ERROR;
-        }
     }
 }
 
@@ -341,21 +294,11 @@ Surface::~Surface()
 }
 
 bool Surface::isValid() {
-    return mInitCheck == NO_ERROR;
-}
-
-status_t Surface::validate(bool inCancelBuffer) const
-{
-    // check that we initialized ourself properly
-    if (mInitCheck != NO_ERROR) {
-        LOGE("invalid token (identity=%u)", mIdentity);
-        return mInitCheck;
-    }
-    return NO_ERROR;
+    return getISurfaceTexture() != NULL;
 }
 
 sp<ISurfaceTexture> Surface::getSurfaceTexture() {
-    return mSurface != NULL ? mSurface->getSurfaceTexture() : NULL;
+    return getISurfaceTexture();
 }
 
 sp<IBinder> Surface::asBinder() const {
@@ -367,7 +310,6 @@ sp<IBinder> Surface::asBinder() const {
 int Surface::query(int what, int* value) const {
     switch (what) {
     case NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER:
-        // TODO: this is not needed anymore
         *value = 1;
         return NO_ERROR;
     case NATIVE_WINDOW_CONCRETE_TYPE:
index 8cead80..3b0ffea 100644 (file)
@@ -339,7 +339,7 @@ sp<SurfaceControl> SurfaceComposerClient::createSurface(
         sp<ISurface> surface = mClient->createSurface(&data, name,
                 display, w, h, format, flags);
         if (surface != 0) {
-            result = new SurfaceControl(this, surface, data, w, h, format, flags);
+            result = new SurfaceControl(this, surface, data);
         }
     }
     return result;
index a12d40a..0f08570 100644 (file)
@@ -90,6 +90,7 @@ SurfaceTexture::SurfaceTexture(GLuint tex, bool allowSynchronousMode) :
     mCurrentTransform(0),
     mCurrentTimestamp(0),
     mNextTransform(0),
+    mNextScalingMode(NATIVE_WINDOW_SCALING_MODE_FREEZE),
     mTexName(tex),
     mSynchronousMode(false),
     mAllowSynchronousMode(allowSynchronousMode),
@@ -401,7 +402,8 @@ status_t SurfaceTexture::setSynchronousMode(bool enabled) {
     return err;
 }
 
-status_t SurfaceTexture::queueBuffer(int buf, int64_t timestamp) {
+status_t SurfaceTexture::queueBuffer(int buf, int64_t timestamp,
+        uint32_t* outWidth, uint32_t* outHeight, uint32_t* outTransform) {
     LOGV("SurfaceTexture::queueBuffer");
 
     sp<FrameAvailableListener> listener;
@@ -453,6 +455,7 @@ status_t SurfaceTexture::queueBuffer(int buf, int64_t timestamp) {
         mSlots[buf].mBufferState = BufferSlot::QUEUED;
         mSlots[buf].mCrop = mNextCrop;
         mSlots[buf].mTransform = mNextTransform;
+        mSlots[buf].mScalingMode = mNextScalingMode;
         mSlots[buf].mTimestamp = timestamp;
         mDequeueCondition.signal();
     } // scope for the lock
@@ -461,6 +464,11 @@ status_t SurfaceTexture::queueBuffer(int buf, int64_t timestamp) {
     if (listener != 0) {
         listener->onFrameAvailable();
     }
+
+    *outWidth = mDefaultWidth;
+    *outHeight = mDefaultHeight;
+    *outTransform = 0;
+
     return OK;
 }
 
@@ -542,6 +550,22 @@ status_t SurfaceTexture::disconnect(int api) {
     return err;
 }
 
+status_t SurfaceTexture::setScalingMode(int mode) {
+    LOGV("SurfaceTexture::setScalingMode(%d)", mode);
+
+    switch (mode) {
+        case NATIVE_WINDOW_SCALING_MODE_FREEZE:
+        case NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW:
+            break;
+        default:
+            return BAD_VALUE;
+    }
+
+    Mutex::Autolock lock(mMutex);
+    mNextScalingMode = mode;
+    return OK;
+}
+
 status_t SurfaceTexture::updateTexImage() {
     LOGV("SurfaceTexture::updateTexImage");
     Mutex::Autolock lock(mMutex);
@@ -602,6 +626,7 @@ status_t SurfaceTexture::updateTexImage() {
         mCurrentTextureBuf = mSlots[buf].mGraphicBuffer;
         mCurrentCrop = mSlots[buf].mCrop;
         mCurrentTransform = mSlots[buf].mTransform;
+        mCurrentScalingMode = mSlots[buf].mScalingMode;
         mCurrentTimestamp = mSlots[buf].mTimestamp;
         computeCurrentTransformMatrix();
 
@@ -809,6 +834,11 @@ uint32_t SurfaceTexture::getCurrentTransform() const {
     return mCurrentTransform;
 }
 
+uint32_t SurfaceTexture::getCurrentScalingMode() const {
+    Mutex::Autolock lock(mMutex);
+    return mCurrentScalingMode;
+}
+
 int SurfaceTexture::query(int what, int* outValue)
 {
     Mutex::Autolock lock(mMutex);
index d5b7c89..986fc7e 100644 (file)
@@ -55,6 +55,9 @@ void SurfaceTextureClient::init() {
     mQueryWidth = 0;
     mQueryHeight = 0;
     mQueryFormat = 0;
+    mDefaultWidth = 0;
+    mDefaultHeight = 0;
+    mTransformHint = 0;
     mConnectedToCpu = false;
 }
 
@@ -222,26 +225,38 @@ int SurfaceTextureClient::queueBuffer(android_native_buffer_t* buffer) {
     if (i < 0) {
         return i;
     }
-    mSurfaceTexture->queueBuffer(i, timestamp);
+    mSurfaceTexture->queueBuffer(i, timestamp,
+            &mDefaultWidth, &mDefaultHeight, &mTransformHint);
     return OK;
 }
 
 int SurfaceTextureClient::query(int what, int* value) const {
     LOGV("SurfaceTextureClient::query");
-    switch (what) {
-    case NATIVE_WINDOW_FORMAT:
-        if (mReqFormat) {
-            *value = mReqFormat;
-            return NO_ERROR;
+    { // scope for the lock
+        Mutex::Autolock lock(mMutex);
+        switch (what) {
+            case NATIVE_WINDOW_FORMAT:
+                if (mReqFormat) {
+                    *value = mReqFormat;
+                    return NO_ERROR;
+                }
+                break;
+            case NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER:
+                *value = 0;
+                return NO_ERROR;
+            case NATIVE_WINDOW_CONCRETE_TYPE:
+                *value = NATIVE_WINDOW_SURFACE_TEXTURE_CLIENT;
+                return NO_ERROR;
+            case NATIVE_WINDOW_DEFAULT_WIDTH:
+                *value = mDefaultWidth;
+                return NO_ERROR;
+            case NATIVE_WINDOW_DEFAULT_HEIGHT:
+                *value = mDefaultHeight;
+                return NO_ERROR;
+            case NATIVE_WINDOW_TRANSFORM_HINT:
+                *value = mTransformHint;
+                return NO_ERROR;
         }
-        break;
-    case NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER:
-        // TODO: this is not needed anymore
-        *value = 0;
-        return NO_ERROR;
-    case NATIVE_WINDOW_CONCRETE_TYPE:
-        *value = NATIVE_WINDOW_SURFACE_TEXTURE_CLIENT;
-        return NO_ERROR;
     }
     return mSurfaceTexture->query(what, value);
 }
@@ -286,6 +301,9 @@ int SurfaceTextureClient::perform(int operation, va_list args)
     case NATIVE_WINDOW_UNLOCK_AND_POST:
         res = dispatchUnlockAndPost(args);
         break;
+    case NATIVE_WINDOW_SET_SCALING_MODE:
+        res = dispatchSetScalingMode(args);
+        break;
     default:
         res = NAME_NOT_FOUND;
         break;
@@ -340,6 +358,11 @@ int SurfaceTextureClient::dispatchSetBuffersFormat(va_list args) {
     return setBuffersFormat(f);
 }
 
+int SurfaceTextureClient::dispatchSetScalingMode(va_list args) {
+    int m = va_arg(args, int);
+    return setScalingMode(m);
+}
+
 int SurfaceTextureClient::dispatchSetBuffersTransform(va_list args) {
     int transform = va_arg(args, int);
     return setBuffersTransform(transform);
@@ -456,6 +479,18 @@ int SurfaceTextureClient::setBuffersFormat(int format)
     return NO_ERROR;
 }
 
+int SurfaceTextureClient::setScalingMode(int mode)
+{
+    LOGV("SurfaceTextureClient::setScalingMode(%d)", mode);
+    Mutex::Autolock lock(mMutex);
+    // mode is validated on the server
+    status_t err = mSurfaceTexture->setScalingMode(mode);
+    LOGE_IF(err, "ISurfaceTexture::setScalingMode(%d) returned %s",
+            mode, strerror(-err));
+
+    return err;
+}
+
 int SurfaceTextureClient::setBuffersTransform(int transform)
 {
     LOGV("SurfaceTextureClient::setBuffersTransform");
index 2b8f204..c1a3c98 100644 (file)
@@ -116,11 +116,6 @@ TEST_F(SurfaceTextureClientTest, ConcreteTypeIsSurfaceTextureClient) {
     EXPECT_EQ(NATIVE_WINDOW_SURFACE_TEXTURE_CLIENT, result);
 }
 
-TEST_F(SurfaceTextureClientTest, ANativeWindowLockFails) {
-    ANativeWindow_Buffer buf;
-    ASSERT_EQ(BAD_VALUE, ANativeWindow_lock(mANW.get(), &buf, NULL));
-}
-
 TEST_F(SurfaceTextureClientTest, EglCreateWindowSurfaceSucceeds) {
     EGLDisplay dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
     ASSERT_EQ(EGL_SUCCESS, eglGetError());
index 8b1caee..886c05c 100644 (file)
@@ -883,7 +883,6 @@ bool DisplayList::replay(OpenGLRenderer& renderer, Rect& dirty, uint32_t level)
 ///////////////////////////////////////////////////////////////////////////////
 
 DisplayListRenderer::DisplayListRenderer(): mWriter(MIN_WRITER_SIZE) {
-    mDisplayList = NULL;
 }
 
 DisplayListRenderer::~DisplayListRenderer() {
@@ -923,13 +922,13 @@ void DisplayListRenderer::reset() {
 // Operations
 ///////////////////////////////////////////////////////////////////////////////
 
-DisplayList* DisplayListRenderer::getDisplayList() {
-    if (mDisplayList == NULL) {
-        mDisplayList = new DisplayList(*this);
+DisplayList* DisplayListRenderer::getDisplayList(DisplayList* displayList) {
+    if (!displayList) {
+        displayList = new DisplayList(*this);
     } else {
-        mDisplayList->initFromDisplayListRenderer(*this, true);
+        displayList->initFromDisplayListRenderer(*this, true);
     }
-    return mDisplayList;
+    return displayList;
 }
 
 void DisplayListRenderer::setViewport(int width, int height) {
index b83259f..8157631 100644 (file)
@@ -217,7 +217,7 @@ public:
     DisplayListRenderer();
     ~DisplayListRenderer();
 
-    DisplayList* getDisplayList();
+    DisplayList* getDisplayList(DisplayList* displayList);
 
     void setViewport(int width, int height);
     void prepareDirty(float left, float top, float right, float bottom, bool opaque);
@@ -474,8 +474,6 @@ private:
 
     SkWriter32 mWriter;
 
-    DisplayList *mDisplayList;
-
     int mRestoreSaveCount;
 
     friend class DisplayList;
index a349121..85a9762 100644 (file)
@@ -125,6 +125,7 @@ OpenGLRenderer::~OpenGLRenderer() {
 ///////////////////////////////////////////////////////////////////////////////
 
 void OpenGLRenderer::setViewport(int width, int height) {
+    glDisable(GL_DITHER);
     glViewport(0, 0, width, height);
     mOrthoMatrix.loadOrtho(0, width, height, 0, -1, 1);
 
@@ -151,7 +152,6 @@ void OpenGLRenderer::prepareDirty(float left, float top, float right, float bott
     mSaveCount = 1;
 
     glViewport(0, 0, mWidth, mHeight);
-    glDisable(GL_DITHER);
 
     glEnable(GL_SCISSOR_TEST);
     glScissor(left, mSnapshot->height - bottom, right - left, bottom - top);
index a8aa0c7..58d3e5c 100644 (file)
@@ -128,7 +128,7 @@ LOCAL_SRC_FILES:= \
        driver/rsdShaderCache.cpp \
        driver/rsdVertexArray.cpp
 
-LOCAL_SHARED_LIBRARIES += libz libcutils libutils libEGL libGLESv1_CM libGLESv2 libui libbcc
+LOCAL_SHARED_LIBRARIES += libz libcutils libutils libEGL libGLESv1_CM libGLESv2 libui libbcc libbcinfo
 
 LOCAL_STATIC_LIBRARIES := libdex libft2
 
index bbf2836..0c0aa10 100644 (file)
@@ -19,6 +19,8 @@
 #include "rsdBcc.h"
 #include "rsdRuntime.h"
 
+#include <bcinfo/bcinfo.h>
+
 #include "rsContext.h"
 #include "rsScriptC.h"
 
@@ -38,22 +40,14 @@ struct DrvScript {
 
     BCCScriptRef mBccScript;
 
-    uint32_t mInvokeFunctionCount;
+    struct BCScriptMetadata *mScriptMetadata;
+
     InvokeFunc_t *mInvokeFunctions;
-    uint32_t mFieldCount;
     void ** mFieldAddress;
     bool * mFieldIsObject;
 
     const uint8_t * mScriptText;
     uint32_t mScriptTextLength;
-
-    //uint32_t * mObjectSlots;
-    //uint32_t mObjectSlotCount;
-
-    uint32_t mPragmaCount;
-    const char ** mPragmaKeys;
-    const char ** mPragmaValues;
-
 };
 
 
@@ -77,7 +71,7 @@ bool rsdScriptInit(const Context *rsc,
 
     pthread_mutex_lock(&rsdgInitMutex);
     char *cachePath = NULL;
-    uint32_t objectSlotCount = 0;
+    struct BCScriptMetadata *md = NULL;
 
     DrvScript *drv = (DrvScript *)calloc(1, sizeof(DrvScript));
     if (drv == NULL) {
@@ -90,6 +84,14 @@ bool rsdScriptInit(const Context *rsc,
     drv->mScriptText = bitcode;
     drv->mScriptTextLength = bitcodeSize;
 
+    md = bcinfoGetScriptMetadata((const char*)drv->mScriptText,
+                                 drv->mScriptTextLength, 0);
+    if (!md) {
+      LOGE("bcinfo: failed to read script metadata");
+      goto error;
+    }
+    drv->mScriptMetadata = md;
+
     //LOGE("mBccScript %p", script->mBccScript);
 
     if (bccRegisterSymbolCallback(drv->mBccScript, &rsdLookupRuntimeStub, script) != 0) {
@@ -120,59 +122,42 @@ bool rsdScriptInit(const Context *rsc,
     drv->mRoot = reinterpret_cast<int (*)()>(bccGetFuncAddr(drv->mBccScript, "root"));
     drv->mInit = reinterpret_cast<void (*)()>(bccGetFuncAddr(drv->mBccScript, "init"));
 
-    drv->mInvokeFunctionCount = bccGetExportFuncCount(drv->mBccScript);
-    if (drv->mInvokeFunctionCount <= 0)
+    if (md->exportFuncCount > 0) {
+        drv->mInvokeFunctions = (InvokeFunc_t*) calloc(md->exportFuncCount,
+                                                       sizeof(InvokeFunc_t));
+        bccGetExportFuncList(drv->mBccScript,
+                             md->exportFuncCount,
+                             (void **) drv->mInvokeFunctions);
+    } else {
         drv->mInvokeFunctions = NULL;
-    else {
-        drv->mInvokeFunctions = (InvokeFunc_t*) calloc(drv->mInvokeFunctionCount, sizeof(InvokeFunc_t));
-        bccGetExportFuncList(drv->mBccScript, drv->mInvokeFunctionCount, (void **) drv->mInvokeFunctions);
     }
 
-    drv->mFieldCount = bccGetExportVarCount(drv->mBccScript);
-    if (drv->mFieldCount <= 0) {
+    if (md->exportVarCount > 0) {
+        drv->mFieldAddress = (void **) calloc(md->exportVarCount,
+                                              sizeof(void*));
+        drv->mFieldIsObject = (bool *) calloc(md->exportVarCount, sizeof(bool));
+        bccGetExportVarList(drv->mBccScript,
+                            md->exportVarCount,
+                            (void **) drv->mFieldAddress);
+    } else {
         drv->mFieldAddress = NULL;
         drv->mFieldIsObject = NULL;
-    } else {
-        drv->mFieldAddress = (void **) calloc(drv->mFieldCount, sizeof(void *));
-        drv->mFieldIsObject = (bool *) calloc(drv->mFieldCount, sizeof(bool));
-        bccGetExportVarList(drv->mBccScript, drv->mFieldCount, (void **) drv->mFieldAddress);
     }
 
-    objectSlotCount = bccGetObjectSlotCount(drv->mBccScript);
-    if (objectSlotCount) {
-        uint32_t * slots = new uint32_t[objectSlotCount];
-        bccGetObjectSlotList(drv->mBccScript, objectSlotCount, slots);
-        for (uint32_t ct=0; ct < objectSlotCount; ct++) {
-            drv->mFieldIsObject[slots[ct]] = true;
+    if (md->objectSlotCount) {
+        for (uint32_t ct=0; ct < md->objectSlotCount; ct++) {
+            drv->mFieldIsObject[md->objectSlotList[ct]] = true;
         }
-        delete [] slots;
     }
 
-    uint32_t mPragmaCount;
-    const char ** mPragmaKeys;
-    const char ** mPragmaValues;
-
-    drv->mPragmaCount = bccGetPragmaCount(drv->mBccScript);
-    if (drv->mPragmaCount <= 0) {
-        drv->mPragmaKeys = NULL;
-        drv->mPragmaValues = NULL;
-    } else {
-        drv->mPragmaKeys = (const char **) calloc(drv->mPragmaCount, sizeof(const char *));
-        drv->mPragmaValues = (const char **) calloc(drv->mPragmaCount, sizeof(const char *));
-        bccGetPragmaList(drv->mBccScript, drv->mPragmaCount, drv->mPragmaKeys, drv->mPragmaValues);
-    }
-
-
-
     // Copy info over to runtime
-    script->mHal.info.exportedFunctionCount = drv->mInvokeFunctionCount;
-    script->mHal.info.exportedVariableCount = drv->mFieldCount;
-    script->mHal.info.exportedPragmaCount = drv->mPragmaCount;
-    script->mHal.info.exportedPragmaKeyList = drv->mPragmaKeys;
-    script->mHal.info.exportedPragmaValueList = drv->mPragmaValues;
+    script->mHal.info.exportedFunctionCount = md->exportFuncCount;
+    script->mHal.info.exportedVariableCount = md->exportVarCount;
+    script->mHal.info.exportedPragmaCount = md->pragmaCount;
+    script->mHal.info.exportedPragmaKeyList = md->pragmaKeyList;
+    script->mHal.info.exportedPragmaValueList = md->pragmaValueList;
     script->mHal.info.root = drv->mRoot;
 
-
     pthread_mutex_unlock(&rsdgInitMutex);
     return true;
 
@@ -460,9 +445,10 @@ void rsdScriptSetGlobalObj(const Context *dc, const Script *script, uint32_t slo
 
 void rsdScriptDestroy(const Context *dc, Script *script) {
     DrvScript *drv = (DrvScript *)script->mHal.drv;
+    struct BCScriptMetadata *md = drv->mScriptMetadata;
 
     if (drv->mFieldAddress) {
-        for (size_t ct=0; ct < drv->mFieldCount; ct++) {
+        for (size_t ct = 0; ct < md->exportVarCount; ct++) {
             if (drv->mFieldIsObject[ct]) {
                 // The field address can be NULL if the script-side has
                 // optimized the corresponding global variable away.
@@ -471,18 +457,18 @@ void rsdScriptDestroy(const Context *dc, Script *script) {
                 }
             }
         }
-        delete [] drv->mFieldAddress;
-        delete [] drv->mFieldIsObject;
+        free(drv->mFieldAddress);
         drv->mFieldAddress = NULL;
-        drv->mFieldIsObject = NULL;
-        drv->mFieldCount = 0;
-    }
+        free(drv->mFieldIsObject);
+        drv->mFieldIsObject = NULL;    }
 
     if (drv->mInvokeFunctions) {
-        delete [] drv->mInvokeFunctions;
+        free(drv->mInvokeFunctions);
         drv->mInvokeFunctions = NULL;
-        drv->mInvokeFunctionCount = 0;
     }
+
+    bcinfoReleaseScriptMetadata(&drv->mScriptMetadata);
+
     free(drv);
     script->mHal.drv = NULL;
 
index 447a7ff..decd9f1 100644 (file)
@@ -442,6 +442,7 @@ void Context::setSurface(uint32_t w, uint32_t h, RsNativeWindow sur) {
 
     if (mWidth && mHeight) {
         mStateVertex.updateSize(this);
+        mFBOCache.updateSize();
     }
 }
 
index f42e1f3..5d58ba4 100644 (file)
@@ -38,6 +38,7 @@ public:
     void resetAll(Context *);
 
     void setup(Context *);
+    void updateSize() { mDirty = true; }
 
     struct Hal {
         mutable void *drv;
index 794747d..0e8ae61 100644 (file)
@@ -289,6 +289,18 @@ int FramebufferNativeWindow::query(const ANativeWindow* window,
         case NATIVE_WINDOW_CONCRETE_TYPE:
             *value = NATIVE_WINDOW_FRAMEBUFFER;
             return NO_ERROR;
+        case NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER:
+            *value = 0;
+            return NO_ERROR;
+        case NATIVE_WINDOW_DEFAULT_WIDTH:
+            *value = fb->width;
+            return NO_ERROR;
+        case NATIVE_WINDOW_DEFAULT_HEIGHT:
+            *value = fb->height;
+            return NO_ERROR;
+        case NATIVE_WINDOW_TRANSFORM_HINT:
+            *value = 0;
+            return NO_ERROR;
     }
     *value = 0;
     return BAD_VALUE;
@@ -298,19 +310,25 @@ int FramebufferNativeWindow::perform(ANativeWindow* window,
         int operation, ...)
 {
     switch (operation) {
-        case NATIVE_WINDOW_SET_USAGE:
-        case NATIVE_WINDOW_SET_BUFFERS_FORMAT:
         case NATIVE_WINDOW_CONNECT:
         case NATIVE_WINDOW_DISCONNECT:
-            break;
+        case NATIVE_WINDOW_SET_USAGE:
+        case NATIVE_WINDOW_SET_BUFFERS_GEOMETRY:
+        case NATIVE_WINDOW_SET_BUFFERS_DIMENSIONS:
+        case NATIVE_WINDOW_SET_BUFFERS_FORMAT:
+        case NATIVE_WINDOW_SET_BUFFERS_TRANSFORM:
+            // TODO: we should implement these
+            return NO_ERROR;
+
         case NATIVE_WINDOW_LOCK:
-            return INVALID_OPERATION;
         case NATIVE_WINDOW_UNLOCK_AND_POST:
+        case NATIVE_WINDOW_SET_CROP:
+        case NATIVE_WINDOW_SET_BUFFER_COUNT:
+        case NATIVE_WINDOW_SET_BUFFERS_TIMESTAMP:
+        case NATIVE_WINDOW_SET_SCALING_MODE:
             return INVALID_OPERATION;
-        default:
-            return NAME_NOT_FOUND;
     }
-    return NO_ERROR;
+    return NAME_NOT_FOUND;
 }
 
 // ----------------------------------------------------------------------------
index f633357..e4eadbd 100644 (file)
@@ -29,7 +29,6 @@ commonSources:= \
        Flattenable.cpp \
        LinearTransform.cpp \
        ObbFile.cpp \
-       Pool.cpp \
        PropertyMap.cpp \
        RefBase.cpp \
        ResourceTypes.cpp \
diff --git a/libs/utils/Pool.cpp b/libs/utils/Pool.cpp
deleted file mode 100644 (file)
index 8f18cb9..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// 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
index 29dec63..0adba06 100755 (executable)
@@ -325,7 +325,7 @@ public class GpsNetInitiatedHandler {
         }
         catch (UnsupportedEncodingException e)
         {
-            Log.e(TAG, e.getMessage());
+            throw new AssertionError();
         }
         return decoded;
     }
@@ -338,7 +338,7 @@ public class GpsNetInitiatedHandler {
         }
         catch (UnsupportedEncodingException e)
         {
-            Log.e(TAG, e.getMessage());
+            throw new AssertionError();
         }
         return decoded;
     }
index 253010c..7258e11 100644 (file)
@@ -297,6 +297,9 @@ public class AudioManager {
      */
     public static final int RINGER_MODE_NORMAL = 2;
 
+    // maximum valid ringer mode value. Values must start from 0 and be contiguous.
+    private static final int RINGER_MODE_MAX = RINGER_MODE_NORMAL;
+
     /**
      * Vibrate type that corresponds to the ringer.
      *
@@ -540,6 +543,21 @@ public class AudioManager {
     }
 
     /**
+     * Checks valid ringer mode values.
+     *
+     * @return true if the ringer mode indicated is valid, false otherwise.
+     *
+     * @see #setRingerMode(int)
+     * @hide
+     */
+    public static boolean isValidRingerMode(int ringerMode) {
+        if (ringerMode < 0 || ringerMode > RINGER_MODE_MAX) {
+            return false;
+        }
+        return true;
+    }
+
+    /**
      * Returns the maximum volume index for a particular stream.
      *
      * @param streamType The stream type whose maximum volume index is returned.
@@ -601,6 +619,9 @@ public class AudioManager {
      * @see #getRingerMode()
      */
     public void setRingerMode(int ringerMode) {
+        if (!isValidRingerMode(ringerMode)) {
+            return;
+        }
         IAudioService service = getService();
         try {
             service.setRingerMode(ringerMode);
index c567a6e..855e831 100644 (file)
@@ -185,7 +185,10 @@ public class AudioRecord
      * Size of the native audio buffer.
      */
     private int mNativeBufferSizeInBytes = 0;
-
+    /**
+     * Audio session ID
+     */
+    private int mSessionId = 0;
 
     //---------------------------------------------------------
     // Constructor, Finalize
@@ -227,15 +230,20 @@ public class AudioRecord
         audioBuffSizeCheck(bufferSizeInBytes);
 
         // native initialization
+        int[] session = new int[1];
+        session[0] = 0;
         //TODO: update native initialization when information about hardware init failure
         //      due to capture device already open is available.
         int initResult = native_setup( new WeakReference<AudioRecord>(this), 
-                mRecordSource, mSampleRate, mChannels, mAudioFormat, mNativeBufferSizeInBytes);
+                mRecordSource, mSampleRate, mChannels, mAudioFormat, mNativeBufferSizeInBytes,
+                session);
         if (initResult != SUCCESS) {
             loge("Error code "+initResult+" when initializing native AudioRecord object.");
             return; // with mState == STATE_UNINITIALIZED
         }
 
+        mSessionId = session[0];
+
         mState = STATE_INITIALIZED;
     }
 
@@ -485,6 +493,15 @@ public class AudioRecord
         }
     }
 
+    /**
+     * Returns the audio session ID.
+     *
+     * @return the ID of the audio session this AudioRecord belongs to.
+     * @hide
+     */
+    public int getAudioSessionId() {
+        return mSessionId;
+    }
 
     //---------------------------------------------------------
     // Transport control methods
@@ -763,7 +780,8 @@ public class AudioRecord
     //--------------------
 
     private native final int native_setup(Object audiorecord_this, 
-            int recordSource, int sampleRate, int nbChannels, int audioFormat, int buffSizeInBytes);
+            int recordSource, int sampleRate, int nbChannels, int audioFormat,
+            int buffSizeInBytes, int[] sessionId);
 
     private native final void native_finalize();
     
index 0876bbf..682560a 100644 (file)
@@ -332,10 +332,10 @@ public class AudioService extends IAudioService.Stub {
                 SOUND_EFFECT_DEFAULT_VOLUME_DB);
 
         mVolumePanel = new VolumePanel(context, this);
-        mSettingsObserver = new SettingsObserver();
         mForcedUseForComm = AudioSystem.FORCE_NONE;
         createAudioSystemThread();
         readPersistedSettings();
+        mSettingsObserver = new SettingsObserver();
         createStreamStates();
         // Call setMode() to initialize mSetModeDeathHandlers
         mMode = AudioSystem.MODE_INVALID;
@@ -424,18 +424,29 @@ public class AudioService extends IAudioService.Stub {
         final ContentResolver cr = mContentResolver;
 
         mRingerMode = System.getInt(cr, System.MODE_RINGER, AudioManager.RINGER_MODE_NORMAL);
+        // sanity check in case the settings are restored from a device with incompatible
+        // ringer modes
+        if (!AudioManager.isValidRingerMode(mRingerMode)) {
+            mRingerMode = AudioManager.RINGER_MODE_NORMAL;
+            System.putInt(cr, System.MODE_RINGER, mRingerMode);
+        }
 
         mVibrateSetting = System.getInt(cr, System.VIBRATE_ON, 0);
 
+        // make sure settings for ringer mode are consistent with device type: non voice capable
+        // devices (tablets) include media stream in silent mode whereas phones don't.
         mRingerModeAffectedStreams = Settings.System.getInt(cr,
                 Settings.System.MODE_RINGER_STREAMS_AFFECTED,
                 ((1 << AudioSystem.STREAM_RING)|(1 << AudioSystem.STREAM_NOTIFICATION)|
-                 (1 << AudioSystem.STREAM_SYSTEM)|(1 << AudioSystem.STREAM_SYSTEM_ENFORCED)|
-                 (1 << AudioSystem.STREAM_MUSIC)));
-
-        if (!mVoiceCapable) {
+                 (1 << AudioSystem.STREAM_SYSTEM)|(1 << AudioSystem.STREAM_SYSTEM_ENFORCED)));
+        if (mVoiceCapable) {
+            mRingerModeAffectedStreams &= ~(1 << AudioSystem.STREAM_MUSIC);
+        } else {
             mRingerModeAffectedStreams |= (1 << AudioSystem.STREAM_MUSIC);
         }
+        Settings.System.putInt(cr,
+                Settings.System.MODE_RINGER_STREAMS_AFFECTED, mRingerModeAffectedStreams);
+
         mMuteAffectedStreams = System.getInt(cr,
                 System.MUTE_STREAMS_AFFECTED,
                 ((1 << AudioSystem.STREAM_MUSIC)|(1 << AudioSystem.STREAM_RING)|(1 << AudioSystem.STREAM_SYSTEM)));
@@ -2166,12 +2177,14 @@ public class AudioService extends IAudioService.Stub {
             super.onChange(selfChange);
             synchronized (mSettingsLock) {
                 int ringerModeAffectedStreams = Settings.System.getInt(mContentResolver,
-                        Settings.System.MODE_RINGER_STREAMS_AFFECTED,
-                        0);
-                if (!mVoiceCapable) {
+                       Settings.System.MODE_RINGER_STREAMS_AFFECTED,
+                       ((1 << AudioSystem.STREAM_RING)|(1 << AudioSystem.STREAM_NOTIFICATION)|
+                       (1 << AudioSystem.STREAM_SYSTEM)|(1 << AudioSystem.STREAM_SYSTEM_ENFORCED)));
+                if (mVoiceCapable) {
+                    ringerModeAffectedStreams &= ~(1 << AudioSystem.STREAM_MUSIC);
+                } else {
                     ringerModeAffectedStreams |= (1 << AudioSystem.STREAM_MUSIC);
                 }
-
                 if (ringerModeAffectedStreams != mRingerModeAffectedStreams) {
                     /*
                      * Ensure all stream types that should be affected by ringer mode
index b20a6e9..4f9eb2b 100644 (file)
@@ -551,7 +551,9 @@ public class AudioTrack
      * @see #PLAYSTATE_PLAYING
      */
     public int getPlayState() {
-        return mPlayState;
+        synchronized (mPlayStateLock) {
+            return mPlayState;
+        }
     }
 
     /**
index 8c8569a..a8ac510 100644 (file)
@@ -372,8 +372,14 @@ public class MediaScanner
 
     private class FileInserter {
 
-        ContentValues[] mValues = new ContentValues[1000];
-        int mIndex = 0;
+        private final Uri mUri;
+        private final ContentValues[] mValues;
+        private int mIndex;
+
+        public FileInserter(Uri uri, int count) {
+            mUri = uri;
+            mValues = new ContentValues[count];
+        }
 
         public Uri insert(ContentValues values) {
             if (mIndex == mValues.length) {
@@ -389,13 +395,17 @@ public class MediaScanner
                 mValues[mIndex++] = null;
             }
             try {
-                mMediaProvider.bulkInsert(mFilesUri, mValues);
+                mMediaProvider.bulkInsert(mUri, mValues);
             } catch (RemoteException e) {
                 Log.e(TAG, "RemoteException in FileInserter.flush()", e);
             }
             mIndex = 0;
         }
     }
+
+    private FileInserter mAudioInserter;
+    private FileInserter mVideoInserter;
+    private FileInserter mImageInserter;
     private FileInserter mFileInserter;
 
     // hashes file path to FileCacheEntry.
@@ -707,9 +717,7 @@ public class MediaScanner
             map.put(MediaStore.MediaColumns.MIME_TYPE, mMimeType);
             map.put(MediaStore.MediaColumns.IS_DRM, mIsDrm);
 
-            if (mNoMedia) {
-                map.put(MediaStore.MediaColumns.NO_MEDIA, true);
-            } else {
+            if (!mNoMedia) {
                 if (MediaFile.isVideoFileType(mFileType)) {
                     map.put(Video.Media.ARTIST, (mArtist != null && mArtist.length() > 0
                             ? mArtist : MediaStore.UNKNOWN_STRING));
@@ -837,23 +845,35 @@ public class MediaScanner
                 }
             }
 
-            // For inserts we always use the file URI so we can insert in bulk.
-            // For updates we compute the URI based on the media type.
             Uri tableUri = mFilesUri;
+            FileInserter inserter = mFileInserter;
+            if (!mNoMedia) {
+                if (MediaFile.isVideoFileType(mFileType)) {
+                    tableUri = mVideoUri;
+                    inserter = mVideoInserter;
+                } else if (MediaFile.isImageFileType(mFileType)) {
+                    tableUri = mImagesUri;
+                    inserter = mImageInserter;
+                } else if (MediaFile.isAudioFileType(mFileType)) {
+                    tableUri = mAudioUri;
+                    inserter = mAudioInserter;
+                }
+            }
             Uri result = null;
             if (rowId == 0) {
                 if (mMtpObjectHandle != 0) {
                     values.put(MediaStore.MediaColumns.MEDIA_SCANNER_NEW_OBJECT_ID, mMtpObjectHandle);
                 }
-                int format = entry.mFormat;
-                if (format == 0) {
-                    format = MediaFile.getFormatCode(entry.mPath, mMimeType);
+                if (tableUri == mFilesUri) {
+                    int format = entry.mFormat;
+                    if (format == 0) {
+                        format = MediaFile.getFormatCode(entry.mPath, mMimeType);
+                    }
+                    values.put(Files.FileColumns.FORMAT, format);
                 }
-                values.put(Files.FileColumns.FORMAT, format);
-
                 // new file, insert it
-                if (mFileInserter != null) {
-                    result = mFileInserter.insert(values);
+                if (inserter != null) {
+                    result = inserter.insert(values);
                 } else {
                     result = mMediaProvider.insert(tableUri, values);
                 }
@@ -863,16 +883,6 @@ public class MediaScanner
                     entry.mRowId = rowId;
                 }
             } else {
-                if (!mNoMedia) {
-                    if (MediaFile.isVideoFileType(mFileType)) {
-                        tableUri = mVideoUri;
-                    } else if (MediaFile.isImageFileType(mFileType)) {
-                        tableUri = mImagesUri;
-                    } else if (MediaFile.isAudioFileType(mFileType)) {
-                        tableUri = mAudioUri;
-                    }
-                }
-
                 // updated file
                 result = ContentUris.withAppendedId(tableUri, rowId);
                 // path should never change, and we want to avoid replacing mixed cased paths
@@ -1200,12 +1210,25 @@ public class MediaScanner
             initialize(volumeName);
             prescan(null, true);
             long prescan = System.currentTimeMillis();
-            mFileInserter = new FileInserter();
+
+            // create FileInserters for bulk inserts
+            mAudioInserter = new FileInserter(mAudioUri, 500);
+            mVideoInserter = new FileInserter(mVideoUri, 500);
+            mImageInserter = new FileInserter(mImagesUri, 500);
+            mFileInserter = new FileInserter(mFilesUri, 500);
 
             for (int i = 0; i < directories.length; i++) {
                 processDirectory(directories[i], mClient);
             }
+
+            // flush remaining inserts
+            mAudioInserter.flush();
+            mVideoInserter.flush();
+            mImageInserter.flush();
             mFileInserter.flush();
+            mAudioInserter = null;
+            mVideoInserter = null;
+            mImageInserter = null;
             mFileInserter = null;
 
             long scan = System.currentTimeMillis();
index 0d2bcd5..6b0fb12 100644 (file)
@@ -912,11 +912,14 @@ class MediaArtistNativeHelper {
         /** 720p 1280 X 720 */
         public static final int V720p = 10;
 
-        /** 1080 x 720 */
+        /** W720p 1080 x 720 */
         public static final int W720p = 11;
 
-        /** 1080 960 x 720 */
+        /** S720p 960 x 720 */
         public static final int S720p = 12;
+
+        /** 1080p 1920 x 1080 */
+        public static final int V1080p = 13;
     }
 
     /**
@@ -3548,6 +3551,8 @@ class MediaArtistNativeHelper {
                     retValue = VideoFrameSize.WVGA16x9;
                 else if (height == MediaProperties.HEIGHT_720)
                     retValue = VideoFrameSize.V720p;
+                else if (height == MediaProperties.HEIGHT_1080)
+                    retValue = VideoFrameSize.V1080p;
                 break;
             case MediaProperties.ASPECT_RATIO_4_3:
                 if (height == MediaProperties.HEIGHT_480)
index 4faa83a..73cc7e2 100755 (executable)
@@ -503,51 +503,75 @@ public class MediaImageItem extends MediaItem {
 
         return adjustedOverlays;
     }
-
-
     /**
-     * This function sets the Ken Burn effect generated clip
-     * name.
+     * This function get the proper width by given aspect ratio
+     * and height.
      *
-     * @param generatedFilePath The name of the generated clip
+     * @param aspectRatio  Given aspect ratio
+     * @param height  Given height
      */
-    @Override
-    void setGeneratedImageClip(String generatedFilePath) {
-        super.setGeneratedImageClip(generatedFilePath);
+    private int getWidthByAspectRatioAndHeight(int aspectRatio, int height) {
+        int width = 0;
 
-
-        // set the Kenburns clip width and height
-        mGeneratedClipHeight = getScaledHeight();
-        switch (mVideoEditor.getAspectRatio()) {
+        switch (aspectRatio) {
             case MediaProperties.ASPECT_RATIO_3_2:
-                if (mGeneratedClipHeight == MediaProperties.HEIGHT_480)
-                    mGeneratedClipWidth = 720;
-                else if (mGeneratedClipHeight == MediaProperties.HEIGHT_720)
-                    mGeneratedClipWidth = 1080;
+                if (height == MediaProperties.HEIGHT_480)
+                    width = 720;
+                else if (height == MediaProperties.HEIGHT_720)
+                    width = 1080;
                 break;
+
             case MediaProperties.ASPECT_RATIO_16_9:
-                if (mGeneratedClipHeight == MediaProperties.HEIGHT_360)
-                    mGeneratedClipWidth = 640;
-                else if (mGeneratedClipHeight == MediaProperties.HEIGHT_480)
-                    mGeneratedClipWidth = 854;
-                else if (mGeneratedClipHeight == MediaProperties.HEIGHT_720)
-                    mGeneratedClipWidth = 1280;
+                if (height == MediaProperties.HEIGHT_360)
+                    width = 640;
+                else if (height == MediaProperties.HEIGHT_480)
+                    width = 854;
+                else if (height == MediaProperties.HEIGHT_720)
+                    width = 1280;
+                else if (height == MediaProperties.HEIGHT_1080)
+                    width = 1920;
                 break;
+
             case MediaProperties.ASPECT_RATIO_4_3:
-                if (mGeneratedClipHeight == MediaProperties.HEIGHT_480)
-                    mGeneratedClipWidth = 640;
-                if (mGeneratedClipHeight == MediaProperties.HEIGHT_720)
-                    mGeneratedClipWidth = 960;
+                if (height == MediaProperties.HEIGHT_480)
+                    width = 640;
+                if (height == MediaProperties.HEIGHT_720)
+                    width = 960;
                 break;
+
             case MediaProperties.ASPECT_RATIO_5_3:
-                if (mGeneratedClipHeight == MediaProperties.HEIGHT_480)
-                    mGeneratedClipWidth = 800;
+                if (height == MediaProperties.HEIGHT_480)
+                    width = 800;
                 break;
+
             case MediaProperties.ASPECT_RATIO_11_9:
-                if (mGeneratedClipHeight == MediaProperties.HEIGHT_144)
-                    mGeneratedClipWidth = 176;
+                if (height == MediaProperties.HEIGHT_144)
+                    width = 176;
                 break;
+
+            default : {
+                throw new IllegalArgumentException(
+                    "Illegal arguments for aspectRatio");
+            }
         }
+
+        return width;
+    }
+
+    /**
+     * This function sets the Ken Burn effect generated clip
+     * name.
+     *
+     * @param generatedFilePath The name of the generated clip
+     */
+    @Override
+    void setGeneratedImageClip(String generatedFilePath) {
+        super.setGeneratedImageClip(generatedFilePath);
+
+        // set the Kenburns clip width and height
+        mGeneratedClipHeight = getScaledHeight();
+        mGeneratedClipWidth = getWidthByAspectRatioAndHeight(
+                mVideoEditor.getAspectRatio(), mGeneratedClipHeight);
     }
 
     /**
@@ -841,37 +865,8 @@ public class MediaImageItem extends MediaItem {
             clipSettings.fileType = FileType.THREE_GPP;
 
             mGeneratedClipHeight = getScaledHeight();
-            switch (mVideoEditor.getAspectRatio()) {
-                case MediaProperties.ASPECT_RATIO_3_2:
-                    if (mGeneratedClipHeight == MediaProperties.HEIGHT_480)
-                        mGeneratedClipWidth = 720;
-                    else if (mGeneratedClipHeight == MediaProperties.HEIGHT_720)
-                        mGeneratedClipWidth = 1080;
-                    break;
-                case MediaProperties.ASPECT_RATIO_16_9:
-                    if (mGeneratedClipHeight == MediaProperties.HEIGHT_360)
-                        mGeneratedClipWidth = 640;
-                    else if (mGeneratedClipHeight == MediaProperties.HEIGHT_480)
-                        mGeneratedClipWidth = 854;
-                    else if (mGeneratedClipHeight == MediaProperties.HEIGHT_720)
-                        mGeneratedClipWidth = 1280;
-                    break;
-                case MediaProperties.ASPECT_RATIO_4_3:
-                    if (mGeneratedClipHeight == MediaProperties.HEIGHT_480)
-                        mGeneratedClipWidth = 640;
-                    if (mGeneratedClipHeight == MediaProperties.HEIGHT_720)
-                        mGeneratedClipWidth = 960;
-                    break;
-                case MediaProperties.ASPECT_RATIO_5_3:
-                    if (mGeneratedClipHeight == MediaProperties.HEIGHT_480)
-                        mGeneratedClipWidth = 800;
-                    break;
-                case MediaProperties.ASPECT_RATIO_11_9:
-                    if (mGeneratedClipHeight == MediaProperties.HEIGHT_144)
-                        mGeneratedClipWidth = 176;
-                    break;
-            }
-
+            mGeneratedClipWidth = getWidthByAspectRatioAndHeight(
+                    mVideoEditor.getAspectRatio(), mGeneratedClipHeight);
         } else {
             if (getGeneratedImageClip() == null) {
                 clipSettings.clipPath = getDecodedImageFileName();
index 0225807..ff13e5d 100755 (executable)
@@ -17,8 +17,9 @@
 
 package android.media.videoeditor;
 
+import android.media.videoeditor.VideoEditorProfile;
 import android.util.Pair;
-
+import java.lang.System;
 /**
  * This class defines all properties of a media file such as supported height,
  * aspect ratio, bitrate for export function.
@@ -33,7 +34,7 @@ public class MediaProperties {
     public static final int HEIGHT_360 = 360;
     public static final int HEIGHT_480 = 480;
     public static final int HEIGHT_720 = 720;
-    public static final int HEIGHT_1088 = 1088;
+    public static final int HEIGHT_1080 = 1080;
 
     /**
      *  Supported aspect ratios
@@ -63,8 +64,7 @@ public class MediaProperties {
     private static final Pair<Integer, Integer>[] ASPECT_RATIO_3_2_RESOLUTIONS =
         new Pair[] {
         new Pair<Integer, Integer>(720, HEIGHT_480),
-//*tmpLSA*/        new Pair<Integer, Integer>(1080, HEIGHT_720)
-/*tmpLSA*/        new Pair<Integer, Integer>(1088, HEIGHT_720)
+        new Pair<Integer, Integer>(1080, HEIGHT_720)
     };
 
     @SuppressWarnings({"unchecked"})
@@ -92,6 +92,7 @@ public class MediaProperties {
         new Pair[] {
         new Pair<Integer, Integer>(848, HEIGHT_480),
         new Pair<Integer, Integer>(1280, HEIGHT_720),
+        new Pair<Integer, Integer>(1920, HEIGHT_1080),
     };
 
     /**
@@ -345,7 +346,31 @@ public class MediaProperties {
             }
         }
 
-        return resolutions;
+        /** Check the platform specific maximum export resolution */
+        VideoEditorProfile veProfile = VideoEditorProfile.get();
+        if (veProfile == null) {
+            throw new RuntimeException("Can't get the video editor profile");
+        }
+        final int maxWidth = veProfile.maxOutputVideoFrameWidth;
+        final int maxHeight = veProfile.maxOutputVideoFrameHeight;
+        Pair<Integer, Integer>[] tmpResolutions = new Pair[resolutions.length];
+        int numSupportedResolution = 0;
+        int i = 0;
+
+        /** Get supported resolution list */
+        for (i = 0; i < resolutions.length; i++) {
+            if ((resolutions[i].first <= maxWidth) &&
+                (resolutions[i].second <= maxHeight)) {
+                tmpResolutions[numSupportedResolution] = resolutions[i];
+                numSupportedResolution++;
+            }
+        }
+        final Pair<Integer, Integer>[] supportedResolutions =
+            new Pair[numSupportedResolution];
+        System.arraycopy(tmpResolutions, 0,
+            supportedResolutions, 0, numSupportedResolution);
+
+        return supportedResolutions;
     }
 
     /**
index 4758de6..6248651 100755 (executable)
@@ -23,6 +23,7 @@ import java.lang.ref.SoftReference;
 import android.graphics.Bitmap;
 import android.media.videoeditor.MediaArtistNativeHelper.ClipSettings;
 import android.media.videoeditor.MediaArtistNativeHelper.Properties;
+import android.media.videoeditor.VideoEditorProfile;
 import android.view.Surface;
 import android.view.SurfaceHolder;
 
@@ -118,6 +119,21 @@ public class MediaVideoItem extends MediaItem {
             throw new IllegalArgumentException(e.getMessage() + " : " + filename);
         }
 
+        /** Check the platform specific maximum import resolution */
+        VideoEditorProfile veProfile = VideoEditorProfile.get();
+        if (veProfile == null) {
+            throw new RuntimeException("Can't get the video editor profile");
+        }
+        final int maxInputWidth = veProfile.maxInputVideoFrameWidth;
+        final int maxInputHeight = veProfile.maxInputVideoFrameHeight;
+        if ((properties.width > maxInputWidth) ||
+            (properties.height > maxInputHeight)) {
+            throw new IllegalArgumentException(
+                "Unsupported import resolution. Supported maximum width:" +
+                maxInputWidth + " height:" + maxInputHeight +
+                ", current width:" + properties.width +
+                " height:" + properties.height);
+        }
         switch (mMANativeHelper.getFileType(properties.fileType)) {
             case MediaProperties.FILE_3GP:
             case MediaProperties.FILE_MP4:
index 59e4540..720e802 100755 (executable)
@@ -370,7 +370,7 @@ public interface VideoEditor {
      */
     public void export(String filename, int height, int bitrate,
                        ExportProgressListener listener)
-    throws IOException;
+                       throws IOException;
 
     /**
      * Create the output movie based on all media items added and the applied
@@ -413,7 +413,7 @@ public interface VideoEditor {
      */
     public void export(String filename, int height, int bitrate, int audioCodec,
                        int videoCodec, ExportProgressListener listener)
-                           throws IOException;
+                       throws IOException;
 
     /**
      * Cancel the running export operation. This method blocks until the export
index 649b98a..ea7fe63 100755 (executable)
@@ -337,7 +337,8 @@ public class VideoEditorImpl implements VideoEditor {
      */
     public void export(String filename, int height, int bitrate,
                        int audioCodec, int videoCodec,
-                       ExportProgressListener listener) throws IOException {
+                       ExportProgressListener listener)
+                       throws IOException {
 
         switch (audioCodec) {
             case MediaProperties.ACODEC_AAC_LC:
@@ -372,7 +373,8 @@ public class VideoEditorImpl implements VideoEditor {
      * {@inheritDoc}
      */
     public void export(String filename, int height, int bitrate,
-                       ExportProgressListener listener) throws IOException {
+                       ExportProgressListener listener)
+                       throws IOException {
         if (filename == null) {
             throw new IllegalArgumentException("export: filename is null");
         }
@@ -386,6 +388,20 @@ public class VideoEditorImpl implements VideoEditor {
             throw new IllegalStateException("No MediaItems added");
         }
 
+        /** Check the platform specific maximum export resolution */
+        VideoEditorProfile veProfile = VideoEditorProfile.get();
+        if (veProfile == null) {
+            throw new RuntimeException("Can't get the video editor profile");
+        }
+        final int maxOutputHeight = veProfile.maxOutputVideoFrameHeight;
+        final int maxOutputWidth = veProfile.maxOutputVideoFrameWidth;
+        if (height > maxOutputHeight) {
+            throw new IllegalArgumentException(
+                    "Unsupported export resolution. Supported maximum width:" +
+                    maxOutputWidth + " height:" + maxOutputHeight +
+                    " current height:" + height);
+        }
+
         switch (height) {
             case MediaProperties.HEIGHT_144:
                 break;
@@ -397,6 +413,8 @@ public class VideoEditorImpl implements VideoEditor {
                 break;
             case MediaProperties.HEIGHT_720:
                 break;
+            case MediaProperties.HEIGHT_1080:
+                break;
 
             default: {
                 String message = "Unsupported height value " + height;
diff --git a/media/java/android/media/videoeditor/VideoEditorProfile.java b/media/java/android/media/videoeditor/VideoEditorProfile.java
new file mode 100755 (executable)
index 0000000..7d9fc8f
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.videoeditor;
+
+/**
+ * The VideoEditorProfile class is used to retrieve the
+ * predefined videoeditor profile settings for videoeditor applications.
+ * These settings are read-only.
+ *
+ * <p>The videoeditor profile specifies the following set of parameters:
+ * <ul>
+ * <li> max input video frame width
+ * <li> max input video frame height
+ * <li> max output video frame width
+ * <li> max output video frame height
+ * </ul>
+ * {@hide}
+ */
+public class VideoEditorProfile
+{
+    /**
+     * The max input video frame width
+     */
+    public int maxInputVideoFrameWidth;
+
+    /**
+     * The max input video frame height
+     */
+    public int maxInputVideoFrameHeight;
+
+    /**
+     * The max ouput video frame width
+     */
+    public int maxOutputVideoFrameWidth;
+
+    /**
+     * The max ouput video frame height
+     */
+    public int maxOutputVideoFrameHeight;
+
+    /**
+     * Returns the videoeditor profile
+     */
+    public static VideoEditorProfile get() {
+        return native_get_videoeditor_profile();
+    }
+
+    static {
+        System.loadLibrary("media_jni");
+        native_init();
+    }
+
+    // Private constructor called by JNI
+    private VideoEditorProfile(int inputWidth,
+                             int inputHeight,
+                             int outputWidth,
+                             int outputHeight) {
+
+        this.maxInputVideoFrameWidth = inputWidth;
+        this.maxInputVideoFrameHeight = inputHeight;
+        this.maxOutputVideoFrameWidth = outputWidth;
+        this.maxOutputVideoFrameHeight = outputHeight;
+    }
+
+    // Methods implemented by JNI
+    private static native final void native_init();
+    private static native final VideoEditorProfile
+           native_get_videoeditor_profile();
+}
index 08a6de1..2b8dfe4 100644 (file)
@@ -286,6 +286,44 @@ android_media_MediaProfiles_native_get_image_encoding_quality_level(JNIEnv *env,
     }
     return static_cast<jint>(levels[index]);
 }
+static jobject
+android_media_MediaProfiles_native_get_videoeditor_profile(JNIEnv *env, jobject thiz)
+{
+    LOGV("native_get_videoeditor_profile");
+
+    int maxInputFrameWidth =
+            sProfiles->getVideoEditorCapParamByName("videoeditor.input.width.max");
+    int maxInputFrameHeight =
+            sProfiles->getVideoEditorCapParamByName("videoeditor.input.height.max");
+    int maxOutputFrameWidth =
+            sProfiles->getVideoEditorCapParamByName("videoeditor.output.width.max");
+    int maxOutputFrameHeight =
+            sProfiles->getVideoEditorCapParamByName("videoeditor.output.height.max");
+
+    // Check on the values retrieved
+    if (maxInputFrameWidth == -1 || maxInputFrameHeight == -1 ||
+        maxOutputFrameWidth == -1 || maxOutputFrameHeight == -1) {
+
+        jniThrowException(env, "java/lang/RuntimeException",\
+            "Error retrieving videoeditor profile params");
+        return NULL;
+    }
+    LOGV("native_get_videoeditor_profile \
+        inWidth:%d inHeight:%d,outWidth:%d, outHeight:%d",\
+        maxInputFrameWidth,maxInputFrameHeight,\
+        maxOutputFrameWidth,maxOutputFrameHeight);
+
+    jclass VideoEditorProfileClazz =
+        env->FindClass("android/media/videoeditor/VideoEditorProfile");
+    jmethodID VideoEditorProfileConstructorMethodID =
+        env->GetMethodID(VideoEditorProfileClazz, "<init>", "(IIII)V");
+    return env->NewObject(VideoEditorProfileClazz,
+                          VideoEditorProfileConstructorMethodID,
+                          maxInputFrameWidth,
+                          maxInputFrameHeight,
+                          maxOutputFrameWidth,
+                          maxOutputFrameHeight);
+}
 
 static JNINativeMethod gMethodsForEncoderCapabilitiesClass[] = {
     {"native_init",                            "()V",                    (void *)android_media_MediaProfiles_native_init},
@@ -324,10 +362,17 @@ static JNINativeMethod gMethodsForCameraProfileClass[] = {
     {"native_get_image_encoding_quality_level","(II)I",                   (void *)android_media_MediaProfiles_native_get_image_encoding_quality_level},
 };
 
+static JNINativeMethod gMethodsForVideoEditorProfileClass[] = {
+    {"native_init",                            "()V",                    (void *)android_media_MediaProfiles_native_init},
+    {"native_get_videoeditor_profile",           "()Landroid/media/videoeditor/VideoEditorProfile;",
+                                                                         (void *)android_media_MediaProfiles_native_get_videoeditor_profile},
+};
+
 static const char* const kEncoderCapabilitiesClassPathName = "android/media/EncoderCapabilities";
 static const char* const kDecoderCapabilitiesClassPathName = "android/media/DecoderCapabilities";
 static const char* const kCamcorderProfileClassPathName = "android/media/CamcorderProfile";
 static const char* const kCameraProfileClassPathName = "android/media/CameraProfile";
+static const char* const kVideoEditorProfileClassPathName = "android/media/videoeditor/VideoEditorProfile";
 
 // This function only registers the native methods, and is called from
 // JNI_OnLoad in android_media_MediaPlayer.cpp
@@ -353,6 +398,11 @@ int register_android_media_MediaProfiles(JNIEnv *env)
                gMethodsForCameraProfileClass,
                NELEM(gMethodsForCameraProfileClass));
 
+    int ret5 = AndroidRuntime::registerNativeMethods(env,
+               kVideoEditorProfileClassPathName,
+               gMethodsForVideoEditorProfileClass,
+               NELEM(gMethodsForVideoEditorProfileClass));
+
     // Success if all return values from above are 0
-    return (ret1 || ret2 || ret3 || ret4);
+    return (ret1 || ret2 || ret3 || ret4 || ret5);
 }
index d0d2d1e..b88296f 100644 (file)
@@ -46,6 +46,16 @@ struct fields_t {
 };
 static fields_t fields;
 
+static status_t checkAndClearExceptionFromCallback(JNIEnv* env, const char* methodName) {
+    if (env->ExceptionCheck()) {
+        LOGE("An exception was thrown by callback '%s'.", methodName);
+        LOGE_EX(env);
+        env->ExceptionClear();
+        return UNKNOWN_ERROR;
+    }
+    return OK;
+}
+
 class MyMediaScannerClient : public MediaScannerClient
 {
 public:
@@ -86,9 +96,7 @@ public:
         mEnv->DeleteGlobalRef(mClient);
     }
 
-    // Returns true if it succeeded, false if an exception occured
-    // in the Java code
-    virtual bool scanFile(const char* path, long long lastModified,
+    virtual status_t scanFile(const char* path, long long lastModified,
             long long fileSize, bool isDirectory, bool noMedia)
     {
         LOGV("scanFile: path(%s), time(%lld), size(%lld) and isDir(%d)",
@@ -96,27 +104,29 @@ public:
 
         jstring pathStr;
         if ((pathStr = mEnv->NewStringUTF(path)) == NULL) {
-            return false;
+            mEnv->ExceptionClear();
+            return NO_MEMORY;
         }
 
         mEnv->CallVoidMethod(mClient, mScanFileMethodID, pathStr, lastModified,
                 fileSize, isDirectory, noMedia);
 
         mEnv->DeleteLocalRef(pathStr);
-        return (!mEnv->ExceptionCheck());
+        return checkAndClearExceptionFromCallback(mEnv, "scanFile");
     }
 
-    // Returns true if it succeeded, false if an exception occured
-    // in the Java code
-    virtual bool handleStringTag(const char* name, const char* value)
+    virtual status_t handleStringTag(const char* name, const char* value)
     {
         LOGV("handleStringTag: name(%s) and value(%s)", name, value);
         jstring nameStr, valueStr;
         if ((nameStr = mEnv->NewStringUTF(name)) == NULL) {
-            return false;
+            mEnv->ExceptionClear();
+            return NO_MEMORY;
         }
         if ((valueStr = mEnv->NewStringUTF(value)) == NULL) {
-            return false;
+            mEnv->DeleteLocalRef(nameStr);
+            mEnv->ExceptionClear();
+            return NO_MEMORY;
         }
 
         mEnv->CallVoidMethod(
@@ -124,23 +134,22 @@ public:
 
         mEnv->DeleteLocalRef(nameStr);
         mEnv->DeleteLocalRef(valueStr);
-        return (!mEnv->ExceptionCheck());
+        return checkAndClearExceptionFromCallback(mEnv, "handleStringTag");
     }
 
-    // Returns true if it succeeded, false if an exception occured
-    // in the Java code
-    virtual bool setMimeType(const char* mimeType)
+    virtual status_t setMimeType(const char* mimeType)
     {
         LOGV("setMimeType: %s", mimeType);
         jstring mimeTypeStr;
         if ((mimeTypeStr = mEnv->NewStringUTF(mimeType)) == NULL) {
-            return false;
+            mEnv->ExceptionClear();
+            return NO_MEMORY;
         }
 
         mEnv->CallVoidMethod(mClient, mSetMimeTypeMethodID, mimeTypeStr);
 
         mEnv->DeleteLocalRef(mimeTypeStr);
-        return (!mEnv->ExceptionCheck());
+        return checkAndClearExceptionFromCallback(mEnv, "setMimeType");
     }
 
 private:
@@ -152,12 +161,6 @@ private:
 };
 
 
-static bool ExceptionCheck(void* env)
-{
-    LOGV("ExceptionCheck");
-    return ((JNIEnv *)env)->ExceptionCheck();
-}
-
 static MediaScanner *getNativeScanner_l(JNIEnv* env, jobject thiz)
 {
     return (MediaScanner *) env->GetIntField(thiz, fields.context);
@@ -190,7 +193,10 @@ android_media_MediaScanner_processDirectory(
     }
 
     MyMediaScannerClient myClient(env, client);
-    mp->processDirectory(pathStr, myClient, ExceptionCheck, env);
+    MediaScanResult result = mp->processDirectory(pathStr, myClient);
+    if (result == MEDIA_SCAN_RESULT_ERROR) {
+        LOGE("An error occurred while scanning directory '%s'.", pathStr);
+    }
     env->ReleaseStringUTFChars(path, pathStr);
 }
 
@@ -227,7 +233,10 @@ android_media_MediaScanner_processFile(
     }
 
     MyMediaScannerClient myClient(env, client);
-    mp->processFile(pathStr, mimeTypeStr, myClient);
+    MediaScanResult result = mp->processFile(pathStr, mimeTypeStr, myClient);
+    if (result == MEDIA_SCAN_RESULT_ERROR) {
+        LOGE("An error occurred while scanning file '%s'.", pathStr);
+    }
     env->ReleaseStringUTFChars(path, pathStr);
     if (mimeType) {
         env->ReleaseStringUTFChars(mimeType, mimeTypeStr);
index 277e16c..4c0e731 100755 (executable)
@@ -439,9 +439,10 @@ VIDEOEDIT_JAVA_DEFINE_CONSTANTS(VideoFrameSize)
     VIDEOEDIT_JAVA_CONSTANT_INIT("NTSC", M4VIDEOEDITING_kNTSC),
     VIDEOEDIT_JAVA_CONSTANT_INIT("nHD", M4VIDEOEDITING_k640_360),
     VIDEOEDIT_JAVA_CONSTANT_INIT("WVGA16x9", M4VIDEOEDITING_k854_480),
-    VIDEOEDIT_JAVA_CONSTANT_INIT("V720p", M4VIDEOEDITING_kHD1280),
-    VIDEOEDIT_JAVA_CONSTANT_INIT("W720p", M4VIDEOEDITING_kHD1080),
-    VIDEOEDIT_JAVA_CONSTANT_INIT("S720p", M4VIDEOEDITING_kHD960)
+    VIDEOEDIT_JAVA_CONSTANT_INIT("V720p", M4VIDEOEDITING_k1280_720),
+    VIDEOEDIT_JAVA_CONSTANT_INIT("W720p", M4VIDEOEDITING_k1080_720),
+    VIDEOEDIT_JAVA_CONSTANT_INIT("S720p", M4VIDEOEDITING_k960_720),
+    VIDEOEDIT_JAVA_CONSTANT_INIT("V1080p", M4VIDEOEDITING_k1920_1080)
 };
 
 VIDEOEDIT_JAVA_DEFINE_CONSTANT_CLASS(VideoFrameSize, VIDEO_FRAME_SIZE_CLASS_NAME,
index 9de7207..93fe702 100755 (executable)
@@ -214,18 +214,6 @@ jobject videoEditProp_getProperties(
                             "Invalid File or File not found ");
                 }
 
-                /**
-                 * Max resolution supported is 1280 x 720.
-                 */
-                if ( (pClipProperties->uiVideoWidth > 1280)
-                    || (pClipProperties->uiVideoHeight > 720) )
-                {
-                    result = M4MCS_ERR_INVALID_INPUT_VIDEO_FRAME_SIZE;
-                    videoEditJava_checkAndThrowIllegalArgumentException(
-                            &gotten, pEnv, (M4NO_ERROR != result),
-                            "Unsupported input video frame size");
-                }
-
 #ifdef USE_SOFTWARE_DECODER
                 /**
                  * Input clip with non-multiples of 16 is not supported.
index e6a7b37..b8fa487 100644 (file)
@@ -1,5 +1,10 @@
 # List of effect libraries to load. Each library element must contain a "path" element
 # giving the full path of the library .so file.
+#    libraries {
+#        <lib name> {
+#          path <lib path>
+#        }
+#    }
 libraries {
   bundle {
     path /system/lib/soundfx/libbundlewrapper.so
@@ -10,6 +15,9 @@ libraries {
   visualizer {
     path /system/lib/soundfx/libvisualizer.so
   }
+  pre_processing {
+    path /system/lib/soundfx/libaudiopreprocessing.so
+  }
 }
 
 # list of effects to load. Each effect element must contain a "library" and a "uuid" element.
@@ -17,6 +25,16 @@ libraries {
 # "libraries" element.
 # The name of the effect element is indicative, only the value of the "uuid" element
 # designates the effect.
+# The uuid is the implementation specific UUID as specified by the effect vendor. This is not the
+# generic effect type UUID.
+#    effects {
+#        <fx name> {
+#            library <lib name>
+#            uuid <effect uuid>
+#        }
+#        ...
+#    }
+
 effects {
   bassboost {
     library bundle
@@ -54,4 +72,55 @@ effects {
     library visualizer
     uuid d069d9e0-8329-11df-9168-0002a5d5c51b
   }
+  agc {
+    library pre_processing
+    uuid aa8130e0-66fc-11e0-bad0-0002a5d5c51b
+  }
+  aec {
+    library pre_processing
+    uuid bb392ec0-8d4d-11e0-a896-0002a5d5c51b
+  }
+  ns {
+    library pre_processing
+    uuid c06c8400-8e06-11e0-9cb6-0002a5d5c51b
+  }
 }
+# Audio preprocessor configurations.
+# The pre processor configuration consists in a list of elements each describing
+# pre processor settings for a given input source. Valid input source names are:
+# "mic", "camcorder", "voice_recognition", "voice_communication"
+# Each input source element contains a list of effects elements. The name of the effect
+# element must be the name of one of the effects in the "effects" list of the file.
+# Each effect element may optionally contain a list of parameters and their
+# default value to apply when the pre processor effect is created.
+# A parameter is defined by a "param" element and a "value" element. Each of these elements
+# consists in one or more elements specifying a type followed by a value.
+# The types defined are: "int", "short", "float", "bool" and "string"
+# When both "param" and "value" are a single int, a simple form is allowed where just
+# the param and value pair is present in the parameter description
+#    pre_processing {
+#        <input source name> {
+#            <fx name> {
+#                <param 1 name> {
+#                    param {
+#                        int|short|float|bool|string <value>
+#                        [ int|short|float|bool|string <value> ]
+#                        ...
+#                    }
+#                    value {
+#                        int|short|float|bool|string <value>
+#                        [ int|short|float|bool|string <value> ]
+#                        ...
+#                    }
+#                }
+#                <param 2 name > {<param> <value>}
+#                ...
+#            }
+#            ...
+#        }
+#        ...
+#    }
+
+#
+# TODO: add default audio pre processor configurations after debug and tuning phase
+#
index 26265ae..2f2b974 100644 (file)
@@ -14,4 +14,7 @@ LOCAL_MODULE:= libeffects
 
 LOCAL_SHARED_LIBRARIES += libdl
 
+LOCAL_C_INCLUDES := \
+    system/media/audio_effects/include
+
 include $(BUILD_SHARED_LIBRARY)
index a9689bc..d333510 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <cutils/misc.h>
 #include <cutils/config_utils.h>
+#include <audio_effects/audio_effects_conf.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
index fcc0dba..c1d4319 100644 (file)
 extern "C" {
 #endif
 
-#define AUDIO_EFFECT_DEFAULT_CONFIG_FILE "/system/etc/audio_effects.conf"
-#define AUDIO_EFFECT_VENDOR_CONFIG_FILE "/vendor/etc/audio_effects.conf"
-#define EFFECTS_TAG "effects"
-#define LIBRARIES_TAG "libraries"
-#define PATH_TAG "path"
-#define LIBRARY_TAG "library"
-#define UUID_TAG "uuid"
 
 typedef struct list_elem_s {
     void *object;
index 8d98900..3919551 100644 (file)
@@ -47,11 +47,11 @@ AudioEffect::AudioEffect(const effect_uuid_t *type,
                 effect_callback_t cbf,
                 void* user,
                 int sessionId,
-                audio_io_handle_t output
+                audio_io_handle_t io
                 )
     : mStatus(NO_INIT)
 {
-    mStatus = set(type, uuid, priority, cbf, user, sessionId, output);
+    mStatus = set(type, uuid, priority, cbf, user, sessionId, io);
 }
 
 AudioEffect::AudioEffect(const char *typeStr,
@@ -60,7 +60,7 @@ AudioEffect::AudioEffect(const char *typeStr,
                 effect_callback_t cbf,
                 void* user,
                 int sessionId,
-                audio_io_handle_t output
+                audio_io_handle_t io
                 )
     : mStatus(NO_INIT)
 {
@@ -83,7 +83,7 @@ AudioEffect::AudioEffect(const char *typeStr,
         }
     }
 
-    mStatus = set(pType, pUuid, priority, cbf, user, sessionId, output);
+    mStatus = set(pType, pUuid, priority, cbf, user, sessionId, io);
 }
 
 status_t AudioEffect::set(const effect_uuid_t *type,
@@ -92,13 +92,13 @@ status_t AudioEffect::set(const effect_uuid_t *type,
                 effect_callback_t cbf,
                 void* user,
                 int sessionId,
-                audio_io_handle_t output)
+                audio_io_handle_t io)
 {
     sp<IEffect> iEffect;
     sp<IMemory> cblk;
     int enabled;
 
-    LOGV("set %p mUserData: %p", this, user);
+    LOGV("set %p mUserData: %p uuid: %p timeLow %08x", this, user, type, type ? type->timeLow : 0);
 
     if (mIEffect != 0) {
         LOGW("Effect already in use");
@@ -135,7 +135,7 @@ status_t AudioEffect::set(const effect_uuid_t *type,
     mIEffectClient = new EffectClient(this);
 
     iEffect = audioFlinger->createEffect(getpid(), (effect_descriptor_t *)&mDescriptor,
-            mIEffectClient, priority, output, mSessionId, &mStatus, &mId, &enabled);
+            mIEffectClient, priority, io, mSessionId, &mStatus, &mId, &enabled);
 
     if (iEffect == 0 || (mStatus != NO_ERROR && mStatus != ALREADY_EXISTS)) {
         LOGE("set(): AudioFlinger could not create effect, status: %d", mStatus);
index 4c4aad0..1ec596e 100644 (file)
@@ -162,8 +162,19 @@ status_t AudioRecord::set(
 
     int channelCount = popcount(channelMask);
 
+    if (sessionId == 0 ) {
+        mSessionId = AudioSystem::newAudioSessionId();
+    } else {
+        mSessionId = sessionId;
+    }
+    LOGV("set(): mSessionId %d", mSessionId);
+
     audio_io_handle_t input = AudioSystem::getInput(inputSource,
-                                    sampleRate, format, channelMask, (audio_in_acoustics_t)flags);
+                                                    sampleRate,
+                                                    format,
+                                                    channelMask,
+                                                    (audio_in_acoustics_t)flags,
+                                                    mSessionId);
     if (input == 0) {
         LOGE("Could not get audio input for record source %d", inputSource);
         return BAD_VALUE;
@@ -187,8 +198,6 @@ status_t AudioRecord::set(
         notificationFrames = frameCount/2;
     }
 
-    mSessionId = sessionId;
-
     // create the IAudioRecord
     status = openRecord_l(sampleRate, format, channelMask,
                         frameCount, flags, input);
@@ -589,8 +598,10 @@ audio_io_handle_t AudioRecord::getInput_l()
 {
     mInput = AudioSystem::getInput(mInputSource,
                                 mCblk->sampleRate,
-                                mFormat, mChannelMask,
-                                (audio_in_acoustics_t)mFlags);
+                                mFormat,
+                                mChannelMask,
+                                (audio_in_acoustics_t)mFlags,
+                                mSessionId);
     return mInput;
 }
 
index 6cb3847..5009957 100644 (file)
@@ -605,11 +605,12 @@ audio_io_handle_t AudioSystem::getInput(int inputSource,
                                     uint32_t samplingRate,
                                     uint32_t format,
                                     uint32_t channels,
-                                    audio_in_acoustics_t acoustics)
+                                    audio_in_acoustics_t acoustics,
+                                    int sessionId)
 {
     const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service();
     if (aps == 0) return 0;
-    return aps->getInput(inputSource, samplingRate, format, channels, acoustics);
+    return aps->getInput(inputSource, samplingRate, format, channels, acoustics, sessionId);
 }
 
 status_t AudioSystem::startInput(audio_io_handle_t input)
@@ -678,14 +679,14 @@ audio_io_handle_t AudioSystem::getOutputForEffect(effect_descriptor_t *desc)
 }
 
 status_t AudioSystem::registerEffect(effect_descriptor_t *desc,
-                                audio_io_handle_t output,
+                                audio_io_handle_t io,
                                 uint32_t strategy,
                                 int session,
                                 int id)
 {
     const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service();
     if (aps == 0) return PERMISSION_DENIED;
-    return aps->registerEffect(desc, output, strategy, session, id);
+    return aps->registerEffect(desc, io, strategy, session, id);
 }
 
 status_t AudioSystem::unregisterEffect(int id)
@@ -695,9 +696,11 @@ status_t AudioSystem::unregisterEffect(int id)
     return aps->unregisterEffect(id);
 }
 
-status_t AudioSystem::isStreamActive(int stream, bool* state, uint32_t inPastMs) {
+status_t AudioSystem::isStreamActive(int stream, bool* state, uint32_t inPastMs)
+{
     const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service();
     if (aps == 0) return PERMISSION_DENIED;
+    if (state == NULL) return BAD_VALUE;
     *state = aps->isStreamActive(stream, inPastMs);
     return NO_ERROR;
 }
index 9fbcee0..49d410f 100644 (file)
@@ -184,7 +184,8 @@ public:
                                     uint32_t samplingRate,
                                     uint32_t format,
                                     uint32_t channels,
-                                    audio_in_acoustics_t acoustics)
+                                    audio_in_acoustics_t acoustics,
+                                    int audioSession)
     {
         Parcel data, reply;
         data.writeInterfaceToken(IAudioPolicyService::getInterfaceDescriptor());
@@ -193,6 +194,7 @@ public:
         data.writeInt32(static_cast <uint32_t>(format));
         data.writeInt32(channels);
         data.writeInt32(static_cast <uint32_t>(acoustics));
+        data.writeInt32(audioSession);
         remote()->transact(GET_INPUT, data, &reply);
         return static_cast <audio_io_handle_t> (reply.readInt32());
     }
@@ -285,7 +287,7 @@ public:
     }
 
     virtual status_t registerEffect(effect_descriptor_t *desc,
-                                        audio_io_handle_t output,
+                                        audio_io_handle_t io,
                                         uint32_t strategy,
                                         int session,
                                         int id)
@@ -293,7 +295,7 @@ public:
         Parcel data, reply;
         data.writeInterfaceToken(IAudioPolicyService::getInterfaceDescriptor());
         data.write(desc, sizeof(effect_descriptor_t));
-        data.writeInt32(output);
+        data.writeInt32(io);
         data.writeInt32(strategy);
         data.writeInt32(session);
         data.writeInt32(id);
@@ -439,11 +441,13 @@ status_t BnAudioPolicyService::onTransact(
             uint32_t channels = data.readInt32();
             audio_in_acoustics_t acoustics =
                     static_cast <audio_in_acoustics_t>(data.readInt32());
+            int audioSession = data.readInt32();
             audio_io_handle_t input = getInput(inputSource,
                                                samplingRate,
                                                format,
                                                channels,
-                                               acoustics);
+                                               acoustics,
+                                               audioSession);
             reply->writeInt32(static_cast <int>(input));
             return NO_ERROR;
         } break;
@@ -528,12 +532,12 @@ status_t BnAudioPolicyService::onTransact(
             CHECK_INTERFACE(IAudioPolicyService, data, reply);
             effect_descriptor_t desc;
             data.read(&desc, sizeof(effect_descriptor_t));
-            audio_io_handle_t output = data.readInt32();
+            audio_io_handle_t io = data.readInt32();
             uint32_t strategy = data.readInt32();
             int session = data.readInt32();
             int id = data.readInt32();
             reply->writeInt32(static_cast <int32_t>(registerEffect(&desc,
-                                                                   output,
+                                                                   io,
                                                                    strategy,
                                                                    session,
                                                                    id)));
index 069bbb7..f0f07a2 100644 (file)
@@ -132,6 +132,16 @@ MediaProfiles::logAudioDecoderCap(const MediaProfiles::AudioDecoderCap& cap)
     LOGV("codec = %d", cap.mCodec);
 }
 
+/*static*/ void
+MediaProfiles::logVideoEditorCap(const MediaProfiles::VideoEditorCap& cap)
+{
+    LOGV("videoeditor cap:");
+    LOGV("mMaxInputFrameWidth = %d", cap.mMaxInputFrameWidth);
+    LOGV("mMaxInputFrameHeight = %d", cap.mMaxInputFrameHeight);
+    LOGV("mMaxOutputFrameWidth = %d", cap.mMaxOutputFrameWidth);
+    LOGV("mMaxOutputFrameHeight = %d", cap.mMaxOutputFrameHeight);
+}
+
 /*static*/ int
 MediaProfiles::findTagForName(const MediaProfiles::NameToTagMap *map, size_t nMappings, const char *name)
 {
@@ -368,6 +378,24 @@ void MediaProfiles::addStartTimeOffset(int cameraId, const char** atts)
     mStartTimeOffsets.replaceValueFor(cameraId, offsetTimeMs);
 }
 
+/*static*/ MediaProfiles::VideoEditorCap*
+MediaProfiles::createVideoEditorCap(const char **atts, MediaProfiles *profiles)
+{
+    CHECK(!strcmp("maxInputFrameWidth", atts[0]) &&
+          !strcmp("maxInputFrameHeight", atts[2])  &&
+          !strcmp("maxOutputFrameWidth", atts[4]) &&
+          !strcmp("maxOutputFrameHeight", atts[6]));
+
+    MediaProfiles::VideoEditorCap *pVideoEditorCap =
+        new MediaProfiles::VideoEditorCap(atoi(atts[1]), atoi(atts[3]),
+                atoi(atts[5]), atoi(atts[7]));
+
+    logVideoEditorCap(*pVideoEditorCap);
+    profiles->mVideoEditorCap = pVideoEditorCap;
+
+    return pVideoEditorCap;
+}
+
 /*static*/ void
 MediaProfiles::startElementHandler(void *userData, const char *name, const char **atts)
 {
@@ -398,6 +426,8 @@ MediaProfiles::startElementHandler(void *userData, const char *name, const char
             createCamcorderProfile(profiles->mCurrentCameraId, atts, profiles->mCameraIds));
     } else if (strcmp("ImageEncoding", name) == 0) {
         profiles->addImageEncodingQualityLevel(profiles->mCurrentCameraId, atts);
+    } else if (strcmp("VideoEditorCap", name) == 0) {
+        createVideoEditorCap(atts, profiles);
     }
 }
 
@@ -790,6 +820,17 @@ MediaProfiles::createDefaultImageEncodingQualityLevels(MediaProfiles *profiles)
     profiles->mImageEncodingQualityLevels.add(levels);
 }
 
+/*static*/ void
+MediaProfiles::createDefaultVideoEditorCap(MediaProfiles *profiles)
+{
+    profiles->mVideoEditorCap =
+        new MediaProfiles::VideoEditorCap(
+                VIDEOEDITOR_DEFAULT_MAX_INPUT_FRAME_WIDTH,
+                VIDEOEDITOR_DEFUALT_MAX_INPUT_FRAME_HEIGHT,
+                VIDEOEDITOR_DEFAULT_MAX_OUTPUT_FRAME_WIDTH,
+                VIDEOEDITOR_DEFUALT_MAX_OUTPUT_FRAME_HEIGHT);
+}
+
 /*static*/ MediaProfiles*
 MediaProfiles::createDefaultInstance()
 {
@@ -801,6 +842,7 @@ MediaProfiles::createDefaultInstance()
     createDefaultAudioDecoders(profiles);
     createDefaultEncoderOutputFileFormats(profiles);
     createDefaultImageEncodingQualityLevels(profiles);
+    createDefaultVideoEditorCap(profiles);
     return profiles;
 }
 
@@ -899,6 +941,28 @@ int MediaProfiles::getVideoEncoderParamByName(const char *name, video_encoder co
     return -1;
 }
 
+int MediaProfiles::getVideoEditorCapParamByName(const char *name) const
+{
+    LOGV("getVideoEditorCapParamByName: %s", name);
+
+    if (mVideoEditorCap == NULL) {
+        LOGE("The mVideoEditorCap is not created, then create default cap.");
+        createDefaultVideoEditorCap(sInstance);
+    }
+
+    if (!strcmp("videoeditor.input.width.max", name))
+        return mVideoEditorCap->mMaxInputFrameWidth;
+    if (!strcmp("videoeditor.input.height.max", name))
+        return mVideoEditorCap->mMaxInputFrameHeight;
+    if (!strcmp("videoeditor.output.width.max", name))
+        return mVideoEditorCap->mMaxOutputFrameWidth;
+    if (!strcmp("videoeditor.output.height.max", name))
+        return mVideoEditorCap->mMaxOutputFrameHeight;
+
+    LOGE("The given video editor param name %s is not found", name);
+    return -1;
+}
+
 Vector<audio_encoder> MediaProfiles::getAudioEncoders() const
 {
     Vector<audio_encoder> encoders;
index 45bdff4..41f8593 100644 (file)
@@ -47,16 +47,15 @@ const char *MediaScanner::locale() const {
     return mLocale;
 }
 
-status_t MediaScanner::processDirectory(
-        const char *path, MediaScannerClient &client,
-        ExceptionCheck exceptionCheck, void *exceptionEnv) {
+MediaScanResult MediaScanner::processDirectory(
+        const char *path, MediaScannerClient &client) {
     int pathLength = strlen(path);
     if (pathLength >= PATH_MAX) {
-        return UNKNOWN_ERROR;
+        return MEDIA_SCAN_RESULT_SKIPPED;
     }
     char* pathBuffer = (char *)malloc(PATH_MAX + 1);
     if (!pathBuffer) {
-        return UNKNOWN_ERROR;
+        return MEDIA_SCAN_RESULT_ERROR;
     }
 
     int pathRemaining = PATH_MAX - pathLength;
@@ -69,21 +68,18 @@ status_t MediaScanner::processDirectory(
 
     client.setLocale(locale());
 
-    status_t result =
-        doProcessDirectory(pathBuffer, pathRemaining, client, false, exceptionCheck, exceptionEnv);
+    MediaScanResult result = doProcessDirectory(pathBuffer, pathRemaining, client, false);
 
     free(pathBuffer);
 
     return result;
 }
 
-status_t MediaScanner::doProcessDirectory(
-        char *path, int pathRemaining, MediaScannerClient &client,
-        bool noMedia, ExceptionCheck exceptionCheck, void *exceptionEnv) {
+MediaScanResult MediaScanner::doProcessDirectory(
+        char *path, int pathRemaining, MediaScannerClient &client, bool noMedia) {
     // place to copy file or directory name
     char* fileSpot = path + strlen(path);
     struct dirent* entry;
-    struct stat statbuf;
 
     // Treat all files as non-media in directories that contain a  ".nomedia" file
     if (pathRemaining >= 8 /* strlen(".nomedia") */ ) {
@@ -99,76 +95,88 @@ status_t MediaScanner::doProcessDirectory(
 
     DIR* dir = opendir(path);
     if (!dir) {
-        LOGD("opendir %s failed, errno: %d", path, errno);
-        return UNKNOWN_ERROR;
+        LOGW("Error opening directory '%s', skipping: %s.", path, strerror(errno));
+        return MEDIA_SCAN_RESULT_SKIPPED;
     }
 
+    MediaScanResult result = MEDIA_SCAN_RESULT_OK;
     while ((entry = readdir(dir))) {
-        const char* name = entry->d_name;
-
-        // ignore "." and ".."
-        if (name[0] == '.' && (name[1] == 0 || (name[1] == '.' && name[2] == 0))) {
-            continue;
+        if (doProcessDirectoryEntry(path, pathRemaining, client, noMedia, entry, fileSpot)
+                == MEDIA_SCAN_RESULT_ERROR) {
+            result = MEDIA_SCAN_RESULT_ERROR;
+            break;
         }
+    }
+    closedir(dir);
+    return result;
+}
 
-        int nameLength = strlen(name);
-        if (nameLength + 1 > pathRemaining) {
-            // path too long!
-            continue;
-        }
-        strcpy(fileSpot, name);
-
-        int type = entry->d_type;
-        if (type == DT_UNKNOWN) {
-            // If the type is unknown, stat() the file instead.
-            // This is sometimes necessary when accessing NFS mounted filesystems, but
-            // could be needed in other cases well.
-            if (stat(path, &statbuf) == 0) {
-                if (S_ISREG(statbuf.st_mode)) {
-                    type = DT_REG;
-                } else if (S_ISDIR(statbuf.st_mode)) {
-                    type = DT_DIR;
-                }
-            } else {
-                LOGD("stat() failed for %s: %s", path, strerror(errno) );
+MediaScanResult MediaScanner::doProcessDirectoryEntry(
+        char *path, int pathRemaining, MediaScannerClient &client, bool noMedia,
+        struct dirent* entry, char* fileSpot) {
+    struct stat statbuf;
+    const char* name = entry->d_name;
+
+    // ignore "." and ".."
+    if (name[0] == '.' && (name[1] == 0 || (name[1] == '.' && name[2] == 0))) {
+        return MEDIA_SCAN_RESULT_SKIPPED;
+    }
+
+    int nameLength = strlen(name);
+    if (nameLength + 1 > pathRemaining) {
+        // path too long!
+        return MEDIA_SCAN_RESULT_SKIPPED;
+    }
+    strcpy(fileSpot, name);
+
+    int type = entry->d_type;
+    if (type == DT_UNKNOWN) {
+        // If the type is unknown, stat() the file instead.
+        // This is sometimes necessary when accessing NFS mounted filesystems, but
+        // could be needed in other cases well.
+        if (stat(path, &statbuf) == 0) {
+            if (S_ISREG(statbuf.st_mode)) {
+                type = DT_REG;
+            } else if (S_ISDIR(statbuf.st_mode)) {
+                type = DT_DIR;
             }
+        } else {
+            LOGD("stat() failed for %s: %s", path, strerror(errno) );
         }
-        if (type == DT_REG || type == DT_DIR) {
-            if (type == DT_DIR) {
-                bool childNoMedia = noMedia;
-                // set noMedia flag on directories with a name that starts with '.'
-                // for example, the Mac ".Trashes" directory
-                if (name[0] == '.')
-                    childNoMedia = true;
-
-                // report the directory to the client
-                if (stat(path, &statbuf) == 0) {
-                    client.scanFile(path, statbuf.st_mtime, 0, true, childNoMedia);
-                }
-
-                // and now process its contents
-                strcat(fileSpot, "/");
-                int err = doProcessDirectory(path, pathRemaining - nameLength - 1, client,
-                        childNoMedia, exceptionCheck, exceptionEnv);
-                if (err) {
-                    // pass exceptions up - ignore other errors
-                    if (exceptionCheck && exceptionCheck(exceptionEnv)) goto failure;
-                    LOGE("Error processing '%s' - skipping\n", path);
-                    continue;
-                }
-            } else {
-                stat(path, &statbuf);
-                client.scanFile(path, statbuf.st_mtime, statbuf.st_size, false, noMedia);
-                if (exceptionCheck && exceptionCheck(exceptionEnv)) goto failure;
+    }
+    if (type == DT_DIR) {
+        bool childNoMedia = noMedia;
+        // set noMedia flag on directories with a name that starts with '.'
+        // for example, the Mac ".Trashes" directory
+        if (name[0] == '.')
+            childNoMedia = true;
+
+        // report the directory to the client
+        if (stat(path, &statbuf) == 0) {
+            status_t status = client.scanFile(path, statbuf.st_mtime, 0,
+                    true /*isDirectory*/, childNoMedia);
+            if (status) {
+                return MEDIA_SCAN_RESULT_ERROR;
             }
         }
+
+        // and now process its contents
+        strcat(fileSpot, "/");
+        MediaScanResult result = doProcessDirectory(path, pathRemaining - nameLength - 1,
+                client, childNoMedia);
+        if (result == MEDIA_SCAN_RESULT_ERROR) {
+            return MEDIA_SCAN_RESULT_ERROR;
+        }
+    } else if (type == DT_REG) {
+        stat(path, &statbuf);
+        status_t status = client.scanFile(path, statbuf.st_mtime, statbuf.st_size,
+                false /*isDirectory*/, noMedia);
+        if (status) {
+            return MEDIA_SCAN_RESULT_ERROR;
+        }
     }
 
-    closedir(dir);
-    return OK;
-failure:
-    closedir(dir);
-    return -1;
+    return MEDIA_SCAN_RESULT_OK;
 }
 
 }  // namespace android
index bd3596e..7a7aeb6 100644 (file)
@@ -62,7 +62,7 @@ void MediaScannerClient::beginFile()
     mValues = new StringArray;
 }
 
-bool MediaScannerClient::addStringTag(const char* name, const char* value)
+status_t MediaScannerClient::addStringTag(const char* name, const char* value)
 {
     if (mLocaleEncoding != kEncodingNone) {
         // don't bother caching strings that are all ASCII.
@@ -212,8 +212,10 @@ void MediaScannerClient::endFile()
 
         // finally, push all name/value pairs to the client
         for (int i = 0; i < mNames->size(); i++) {
-            if (!handleStringTag(mNames->getEntry(i), mValues->getEntry(i)))
+            status_t status = handleStringTag(mNames->getEntry(i), mValues->getEntry(i));
+            if (status) {
                 break;
+            }
         }
     }
     // else addStringTag() has done all the work so we have nothing to do
index f1a6041..a11fb80 100644 (file)
@@ -84,6 +84,8 @@ void MediaPlayer::disconnect()
     if (p != 0) {
         p->disconnect();
     }
+
+    disconnectNativeWindow();
 }
 
 // always call with lock held
index d4d07b2..174ec92 100644 (file)
@@ -445,6 +445,13 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() {
         return err;
     }
 
+    err = native_window_set_scaling_mode(mNativeWindow.get(),
+            NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW);
+
+    if (err != OK) {
+        return err;
+    }
+
     err = native_window_set_buffers_geometry(
             mNativeWindow.get(),
             def.format.video.nFrameWidth,
index 1bc2fb9..de66d99 100755 (executable)
@@ -179,9 +179,6 @@ status_t CameraSource::isCameraAvailable(
     if (camera == 0) {
         mCamera = Camera::connect(cameraId);
         if (mCamera == 0) return -EBUSY;
-        // If proxy is not passed in by applications, still use the proxy of
-        // our own Camera to simplify the code.
-        mCameraRecordingProxy = mCamera->getRecordingProxy();
         mCameraFlags &= ~FLAGS_HOT_CAMERA;
     } else {
         // We get the proxy from Camera, not ICamera. We need to get the proxy
@@ -192,12 +189,12 @@ status_t CameraSource::isCameraAvailable(
         if (mCamera == 0) return -EBUSY;
         mCameraRecordingProxy = proxy;
         mCameraFlags |= FLAGS_HOT_CAMERA;
+        mDeathNotifier = new DeathNotifier();
+        // isBinderAlive needs linkToDeath to work.
+        mCameraRecordingProxy->asBinder()->linkToDeath(mDeathNotifier);
     }
 
     mCamera->lock();
-    mDeathNotifier = new DeathNotifier();
-    // isBinderAlive needs linkToDeath to work.
-    mCameraRecordingProxy->asBinder()->linkToDeath(mDeathNotifier);
 
     return OK;
 }
@@ -292,7 +289,7 @@ status_t CameraSource::configureCamera(
         CameraParameters* params,
         int32_t width, int32_t height,
         int32_t frameRate) {
-
+    LOGV("configureCamera");
     Vector<Size> sizes;
     bool isSetVideoSizeSupportedByCamera = true;
     getSupportedVideoSizes(*params, &isSetVideoSizeSupportedByCamera, sizes);
@@ -368,6 +365,7 @@ status_t CameraSource::checkVideoSize(
         const CameraParameters& params,
         int32_t width, int32_t height) {
 
+    LOGV("checkVideoSize");
     // The actual video size is the same as the preview size
     // if the camera hal does not support separate video and
     // preview output. In this case, we retrieve the video
@@ -419,6 +417,7 @@ status_t CameraSource::checkFrameRate(
         const CameraParameters& params,
         int32_t frameRate) {
 
+    LOGV("checkFrameRate");
     int32_t frameRateActual = params.getPreviewFrameRate();
     if (frameRateActual < 0) {
         LOGE("Failed to retrieve preview frame rate (%d)", frameRateActual);
@@ -464,6 +463,7 @@ status_t CameraSource::init(
         int32_t frameRate,
         bool storeMetaDataInVideoBuffers) {
 
+    LOGV("init");
     status_t err = OK;
     int64_t token = IPCThreadState::self()->clearCallingIdentity();
     err = initWithCameraAccess(camera, proxy, cameraId,
@@ -480,6 +480,7 @@ status_t CameraSource::initWithCameraAccess(
         Size videoSize,
         int32_t frameRate,
         bool storeMetaDataInVideoBuffers) {
+    LOGV("initWithCameraAccess");
     status_t err = OK;
 
     if ((err = isCameraAvailable(camera, proxy, cameraId)) != OK) {
@@ -552,17 +553,25 @@ CameraSource::~CameraSource() {
 }
 
 void CameraSource::startCameraRecording() {
+    LOGV("startCameraRecording");
     // Reset the identity to the current thread because media server owns the
     // camera and recording is started by the applications. The applications
     // will connect to the camera in ICameraRecordingProxy::startRecording.
     int64_t token = IPCThreadState::self()->clearCallingIdentity();
-    mCamera->unlock();
-    mCamera.clear();
+    if (mCameraFlags & FLAGS_HOT_CAMERA) {
+        mCamera->unlock();
+        mCamera.clear();
+        CHECK_EQ(OK, mCameraRecordingProxy->startRecording(new ProxyListener(this)));
+    } else {
+        mCamera->setListener(new CameraSourceListener(this));
+        mCamera->startRecording();
+        CHECK(mCamera->recordingEnabled());
+    }
     IPCThreadState::self()->restoreCallingIdentity(token);
-    CHECK_EQ(OK, mCameraRecordingProxy->startRecording(new ProxyListener(this)));
 }
 
 status_t CameraSource::start(MetaData *meta) {
+    LOGV("start");
     CHECK(!mStarted);
     if (mInitCheck != OK) {
         LOGE("CameraSource is not initialized yet");
@@ -588,7 +597,13 @@ status_t CameraSource::start(MetaData *meta) {
 }
 
 void CameraSource::stopCameraRecording() {
-    mCameraRecordingProxy->stopRecording();
+    LOGV("stopCameraRecording");
+    if (mCameraFlags & FLAGS_HOT_CAMERA) {
+        mCameraRecordingProxy->stopRecording();
+    } else {
+        mCamera->setListener(NULL);
+        mCamera->stopRecording();
+    }
 }
 
 void CameraSource::releaseCamera() {
@@ -599,11 +614,10 @@ void CameraSource::releaseCamera() {
             LOGV("Camera was cold when we started, stopping preview");
             mCamera->stopPreview();
             mCamera->disconnect();
-        } else {
-            // Unlock the camera so the application can lock it back.
-            mCamera->unlock();
         }
+        mCamera->unlock();
         mCamera.clear();
+        mCamera = 0;
         IPCThreadState::self()->restoreCallingIdentity(token);
     }
     if (mCameraRecordingProxy != 0) {
@@ -646,8 +660,13 @@ status_t CameraSource::stop() {
 }
 
 void CameraSource::releaseRecordingFrame(const sp<IMemory>& frame) {
+    LOGV("releaseRecordingFrame");
     if (mCameraRecordingProxy != NULL) {
         mCameraRecordingProxy->releaseRecordingFrame(frame);
+    } else {
+        int64_t token = IPCThreadState::self()->clearCallingIdentity();
+        mCamera->releaseRecordingFrame(frame);
+        IPCThreadState::self()->restoreCallingIdentity(token);
     }
 }
 
@@ -707,7 +726,8 @@ status_t CameraSource::read(
         while (mStarted && mFramesReceived.empty()) {
             if (NO_ERROR !=
                 mFrameAvailableCondition.waitRelative(mLock, 1000000000LL)) {
-                if (!mCameraRecordingProxy->asBinder()->isBinderAlive()) {
+                if (mCameraRecordingProxy != 0 &&
+                    !mCameraRecordingProxy->asBinder()->isBinderAlive()) {
                     LOGW("camera recording proxy is gone");
                     return ERROR_END_OF_STREAM;
                 }
index b7c8e0c..1f7ee25 100644 (file)
  * limitations under the License.
  */
 
+//#define LOG_NDEBUG 0
+#define LOG_TAG "ESDS"
+#include <utils/Log.h>
+
 #include "include/ESDS.h"
 
 #include <string.h>
@@ -87,6 +91,8 @@ status_t ESDS::skipDescriptorHeader(
     }
     while (more);
 
+    LOGV("tag=0x%02x data_size=%d", *tag, *data_size);
+
     if (*data_size > size) {
         return ERROR_MALFORMED;
     }
@@ -146,8 +152,20 @@ status_t ESDS::parseESDescriptor(size_t offset, size_t size) {
     if (OCRstreamFlag) {
         offset += 2;
         size -= 2;
+
+        if ((offset >= size || mData[offset] != kTag_DecoderConfigDescriptor)
+                && offset - 2 < size
+                && mData[offset - 2] == kTag_DecoderConfigDescriptor) {
+            // Content found "in the wild" had OCRstreamFlag set but was
+            // missing OCR_ES_Id, the decoder config descriptor immediately
+            // followed instead.
+            offset -= 2;
+            size += 2;
+
+            LOGW("Found malformed 'esds' atom, ignoring missing OCR_ES_Id.");
+        }
     }
-    
+
     if (offset >= size) {
         return ERROR_MALFORMED;
     }
index 4f8336e..7bcbdcf 100755 (executable)
@@ -1765,6 +1765,13 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() {
         return err;
     }
 
+    err = native_window_set_scaling_mode(mNativeWindow.get(),
+            NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW);
+
+    if (err != OK) {
+        return err;
+    }
+
     err = native_window_set_buffers_geometry(
             mNativeWindow.get(),
             def.format.video.nFrameWidth,
index 89faff7..571e8be 100644 (file)
@@ -52,13 +52,13 @@ static bool FileHasAcceptableExtension(const char *extension) {
     return false;
 }
 
-static status_t HandleMIDI(
+static MediaScanResult HandleMIDI(
         const char *filename, MediaScannerClient *client) {
     // get the library configuration and do sanity check
     const S_EAS_LIB_CONFIG* pLibConfig = EAS_Config();
     if ((pLibConfig == NULL) || (LIB_VERSION != pLibConfig->libVersion)) {
         LOGE("EAS library/header mismatch\n");
-        return UNKNOWN_ERROR;
+        return MEDIA_SCAN_RESULT_ERROR;
     }
     EAS_I32 temp;
 
@@ -88,34 +88,41 @@ static status_t HandleMIDI(
     }
 
     if (result != EAS_SUCCESS) {
-        return UNKNOWN_ERROR;
+        return MEDIA_SCAN_RESULT_SKIPPED;
     }
 
     char buffer[20];
     sprintf(buffer, "%ld", temp);
-    if (!client->addStringTag("duration", buffer)) return UNKNOWN_ERROR;
-
-    return OK;
+    status_t status = client->addStringTag("duration", buffer);
+    if (status) {
+        return MEDIA_SCAN_RESULT_ERROR;
+    }
+    return MEDIA_SCAN_RESULT_OK;
 }
 
-status_t StagefrightMediaScanner::processFile(
+MediaScanResult StagefrightMediaScanner::processFile(
         const char *path, const char *mimeType,
         MediaScannerClient &client) {
     LOGV("processFile '%s'.", path);
 
     client.setLocale(locale());
     client.beginFile();
+    MediaScanResult result = processFileInternal(path, mimeType, client);
+    client.endFile();
+    return result;
+}
 
+MediaScanResult StagefrightMediaScanner::processFileInternal(
+        const char *path, const char *mimeType,
+        MediaScannerClient &client) {
     const char *extension = strrchr(path, '.');
 
     if (!extension) {
-        return UNKNOWN_ERROR;
+        return MEDIA_SCAN_RESULT_SKIPPED;
     }
 
     if (!FileHasAcceptableExtension(extension)) {
-        client.endFile();
-
-        return UNKNOWN_ERROR;
+        return MEDIA_SCAN_RESULT_SKIPPED;
     }
 
     if (!strcasecmp(extension, ".mid")
@@ -127,53 +134,57 @@ status_t StagefrightMediaScanner::processFile(
             || !strcasecmp(extension, ".rtx")
             || !strcasecmp(extension, ".ota")
             || !strcasecmp(extension, ".mxmf")) {
-        status_t status = HandleMIDI(path, &client);
-        if (status != OK) {
-            return status;
+        return HandleMIDI(path, &client);
+    }
+
+    sp<MediaMetadataRetriever> mRetriever(new MediaMetadataRetriever);
+
+    status_t status = mRetriever->setDataSource(path);
+    if (status) {
+        return MEDIA_SCAN_RESULT_ERROR;
+    }
+
+    const char *value;
+    if ((value = mRetriever->extractMetadata(
+                    METADATA_KEY_MIMETYPE)) != NULL) {
+        status = client.setMimeType(value);
+        if (status) {
+            return MEDIA_SCAN_RESULT_ERROR;
         }
-    } else {
-        sp<MediaMetadataRetriever> mRetriever(new MediaMetadataRetriever);
-
-         if (mRetriever->setDataSource(path) == OK) {
-            const char *value;
-            if ((value = mRetriever->extractMetadata(
-                            METADATA_KEY_MIMETYPE)) != NULL) {
-                client.setMimeType(value);
-            }
+    }
 
-            struct KeyMap {
-                const char *tag;
-                int key;
-            };
-            static const KeyMap kKeyMap[] = {
-                { "tracknumber", METADATA_KEY_CD_TRACK_NUMBER },
-                { "discnumber", METADATA_KEY_DISC_NUMBER },
-                { "album", METADATA_KEY_ALBUM },
-                { "artist", METADATA_KEY_ARTIST },
-                { "albumartist", METADATA_KEY_ALBUMARTIST },
-                { "composer", METADATA_KEY_COMPOSER },
-                { "genre", METADATA_KEY_GENRE },
-                { "title", METADATA_KEY_TITLE },
-                { "year", METADATA_KEY_YEAR },
-                { "duration", METADATA_KEY_DURATION },
-                { "writer", METADATA_KEY_WRITER },
-                { "compilation", METADATA_KEY_COMPILATION },
-                { "isdrm", METADATA_KEY_IS_DRM },
-            };
-            static const size_t kNumEntries = sizeof(kKeyMap) / sizeof(kKeyMap[0]);
-
-            for (size_t i = 0; i < kNumEntries; ++i) {
-                const char *value;
-                if ((value = mRetriever->extractMetadata(kKeyMap[i].key)) != NULL) {
-                    client.addStringTag(kKeyMap[i].tag, value);
-                }
+    struct KeyMap {
+        const char *tag;
+        int key;
+    };
+    static const KeyMap kKeyMap[] = {
+        { "tracknumber", METADATA_KEY_CD_TRACK_NUMBER },
+        { "discnumber", METADATA_KEY_DISC_NUMBER },
+        { "album", METADATA_KEY_ALBUM },
+        { "artist", METADATA_KEY_ARTIST },
+        { "albumartist", METADATA_KEY_ALBUMARTIST },
+        { "composer", METADATA_KEY_COMPOSER },
+        { "genre", METADATA_KEY_GENRE },
+        { "title", METADATA_KEY_TITLE },
+        { "year", METADATA_KEY_YEAR },
+        { "duration", METADATA_KEY_DURATION },
+        { "writer", METADATA_KEY_WRITER },
+        { "compilation", METADATA_KEY_COMPILATION },
+        { "isdrm", METADATA_KEY_IS_DRM },
+    };
+    static const size_t kNumEntries = sizeof(kKeyMap) / sizeof(kKeyMap[0]);
+
+    for (size_t i = 0; i < kNumEntries; ++i) {
+        const char *value;
+        if ((value = mRetriever->extractMetadata(kKeyMap[i].key)) != NULL) {
+            status = client.addStringTag(kKeyMap[i].tag, value);
+            if (status) {
+                return MEDIA_SCAN_RESULT_ERROR;
             }
         }
     }
 
-    client.endFile();
-
-    return OK;
+    return MEDIA_SCAN_RESULT_OK;
 }
 
 char *StagefrightMediaScanner::extractAlbumArt(int fd) {
diff --git a/media/libstagefright/codecs/avc/dec/Android.mk b/media/libstagefright/codecs/avc/dec/Android.mk
deleted file mode 100644 (file)
index 2949a04..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
-        src/avcdec_api.cpp \
-        src/avc_bitstream.cpp \
-        src/header.cpp \
-        src/itrans.cpp \
-        src/pred_inter.cpp \
-        src/pred_intra.cpp \
-        src/residual.cpp \
-        src/slice.cpp \
-        src/vlc.cpp
-
-LOCAL_MODULE := libstagefright_avcdec
-
-LOCAL_C_INCLUDES := \
-        $(LOCAL_PATH)/src \
-        $(LOCAL_PATH)/include \
-        $(LOCAL_PATH)/../common/include \
-        $(TOP)/frameworks/base/media/libstagefright/include \
-        frameworks/base/include/media/stagefright/openmax \
-
-LOCAL_CFLAGS := -DOSCL_IMPORT_REF= -DOSCL_UNUSED_ARG= -DOSCL_EXPORT_REF=
-
-include $(BUILD_STATIC_LIBRARY)
-
-################################################################################
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
-        SoftAVC.cpp
-
-LOCAL_C_INCLUDES := \
-        $(LOCAL_PATH)/src \
-        $(LOCAL_PATH)/include \
-        $(LOCAL_PATH)/../common/include \
-        frameworks/base/media/libstagefright/include \
-        frameworks/base/include/media/stagefright/openmax \
-
-LOCAL_CFLAGS := -DOSCL_IMPORT_REF=
-
-LOCAL_STATIC_LIBRARIES := \
-        libstagefright_avcdec
-
-LOCAL_SHARED_LIBRARIES := \
-        libstagefright_avc_common \
-        libstagefright libstagefright_omx libstagefright_foundation libutils
-
-LOCAL_MODULE := libstagefright_soft_avcdec
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_SHARED_LIBRARY)
-
diff --git a/media/libstagefright/codecs/avc/dec/SoftAVC.cpp b/media/libstagefright/codecs/avc/dec/SoftAVC.cpp
deleted file mode 100644 (file)
index 6a476f6..0000000
+++ /dev/null
@@ -1,720 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 "SoftAVC"
-#include <utils/Log.h>
-
-#include "SoftAVC.h"
-
-#include <media/stagefright/foundation/ADebug.h>
-#include <media/stagefright/MediaDefs.h>
-#include <media/stagefright/MediaErrors.h>
-#include <media/IOMX.h>
-
-#include "avcdec_api.h"
-#include "avcdec_int.h"
-
-namespace android {
-
-static const char kStartCode[4] = { 0x00, 0x00, 0x00, 0x01 };
-
-static const CodecProfileLevel kProfileLevels[] = {
-    { OMX_VIDEO_AVCProfileBaseline, OMX_VIDEO_AVCLevel1 },
-    { OMX_VIDEO_AVCProfileBaseline, OMX_VIDEO_AVCLevel1b },
-    { OMX_VIDEO_AVCProfileBaseline, OMX_VIDEO_AVCLevel11 },
-    { OMX_VIDEO_AVCProfileBaseline, OMX_VIDEO_AVCLevel12 },
-};
-
-template<class T>
-static void InitOMXParams(T *params) {
-    params->nSize = sizeof(T);
-    params->nVersion.s.nVersionMajor = 1;
-    params->nVersion.s.nVersionMinor = 0;
-    params->nVersion.s.nRevision = 0;
-    params->nVersion.s.nStep = 0;
-}
-
-static int32_t Malloc(void *userData, int32_t size, int32_t attrs) {
-    return reinterpret_cast<int32_t>(malloc(size));
-}
-
-static void Free(void *userData, int32_t ptr) {
-    free(reinterpret_cast<void *>(ptr));
-}
-
-SoftAVC::SoftAVC(
-        const char *name,
-        const OMX_CALLBACKTYPE *callbacks,
-        OMX_PTR appData,
-        OMX_COMPONENTTYPE **component)
-    : SimpleSoftOMXComponent(name, callbacks, appData, component),
-      mHandle(new tagAVCHandle),
-      mInputBufferCount(0),
-      mWidth(160),
-      mHeight(120),
-      mCropLeft(0),
-      mCropTop(0),
-      mCropRight(mWidth - 1),
-      mCropBottom(mHeight - 1),
-      mSPSSeen(false),
-      mPPSSeen(false),
-      mCurrentTimeUs(-1),
-      mEOSStatus(INPUT_DATA_AVAILABLE),
-      mOutputPortSettingsChange(NONE) {
-    initPorts();
-    CHECK_EQ(initDecoder(), (status_t)OK);
-}
-
-SoftAVC::~SoftAVC() {
-    PVAVCCleanUpDecoder(mHandle);
-
-    delete mHandle;
-    mHandle = NULL;
-}
-
-void SoftAVC::initPorts() {
-    OMX_PARAM_PORTDEFINITIONTYPE def;
-    InitOMXParams(&def);
-
-    def.nPortIndex = 0;
-    def.eDir = OMX_DirInput;
-    def.nBufferCountMin = kNumInputBuffers;
-    def.nBufferCountActual = def.nBufferCountMin;
-    def.nBufferSize = 8192;
-    def.bEnabled = OMX_TRUE;
-    def.bPopulated = OMX_FALSE;
-    def.eDomain = OMX_PortDomainVideo;
-    def.bBuffersContiguous = OMX_FALSE;
-    def.nBufferAlignment = 1;
-
-    def.format.video.cMIMEType = const_cast<char *>(MEDIA_MIMETYPE_VIDEO_AVC);
-    def.format.video.pNativeRender = NULL;
-    def.format.video.nFrameWidth = mWidth;
-    def.format.video.nFrameHeight = mHeight;
-    def.format.video.nStride = def.format.video.nFrameWidth;
-    def.format.video.nSliceHeight = def.format.video.nFrameHeight;
-    def.format.video.nBitrate = 0;
-    def.format.video.xFramerate = 0;
-    def.format.video.bFlagErrorConcealment = OMX_FALSE;
-    def.format.video.eCompressionFormat = OMX_VIDEO_CodingAVC;
-    def.format.video.eColorFormat = OMX_COLOR_FormatUnused;
-    def.format.video.pNativeWindow = NULL;
-
-    addPort(def);
-
-    def.nPortIndex = 1;
-    def.eDir = OMX_DirOutput;
-    def.nBufferCountMin = kNumOutputBuffers;
-    def.nBufferCountActual = def.nBufferCountMin;
-    def.bEnabled = OMX_TRUE;
-    def.bPopulated = OMX_FALSE;
-    def.eDomain = OMX_PortDomainVideo;
-    def.bBuffersContiguous = OMX_FALSE;
-    def.nBufferAlignment = 2;
-
-    def.format.video.cMIMEType = const_cast<char *>(MEDIA_MIMETYPE_VIDEO_RAW);
-    def.format.video.pNativeRender = NULL;
-    def.format.video.nFrameWidth = mWidth;
-    def.format.video.nFrameHeight = mHeight;
-    def.format.video.nStride = def.format.video.nFrameWidth;
-    def.format.video.nSliceHeight = def.format.video.nFrameHeight;
-    def.format.video.nBitrate = 0;
-    def.format.video.xFramerate = 0;
-    def.format.video.bFlagErrorConcealment = OMX_FALSE;
-    def.format.video.eCompressionFormat = OMX_VIDEO_CodingUnused;
-    def.format.video.eColorFormat = OMX_COLOR_FormatYUV420Planar;
-    def.format.video.pNativeWindow = NULL;
-
-    def.nBufferSize =
-        (def.format.video.nFrameWidth * def.format.video.nFrameHeight * 3) / 2;
-
-    addPort(def);
-}
-
-status_t SoftAVC::initDecoder() {
-    memset(mHandle, 0, sizeof(tagAVCHandle));
-    mHandle->AVCObject = NULL;
-    mHandle->userData = this;
-    mHandle->CBAVC_DPBAlloc = ActivateSPSWrapper;
-    mHandle->CBAVC_FrameBind = BindFrameWrapper;
-    mHandle->CBAVC_FrameUnbind = UnbindFrame;
-    mHandle->CBAVC_Malloc = Malloc;
-    mHandle->CBAVC_Free = Free;
-
-    return OK;
-}
-
-OMX_ERRORTYPE SoftAVC::internalGetParameter(
-        OMX_INDEXTYPE index, OMX_PTR params) {
-    switch (index) {
-        case OMX_IndexParamVideoPortFormat:
-        {
-            OMX_VIDEO_PARAM_PORTFORMATTYPE *formatParams =
-                (OMX_VIDEO_PARAM_PORTFORMATTYPE *)params;
-
-            if (formatParams->nPortIndex > 1) {
-                return OMX_ErrorUndefined;
-            }
-
-            if (formatParams->nIndex != 0) {
-                return OMX_ErrorNoMore;
-            }
-
-            if (formatParams->nPortIndex == 0) {
-                formatParams->eCompressionFormat = OMX_VIDEO_CodingAVC;
-                formatParams->eColorFormat = OMX_COLOR_FormatUnused;
-                formatParams->xFramerate = 0;
-            } else {
-                CHECK_EQ(formatParams->nPortIndex, 1u);
-
-                formatParams->eCompressionFormat = OMX_VIDEO_CodingUnused;
-                formatParams->eColorFormat = OMX_COLOR_FormatYUV420Planar;
-                formatParams->xFramerate = 0;
-            }
-
-            return OMX_ErrorNone;
-        }
-
-        case OMX_IndexParamVideoProfileLevelQuerySupported:
-        {
-            OMX_VIDEO_PARAM_PROFILELEVELTYPE *profileLevel =
-                    (OMX_VIDEO_PARAM_PROFILELEVELTYPE *) params;
-
-            if (profileLevel->nPortIndex != 0) {  // Input port only
-                LOGE("Invalid port index: %ld", profileLevel->nPortIndex);
-                return OMX_ErrorUnsupportedIndex;
-            }
-
-            size_t index = profileLevel->nProfileIndex;
-            size_t nProfileLevels =
-                    sizeof(kProfileLevels) / sizeof(kProfileLevels[0]);
-            if (index >= nProfileLevels) {
-                return OMX_ErrorNoMore;
-            }
-
-            profileLevel->eProfile = kProfileLevels[index].mProfile;
-            profileLevel->eLevel = kProfileLevels[index].mLevel;
-            return OMX_ErrorNone;
-        }
-
-        default:
-            return SimpleSoftOMXComponent::internalGetParameter(index, params);
-    }
-}
-
-OMX_ERRORTYPE SoftAVC::internalSetParameter(
-        OMX_INDEXTYPE index, const OMX_PTR params) {
-    switch (index) {
-        case OMX_IndexParamStandardComponentRole:
-        {
-            const OMX_PARAM_COMPONENTROLETYPE *roleParams =
-                (const OMX_PARAM_COMPONENTROLETYPE *)params;
-
-            if (strncmp((const char *)roleParams->cRole,
-                        "video_decoder.avc",
-                        OMX_MAX_STRINGNAME_SIZE - 1)) {
-                return OMX_ErrorUndefined;
-            }
-
-            return OMX_ErrorNone;
-        }
-
-        case OMX_IndexParamVideoPortFormat:
-        {
-            OMX_VIDEO_PARAM_PORTFORMATTYPE *formatParams =
-                (OMX_VIDEO_PARAM_PORTFORMATTYPE *)params;
-
-            if (formatParams->nPortIndex > 1) {
-                return OMX_ErrorUndefined;
-            }
-
-            if (formatParams->nIndex != 0) {
-                return OMX_ErrorNoMore;
-            }
-
-            return OMX_ErrorNone;
-        }
-
-        default:
-            return SimpleSoftOMXComponent::internalSetParameter(index, params);
-    }
-}
-
-OMX_ERRORTYPE SoftAVC::getConfig(
-        OMX_INDEXTYPE index, OMX_PTR params) {
-    switch (index) {
-        case OMX_IndexConfigCommonOutputCrop:
-        {
-            OMX_CONFIG_RECTTYPE *rectParams = (OMX_CONFIG_RECTTYPE *)params;
-
-            if (rectParams->nPortIndex != 1) {
-                return OMX_ErrorUndefined;
-            }
-
-            rectParams->nLeft = mCropLeft;
-            rectParams->nTop = mCropTop;
-            rectParams->nWidth = mCropRight - mCropLeft + 1;
-            rectParams->nHeight = mCropBottom - mCropTop + 1;
-
-            return OMX_ErrorNone;
-        }
-
-        default:
-            return OMX_ErrorUnsupportedIndex;
-    }
-}
-
-static void findNALFragment(
-        const OMX_BUFFERHEADERTYPE *inHeader,
-        const uint8_t **fragPtr, size_t *fragSize) {
-    const uint8_t *data = inHeader->pBuffer + inHeader->nOffset;
-
-    size_t size = inHeader->nFilledLen;
-
-    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;
-    }
-}
-
-void SoftAVC::onQueueFilled(OMX_U32 portIndex) {
-    if (mOutputPortSettingsChange != NONE) {
-        return;
-    }
-
-    List<BufferInfo *> &inQueue = getPortQueue(0);
-    List<BufferInfo *> &outQueue = getPortQueue(1);
-
-    if (mEOSStatus == OUTPUT_FRAMES_FLUSHED) {
-        return;
-    }
-
-    while ((mEOSStatus != INPUT_DATA_AVAILABLE || !inQueue.empty())
-            && outQueue.size() == kNumOutputBuffers) {
-        if (mEOSStatus == INPUT_EOS_SEEN) {
-            OMX_BUFFERHEADERTYPE *outHeader;
-            if (drainOutputBuffer(&outHeader)) {
-                List<BufferInfo *>::iterator it = outQueue.begin();
-                while ((*it)->mHeader != outHeader) {
-                    ++it;
-                }
-
-                BufferInfo *outInfo = *it;
-                outInfo->mOwnedByUs = false;
-                outQueue.erase(it);
-                outInfo = NULL;
-
-                notifyFillBufferDone(outHeader);
-                outHeader = NULL;
-                return;
-            }
-
-            BufferInfo *outInfo = *outQueue.begin();
-            outHeader = outInfo->mHeader;
-
-            outHeader->nOffset = 0;
-            outHeader->nFilledLen = 0;
-            outHeader->nFlags = OMX_BUFFERFLAG_EOS;
-            outHeader->nTimeStamp = 0;
-
-            outQueue.erase(outQueue.begin());
-            outInfo->mOwnedByUs = false;
-            notifyFillBufferDone(outHeader);
-
-            mEOSStatus = OUTPUT_FRAMES_FLUSHED;
-            return;
-        }
-
-        BufferInfo *inInfo = *inQueue.begin();
-        OMX_BUFFERHEADERTYPE *inHeader = inInfo->mHeader;
-
-        if (inHeader->nFlags & OMX_BUFFERFLAG_EOS) {
-            inQueue.erase(inQueue.begin());
-            inInfo->mOwnedByUs = false;
-            notifyEmptyBufferDone(inHeader);
-
-            mEOSStatus = INPUT_EOS_SEEN;
-            continue;
-        }
-
-        mCurrentTimeUs = inHeader->nTimeStamp;
-
-        const uint8_t *fragPtr;
-        size_t fragSize;
-        findNALFragment(inHeader, &fragPtr, &fragSize);
-
-        bool releaseFragment;
-        OMX_BUFFERHEADERTYPE *outHeader;
-        status_t err = decodeFragment(
-                fragPtr, fragSize,
-                &releaseFragment, &outHeader);
-
-        if (releaseFragment) {
-            CHECK_GE(inHeader->nFilledLen, fragSize + 4);
-
-            inHeader->nOffset += fragSize + 4;
-            inHeader->nFilledLen -= fragSize + 4;
-
-            if (inHeader->nFilledLen == 0) {
-                inInfo->mOwnedByUs = false;
-                inQueue.erase(inQueue.begin());
-                inInfo = NULL;
-                notifyEmptyBufferDone(inHeader);
-                inHeader = NULL;
-            }
-        }
-
-        if (outHeader != NULL) {
-            List<BufferInfo *>::iterator it = outQueue.begin();
-            while ((*it)->mHeader != outHeader) {
-                ++it;
-            }
-
-            BufferInfo *outInfo = *it;
-            outInfo->mOwnedByUs = false;
-            outQueue.erase(it);
-            outInfo = NULL;
-
-            notifyFillBufferDone(outHeader);
-            outHeader = NULL;
-            return;
-        }
-
-        if (err == INFO_FORMAT_CHANGED) {
-            return;
-        }
-
-        if (err != OK) {
-            notify(OMX_EventError, OMX_ErrorUndefined, err, NULL);
-            return;
-        }
-    }
-}
-
-status_t SoftAVC::decodeFragment(
-        const uint8_t *fragPtr, size_t fragSize,
-        bool *releaseFragment,
-        OMX_BUFFERHEADERTYPE **outHeader) {
-    *releaseFragment = true;
-    *outHeader = NULL;
-
-    int nalType;
-    int nalRefIdc;
-    AVCDec_Status res =
-        PVAVCDecGetNALType(
-                const_cast<uint8_t *>(fragPtr), fragSize,
-                &nalType, &nalRefIdc);
-
-    if (res != AVCDEC_SUCCESS) {
-        LOGV("cannot determine nal type");
-        return ERROR_MALFORMED;
-    }
-
-    if (nalType != AVC_NALTYPE_SPS && nalType != AVC_NALTYPE_PPS
-            && (!mSPSSeen || !mPPSSeen)) {
-        // We haven't seen SPS or PPS yet.
-        return OK;
-    }
-
-    switch (nalType) {
-        case AVC_NALTYPE_SPS:
-        {
-            mSPSSeen = true;
-
-            res = PVAVCDecSeqParamSet(
-                    mHandle, const_cast<uint8_t *>(fragPtr),
-                    fragSize);
-
-            if (res != AVCDEC_SUCCESS) {
-                return ERROR_MALFORMED;
-            }
-
-            AVCDecObject *pDecVid = (AVCDecObject *)mHandle->AVCObject;
-
-            int32_t width =
-                (pDecVid->seqParams[0]->pic_width_in_mbs_minus1 + 1) * 16;
-
-            int32_t height =
-                (pDecVid->seqParams[0]->pic_height_in_map_units_minus1 + 1) * 16;
-
-            int32_t crop_left, crop_right, crop_top, crop_bottom;
-            if (pDecVid->seqParams[0]->frame_cropping_flag)
-            {
-                crop_left = 2 * pDecVid->seqParams[0]->frame_crop_left_offset;
-                crop_right =
-                    width - (2 * pDecVid->seqParams[0]->frame_crop_right_offset + 1);
-
-                if (pDecVid->seqParams[0]->frame_mbs_only_flag)
-                {
-                    crop_top = 2 * pDecVid->seqParams[0]->frame_crop_top_offset;
-                    crop_bottom =
-                        height -
-                        (2 * pDecVid->seqParams[0]->frame_crop_bottom_offset + 1);
-                }
-                else
-                {
-                    crop_top = 4 * pDecVid->seqParams[0]->frame_crop_top_offset;
-                    crop_bottom =
-                        height -
-                        (4 * pDecVid->seqParams[0]->frame_crop_bottom_offset + 1);
-                }
-            } else {
-                crop_bottom = height - 1;
-                crop_right = width - 1;
-                crop_top = crop_left = 0;
-            }
-
-            status_t err = OK;
-
-            if (mWidth != width || mHeight != height) {
-                mWidth = width;
-                mHeight = height;
-
-                updatePortDefinitions();
-
-                notify(OMX_EventPortSettingsChanged, 1, 0, NULL);
-                mOutputPortSettingsChange = AWAITING_DISABLED;
-
-                err = INFO_FORMAT_CHANGED;
-            }
-
-            if (mCropLeft != crop_left
-                    || mCropTop != crop_top
-                    || mCropRight != crop_right
-                    || mCropBottom != crop_bottom) {
-                mCropLeft = crop_left;
-                mCropTop = crop_top;
-                mCropRight = crop_right;
-                mCropBottom = crop_bottom;
-
-                notify(OMX_EventPortSettingsChanged,
-                       1,
-                       OMX_IndexConfigCommonOutputCrop,
-                       NULL);
-            }
-
-            return err;
-        }
-
-        case AVC_NALTYPE_PPS:
-        {
-            mPPSSeen = true;
-
-            res = PVAVCDecPicParamSet(
-                    mHandle, const_cast<uint8_t *>(fragPtr),
-                    fragSize);
-
-            if (res != AVCDEC_SUCCESS) {
-                LOGV("PVAVCDecPicParamSet returned error %d", res);
-                return ERROR_MALFORMED;
-            }
-
-            return OK;
-        }
-
-        case AVC_NALTYPE_SLICE:
-        case AVC_NALTYPE_IDR:
-        {
-            res = PVAVCDecodeSlice(
-                    mHandle, const_cast<uint8_t *>(fragPtr),
-                    fragSize);
-
-            if (res == AVCDEC_PICTURE_OUTPUT_READY) {
-                *releaseFragment = false;
-
-                if (!drainOutputBuffer(outHeader)) {
-                    return UNKNOWN_ERROR;
-                }
-
-                return OK;
-            }
-
-            if (res == AVCDEC_PICTURE_READY || res == AVCDEC_SUCCESS) {
-                return OK;
-            } else {
-                LOGV("PVAVCDecodeSlice returned error %d", res);
-                return ERROR_MALFORMED;
-            }
-        }
-
-        case AVC_NALTYPE_SEI:
-        {
-            res = PVAVCDecSEI(
-                    mHandle, const_cast<uint8_t *>(fragPtr),
-                    fragSize);
-
-            if (res != AVCDEC_SUCCESS) {
-                return ERROR_MALFORMED;
-            }
-
-            return OK;
-        }
-
-        case AVC_NALTYPE_AUD:
-        case AVC_NALTYPE_FILL:
-        case AVC_NALTYPE_EOSEQ:
-        {
-            return OK;
-        }
-
-        default:
-        {
-            LOGE("Should not be here, unknown nalType %d", nalType);
-
-            return ERROR_MALFORMED;
-        }
-    }
-
-    return OK;
-}
-
-bool SoftAVC::drainOutputBuffer(OMX_BUFFERHEADERTYPE **outHeader) {
-    int32_t index;
-    int32_t Release;
-    AVCFrameIO Output;
-    Output.YCbCr[0] = Output.YCbCr[1] = Output.YCbCr[2] = NULL;
-    AVCDec_Status status =
-        PVAVCDecGetOutput(mHandle, &index, &Release, &Output);
-
-    if (status != AVCDEC_SUCCESS) {
-        return false;
-    }
-
-    PortInfo *port = editPortInfo(1);
-    CHECK_GE(index, 0);
-    CHECK_LT((size_t)index, port->mBuffers.size());
-    CHECK(port->mBuffers.editItemAt(index).mOwnedByUs);
-
-    *outHeader = port->mBuffers.editItemAt(index).mHeader;
-    (*outHeader)->nOffset = 0;
-    (*outHeader)->nFilledLen = port->mDef.nBufferSize;
-    (*outHeader)->nFlags = 0;
-
-    return true;
-}
-
-void SoftAVC::onPortFlushCompleted(OMX_U32 portIndex) {
-    if (portIndex == 0) {
-        PVAVCDecReset(mHandle);
-
-        mEOSStatus = INPUT_DATA_AVAILABLE;
-    }
-}
-
-void SoftAVC::onPortEnableCompleted(OMX_U32 portIndex, bool enabled) {
-    if (portIndex != 1) {
-        return;
-    }
-
-    switch (mOutputPortSettingsChange) {
-        case NONE:
-            break;
-
-        case AWAITING_DISABLED:
-        {
-            CHECK(!enabled);
-            mOutputPortSettingsChange = AWAITING_ENABLED;
-            break;
-        }
-
-        default:
-        {
-            CHECK_EQ((int)mOutputPortSettingsChange, (int)AWAITING_ENABLED);
-            CHECK(enabled);
-            mOutputPortSettingsChange = NONE;
-            break;
-        }
-    }
-}
-
-void SoftAVC::updatePortDefinitions() {
-    OMX_PARAM_PORTDEFINITIONTYPE *def = &editPortInfo(0)->mDef;
-    def->format.video.nFrameWidth = mWidth;
-    def->format.video.nFrameHeight = mHeight;
-    def->format.video.nStride = def->format.video.nFrameWidth;
-    def->format.video.nSliceHeight = def->format.video.nFrameHeight;
-
-    def = &editPortInfo(1)->mDef;
-    def->format.video.nFrameWidth = mWidth;
-    def->format.video.nFrameHeight = mHeight;
-    def->format.video.nStride = def->format.video.nFrameWidth;
-    def->format.video.nSliceHeight = def->format.video.nFrameHeight;
-
-    def->nBufferSize =
-        (def->format.video.nFrameWidth
-            * def->format.video.nFrameHeight * 3) / 2;
-}
-
-// static
-int32_t SoftAVC::ActivateSPSWrapper(
-        void *userData, unsigned int sizeInMbs, unsigned int numBuffers) {
-    return static_cast<SoftAVC *>(userData)->activateSPS(sizeInMbs, numBuffers);
-}
-
-// static
-int32_t SoftAVC::BindFrameWrapper(
-        void *userData, int32_t index, uint8_t **yuv) {
-    return static_cast<SoftAVC *>(userData)->bindFrame(index, yuv);
-}
-
-// static
-void SoftAVC::UnbindFrame(void *userData, int32_t index) {
-}
-
-int32_t SoftAVC::activateSPS(
-        unsigned int sizeInMbs, unsigned int numBuffers) {
-    PortInfo *port = editPortInfo(1);
-    CHECK_GE(port->mBuffers.size(), numBuffers);
-    CHECK_GE(port->mDef.nBufferSize, (sizeInMbs << 7) * 3);
-
-    return 1;
-}
-
-int32_t SoftAVC::bindFrame(int32_t index, uint8_t **yuv) {
-    PortInfo *port = editPortInfo(1);
-
-    CHECK_GE(index, 0);
-    CHECK_LT((size_t)index, port->mBuffers.size());
-
-    BufferInfo *outBuffer =
-        &port->mBuffers.editItemAt(index);
-
-    CHECK(outBuffer->mOwnedByUs);
-
-    outBuffer->mHeader->nTimeStamp = mCurrentTimeUs;
-    *yuv = outBuffer->mHeader->pBuffer;
-
-    return 1;
-}
-
-}  // namespace android
-
-android::SoftOMXComponent *createSoftOMXComponent(
-        const char *name, const OMX_CALLBACKTYPE *callbacks,
-        OMX_PTR appData, OMX_COMPONENTTYPE **component) {
-    return new android::SoftAVC(name, callbacks, appData, component);
-}
diff --git a/media/libstagefright/codecs/avc/dec/SoftAVC.h b/media/libstagefright/codecs/avc/dec/SoftAVC.h
deleted file mode 100644 (file)
index 1594b4d..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 SOFT_AVC_H_
-
-#define SOFT_AVC_H_
-
-#include "SimpleSoftOMXComponent.h"
-
-struct tagAVCHandle;
-
-namespace android {
-
-struct SoftAVC : public SimpleSoftOMXComponent {
-    SoftAVC(const char *name,
-            const OMX_CALLBACKTYPE *callbacks,
-            OMX_PTR appData,
-            OMX_COMPONENTTYPE **component);
-
-protected:
-    virtual ~SoftAVC();
-
-    virtual OMX_ERRORTYPE internalGetParameter(
-            OMX_INDEXTYPE index, OMX_PTR params);
-
-    virtual OMX_ERRORTYPE internalSetParameter(
-            OMX_INDEXTYPE index, const OMX_PTR params);
-
-    virtual OMX_ERRORTYPE getConfig(OMX_INDEXTYPE index, OMX_PTR params);
-
-    virtual void onQueueFilled(OMX_U32 portIndex);
-    virtual void onPortFlushCompleted(OMX_U32 portIndex);
-    virtual void onPortEnableCompleted(OMX_U32 portIndex, bool enabled);
-
-private:
-    enum {
-        kNumInputBuffers  = 4,
-        kNumOutputBuffers = 18,
-    };
-
-    enum EOSStatus {
-        INPUT_DATA_AVAILABLE,
-        INPUT_EOS_SEEN,
-        OUTPUT_FRAMES_FLUSHED,
-    };
-
-    tagAVCHandle *mHandle;
-
-    size_t mInputBufferCount;
-
-    int32_t mWidth, mHeight;
-    int32_t mCropLeft, mCropTop, mCropRight, mCropBottom;
-
-    bool mSPSSeen, mPPSSeen;
-
-    int64_t mCurrentTimeUs;
-
-    EOSStatus mEOSStatus;
-
-    enum {
-        NONE,
-        AWAITING_DISABLED,
-        AWAITING_ENABLED
-    } mOutputPortSettingsChange;
-
-    void initPorts();
-    status_t initDecoder();
-
-    status_t decodeFragment(
-            const uint8_t *fragPtr, size_t fragSize,
-            bool *releaseFrames,
-            OMX_BUFFERHEADERTYPE **outHeader);
-
-    void updatePortDefinitions();
-    bool drainOutputBuffer(OMX_BUFFERHEADERTYPE **outHeader);
-
-    static int32_t ActivateSPSWrapper(
-            void *userData, unsigned int sizeInMbs, unsigned int numBuffers);
-
-    static int32_t BindFrameWrapper(
-            void *userData, int32_t index, uint8_t **yuv);
-
-    static void UnbindFrame(void *userData, int32_t index);
-
-    int32_t activateSPS(
-            unsigned int sizeInMbs, unsigned int numBuffers);
-
-    int32_t bindFrame(int32_t index, uint8_t **yuv);
-
-    DISALLOW_EVIL_CONSTRUCTORS(SoftAVC);
-};
-
-}  // namespace android
-
-#endif  // SOFT_AVC_H_
-
diff --git a/media/libstagefright/codecs/avc/dec/include/avcdec_api.h b/media/libstagefright/codecs/avc/dec/include/avcdec_api.h
deleted file mode 100644 (file)
index f6a14b7..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-/* ------------------------------------------------------------------
- * 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 decoder library
-and necessary type defitionitions and enumerations.
-@publishedAll
-*/
-
-#ifndef _AVCDEC_API_H_
-#define _AVCDEC_API_H_
-
-#include "avcapi_common.h"
-
-/**
- This enumeration is used for the status returned from the library interface.
-*/
-typedef enum
-{
-    /**
-    The followings are fail with details. Their values are negative.
-    */
-    AVCDEC_NO_DATA = -4,
-    AVCDEC_PACKET_LOSS = -3,
-    /**
-    Fail information
-    */
-    AVCDEC_NO_BUFFER = -2, /* no output picture buffer available */
-    AVCDEC_MEMORY_FAIL = -1, /* memory allocation failed */
-    AVCDEC_FAIL = 0,
-    /**
-    Generic success value
-    */
-    AVCDEC_SUCCESS = 1,
-    AVCDEC_PICTURE_OUTPUT_READY = 2,
-    AVCDEC_PICTURE_READY = 3,
-
-    /**
-    The followings are success with warnings. Their values are positive integers.
-    */
-    AVCDEC_NO_NEXT_SC = 4,
-    AVCDEC_REDUNDANT_FRAME = 5,
-    AVCDEC_CONCEALED_FRAME = 6  /* detect and conceal the error */
-} AVCDec_Status;
-
-
-/**
-This structure contains sequence parameters information.
-*/
-typedef struct tagAVCDecSPSInfo
-{
-    int FrameWidth;
-    int FrameHeight;
-    uint frame_only_flag;
-    int  frame_crop_left;
-    int  frame_crop_right;
-    int  frame_crop_top;
-    int  frame_crop_bottom;
-
-} AVCDecSPSInfo;
-
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-    /** THE FOLLOWINGS ARE APIS */
-    /**
-    This function parses one NAL unit from byte stream format input according to Annex B.
-    \param "bitstream"  "Pointer to the bitstream buffer."
-    \param "nal_unit"   "Point to pointer and the location of the start of the first NAL unit
-                         found in bitstream."
-    \param "size"       "As input, the pointer to the size of bitstream in bytes. As output,
-                         the value is changed to be the size of the found NAL unit."
-    \return "AVCDEC_SUCCESS if success, AVCDEC_FAIL if no first start code is found, AVCDEC_NO_NEX_SC if
-            the first start code is found, but the second start code is missing (potential partial NAL)."
-    */
-    OSCL_IMPORT_REF AVCDec_Status PVAVCAnnexBGetNALUnit(uint8 *bitstream, uint8 **nal_unit, int *size);
-
-    /**
-    This function sniffs the nal_unit_type such that users can call corresponding APIs.
-    \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 "AVCDEC_SUCCESS if success, AVCDEC_FAIL otherwise."
-    */
-    OSCL_IMPORT_REF AVCDec_Status PVAVCDecGetNALType(uint8 *bitstream, int size, int *nal_type, int *nal_ref_idc);
-
-    /**
-    This function decodes the sequence parameters set, initializes related parameters and
-    allocates memory (reference frames list), must also be compliant with Annex A.
-    It is equivalent to decode VOL header of MPEG4.
-    \param "avcHandle"  "Handle to the AVC decoder library object."
-    \param "nal_unit"   "Pointer to the buffer containing single NAL unit.
-                        The content will change due to EBSP-to-RBSP conversion."
-    \param "nal_size"       "size of the bitstream NumBytesInNALunit."
-    \return "AVCDEC_SUCCESS if success,
-            AVCDEC_FAIL if profile and level is not supported,
-            AVCDEC_MEMORY_FAIL if memory allocations return null."
-    */
-    OSCL_IMPORT_REF AVCDec_Status PVAVCDecSeqParamSet(AVCHandle *avcHandle, uint8 *nal_unit, int nal_size);
-
-    /**
-    This function returns sequence parameters such as dimension and field flag of the most recently
-    decoded SPS. More can be added later or grouped together into a structure. This API can be called
-    after PVAVCInitSequence. If no sequence parameter has been decoded yet, it will return AVCDEC_FAIL.
-
-    \param "avcHandle"  "Handle to the AVC decoder library object."
-    \param "seqInfo"    "Pointer to the AVCDecSeqParamInfo structure."
-    \return "AVCDEC_SUCCESS if success and AVCDEC_FAIL if fail."
-    \note "This API can be combined with PVAVCInitSequence if wanted to be consistent with m4vdec lib."
-    */
-    OSCL_IMPORT_REF AVCDec_Status PVAVCDecGetSeqInfo(AVCHandle *avcHandle, AVCDecSPSInfo *seqInfo);
-
-    /**
-    This function decodes the picture parameters set and initializes related parameters. Note thate
-    the PPS may not be present for every picture.
-    \param "avcHandle"  "Handle to the AVC decoder library object."
-    \param "nal_unit"   "Pointer to the buffer containing single NAL unit.
-                        The content will change due to EBSP-to-RBSP conversion."
-    \param "nal_size"       "size of the bitstream NumBytesInNALunit."
-    \return "AVCDEC_SUCCESS if success, AVCDEC_FAIL if profile and level is not supported."
-    */
-    OSCL_IMPORT_REF AVCDec_Status PVAVCDecPicParamSet(AVCHandle *avcHandle, uint8 *nal_unit, int nal_size);
-
-    /**
-    This function decodes one NAL unit of bitstream. The type of nal unit is one of the
-    followings, 1, 5. (for now, no data partitioning, type 2,3,4).
-    \param "avcHandle"  "Handle to the AVC decoder library object."
-    \param "nal_unit"   "Pointer to the buffer containing a single or partial NAL unit.
-                        The content will change due to EBSP-to-RBSP conversion."
-    \param "buf_size"   "Size of the buffer (less than or equal nal_size)."
-    \param "nal_size"   "size of the current NAL unit NumBytesInNALunit."
-    \return "AVCDEC_PICTURE_READY for success and an output is ready,
-            AVCDEC_SUCCESS for success but no output is ready,
-            AVCDEC_PACKET_LOSS is GetData returns AVCDEC_PACKET_LOSS,
-            AVCDEC_FAIL if syntax error is detected,
-            AVCDEC_MEMORY_FAIL if memory is corrupted.
-            AVCDEC_NO_PICTURE if no frame memory to write to (users need to get output and/or return picture).
-            AVCDEC_REDUNDANT_PICTURE if error has been detected in the primary picture and redundant picture is available,
-            AVCDEC_CONCEALED_PICTURE if error has been detected and decoder has concealed it."
-    */
-    OSCL_IMPORT_REF AVCDec_Status PVAVCDecSEI(AVCHandle *avcHandle, uint8 *nal_unit, int nal_size);
-
-    OSCL_IMPORT_REF AVCDec_Status PVAVCDecodeSlice(AVCHandle *avcHandle, uint8 *buffer, int buf_size);
-
-    /**
-    Check the availability of the decoded picture in decoding order (frame_num).
-    The AVCFrameIO also provide displaying order information such that the application
-    can re-order the frame for display. A picture can be retrieved only once.
-    \param "avcHandle"  "Handle to the AVC decoder library object."
-    \param "output"      "Pointer to the AVCOutput structure. Note that decoder library will
-                        not re-used the pixel memory in this structure until it has been returned
-                        thru PVAVCReleaseOutput API."
-    \return "AVCDEC_SUCCESS for success, AVCDEC_FAIL if no picture is available to be displayed,
-            AVCDEC_PICTURE_READY if there is another picture to be displayed."
-    */
-    OSCL_IMPORT_REF AVCDec_Status PVAVCDecGetOutput(AVCHandle *avcHandle, int *indx, int *release_flag, AVCFrameIO *output);
-
-    /**
-    This function resets the decoder and expects to see the next IDR slice.
-    \param "avcHandle"  "Handle to the AVC decoder library object."
-    */
-    OSCL_IMPORT_REF void    PVAVCDecReset(AVCHandle *avcHandle);
-
-    /**
-    This function performs clean up operation including memory deallocation.
-    \param "avcHandle"  "Handle to the AVC decoder library object."
-    */
-    OSCL_IMPORT_REF void    PVAVCCleanUpDecoder(AVCHandle *avcHandle);
-//AVCDec_Status EBSPtoRBSP(uint8 *nal_unit,int *size);
-
-
-
-    /** CALLBACK FUNCTION TO BE IMPLEMENTED BY APPLICATION */
-    /** In AVCHandle structure, userData is a pointer to an object with the following
-        member functions.
-    */
-    AVCDec_Status CBAVCDec_GetData(uint32 *userData, unsigned char **buffer, unsigned int *size);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _AVCDEC_API_H_ */
-
diff --git a/media/libstagefright/codecs/avc/dec/include/pvavcdecoder.h b/media/libstagefright/codecs/avc/dec/include/pvavcdecoder.h
deleted file mode 100644 (file)
index 6b196de..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/* ------------------------------------------------------------------
- * 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 PVAVCDECODER_H_INCLUDED
-#define PVAVCDECODER_H_INCLUDED
-
-#ifndef PVAVCDECODERINTERFACE_H_INCLUDED
-#include "pvavcdecoderinterface.h"
-#endif
-
-// AVC video decoder
-class PVAVCDecoder : public PVAVCDecoderInterface
-{
-    public:
-        virtual ~PVAVCDecoder();
-        static  PVAVCDecoder* New(void);
-        virtual bool    InitAVCDecoder(FunctionType_SPS, FunctionType_Alloc, FunctionType_Unbind,
-                                       FunctionType_Malloc, FunctionType_Free, void *);
-        virtual void    CleanUpAVCDecoder(void);
-        virtual void    ResetAVCDecoder(void);
-        virtual int32   DecodeSPS(uint8 *bitstream, int32 buffer_size);
-        virtual int32   DecodePPS(uint8 *bitstream, int32 buffer_size);
-        virtual int32   DecodeAVCSlice(uint8 *bitstream, int32 *buffer_size);
-        virtual bool    GetDecOutput(int *indx, int *release);
-        virtual void    GetVideoDimensions(int32 *width, int32 *height, int32 *top, int32 *left, int32 *bottom, int32 *right);
-        int     AVC_Malloc(int32 size, int attribute);
-        void    AVC_Free(int mem);
-
-    private:
-        PVAVCDecoder();
-        bool Construct(void);
-        void *iAVCHandle;
-};
-
-#endif
diff --git a/media/libstagefright/codecs/avc/dec/include/pvavcdecoderinterface.h b/media/libstagefright/codecs/avc/dec/include/pvavcdecoderinterface.h
deleted file mode 100644 (file)
index 027212d..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/* ------------------------------------------------------------------
- * 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 PVAVCDECODERINTERFACE_H_INCLUDED
-#define PVAVCDECODERINTERFACE_H_INCLUDED
-
-typedef void (*FunctionType_Unbind)(void *, int);
-typedef int (*FunctionType_Alloc)(void *, int, uint8 **);
-typedef int (*FunctionType_SPS)(void *, uint, uint);
-typedef int (*FunctionType_Malloc)(void *, int32, int);
-typedef void(*FunctionType_Free)(void *, int);
-
-
-// PVAVCDecoderInterface pure virtual interface class
-class PVAVCDecoderInterface
-{
-    public:
-        virtual ~PVAVCDecoderInterface() {};
-        virtual bool    InitAVCDecoder(FunctionType_SPS, FunctionType_Alloc, FunctionType_Unbind,
-                                       FunctionType_Malloc, FunctionType_Free, void *) = 0;
-        virtual void    CleanUpAVCDecoder(void) = 0;
-        virtual void    ResetAVCDecoder(void) = 0;
-        virtual int32   DecodeSPS(uint8 *bitstream, int32 buffer_size) = 0;
-        virtual int32   DecodePPS(uint8 *bitstream, int32 buffer_size) = 0;
-        virtual int32   DecodeAVCSlice(uint8 *bitstream, int32 *buffer_size) = 0;
-        virtual bool    GetDecOutput(int *indx, int *release) = 0;
-        virtual void    GetVideoDimensions(int32 *width, int32 *height, int32 *top, int32 *left, int32 *bottom, int32 *right) = 0;
-//  virtual int     AVC_Malloc(int32 size, int attribute);
-//  virtual void    AVC_Free(int mem);
-};
-
-#endif // PVAVCDECODERINTERFACE_H_INCLUDED
-
-
diff --git a/media/libstagefright/codecs/avc/dec/src/avc_bitstream.cpp b/media/libstagefright/codecs/avc/dec/src/avc_bitstream.cpp
deleted file mode 100644 (file)
index 270b664..0000000
+++ /dev/null
@@ -1,276 +0,0 @@
-/* ------------------------------------------------------------------
- * 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 "avcdec_bitstream.h"
-
-/* Swapping may not be needed anymore since we read one byte at a time and perform
-EBSP to RBSP conversion in bitstream. */
-#ifdef LITTLE_ENDIAN
-#if (WORD_SIZE==32)  /* this can be replaced with assembly instructions */
-#define SWAP_BYTES(x) ((((x)&0xFF)<<24) | (((x)&0xFF00)<<8) | (((x)&0xFF0000)>>8) | (((x)&0xFF000000)>>24))
-#else  /* for 16-bit */
-#define SWAP_BYTES(x) ((((x)&0xFF)<<8) | (((x)&0xFF00)>>8))
-#endif
-#else
-#define SWAP_BYTES(x) (x)
-#endif
-
-
-/* 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   : AVCDEC_SUCCESS if successed, AVCDEC_FAIL if failed.              */
-/*  Modified :                                                              */
-/* ======================================================================== */
-/* |--------|--------|----~~~~~-----|---------|---------|---------|
-   ^                                          ^read_pos           ^data_end_pos
-   bitstreamBuffer                  <--------->
-                                    current_word
-
-   |xxxxxxxxxxxxx----|  = current_word 32 or 16 bits
-    <------------>
-     bit_left
- ======================================================================== */
-
-
-/* ======================================================================== */
-/*  Function : BitstreamNextWord()                                          */
-/*  Date     : 12/4/2003                                                    */
-/*  Purpose  : Read up to machine word.                                     */
-/*  In/out   :                                                              */
-/*  Return   : Next word with emulation prevention code removed. Everything
-    in the bitstream structure got modified except current_word             */
-/*  Modified :                                                              */
-/* ======================================================================== */
-
-AVCDec_Status BitstreamInit(AVCDecBitstream *stream, uint8 *buffer, int size)
-{
-    EBSPtoRBSP(buffer, &size);
-
-    stream->incnt = 0;
-    stream->incnt_next = 0;
-    stream->bitcnt = 0;
-    stream->curr_word = stream->next_word = 0;
-    stream->read_pos = 0;
-
-    stream->bitstreamBuffer = buffer;
-
-    stream->data_end_pos = size;
-
-    stream->nal_size = size;
-
-    return AVCDEC_SUCCESS;
-}
-/* ======================================================================== */
-/*  Function : AVC_BitstreamFillCache()                                         */
-/*  Date     : 1/1/2005                                                     */
-/*  Purpose  : Read up to machine word.                                     */
-/*  In/out   :                                                              */
-/*  Return   : Read in 4 bytes of input data                                */
-/*  Modified :                                                              */
-/* ======================================================================== */
-
-AVCDec_Status AVC_BitstreamFillCache(AVCDecBitstream *stream)
-{
-    uint8 *bitstreamBuffer = stream->bitstreamBuffer;
-    uint8 *v;
-    int num_bits, i;
-
-    stream->curr_word |= (stream->next_word >> stream->incnt);   // stream->incnt cannot be 32
-    stream->next_word <<= (31 - stream->incnt);
-    stream->next_word <<= 1;
-    num_bits = stream->incnt_next + stream->incnt;
-    if (num_bits >= 32)
-    {
-        stream->incnt_next -= (32 - stream->incnt);
-        stream->incnt = 32;
-        return AVCDEC_SUCCESS;
-    }
-    /* this check can be removed if there is additional extra 4 bytes at the end of the bitstream */
-    v = bitstreamBuffer + stream->read_pos;
-
-    if (stream->read_pos > stream->data_end_pos - 4)
-    {
-        if (stream->data_end_pos <= stream->read_pos)
-        {
-            stream->incnt = num_bits;
-            stream->incnt_next = 0;
-            return AVCDEC_SUCCESS;
-        }
-
-        stream->next_word = 0;
-
-        for (i = 0; i < stream->data_end_pos - stream->read_pos; i++)
-        {
-            stream->next_word |= (v[i] << ((3 - i) << 3));
-        }
-
-        stream->read_pos = stream->data_end_pos;
-        stream->curr_word |= (stream->next_word >> num_bits); // this is safe
-
-        stream->next_word <<= (31 - num_bits);
-        stream->next_word <<= 1;
-        num_bits = i << 3;
-        stream->incnt += stream->incnt_next;
-        stream->incnt_next = num_bits - (32 - stream->incnt);
-        if (stream->incnt_next < 0)
-        {
-            stream->incnt +=  num_bits;
-            stream->incnt_next = 0;
-        }
-        else
-        {
-            stream->incnt = 32;
-        }
-        return AVCDEC_SUCCESS;
-    }
-
-    stream->next_word = ((uint32)v[0] << 24) | (v[1] << 16) | (v[2] << 8) | v[3];
-    stream->read_pos += 4;
-
-    stream->curr_word |= (stream->next_word >> num_bits); // this is safe
-    stream->next_word <<= (31 - num_bits);
-    stream->next_word <<= 1;
-    stream->incnt_next += stream->incnt;
-    stream->incnt = 32;
-    return AVCDEC_SUCCESS;
-
-}
-/* ======================================================================== */
-/*  Function : BitstreamReadBits()                                          */
-/*  Date     : 11/4/2003                                                    */
-/*  Purpose  : Read up to machine word.                                     */
-/*  In/out   :                                                              */
-/*  Return   : AVCDEC_SUCCESS if successed, AVCDEC_FAIL if number of bits   */
-/*              is greater than the word-size, AVCDEC_PACKET_LOSS or        */
-/*              AVCDEC_NO_DATA if callback to get data fails.               */
-/*  Modified :                                                              */
-/* ======================================================================== */
-AVCDec_Status BitstreamReadBits(AVCDecBitstream *stream, int nBits, uint *code)
-{
-    if (stream->incnt < nBits)
-    {
-        /* frame-based decoding */
-        AVC_BitstreamFillCache(stream);
-    }
-    *code = stream->curr_word >> (32 - nBits);
-    BitstreamFlushBits(stream, nBits);
-    return AVCDEC_SUCCESS;
-}
-
-
-
-/* ======================================================================== */
-/*  Function : BitstreamShowBits()                                          */
-/*  Date     : 11/4/2003                                                    */
-/*  Purpose  : Show up to machine word without advancing the pointer.       */
-/*  In/out   :                                                              */
-/*  Return   : AVCDEC_SUCCESS if successed, AVCDEC_FAIL if number of bits   */
-/*              is greater than the word-size, AVCDEC_NO_DATA if it needs   */
-/*              to callback to get data.                                    */
-/*  Modified :                                                              */
-/* ======================================================================== */
-AVCDec_Status BitstreamShowBits(AVCDecBitstream *stream, int nBits, uint *code)
-{
-    if (stream->incnt < nBits)
-    {
-        /* frame-based decoding */
-        AVC_BitstreamFillCache(stream);
-    }
-
-    *code = stream->curr_word >> (32 - nBits);
-
-    return AVCDEC_SUCCESS;
-}
-
-/* ======================================================================== */
-/*  Function : BitstreamRead1Bit()                                          */
-/*  Date     : 11/4/2003                                                    */
-/*  Purpose  : Read 1 bit from the bitstream.                               */
-/*  In/out   :                                                              */
-/*  Return   : AVCDEC_SUCCESS if successed, AVCDEC_FAIL if number of bits   */
-/*              is greater than the word-size, AVCDEC_PACKET_LOSS or        */
-/*              AVCDEC_NO_DATA if callback to get data fails.               */
-/*  Modified :                                                              */
-/* ======================================================================== */
-
-AVCDec_Status BitstreamRead1Bit(AVCDecBitstream *stream, uint *code)
-{
-    if (stream->incnt < 1)
-    {
-        /* frame-based decoding */
-        AVC_BitstreamFillCache(stream);
-    }
-    *code = stream->curr_word >> 31;
-    BitstreamFlushBits(stream, 1);
-    return AVCDEC_SUCCESS;
-}
-
-
-
-AVCDec_Status BitstreamByteAlign(AVCDecBitstream  *stream)
-{
-    uint n_stuffed;
-
-    n_stuffed = (8 - (stream->bitcnt & 0x7)) & 0x7; /*  07/05/01 */
-
-    stream->bitcnt += n_stuffed;
-    stream->incnt -= n_stuffed;
-
-    if (stream->incnt < 0)
-    {
-        stream->bitcnt += stream->incnt;
-        stream->incnt = 0;
-    }
-    stream->curr_word <<= n_stuffed;
-    return AVCDEC_SUCCESS;
-}
-
-/* check whether there are more RBSP data. */
-/* ignore the emulation prevention code, assume it has been taken out. */
-bool more_rbsp_data(AVCDecBitstream *stream)
-{
-    int total_bit_left;
-    uint code;
-
-    if (stream->read_pos >= stream->nal_size)
-    {
-        total_bit_left = stream->incnt_next + stream->incnt;
-        if (total_bit_left <= 0)
-        {
-            return FALSE;
-        }
-        else if (total_bit_left <= 8)
-        {
-            BitstreamShowBits(stream, total_bit_left, &code);
-            if (code == trailing_bits[total_bit_left])
-            {
-                return FALSE;
-            }
-        }
-    }
-
-    return TRUE;
-}
-
diff --git a/media/libstagefright/codecs/avc/dec/src/avcdec_api.cpp b/media/libstagefright/codecs/avc/dec/src/avcdec_api.cpp
deleted file mode 100644 (file)
index 0a75f17..0000000
+++ /dev/null
@@ -1,1036 +0,0 @@
-/* ------------------------------------------------------------------
- * 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 decoder library.
-@publishedAll
-*/
-
-#include <string.h>
-
-#include "avcdec_api.h"
-#include "avcdec_lib.h"
-#include "avcdec_bitstream.h"
-
-/* ======================================================================== */
-/*  Function : EBSPtoRBSP()                                                 */
-/*  Date     : 11/4/2003                                                    */
-/*  Purpose  : Convert EBSP to RBSP and overwrite it.                       */
-/*             Assuming that forbidden_zero, nal_ref_idc and nal_unit_type  */
-/*          (first byte), has been taken out of the nal_unit.               */
-/*  In/out   :                                                              */
-/*  Return   :                                                              */
-/*  Modified :                                                              */
-/* ======================================================================== */
-/**
-@pseudocode "
-    NumBytesInRBSP = 0;
-    for(i=0:i< *size; i++){
-        if(i+2 < *size && next_bits(24)==0x000003){
-            rbsp_byte[NumBytesInRBSP++];
-            rbsp_byte[NumBytesInRBSP++];
-            i+=2;
-            emulation_prevention_three_byte (0x03)
-        }
-        else
-            rbsp_byte[NumBytesInRBSP++];
-    }"
-*/
-AVCDec_Status EBSPtoRBSP(uint8 *nal_unit, int *size)
-{
-    int i, j;
-    int count = 0;
-
-    /* This code is based on EBSPtoRBSP of JM */
-    j = 0;
-
-    for (i = 0; i < *size; i++)
-    {
-        if (count == 2 && nal_unit[i] == 0x03)
-        {
-            i++;
-            count = 0;
-        }
-        nal_unit[j] = nal_unit[i];
-        if (nal_unit[i] == 0x00)
-            count++;
-        else
-            count = 0;
-        j++;
-    }
-
-    *size = j;
-
-    return AVCDEC_SUCCESS;
-}
-
-/* ======================================================================== */
-/*  Function : PVAVCAnnexBGetNALUnit()                                      */
-/*  Date     : 11/3/2003                                                    */
-/*  Purpose  : Parse a NAL from byte stream format.                         */
-/*  In/out   :                                                              */
-/*  Return   : AVCDEC_SUCCESS if succeed, AVC_FAIL if fail.                 */
-/*  Modified :                                                              */
-/* ======================================================================== */
-/**
-@pseudocode "
-    byte_stream_nal_unit(NumBytesInNalunit){
-    while(next_bits(24) != 0x000001)
-        zero_byte
-    if(more_data_in_byte_stream()){
-        start_code_prefix_one_3bytes // equal 0x000001
-        nal_unit(NumBytesInNALunit)
-    }
-   }"
-*/
-OSCL_EXPORT_REF AVCDec_Status PVAVCAnnexBGetNALUnit(uint8 *bitstream, uint8 **nal_unit,
-        int *size)
-{
-    int i, j, FoundStartCode = 0;
-    int end;
-
-    i = 0;
-    while (bitstream[i] == 0 && i < *size)
-    {
-        i++;
-    }
-    if (i >= *size)
-    {
-        *nal_unit = bitstream;
-        return AVCDEC_FAIL; /* cannot find any start_code_prefix. */
-    }
-    else if (bitstream[i] != 0x1)
-    {
-        i = -1;  /* start_code_prefix is not at the beginning, continue */
-    }
-
-    i++;
-    *nal_unit = bitstream + i; /* point to the beginning of the NAL unit */
-
-    j = end = i;
-    while (!FoundStartCode)
-    {
-        while ((j + 1 < *size) && (bitstream[j] != 0 || bitstream[j+1] != 0))  /* see 2 consecutive zero bytes */
-        {
-            j++;
-        }
-        end = j;   /* stop and check for start code */
-        while (j + 2 < *size && bitstream[j+2] == 0) /* keep reading for zero byte */
-        {
-            j++;
-        }
-        if (j + 2 >= *size)
-        {
-            *size -= i;
-            return AVCDEC_NO_NEXT_SC;  /* cannot find the second start_code_prefix */
-        }
-        if (bitstream[j+2] == 0x1)
-        {
-            FoundStartCode = 1;
-        }
-        else
-        {
-            /* could be emulation code 0x3 */
-            j += 2; /* continue the search */
-        }
-    }
-
-    *size = end - i;
-
-    return AVCDEC_SUCCESS;
-}
-
-/* ======================================================================== */
-/*  Function : PVAVCGetNALType()                                            */
-/*  Date     : 11/4/2003                                                    */
-/*  Purpose  : Sniff NAL type from the bitstream                            */
-/*  In/out   :                                                              */
-/*  Return   : AVCDEC_SUCCESS if succeed, AVC_FAIL if fail.                 */
-/*  Modified :                                                              */
-/* ======================================================================== */
-OSCL_EXPORT_REF AVCDec_Status PVAVCDecGetNALType(uint8 *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 AVCDEC_FAIL;
-        *nal_ref_idc = (bitstream[0] & 0x60) >> 5;
-        *nal_type = bitstream[0] & 0x1F;
-        return AVCDEC_SUCCESS;
-    }
-
-    return AVCDEC_FAIL;
-}
-
-/* ======================================================================== */
-/*  Function : PVAVCDecSeqParamSet()                                        */
-/*  Date     : 11/4/2003                                                    */
-/*  Purpose  : Initialize sequence, memory allocation if necessary.         */
-/*  In/out   :                                                              */
-/*  Return   : AVCDEC_SUCCESS if succeed, AVC_FAIL if fail.                 */
-/*  Modified :                                                              */
-/* ======================================================================== */
-
-OSCL_EXPORT_REF AVCDec_Status   PVAVCDecSeqParamSet(AVCHandle *avcHandle, uint8 *nal_unit,
-        int nal_size)
-{
-    AVCDec_Status status;
-    AVCDecObject *decvid;
-    AVCCommonObj *video;
-    AVCDecBitstream *bitstream;
-    void *userData = avcHandle->userData;
-    bool  first_seq = FALSE;
-    int i;
-
-
-    DEBUG_LOG(userData, AVC_LOGTYPE_INFO, "PVAVCDecSeqParamSet", -1, -1);
-
-    if (avcHandle->AVCObject == NULL)
-    {
-        first_seq = TRUE;
-
-        //avcHandle->memory_usage = 0;
-        /* allocate AVCDecObject */
-        avcHandle->AVCObject = (void*)avcHandle->CBAVC_Malloc(userData, sizeof(AVCDecObject), 0/*DEFAULT_ATTR*/);
-        if (avcHandle->AVCObject == NULL)
-        {
-            return AVCDEC_MEMORY_FAIL;
-        }
-
-        decvid = (AVCDecObject*) avcHandle->AVCObject;
-
-        memset(decvid, 0, sizeof(AVCDecObject));
-
-        decvid->common = (AVCCommonObj*)avcHandle->CBAVC_Malloc(userData, sizeof(AVCCommonObj), 0);
-        if (decvid->common == NULL)
-        {
-            return AVCDEC_MEMORY_FAIL;
-        }
-
-        video = decvid->common;
-        memset(video, 0, sizeof(AVCCommonObj));
-
-        video->seq_parameter_set_id = 9999; /* set it to some illegal value */
-
-        decvid->bitstream = (AVCDecBitstream *) avcHandle->CBAVC_Malloc(userData, sizeof(AVCDecBitstream), 1/*DEFAULT_ATTR*/);
-        if (decvid->bitstream == NULL)
-        {
-            return AVCDEC_MEMORY_FAIL;
-        }
-
-        decvid->bitstream->userData = avcHandle->userData; /* callback for more data */
-        decvid->avcHandle = avcHandle;
-        decvid->debugEnable = avcHandle->debugEnable;
-    }
-
-    decvid = (AVCDecObject*) avcHandle->AVCObject;
-    video = decvid->common;
-    bitstream = decvid->bitstream;
-
-    /* check if we can reuse the memory without re-allocating it. */
-    /* always check if(first_seq==TRUE) */
-
-    /* Conversion from EBSP to RBSP */
-    video->forbidden_bit = nal_unit[0] >> 7;
-    if (video->forbidden_bit) return AVCDEC_FAIL;
-    video->nal_ref_idc = (nal_unit[0] & 0x60) >> 5;
-    video->nal_unit_type = (AVCNalUnitType)(nal_unit[0] & 0x1F);
-
-    if (video->nal_unit_type != AVC_NALTYPE_SPS) /* not a SPS NAL */
-    {
-        return AVCDEC_FAIL;
-    }
-
-    /* Initialize bitstream structure*/
-    BitstreamInit(bitstream, nal_unit + 1, nal_size - 1);
-
-    /* if first_seq == TRUE, allocate the following memory  */
-    if (first_seq == TRUE)
-    {
-        video->currSeqParams = NULL; /* initialize it to NULL */
-        video->currPicParams = NULL;
-
-        /* There are 32 pointers to sequence param set, seqParams.
-                There are 255 pointers to picture param set, picParams.*/
-        for (i = 0; i < 32; i++)
-            decvid->seqParams[i] = NULL;
-
-        for (i = 0; i < 256; i++)
-            decvid->picParams[i] = NULL;
-
-        video->MbToSliceGroupMap = NULL;
-
-        video->mem_mgr_ctrl_eq_5 = FALSE;
-        video->newPic = TRUE;
-        video->newSlice = TRUE;
-        video->currPic = NULL;
-        video->currFS = NULL;
-        video->prevRefPic = NULL;
-
-        video->mbNum = 0; // MC_Conceal
-        /*  Allocate sliceHdr. */
-
-        video->sliceHdr = (AVCSliceHeader*) avcHandle->CBAVC_Malloc(userData, sizeof(AVCSliceHeader), 5/*DEFAULT_ATTR*/);
-        if (video->sliceHdr == NULL)
-        {
-            return AVCDEC_MEMORY_FAIL;
-        }
-
-        video->decPicBuf = (AVCDecPicBuffer*) avcHandle->CBAVC_Malloc(userData, sizeof(AVCDecPicBuffer), 3/*DEFAULT_ATTR*/);
-        if (video->decPicBuf == NULL)
-        {
-            return AVCDEC_MEMORY_FAIL;
-        }
-        memset(video->decPicBuf, 0, sizeof(AVCDecPicBuffer));
-    }
-
-    /* Decode SPS, allocate video->seqParams[i] and assign video->currSeqParams */
-    status = DecodeSPS(decvid, bitstream);
-
-    if (status != AVCDEC_SUCCESS)
-    {
-        return status;
-    }
-    return AVCDEC_SUCCESS;
-}
-
-/* ======================================================================== */
-/*  Function : PVAVCDecGetSeqInfo()                                         */
-/*  Date     : 11/4/2003                                                    */
-/*  Purpose  : Get sequence parameter info. after SPS NAL is decoded.       */
-/*  In/out   :                                                              */
-/*  Return   : AVCDEC_SUCCESS if succeed, AVC_FAIL if fail.                 */
-/*  Modified :                                                              */
-/*  12/20/03:  change input argument, use structure instead.                */
-/* ======================================================================== */
-
-OSCL_EXPORT_REF AVCDec_Status PVAVCDecGetSeqInfo(AVCHandle *avcHandle, AVCDecSPSInfo *seqInfo)
-{
-    AVCDecObject *decvid = (AVCDecObject*) avcHandle->AVCObject;
-    AVCCommonObj *video;
-    int PicWidthInMbs, PicHeightInMapUnits, FrameHeightInMbs;
-
-    if (decvid == NULL || decvid->seqParams[0] == NULL)
-    {
-        return AVCDEC_FAIL;
-    }
-
-    video = decvid->common;
-
-    PicWidthInMbs = decvid->seqParams[0]->pic_width_in_mbs_minus1 + 1;
-    PicHeightInMapUnits = decvid->seqParams[0]->pic_height_in_map_units_minus1 + 1 ;
-    FrameHeightInMbs = (2 - decvid->seqParams[0]->frame_mbs_only_flag) * PicHeightInMapUnits ;
-
-    seqInfo->FrameWidth = PicWidthInMbs << 4;
-    seqInfo->FrameHeight = FrameHeightInMbs << 4;
-
-    seqInfo->frame_only_flag = decvid->seqParams[0]->frame_mbs_only_flag;
-
-    if (decvid->seqParams[0]->frame_cropping_flag)
-    {
-        seqInfo->frame_crop_left = 2 * decvid->seqParams[0]->frame_crop_left_offset;
-        seqInfo->frame_crop_right = seqInfo->FrameWidth - (2 * decvid->seqParams[0]->frame_crop_right_offset + 1);
-
-        if (seqInfo->frame_only_flag)
-        {
-            seqInfo->frame_crop_top = 2 * decvid->seqParams[0]->frame_crop_top_offset;
-            seqInfo->frame_crop_bottom = seqInfo->FrameHeight - (2 * decvid->seqParams[0]->frame_crop_bottom_offset + 1);
-            /* Note in 7.4.2.1, there is a contraint on the value of frame_crop_left and frame_crop_top
-            such that they have to be less than or equal to frame_crop_right/2 and frame_crop_bottom/2, respectively. */
-        }
-        else
-        {
-            seqInfo->frame_crop_top = 4 * decvid->seqParams[0]->frame_crop_top_offset;
-            seqInfo->frame_crop_bottom = seqInfo->FrameHeight - (4 * decvid->seqParams[0]->frame_crop_bottom_offset + 1);
-            /* Note in 7.4.2.1, there is a contraint on the value of frame_crop_left and frame_crop_top
-            such that they have to be less than or equal to frame_crop_right/2 and frame_crop_bottom/4, respectively. */
-        }
-    }
-    else  /* no cropping flag, just give the first and last pixel */
-    {
-        seqInfo->frame_crop_bottom = seqInfo->FrameHeight - 1;
-        seqInfo->frame_crop_right = seqInfo->FrameWidth - 1;
-        seqInfo->frame_crop_top = seqInfo->frame_crop_left = 0;
-    }
-
-    return AVCDEC_SUCCESS;
-}
-
-/* ======================================================================== */
-/*  Function : PVAVCDecPicParamSet()                                        */
-/*  Date     : 11/4/2003                                                    */
-/*  Purpose  : Initialize picture                                           */
-/*             create reference picture list.                               */
-/*  In/out   :                                                              */
-/*  Return   : AVCDEC_SUCCESS if succeed, AVC_FAIL if fail.                 */
-/*  Modified :                                                              */
-/* ======================================================================== */
-/**
-Since PPS doesn't contain much data, most of the picture initialization will
-be done after decoding the slice header in PVAVCDecodeSlice. */
-OSCL_EXPORT_REF AVCDec_Status   PVAVCDecPicParamSet(AVCHandle *avcHandle, uint8 *nal_unit,
-        int nal_size)
-{
-    AVCDec_Status status;
-    AVCDecObject *decvid = (AVCDecObject*) avcHandle->AVCObject;
-    AVCCommonObj *video;
-    AVCDecBitstream *bitstream;
-
-    if (decvid == NULL)
-    {
-        return AVCDEC_FAIL;
-    }
-
-    video = decvid->common;
-    bitstream = decvid->bitstream;
-    /* 1. Convert EBSP to RBSP. Create bitstream structure */
-    video->forbidden_bit = nal_unit[0] >> 7;
-    video->nal_ref_idc = (nal_unit[0] & 0x60) >> 5;
-    video->nal_unit_type = (AVCNalUnitType)(nal_unit[0] & 0x1F);
-
-    if (video->nal_unit_type != AVC_NALTYPE_PPS) /* not a PPS NAL */
-    {
-        return AVCDEC_FAIL;
-    }
-
-
-    /* 2. Initialize bitstream structure*/
-    BitstreamInit(bitstream, nal_unit + 1, nal_size - 1);
-
-    /* 2. Decode pic_parameter_set_rbsp syntax. Allocate video->picParams[i] and assign to currPicParams */
-    status = DecodePPS(decvid, video, bitstream);
-    if (status != AVCDEC_SUCCESS)
-    {
-        return status;
-    }
-
-    video->SliceGroupChangeRate = video->currPicParams->slice_group_change_rate_minus1 + 1 ;
-
-    return AVCDEC_SUCCESS;
-}
-
-OSCL_EXPORT_REF AVCDec_Status   PVAVCDecSEI(AVCHandle *avcHandle, uint8 *nal_unit,
-        int nal_size)
-{
-    OSCL_UNUSED_ARG(avcHandle);
-    OSCL_UNUSED_ARG(nal_unit);
-    OSCL_UNUSED_ARG(nal_size);
-
-    return AVCDEC_SUCCESS;
-}
-/* ======================================================================== */
-/*  Function : PVAVCDecodeSlice()                                           */
-/*  Date     : 11/4/2003                                                    */
-/*  Purpose  : Decode one NAL unit.                                         */
-/*  In/out   :                                                              */
-/*  Return   : See enum AVCDec_Status for return values.                    */
-/*  Modified :                                                              */
-/* ======================================================================== */
-OSCL_EXPORT_REF AVCDec_Status PVAVCDecodeSlice(AVCHandle *avcHandle, uint8 *buffer,
-        int buf_size)
-{
-    AVCDecObject *decvid = (AVCDecObject*) avcHandle->AVCObject;
-    AVCCommonObj *video;
-    AVCDecBitstream *bitstream;
-    AVCDec_Status status;
-
-    if (decvid == NULL)
-    {
-        return AVCDEC_FAIL;
-    }
-
-    video = decvid->common;
-    bitstream = decvid->bitstream;
-
-    if (video->mem_mgr_ctrl_eq_5)
-    {
-        return AVCDEC_PICTURE_OUTPUT_READY;      // to flushout frame buffers
-    }
-
-    if (video->newSlice)
-    {
-        /* 2. Check NAL type  */
-        if (buffer == NULL)
-        {
-            return AVCDEC_FAIL;
-        }
-        video->prev_nal_unit_type = video->nal_unit_type;
-        video->forbidden_bit = buffer[0] >> 7;
-        video->nal_ref_idc = (buffer[0] & 0x60) >> 5;
-        video->nal_unit_type = (AVCNalUnitType)(buffer[0] & 0x1F);
-
-
-        if (video->nal_unit_type == AVC_NALTYPE_AUD)
-        {
-            return AVCDEC_SUCCESS;
-        }
-
-        if (video->nal_unit_type != AVC_NALTYPE_SLICE &&
-                video->nal_unit_type != AVC_NALTYPE_IDR)
-        {
-            return AVCDEC_FAIL; /* not supported */
-        }
-
-
-
-        if (video->nal_unit_type >= 2 && video->nal_unit_type <= 4)
-        {
-            return AVCDEC_FAIL; /* not supported */
-        }
-        else
-        {
-            video->slice_data_partitioning = FALSE;
-        }
-
-        video->newSlice = FALSE;
-        /*  Initialize bitstream structure*/
-        BitstreamInit(bitstream, buffer + 1, buf_size - 1);
-
-
-        /* 2.1 Decode Slice Header (separate function)*/
-        status = DecodeSliceHeader(decvid, video, bitstream);
-        if (status != AVCDEC_SUCCESS)
-        {
-            video->newSlice = TRUE;
-            return status;
-        }
-
-        if (video->sliceHdr->frame_num != video->prevFrameNum || (video->sliceHdr->first_mb_in_slice < (uint)video->mbNum && video->currSeqParams->constrained_set1_flag == 1))
-        {
-            video->newPic = TRUE;
-            if (video->numMBs > 0)
-            {
-                // Conceal missing MBs of previously decoded frame
-                ConcealSlice(decvid, video->PicSizeInMbs - video->numMBs, video->PicSizeInMbs);  // Conceal
-                video->numMBs = 0;
-
-                //              DeblockPicture(video);   // No need to deblock
-
-                /* 3.2 Decoded frame reference marking. */
-                /* 3.3 Put the decoded picture in output buffers */
-                /* set video->mem_mge_ctrl_eq_5 */
-                AVCNalUnitType temp = video->nal_unit_type;
-                video->nal_unit_type = video->prev_nal_unit_type;
-                StorePictureInDPB(avcHandle, video);
-                video->nal_unit_type = temp;
-                video->mbNum = 0; // MC_Conceal
-                return AVCDEC_PICTURE_OUTPUT_READY;
-            }
-        }
-
-        if (video->nal_unit_type == AVC_NALTYPE_IDR)
-        {
-            video->prevFrameNum = 0;
-            video->PrevRefFrameNum = 0;
-        }
-
-        if (!video->currSeqParams->gaps_in_frame_num_value_allowed_flag)
-        {   /* no gaps allowed, frame_num has to increase by one only */
-            /*          if(sliceHdr->frame_num != (video->PrevRefFrameNum + 1)%video->MaxFrameNum) */
-            if (video->sliceHdr->frame_num != video->PrevRefFrameNum && video->sliceHdr->frame_num != (video->PrevRefFrameNum + 1) % video->MaxFrameNum)
-            {
-                // Conceal missing MBs of previously decoded frame
-                video->numMBs = 0;
-                video->newPic = TRUE;
-                video->prevFrameNum++; // FIX
-                video->PrevRefFrameNum++;
-                AVCNalUnitType temp = video->nal_unit_type;
-                video->nal_unit_type = AVC_NALTYPE_SLICE; //video->prev_nal_unit_type;
-                status = (AVCDec_Status)DPBInitBuffer(avcHandle, video);
-                if (status != AVCDEC_SUCCESS)
-                {
-                    return status;
-                }
-                video->currFS->IsOutputted = 0x01;
-                video->currFS->IsReference = 3;
-                video->currFS->IsLongTerm = 0;
-
-                DecodePOC(video);
-                /* find an empty memory from DPB and assigned to currPic */
-                DPBInitPic(video, video->PrevRefFrameNum % video->MaxFrameNum);
-                RefListInit(video);
-                ConcealSlice(decvid, 0, video->PicSizeInMbs);  // Conceal
-                video->currFS->IsOutputted |= 0x02;
-                //conceal frame
-                /* 3.2 Decoded frame reference marking. */
-                /* 3.3 Put the decoded picture in output buffers */
-                /* set video->mem_mge_ctrl_eq_5 */
-                video->mbNum = 0; // Conceal
-                StorePictureInDPB(avcHandle, video);
-                video->nal_unit_type = temp;
-
-                return AVCDEC_PICTURE_OUTPUT_READY;
-            }
-        }
-    }
-
-    if (video->newPic == TRUE)
-    {
-        status = (AVCDec_Status)DPBInitBuffer(avcHandle, video);
-        if (status != AVCDEC_SUCCESS)
-        {
-            return status;
-        }
-    }
-
-    video->newSlice = TRUE;
-
-    /* function pointer setting at slice-level */
-    // OPTIMIZE
-    decvid->residual_block = &residual_block_cavlc;
-
-    /* derive picture order count */
-    if (video->newPic == TRUE)
-    {
-        video->numMBs = video->PicSizeInMbs;
-
-        if (video->nal_unit_type != AVC_NALTYPE_IDR && video->currSeqParams->gaps_in_frame_num_value_allowed_flag)
-        {
-            if (video->sliceHdr->frame_num != (video->PrevRefFrameNum + 1) % video->MaxFrameNum)
-            {
-                status = fill_frame_num_gap(avcHandle, video);
-                if (status != AVCDEC_SUCCESS)
-                {
-                    video->numMBs = 0;
-                    return status;
-                }
-
-                status = (AVCDec_Status)DPBInitBuffer(avcHandle, video);
-                if (status != AVCDEC_SUCCESS)
-                {
-                    video->numMBs = 0;
-                    return status;
-                }
-
-
-            }
-        }
-        /* if there's gap in the frame_num, we have to fill in the gap with
-            imaginary frames that won't get used for short-term ref. */
-        /* see fill_frame_num_gap() in JM */
-
-
-        DecodePOC(video);
-        /* find an empty memory from DPB and assigned to currPic */
-        DPBInitPic(video, video->CurrPicNum);
-
-        video->currPic->isReference = TRUE;  // FIX
-
-        if (video->nal_ref_idc == 0)
-        {
-            video->currPic->isReference = FALSE;
-            video->currFS->IsOutputted |= 0x02;     /* The MASK 0x02 means not needed for reference, or returned */
-            /* node need to check for freeing of this buffer */
-        }
-
-        FMOInit(video);
-
-        if (video->currPic->isReference)
-        {
-            video->PrevRefFrameNum = video->sliceHdr->frame_num;
-        }
-
-
-        video->prevFrameNum = video->sliceHdr->frame_num;
-    }
-
-    video->newPic = FALSE;
-
-
-    /* Initialize refListIdx for this picture */
-    RefListInit(video);
-
-    /* Re-order the reference list according to the ref_pic_list_reordering() */
-    status = (AVCDec_Status)ReOrderList(video);
-    if (status != AVCDEC_SUCCESS)
-    {
-        return AVCDEC_FAIL;
-    }
-
-    /* 2.2 Decode Slice. */
-    status = (AVCDec_Status)DecodeSlice(decvid);
-
-    video->slice_id++;  //  slice
-
-    if (status == AVCDEC_PICTURE_READY)
-    {
-        /* 3. Check complete picture */
-#ifndef MB_BASED_DEBLOCK
-        /* 3.1 Deblock */
-        DeblockPicture(video);
-#endif
-        /* 3.2 Decoded frame reference marking. */
-        /* 3.3 Put the decoded picture in output buffers */
-        /* set video->mem_mge_ctrl_eq_5 */
-        status = (AVCDec_Status)StorePictureInDPB(avcHandle, video);          // CHECK check the retunr status
-        if (status != AVCDEC_SUCCESS)
-        {
-            return AVCDEC_FAIL;
-        }
-
-        if (video->mem_mgr_ctrl_eq_5)
-        {
-            video->PrevRefFrameNum = 0;
-            video->prevFrameNum = 0;
-            video->prevPicOrderCntMsb = 0;
-            video->prevPicOrderCntLsb = video->TopFieldOrderCnt;
-            video->prevFrameNumOffset = 0;
-        }
-        else
-        {
-            video->prevPicOrderCntMsb = video->PicOrderCntMsb;
-            video->prevPicOrderCntLsb = video->sliceHdr->pic_order_cnt_lsb;
-            video->prevFrameNumOffset = video->FrameNumOffset;
-        }
-
-        return AVCDEC_PICTURE_READY;
-    }
-    else if (status != AVCDEC_SUCCESS)
-    {
-        return AVCDEC_FAIL;
-    }
-
-    return AVCDEC_SUCCESS;
-}
-
-/* ======================================================================== */
-/*  Function : PVAVCDecGetOutput()                                          */
-/*  Date     : 11/3/2003                                                    */
-/*  Purpose  : Get the next picture according to PicOrderCnt.               */
-/*  In/out   :                                                              */
-/*  Return   : AVCFrameIO structure                                         */
-/*  Modified :                                                              */
-/* ======================================================================== */
-
-OSCL_EXPORT_REF AVCDec_Status PVAVCDecGetOutput(AVCHandle *avcHandle, int *indx, int *release, AVCFrameIO *output)
-{
-    AVCDecObject *decvid = (AVCDecObject*) avcHandle->AVCObject;
-    AVCCommonObj *video;
-    AVCDecPicBuffer *dpb;
-    AVCFrameStore *oldestFrame = NULL;
-    int i, first = 1;
-    int count_frame = 0;
-    int index = 0;
-    int min_poc = 0;
-
-    if (decvid == NULL)
-    {
-        return AVCDEC_FAIL;
-    }
-
-    video = decvid->common;
-    dpb = video->decPicBuf;
-
-    if (dpb->num_fs == 0)
-    {
-        return AVCDEC_FAIL;
-    }
-
-    /* search for the oldest frame_num in dpb */
-    /* extension to field decoding, we have to search for every top_field/bottom_field within
-    each frame in the dpb. This code only works for frame based.*/
-
-    if (video->mem_mgr_ctrl_eq_5 == FALSE)
-    {
-        for (i = 0; i < dpb->num_fs; i++)
-        {
-            if ((dpb->fs[i]->IsOutputted & 0x01) == 0)
-            {
-                count_frame++;
-                if (first)
-                {
-                    min_poc = dpb->fs[i]->PicOrderCnt;
-                    first = 0;
-                    oldestFrame = dpb->fs[i];
-                    index = i;
-                }
-                if (dpb->fs[i]->PicOrderCnt < min_poc)
-                {
-                    min_poc = dpb->fs[i]->PicOrderCnt;
-                    oldestFrame = dpb->fs[i];
-                    index = i;
-                }
-            }
-        }
-    }
-    else
-    {
-        for (i = 0; i < dpb->num_fs; i++)
-        {
-            if ((dpb->fs[i]->IsOutputted & 0x01) == 0 && dpb->fs[i] != video->currFS)
-            {
-                count_frame++;
-                if (first)
-                {
-                    min_poc = dpb->fs[i]->PicOrderCnt;
-                    first = 0;
-                    oldestFrame = dpb->fs[i];
-                    index = i;
-                }
-                if (dpb->fs[i]->PicOrderCnt < min_poc)
-                {
-                    min_poc = dpb->fs[i]->PicOrderCnt;
-                    oldestFrame = dpb->fs[i];
-                    index = i;
-                }
-            }
-        }
-
-        if (count_frame < 2 && video->nal_unit_type != AVC_NALTYPE_IDR)
-        {
-            video->mem_mgr_ctrl_eq_5 = FALSE;  // FIX
-        }
-        else if (count_frame < 1 && video->nal_unit_type == AVC_NALTYPE_IDR)
-        {
-            for (i = 0; i < dpb->num_fs; i++)
-            {
-                if (dpb->fs[i] == video->currFS && (dpb->fs[i]->IsOutputted & 0x01) == 0)
-                {
-                    oldestFrame = dpb->fs[i];
-                    index = i;
-                    break;
-                }
-            }
-            video->mem_mgr_ctrl_eq_5 = FALSE;
-        }
-    }
-
-    if (oldestFrame == NULL)
-    {
-
-        /*      Check for Mem_mgmt_operation_5 based forced output */
-        for (i = 0; i < dpb->num_fs; i++)
-        {
-            /* looking for the one not used or not reference and has been outputted */
-            if (dpb->fs[i]->IsReference == 0 && dpb->fs[i]->IsOutputted == 3)
-            {
-                break;
-            }
-        }
-        if (i < dpb->num_fs)
-        {
-            /* there are frames available for decoding */
-            return AVCDEC_FAIL; /* no frame to be outputted */
-        }
-
-
-        /* no free frame available, we have to release one to continue decoding */
-        int MinIdx = 0;
-        int32 MinFrameNumWrap = 0x7FFFFFFF;
-
-        for (i = 0; i < dpb->num_fs; i++)
-        {
-            if (dpb->fs[i]->IsReference && !dpb->fs[i]->IsLongTerm)
-            {
-                if (dpb->fs[i]->FrameNumWrap < MinFrameNumWrap)
-                {
-                    MinFrameNumWrap = dpb->fs[i]->FrameNumWrap;
-                    MinIdx = i;
-                }
-            }
-        }
-        /* mark the frame with smallest PicOrderCnt to be unused for reference */
-        dpb->fs[MinIdx]->IsReference = 0;
-        dpb->fs[MinIdx]->IsLongTerm = 0;
-        dpb->fs[MinIdx]->frame.isReference = FALSE;
-        dpb->fs[MinIdx]->frame.isLongTerm = FALSE;
-        dpb->fs[MinIdx]->IsOutputted |= 0x02;
-#ifdef PV_MEMORY_POOL
-        if (dpb->fs[MinIdx]->IsOutputted == 3)
-        {
-            avcHandle->CBAVC_FrameUnbind(avcHandle->userData, MinIdx);
-        }
-#endif
-        return AVCDEC_FAIL;
-    }
-    /* MASK 0x01 means the frame is outputted (for display). A frame gets freed when it is
-    outputted (0x01) and not needed for reference (0x02)   */
-    oldestFrame->IsOutputted |= 0x01;
-
-    if (oldestFrame->IsOutputted == 3)
-    {
-        *release = 1; /* flag to release the buffer */
-    }
-    else
-    {
-        *release = 0;
-    }
-    /* do not release buffer here, release it after it is sent to the sink node */
-
-    output->YCbCr[0] = oldestFrame->frame.Sl;
-    output->YCbCr[1] = oldestFrame->frame.Scb;
-    output->YCbCr[2] = oldestFrame->frame.Scr;
-    output->height = oldestFrame->frame.height;
-    output->pitch = oldestFrame->frame.width;
-    output->disp_order = oldestFrame->PicOrderCnt;
-    output->coding_order = oldestFrame->FrameNum;
-    output->id = (uint32) oldestFrame->base_dpb; /* use the pointer as the id */
-    *indx = index;
-
-
-
-    return AVCDEC_SUCCESS;
-}
-
-
-/* ======================================================================== */
-/*  Function : PVAVCDecReset()                                              */
-/*  Date     : 03/04/2004                                                   */
-/*  Purpose  : Reset decoder, prepare it for a new IDR frame.               */
-/*  In/out   :                                                              */
-/*  Return   :  void                                                        */
-/*  Modified :                                                              */
-/* ======================================================================== */
-OSCL_EXPORT_REF void    PVAVCDecReset(AVCHandle *avcHandle)
-{
-    AVCDecObject *decvid = (AVCDecObject*) avcHandle->AVCObject;
-    AVCCommonObj *video;
-    AVCDecPicBuffer *dpb;
-    int i;
-
-    if (decvid == NULL)
-    {
-        return;
-    }
-
-    video = decvid->common;
-    dpb = video->decPicBuf;
-
-    /* reset the DPB */
-
-
-    for (i = 0; i < dpb->num_fs; i++)
-    {
-        dpb->fs[i]->IsLongTerm = 0;
-        dpb->fs[i]->IsReference = 0;
-        dpb->fs[i]->IsOutputted = 3;
-        dpb->fs[i]->frame.isReference = 0;
-        dpb->fs[i]->frame.isLongTerm = 0;
-    }
-
-    video->mem_mgr_ctrl_eq_5 = FALSE;
-    video->newPic = TRUE;
-    video->newSlice = TRUE;
-    video->currPic = NULL;
-    video->currFS = NULL;
-    video->prevRefPic = NULL;
-    video->prevFrameNum = 0;
-    video->PrevRefFrameNum = 0;
-    video->prevFrameNumOffset = 0;
-    video->FrameNumOffset = 0;
-    video->mbNum = 0;
-    video->numMBs = 0;
-
-    return ;
-}
-
-
-/* ======================================================================== */
-/*  Function : PVAVCCleanUpDecoder()                                        */
-/*  Date     : 11/4/2003                                                    */
-/*  Purpose  : Clean up the decoder, free all memories allocated.           */
-/*  In/out   :                                                              */
-/*  Return   :  void                                                        */
-/*  Modified :                                                              */
-/* ======================================================================== */
-
-OSCL_EXPORT_REF void PVAVCCleanUpDecoder(AVCHandle *avcHandle)
-{
-    AVCDecObject *decvid = (AVCDecObject*) avcHandle->AVCObject;
-    AVCCommonObj *video;
-    void *userData = avcHandle->userData;
-    int i;
-
-    DEBUG_LOG(userData, AVC_LOGTYPE_INFO, "PVAVCCleanUpDecoder", -1, -1);
-
-    if (decvid != NULL)
-    {
-        video = decvid->common;
-        if (video != NULL)
-        {
-            if (video->MbToSliceGroupMap != NULL)
-            {
-                avcHandle->CBAVC_Free(userData, (int)video->MbToSliceGroupMap);
-            }
-
-#ifdef MB_BASED_DEBLOCK
-            if (video->intra_pred_top != NULL)
-            {
-                avcHandle->CBAVC_Free(userData, (int)video->intra_pred_top);
-            }
-            if (video->intra_pred_top_cb != NULL)
-            {
-                avcHandle->CBAVC_Free(userData, (int)video->intra_pred_top_cb);
-            }
-            if (video->intra_pred_top_cr != NULL)
-            {
-                avcHandle->CBAVC_Free(userData, (int)video->intra_pred_top_cr);
-            }
-#endif
-            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);
-            }
-
-            avcHandle->CBAVC_Free(userData, (int)video); /* last thing to do */
-
-        }
-
-        for (i = 0; i < 256; i++)
-        {
-            if (decvid->picParams[i] != NULL)
-            {
-                if (decvid->picParams[i]->slice_group_id != NULL)
-                {
-                    avcHandle->CBAVC_Free(userData, (int)decvid->picParams[i]->slice_group_id);
-                }
-                avcHandle->CBAVC_Free(userData, (int)decvid->picParams[i]);
-            }
-        }
-        for (i = 0; i < 32; i++)
-        {
-            if (decvid->seqParams[i] != NULL)
-            {
-                avcHandle->CBAVC_Free(userData, (int)decvid->seqParams[i]);
-            }
-        }
-        if (decvid->bitstream != NULL)
-        {
-            avcHandle->CBAVC_Free(userData, (int)decvid->bitstream);
-        }
-
-
-        avcHandle->CBAVC_Free(userData, (int)decvid);
-    }
-
-
-    return ;
-}
diff --git a/media/libstagefright/codecs/avc/dec/src/avcdec_bitstream.h b/media/libstagefright/codecs/avc/dec/src/avcdec_bitstream.h
deleted file mode 100644 (file)
index bd1bc59..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-/* ------------------------------------------------------------------
- * 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 bitstream related functions.
-@publishedAll
-*/
-
-#ifndef _AVCDEC_BITSTREAM_H_
-#define _AVCDEC_BITSTREAM_H_
-
-#include "avcdec_lib.h"
-
-#define WORD_SIZE   32  /* this can vary, default to 32 bit for now */
-
-#ifndef __cplusplus
-
-#define AVC_GETDATA(x,y)   userData->AVC_GetData(x,y)
-
-#endif
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-#define BitstreamFlushBits(A,B)     {(A)->bitcnt += (B); (A)->incnt -= (B); (A)->curr_word <<= (B);}
-
-    AVCDec_Status AVC_BitstreamFillCache(AVCDecBitstream *stream);
-    /**
-    This function populates bitstream structure.
-    \param "stream" "Pointer to bitstream structure."
-    \param "buffer" "Pointer to the bitstream buffer."
-    \param "size"   "Size of the buffer."
-    \param "nal_size"   "Size of the NAL unit."
-    \param "resetall"   "Flag for reset everything."
-    \return "AVCDEC_SUCCESS for success and AVCDEC_FAIL for fail."
-    */
-    AVCDec_Status BitstreamInit(AVCDecBitstream *stream, uint8 *buffer, int size);
-
-    /**
-    This function reads next aligned word and remove the emulation prevention code
-    if necessary.
-    \param "stream" "Pointer to bitstream structure."
-    \return "Next word."
-    */
-    uint BitstreamNextWord(AVCDecBitstream *stream);
-
-    /**
-    This function reads nBits bits from the current position and advance the pointer.
-    \param "stream" "Pointer to bitstream structure."
-    \param "nBits" "Number of bits to be read."
-    \param "code"   "Point to the read value."
-    \return "AVCDEC_SUCCESS if successed, AVCDEC_FAIL if number of bits
-                is greater than the word-size, AVCDEC_PACKET_LOSS or
-                AVCDEC_NO_DATA if callback to get data fails."
-    */
-    AVCDec_Status BitstreamReadBits(AVCDecBitstream *stream, int nBits, uint *code);
-
-    /**
-    This function shows nBits bits from the current position without advancing the pointer.
-    \param "stream" "Pointer to bitstream structure."
-    \param "nBits" "Number of bits to be read."
-    \param "code"   "Point to the read value."
-    \return "AVCDEC_SUCCESS if successed, AVCDEC_FAIL if number of bits
-                    is greater than the word-size, AVCDEC_NO_DATA if it needs
-                    to callback to get data."
-    */
-    AVCDec_Status BitstreamShowBits(AVCDecBitstream *stream, int nBits, uint *code);
-
-
-    /**
-    This function flushes nBits bits from the current position.
-    \param "stream" "Pointer to bitstream structure."
-    \param "nBits" "Number of bits to be read."
-    \return "AVCDEC_SUCCESS if successed, AVCDEC_FAIL if number of bits
-                    is greater than the word-size It will not call back to get
-                   more data. Users should call BitstreamShowBits to determine
-                   how much they want to flush."
-    */
-
-    /**
-    This function read 1 bit from the current position and advance the pointer.
-    \param "stream" "Pointer to bitstream structure."
-    \param "nBits" "Number of bits to be read."
-    \param "code"   "Point to the read value."
-    \return "AVCDEC_SUCCESS if successed, AVCDEC_FAIL if number of bits
-                is greater than the word-size, AVCDEC_PACKET_LOSS or
-                AVCDEC_NO_DATA if callback to get data fails."
-    */
-    AVCDec_Status BitstreamRead1Bit(AVCDecBitstream *stream, uint *code);
-
-    /**
-    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(AVCDecBitstream *stream);
-    AVCDec_Status BitstreamByteAlign(AVCDecBitstream  *stream);
-    /**
-    This function checks whether there are more RBSP data before the trailing bits.
-    \param "stream" "Pointer to the bitstream structure."
-    \return "TRUE if yes, FALSE otherwise."
-    */
-    bool more_rbsp_data(AVCDecBitstream *stream);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus  */
-
-#endif /* _AVCDEC_BITSTREAM_H_ */
diff --git a/media/libstagefright/codecs/avc/dec/src/avcdec_int.h b/media/libstagefright/codecs/avc/dec/src/avcdec_int.h
deleted file mode 100644 (file)
index 878f9b3..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/* ------------------------------------------------------------------
- * 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 decoder library
-and necessary type defitionitions and enumerations.
-Naming convention for variables:
-lower_case_with_under_line  is  syntax element in subclause 7.2 and 7.3
-noUnderLine or NoUnderLine  is  derived variables defined somewhere else in the draft
-                                or introduced by this decoder library.
-@publishedAll
-*/
-
-#ifndef _AVCDEC_INT_H_
-#define _AVCDEC_INT_H_
-
-#include "avcint_common.h"
-#include "avcdec_api.h"
-
-
-/**
-Bitstream structure contains bitstream related parameters such as the pointer
-to the buffer, the current byte position and bit position.
-@publishedAll
-*/
-typedef struct tagDecBitstream
-{
-    uint8 *bitstreamBuffer; /* pointer to buffer memory   */
-    int nal_size;       /* size of the current NAL unit */
-    int data_end_pos;  /* bitstreamBuffer size in bytes */
-    int read_pos;       /* next position to read from bitstreamBuffer  */
-    uint curr_word; /* byte-swapped (MSB left) current word read from buffer */
-    int bit_left;      /* number of bit left in current_word */
-    uint next_word;     /* in case for old data in previous buffer hasn't been flushed. */
-    int incnt;  /* bit left in the prev_word */
-    int incnt_next;
-    int bitcnt;
-    void *userData;
-} AVCDecBitstream;
-
-/**
-This structure is the main object for AVC decoder library providing access to all
-global variables. It is allocated at PVAVCInitDecoder and freed at PVAVCCleanUpDecoder.
-@publishedAll
-*/
-typedef struct tagDecObject
-{
-
-    AVCCommonObj *common;
-
-    AVCDecBitstream     *bitstream; /* for current NAL */
-
-    /* sequence parameter set */
-    AVCSeqParamSet *seqParams[32]; /* Array of pointers, get allocated at arrival of new seq_id */
-
-    /* picture parameter set */
-    AVCPicParamSet *picParams[256]; /* Array of pointers to picture param set structures */
-
-    /* For internal operation, scratch memory for MV, prediction, transform, etc.*/
-    uint    ref_idx_l0[4]; /* [mbPartIdx], te(v) */
-    uint    ref_idx_l1[4];
-
-    /* function pointers */
-    AVCDec_Status(*residual_block)(struct tagDecObject*, int,  int,
-                                   int *, int *, int *);
-    /* Application control data */
-    AVCHandle *avcHandle;
-    void (*AVC_DebugLog)(AVCLogType type, char *string1, char *string2);
-    /*bool*/
-    uint    debugEnable;
-
-} AVCDecObject;
-
-#endif /* _AVCDEC_INT_H_ */
diff --git a/media/libstagefright/codecs/avc/dec/src/avcdec_lib.h b/media/libstagefright/codecs/avc/dec/src/avcdec_lib.h
deleted file mode 100644 (file)
index fdead05..0000000
+++ /dev/null
@@ -1,555 +0,0 @@
-/* ------------------------------------------------------------------
- * 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 _AVCDEC_LIB_H_
-#define _AVCDEC_LIB_H_
-
-#include "avclib_common.h"
-#include "avcdec_int.h"
-
-/*----------- avcdec_api.c -------------*/
-/**
-This function takes out the emulation prevention bytes from the input to creat RBSP.
-The result is written over the input bitstream.
-\param "nal_unit"   "(I/O) Pointer to the input buffer."
-\param "size"       "(I/O) Pointer to the size of the input/output buffer."
-\return "AVCDEC_SUCCESS for success and AVCDEC_FAIL otherwise."
-*/
-AVCDec_Status EBSPtoRBSP(uint8 *nal_unit, int *size);
-
-/*------------- pred_intra.c ---------------*/
-/**
-This function is the main entry point to intra prediction operation on a
-macroblock.
-\param "video"  "Pointer to AVCCommonObj."
-*/
-AVCStatus  IntraMBPrediction(AVCCommonObj *video);
-
-void SaveNeighborForIntraPred(AVCCommonObj *video, int offset);
-
-AVCStatus Intra_4x4(AVCCommonObj *video, int component, int SubBlock_indx, uint8 *comp);
-void Intra_4x4_Vertical(AVCCommonObj *video, int block_offset);
-void Intra_4x4_Horizontal(AVCCommonObj *video, int pitch, int block_offset);
-void Intra_4x4_DC(AVCCommonObj *video, int pitch, int block_offset, AVCNeighborAvailability *availability);
-void Intra_4x4_Down_Left(AVCCommonObj *video, int block_offset, AVCNeighborAvailability *availability);
-void Intra_4x4_Diagonal_Down_Right(AVCCommonObj *video, int pitch, int block_offset);
-void Intra_4x4_Diagonal_Vertical_Right(AVCCommonObj *video, int pitch, int block_offset);
-void Intra_4x4_Diagonal_Horizontal_Down(AVCCommonObj *video, int pitch, int block_offset);
-void Intra_4x4_Vertical_Left(AVCCommonObj *video,  int block_offset, AVCNeighborAvailability *availability);
-void Intra_4x4_Horizontal_Up(AVCCommonObj *video, int pitch, int block_offset);
-void  Intra_16x16_Vertical(AVCCommonObj *video);
-void Intra_16x16_Horizontal(AVCCommonObj *video, int pitch);
-void Intra_16x16_DC(AVCCommonObj *video, int pitch);
-void Intra_16x16_Plane(AVCCommonObj *video, int pitch);
-void Intra_Chroma_DC(AVCCommonObj *video, int pitch, uint8 *predCb, uint8 *predCr);
-void  Intra_Chroma_Horizontal(AVCCommonObj *video, int pitch, uint8 *predCb, uint8 *predCr);
-void  Intra_Chroma_Vertical(AVCCommonObj *video, uint8 *predCb, uint8 *predCr);
-void  Intra_Chroma_Plane(AVCCommonObj *video, int pitch, uint8 *predCb, uint8 *predCr);
-
-/*------------ pred_inter.c ---------------*/
-/**
-This function is the main entrance to inter prediction operation for
-a macroblock. For decoding, this function also calls inverse transform and
-compensation.
-\param "video"  "Pointer to AVCCommonObj."
-\return "void"
-*/
-void InterMBPrediction(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 LumaMotionComp(uint8 *ref, int picwidth, int picheight,
-                    int x_pos, int y_pos,
-                    uint8 *pred, int pred_pitch,
-                    int blkwidth, int blkheight);
-
-/**
-Functions below are special cases for luma motion compensation.
-LumaFullPelMC is for full pixel motion compensation.
-LumaBorderMC is for interpolation in only one dimension.
-LumaCrossMC is for interpolation in one dimension and half point in the other dimension.
-LumaDiagonalMC is for interpolation in diagonal direction.
-
-\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 full pel resolution."
-\param "y_pos"  "Y-coordinate of the predicted block in full pel resolution."
-\param "dx"     "Fraction of x_pos in quarter pel."
-\param "dy"     "Fraction of y_pos in quarter pel."
-\param "curr"   "Pointer to the current partition in the current picture."
-\param "residue"    "Pointer to the current partition for the residue block."
-\param "blkwidth"   "Width of the current partition."
-\param "blkheight"  "Height of the current partition."
-\return "void"
-*/
-void CreatePad(uint8 *ref, int picwidth, int picheight, int x_pos, int y_pos,
-               uint8 *out, int blkwidth, int blkheight);
-
-void FullPelMC(uint8 *in, int inwidth, uint8 *out, int outpitch,
-               int blkwidth, int blkheight);
-
-void HorzInterp1MC(uint8 *in, int inpitch, uint8 *out, int outpitch,
-                   int blkwidth, int blkheight, int dx);
-
-void HorzInterp2MC(int *in, int inpitch, uint8 *out, int outpitch,
-                   int blkwidth, int blkheight, int dx);
-
-void HorzInterp3MC(uint8 *in, int inpitch, int *out, int outpitch,
-                   int blkwidth, int blkheight);
-
-void VertInterp1MC(uint8 *in, int inpitch, uint8 *out, int outpitch,
-                   int blkwidth, int blkheight, int dy);
-
-void VertInterp2MC(uint8 *in, int inpitch, int *out, int outpitch,
-                   int blkwidth, int blkheight);
-
-void VertInterp3MC(int *in, int inpitch, uint8 *out, int outpitch,
-                   int blkwidth, int blkheight, int dy);
-
-void DiagonalInterpMC(uint8 *in1, uint8 *in2, int inpitch,
-                      uint8 *out, int outpitch,
-                      int blkwidth, int blkheight);
-
-
-void ChromaMotionComp(uint8 *ref, int picwidth, int picheight,
-                      int x_pos, int y_pos, uint8 *pred, int pred_pitch,
-                      int blkwidth, int blkheight);
-
-void ChromaFullPelMC(uint8 *in, int inpitch, uint8 *out, int outpitch,
-                     int blkwidth, int blkheight) ;
-void ChromaBorderMC(uint8 *ref, int picwidth, int dx, int dy,
-                    uint8 *pred, int pred_pitch, int blkwidth, int blkheight);
-void ChromaDiagonalMC(uint8 *ref, int picwidth, int dx, int dy,
-                      uint8 *pred, int pred_pitch, int blkwidth, int blkheight);
-
-void ChromaFullPelMCOutside(uint8 *ref, uint8 *pred, int pred_pitch,
-                            int blkwidth, int blkheight, int x_inc,
-                            int y_inc0, int y_inc1, int x_mid, int y_mid);
-void ChromaBorderMCOutside(uint8 *ref, int picwidth, int dx, int dy,
-                           uint8 *pred, int pred_pitch, int blkwidth, int blkheight,
-                           int x_inc, int z_inc, int y_inc0, int y_inc1, int x_mid, int y_mid);
-void ChromaDiagonalMCOutside(uint8 *ref, int picwidth,
-                             int dx, int dy, uint8 *pred, int pred_pitch,
-                             int blkwidth, int blkheight, int x_inc, int z_inc,
-                             int y_inc0, int y_inc1, int x_mid, int y_mid);
-
-void ChromaDiagonalMC_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
-                           uint8 *pOut, int predPitch, int blkwidth, int blkheight);
-
-void ChromaHorizontalMC_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
-                             uint8 *pOut, int predPitch, int blkwidth, int blkheight);
-
-void ChromaVerticalMC_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
-                           uint8 *pOut, int predPitch, int blkwidth, int blkheight);
-
-void ChromaFullMC_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
-                       uint8 *pOut, int predPitch, int blkwidth, int blkheight);
-
-void ChromaVerticalMC2_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
-                            uint8 *pOut, int predPitch, int blkwidth, int blkheight);
-
-void ChromaHorizontalMC2_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
-                              uint8 *pOut, int predPitch, int blkwidth, int blkheight);
-
-void ChromaDiagonalMC2_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
-                            uint8 *pOut, int predPitch, int blkwidth, int blkheight);
-
-
-/*----------- slice.c ---------------*/
-/**
-This function performs the main decoding loop for slice data including
-INTRA/INTER prediction, transform and quantization and compensation.
-See decode_frame_slice() in JM.
-\param "video"  "Pointer to AVCDecObject."
-\return "AVCDEC_SUCCESS for success, AVCDEC_PICTURE_READY for end-of-picture and AVCDEC_FAIL otherwise."
-*/
-AVCDec_Status DecodeSlice(AVCDecObject *video);
-AVCDec_Status ConcealSlice(AVCDecObject *decvid, int mbnum_start, int mbnum_end);
-/**
-This function performs the decoding of one macroblock.
-\param "video"  "Pointer to AVCDecObject."
-\param "prevMbSkipped"  "A value derived in 7.3.4."
-\return "AVCDEC_SUCCESS for success or AVCDEC_FAIL otherwise."
-*/
-AVCDec_Status DecodeMB(AVCDecObject *video);
-
-/**
-This function performs macroblock prediction type decoding as in subclause 7.3.5.1.
-\param "video" "Pointer to AVCCommonObj."
-\param "currMB" "Pointer to the current macroblock."
-\param "stream" "Pointer to AVCDecBitstream."
-\return "AVCDEC_SUCCESS for success or AVCDEC_FAIL otherwise."
-*/
-AVCDec_Status mb_pred(AVCCommonObj *video, AVCMacroblock *currMB, AVCDecBitstream *stream);
-
-/**
-This function performs sub-macroblock prediction type decoding as in subclause 7.3.5.2.
-\param "video" "Pointer to AVCCommonObj."
-\param "currMB" "Pointer to the current macroblock."
-\param "stream" "Pointer to AVCDecBitstream."
-\return "AVCDEC_SUCCESS for success or AVCDEC_FAIL otherwise."
-*/
-AVCDec_Status sub_mb_pred(AVCCommonObj *video, AVCMacroblock *currMB, AVCDecBitstream *stream);
-
-/**
-This function interprets the mb_type and sets necessary information
-when the slice type is AVC_I_SLICE.
-in the macroblock structure.
-\param "mblock" "Pointer to current AVCMacroblock."
-\param "mb_type" "From the syntax bitstream."
-\return "void"
-*/
-void InterpretMBModeI(AVCMacroblock *mblock, uint mb_type);
-
-/**
-This function interprets the 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 "mb_type" "From the syntax bitstream."
-\return "void"
-*/
-void InterpretMBModeP(AVCMacroblock *mblock, uint mb_type);
-
-/**
-This function interprets the 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 "mb_type" "From the syntax bitstream."
-\return "void"
-*/
-void InterpretMBModeB(AVCMacroblock *mblock, uint mb_type);
-
-/**
-This function interprets the mb_type and sets necessary information
-when the slice type is AVC_SI_SLICE.
-in the macroblock structure.
-\param "mblock" "Pointer to current AVCMacroblock."
-\param "mb_type" "From the syntax bitstream."
-\return "void"
-*/
-void InterpretMBModeSI(AVCMacroblock *mblock, uint mb_type);
-
-/**
-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 InterpretSubMBModeP(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 InterpretSubMBModeB(AVCMacroblock *mblock, uint *sub_mb_type);
-
-/**
-This function decodes the Intra4x4 prediction mode from neighboring information
-and from the decoded syntax.
-\param "video"  "Pointer to AVCCommonObj."
-\param "currMB" "Pointer to current macroblock."
-\param "stream" "Pointer to AVCDecBitstream."
-\return "AVCDEC_SUCCESS or AVCDEC_FAIL."
-*/
-AVCDec_Status DecodeIntra4x4Mode(AVCCommonObj *video, AVCMacroblock *currMB, AVCDecBitstream *stream);
-
-/*----------- vlc.c -------------------*/
-/**
-This function reads and decodes Exp-Golomb codes.
-\param "bitstream" "Pointer to AVCDecBitstream."
-\param "codeNum" "Pointer to the value of the codeNum."
-\return "AVCDEC_SUCCESS or AVCDEC_FAIL."
-*/
-AVCDec_Status ue_v(AVCDecBitstream *bitstream, uint *codeNum);
-
-/**
-This function reads and decodes signed Exp-Golomb codes.
-\param "bitstream" "Pointer to AVCDecBitstream."
-\param "value"  "Pointer to syntax element value."
-\return "AVCDEC_SUCCESS or AVCDEC_FAIL."
-*/
-AVCDec_Status  se_v(AVCDecBitstream *bitstream, int *value);
-
-/**
-This function reads and decodes signed Exp-Golomb codes for
-32 bit codeword.
-\param "bitstream" "Pointer to AVCDecBitstream."
-\param "value"  "Pointer to syntax element value."
-\return "AVCDEC_SUCCESS or AVCDEC_FAIL."
-*/
-AVCDec_Status  se_v32bit(AVCDecBitstream *bitstream, int32 *value);
-
-/**
-This function reads and decodes truncated Exp-Golomb codes.
-\param "bitstream" "Pointer to AVCDecBitstream."
-\param "value"  "Pointer to syntax element value."
-\param "range"  "Range of the value as input to determine the algorithm."
-\return "AVCDEC_SUCCESS or AVCDEC_FAIL."
-*/
-AVCDec_Status te_v(AVCDecBitstream *bitstream, uint *value, uint range);
-
-/**
-This function parse Exp-Golomb code from the bitstream.
-\param "bitstream" "Pointer to AVCDecBitstream."
-\param "leadingZeros" "Pointer to the number of leading zeros."
-\param "infobits"   "Pointer to the value after leading zeros and the first one.
-                    The total number of bits read is 2*leadingZeros + 1."
-\return "AVCDEC_SUCCESS or AVCDEC_FAIL."
-*/
-AVCDec_Status GetEGBitstring(AVCDecBitstream *bitstream, int *leadingZeros, int *infobits);
-
-/**
-This function parse Exp-Golomb code from the bitstream for 32 bit codewords.
-\param "bitstream" "Pointer to AVCDecBitstream."
-\param "leadingZeros" "Pointer to the number of leading zeros."
-\param "infobits"   "Pointer to the value after leading zeros and the first one.
-                    The total number of bits read is 2*leadingZeros + 1."
-\return "AVCDEC_SUCCESS or AVCDEC_FAIL."
-*/
-AVCDec_Status GetEGBitstring32bit(AVCDecBitstream *bitstream, int *leadingZeros, uint32 *infobits);
-
-/**
-This function performs CAVLC decoding of the CBP (coded block pattern) of a macroblock
-by calling ue_v() and then mapping the codeNum to the corresponding CBP value.
-\param "currMB"  "Pointer to the current AVCMacroblock structure."
-\param "stream"  "Pointer to the AVCDecBitstream."
-\return "void"
-*/
-AVCDec_Status DecodeCBP(AVCMacroblock *currMB, AVCDecBitstream *stream);
-
-/**
-This function decodes the syntax for trailing ones and total coefficient.
-Subject to optimization.
-\param "stream" "Pointer to the AVCDecBitstream."
-\param "TrailingOnes"   "Pointer to the trailing one variable output."
-\param "TotalCoeff" "Pointer to the total coefficient variable output."
-\param "nC" "Context for number of nonzero coefficient (prediction context)."
-\return "AVCDEC_SUCCESS for success."
-*/
-AVCDec_Status ce_TotalCoeffTrailingOnes(AVCDecBitstream *stream, int *TrailingOnes, int *TotalCoeff, int nC);
-
-/**
-This function decodes the syntax for trailing ones and total coefficient for
-chroma DC block. Subject to optimization.
-\param "stream" "Pointer to the AVCDecBitstream."
-\param "TrailingOnes"   "Pointer to the trailing one variable output."
-\param "TotalCoeff" "Pointer to the total coefficient variable output."
-\return "AVCDEC_SUCCESS for success."
-*/
-AVCDec_Status ce_TotalCoeffTrailingOnesChromaDC(AVCDecBitstream *stream, int *TrailingOnes, int *TotalCoeff);
-
-/**
-This function decode a VLC table with 2 output.
-\param "stream" "Pointer to the AVCDecBitstream."
-\param "lentab" "Table for code length."
-\param "codtab" "Table for code value."
-\param "tabwidth" "Width of the table or alphabet size of the first output."
-\param "tabheight"  "Height of the table or alphabet size of the second output."
-\param "code1"  "Pointer to the first output."
-\param "code2"  "Pointer to the second output."
-\return "AVCDEC_SUCCESS for success."
-*/
-AVCDec_Status code_from_bitstream_2d(AVCDecBitstream *stream, int *lentab, int *codtab, int tabwidth,
-                                     int tabheight, int *code1, int *code2);
-
-/**
-This function decodes the level_prefix VLC value as in Table 9-6.
-\param "stream" "Pointer to the AVCDecBitstream."
-\param "code"   "Pointer to the output."
-\return "AVCDEC_SUCCESS for success."
-*/
-AVCDec_Status ce_LevelPrefix(AVCDecBitstream *stream, uint *code);
-
-/**
-This function decodes total_zeros VLC syntax as in Table 9-7 and 9-8.
-\param "stream" "Pointer to the AVCDecBitstream."
-\param "code"   "Pointer to the output."
-\param "TotalCoeff" "Context parameter."
-\return "AVCDEC_SUCCESS for success."
-*/
-AVCDec_Status ce_TotalZeros(AVCDecBitstream *stream, int *code, int TotalCoeff);
-
-/**
-This function decodes total_zeros VLC syntax for chroma DC as in Table 9-9.
-\param "stream" "Pointer to the AVCDecBitstream."
-\param "code"   "Pointer to the output."
-\param "TotalCoeff" "Context parameter."
-\return "AVCDEC_SUCCESS for success."
-*/
-AVCDec_Status ce_TotalZerosChromaDC(AVCDecBitstream *stream, int *code, int TotalCoeff);
-
-/**
-This function decodes run_before VLC syntax as in Table 9-10.
-\param "stream" "Pointer to the AVCDecBitstream."
-\param "code"   "Pointer to the output."
-\param "zeroLeft"   "Context parameter."
-\return "AVCDEC_SUCCESS for success."
-*/
-AVCDec_Status ce_RunBefore(AVCDecBitstream *stream, int *code, int zeroLeft);
-
-/*----------- header.c -------------------*/
-/**
-This function parses vui_parameters.
-\param "decvid" "Pointer to AVCDecObject."
-\param "stream" "Pointer to AVCDecBitstream."
-\return "AVCDEC_SUCCESS or AVCDEC_FAIL."
-*/
-AVCDec_Status vui_parameters(AVCDecObject *decvid, AVCDecBitstream *stream, AVCSeqParamSet *currSPS);
-AVCDec_Status sei_payload(AVCDecObject *decvid, AVCDecBitstream *stream, uint payloadType, uint payloadSize);
-
-AVCDec_Status buffering_period(AVCDecObject *decvid, AVCDecBitstream *stream);
-AVCDec_Status pic_timing(AVCDecObject *decvid, AVCDecBitstream *stream);
-AVCDec_Status recovery_point(AVCDecObject *decvid, AVCDecBitstream *stream);
-AVCDec_Status dec_ref_pic_marking_repetition(AVCDecObject *decvid, AVCDecBitstream *stream);
-AVCDec_Status motion_constrained_slice_group_set(AVCDecObject *decvid, AVCDecBitstream *stream);
-
-
-/**
-This function parses hrd_parameters.
-\param "decvid" "Pointer to AVCDecObject."
-\param "stream" "Pointer to AVCDecBitstream."
-\return "AVCDEC_SUCCESS or AVCDEC_FAIL."
-*/
-AVCDec_Status hrd_parameters(AVCDecObject *decvid, AVCDecBitstream *stream, AVCHRDParams *HRDParam);
-
-/**
-This function decodes the syntax in sequence parameter set slice and fill up the AVCSeqParamSet
-structure.
-\param "decvid" "Pointer to AVCDecObject."
-\param "video" "Pointer to AVCCommonObj."
-\param "stream" "Pointer to AVCDecBitstream."
-\return "AVCDEC_SUCCESS or AVCDEC_FAIL."
-*/
-AVCDec_Status DecodeSPS(AVCDecObject *decvid, AVCDecBitstream *stream);
-
-/**
-This function decodes the syntax in picture parameter set and fill up the AVCPicParamSet
-structure.
-\param "decvid" "Pointer to AVCDecObject."
-\param "video" "Pointer to AVCCommonObj."
-\param "stream" "Pointer to AVCDecBitstream."
-\return "AVCDEC_SUCCESS or AVCDEC_FAIL."
-*/
-AVCDec_Status DecodePPS(AVCDecObject *decvid, AVCCommonObj *video, AVCDecBitstream *stream);
-AVCDec_Status DecodeSEI(AVCDecObject *decvid, AVCDecBitstream *stream);
-
-/**
-This function decodes slice header, calls related functions such as
-reference picture list reordering, prediction weight table, decode ref marking.
-See FirstPartOfSliceHeader() and RestOfSliceHeader() in JM.
-\param "decvid" "Pointer to AVCDecObject."
-\param "video" "Pointer to AVCCommonObj."
-\param "stream" "Pointer to AVCDecBitstream."
-\return "AVCDEC_SUCCESS for success and AVCDEC_FAIL otherwise."
-*/
-AVCDec_Status DecodeSliceHeader(AVCDecObject *decvid, AVCCommonObj *video, AVCDecBitstream *stream);
-
-/**
-This function performes necessary operations to create dummy frames when
-there is a gap in frame_num.
-\param "video"  "Pointer to AVCCommonObj."
-\return "AVCDEC_SUCCESS for success and AVCDEC_FAIL otherwise."
-*/
-AVCDec_Status fill_frame_num_gap(AVCHandle *avcHandle, AVCCommonObj *video);
-
-/**
-This function decodes ref_pic_list_reordering related syntax and fill up the AVCSliceHeader
-structure.
-\param "video" "Pointer to AVCCommonObj."
-\param "stream" "Pointer to AVCDecBitstream."
-\param "sliceHdr" "Pointer to AVCSliceHdr."
-\param "slice_type" "Value of slice_type - 5 if greater than 5."
-\return "AVCDEC_SUCCESS for success and AVCDEC_FAIL otherwise."
-*/
-AVCDec_Status ref_pic_list_reordering(AVCCommonObj *video, AVCDecBitstream *stream, AVCSliceHeader *sliceHdr, int slice_type);
-
-/**
-This function decodes dec_ref_pic_marking related syntax  and fill up the AVCSliceHeader
-structure.
-\param "video" "Pointer to AVCCommonObj."
-\param "stream" "Pointer to AVCDecBitstream."
-\param "sliceHdr" "Pointer to AVCSliceHdr."
-\return "AVCDEC_SUCCESS for success and AVCDEC_FAIL otherwise."
-*/
-AVCDec_Status dec_ref_pic_marking(AVCCommonObj *video, AVCDecBitstream *stream, AVCSliceHeader *sliceHdr);
-
-/**
-This function performs POC related operation prior to decoding a picture
-\param "video" "Pointer to AVCCommonObj."
-\return "AVCDEC_SUCCESS for success and AVCDEC_FAIL otherwise."
-See also PostPOC() for initialization of some variables.
-*/
-AVCDec_Status DecodePOC(AVCCommonObj *video);
-
-
-
-/*------------ residual.c ------------------*/
-/**
-This function decodes the intra pcm data and fill it in the corresponding location
-on the current picture.
-\param "video"  "Pointer to AVCCommonObj."
-\param "stream" "Pointer to AVCDecBitstream."
-*/
-AVCDec_Status DecodeIntraPCM(AVCCommonObj *video, AVCDecBitstream *stream);
-
-/**
-This function performs residual syntax decoding as well as quantization and transformation of
-the decoded coefficients. See subclause 7.3.5.3.
-\param "video"  "Pointer to AVCDecObject."
-\param "currMB" "Pointer to current macroblock."
-*/
-AVCDec_Status residual(AVCDecObject *video, AVCMacroblock *currMB);
-
-/**
-This function performs CAVLC syntax decoding to get the run and level information of the coefficients.
-\param "video"  "Pointer to AVCDecObject."
-\param "type"   "One of AVCResidualType for a particular 4x4 block."
-\param "bx"     "Horizontal block index."
-\param "by"     "Vertical block index."
-\param "level"  "Pointer to array of level for output."
-\param "run"    "Pointer to array of run for output."
-\param "numcoeff"   "Pointer to the total number of nonzero coefficients."
-\return "AVCDEC_SUCCESS for success."
-*/
-AVCDec_Status residual_block_cavlc(AVCDecObject *video, int nC, int maxNumCoeff,
-                                   int *level, int *run, int *numcoeff);
-
-#endif /* _AVCDEC_LIB_H_ */
diff --git a/media/libstagefright/codecs/avc/dec/src/header.cpp b/media/libstagefright/codecs/avc/dec/src/header.cpp
deleted file mode 100644 (file)
index 8681e2b..0000000
+++ /dev/null
@@ -1,1391 +0,0 @@
-/* ------------------------------------------------------------------
- * 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 "avcdec_lib.h"
-#include "avcdec_bitstream.h"
-#include "avcdec_api.h"
-
-/** see subclause 7.4.2.1 */
-AVCDec_Status DecodeSPS(AVCDecObject *decvid, AVCDecBitstream *stream)
-{
-    AVCDec_Status status = AVCDEC_SUCCESS;
-    AVCSeqParamSet *seqParam;
-    uint temp;
-    int i;
-    uint profile_idc, constrained_set0_flag, constrained_set1_flag, constrained_set2_flag;
-    uint level_idc, seq_parameter_set_id;
-    void *userData = decvid->avcHandle->userData;
-    AVCHandle *avcHandle = decvid->avcHandle;
-
-    DEBUG_LOG(userData, AVC_LOGTYPE_INFO, "DecodeSPS", -1, -1);
-
-    BitstreamReadBits(stream, 8, &profile_idc);
-    BitstreamRead1Bit(stream, &constrained_set0_flag);
-//  if (profile_idc != 66 && constrained_set0_flag != 1)
-//  {
-//      return AVCDEC_FAIL;
-//  }
-    BitstreamRead1Bit(stream, &constrained_set1_flag);
-    BitstreamRead1Bit(stream, &constrained_set2_flag);
-    BitstreamReadBits(stream, 5, &temp);
-    BitstreamReadBits(stream, 8, &level_idc);
-    if (level_idc > 51)
-    {
-        return AVCDEC_FAIL;
-    }
-    if (mapLev2Idx[level_idc] == 255)
-    {
-        return AVCDEC_FAIL;
-    }
-    ue_v(stream, &seq_parameter_set_id);
-
-    if (seq_parameter_set_id > 31)
-    {
-        return AVCDEC_FAIL;
-    }
-
-    /* Allocate sequence param set for seqParams[seq_parameter_set_id]. */
-    if (decvid->seqParams[seq_parameter_set_id] == NULL)  /* allocate seqParams[id] */
-    {
-        decvid->seqParams[seq_parameter_set_id] =
-            (AVCSeqParamSet*) avcHandle->CBAVC_Malloc(userData, sizeof(AVCSeqParamSet), DEFAULT_ATTR);
-
-        if (decvid->seqParams[seq_parameter_set_id] == NULL)
-        {
-            return AVCDEC_MEMORY_FAIL;
-        }
-    }
-
-    DEBUG_LOG(userData, AVC_LOGTYPE_INFO, "done alloc seqParams", -1, -1);
-
-    seqParam = decvid->seqParams[seq_parameter_set_id];
-
-    seqParam->profile_idc = profile_idc;
-    seqParam->constrained_set0_flag = constrained_set0_flag;
-    seqParam->constrained_set1_flag = constrained_set1_flag;
-    seqParam->constrained_set2_flag = constrained_set2_flag;
-    seqParam->level_idc = level_idc;
-    seqParam->seq_parameter_set_id = seq_parameter_set_id;
-
-    /* continue decoding SPS */
-    ue_v(stream, &(seqParam->log2_max_frame_num_minus4));
-
-    if (seqParam->log2_max_frame_num_minus4 > 12)
-    {
-        return AVCDEC_FAIL;
-    }
-
-    ue_v(stream, &(seqParam->pic_order_cnt_type));
-
-    DEBUG_LOG(userData, AVC_LOGTYPE_INFO, "check point 1", seqParam->log2_max_frame_num_minus4, seqParam->pic_order_cnt_type);
-
-    if (seqParam->pic_order_cnt_type == 0)
-    {
-        ue_v(stream, &(seqParam->log2_max_pic_order_cnt_lsb_minus4));
-    }
-    else if (seqParam->pic_order_cnt_type == 1)
-    {               // MC_CHECK
-        BitstreamRead1Bit(stream, (uint*)&(seqParam->delta_pic_order_always_zero_flag));
-        se_v32bit(stream, &(seqParam->offset_for_non_ref_pic));
-        se_v32bit(stream, &(seqParam->offset_for_top_to_bottom_field));
-        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++)
-        {
-            se_v32bit(stream, &(seqParam->offset_for_ref_frame[i]));
-        }
-    }
-
-    ue_v(stream, &(seqParam->num_ref_frames));
-
-    if (seqParam->num_ref_frames > 16)
-    {
-        return AVCDEC_FAIL;
-    }
-
-    DEBUG_LOG(userData, AVC_LOGTYPE_INFO, "check point 2", seqParam->num_ref_frames, -1);
-
-    BitstreamRead1Bit(stream, (uint*)&(seqParam->gaps_in_frame_num_value_allowed_flag));
-    ue_v(stream, &(seqParam->pic_width_in_mbs_minus1));
-
-    DEBUG_LOG(userData, AVC_LOGTYPE_INFO, "picwidth", seqParam->pic_width_in_mbs_minus1, -1);
-
-    ue_v(stream, &(seqParam->pic_height_in_map_units_minus1));
-
-    DEBUG_LOG(userData, AVC_LOGTYPE_INFO, "picwidth", seqParam->pic_height_in_map_units_minus1, -1);
-
-    BitstreamRead1Bit(stream, (uint*)&(seqParam->frame_mbs_only_flag));
-
-    seqParam->mb_adaptive_frame_field_flag = 0; /* default value */
-    if (!seqParam->frame_mbs_only_flag)
-    {
-        BitstreamRead1Bit(stream, (uint*)&(seqParam->mb_adaptive_frame_field_flag));
-    }
-
-    DEBUG_LOG(userData, AVC_LOGTYPE_INFO, "check point 3", seqParam->frame_mbs_only_flag, -1);
-
-    BitstreamRead1Bit(stream, (uint*)&(seqParam->direct_8x8_inference_flag));
-
-    DEBUG_LOG(userData, AVC_LOGTYPE_INFO, "check point 4", seqParam->direct_8x8_inference_flag, -1);
-
-    BitstreamRead1Bit(stream, (uint*)&(seqParam->frame_cropping_flag));
-    seqParam->frame_crop_left_offset = 0;  /* default value */
-    seqParam->frame_crop_right_offset = 0;/* default value */
-    seqParam->frame_crop_top_offset = 0;/* default value */
-    seqParam->frame_crop_bottom_offset = 0;/* default value */
-    if (seqParam->frame_cropping_flag)
-    {
-        ue_v(stream, &(seqParam->frame_crop_left_offset));
-        ue_v(stream, &(seqParam->frame_crop_right_offset));
-        ue_v(stream, &(seqParam->frame_crop_top_offset));
-        ue_v(stream, &(seqParam->frame_crop_bottom_offset));
-    }
-
-    DEBUG_LOG(userData, AVC_LOGTYPE_INFO, "check point 5", seqParam->frame_cropping_flag, -1);
-
-    BitstreamRead1Bit(stream, (uint*)&(seqParam->vui_parameters_present_flag));
-    if (seqParam->vui_parameters_present_flag)
-    {
-        status = vui_parameters(decvid, stream, seqParam);
-        if (status != AVCDEC_SUCCESS)
-        {
-            return AVCDEC_FAIL;
-        }
-    }
-
-    return status;
-}
-
-
-AVCDec_Status vui_parameters(AVCDecObject *decvid, AVCDecBitstream *stream, AVCSeqParamSet *currSPS)
-{
-    uint temp;
-    uint temp32;
-    uint aspect_ratio_idc, overscan_appopriate_flag, video_format, video_full_range_flag;
-    /* aspect_ratio_info_present_flag */
-    BitstreamRead1Bit(stream, &temp);
-    if (temp)
-    {
-        BitstreamReadBits(stream, 8, &aspect_ratio_idc);
-        if (aspect_ratio_idc == 255)
-        {
-            /* sar_width */
-            BitstreamReadBits(stream, 16, &temp);
-            /* sar_height */
-            BitstreamReadBits(stream, 16, &temp);
-        }
-    }
-    /* overscan_info_present */
-    BitstreamRead1Bit(stream, &temp);
-    if (temp)
-    {
-        BitstreamRead1Bit(stream, &overscan_appopriate_flag);
-    }
-    /* video_signal_type_present_flag */
-    BitstreamRead1Bit(stream, &temp);
-    if (temp)
-    {
-        BitstreamReadBits(stream, 3, &video_format);
-        BitstreamRead1Bit(stream, &video_full_range_flag);
-        /* colour_description_present_flag */
-        BitstreamRead1Bit(stream, &temp);
-        if (temp)
-        {
-            /* colour_primaries */
-            BitstreamReadBits(stream, 8, &temp);
-            /* transfer_characteristics */
-            BitstreamReadBits(stream, 8, &temp);
-            /* matrix coefficients */
-            BitstreamReadBits(stream, 8, &temp);
-        }
-    }
-    /*  chroma_loc_info_present_flag */
-    BitstreamRead1Bit(stream, &temp);
-    if (temp)
-    {
-        /*  chroma_sample_loc_type_top_field */
-        ue_v(stream, &temp);
-        /*  chroma_sample_loc_type_bottom_field */
-        ue_v(stream, &temp);
-    }
-
-    /*  timing_info_present_flag*/
-    BitstreamRead1Bit(stream, &temp);
-    if (temp)
-    {
-        /*  num_unit_in_tick*/
-        BitstreamReadBits(stream, 32, &temp32);
-        /*  time_scale */
-        BitstreamReadBits(stream, 32, &temp32);
-        /*  fixed_frame_rate_flag */
-        BitstreamRead1Bit(stream, &temp);
-    }
-
-    /*  nal_hrd_parameters_present_flag */
-    BitstreamRead1Bit(stream, &temp);
-    currSPS->vui_parameters.nal_hrd_parameters_present_flag = temp;
-    if (temp)
-    {
-        hrd_parameters(decvid, stream, &(currSPS->vui_parameters.nal_hrd_parameters));
-    }
-    /*  vcl_hrd_parameters_present_flag*/
-    BitstreamRead1Bit(stream, &temp);
-    currSPS->vui_parameters.vcl_hrd_parameters_present_flag = temp;
-    if (temp)
-    {
-        hrd_parameters(decvid, stream, &(currSPS->vui_parameters.vcl_hrd_parameters));
-    }
-    if (currSPS->vui_parameters.nal_hrd_parameters_present_flag || currSPS->vui_parameters.vcl_hrd_parameters_present_flag)
-    {
-        /*  low_delay_hrd_flag */
-        BitstreamRead1Bit(stream, &temp);
-    }
-    /*  pic_struct_present_flag */
-    BitstreamRead1Bit(stream, &temp);
-    currSPS->vui_parameters.pic_struct_present_flag = temp;
-    /*  bitstream_restriction_flag */
-    BitstreamRead1Bit(stream, &temp);
-    if (temp)
-    {
-        /*  motion_vectors_over_pic_boundaries_flag */
-        BitstreamRead1Bit(stream, &temp);
-        /*  max_bytes_per_pic_denom */
-        ue_v(stream, &temp);
-        /*  max_bits_per_mb_denom */
-        ue_v(stream, &temp);
-        /*  log2_max_mv_length_horizontal */
-        ue_v(stream, &temp);
-        /*  log2_max_mv_length_vertical */
-        ue_v(stream, &temp);
-        /*  num_reorder_frames */
-        ue_v(stream, &temp);
-        /*  max_dec_frame_buffering */
-        ue_v(stream, &temp);
-    }
-    return AVCDEC_SUCCESS;
-}
-AVCDec_Status hrd_parameters(AVCDecObject *decvid, AVCDecBitstream *stream, AVCHRDParams *HRDParam)
-{
-    OSCL_UNUSED_ARG(decvid);
-    uint temp;
-    uint cpb_cnt_minus1;
-    uint i;
-    ue_v(stream, &cpb_cnt_minus1);
-    HRDParam->cpb_cnt_minus1 = cpb_cnt_minus1;
-    /*  bit_rate_scale */
-    BitstreamReadBits(stream, 4, &temp);
-    /*  cpb_size_scale */
-    BitstreamReadBits(stream, 4, &temp);
-    for (i = 0; i <= cpb_cnt_minus1; i++)
-    {
-        /*  bit_rate_value_minus1[i] */
-        ue_v(stream, &temp);
-        /*  cpb_size_value_minus1[i] */
-        ue_v(stream, &temp);
-        /*  cbr_flag[i] */
-        ue_v(stream, &temp);
-    }
-    /*  initial_cpb_removal_delay_length_minus1 */
-    BitstreamReadBits(stream, 5, &temp);
-    /*  cpb_removal_delay_length_minus1 */
-    BitstreamReadBits(stream, 5, &temp);
-    HRDParam->cpb_removal_delay_length_minus1 = temp;
-    /*  dpb_output_delay_length_minus1 */
-    BitstreamReadBits(stream, 5, &temp);
-    HRDParam->dpb_output_delay_length_minus1 = temp;
-    /*  time_offset_length  */
-    BitstreamReadBits(stream, 5, &temp);
-    HRDParam->time_offset_length = temp;
-    return AVCDEC_SUCCESS;
-}
-
-
-/** see subclause 7.4.2.2 */
-AVCDec_Status DecodePPS(AVCDecObject *decvid, AVCCommonObj *video, AVCDecBitstream *stream)
-{
-    AVCPicParamSet *picParam;
-    AVCDec_Status status;
-    int i, iGroup, numBits;
-    int PicWidthInMbs, PicHeightInMapUnits, PicSizeInMapUnits;
-    uint pic_parameter_set_id, seq_parameter_set_id;
-    void *userData = decvid->avcHandle->userData;
-    AVCHandle *avcHandle = decvid->avcHandle;
-
-    ue_v(stream, &pic_parameter_set_id);
-    if (pic_parameter_set_id > 255)
-    {
-        return AVCDEC_FAIL;
-    }
-
-    ue_v(stream, &seq_parameter_set_id);
-
-    if (seq_parameter_set_id > 31)
-    {
-        return AVCDEC_FAIL;
-    }
-
-    /* 2.1 if picParams[pic_param_set_id] is NULL, allocate it. */
-    if (decvid->picParams[pic_parameter_set_id] == NULL)
-    {
-        decvid->picParams[pic_parameter_set_id] =
-            (AVCPicParamSet*)avcHandle->CBAVC_Malloc(userData, sizeof(AVCPicParamSet), DEFAULT_ATTR);
-        if (decvid->picParams[pic_parameter_set_id] == NULL)
-        {
-            return AVCDEC_MEMORY_FAIL;
-        }
-
-        decvid->picParams[pic_parameter_set_id]->slice_group_id = NULL;
-    }
-
-    video->currPicParams = picParam = decvid->picParams[pic_parameter_set_id];
-    picParam->seq_parameter_set_id = seq_parameter_set_id;
-    picParam->pic_parameter_set_id = pic_parameter_set_id;
-
-    BitstreamRead1Bit(stream, (uint*)&(picParam->entropy_coding_mode_flag));
-    if (picParam->entropy_coding_mode_flag)
-    {
-        status = AVCDEC_FAIL;
-        goto clean_up;
-    }
-    BitstreamRead1Bit(stream, (uint*)&(picParam->pic_order_present_flag));
-    ue_v(stream, &(picParam->num_slice_groups_minus1));
-
-    if (picParam->num_slice_groups_minus1 > MAX_NUM_SLICE_GROUP - 1)
-    {
-        status = AVCDEC_FAIL;
-        goto clean_up;
-    }
-
-    picParam->slice_group_change_rate_minus1 = 0; /* default value */
-    if (picParam->num_slice_groups_minus1 > 0)
-    {
-        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++)
-            {
-                ue_v(stream, &(picParam->run_length_minus1[iGroup]));
-            }
-        }
-        else if (picParam->slice_group_map_type == 2)
-        {   // MC_CHECK  <= or <
-            for (iGroup = 0; iGroup < (int)picParam->num_slice_groups_minus1; iGroup++)
-            {
-                ue_v(stream, &(picParam->top_left[iGroup]));
-                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)
-        {
-            BitstreamRead1Bit(stream, (uint*)&(picParam->slice_group_change_direction_flag));
-            ue_v(stream, &(picParam->slice_group_change_rate_minus1));
-        }
-        else if (picParam->slice_group_map_type == 6)
-        {
-            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;
-            }
-
-            i = picParam->seq_parameter_set_id;
-            if (decvid->seqParams[i] == NULL)
-            {
-                status = AVCDEC_FAIL;
-                goto clean_up;
-            }
-
-
-            PicWidthInMbs = decvid->seqParams[i]->pic_width_in_mbs_minus1 + 1;
-            PicHeightInMapUnits = decvid->seqParams[i]->pic_height_in_map_units_minus1 + 1 ;
-            PicSizeInMapUnits = PicWidthInMbs * PicHeightInMapUnits ;
-
-            /* information has to be consistent with the seq_param */
-            if ((int)picParam->pic_size_in_map_units_minus1 != PicSizeInMapUnits - 1)
-            {
-                status = AVCDEC_FAIL;
-                goto clean_up;
-            }
-
-            if (picParam->slice_group_id)
-            {
-                avcHandle->CBAVC_Free(userData, (int)picParam->slice_group_id);
-            }
-            picParam->slice_group_id = (uint*)avcHandle->CBAVC_Malloc(userData, sizeof(uint) * PicSizeInMapUnits, DEFAULT_ATTR);
-            if (picParam->slice_group_id == NULL)
-            {
-                status =  AVCDEC_MEMORY_FAIL;
-                goto clean_up;
-            }
-
-            for (i = 0; i < PicSizeInMapUnits; i++)
-            {
-                BitstreamReadBits(stream, numBits, &(picParam->slice_group_id[i]));
-            }
-        }
-
-    }
-
-    ue_v(stream, &(picParam->num_ref_idx_l0_active_minus1));
-    if (picParam->num_ref_idx_l0_active_minus1 > 31)
-    {
-        status = AVCDEC_FAIL; /* out of range */
-        goto clean_up;
-    }
-
-    ue_v(stream, &(picParam->num_ref_idx_l1_active_minus1));
-    if (picParam->num_ref_idx_l1_active_minus1 > 31)
-    {
-        status = AVCDEC_FAIL; /* out of range */
-        goto clean_up;
-    }
-
-    BitstreamRead1Bit(stream, (uint*)&(picParam->weighted_pred_flag));
-    BitstreamReadBits(stream, 2, &(picParam->weighted_bipred_idc));
-    if (picParam->weighted_bipred_idc > 2)
-    {
-        status = AVCDEC_FAIL; /* out of range */
-        goto clean_up;
-    }
-
-    se_v(stream, &(picParam->pic_init_qp_minus26));
-    if (picParam->pic_init_qp_minus26 < -26 || picParam->pic_init_qp_minus26 > 25)
-    {
-        status = AVCDEC_FAIL; /* out of range */
-        goto clean_up;
-    }
-
-    se_v(stream, &(picParam->pic_init_qs_minus26));
-    if (picParam->pic_init_qs_minus26 < -26 || picParam->pic_init_qs_minus26 > 25)
-    {
-        status = AVCDEC_FAIL; /* out of range */
-        goto clean_up;
-    }
-
-    se_v(stream, &(picParam->chroma_qp_index_offset));
-    if (picParam->chroma_qp_index_offset < -12 || picParam->chroma_qp_index_offset > 12)
-    {
-        status = AVCDEC_FAIL; /* out of range */
-        status = AVCDEC_FAIL; /* out of range */
-        goto clean_up;
-    }
-
-    BitstreamReadBits(stream, 3, &pic_parameter_set_id);
-    picParam->deblocking_filter_control_present_flag = pic_parameter_set_id >> 2;
-    picParam->constrained_intra_pred_flag = (pic_parameter_set_id >> 1) & 1;
-    picParam->redundant_pic_cnt_present_flag = pic_parameter_set_id & 1;
-
-    return AVCDEC_SUCCESS;
-clean_up:
-    if (decvid->picParams[pic_parameter_set_id])
-    {
-        if (picParam->slice_group_id)
-        {
-            avcHandle->CBAVC_Free(userData, (int)picParam->slice_group_id);
-        }
-        decvid->picParams[pic_parameter_set_id]->slice_group_id = NULL;
-        avcHandle->CBAVC_Free(userData, (int)decvid->picParams[pic_parameter_set_id]);
-        decvid->picParams[pic_parameter_set_id] = NULL;
-        return status;
-    }
-    return AVCDEC_SUCCESS;
-}
-
-
-/* FirstPartOfSliceHeader();
-    RestOfSliceHeader() */
-/** see subclause 7.4.3 */
-AVCDec_Status DecodeSliceHeader(AVCDecObject *decvid, AVCCommonObj *video, AVCDecBitstream *stream)
-{
-    AVCSliceHeader *sliceHdr = video->sliceHdr;
-    AVCPicParamSet *currPPS;
-    AVCSeqParamSet *currSPS;
-    AVCDec_Status status;
-    uint idr_pic_id;
-    int slice_type, temp, i;
-
-    ue_v(stream, &(sliceHdr->first_mb_in_slice));
-    ue_v(stream, (uint*)&slice_type);
-
-    if (sliceHdr->first_mb_in_slice != 0)
-    {
-        if ((int)sliceHdr->slice_type >= 5 && slice_type != (int)sliceHdr->slice_type - 5)
-        {
-            return AVCDEC_FAIL; /* slice type doesn't follow the first slice in the picture */
-        }
-    }
-    sliceHdr->slice_type = (AVCSliceType) slice_type;
-    if (slice_type > 4)
-    {
-        slice_type -= 5;
-    }
-
-    if (slice_type == 1 || slice_type > 2)
-    {
-        return AVCDEC_FAIL;
-    }
-
-    video->slice_type = (AVCSliceType) slice_type;
-
-    ue_v(stream, &(sliceHdr->pic_parameter_set_id));
-    /* end FirstPartSliceHeader() */
-    /* begin RestOfSliceHeader() */
-    /* after getting pic_parameter_set_id, we have to load corresponding SPS and PPS */
-    if (sliceHdr->pic_parameter_set_id > 255)
-    {
-        return AVCDEC_FAIL;
-    }
-
-    if (decvid->picParams[sliceHdr->pic_parameter_set_id] == NULL)
-        return AVCDEC_FAIL; /* PPS doesn't exist */
-
-    currPPS = video->currPicParams = decvid->picParams[sliceHdr->pic_parameter_set_id];
-
-    if (decvid->seqParams[currPPS->seq_parameter_set_id] == NULL)
-        return AVCDEC_FAIL; /* SPS doesn't exist */
-
-    currSPS = video->currSeqParams = decvid->seqParams[currPPS->seq_parameter_set_id];
-
-    if (currPPS->seq_parameter_set_id != video->seq_parameter_set_id)
-    {
-        video->seq_parameter_set_id = currPPS->seq_parameter_set_id;
-        status = (AVCDec_Status)AVCConfigureSequence(decvid->avcHandle, video, false);
-        if (status != AVCDEC_SUCCESS)
-            return status;
-        video->level_idc = currSPS->level_idc;
-    }
-
-    /* derived variables from SPS */
-    video->MaxFrameNum = 1 << (currSPS->log2_max_frame_num_minus4 + 4);
-    // MC_OPTIMIZE
-    video->PicWidthInMbs = currSPS->pic_width_in_mbs_minus1 + 1;
-    video->PicWidthInSamplesL = video->PicWidthInMbs * 16 ;
-    video->PicWidthInSamplesC = video->PicWidthInMbs * 8 ;
-    video->PicHeightInMapUnits = currSPS->pic_height_in_map_units_minus1 + 1 ;
-    video->PicSizeInMapUnits = video->PicWidthInMbs * video->PicHeightInMapUnits ;
-    video->FrameHeightInMbs = (2 - currSPS->frame_mbs_only_flag) * video->PicHeightInMapUnits ;
-
-    /* derived from PPS */
-    video->SliceGroupChangeRate = currPPS->slice_group_change_rate_minus1 + 1;
-
-    /* then we can continue decoding slice header */
-
-    BitstreamReadBits(stream, currSPS->log2_max_frame_num_minus4 + 4, &(sliceHdr->frame_num));
-
-    if (video->currFS == NULL && sliceHdr->frame_num != 0)
-    {
-        video->prevFrameNum = video->PrevRefFrameNum = sliceHdr->frame_num - 1;
-    }
-
-    if (!currSPS->frame_mbs_only_flag)
-    {
-        BitstreamRead1Bit(stream, &(sliceHdr->field_pic_flag));
-        if (sliceHdr->field_pic_flag)
-        {
-            return AVCDEC_FAIL;
-        }
-    }
-
-    /* derived variables from slice header*/
-    video->PicHeightInMbs = video->FrameHeightInMbs;
-    video->PicHeightInSamplesL = video->PicHeightInMbs * 16;
-    video->PicHeightInSamplesC = video->PicHeightInMbs * 8;
-    video->PicSizeInMbs = video->PicWidthInMbs * video->PicHeightInMbs;
-
-    if (sliceHdr->first_mb_in_slice >= video->PicSizeInMbs)
-    {
-        return AVCDEC_FAIL;
-    }
-    video->MaxPicNum = video->MaxFrameNum;
-    video->CurrPicNum = sliceHdr->frame_num;
-
-
-    if (video->nal_unit_type == AVC_NALTYPE_IDR)
-    {
-        if (sliceHdr->frame_num != 0)
-        {
-            return AVCDEC_FAIL;
-        }
-        ue_v(stream, &idr_pic_id);
-    }
-
-    sliceHdr->delta_pic_order_cnt_bottom = 0; /* default value */
-    sliceHdr->delta_pic_order_cnt[0] = 0; /* default value */
-    sliceHdr->delta_pic_order_cnt[1] = 0; /* default value */
-    if (currSPS->pic_order_cnt_type == 0)
-    {
-        BitstreamReadBits(stream, currSPS->log2_max_pic_order_cnt_lsb_minus4 + 4,
-                          &(sliceHdr->pic_order_cnt_lsb));
-        video->MaxPicOrderCntLsb =  1 << (currSPS->log2_max_pic_order_cnt_lsb_minus4 + 4);
-        if (sliceHdr->pic_order_cnt_lsb > video->MaxPicOrderCntLsb - 1)
-            return AVCDEC_FAIL; /* out of range */
-
-        if (currPPS->pic_order_present_flag)
-        {
-            se_v32bit(stream, &(sliceHdr->delta_pic_order_cnt_bottom));
-        }
-    }
-    if (currSPS->pic_order_cnt_type == 1 && !currSPS->delta_pic_order_always_zero_flag)
-    {
-        se_v32bit(stream, &(sliceHdr->delta_pic_order_cnt[0]));
-        if (currPPS->pic_order_present_flag)
-        {
-            se_v32bit(stream, &(sliceHdr->delta_pic_order_cnt[1]));
-        }
-    }
-
-    sliceHdr->redundant_pic_cnt = 0; /* default value */
-    if (currPPS->redundant_pic_cnt_present_flag)
-    {
-        // MC_CHECK
-        ue_v(stream, &(sliceHdr->redundant_pic_cnt));
-        if (sliceHdr->redundant_pic_cnt > 127) /* out of range */
-            return AVCDEC_FAIL;
-
-        if (sliceHdr->redundant_pic_cnt > 0) /* redundant picture */
-            return AVCDEC_FAIL; /* not supported */
-    }
-    sliceHdr->num_ref_idx_l0_active_minus1 = currPPS->num_ref_idx_l0_active_minus1;
-    sliceHdr->num_ref_idx_l1_active_minus1 = currPPS->num_ref_idx_l1_active_minus1;
-
-    if (slice_type == AVC_P_SLICE)
-    {
-        BitstreamRead1Bit(stream, &(sliceHdr->num_ref_idx_active_override_flag));
-        if (sliceHdr->num_ref_idx_active_override_flag)
-        {
-            ue_v(stream, &(sliceHdr->num_ref_idx_l0_active_minus1));
-        }
-        else  /* the following condition is not allowed if the flag is zero */
-        {
-            if ((slice_type == AVC_P_SLICE) && currPPS->num_ref_idx_l0_active_minus1 > 15)
-            {
-                return AVCDEC_FAIL; /* not allowed */
-            }
-        }
-    }
-
-
-    if (sliceHdr->num_ref_idx_l0_active_minus1 > 15 ||
-            sliceHdr->num_ref_idx_l1_active_minus1 > 15)
-    {
-        return AVCDEC_FAIL; /* not allowed */
-    }
-    /* if MbaffFrameFlag =1,
-    max value of index is num_ref_idx_l0_active_minus1 for frame MBs and
-    2*sliceHdr->num_ref_idx_l0_active_minus1 + 1 for field MBs */
-
-    /* ref_pic_list_reordering() */
-    status = ref_pic_list_reordering(video, stream, sliceHdr, slice_type);
-    if (status != AVCDEC_SUCCESS)
-    {
-        return status;
-    }
-
-
-    if (video->nal_ref_idc != 0)
-    {
-        dec_ref_pic_marking(video, stream, sliceHdr);
-    }
-    se_v(stream, &(sliceHdr->slice_qp_delta));
-
-    video->QPy = 26 + currPPS->pic_init_qp_minus26 + sliceHdr->slice_qp_delta;
-    if (video->QPy > 51 || video->QPy < 0)
-    {
-        video->QPy = AVC_CLIP3(0, 51, video->QPy);
-//                  return AVCDEC_FAIL;
-    }
-    video->QPc = mapQPi2QPc[AVC_CLIP3(0, 51, video->QPy + video->currPicParams->chroma_qp_index_offset)];
-
-    video->QPy_div_6 = (video->QPy * 43) >> 8;
-    video->QPy_mod_6 = video->QPy - 6 * video->QPy_div_6;
-
-    video->QPc_div_6 = (video->QPc * 43) >> 8;
-    video->QPc_mod_6 = video->QPc - 6 * video->QPc_div_6;
-
-    sliceHdr->slice_alpha_c0_offset_div2 = 0;
-    sliceHdr->slice_beta_offset_div_2 = 0;
-    sliceHdr->disable_deblocking_filter_idc = 0;
-    video->FilterOffsetA = video->FilterOffsetB = 0;
-
-    if (currPPS->deblocking_filter_control_present_flag)
-    {
-        ue_v(stream, &(sliceHdr->disable_deblocking_filter_idc));
-        if (sliceHdr->disable_deblocking_filter_idc > 2)
-        {
-            return AVCDEC_FAIL; /* out of range */
-        }
-        if (sliceHdr->disable_deblocking_filter_idc != 1)
-        {
-            se_v(stream, &(sliceHdr->slice_alpha_c0_offset_div2));
-            if (sliceHdr->slice_alpha_c0_offset_div2 < -6 ||
-                    sliceHdr->slice_alpha_c0_offset_div2 > 6)
-            {
-                return AVCDEC_FAIL;
-            }
-            video->FilterOffsetA = sliceHdr->slice_alpha_c0_offset_div2 << 1;
-
-            se_v(stream, &(sliceHdr->slice_beta_offset_div_2));
-            if (sliceHdr->slice_beta_offset_div_2 < -6 ||
-                    sliceHdr->slice_beta_offset_div_2 > 6)
-            {
-                return AVCDEC_FAIL;
-            }
-            video->FilterOffsetB = sliceHdr->slice_beta_offset_div_2 << 1;
-        }
-    }
-
-    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;
-        temp++;
-        while (temp)
-        {
-            temp >>= 1;
-            i++;
-        }
-
-        BitstreamReadBits(stream, i, &(sliceHdr->slice_group_change_cycle));
-        video->MapUnitsInSliceGroup0 =
-            AVC_MIN(sliceHdr->slice_group_change_cycle * video->SliceGroupChangeRate, video->PicSizeInMapUnits);
-    }
-
-    return AVCDEC_SUCCESS;
-}
-
-
-AVCDec_Status fill_frame_num_gap(AVCHandle *avcHandle, AVCCommonObj *video)
-{
-    AVCDec_Status status;
-    int CurrFrameNum;
-    int UnusedShortTermFrameNum;
-    int tmp1 = video->sliceHdr->delta_pic_order_cnt[0];
-    int tmp2 = video->sliceHdr->delta_pic_order_cnt[1];
-    int tmp3 = video->CurrPicNum;
-    int tmp4 = video->sliceHdr->adaptive_ref_pic_marking_mode_flag;
-    UnusedShortTermFrameNum = (video->prevFrameNum + 1) % video->MaxFrameNum;
-    CurrFrameNum = video->sliceHdr->frame_num;
-
-    video->sliceHdr->delta_pic_order_cnt[0] = 0;
-    video->sliceHdr->delta_pic_order_cnt[1] = 0;
-    while (CurrFrameNum != UnusedShortTermFrameNum)
-    {
-        video->CurrPicNum = UnusedShortTermFrameNum;
-        video->sliceHdr->frame_num = UnusedShortTermFrameNum;
-
-        status = (AVCDec_Status)DPBInitBuffer(avcHandle, video);
-        if (status != AVCDEC_SUCCESS)  /* no buffer available */
-        {
-            return status;
-        }
-        DecodePOC(video);
-        DPBInitPic(video, UnusedShortTermFrameNum);
-
-
-        video->currFS->PicOrderCnt = video->PicOrderCnt;
-        video->currFS->FrameNum = video->sliceHdr->frame_num;
-
-        /* initialize everything to zero */
-        video->currFS->IsOutputted = 0x01;
-        video->currFS->IsReference = 3;
-        video->currFS->IsLongTerm = 0;
-        video->currFS->frame.isReference = TRUE;
-        video->currFS->frame.isLongTerm = FALSE;
-
-        video->sliceHdr->adaptive_ref_pic_marking_mode_flag = 0;
-
-        status = (AVCDec_Status)StorePictureInDPB(avcHandle, video);  // MC_CHECK check the return status
-        if (status != AVCDEC_SUCCESS)
-        {
-            return AVCDEC_FAIL;
-        }
-        video->prevFrameNum = UnusedShortTermFrameNum;
-        UnusedShortTermFrameNum = (UnusedShortTermFrameNum + 1) % video->MaxFrameNum;
-    }
-    video->sliceHdr->frame_num = CurrFrameNum;
-    video->CurrPicNum = tmp3;
-    video->sliceHdr->delta_pic_order_cnt[0] = tmp1;
-    video->sliceHdr->delta_pic_order_cnt[1] = tmp2;
-    video->sliceHdr->adaptive_ref_pic_marking_mode_flag = tmp4;
-    return AVCDEC_SUCCESS;
-}
-
-/** see subclause 7.4.3.1 */
-AVCDec_Status ref_pic_list_reordering(AVCCommonObj *video, AVCDecBitstream *stream, AVCSliceHeader *sliceHdr, int slice_type)
-{
-    int i;
-
-    if (slice_type != AVC_I_SLICE)
-    {
-        BitstreamRead1Bit(stream, &(sliceHdr->ref_pic_list_reordering_flag_l0));
-        if (sliceHdr->ref_pic_list_reordering_flag_l0)
-        {
-            i = 0;
-            do
-            {
-                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)
-                {
-                    ue_v(stream, &(sliceHdr->abs_diff_pic_num_minus1_l0[i]));
-                    if (sliceHdr->reordering_of_pic_nums_idc_l0[i] == 0 &&
-                            sliceHdr->abs_diff_pic_num_minus1_l0[i] > video->MaxPicNum / 2 - 1)
-                    {
-                        return AVCDEC_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 AVCDEC_FAIL; /* out of range */
-                    }
-                }
-                else if (sliceHdr->reordering_of_pic_nums_idc_l0[i] == 2)
-                {
-                    ue_v(stream, &(sliceHdr->long_term_pic_num_l0[i]));
-                }
-                i++;
-            }
-            while (sliceHdr->reordering_of_pic_nums_idc_l0[i-1] != 3
-                    && i <= (int)sliceHdr->num_ref_idx_l0_active_minus1 + 1) ;
-        }
-    }
-    return AVCDEC_SUCCESS;
-}
-
-/** see subclause 7.4.3.3 */
-AVCDec_Status dec_ref_pic_marking(AVCCommonObj *video, AVCDecBitstream *stream, AVCSliceHeader *sliceHdr)
-{
-    int i;
-    if (video->nal_unit_type == AVC_NALTYPE_IDR)
-    {
-        BitstreamRead1Bit(stream, &(sliceHdr->no_output_of_prior_pics_flag));
-        BitstreamRead1Bit(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
-    {
-        BitstreamRead1Bit(stream, &(sliceHdr->adaptive_ref_pic_marking_mode_flag));
-        if (sliceHdr->adaptive_ref_pic_marking_mode_flag)
-        {
-            i = 0;
-            do
-            {
-                ue_v(stream, &(sliceHdr->memory_management_control_operation[i]));
-                if (sliceHdr->memory_management_control_operation[i] == 1 ||
-                        sliceHdr->memory_management_control_operation[i] == 3)
-                {
-                    ue_v(stream, &(sliceHdr->difference_of_pic_nums_minus1[i]));
-                }
-                if (sliceHdr->memory_management_control_operation[i] == 2)
-                {
-                    ue_v(stream, &(sliceHdr->long_term_pic_num[i]));
-                }
-                if (sliceHdr->memory_management_control_operation[i] == 3 ||
-                        sliceHdr->memory_management_control_operation[i] == 6)
-                {
-                    ue_v(stream, &(sliceHdr->long_term_frame_idx[i]));
-                }
-                if (sliceHdr->memory_management_control_operation[i] == 4)
-                {
-                    ue_v(stream, &(sliceHdr->max_long_term_frame_idx_plus1[i]));
-                }
-                i++;
-            }
-            while (sliceHdr->memory_management_control_operation[i-1] != 0 && i < MAX_DEC_REF_PIC_MARKING);
-            if (i >= MAX_DEC_REF_PIC_MARKING)
-            {
-                return AVCDEC_FAIL; /* we're screwed!!, not enough memory */
-            }
-        }
-    }
-
-    return AVCDEC_SUCCESS;
-}
-
-/* see subclause 8.2.1 Decoding process for picture order count. */
-AVCDec_Status DecodePOC(AVCCommonObj *video)
-{
-    AVCSeqParamSet *currSPS = video->currSeqParams;
-    AVCSliceHeader *sliceHdr = video->sliceHdr;
-    int i;
-
-    switch (currSPS->pic_order_cnt_type)
-    {
-        case 0: /* POC MODE 0 , subclause 8.2.1.1 */
-            if (video->nal_unit_type == AVC_NALTYPE_IDR)
-            {
-                video->prevPicOrderCntMsb = 0;
-                video->prevPicOrderCntLsb = 0;
-            }
-
-            /* Calculate the MSBs of current picture */
-            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 */
-
-
-            video->PicOrderCnt = video->TopFieldOrderCnt = video->PicOrderCntMsb + sliceHdr->pic_order_cnt_lsb;
-            video->BottomFieldOrderCnt = video->TopFieldOrderCnt + sliceHdr->delta_pic_order_cnt_bottom;
-
-            break;
-
-
-        case 1: /* POC MODE 1, subclause 8.2.1.2 */
-            /* calculate FrameNumOffset */
-            if (video->nal_unit_type == AVC_NALTYPE_IDR)
-            {
-                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 */
-            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 */
-
-            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);
-
-
-            break;
-
-
-        case 2: /* POC MODE 2, subclause 8.2.1.3 */
-            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);
-            }
-            video->TopFieldOrderCnt = video->BottomFieldOrderCnt = video->PicOrderCnt;
-            break;
-        default:
-            return AVCDEC_FAIL;
-    }
-
-    return AVCDEC_SUCCESS;
-}
-
-
-AVCDec_Status DecodeSEI(AVCDecObject *decvid, AVCDecBitstream *stream)
-{
-    OSCL_UNUSED_ARG(decvid);
-    OSCL_UNUSED_ARG(stream);
-    return AVCDEC_SUCCESS;
-}
-
-AVCDec_Status sei_payload(AVCDecObject *decvid, AVCDecBitstream *stream, uint payloadType, uint payloadSize)
-{
-    AVCDec_Status status = AVCDEC_SUCCESS;
-    uint i;
-    switch (payloadType)
-    {
-        case 0:
-            /*  buffering period SEI */
-            status = buffering_period(decvid, stream);
-            break;
-        case 1:
-            /*  picture timing SEI */
-            status = pic_timing(decvid, stream);
-            break;
-        case 2:
-
-        case 3:
-
-        case 4:
-
-        case 5:
-
-        case 8:
-
-        case 9:
-
-        case 10:
-
-        case 11:
-
-        case 12:
-
-        case 13:
-
-        case 14:
-
-        case 15:
-
-        case 16:
-
-        case 17:
-            for (i = 0; i < payloadSize; i++)
-            {
-                BitstreamFlushBits(stream, 8);
-            }
-            break;
-        case 6:
-            /*      recovery point SEI              */
-            status = recovery_point(decvid, stream);
-            break;
-        case 7:
-            /*      decoded reference picture marking repetition SEI */
-            status = dec_ref_pic_marking_repetition(decvid, stream);
-            break;
-
-        case 18:
-            /*      motion-constrained slice group set SEI */
-            status = motion_constrained_slice_group_set(decvid, stream);
-            break;
-        default:
-            /*          reserved_sei_message */
-            for (i = 0; i < payloadSize; i++)
-            {
-                BitstreamFlushBits(stream, 8);
-            }
-            break;
-    }
-    BitstreamByteAlign(stream);
-    return status;
-}
-
-AVCDec_Status buffering_period(AVCDecObject *decvid, AVCDecBitstream *stream)
-{
-    AVCSeqParamSet *currSPS;
-    uint seq_parameter_set_id;
-    uint temp;
-    uint i;
-    ue_v(stream, &seq_parameter_set_id);
-    if (seq_parameter_set_id > 31)
-    {
-        return AVCDEC_FAIL;
-    }
-
-//  decvid->common->seq_parameter_set_id = seq_parameter_set_id;
-
-    currSPS = decvid->seqParams[seq_parameter_set_id];
-    if (currSPS->vui_parameters.nal_hrd_parameters_present_flag)
-    {
-        for (i = 0; i <= currSPS->vui_parameters.nal_hrd_parameters.cpb_cnt_minus1; i++)
-        {
-            /* initial_cpb_removal_delay[i] */
-            BitstreamReadBits(stream, currSPS->vui_parameters.nal_hrd_parameters.cpb_removal_delay_length_minus1 + 1, &temp);
-            /*initial _cpb_removal_delay_offset[i] */
-            BitstreamReadBits(stream, currSPS->vui_parameters.nal_hrd_parameters.cpb_removal_delay_length_minus1 + 1, &temp);
-        }
-    }
-
-    if (currSPS->vui_parameters.vcl_hrd_parameters_present_flag)
-    {
-        for (i = 0; i <= currSPS->vui_parameters.vcl_hrd_parameters.cpb_cnt_minus1; i++)
-        {
-            /* initial_cpb_removal_delay[i] */
-            BitstreamReadBits(stream, currSPS->vui_parameters.vcl_hrd_parameters.cpb_removal_delay_length_minus1 + 1, &temp);
-            /*initial _cpb_removal_delay_offset[i] */
-            BitstreamReadBits(stream, currSPS->vui_parameters.vcl_hrd_parameters.cpb_removal_delay_length_minus1 + 1, &temp);
-        }
-    }
-
-    return AVCDEC_SUCCESS;
-}
-AVCDec_Status pic_timing(AVCDecObject *decvid, AVCDecBitstream *stream)
-{
-    AVCSeqParamSet *currSPS;
-    uint temp, NumClockTs = 0, time_offset_length = 24, full_timestamp_flag;
-    uint i;
-
-    currSPS = decvid->seqParams[decvid->common->seq_parameter_set_id];
-
-    if (currSPS->vui_parameters.nal_hrd_parameters_present_flag)
-    {
-        BitstreamReadBits(stream, currSPS->vui_parameters.nal_hrd_parameters.cpb_removal_delay_length_minus1 + 1, &temp);
-        BitstreamReadBits(stream, currSPS->vui_parameters.nal_hrd_parameters.dpb_output_delay_length_minus1 + 1, &temp);
-        time_offset_length = currSPS->vui_parameters.nal_hrd_parameters.time_offset_length;
-    }
-    else if (currSPS->vui_parameters.vcl_hrd_parameters_present_flag)
-    {
-        BitstreamReadBits(stream, currSPS->vui_parameters.vcl_hrd_parameters.cpb_removal_delay_length_minus1 + 1, &temp);
-        BitstreamReadBits(stream, currSPS->vui_parameters.vcl_hrd_parameters.dpb_output_delay_length_minus1 + 1, &temp);
-        time_offset_length = currSPS->vui_parameters.vcl_hrd_parameters.time_offset_length;
-    }
-
-    if (currSPS->vui_parameters.pic_struct_present_flag)
-    {
-        /* pic_struct */
-        BitstreamReadBits(stream, 4, &temp);
-
-        switch (temp)
-        {
-            case 0:
-            case 1:
-            case 2:
-                NumClockTs = 1;
-                break;
-            case 3:
-            case 4:
-            case 7:
-                NumClockTs = 2;
-                break;
-            case 5:
-            case 6:
-            case 8:
-                NumClockTs = 3;
-                break;
-            default:
-                NumClockTs = 0;
-                break;
-        }
-
-        for (i = 0; i < NumClockTs; i++)
-        {
-            /* clock_timestamp_flag[i] */
-            BitstreamRead1Bit(stream, &temp);
-            if (temp)
-            {
-                /* ct_type */
-                BitstreamReadBits(stream, 2, &temp);
-                /* nuit_field_based_flag */
-                BitstreamRead1Bit(stream, &temp);
-                /* counting_type        */
-                BitstreamReadBits(stream, 5, &temp);
-                /* full_timestamp_flag */
-                BitstreamRead1Bit(stream, &temp);
-                full_timestamp_flag = temp;
-                /* discontinuity_flag */
-                BitstreamRead1Bit(stream, &temp);
-                /* cnt_dropped_flag */
-                BitstreamRead1Bit(stream, &temp);
-                /* n_frames           */
-                BitstreamReadBits(stream, 8, &temp);
-
-
-                if (full_timestamp_flag)
-                {
-                    /* seconds_value */
-                    BitstreamReadBits(stream, 6, &temp);
-                    /* minutes_value */
-                    BitstreamReadBits(stream, 6, &temp);
-                    /* hours_value */
-                    BitstreamReadBits(stream, 5, &temp);
-                }
-                else
-                {
-                    /* seconds_flag  */
-                    BitstreamRead1Bit(stream, &temp);
-                    if (temp)
-                    {
-                        /* seconds_value */
-                        BitstreamReadBits(stream, 6, &temp);
-                        /* minutes_flag  */
-                        BitstreamRead1Bit(stream, &temp);
-                        if (temp)
-                        {
-                            /* minutes_value */
-                            BitstreamReadBits(stream, 6, &temp);
-
-                            /* hourss_flag  */
-                            BitstreamRead1Bit(stream, &temp);
-
-                            if (temp)
-                            {
-                                /* hours_value */
-                                BitstreamReadBits(stream, 5, &temp);
-                            }
-
-                        }
-                    }
-                }
-
-                if (time_offset_length)
-                {
-                    /* time_offset */
-                    BitstreamReadBits(stream, time_offset_length, &temp);
-                }
-                else
-                {
-                    /* time_offset */
-                    temp = 0;
-                }
-            }
-        }
-    }
-    return AVCDEC_SUCCESS;
-}
-AVCDec_Status recovery_point(AVCDecObject *decvid, AVCDecBitstream *stream)
-{
-    OSCL_UNUSED_ARG(decvid);
-    uint temp;
-    /* recover_frame_cnt */
-    ue_v(stream, &temp);
-    /* exact_match_flag */
-    BitstreamRead1Bit(stream, &temp);
-    /* broken_link_flag */
-    BitstreamRead1Bit(stream, &temp);
-    /* changing slic_group_idc */
-    BitstreamReadBits(stream, 2, &temp);
-    return AVCDEC_SUCCESS;
-}
-AVCDec_Status dec_ref_pic_marking_repetition(AVCDecObject *decvid, AVCDecBitstream *stream)
-{
-    AVCSeqParamSet *currSPS;
-    uint temp;
-    currSPS = decvid->seqParams[decvid->common->seq_parameter_set_id];
-    /* original_idr_flag */
-    BitstreamRead1Bit(stream, &temp);
-    /* original_frame_num */
-    ue_v(stream, &temp);
-    if (currSPS->frame_mbs_only_flag == 0)
-    {
-        /* original_field_pic_flag */
-        BitstreamRead1Bit(stream, &temp);
-        if (temp)
-        {
-            /* original_bottom_field_flag */
-            BitstreamRead1Bit(stream, &temp);
-        }
-    }
-
-    /*  dec_ref_pic_marking(video,stream,sliceHdr); */
-
-
-    return AVCDEC_SUCCESS;
-}
-AVCDec_Status motion_constrained_slice_group_set(AVCDecObject *decvid, AVCDecBitstream *stream)
-{
-    OSCL_UNUSED_ARG(decvid);
-    uint temp, i, numBits;
-    /* num_slice_groups_in_set_minus1 */
-    ue_v(stream, &temp);
-
-    numBits = 0;/* ceil(log2(num_slice_groups_minus1+1)) bits */
-    i = temp;
-    while (i > 0)
-    {
-        numBits++;
-        i >>= 1;
-    }
-    for (i = 0; i <= temp; i++)
-    {
-        /* slice_group_id */
-        BitstreamReadBits(stream, numBits, &temp);
-    }
-    /* exact_sample_value_match_flag */
-    BitstreamRead1Bit(stream, &temp);
-    /* pan_scan_rect_flag */
-    BitstreamRead1Bit(stream, &temp);
-    if (temp)
-    {
-        /* pan_scan_rect_id */
-        ue_v(stream, &temp);
-    }
-
-    return AVCDEC_SUCCESS;
-}
-
diff --git a/media/libstagefright/codecs/avc/dec/src/itrans.cpp b/media/libstagefright/codecs/avc/dec/src/itrans.cpp
deleted file mode 100644 (file)
index 02c550d..0000000
+++ /dev/null
@@ -1,307 +0,0 @@
-/* ------------------------------------------------------------------
- * 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 "avclib_common.h"
-
-/* input are in the first 16 elements of block,
-   output must be in the location specified in Figure 8-6. */
-/* subclause 8.5.6 */
-void Intra16DCTrans(int16 *block, int Qq, int Rq)
-{
-    int m0, m1, m2, m3;
-    int j, offset;
-    int16 *inout;
-    int scale = dequant_coefres[Rq][0];
-
-    inout = block;
-    for (j = 0; j < 4; j++)
-    {
-        m0 = inout[0] + inout[4];
-        m1 = inout[0] - inout[4];
-        m2 = inout[8] + inout[12];
-        m3 = inout[8] - inout[12];
-
-
-        inout[0] = m0 + m2;
-        inout[4] = m0 - m2;
-        inout[8] = m1 - m3;
-        inout[12] = m1 + m3;
-        inout += 64;
-    }
-
-    inout = block;
-
-    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 = inout[0] + inout[64];
-            m1 = inout[0] - inout[64];
-            m2 = inout[128] + inout[192];
-            m3 = inout[128] - inout[192];
-
-            inout[0] = ((m0 + m2) * scale) << Qq;
-            inout[64] = ((m0 - m2) * scale) << Qq;
-            inout[128] = ((m1 - m3) * scale) << Qq;
-            inout[192] = ((m1 + m3) * scale) << Qq;
-            inout += 4;
-        }
-    }
-    else
-    {
-        Qq = 2 - Qq;
-        offset = 1 << (Qq - 1);
-
-        for (j = 0; j < 4; j++)
-        {
-            m0 = inout[0] + inout[64];
-            m1 = inout[0] - inout[64];
-            m2 = inout[128] + inout[192];
-            m3 = inout[128] - inout[192];
-
-            inout[0] = (((m0 + m2) * scale + offset) >> Qq);
-            inout[64] = (((m0 - m2) * scale + offset) >> Qq);
-            inout[128] = (((m1 - m3) * scale + offset) >> Qq);
-            inout[192] = (((m1 + m3) * scale + offset) >> Qq);
-            inout += 4;
-        }
-    }
-
-    return ;
-}
-
-/* see subclase 8.5.8 */
-void itrans(int16 *block, uint8 *pred, uint8 *cur, int width)
-{
-    int e0, e1, e2, e3; /* note, at every step of the calculation, these values */
-    /* shall never exceed 16bit sign value, but we don't check */
-    int i;           /* to save the cycles. */
-    int16 *inout;
-
-    inout = block;
-
-    for (i = 4; i > 0; i--)
-    {
-        e0 = inout[0] + inout[2];
-        e1 = inout[0] - inout[2];
-        e2 = (inout[1] >> 1) - inout[3];
-        e3 = inout[1] + (inout[3] >> 1);
-
-        inout[0] = e0 + e3;
-        inout[1] = e1 + e2;
-        inout[2] = e1 - e2;
-        inout[3] = e0 - e3;
-
-        inout += 16;
-    }
-
-    for (i = 4; i > 0; i--)
-    {
-        e0 = block[0] + block[32];
-        e1 = block[0] - block[32];
-        e2 = (block[16] >> 1) - block[48];
-        e3 = block[16] + (block[48] >> 1);
-
-        e0 += e3;
-        e3 = (e0 - (e3 << 1)); /* e0-e3 */
-        e1 += e2;
-        e2 = (e1 - (e2 << 1)); /* e1-e2 */
-        e0 += 32;
-        e1 += 32;
-        e2 += 32;
-        e3 += 32;
-#ifdef USE_PRED_BLOCK
-        e0 = pred[0] + (e0 >> 6);
-        if ((uint)e0 > 0xFF)   e0 = 0xFF & (~(e0 >> 31));  /* clip */
-        e1 = pred[20] + (e1 >> 6);
-        if ((uint)e1 > 0xFF)   e1 = 0xFF & (~(e1 >> 31));  /* clip */
-        e2 = pred[40] + (e2 >> 6);
-        if ((uint)e2 > 0xFF)   e2 = 0xFF & (~(e2 >> 31));  /* clip */
-        e3 = pred[60] + (e3 >> 6);
-        if ((uint)e3 > 0xFF)   e3 = 0xFF & (~(e3 >> 31));  /* clip */
-        *cur = e0;
-        *(cur += width) = e1;
-        *(cur += width) = e2;
-        cur[width] = e3;
-        cur -= (width << 1);
-        cur++;
-        pred++;
-#else
-        OSCL_UNUSED_ARG(pred);
-
-        e0 = *cur + (e0 >> 6);
-        if ((uint)e0 > 0xFF)   e0 = 0xFF & (~(e0 >> 31));  /* clip */
-        *cur = e0;
-        e1 = *(cur += width) + (e1 >> 6);
-        if ((uint)e1 > 0xFF)   e1 = 0xFF & (~(e1 >> 31));  /* clip */
-        *cur = e1;
-        e2 = *(cur += width) + (e2 >> 6);
-        if ((uint)e2 > 0xFF)   e2 = 0xFF & (~(e2 >> 31));  /* clip */
-        *cur = e2;
-        e3 = cur[width] + (e3 >> 6);
-        if ((uint)e3 > 0xFF)   e3 = 0xFF & (~(e3 >> 31));  /* clip */
-        cur[width] = e3;
-        cur -= (width << 1);
-        cur++;
-#endif
-        block++;
-    }
-
-    return ;
-}
-
-/* see subclase 8.5.8 */
-void ictrans(int16 *block, uint8 *pred, uint8 *cur, int width)
-{
-    int e0, e1, e2, e3; /* note, at every step of the calculation, these values */
-    /* shall never exceed 16bit sign value, but we don't check */
-    int i;           /* to save the cycles. */
-    int16 *inout;
-
-    inout = block;
-
-    for (i = 4; i > 0; i--)
-    {
-        e0 = inout[0] + inout[2];
-        e1 = inout[0] - inout[2];
-        e2 = (inout[1] >> 1) - inout[3];
-        e3 = inout[1] + (inout[3] >> 1);
-
-        inout[0] = e0 + e3;
-        inout[1] = e1 + e2;
-        inout[2] = e1 - e2;
-        inout[3] = e0 - e3;
-
-        inout += 16;
-    }
-
-    for (i = 4; i > 0; i--)
-    {
-        e0 = block[0] + block[32];
-        e1 = block[0] - block[32];
-        e2 = (block[16] >> 1) - block[48];
-        e3 = block[16] + (block[48] >> 1);
-
-        e0 += e3;
-        e3 = (e0 - (e3 << 1)); /* e0-e3 */
-        e1 += e2;
-        e2 = (e1 - (e2 << 1)); /* e1-e2 */
-        e0 += 32;
-        e1 += 32;
-        e2 += 32;
-        e3 += 32;
-#ifdef USE_PRED_BLOCK
-        e0 = pred[0] + (e0 >> 6);
-        if ((uint)e0 > 0xFF)   e0 = 0xFF & (~(e0 >> 31));  /* clip */
-        e1 = pred[12] + (e1 >> 6);
-        if ((uint)e1 > 0xFF)   e1 = 0xFF & (~(e1 >> 31));  /* clip */
-        e2 = pred[24] + (e2 >> 6);
-        if ((uint)e2 > 0xFF)   e2 = 0xFF & (~(e2 >> 31));  /* clip */
-        e3 = pred[36] + (e3 >> 6);
-        if ((uint)e3 > 0xFF)   e3 = 0xFF & (~(e3 >> 31));  /* clip */
-        *cur = e0;
-        *(cur += width) = e1;
-        *(cur += width) = e2;
-        cur[width] = e3;
-        cur -= (width << 1);
-        cur++;
-        pred++;
-#else
-        OSCL_UNUSED_ARG(pred);
-
-        e0 = *cur + (e0 >> 6);
-        if ((uint)e0 > 0xFF)   e0 = 0xFF & (~(e0 >> 31));  /* clip */
-        *cur = e0;
-        e1 = *(cur += width) + (e1 >> 6);
-        if ((uint)e1 > 0xFF)   e1 = 0xFF & (~(e1 >> 31));  /* clip */
-        *cur = e1;
-        e2 = *(cur += width) + (e2 >> 6);
-        if ((uint)e2 > 0xFF)   e2 = 0xFF & (~(e2 >> 31));  /* clip */
-        *cur = e2;
-        e3 = cur[width] + (e3 >> 6);
-        if ((uint)e3 > 0xFF)   e3 = 0xFF & (~(e3 >> 31));  /* clip */
-        cur[width] = e3;
-        cur -= (width << 1);
-        cur++;
-#endif
-        block++;
-    }
-
-    return ;
-}
-
-/* see subclause 8.5.7 */
-void ChromaDCTrans(int16 *block, int Qq, int Rq)
-{
-    int c00, c01, c10, c11;
-    int f0, f1, f2, f3;
-    int scale = dequant_coefres[Rq][0];
-
-    c00 = block[0] + block[4];
-    c01 = block[0] - block[4];
-    c10 = block[64] + block[68];
-    c11 = block[64] - block[68];
-
-    f0 = c00 + c10;
-    f1 = c01 + c11;
-    f2 = c00 - c10;
-    f3 = c01 - c11;
-
-    if (Qq >= 1)
-    {
-        Qq -= 1;
-        block[0] = (f0 * scale) << Qq;
-        block[4] = (f1 * scale) << Qq;
-        block[64] = (f2 * scale) << Qq;
-        block[68] = (f3 * scale) << Qq;
-    }
-    else
-    {
-        block[0] = (f0 * scale) >> 1;
-        block[4] = (f1 * scale) >> 1;
-        block[64] = (f2 * scale) >> 1;
-        block[68] = (f3 * scale) >> 1;
-    }
-
-    return ;
-}
-
-
-void copy_block(uint8 *pred, uint8 *cur, int width, int pred_pitch)
-{
-    uint32 temp;
-
-    temp = *((uint32*)pred);
-    pred += pred_pitch;
-    *((uint32*)cur) = temp;
-    cur += width;
-    temp = *((uint32*)pred);
-    pred += pred_pitch;
-    *((uint32*)cur) = temp;
-    cur += width;
-    temp = *((uint32*)pred);
-    pred += pred_pitch;
-    *((uint32*)cur) = temp;
-    cur += width;
-    temp = *((uint32*)pred);
-    *((uint32*)cur) = temp;
-
-    return ;
-}
-
-
diff --git a/media/libstagefright/codecs/avc/dec/src/pred_inter.cpp b/media/libstagefright/codecs/avc/dec/src/pred_inter.cpp
deleted file mode 100644 (file)
index ba36c37..0000000
+++ /dev/null
@@ -1,2329 +0,0 @@
-/* ------------------------------------------------------------------
- * 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 "avcdec_lib.h"
-
-
-#define CLIP_RESULT(x)      if((uint)x > 0xFF){ \
-                 x = 0xFF & (~(x>>31));}
-
-/* (blkwidth << 2) + (dy << 1) + dx */
-static void (*const ChromaMC_SIMD[8])(uint8 *, int , int , int , uint8 *, int, int , int) =
-{
-    &ChromaFullMC_SIMD,
-    &ChromaHorizontalMC_SIMD,
-    &ChromaVerticalMC_SIMD,
-    &ChromaDiagonalMC_SIMD,
-    &ChromaFullMC_SIMD,
-    &ChromaHorizontalMC2_SIMD,
-    &ChromaVerticalMC2_SIMD,
-    &ChromaDiagonalMC2_SIMD
-};
-/* Perform motion prediction and compensation with residue if exist. */
-void InterMBPrediction(AVCCommonObj *video)
-{
-    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->pitch;
-    int picHeight = currPic->height;
-    int16 *dataBlock;
-    uint32 cbp4x4;
-    uint32 tmp_word;
-
-    tmp_word = y_position * picWidth;
-    curL = currPic->Sl + tmp_word + x_position;
-    offset = (tmp_word >> 2) + (x_position >> 1);
-    curCb = currPic->Scb + offset;
-    curCr = currPic->Scr + offset;
-
-#ifdef USE_PRED_BLOCK
-    predBlock = video->pred + 84;
-    predCb = video->pred + 452;
-    predCr = video->pred + 596;
-#else
-    predBlock = curL;
-    predCb = curCb;
-    predCr = curCr;
-#endif
-
-    GetMotionVectorPredictor(video, false);
-
-    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);  // check this
-            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);
-#ifdef USE_PRED_BLOCK
-            offsetP = (block_y * 80) + (block_x << 2);
-            LumaMotionComp(ref_l, picWidth, picHeight, x_pos, y_pos,
-                           /*comp_Sl + offset + offset_x,*/
-                           predBlock + offsetP, 20, MbWidth, MbHeight);
-#else
-            offsetP = (block_y << 2) * picWidth + (block_x << 2);
-            LumaMotionComp(ref_l, picWidth, picHeight, x_pos, y_pos,
-                           /*comp_Sl + offset + offset_x,*/
-                           predBlock + offsetP, picWidth, MbWidth, MbHeight);
-#endif
-
-#ifdef USE_PRED_BLOCK
-            offsetP = (block_y * 24) + (block_x << 1);
-            ChromaMotionComp(ref_Cb, picWidth >> 1, picHeight >> 1, x_pos, y_pos,
-                             /*comp_Scb +  offsetC,*/
-                             predCb + offsetP, 12, MbWidth >> 1, MbHeight >> 1);
-            ChromaMotionComp(ref_Cr, picWidth >> 1, picHeight >> 1, x_pos, y_pos,
-                             /*comp_Scr +  offsetC,*/
-                             predCr + offsetP, 12, MbWidth >> 1, MbHeight >> 1);
-#else
-            offsetP = (block_y * picWidth) + (block_x << 1);
-            ChromaMotionComp(ref_Cb, picWidth >> 1, picHeight >> 1, x_pos, y_pos,
-                             /*comp_Scb +  offsetC,*/
-                             predCb + offsetP, picWidth >> 1, MbWidth >> 1, MbHeight >> 1);
-            ChromaMotionComp(ref_Cr, picWidth >> 1, picHeight >> 1, x_pos, y_pos,
-                             /*comp_Scr +  offsetC,*/
-                             predCr + offsetP, picWidth >> 1, MbWidth >> 1, MbHeight >> 1);
-#endif
-
-            offset_indx = currMB->SubMbPartWidth[mbPartIdx] >> 3;
-        }
-        offset_MbPart_indx = currMB->MbPartWidth >> 4;
-    }
-
-    /* used in decoder, used to be if(!encFlag)  */
-
-    /* transform in raster scan order */
-    dataBlock = video->block;
-    cbp4x4 = video->cbp4x4;
-    /* luma */
-    for (block_y = 4; block_y > 0; block_y--)
-    {
-        for (block_x = 4; block_x > 0; block_x--)
-        {
-#ifdef USE_PRED_BLOCK
-            if (cbp4x4&1)
-            {
-                itrans(dataBlock, predBlock, predBlock, 20);
-            }
-#else
-            if (cbp4x4&1)
-            {
-                itrans(dataBlock, curL, curL, picWidth);
-            }
-#endif
-            cbp4x4 >>= 1;
-            dataBlock += 4;
-#ifdef USE_PRED_BLOCK
-            predBlock += 4;
-#else
-            curL += 4;
-#endif
-        }
-        dataBlock += 48;
-#ifdef USE_PRED_BLOCK
-        predBlock += 64;
-#else
-        curL += ((picWidth << 2) - 16);
-#endif
-    }
-
-    /* chroma */
-    picWidth = (picWidth >> 1);
-    for (block_y = 2; block_y > 0; block_y--)
-    {
-        for (block_x = 2; block_x > 0; block_x--)
-        {
-#ifdef USE_PRED_BLOCK
-            if (cbp4x4&1)
-            {
-                ictrans(dataBlock, predCb, predCb, 12);
-            }
-#else
-            if (cbp4x4&1)
-            {
-                ictrans(dataBlock, curCb, curCb, picWidth);
-            }
-#endif
-            cbp4x4 >>= 1;
-            dataBlock += 4;
-#ifdef USE_PRED_BLOCK
-            predCb += 4;
-#else
-            curCb += 4;
-#endif
-        }
-        for (block_x = 2; block_x > 0; block_x--)
-        {
-#ifdef USE_PRED_BLOCK
-            if (cbp4x4&1)
-            {
-                ictrans(dataBlock, predCr, predCr, 12);
-            }
-#else
-            if (cbp4x4&1)
-            {
-                ictrans(dataBlock, curCr, curCr, picWidth);
-            }
-#endif
-            cbp4x4 >>= 1;
-            dataBlock += 4;
-#ifdef USE_PRED_BLOCK
-            predCr += 4;
-#else
-            curCr += 4;
-#endif
-        }
-        dataBlock += 48;
-#ifdef USE_PRED_BLOCK
-        predCb += 40;
-        predCr += 40;
-#else
-        curCb += ((picWidth << 2) - 8);
-        curCr += ((picWidth << 2) - 8);
-#endif
-    }
-
-#ifdef MB_BASED_DEBLOCK
-    SaveNeighborForIntraPred(video, offset);
-#endif
-
-    return ;
-}
-
-
-/* preform the actual  motion comp here */
-void LumaMotionComp(uint8 *ref, int picwidth, int picheight,
-                    int x_pos, int y_pos,
-                    uint8 *pred, int pred_pitch,
-                    int blkwidth, int blkheight)
-{
-    int dx, dy;
-    uint8 temp[24][24]; /* for padding, make the size multiple of 4 for packing */
-    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 */
-        if (x_pos >= 0 && x_pos + blkwidth <= picwidth && y_pos >= 0 && y_pos + blkheight <= picheight)
-        {
-            ref += y_pos * picwidth + x_pos;
-            FullPelMC(ref, picwidth, pred, pred_pitch, blkwidth, blkheight);
-        }
-        else
-        {
-            CreatePad(ref, picwidth, picheight, x_pos, y_pos, &temp[0][0], blkwidth, blkheight);
-            FullPelMC(&temp[0][0], 24, pred, pred_pitch, blkwidth, blkheight);
-        }
-
-    }   /* other positions */
-    else  if (dy == 0)
-    { /* no vertical interpolation *//* a,b,c*/
-
-        if (x_pos - 2 >= 0 && x_pos + 3 + blkwidth <= picwidth && y_pos >= 0 && y_pos + blkheight <= picheight)
-        {
-            ref += y_pos * picwidth + x_pos;
-
-            HorzInterp1MC(ref, picwidth, pred, pred_pitch, blkwidth, blkheight, dx);
-        }
-        else  /* need padding */
-        {
-            CreatePad(ref, picwidth, picheight, x_pos - 2, y_pos, &temp[0][0], blkwidth + 5, blkheight);
-
-            HorzInterp1MC(&temp[0][2], 24, pred, pred_pitch, blkwidth, blkheight, dx);
-        }
-    }
-    else if (dx == 0)
-    { /*no horizontal interpolation *//* d,h,n */
-
-        if (x_pos >= 0 && x_pos + blkwidth <= picwidth && y_pos - 2 >= 0 && y_pos + 3 + blkheight <= picheight)
-        {
-            ref += y_pos * picwidth + x_pos;
-
-            VertInterp1MC(ref, picwidth, pred, pred_pitch, blkwidth, blkheight, dy);
-        }
-        else  /* need padding */
-        {
-            CreatePad(ref, picwidth, picheight, x_pos, y_pos - 2, &temp[0][0], blkwidth, blkheight + 5);
-
-            VertInterp1MC(&temp[2][0], 24, pred, pred_pitch, blkwidth, blkheight, dy);
-        }
-    }
-    else if (dy == 2)
-    {  /* horizontal cross *//* i, j, k */
-
-        if (x_pos - 2 >= 0 && x_pos + 3 + blkwidth <= picwidth && y_pos - 2 >= 0 && y_pos + 3 + blkheight <= picheight)
-        {
-            ref += y_pos * picwidth + x_pos - 2; /* move to the left 2 pixels */
-
-            VertInterp2MC(ref, picwidth, &temp2[0][0], 21, blkwidth + 5, blkheight);
-
-            HorzInterp2MC(&temp2[0][2], 21, pred, pred_pitch, blkwidth, blkheight, dx);
-        }
-        else /* need padding */
-        {
-            CreatePad(ref, picwidth, picheight, x_pos - 2, y_pos - 2, &temp[0][0], blkwidth + 5, blkheight + 5);
-
-            VertInterp2MC(&temp[2][0], 24, &temp2[0][0], 21, blkwidth + 5, blkheight);
-
-            HorzInterp2MC(&temp2[0][2], 21, pred, pred_pitch, blkwidth, blkheight, dx);
-        }
-    }
-    else if (dx == 2)
-    { /* vertical cross */ /* f,q */
-
-        if (x_pos - 2 >= 0 && x_pos + 3 + blkwidth <= picwidth && y_pos - 2 >= 0 && y_pos + 3 + blkheight <= picheight)
-        {
-            ref += (y_pos - 2) * picwidth + x_pos; /* move to up 2 lines */
-
-            HorzInterp3MC(ref, picwidth, &temp2[0][0], 21, blkwidth, blkheight + 5);
-            VertInterp3MC(&temp2[2][0], 21, pred, pred_pitch, blkwidth, blkheight, dy);
-        }
-        else  /* need padding */
-        {
-            CreatePad(ref, picwidth, picheight, x_pos - 2, y_pos - 2, &temp[0][0], blkwidth + 5, blkheight + 5);
-            HorzInterp3MC(&temp[0][2], 24, &temp2[0][0], 21, blkwidth, blkheight + 5);
-            VertInterp3MC(&temp2[2][0], 21, pred, pred_pitch, blkwidth, blkheight, dy);
-        }
-    }
-    else
-    { /* diagonal *//* e,g,p,r */
-
-        if (x_pos - 2 >= 0 && x_pos + 3 + (dx / 2) + blkwidth <= picwidth &&
-                y_pos - 2 >= 0 && y_pos + 3 + blkheight + (dy / 2) <= picheight)
-        {
-            ref2 = ref + (y_pos + (dy / 2)) * picwidth + x_pos;
-
-            ref += (y_pos * picwidth) + x_pos + (dx / 2);
-
-            DiagonalInterpMC(ref2, ref, picwidth, pred, pred_pitch, blkwidth, blkheight);
-        }
-        else  /* need padding */
-        {
-            CreatePad(ref, picwidth, picheight, x_pos - 2, y_pos - 2, &temp[0][0], blkwidth + 5 + (dx / 2), blkheight + 5 + (dy / 2));
-
-            ref2 = &temp[2 + (dy/2)][2];
-
-            ref = &temp[2][2 + (dx/2)];
-
-            DiagonalInterpMC(ref2, ref, 24, pred, pred_pitch, blkwidth, blkheight);
-        }
-    }
-
-    return ;
-}
-
-void CreateAlign(uint8 *ref, int picwidth, int y_pos,
-                 uint8 *out, int blkwidth, int blkheight)
-{
-    int i, j;
-    int offset, out_offset;
-    uint32 prev_pix, result, pix1, pix2, pix4;
-
-    out_offset = 24 - blkwidth;
-
-    //switch(x_pos&0x3){
-    switch (((uint32)ref)&0x3)
-    {
-        case 1:
-            ref += y_pos * picwidth;
-            offset =  picwidth - 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:
-            ref += y_pos * picwidth;
-            offset =  picwidth - 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:
-            ref += y_pos * picwidth;
-            offset =  picwidth - 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 CreatePad(uint8 *ref, int picwidth, int picheight, int x_pos, int y_pos,
-               uint8 *out, int blkwidth, int blkheight)
-{
-    int x_inc0, x_mid;
-    int y_inc, y_inc0, y_inc1, y_mid;
-    int i, j;
-    int offset;
-
-    if (x_pos < 0)
-    {
-        x_inc0 = 0;  /* increment for the first part */
-        x_mid = ((blkwidth + x_pos > 0) ? -x_pos : blkwidth);  /* stopping point */
-        x_pos = 0;
-    }
-    else if (x_pos + blkwidth > picwidth)
-    {
-        x_inc0 = 1;  /* increasing */
-        x_mid = ((picwidth > x_pos) ? picwidth - x_pos - 1 : 0);  /* clip negative to zero, encode fool proof! */
-    }
-    else    /* normal case */
-    {
-        x_inc0 = 1;
-        x_mid = blkwidth; /* just one run */
-    }
-
-
-    /* boundary for y_pos, taking the result from x_pos into account */
-    if (y_pos < 0)
-    {
-        y_inc0 = (x_inc0 ? - x_mid : -blkwidth + x_mid); /* offset depending on x_inc1 and x_inc0 */
-        y_inc1 = picwidth + y_inc0;
-        y_mid = ((blkheight + y_pos > 0) ? -y_pos : blkheight); /* clip to prevent memory corruption */
-        y_pos = 0;
-    }
-    else  if (y_pos + blkheight > picheight)
-    {
-        y_inc1 = (x_inc0 ? - x_mid : -blkwidth + x_mid); /* saturate */
-        y_inc0 = picwidth + y_inc1;                 /* increasing */
-        y_mid = ((picheight > y_pos) ? picheight - 1 - y_pos : 0);
-    }
-    else  /* normal case */
-    {
-        y_inc1 = (x_inc0 ? - x_mid : -blkwidth + x_mid);
-        y_inc0 = picwidth + y_inc1;
-        y_mid = blkheight;
-    }
-
-    /* clip y_pos and x_pos */
-    if (y_pos > picheight - 1) y_pos = picheight - 1;
-    if (x_pos > picwidth - 1) x_pos = picwidth - 1;
-
-    ref += y_pos * picwidth + x_pos;
-
-    y_inc = y_inc0;  /* start with top half */
-
-    offset = 24 - blkwidth; /* to use in offset out */
-    blkwidth -= x_mid; /* to use in the loop limit */
-
-    if (x_inc0 == 0)
-    {
-        for (j = 0; j < blkheight; j++)
-        {
-            if (j == y_mid)  /* put a check here to reduce the code size (for unrolling the loop) */
-            {
-                y_inc = y_inc1;  /* switch to lower half */
-            }
-            for (i = x_mid; i > 0; i--)   /* first or third quarter */
-            {
-                *out++ = *ref;
-            }
-            for (i = blkwidth; i > 0; i--)  /* second or fourth quarter */
-            {
-                *out++ = *ref++;
-            }
-            out += offset;
-            ref += y_inc;
-        }
-    }
-    else
-    {
-        for (j = 0; j < blkheight; j++)
-        {
-            if (j == y_mid)  /* put a check here to reduce the code size (for unrolling the loop) */
-            {
-                y_inc = y_inc1;  /* switch to lower half */
-            }
-            for (i = x_mid; i > 0; i--)   /* first or third quarter */
-            {
-                *out++ = *ref++;
-            }
-            for (i = blkwidth; i > 0; i--)  /* second or fourth quarter */
-            {
-                *out++ = *ref;
-            }
-            out += offset;
-            ref += y_inc;
-        }
-    }
-
-    return ;
-}
-
-void HorzInterp1MC(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 HorzInterp2MC(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 HorzInterp3MC(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 VertInterp1MC(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)
-    {
-        CreateAlign(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 VertInterp2MC(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 VertInterp3MC(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 DiagonalInterpMC(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)
-    {
-        CreateAlign(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 FullPelMC(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 ChromaMotionComp(uint8 *ref, int picwidth, int picheight,
-                      int x_pos, int y_pos,
-                      uint8 *pred, int pred_pitch,
-                      int blkwidth, int blkheight)
-{
-    int dx, dy;
-    int offset_dx, offset_dy;
-    int index;
-    uint8 temp[24][24];
-
-    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;
-
-    if ((x_pos >= 0 && x_pos + blkwidth + offset_dx <= picwidth) && (y_pos >= 0 && y_pos + blkheight + offset_dy <= picheight))
-    {
-        ref += y_pos * picwidth + x_pos;
-    }
-    else
-    {
-        CreatePad(ref, picwidth, picheight, x_pos, y_pos, &temp[0][0], blkwidth + offset_dx, blkheight + offset_dy);
-        ref = &temp[0][0];
-        picwidth = 24;
-    }
-
-    index = offset_dx + (offset_dy << 1) + ((blkwidth << 1) & 0x7);
-
-    (*(ChromaMC_SIMD[index]))(ref, picwidth , dx, dy, pred, pred_pitch, blkwidth, blkheight);
-    return ;
-}
-
-
-/* SIMD routines, unroll the loops in vertical direction, decreasing loops (things to be done)  */
-void ChromaDiagonalMC_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 ChromaHorizontalMC_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
-                             uint8 *pOut, int predPitch, int blkwidth, int blkheight)
-{
-    OSCL_UNUSED_ARG(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 ChromaVerticalMC_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
-                           uint8 *pOut, int predPitch, int blkwidth, int blkheight)
-{
-    OSCL_UNUSED_ARG(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 ChromaDiagonalMC2_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
-                            uint8 *pOut,  int predPitch, int blkwidth, int blkheight)
-{
-    OSCL_UNUSED_ARG(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 ChromaHorizontalMC2_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
-                              uint8 *pOut, int predPitch, int blkwidth, int blkheight)
-{
-    OSCL_UNUSED_ARG(dy);
-    OSCL_UNUSED_ARG(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 ChromaVerticalMC2_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
-                            uint8 *pOut, int predPitch, int blkwidth, int blkheight)
-{
-    OSCL_UNUSED_ARG(dx);
-    OSCL_UNUSED_ARG(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 ChromaFullMC_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
-                       uint8 *pOut, int predPitch, int blkwidth, int blkheight)
-{
-    OSCL_UNUSED_ARG(dx);
-    OSCL_UNUSED_ARG(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/dec/src/pred_intra.cpp b/media/libstagefright/codecs/avc/dec/src/pred_intra.cpp
deleted file mode 100644 (file)
index 0b613a4..0000000
+++ /dev/null
@@ -1,1786 +0,0 @@
-/* ------------------------------------------------------------------
- * 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 "avcdec_lib.h"
-
-#define CLIP_COMP  *comp++ = (uint8)(((uint)temp>0xFF)? 0xFF&(~(temp>>31)): temp)
-#define CLIP_RESULT(x)      if((uint)x > 0xFF){ \
-                 x = 0xFF & (~(x>>31));}
-
-
-/* We should combine the Intra4x4 functions with residual decoding and compensation  */
-AVCStatus IntraMBPrediction(AVCCommonObj *video)
-{
-    int component, SubBlock_indx, temp;
-    AVCStatus status;
-    AVCMacroblock *currMB = video->currMB;
-    AVCPictureData *currPic = video->currPic;
-    uint8 *curL, *curCb, *curCr;
-    uint8 *comp;
-    int block_x, block_y, offset;
-    int16 *dataBlock = video->block;
-    uint8 *predCb, *predCr;
-#ifdef USE_PRED_BLOCK
-    uint8 *pred;
-#endif
-    int pitch = currPic->pitch;
-    uint32 cbp4x4 = video->cbp4x4;
-
-    offset = (video->mb_y << 4) * pitch + (video->mb_x << 4);
-    curL = currPic->Sl + offset;
-
-#ifdef USE_PRED_BLOCK
-    video->pred_block = video->pred + 84;  /* point to separate prediction memory */
-    pred = video->pred_block;
-    video->pred_pitch = 20;
-#else
-    video->pred_block = curL;   /* point directly to the frame buffer */
-    video->pred_pitch = pitch;
-#endif
-
-    if (currMB->mbMode == AVC_I4)
-    {
-        /* luminance first */
-        block_x = block_y = 0;
-        for (component = 0; component < 4; component++)
-        {
-            block_x = ((component & 1) << 1);
-            block_y = ((component >> 1) << 1);
-            comp = curL;// + (block_x<<2) + (block_y<<2)*currPic->pitch;
-
-            for (SubBlock_indx = 0; SubBlock_indx < 4; SubBlock_indx++)
-            {
-                status = Intra_4x4(video, block_x, block_y, comp);
-                if (status != AVC_SUCCESS)
-                {
-                    return status;
-                }
-                /* transform following the 4x4 prediction, can't be SIMD
-                with other blocks. */
-#ifdef USE_PRED_BLOCK
-                if (cbp4x4&(1 << ((block_y << 2) + block_x)))
-                {
-                    itrans(dataBlock, pred, pred, 20);
-                }
-#else
-                if (cbp4x4&(1 << ((block_y << 2) + block_x)))
-                {
-                    itrans(dataBlock, comp, comp, pitch);
-                }
-#endif
-                temp = SubBlock_indx & 1;
-                if (temp)
-                {
-                    block_y++;
-                    block_x--;
-                    dataBlock += 60;
-#ifdef USE_PRED_BLOCK
-                    pred += 76;
-#else
-                    comp += ((pitch << 2) - 4);
-#endif
-                }
-                else
-                {
-                    block_x++;
-                    dataBlock += 4;
-#ifdef USE_PRED_BLOCK
-                    pred += 4;
-#else
-                    comp += 4;
-#endif
-                }
-            }
-            if (component&1)
-            {
-#ifdef USE_PRED_BLOCK
-                pred -= 8;
-#else
-                curL += (pitch << 3) - 8;
-#endif
-                dataBlock -= 8;
-            }
-            else
-            {
-#ifdef USE_PRED_BLOCK
-                pred -= 152;
-#else
-                curL += 8;
-#endif
-                dataBlock -= 120;
-            }
-        }
-        cbp4x4 >>= 16;
-    }
-    else   /* AVC_I16 */
-    {
-#ifdef MB_BASED_DEBLOCK
-        video->pintra_pred_top = video->intra_pred_top + (video->mb_x << 4);
-        video->pintra_pred_left = video->intra_pred_left + 1;
-        video->intra_pred_topleft = video->intra_pred_left[0];
-        pitch = 1;
-#else
-        video->pintra_pred_top = curL - pitch;
-        video->pintra_pred_left = curL - 1;
-        if (video->mb_y)
-        {
-            video->intra_pred_topleft = *(curL - pitch - 1);
-        }
-#endif
-        switch (currMB->i16Mode)
-        {
-            case AVC_I16_Vertical:      /* Intra_16x16_Vertical */
-                /* check availability of top */
-                if (video->intraAvailB)
-                {
-                    Intra_16x16_Vertical(video);
-                }
-                else
-                {
-                    return AVC_FAIL;
-                }
-                break;
-            case AVC_I16_Horizontal:        /* Intra_16x16_Horizontal */
-                /* check availability of left */
-                if (video->intraAvailA)
-                {
-                    Intra_16x16_Horizontal(video, pitch);
-                }
-                else
-                {
-                    return AVC_FAIL;
-                }
-                break;
-            case AVC_I16_DC:        /* Intra_16x16_DC */
-                Intra_16x16_DC(video, pitch);
-                break;
-            case AVC_I16_Plane:     /* Intra_16x16_Plane */
-                if (video->intraAvailA && video->intraAvailB && video->intraAvailD)
-                {
-                    Intra_16x16_Plane(video, pitch);
-                }
-                else
-                {
-                    return AVC_FAIL;
-                }
-                break;
-            default:
-                break;
-        }
-
-        pitch = currPic->pitch;
-
-        /* transform */
-        /* can go in raster scan order now */
-        /* can be done in SIMD,  */
-        for (block_y = 4; block_y > 0; block_y--)
-        {
-            for (block_x = 4; block_x > 0; block_x--)
-            {
-#ifdef USE_PRED_BLOCK
-                if (cbp4x4&1)
-                {
-                    itrans(dataBlock, pred, pred, 20);
-                }
-#else
-                if (cbp4x4&1)
-                {
-                    itrans(dataBlock, curL, curL, pitch);
-                }
-#endif
-                cbp4x4 >>= 1;
-                dataBlock += 4;
-#ifdef USE_PRED_BLOCK
-                pred += 4;
-#else
-                curL += 4;
-#endif
-            }
-            dataBlock += 48;
-#ifdef USE_PRED_BLOCK
-            pred += 64;
-#else
-            curL += ((pitch << 2) - 16);
-#endif
-        }
-    }
-
-    offset = (offset >> 2) + (video->mb_x << 2); //((video->mb_y << 3)* pitch + (video->mb_x << 3));
-    curCb = currPic->Scb + offset;
-    curCr = currPic->Scr + offset;
-
-#ifdef MB_BASED_DEBLOCK
-    video->pintra_pred_top_cb = video->intra_pred_top_cb + (video->mb_x << 3);
-    video->pintra_pred_left_cb = video->intra_pred_left_cb + 1;
-    video->intra_pred_topleft_cb = video->intra_pred_left_cb[0];
-    video->pintra_pred_top_cr = video->intra_pred_top_cr + (video->mb_x << 3);
-    video->pintra_pred_left_cr = video->intra_pred_left_cr + 1;
-    video->intra_pred_topleft_cr = video->intra_pred_left_cr[0];
-    pitch  = 1;
-#else
-    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);
-    }
-#endif
-
-#ifdef USE_PRED_BLOCK
-    predCb = video->pred + 452;
-    predCr = predCb + 144;
-    video->pred_pitch = 12;
-#else
-    predCb = curCb;
-    predCr = curCr;
-    video->pred_pitch = currPic->pitch >> 1;
-#endif
-    /* chrominance */
-    switch (currMB->intra_chroma_pred_mode)
-    {
-        case AVC_IC_DC:     /* Intra_Chroma_DC */
-            Intra_Chroma_DC(video, pitch, predCb, predCr);
-            break;
-        case AVC_IC_Horizontal:     /* Intra_Chroma_Horizontal */
-            if (video->intraAvailA)
-            {
-                /* check availability of left */
-                Intra_Chroma_Horizontal(video, pitch, predCb, predCr);
-            }
-            else
-            {
-                return AVC_FAIL;
-            }
-            break;
-        case AVC_IC_Vertical:       /* Intra_Chroma_Vertical */
-            if (video->intraAvailB)
-            {
-                /* check availability of top */
-                Intra_Chroma_Vertical(video, predCb, predCr);
-            }
-            else
-            {
-                return AVC_FAIL;
-            }
-            break;
-        case AVC_IC_Plane:      /* Intra_Chroma_Plane */
-            if (video->intraAvailA && video->intraAvailB && video->intraAvailD)
-            {
-                /* check availability of top and left */
-                Intra_Chroma_Plane(video, pitch, predCb, predCr);
-            }
-            else
-            {
-                return AVC_FAIL;
-            }
-            break;
-        default:
-            break;
-    }
-
-    /* transform, done in raster scan manner */
-    pitch = currPic->pitch >> 1;
-
-    for (block_y = 2; block_y > 0; block_y--)
-    {
-        for (block_x = 2; block_x > 0; block_x--)
-        {
-#ifdef USE_PRED_BLOCK
-            if (cbp4x4&1)
-            {
-                ictrans(dataBlock, predCb, predCb, 12);
-            }
-#else
-            if (cbp4x4&1)
-            {
-                ictrans(dataBlock, curCb, curCb, pitch);
-            }
-#endif
-            cbp4x4 >>= 1;
-            dataBlock += 4;
-#ifdef USE_PRED_BLOCK
-            predCb += 4;
-#else
-            curCb += 4;
-#endif
-        }
-        for (block_x = 2; block_x > 0; block_x--)
-        {
-#ifdef USE_PRED_BLOCK
-            if (cbp4x4&1)
-            {
-                ictrans(dataBlock, predCr, predCr, 12);
-            }
-#else
-            if (cbp4x4&1)
-            {
-                ictrans(dataBlock, curCr, curCr, pitch);
-            }
-#endif
-            cbp4x4 >>= 1;
-            dataBlock += 4;
-#ifdef USE_PRED_BLOCK
-            predCr += 4;
-#else
-            curCr += 4;
-#endif
-        }
-        dataBlock += 48;
-#ifdef USE_PRED_BLOCK
-        predCb += 40;
-        predCr += 40;
-#else
-        curCb += ((pitch << 2) - 8);
-        curCr += ((pitch << 2) - 8);
-#endif
-    }
-
-#ifdef MB_BASED_DEBLOCK
-    SaveNeighborForIntraPred(video, offset);
-#endif
-    return AVC_SUCCESS;
-}
-
-#ifdef MB_BASED_DEBLOCK
-void SaveNeighborForIntraPred(AVCCommonObj *video, int offset)
-{
-    AVCPictureData *currPic = video->currPic;
-    int pitch;
-    uint8 *pred, *predCb, *predCr;
-    uint8 *tmp_ptr, tmp_byte;
-    uint32 tmp_word;
-    int mb_x = video->mb_x;
-
-    /* save the value for intra prediction  */
-#ifdef USE_PRED_BLOCK
-    pitch = 20;
-    pred = video->pred + 384; /* bottom line for Y */
-    predCb = pred + 152;    /* bottom line for Cb */
-    predCr = predCb + 144;  /* bottom line for Cr */
-#else
-    pitch = currPic->pitch;
-    tmp_word = offset + (pitch << 2) - (pitch >> 1);
-    predCb = currPic->Scb + tmp_word;/* bottom line for Cb */
-    predCr = currPic->Scr + tmp_word;/* bottom line for Cr */
-
-    offset = (offset << 2) - (mb_x << 4);
-    pred = currPic->Sl + offset + (pitch << 4) - pitch;/* bottom line for Y */
-
-#endif
-
-    video->intra_pred_topleft = video->intra_pred_top[(mb_x<<4)+15];
-    video->intra_pred_topleft_cb = video->intra_pred_top_cb[(mb_x<<3)+7];
-    video->intra_pred_topleft_cr = video->intra_pred_top_cr[(mb_x<<3)+7];
-
-    /* then copy to video->intra_pred_top, intra_pred_top_cb, intra_pred_top_cr */
-    /*memcpy(video->intra_pred_top + (mb_x<<4), pred, 16);
-    memcpy(video->intra_pred_top_cb + (mb_x<<3), predCb, 8);
-    memcpy(video->intra_pred_top_cr + (mb_x<<3), predCr, 8);*/
-    tmp_ptr = video->intra_pred_top + (mb_x << 4);
-    *((uint32*)tmp_ptr) = *((uint32*)pred);
-    *((uint32*)(tmp_ptr + 4)) = *((uint32*)(pred + 4));
-    *((uint32*)(tmp_ptr + 8)) = *((uint32*)(pred + 8));
-    *((uint32*)(tmp_ptr + 12)) = *((uint32*)(pred + 12));
-    tmp_ptr = video->intra_pred_top_cb + (mb_x << 3);
-    *((uint32*)tmp_ptr) = *((uint32*)predCb);
-    *((uint32*)(tmp_ptr + 4)) = *((uint32*)(predCb + 4));
-    tmp_ptr = video->intra_pred_top_cr + (mb_x << 3);
-    *((uint32*)tmp_ptr) = *((uint32*)predCr);
-    *((uint32*)(tmp_ptr + 4)) = *((uint32*)(predCr + 4));
-
-
-    /* now save last column */
-#ifdef USE_PRED_BLOCK
-    pred = video->pred + 99;    /* last column*/
-#else
-    pred -= ((pitch << 4) - pitch - 15);    /* last column */
-#endif
-    tmp_ptr = video->intra_pred_left;
-    tmp_word = video->intra_pred_topleft;
-    tmp_byte = *(pred);
-    tmp_word |= (tmp_byte << 8);
-    tmp_byte = *(pred += pitch);
-    tmp_word |= (tmp_byte << 16);
-    tmp_byte = *(pred += pitch);
-    tmp_word |= (tmp_byte << 24);
-    *((uint32*)tmp_ptr) = tmp_word;
-    tmp_word = *(pred += pitch);
-    tmp_byte = *(pred += pitch);
-    tmp_word |= (tmp_byte << 8);
-    tmp_byte = *(pred += pitch);
-    tmp_word |= (tmp_byte << 16);
-    tmp_byte = *(pred += pitch);
-    tmp_word |= (tmp_byte << 24);
-    *((uint32*)(tmp_ptr += 4)) = tmp_word;
-    tmp_word = *(pred += pitch);
-    tmp_byte = *(pred += pitch);
-    tmp_word |= (tmp_byte << 8);
-    tmp_byte = *(pred += pitch);
-    tmp_word |= (tmp_byte << 16);
-    tmp_byte = *(pred += pitch);
-    tmp_word |= (tmp_byte << 24);
-    *((uint32*)(tmp_ptr += 4)) = tmp_word;
-    tmp_word = *(pred += pitch);
-    tmp_byte = *(pred += pitch);
-    tmp_word |= (tmp_byte << 8);
-    tmp_byte = *(pred += pitch);
-    tmp_word |= (tmp_byte << 16);
-    tmp_byte = *(pred += pitch);
-    tmp_word |= (tmp_byte << 24);
-    *((uint32*)(tmp_ptr += 4)) = tmp_word;
-    *(tmp_ptr += 4) = *(pred += pitch);
-
-    /* now for Cb */
-#ifdef USE_PRED_BLOCK
-    predCb = video->pred + 459;
-    pitch = 12;
-#else
-    pitch >>= 1;
-    predCb -= (7 * pitch - 7);
-#endif
-    tmp_ptr = video->intra_pred_left_cb;
-    tmp_word = video->intra_pred_topleft_cb;
-    tmp_byte = *(predCb);
-    tmp_word |= (tmp_byte << 8);
-    tmp_byte = *(predCb += pitch);
-    tmp_word |= (tmp_byte << 16);
-    tmp_byte = *(predCb += pitch);
-    tmp_word |= (tmp_byte << 24);
-    *((uint32*)tmp_ptr) = tmp_word;
-    tmp_word = *(predCb += pitch);
-    tmp_byte = *(predCb += pitch);
-    tmp_word |= (tmp_byte << 8);
-    tmp_byte = *(predCb += pitch);
-    tmp_word |= (tmp_byte << 16);
-    tmp_byte = *(predCb += pitch);
-    tmp_word |= (tmp_byte << 24);
-    *((uint32*)(tmp_ptr += 4)) = tmp_word;
-    *(tmp_ptr += 4) = *(predCb += pitch);
-
-    /* now for Cr */
-#ifdef USE_PRED_BLOCK
-    predCr = video->pred + 603;
-#else
-    predCr -= (7 * pitch - 7);
-#endif
-    tmp_ptr = video->intra_pred_left_cr;
-    tmp_word = video->intra_pred_topleft_cr;
-    tmp_byte = *(predCr);
-    tmp_word |= (tmp_byte << 8);
-    tmp_byte = *(predCr += pitch);
-    tmp_word |= (tmp_byte << 16);
-    tmp_byte = *(predCr += pitch);
-    tmp_word |= (tmp_byte << 24);
-    *((uint32*)tmp_ptr) = tmp_word;
-    tmp_word = *(predCr += pitch);
-    tmp_byte = *(predCr += pitch);
-    tmp_word |= (tmp_byte << 8);
-    tmp_byte = *(predCr += pitch);
-    tmp_word |= (tmp_byte << 16);
-    tmp_byte = *(predCr += pitch);
-    tmp_word |= (tmp_byte << 24);
-    *((uint32*)(tmp_ptr += 4)) = tmp_word;
-    *(tmp_ptr += 4) = *(predCr += pitch);
-
-    return ;
-}
-#endif /* MB_BASED_DEBLOCK */
-
-AVCStatus Intra_4x4(AVCCommonObj *video, int block_x, int block_y, uint8 *comp)
-{
-    AVCMacroblock *currMB = video->currMB;
-    int block_offset;
-    AVCNeighborAvailability availability;
-    int pitch = video->currPic->pitch;
-
-#ifdef USE_PRED_BLOCK
-    block_offset = (block_y * 80) + (block_x << 2);
-#else
-    block_offset = (block_y << 2) * pitch + (block_x << 2);
-#endif
-
-#ifdef MB_BASED_DEBLOCK
-    /* boundary blocks use video->pred_intra_top, pred_intra_left, pred_intra_topleft */
-    if (!block_x)
-    {
-        video->pintra_pred_left = video->intra_pred_left + 1 + (block_y << 2);
-        pitch = 1;
-    }
-    else
-    {
-        video->pintra_pred_left = video->pred_block + block_offset - 1;
-        pitch = video->pred_pitch;
-    }
-
-    if (!block_y)
-    {
-        video->pintra_pred_top = video->intra_pred_top + (block_x << 2) + (video->mb_x << 4);
-    }
-    else
-    {
-        video->pintra_pred_top = video->pred_block + block_offset - video->pred_pitch;
-    }
-
-    if (!block_x)
-    {
-        video->intra_pred_topleft = video->intra_pred_left[block_y<<2];
-    }
-    else if (!block_y)
-    {
-        video->intra_pred_topleft = video->intra_pred_top[(video->mb_x<<4)+(block_x<<2)-1];
-    }
-    else
-    {
-        video->intra_pred_topleft = video->pred_block[block_offset - video->pred_pitch - 1];
-    }
-
-#else
-    /* normal case */
-    video->pintra_pred_top = comp - pitch;
-    video->pintra_pred_left = comp - 1;
-    if (video->mb_y || block_y)
-    {
-        video->intra_pred_topleft = *(comp - pitch - 1);
-    }
-#endif
-
-    switch (currMB->i4Mode[(block_y << 2) + block_x])
-    {
-        case AVC_I4_Vertical:       /* Intra_4x4_Vertical */
-            if (block_y > 0 || video->intraAvailB)/* to prevent out-of-bound access*/
-            {
-                Intra_4x4_Vertical(video,  block_offset);
-            }
-            else
-            {
-                return AVC_FAIL;
-            }
-            break;
-
-        case AVC_I4_Horizontal:     /* Intra_4x4_Horizontal */
-            if (block_x || video->intraAvailA)  /* to prevent out-of-bound access */
-            {
-                Intra_4x4_Horizontal(video, pitch, block_offset);
-            }
-            else
-            {
-                return AVC_FAIL;
-            }
-            break;
-
-        case AVC_I4_DC:     /* Intra_4x4_DC */
-            availability.left = TRUE;
-            availability.top = TRUE;
-            if (!block_y)
-            { /* check availability up */
-                availability.top = video->intraAvailB ;
-            }
-            if (!block_x)
-            { /* check availability left */
-                availability.left = video->intraAvailA ;
-            }
-            Intra_4x4_DC(video, pitch, block_offset, &availability);
-            break;
-
-        case AVC_I4_Diagonal_Down_Left:     /* Intra_4x4_Diagonal_Down_Left */
-            /* lookup table will be more appropriate for this case  */
-            if (block_y == 0 && !video->intraAvailB)
-            {
-                return AVC_FAIL;
-            }
-
-            availability.top_right = BlkTopRight[(block_y<<2) + block_x];
-
-            if (availability.top_right == 2)
-            {
-                availability.top_right = video->intraAvailB;
-            }
-            else if (availability.top_right == 3)
-            {
-                availability.top_right = video->intraAvailC;
-            }
-
-            Intra_4x4_Down_Left(video, block_offset, &availability);
-            break;
-
-        case AVC_I4_Diagonal_Down_Right:        /* Intra_4x4_Diagonal_Down_Right */
-            if ((block_y && block_x)  /* to prevent out-of-bound access */
-                    || (block_y && video->intraAvailA)
-                    || (block_x && video->intraAvailB)
-                    || (video->intraAvailA && video->intraAvailD && video->intraAvailB))
-            {
-                Intra_4x4_Diagonal_Down_Right(video, pitch, block_offset);
-            }
-            else
-            {
-                return AVC_FAIL;
-            }
-            break;
-
-        case AVC_I4_Vertical_Right:     /* Intra_4x4_Vertical_Right */
-            if ((block_y && block_x)  /* to prevent out-of-bound access */
-                    || (block_y && video->intraAvailA)
-                    || (block_x && video->intraAvailB)
-                    || (video->intraAvailA && video->intraAvailD && video->intraAvailB))
-            {
-                Intra_4x4_Diagonal_Vertical_Right(video, pitch, block_offset);
-            }
-            else
-            {
-                return AVC_FAIL;
-            }
-            break;
-
-        case AVC_I4_Horizontal_Down:        /* Intra_4x4_Horizontal_Down */
-            if ((block_y && block_x)  /* to prevent out-of-bound access */
-                    || (block_y && video->intraAvailA)
-                    || (block_x && video->intraAvailB)
-                    || (video->intraAvailA && video->intraAvailD && video->intraAvailB))
-            {
-                Intra_4x4_Diagonal_Horizontal_Down(video, pitch, block_offset);
-            }
-            else
-            {
-                return AVC_FAIL;
-            }
-            break;
-
-        case AVC_I4_Vertical_Left:      /* Intra_4x4_Vertical_Left */
-            /* lookup table may be more appropriate for this case  */
-            if (block_y == 0 && !video->intraAvailB)
-            {
-                return AVC_FAIL;
-            }
-
-            availability.top_right = BlkTopRight[(block_y<<2) + block_x];
-
-            if (availability.top_right == 2)
-            {
-                availability.top_right = video->intraAvailB;
-            }
-            else if (availability.top_right == 3)
-            {
-                availability.top_right = video->intraAvailC;
-            }
-
-            Intra_4x4_Vertical_Left(video,  block_offset, &availability);
-            break;
-
-        case AVC_I4_Horizontal_Up:      /* Intra_4x4_Horizontal_Up */
-            if (block_x || video->intraAvailA)
-            {
-                Intra_4x4_Horizontal_Up(video, pitch, block_offset);
-            }
-            else
-            {
-                return AVC_FAIL;
-            }
-            break;
-
-
-        default:
-
-            break;
-    }
-
-    return AVC_SUCCESS;
-}
-
-
-/* =============================== BEGIN 4x4
-MODES======================================*/
-void Intra_4x4_Vertical(AVCCommonObj *video,  int block_offset)
-{
-    uint8 *comp_ref = video->pintra_pred_top;
-    uint32 temp;
-    uint8 *pred = video->pred_block + block_offset;
-    int pred_pitch = video->pred_pitch;
-
-    /*P = (int) *comp_ref++;
-    Q = (int) *comp_ref++;
-    R = (int) *comp_ref++;
-    S = (int) *comp_ref++;
-    temp = S|(R<<8)|(Q<<16)|(P<<24);*/
-    temp = *((uint32*)comp_ref);
-
-    *((uint32*)pred) =  temp; /* write 4 at a time */
-    pred += pred_pitch;
-    *((uint32*)pred) =  temp;
-    pred += pred_pitch;
-    *((uint32*)pred) =  temp;
-    pred += pred_pitch;
-    *((uint32*)pred) =  temp;
-
-    return ;
-}
-
-void Intra_4x4_Horizontal(AVCCommonObj *video, int pitch, int block_offset)
-{
-    uint8   *comp_ref = video->pintra_pred_left;
-    uint32 temp;
-    int P;
-    uint8 *pred = video->pred_block + block_offset;
-    int pred_pitch = video->pred_pitch;
-
-    P = *comp_ref;
-    temp = P | (P << 8);
-    temp = temp | (temp << 16);
-    *((uint32*)pred) = temp;
-    pred += pred_pitch;
-    comp_ref += pitch;
-    P = *comp_ref;
-    temp = P | (P << 8);
-    temp = temp | (temp << 16);
-    *((uint32*)pred) = temp;
-    pred += pred_pitch;
-    comp_ref += pitch;
-    P = *comp_ref;
-    temp = P | (P << 8);
-    temp = temp | (temp << 16);
-    *((uint32*)pred) = temp;
-    pred += pred_pitch;
-    comp_ref += pitch;
-    P = *comp_ref;
-    temp = P | (P << 8);
-    temp = temp | (temp << 16);
-    *((uint32*)pred) = temp;
-
-    return ;
-}
-
-void Intra_4x4_DC(AVCCommonObj *video, int pitch, int block_offset,
-                  AVCNeighborAvailability *availability)
-{
-    uint8   *comp_ref = video->pintra_pred_left;
-    uint32  temp;
-    int DC;
-    uint8 *pred = video->pred_block + block_offset;
-    int pred_pitch = video->pred_pitch;
-
-    if (availability->left)
-    {
-        DC = *comp_ref;
-        comp_ref += pitch;
-        DC += *comp_ref;
-        comp_ref += pitch;
-        DC += *comp_ref;
-        comp_ref += pitch;
-        DC += *comp_ref;
-        comp_ref = video->pintra_pred_top;
-
-        if (availability->top)
-        {
-            DC = (comp_ref[0] + comp_ref[1] + comp_ref[2] + comp_ref[3] + DC + 4) >> 3;
-        }
-        else
-        {
-            DC = (DC + 2) >> 2;
-
-        }
-    }
-    else if (availability->top)
-    {
-        comp_ref = video->pintra_pred_top;
-        DC = (comp_ref[0] + comp_ref[1] + comp_ref[2] + comp_ref[3] + 2) >> 2;
-
-    }
-    else
-    {
-        DC = 128;
-    }
-
-    temp = DC | (DC << 8);
-    temp = temp | (temp << 16);
-    *((uint32*)pred) = temp;
-    pred += pred_pitch;
-    *((uint32*)pred) = temp;
-    pred += pred_pitch;
-    *((uint32*)pred) = temp;
-    pred += pred_pitch;
-    *((uint32*)pred) = temp;
-
-    return ;
-}
-
-void Intra_4x4_Down_Left(AVCCommonObj *video, int block_offset,
-                         AVCNeighborAvailability *availability)
-{
-    uint8   *comp_refx = video->pintra_pred_top;
-    uint32 temp;
-    int r0, r1, r2, r3, r4, r5, r6, r7;
-    uint8 *pred = video->pred_block + block_offset;
-    int pred_pitch = video->pred_pitch;
-
-    r0 = *comp_refx++;
-    r1 = *comp_refx++;
-    r2 = *comp_refx++;
-    r3 = *comp_refx++;
-    if (availability->top_right)
-    {
-        r4 = *comp_refx++;
-        r5 = *comp_refx++;
-        r6 = *comp_refx++;
-        r7 = *comp_refx++;
-    }
-    else
-    {
-        r4 = r3;
-        r5 = r3;
-        r6 = r3;
-        r7 = r3;
-    }
-
-    r0 += (r1 << 1);
-    r0 += r2;
-    r0 += 2;
-    r0 >>= 2;
-    r1 += (r2 << 1);
-    r1 += r3;
-    r1 += 2;
-    r1 >>= 2;
-    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;
-    pred += pred_pitch;
-
-    temp = (temp >> 8) | (r4 << 24);
-    *((uint32*)pred) = temp;
-    pred += pred_pitch;
-
-    temp = (temp >> 8) | (r5 << 24);
-    *((uint32*)pred) = temp;
-    pred += pred_pitch;
-
-    temp = (temp >> 8) | (r6 << 24);
-    *((uint32*)pred) = temp;
-
-    return ;
-}
-
-void Intra_4x4_Diagonal_Down_Right(AVCCommonObj *video, int pitch, int
-                                   block_offset)
-{
-    uint8 *comp_refx = video->pintra_pred_top;
-    uint8 *comp_refy = video->pintra_pred_left;
-    uint32 temp;
-    int P_x, Q_x, R_x, P_y, Q_y, R_y, D;
-    int x0, x1, x2;
-    uint8 *pred = video->pred_block + block_offset;
-    int pred_pitch = video->pred_pitch;
-
-    temp = *((uint32*)comp_refx); /* read 4 bytes */
-    x0 = temp & 0xFF;
-    x1 = (temp >> 8) & 0xFF;
-    x2 = (temp >> 16) & 0xFF;
-
-    Q_x = (x0 + 2 * x1 + x2 + 2) >> 2;
-    R_x = (x1 + 2 * x2 + (temp >> 24) + 2) >> 2;
-
-    x2 = video->intra_pred_topleft; /* re-use x2 instead of y0 */
-    P_x = (x2 + 2 * x0 + x1 + 2) >> 2;
-
-    x1 = *comp_refy;
-    comp_refy += pitch; /* re-use x1 instead of y1 */
-    D = (x0 + 2 * x2 + x1 + 2) >> 2;
-
-    x0 = *comp_refy;
-    comp_refy += pitch; /* re-use x0 instead of y2 */
-    P_y = (x2 + 2 * x1 + x0 + 2) >> 2;
-
-    x2 = *comp_refy;
-    comp_refy += pitch; /* re-use x2 instead of y3 */
-    Q_y = (x1 + 2 * x0 + x2 + 2) >> 2;
-
-    x1 = *comp_refy;                    /* re-use x1 instead of y4 */
-    R_y = (x0 + 2 * x2 + x1 + 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;
-    pred += pred_pitch;
-
-    temp =  P_y | (D << 8);
-    temp |= (P_x << 16);
-    temp |= (Q_x << 24);
-    *((uint32*)pred) = temp;
-    pred += pred_pitch;
-
-    temp =  Q_y | (P_y << 8);
-    temp |= (D << 16);
-    temp |= (P_x << 24);
-    *((uint32*)pred) = temp;
-    pred += pred_pitch;
-
-    temp = R_y | (Q_y << 8);
-    temp |= (P_y << 16);
-    temp |= (D << 24);
-    *((uint32*)pred) = temp;
-
-    return ;
-}
-
-void    Intra_4x4_Diagonal_Vertical_Right(AVCCommonObj *video, int pitch, int block_offset)
-{
-    uint8   *comp_refx = video->pintra_pred_top;
-    uint8   *comp_refy = video->pintra_pred_left;
-    uint32 temp;
-    int P0, Q0, R0, S0, P1, Q1, R1, P2, Q2, D;
-    int x0, x1, x2;
-    uint8 *pred = video->pred_block + block_offset;
-    int pred_pitch = video->pred_pitch;
-
-    x0 = *comp_refx++;
-    x1 = *comp_refx++;
-    Q0 = x0 + x1 + 1;
-
-    x2 = *comp_refx++;
-    R0 = x1 + x2 + 1;
-
-    x1 = *comp_refx++; /* reuse x1 instead of x3 */
-    S0 = x2 + x1 + 1;
-
-    x1 = video->intra_pred_topleft; /* reuse x1 instead of y0 */
-    P0 = x1 + x0 + 1;
-
-    x2 = *comp_refy;
-    comp_refy += pitch; /* reuse x2 instead of y1 */
-    D = (x2 + 2 * x1 + x0 + 2) >> 2;
-
-    P1 = (P0 + Q0) >> 2;
-    Q1 = (Q0 + R0) >> 2;
-    R1 = (R0 + S0) >> 2;
-
-    P0 >>= 1;
-    Q0 >>= 1;
-    R0 >>= 1;
-    S0 >>= 1;
-
-    x0 = *comp_refy;
-    comp_refy += pitch; /* reuse x0 instead of y2 */
-    P2 = (x1 + 2 * x2 + x0 + 2) >> 2;
-    x1 = *comp_refy;
-    comp_refy += pitch; /* reuse x1 instead of y3 */
-    Q2 = (x2 + 2 * x0 + x1 + 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;
-    pred += pred_pitch;
-
-    temp =  D | (P1 << 8);
-    temp |= (Q1 << 16);
-    temp |= (R1 << 24);
-    *((uint32*)pred) =  temp;
-    pred += pred_pitch;
-
-    temp = P2 | (P0 << 8);
-    temp |= (Q0 << 16);
-    temp |= (R0 << 24);
-    *((uint32*)pred) =  temp;
-    pred += pred_pitch;
-
-    temp = Q2 | (D << 8);
-    temp |= (P1 << 16);
-    temp |= (Q1 << 24);
-    *((uint32*)pred) =  temp;
-
-    return ;
-}
-
-void Intra_4x4_Diagonal_Horizontal_Down(AVCCommonObj *video, int pitch,
-                                        int block_offset)
-{
-    uint8   *comp_refx = video->pintra_pred_top;
-    uint8   *comp_refy = video->pintra_pred_left;
-    uint32 temp;
-    int P0, Q0, R0, S0, P1, Q1, R1, P2, Q2, D;
-    int x0, x1, x2;
-    uint8 *pred = video->pred_block + block_offset;
-    int pred_pitch = video->pred_pitch;
-
-    x0 = *comp_refx++;
-    x1 = *comp_refx++;
-    x2 = *comp_refx++;
-    Q2 = (x0 + 2 * x1 + x2 + 2) >> 2;
-
-    x2 = video->intra_pred_topleft; /* reuse x2 instead of y0 */
-    P2 = (x2 + 2 * x0 + x1 + 2) >> 2;
-
-    x1 = *comp_refy;
-    comp_refy += pitch; /* reuse x1 instead of y1 */
-    D = (x1 + 2 * x2 + x0 + 2) >> 2;
-    P0 = x2 + x1 + 1;
-
-    x0 = *comp_refy;
-    comp_refy += pitch; /* reuse x0 instead of y2 */
-    Q0 = x1 + x0 + 1;
-
-    x1 = *comp_refy;
-    comp_refy += pitch; /* reuse x1 instead of y3 */
-    R0 = x0 + x1 + 1;
-
-    x2 = *comp_refy;    /* reuse x2 instead of y4 */
-    S0 = x1 + x2 + 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;
-    pred += pred_pitch;
-
-    temp = Q0 | (P1 << 8);
-    temp |= (P0 << 16);
-    temp |= (D << 24);
-    *((uint32*)pred) = temp;
-    pred += pred_pitch;
-
-    temp = R0 | (Q1 << 8);
-    temp |= (Q0 << 16);
-    temp |= (P1 << 24);
-    *((uint32*)pred) = temp;
-    pred += pred_pitch;
-
-    temp = S0 | (R1 << 8);
-    temp |= (R0 << 16);
-    temp |= (Q1 << 24);
-    *((uint32*)pred) = temp;
-
-    return ;
-}
-
-void Intra_4x4_Vertical_Left(AVCCommonObj *video, int block_offset, AVCNeighborAvailability *availability)
-{
-    uint8   *comp_refx = video->pintra_pred_top;
-    uint32 temp1, temp2;
-    int x0, x1, x2, x3, x4, x5, x6;
-    uint8 *pred = video->pred_block + block_offset;
-    int pred_pitch = video->pred_pitch;
-
-    x0 = *comp_refx++;
-    x1 = *comp_refx++;
-    x2 = *comp_refx++;
-    x3 = *comp_refx++;
-    if (availability->top_right)
-    {
-        x4 = *comp_refx++;
-        x5 = *comp_refx++;
-        x6 = *comp_refx++;
-    }
-    else
-    {
-        x4 = x3;
-        x5 = x3;
-        x6 = x3;
-    }
-
-    x0 += x1 + 1;
-    x1 += x2 + 1;
-    x2 += x3 + 1;
-    x3 += x4 + 1;
-    x4 += x5 + 1;
-    x5 += x6 + 1;
-
-    temp1 = (x0 >> 1);
-    temp1 |= ((x1 >> 1) << 8);
-    temp1 |= ((x2 >> 1) << 16);
-    temp1 |= ((x3 >> 1) << 24);
-
-    *((uint32*)pred) = temp1;
-    pred += pred_pitch;
-
-    temp2 = ((x0 + x1) >> 2);
-    temp2 |= (((x1 + x2) >> 2) << 8);
-    temp2 |= (((x2 + x3) >> 2) << 16);
-    temp2 |= (((x3 + x4) >> 2) << 24);
-
-    *((uint32*)pred) = temp2;
-    pred += pred_pitch;
-
-    temp1 = (temp1 >> 8) | ((x4 >> 1) << 24);   /* rotate out old value */
-    *((uint32*)pred) = temp1;
-    pred += pred_pitch;
-
-    temp2 = (temp2 >> 8) | (((x4 + x5) >> 2) << 24); /* rotate out old value */
-    *((uint32*)pred) = temp2;
-    pred += pred_pitch;
-
-    return ;
-}
-
-void Intra_4x4_Horizontal_Up(AVCCommonObj *video, int pitch, int block_offset)
-{
-    uint8   *comp_refy = video->pintra_pred_left;
-    uint32 temp;
-    int Q0, R0, Q1, D0, D1, P0, P1;
-    int y0, y1, y2, y3;
-    uint8 *pred = video->pred_block + block_offset;
-    int pred_pitch = video->pred_pitch;
-
-    y0 = *comp_refy;
-    comp_refy += pitch;
-    y1 = *comp_refy;
-    comp_refy += pitch;
-    y2 = *comp_refy;
-    comp_refy += pitch;
-    y3 = *comp_refy;
-
-    Q0 = (y1 + y2 + 1) >> 1;
-    Q1 = (y1 + (y2 << 1) + y3 + 2) >> 2;
-    P0 = ((y0 + y1 + 1) >> 1);
-    P1 = ((y0 + (y1 << 1) + y2 + 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]
-    pred += pred_pitch;
-
-    D0 = (y2 + 3 * y3 + 2) >> 2;
-    R0 = (y2 + y3 + 1) >> 1;
-
-    temp = Q0 | (Q1 << 8);
-    temp |= (R0 << 16);
-    temp |= (D0 << 24);
-    *((uint32*)pred) = temp;
-    pred += pred_pitch;
-
-    D1 = y3;
-
-    temp = R0 | (D0 << 8);
-    temp |= (D1 << 16);
-    temp |= (D1 << 24);
-    *((uint32*)pred) = temp;
-    pred += pred_pitch;
-
-    temp = D1 | (D1 << 8);
-    temp |= (temp << 16);
-    *((uint32*)pred) = temp;
-
-    return ;
-}
-/* =============================== END 4x4 MODES======================================*/
-void  Intra_16x16_Vertical(AVCCommonObj *video)
-{
-    int i;
-    uint32 temp1, temp2, temp3, temp4;
-    uint8   *comp_ref = video->pintra_pred_top;
-    uint8 *pred = video->pred_block;
-    int pred_pitch = video->pred_pitch;
-
-    temp1 = *((uint32*)comp_ref);
-    comp_ref += 4;
-
-    temp2 = *((uint32*)comp_ref);
-    comp_ref += 4;
-
-    temp3 = *((uint32*)comp_ref);
-    comp_ref += 4;
-
-    temp4 = *((uint32*)comp_ref);
-    comp_ref += 4;
-
-    i = 16;
-    while (i > 0)
-    {
-        *((uint32*)pred) = temp1;
-        *((uint32*)(pred + 4)) = temp2;
-        *((uint32*)(pred + 8)) = temp3;
-        *((uint32*)(pred + 12)) = temp4;
-        pred += pred_pitch;
-        i--;
-    }
-
-    return ;
-}
-
-void Intra_16x16_Horizontal(AVCCommonObj *video, int pitch)
-{
-    int i;
-    uint32 temp;
-    uint8 *comp_ref = video->pintra_pred_left;
-    uint8 *pred = video->pred_block;
-    int pred_pitch = video->pred_pitch;
-
-    for (i = 0; i < 16; i++)
-    {
-        temp = *comp_ref;
-        temp |= (temp << 8);
-        temp |= (temp << 16);
-        *((uint32*)pred) = temp;
-        *((uint32*)(pred + 4)) = temp;
-        *((uint32*)(pred + 8)) = temp;
-        *((uint32*)(pred + 12)) = temp;
-        pred += pred_pitch;
-        comp_ref += pitch;
-    }
-}
-
-
-void  Intra_16x16_DC(AVCCommonObj *video, int pitch)
-{
-    int i;
-    uint32 temp, temp2;
-    uint8 *comp_ref_x = video->pintra_pred_top;
-    uint8 *comp_ref_y = video->pintra_pred_left;
-    int sum = 0;
-    uint8 *pred = video->pred_block;
-    int pred_pitch = video->pred_pitch;
-
-    if (video->intraAvailB)
-    {
-        temp = *((uint32*)comp_ref_x);
-        comp_ref_x += 4;
-        temp2 = (temp >> 8) & 0xFF00FF;
-        temp &= 0xFF00FF;
-        temp += temp2;
-        sum = temp + (temp >> 16);
-        temp = *((uint32*)comp_ref_x);
-        comp_ref_x += 4;
-        temp2 = (temp >> 8) & 0xFF00FF;
-        temp &= 0xFF00FF;
-        temp += temp2;
-        sum += temp + (temp >> 16);
-        temp = *((uint32*)comp_ref_x);
-        comp_ref_x += 4;
-        temp2 = (temp >> 8) & 0xFF00FF;
-        temp &= 0xFF00FF;
-        temp += temp2;
-        sum += temp + (temp >> 16);
-        temp = *((uint32*)comp_ref_x);
-        comp_ref_x += 4;
-        temp2 = (temp >> 8) & 0xFF00FF;
-        temp &= 0xFF00FF;
-        temp += temp2;
-        sum += temp + (temp >> 16);
-        sum &= 0xFFFF;
-
-        if (video->intraAvailA)
-        {
-            for (i = 0; i < 16; i++)
-            {
-                sum += (*comp_ref_y);
-                comp_ref_y += pitch;
-            }
-            sum = (sum + 16) >> 5;
-        }
-        else
-        {
-            sum = (sum + 8) >> 4;
-        }
-    }
-    else if (video->intraAvailA)
-    {
-        for (i = 0; i < 16; i++)
-        {
-            sum += *comp_ref_y;
-            comp_ref_y += pitch;
-        }
-        sum = (sum + 8) >> 4;
-    }
-    else
-    {
-        sum = 128;
-    }
-
-    temp = sum | (sum << 8);
-    temp |= (temp << 16);
-
-    for (i = 0; i < 16; i++)
-    {
-        *((uint32*)pred) = temp;
-        *((uint32*)(pred + 4)) = temp;
-        *((uint32*)(pred + 8)) = temp;
-        *((uint32*)(pred + 12)) = temp;
-        pred += pred_pitch;
-    }
-
-}
-
-void Intra_16x16_Plane(AVCCommonObj *video, int pitch)
-{
-    int i, a_16, b, c, factor_c;
-    uint8 *comp_ref_x = video->pintra_pred_top;
-    uint8 *comp_ref_y = video->pintra_pred_left;
-    uint8 *comp_ref_x0, *comp_ref_x1, *comp_ref_y0, *comp_ref_y1;
-    int H = 0, V = 0 , tmp;
-    uint8 *pred = video->pred_block;
-    uint32 temp;
-    uint8 byte1, byte2, byte3;
-    int value;
-    int pred_pitch = video->pred_pitch;
-
-    comp_ref_x0 = comp_ref_x + 8;
-    comp_ref_x1 = comp_ref_x + 6;
-    comp_ref_y0 = comp_ref_y + (pitch << 3);
-    comp_ref_y1 = comp_ref_y + 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++ - video->intra_pred_topleft);
-    V += i * (*comp_ref_y0 - *comp_ref_y1);
-
-
-    a_16 = ((*(comp_ref_x + 15) + *(comp_ref_y + 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)
-        byte1 = value;
-        value = factor_c >> 5;
-        factor_c += b;
-        CLIP_RESULT(value)
-        byte2 = value;
-        value = factor_c >> 5;
-        factor_c += b;
-        CLIP_RESULT(value)
-        byte3 = value;
-        value = factor_c >> 5;
-        factor_c += b;
-        CLIP_RESULT(value)
-        temp = byte1 | (byte2 << 8);
-        temp |= (byte3 << 16);
-        temp |= (value << 24);
-        *((uint32*)pred) = temp;
-
-        value = factor_c >> 5;
-        factor_c += b;
-        CLIP_RESULT(value)
-        byte1 = value;
-        value = factor_c >> 5;
-        factor_c += b;
-        CLIP_RESULT(value)
-        byte2 = value;
-        value = factor_c >> 5;
-        factor_c += b;
-        CLIP_RESULT(value)
-        byte3 = value;
-        value = factor_c >> 5;
-        factor_c += b;
-        CLIP_RESULT(value)
-        temp = byte1 | (byte2 << 8);
-        temp |= (byte3 << 16);
-        temp |= (value << 24);
-        *((uint32*)(pred + 4)) = temp;
-
-        value = factor_c >> 5;
-        factor_c += b;
-        CLIP_RESULT(value)
-        byte1 = value;
-        value = factor_c >> 5;
-        factor_c += b;
-        CLIP_RESULT(value)
-        byte2 = value;
-        value = factor_c >> 5;
-        factor_c += b;
-        CLIP_RESULT(value)
-        byte3 = value;
-        value = factor_c >> 5;
-        factor_c += b;
-        CLIP_RESULT(value)
-        temp = byte1 | (byte2 << 8);
-        temp |= (byte3 << 16);
-        temp |= (value << 24);
-        *((uint32*)(pred + 8)) = temp;
-
-        value = factor_c >> 5;
-        factor_c += b;
-        CLIP_RESULT(value)
-        byte1 = value;
-        value = factor_c >> 5;
-        factor_c += b;
-        CLIP_RESULT(value)
-        byte2 = value;
-        value = factor_c >> 5;
-        factor_c += b;
-        CLIP_RESULT(value)
-        byte3 = value;
-        value = factor_c >> 5;
-        CLIP_RESULT(value)
-        temp = byte1 | (byte2 << 8);
-        temp |= (byte3 << 16);
-        temp |= (value << 24);
-        *((uint32*)(pred + 12)) = temp;
-        pred += pred_pitch;
-    }
-}
-
-/************** Chroma intra prediction *********************/
-
-void Intra_Chroma_DC(AVCCommonObj *video, int pitch, uint8 *predCb, uint8 *predCr)
-{
-    int i;
-    uint32 temp, temp2, pred_a, pred_b;
-    uint8 *comp_ref_x, *comp_ref_y;
-    uint8 *comp_ref_cb_x = video->pintra_pred_top_cb;
-    uint8 *comp_ref_cb_y = video->pintra_pred_left_cb;
-    uint8 *comp_ref_cr_x = video->pintra_pred_top_cr;
-    uint8 *comp_ref_cr_y = video->pintra_pred_left_cr;
-    int  component, j;
-    int  sum_x0, sum_x1, sum_y0, sum_y1;
-    int pred_0[2], pred_1[2], pred_2[2], pred_3[2];
-    int pred_pitch = video->pred_pitch;
-    uint8 *pred;
-
-    if (video->intraAvailB & video->intraAvailA)
-    {
-        comp_ref_x = comp_ref_cb_x;
-        comp_ref_y = comp_ref_cb_y;
-        for (i = 0; i < 2; i++)
-        {
-            temp = *((uint32*)comp_ref_x);
-            comp_ref_x += 4;
-            temp2 = (temp >> 8) & 0xFF00FF;
-            temp &= 0xFF00FF;
-            temp += temp2;
-            temp += (temp >> 16);
-            sum_x0 = temp & 0xFFFF;
-
-            temp = *((uint32*)comp_ref_x);
-            temp2 = (temp >> 8) & 0xFF00FF;
-            temp &= 0xFF00FF;
-            temp += temp2;
-            temp += (temp >> 16);
-            sum_x1 = temp & 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 = comp_ref_cr_x;
-            comp_ref_y = comp_ref_cr_y;
-        }
-    }
-
-    else if (video->intraAvailA)
-    {
-        comp_ref_y = comp_ref_cb_y;
-        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 = comp_ref_cr_y;
-        }
-    }
-    else if (video->intraAvailB)
-    {
-        comp_ref_x = comp_ref_cb_x;
-        for (i = 0; i < 2; i++)
-        {
-            temp = *((uint32*)comp_ref_x);
-            comp_ref_x += 4;
-            temp2 = (temp >> 8) & 0xFF00FF;
-            temp &= 0xFF00FF;
-            temp += temp2;
-            temp += (temp >> 16);
-            sum_x0 = temp & 0xFFFF;
-
-            temp = *((uint32*)comp_ref_x);
-            temp2 = (temp >> 8) & 0xFF00FF;
-            temp &= 0xFF00FF;
-            temp += temp2;
-            temp += (temp >> 16);
-            sum_x1 = temp & 0xFFFF;
-
-            pred_0[i] = pred_2[i] = (sum_x0 + 2) >> 2;
-            pred_1[i] = pred_3[i] = (sum_x1 + 2) >> 2;
-            comp_ref_x = comp_ref_cr_x;
-        }
-    }
-    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 = predCb;
-    for (component = 0; component < 2; component++)
-    {
-        pred_a = pred_0[component];
-        pred_b = pred_1[component];
-        pred_a |= (pred_a << 8);
-        pred_a |= (pred_a << 16);
-        pred_b |= (pred_b << 8);
-        pred_b |= (pred_b << 16);
-
-        for (i = 4; i < 6; i++)
-        {
-            for (j = 0; j < 4; j++) /* 4 lines */
-            {
-                *((uint32*)pred) = pred_a;
-                *((uint32*)(pred + 4)) = pred_b;
-                pred += pred_pitch; /* move to the next line */
-            }
-            pred_a = pred_2[component];
-            pred_b = pred_3[component];
-            pred_a |= (pred_a << 8);
-            pred_a |= (pred_a << 16);
-            pred_b |= (pred_b << 8);
-            pred_b |= (pred_b << 16);
-        }
-        pred = predCr; /* point to cr */
-    }
-}
-
-void  Intra_Chroma_Horizontal(AVCCommonObj *video, int pitch, uint8 *predCb, uint8 *predCr)
-{
-    int i;
-    uint32 temp;
-    uint8   *comp_ref_cb_y = video->pintra_pred_left_cb;
-    uint8   *comp_ref_cr_y = video->pintra_pred_left_cr;
-    uint8  *comp;
-    int component, j;
-    int     pred_pitch = video->pred_pitch;
-    uint8   *pred;
-
-    comp = comp_ref_cb_y;
-    pred = predCb;
-    for (component = 0; component < 2; component++)
-    {
-        for (i = 4; i < 6; i++)
-        {
-            for (j = 0; j < 4; j++)
-            {
-                temp = *comp;
-                comp += pitch;
-                temp |= (temp << 8);
-                temp |= (temp << 16);
-                *((uint32*)pred) = temp;
-                *((uint32*)(pred + 4)) = temp;
-                pred += pred_pitch;
-            }
-        }
-        comp = comp_ref_cr_y;
-        pred = predCr; /* point to cr */
-    }
-
-}
-
-void  Intra_Chroma_Vertical(AVCCommonObj *video, uint8 *predCb, uint8 *predCr)
-{
-    uint32  temp1, temp2;
-    uint8   *comp_ref_cb_x = video->pintra_pred_top_cb;
-    uint8   *comp_ref_cr_x = video->pintra_pred_top_cr;
-    uint8   *comp_ref;
-    int     component, j;
-    int     pred_pitch = video->pred_pitch;
-    uint8   *pred;
-
-    comp_ref = comp_ref_cb_x;
-    pred = predCb;
-    for (component = 0; component < 2; component++)
-    {
-        temp1 = *((uint32*)comp_ref);
-        temp2 = *((uint32*)(comp_ref + 4));
-        for (j = 0; j < 8; j++)
-        {
-            *((uint32*)pred) = temp1;
-            *((uint32*)(pred + 4)) = temp2;
-            pred += pred_pitch;
-        }
-        comp_ref = comp_ref_cr_x;
-        pred = predCr; /* point to cr */
-    }
-
-}
-
-void  Intra_Chroma_Plane(AVCCommonObj *video, int pitch, uint8 *predCb, uint8 *predCr)
-{
-    int i;
-    int a_16_C[2], b_C[2], c_C[2], a_16, b, c, factor_c;
-    uint8 *comp_ref_x, *comp_ref_y, *comp_ref_x0, *comp_ref_x1,  *comp_ref_y0, *comp_ref_y1;
-    int component, j;
-    int H, V, tmp;
-    uint32 temp;
-    uint8 byte1, byte2, byte3;
-    int value;
-    uint8 topleft;
-    int pred_pitch = video->pred_pitch;
-    uint8 *pred;
-
-    comp_ref_x = video->pintra_pred_top_cb;
-    comp_ref_y = video->pintra_pred_left_cb;
-    topleft = video->intra_pred_topleft_cb;
-
-    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_C[component] = ((*(comp_ref_x + 7) + *(comp_ref_y + 7 * pitch)) << 4) + 16;
-        b_C[component] = (17 * H + 16) >> 5;
-        c_C[component] = (17 * V + 16) >> 5;
-
-        comp_ref_x = video->pintra_pred_top_cr;
-        comp_ref_y = video->pintra_pred_left_cr;
-        topleft = video->intra_pred_topleft_cr;
-    }
-
-    pred = predCb;
-    for (component = 0; component < 2; component++)
-    {
-        a_16 = a_16_C[component];
-        b = b_C[component];
-        c = c_C[component];
-        tmp = 0;
-        for (i = 4; i < 6; i++)
-        {
-            for (j = 0; j < 4; j++)
-            {
-                factor_c = a_16 + c * (tmp++ - 3);
-
-                factor_c -= 3 * b;
-
-                value = factor_c >> 5;
-                factor_c += b;
-                CLIP_RESULT(value)
-                byte1 = value;
-                value = factor_c >> 5;
-                factor_c += b;
-                CLIP_RESULT(value)
-                byte2 = value;
-                value = factor_c >> 5;
-                factor_c += b;
-                CLIP_RESULT(value)
-                byte3 = value;
-                value = factor_c >> 5;
-                factor_c += b;
-                CLIP_RESULT(value)
-                temp = byte1 | (byte2 << 8);
-                temp |= (byte3 << 16);
-                temp |= (value << 24);
-                *((uint32*)pred) = temp;
-
-                value = factor_c >> 5;
-                factor_c += b;
-                CLIP_RESULT(value)
-                byte1 = value;
-                value = factor_c >> 5;
-                factor_c += b;
-                CLIP_RESULT(value)
-                byte2 = value;
-                value = factor_c >> 5;
-                factor_c += b;
-                CLIP_RESULT(value)
-                byte3 = value;
-                value = factor_c >> 5;
-                factor_c += b;
-                CLIP_RESULT(value)
-                temp = byte1 | (byte2 << 8);
-                temp |= (byte3 << 16);
-                temp |= (value << 24);
-                *((uint32*)(pred + 4)) = temp;
-                pred += pred_pitch;
-            }
-        }
-        pred = predCr; /* point to cr */
-    }
-}
-
diff --git a/media/libstagefright/codecs/avc/dec/src/residual.cpp b/media/libstagefright/codecs/avc/dec/src/residual.cpp
deleted file mode 100644 (file)
index c68550d..0000000
+++ /dev/null
@@ -1,523 +0,0 @@
-/* ------------------------------------------------------------------
- * 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 <string.h>
-
-#include "avcdec_lib.h"
-#include "avcdec_bitstream.h"
-
-AVCDec_Status DecodeIntraPCM(AVCCommonObj *video, AVCDecBitstream *stream)
-{
-    AVCDec_Status status;
-    int j;
-    int mb_x, mb_y, offset1;
-    uint8 *pDst;
-    uint32 byte0, byte1;
-    int pitch;
-
-    mb_x = video->mb_x;
-    mb_y = video->mb_y;
-
-#ifdef USE_PRED_BLOCK
-    pDst = video->pred_block + 84;
-    pitch = 20;
-#else
-    offset1 = (mb_x << 4) + (mb_y << 4) * video->PicWidthInSamplesL;
-    pDst = video->currPic->Sl + offset1;
-    pitch = video->currPic->pitch;
-#endif
-
-    /* at this point bitstream is byte-aligned */
-    j = 16;
-    while (j > 0)
-    {
-        status = BitstreamReadBits(stream, 8, (uint*) & byte0);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 8);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 16);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 24);
-        *((uint32*)pDst) = byte0;
-
-        status = BitstreamReadBits(stream, 8, (uint*) & byte0);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 8);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 16);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 24);
-        *((uint32*)(pDst + 4)) = byte0;
-
-        status = BitstreamReadBits(stream, 8, (uint*) & byte0);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 8);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 16);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 24);
-        *((uint32*)(pDst + 8)) = byte0;
-
-        status = BitstreamReadBits(stream, 8, (uint*) & byte0);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 8);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 16);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 24);
-        *((uint32*)(pDst + 12)) = byte0;
-        j--;
-        pDst += pitch;
-
-        if (status != AVCDEC_SUCCESS)  /* check only once per line */
-            return status;
-    }
-
-#ifdef USE_PRED_BLOCK
-    pDst = video->pred_block + 452;
-    pitch = 12;
-#else
-    offset1 = (offset1 >> 2) + (mb_x << 2);
-    pDst = video->currPic->Scb + offset1;
-    pitch >>= 1;
-#endif
-
-    j = 8;
-    while (j > 0)
-    {
-        status = BitstreamReadBits(stream, 8, (uint*) & byte0);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 8);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 16);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 24);
-        *((uint32*)pDst) = byte0;
-
-        status = BitstreamReadBits(stream, 8, (uint*) & byte0);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 8);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 16);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 24);
-        *((uint32*)(pDst + 4)) = byte0;
-
-        j--;
-        pDst += pitch;
-
-        if (status != AVCDEC_SUCCESS)  /* check only once per line */
-            return status;
-    }
-
-#ifdef USE_PRED_BLOCK
-    pDst = video->pred_block + 596;
-    pitch = 12;
-#else
-    pDst = video->currPic->Scr + offset1;
-#endif
-    j = 8;
-    while (j > 0)
-    {
-        status = BitstreamReadBits(stream, 8, (uint*) & byte0);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 8);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 16);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 24);
-        *((uint32*)pDst) = byte0;
-
-        status = BitstreamReadBits(stream, 8, (uint*) & byte0);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 8);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 16);
-        status = BitstreamReadBits(stream, 8, (uint*) & byte1);
-        byte0 |= (byte1 << 24);
-        *((uint32*)(pDst + 4)) = byte0;
-
-        j--;
-        pDst += pitch;
-
-        if (status != AVCDEC_SUCCESS)  /* check only once per line */
-            return status;
-    }
-
-#ifdef MB_BASED_DEBLOCK
-    SaveNeighborForIntraPred(video, offset1);
-#endif
-
-    return AVCDEC_SUCCESS;
-}
-
-
-
-/* see subclause 7.3.5.3 and readCBPandCoeffsFromNAL() in JM*/
-AVCDec_Status residual(AVCDecObject *decvid, AVCMacroblock *currMB)
-{
-    AVCCommonObj *video = decvid->common;
-    int16 *block;
-    int level[16], run[16], numcoeff; /* output from residual_block_cavlc */
-    int block_x, i, j, k, idx, iCbCr;
-    int mbPartIdx, subMbPartIdx, mbPartIdx_X, mbPartIdx_Y;
-    int nC, maxNumCoeff = 16;
-    int coeffNum, start_scan = 0;
-    uint8 *zz_scan;
-    int Rq, Qq;
-    uint32 cbp4x4 = 0;
-
-    /* in 8.5.4, it only says if it's field macroblock. */
-
-    zz_scan = (uint8*) ZZ_SCAN_BLOCK;
-
-
-    /* see 8.5.8 for the initialization of these values */
-    Qq = video->QPy_div_6;
-    Rq = video->QPy_mod_6;
-
-    memset(video->block, 0, sizeof(int16)*NUM_PIXELS_IN_MB);
-
-    if (currMB->mbMode == AVC_I16)
-    {
-        nC = predict_nnz(video, 0, 0);
-        decvid->residual_block(decvid, nC, 16, level, run, &numcoeff);
-        /* then performs zigzag and transform */
-        block = video->block;
-        coeffNum = -1;
-        for (i = numcoeff - 1; i >= 0; i--)
-        {
-            coeffNum += run[i] + 1;
-            if (coeffNum > 15)
-            {
-                return AVCDEC_FAIL;
-            }
-            idx = zz_scan[coeffNum] << 2;
-            /*          idx = ((idx>>2)<<6) + ((idx&3)<<2); */
-            block[idx] = level[i];
-        }
-
-        /* inverse transform on Intra16x16DCLevel */
-        if (numcoeff)
-        {
-            Intra16DCTrans(block, Qq, Rq);
-            cbp4x4 = 0xFFFF;
-        }
-        maxNumCoeff = 15;
-        start_scan = 1;
-    }
-
-    memset(currMB->nz_coeff, 0, sizeof(uint8)*24);
-
-    for (mbPartIdx = 0; mbPartIdx < 4; mbPartIdx++)
-    {
-        mbPartIdx_X = (mbPartIdx & 1) << 1;
-        mbPartIdx_Y = mbPartIdx & -2;
-
-        if (currMB->CBP&(1 << mbPartIdx))
-        {
-            for (subMbPartIdx = 0; subMbPartIdx < 4; subMbPartIdx++)
-            {
-                i = mbPartIdx_X + (subMbPartIdx & 1);  // check this
-                j = mbPartIdx_Y + (subMbPartIdx >> 1);
-                block = video->block + (j << 6) + (i << 2);  //
-                nC = predict_nnz(video, i, j);
-                decvid->residual_block(decvid, nC, maxNumCoeff, level, run, &numcoeff);
-
-                /* convert to raster scan and quantize*/
-                /* Note: for P mb in SP slice and SI mb in SI slice,
-                 the quantization cannot be done here.
-                 block[idx] should be assigned with level[k].
-                itrans will be done after the prediction.
-                There will be transformation on the predicted value,
-                then addition with block[idx], then this quantization
-                and transform.*/
-
-                coeffNum = -1 + start_scan;
-                for (k = numcoeff - 1; k >= 0; k--)
-                {
-                    coeffNum += run[k] + 1;
-                    if (coeffNum > 15)
-                    {
-                        return AVCDEC_FAIL;
-                    }
-                    idx = zz_scan[coeffNum];
-                    block[idx] = (level[k] * dequant_coefres[Rq][coeffNum]) << Qq ;
-                }
-
-                currMB->nz_coeff[(j<<2)+i] = numcoeff;
-                if (numcoeff)
-                {
-                    cbp4x4 |= (1 << ((j << 2) + i));
-                }
-            }
-        }
-    }
-
-    Qq = video->QPc_div_6;
-    Rq = video->QPc_mod_6;
-
-    if (currMB->CBP & (3 << 4)) /* chroma DC residual present */
-    {
-        for (iCbCr = 0; iCbCr < 2; iCbCr++)
-        {
-            decvid->residual_block(decvid, -1, 4, level, run, &numcoeff);
-            block = video->block + 256 + (iCbCr << 3);
-            coeffNum = -1;
-            for (i = numcoeff - 1; i >= 0; i--)
-            {
-                coeffNum += run[i] + 1;
-                if (coeffNum > 3)
-                {
-                    return AVCDEC_FAIL;
-                }
-                block[(coeffNum>>1)*64 + (coeffNum&1)*4] = level[i];
-            }
-            /* inverse transform on chroma DC */
-            /* for P in SP and SI in SI, this function can't be done here,
-            must do prediction transform/quant first. */
-            if (numcoeff)
-            {
-                ChromaDCTrans(block, Qq, Rq);
-                cbp4x4 |= (iCbCr ? 0xcc0000 : 0x330000);
-            }
-        }
-    }
-
-    if (currMB->CBP & (2 << 4))
-    {
-        for (block_x = 0; block_x < 4; block_x += 2) /* for iCbCr */
-        {
-            for (j = 4; j < 6; j++)  /* for each block inside Cb or Cr */
-            {
-                for (i = block_x; i < block_x + 2; i++)
-                {
-
-                    block = video->block + (j << 6) + (i << 2);
-
-                    nC = predict_nnz_chroma(video, i, j);
-                    decvid->residual_block(decvid, nC, 15, level, run, &numcoeff);
-
-                    /* convert to raster scan and quantize */
-                    /* for P MB in SP slice and SI MB in SI slice,
-                       the dequant and transform cannot be done here.
-                       It needs the prediction values. */
-                    coeffNum = 0;
-                    for (k = numcoeff - 1; k >= 0; k--)
-                    {
-                        coeffNum += run[k] + 1;
-                        if (coeffNum > 15)
-                        {
-                            return AVCDEC_FAIL;
-                        }
-                        idx = zz_scan[coeffNum];
-                        block[idx] = (level[k] * dequant_coefres[Rq][coeffNum]) << Qq;
-                    }
-
-
-                    /* then transform */
-                    //              itrans(block); /* transform */
-                    currMB->nz_coeff[(j<<2)+i] = numcoeff;    //
-                    if (numcoeff)
-                    {
-                        cbp4x4 |= (1 << ((j << 2) + i));
-                    }
-                }
-
-            }
-        }
-    }
-
-    video->cbp4x4 = cbp4x4;
-
-    return AVCDEC_SUCCESS;
-}
-
-/* see subclause 7.3.5.3.1 and 9.2 and readCoeff4x4_CAVLC() in JM */
-AVCDec_Status residual_block_cavlc(AVCDecObject *decvid, int nC, int maxNumCoeff,
-                                   int *level, int *run, int *numcoeff)
-{
-    int i, j;
-    int TrailingOnes, TotalCoeff;
-    AVCDecBitstream *stream = decvid->bitstream;
-    int suffixLength;
-    uint trailing_ones_sign_flag, level_prefix, level_suffix;
-    int levelCode, levelSuffixSize, zerosLeft;
-    int run_before;
-
-
-    if (nC >= 0)
-    {
-        ce_TotalCoeffTrailingOnes(stream, &TrailingOnes, &TotalCoeff, nC);
-    }
-    else
-    {
-        ce_TotalCoeffTrailingOnesChromaDC(stream, &TrailingOnes, &TotalCoeff);
-    }
-
-    *numcoeff = TotalCoeff;
-
-    /* This part is done quite differently in ReadCoef4x4_CAVLC() */
-    if (TotalCoeff == 0)
-    {
-        return AVCDEC_SUCCESS;
-    }
-
-    if (TrailingOnes) /* keep reading the sign of those trailing ones */
-    {
-        /* instead of reading one bit at a time, read the whole thing at once */
-        BitstreamReadBits(stream, TrailingOnes, &trailing_ones_sign_flag);
-        trailing_ones_sign_flag <<= 1;
-        for (i = 0; i < TrailingOnes; i++)
-        {
-            level[i] = 1 - ((trailing_ones_sign_flag >> (TrailingOnes - i - 1)) & 2);
-        }
-    }
-
-    i = TrailingOnes;
-    suffixLength = 1;
-    if (TotalCoeff > TrailingOnes)
-    {
-        ce_LevelPrefix(stream, &level_prefix);
-        if (TotalCoeff < 11 || TrailingOnes == 3)
-        {
-            if (level_prefix < 14)
-            {
-//              levelSuffixSize = 0;
-                levelCode = level_prefix;
-            }
-            else if (level_prefix == 14)
-            {
-//              levelSuffixSize = 4;
-                BitstreamReadBits(stream, 4, &level_suffix);
-                levelCode = 14 + level_suffix;
-            }
-            else /* if (level_prefix == 15) */
-            {
-//              levelSuffixSize = 12;
-                BitstreamReadBits(stream, 12, &level_suffix);
-                levelCode = 30 + level_suffix;
-            }
-        }
-        else
-        {
-            /*              suffixLength = 1; */
-            if (level_prefix < 15)
-            {
-                levelSuffixSize = suffixLength;
-            }
-            else
-            {
-                levelSuffixSize = 12;
-            }
-            BitstreamReadBits(stream, levelSuffixSize, &level_suffix);
-
-            levelCode = (level_prefix << 1) + level_suffix;
-        }
-
-        if (TrailingOnes < 3)
-        {
-            levelCode += 2;
-        }
-
-        level[i] = (levelCode + 2) >> 1;
-        if (level[i] > 3)
-        {
-            suffixLength = 2;
-        }
-
-        if (levelCode & 1)
-        {
-            level[i] = -level[i];
-        }
-        i++;
-
-    }
-
-    for (j = TotalCoeff - i; j > 0 ; j--)
-    {
-        ce_LevelPrefix(stream, &level_prefix);
-        if (level_prefix < 15)
-        {
-            levelSuffixSize = suffixLength;
-        }
-        else
-        {
-            levelSuffixSize = 12;
-        }
-        BitstreamReadBits(stream, levelSuffixSize, &level_suffix);
-
-        levelCode = (level_prefix << suffixLength) + level_suffix;
-        level[i] = (levelCode >> 1) + 1;
-        if (level[i] > (3 << (suffixLength - 1)) && suffixLength < 6)
-        {
-            suffixLength++;
-        }
-        if (levelCode & 1)
-        {
-            level[i] = -level[i];
-        }
-        i++;
-    }
-
-
-    if (TotalCoeff < maxNumCoeff)
-    {
-        if (nC >= 0)
-        {
-            ce_TotalZeros(stream, &zerosLeft, TotalCoeff);
-        }
-        else
-        {
-            ce_TotalZerosChromaDC(stream, &zerosLeft, TotalCoeff);
-        }
-    }
-    else
-    {
-        zerosLeft = 0;
-    }
-
-    for (i = 0; i < TotalCoeff - 1; i++)
-    {
-        if (zerosLeft > 0)
-        {
-            ce_RunBefore(stream, &run_before, zerosLeft);
-            run[i] = run_before;
-        }
-        else
-        {
-            run[i] = 0;
-            zerosLeft = 0; // could be negative under error conditions
-        }
-
-        zerosLeft = zerosLeft - run[i];
-    }
-
-    if (zerosLeft < 0)
-    {
-        zerosLeft = 0;
-//      return AVCDEC_FAIL;
-    }
-
-    run[TotalCoeff-1] = zerosLeft;
-
-    /* leave the inverse zigzag scan part for the caller */
-
-
-    return AVCDEC_SUCCESS;
-}
diff --git a/media/libstagefright/codecs/avc/dec/src/slice.cpp b/media/libstagefright/codecs/avc/dec/src/slice.cpp
deleted file mode 100644 (file)
index 7a2ef3d..0000000
+++ /dev/null
@@ -1,772 +0,0 @@
-/* ------------------------------------------------------------------
- * 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.
- * -------------------------------------------------------------------
- */
-/* Note for optimization: syntax decoding or operations related to B_SLICE should be
-commented out by macro definition or function pointers. */
-
-#include <string.h>
-
-#include "avcdec_lib.h"
-#include "avcdec_bitstream.h"
-
-const static int mbPart2raster[3][4] = {{0, 0, 0, 0}, {1, 1, 0, 0}, {1, 0, 1, 0}};
-/* decode_frame_slice() */
-/* decode_one_slice() */
-AVCDec_Status DecodeSlice(AVCDecObject *decvid)
-{
-    AVCDec_Status status;
-    AVCCommonObj *video = decvid->common;
-    AVCSliceHeader *sliceHdr = video->sliceHdr;
-    AVCMacroblock *currMB ;
-    AVCDecBitstream *stream = decvid->bitstream;
-    uint slice_group_id;
-    uint CurrMbAddr, moreDataFlag;
-
-    /* set the first mb in slice */
-    CurrMbAddr = sliceHdr->first_mb_in_slice;
-    slice_group_id = video->MbToSliceGroupMap[CurrMbAddr];
-
-    if ((CurrMbAddr && (CurrMbAddr != (uint)(video->mbNum + 1))) && video->currSeqParams->constrained_set1_flag == 1)
-    {
-        ConcealSlice(decvid, video->mbNum, CurrMbAddr);
-    }
-
-    moreDataFlag = 1;
-    video->mb_skip_run = -1;
-
-
-    /* while loop , see subclause 7.3.4 */
-    do
-    {
-        if (CurrMbAddr >= video->PicSizeInMbs)
-        {
-            return AVCDEC_FAIL;
-        }
-
-        currMB = video->currMB = &(video->mblock[CurrMbAddr]);
-        video->mbNum = CurrMbAddr;
-        currMB->slice_id = video->slice_id;  //  slice
-
-        /* we can remove this check if we don't support Mbaff. */
-        /* we can wrap below into an initMB() function which will also
-        do necessary reset of macroblock related parameters. */
-
-        video->mb_x = CurrMbAddr % video->PicWidthInMbs;
-        video->mb_y = CurrMbAddr / video->PicWidthInMbs;
-
-        /* check the availability of neighboring macroblocks */
-        InitNeighborAvailability(video, CurrMbAddr);
-
-        /* read_macroblock and decode_one_macroblock() */
-        status = DecodeMB(decvid);
-        if (status != AVCDEC_SUCCESS)
-        {
-            return status;
-        }
-#ifdef MB_BASED_DEBLOCK
-        if (video->currPicParams->num_slice_groups_minus1 == 0)
-        {
-            MBInLoopDeblock(video); /* MB-based deblocking */
-        }
-        else    /* this mode cannot be used if the number of slice group is not one. */
-        {
-            return AVCDEC_FAIL;
-        }
-#endif
-        video->numMBs--;
-
-        moreDataFlag = more_rbsp_data(stream);
-
-
-        /* go to next MB */
-        while (++CurrMbAddr < video->PicSizeInMbs && video->MbToSliceGroupMap[CurrMbAddr] != (int)slice_group_id)
-        {
-        }
-
-    }
-    while ((moreDataFlag && video->numMBs > 0) || video->mb_skip_run > 0); /* even if no more data, but last few MBs are skipped */
-
-    if (video->numMBs == 0)
-    {
-        video->newPic = TRUE;
-        video->mbNum = 0;  // _Conceal
-        return AVCDEC_PICTURE_READY;
-    }
-
-    return AVCDEC_SUCCESS;
-}
-
-/* read MB mode and motion vectors */
-/* perform Intra/Inter prediction and residue */
-/* update video->mb_skip_run */
-AVCDec_Status DecodeMB(AVCDecObject *decvid)
-{
-    AVCDec_Status status;
-    AVCCommonObj *video = decvid->common;
-    AVCDecBitstream *stream = decvid->bitstream;
-    AVCMacroblock *currMB = video->currMB;
-    uint mb_type;
-    int slice_type = video->slice_type;
-    int temp;
-
-    currMB->QPy = video->QPy;
-    currMB->QPc = video->QPc;
-
-    if (slice_type == AVC_P_SLICE)
-    {
-        if (video->mb_skip_run < 0)
-        {
-            ue_v(stream, (uint *)&(video->mb_skip_run));
-        }
-
-        if (video->mb_skip_run == 0)
-        {
-            /* this will not handle the case where the slice ends with a mb_skip_run == 0 and no following MB data  */
-            ue_v(stream, &mb_type);
-            if (mb_type > 30)
-            {
-                return AVCDEC_FAIL;
-            }
-            InterpretMBModeP(currMB, mb_type);
-            video->mb_skip_run = -1;
-        }
-        else
-        {
-            /* see subclause 7.4.4 for more details on how
-            mb_field_decoding_flag is derived in case of skipped MB */
-
-            currMB->mb_intra = FALSE;
-
-            currMB->mbMode = AVC_SKIP;
-            currMB->MbPartWidth = currMB->MbPartHeight = 16;
-            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;
-
-            memset(currMB->nz_coeff, 0, sizeof(uint8)*NUM_BLKS_IN_MB);
-
-            currMB->CBP = 0;
-            video->cbp4x4 = 0;
-            /* 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;
-            InterMBPrediction(video);
-            video->mb_skip_run--;
-            return AVCDEC_SUCCESS;
-        }
-
-    }
-    else
-    {
-        /* Then decode mode and MV */
-        ue_v(stream, &mb_type);
-        if (mb_type > 25)
-        {
-            return AVCDEC_FAIL;
-        }
-        InterpretMBModeI(currMB, mb_type);
-    }
-
-
-    if (currMB->mbMode != AVC_I_PCM)
-    {
-
-        if (currMB->mbMode == AVC_P8 || currMB->mbMode == AVC_P8ref0)
-        {
-            status = sub_mb_pred(video, currMB, stream);
-        }
-        else
-        {
-            status = mb_pred(video, currMB, stream) ;
-        }
-
-        if (status != AVCDEC_SUCCESS)
-        {
-            return status;
-        }
-
-        if (currMB->mbMode != AVC_I16)
-        {
-            /* decode coded_block_pattern */
-            status = DecodeCBP(currMB, stream);
-            if (status != AVCDEC_SUCCESS)
-            {
-                return status;
-            }
-        }
-
-        if (currMB->CBP > 0 || currMB->mbMode == AVC_I16)
-        {
-            se_v(stream, &temp);
-            if (temp)
-            {
-                temp += (video->QPy + 52);
-                currMB->QPy = video->QPy = temp - 52 * (temp * 79 >> 12);
-                if (currMB->QPy > 51 || currMB->QPy < 0)
-                {
-                    video->QPy = AVC_CLIP3(0, 51, video->QPy);
-//                  return AVCDEC_FAIL;
-                }
-                video->QPy_div_6 = (video->QPy * 43) >> 8;
-                video->QPy_mod_6 = video->QPy - 6 * video->QPy_div_6;
-                currMB->QPc = video->QPc = mapQPi2QPc[AVC_CLIP3(0, 51, video->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;
-            }
-        }
-        /* decode residue and inverse transform */
-        status = residual(decvid, currMB);
-        if (status != AVCDEC_SUCCESS)
-        {
-            return status;
-        }
-    }
-    else
-    {
-        if (stream->bitcnt & 7)
-        {
-            BitstreamByteAlign(stream);
-        }
-        /* decode pcm_byte[i] */
-        DecodeIntraPCM(video, stream);
-
-        currMB->QPy = 0;  /* necessary for deblocking */ // _OPTIMIZE
-        currMB->QPc = mapQPi2QPc[AVC_CLIP3(0, 51, video->currPicParams->chroma_qp_index_offset)];
-
-        /* default values, don't know if really needed */
-        currMB->CBP = 0x3F;
-        video->cbp4x4 = 0xFFFF;
-        currMB->mb_intra = TRUE;
-        memset(currMB->nz_coeff, 16, sizeof(uint8)*NUM_BLKS_IN_MB);
-        return AVCDEC_SUCCESS;
-    }
-
-
-    /* do Intra/Inter prediction, together with the residue compensation */
-    /* This part should be common between the skip and no-skip */
-    if (currMB->mbMode == AVC_I4 || currMB->mbMode == AVC_I16)
-    {
-        IntraMBPrediction(video);
-    }
-    else
-    {
-        InterMBPrediction(video);
-    }
-
-
-
-    return AVCDEC_SUCCESS;
-}
-
-/* see subclause 7.3.5.1 */
-AVCDec_Status mb_pred(AVCCommonObj *video, AVCMacroblock *currMB, AVCDecBitstream *stream)
-{
-    int mbPartIdx;
-    AVCSliceHeader *sliceHdr = video->sliceHdr;
-    uint max_ref_idx;
-    const int *temp_0;
-    int16 *temp_1;
-    uint code;
-
-    if (currMB->mbMode == AVC_I4 || currMB->mbMode == AVC_I16)
-    {
-
-        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;
-            }
-        }
-
-
-        if (currMB->mbMode == AVC_I4)
-        {
-            /* perform prediction to get the actual intra 4x4 pred mode */
-            DecodeIntra4x4Mode(video, currMB, stream);
-            /* output will be in currMB->i4Mode[4][4] */
-        }
-
-        ue_v(stream, &code);
-
-        if (code > 3)
-        {
-            return AVCDEC_FAIL; /* out of range */
-        }
-        currMB->intra_chroma_pred_mode = (AVCIntraChromaPredMode)code;
-    }
-    else
-    {
-
-        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;
-        max_ref_idx = video->refList0Size - 1;
-
-        /* decode ref index for L0 */
-        if (sliceHdr->num_ref_idx_l0_active_minus1 > 0)
-        {
-            for (mbPartIdx = 0; mbPartIdx < currMB->NumMbPart; mbPartIdx++)
-            {
-                te_v(stream, &code, max_ref_idx);
-                if (code > (uint)max_ref_idx)
-                {
-                    return AVCDEC_FAIL;
-                }
-                currMB->ref_idx_L0[mbPartIdx] = code;
-            }
-        }
-
-        /* populate ref_idx_L0 */
-        temp_0 = &mbPart2raster[currMB->mbMode-AVC_P16][0];
-        temp_1 = &currMB->ref_idx_L0[3];
-
-        *temp_1-- = currMB->ref_idx_L0[*temp_0++];
-        *temp_1-- = currMB->ref_idx_L0[*temp_0++];
-        *temp_1-- = currMB->ref_idx_L0[*temp_0++];
-        *temp_1-- = currMB->ref_idx_L0[*temp_0++];
-
-        /* Global reference index, these values are used in deblock */
-        currMB->RefIdx[0] = video->RefPicList0[currMB->ref_idx_L0[0]]->RefIdx;
-        currMB->RefIdx[1] = video->RefPicList0[currMB->ref_idx_L0[1]]->RefIdx;
-        currMB->RefIdx[2] = video->RefPicList0[currMB->ref_idx_L0[2]]->RefIdx;
-        currMB->RefIdx[3] = video->RefPicList0[currMB->ref_idx_L0[3]]->RefIdx;
-
-        /* see subclause 7.4.5.1 for the range of ref_idx_lX */
-        max_ref_idx = sliceHdr->num_ref_idx_l1_active_minus1;
-        /* decode mvd_l0 */
-        for (mbPartIdx = 0; mbPartIdx < currMB->NumMbPart; mbPartIdx++)
-        {
-            se_v(stream, &(video->mvd_l0[mbPartIdx][0][0]));
-            se_v(stream, &(video->mvd_l0[mbPartIdx][0][1]));
-        }
-    }
-
-    return AVCDEC_SUCCESS;
-}
-
-/* see subclause 7.3.5.2 */
-AVCDec_Status sub_mb_pred(AVCCommonObj *video, AVCMacroblock *currMB, AVCDecBitstream *stream)
-{
-    int mbPartIdx, subMbPartIdx;
-    AVCSliceHeader *sliceHdr = video->sliceHdr;
-    uint max_ref_idx;
-    uint sub_mb_type[4];
-    uint code;
-
-    memset(currMB->ref_idx_L0, 0, sizeof(int16)*4);
-
-    for (mbPartIdx = 0; mbPartIdx < 4; mbPartIdx++)
-    {
-        ue_v(stream, &(sub_mb_type[mbPartIdx]));
-        if (sub_mb_type[mbPartIdx] > 3)
-        {
-            return AVCDEC_FAIL;
-        }
-
-    }
-    /* we have to check the values to make sure they are valid  */
-    /* assign values to currMB->sub_mb_type[], currMB->MBPartPredMode[][x] */
-
-    InterpretSubMBModeP(currMB, sub_mb_type);
-
-
-    /* see subclause 7.4.5.1 for the range of ref_idx_lX */
-//      max_ref_idx = sliceHdr->num_ref_idx_l0_active_minus1;
-    max_ref_idx = video->refList0Size - 1;
-
-    if (sliceHdr->num_ref_idx_l0_active_minus1 > 0 && currMB->mbMode != AVC_P8ref0)
-    {
-        for (mbPartIdx = 0; mbPartIdx < 4; mbPartIdx++)
-        {
-            te_v(stream, (uint*)&code, max_ref_idx);
-            if (code > max_ref_idx)
-            {
-                return AVCDEC_FAIL;
-            }
-            currMB->ref_idx_L0[mbPartIdx] = code;
-        }
-    }
-    /* 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;*/
-    for (mbPartIdx = 0; mbPartIdx < 4; mbPartIdx++)
-    {
-        for (subMbPartIdx = 0; subMbPartIdx < currMB->NumSubMbPart[mbPartIdx]; subMbPartIdx++)
-        {
-            se_v(stream, &(video->mvd_l0[mbPartIdx][subMbPartIdx][0]));
-            se_v(stream, &(video->mvd_l0[mbPartIdx][subMbPartIdx][1]));
-        }
-        /* used in deblocking */
-        currMB->RefIdx[mbPartIdx] = video->RefPicList0[currMB->ref_idx_L0[mbPartIdx]]->RefIdx;
-    }
-    return AVCDEC_SUCCESS;
-}
-
-void InterpretMBModeI(AVCMacroblock *mblock, uint mb_type)
-{
-    mblock->NumMbPart = 1;
-
-    mblock->mb_intra = TRUE;
-
-    if (mb_type == 0) /* I_4x4 */
-    {
-        mblock->mbMode = AVC_I4;
-    }
-    else if (mb_type < 25) /* I_PCM */
-    {
-        mblock->mbMode = AVC_I16;
-        mblock->i16Mode = (AVCIntra16x16PredMode)((mb_type - 1) & 0x3);
-        if (mb_type > 12)
-        {
-            mblock->CBP = (((mb_type - 13) >> 2) << 4) + 0x0F;
-        }
-        else
-        {
-            mblock->CBP = ((mb_type - 1) >> 2) << 4;
-        }
-    }
-    else
-    {
-        mblock->mbMode = AVC_I_PCM;
-    }
-
-    return ;
-}
-
-void InterpretMBModeP(AVCMacroblock *mblock, uint mb_type)
-{
-    const static int map2PartWidth[5] = {16, 16, 8, 8, 8};
-    const static int map2PartHeight[5] = {16, 8, 16, 8, 8};
-    const static int map2NumPart[5] = {1, 2, 2, 4, 4};
-    const static AVCMBMode map2mbMode[5] = {AVC_P16, AVC_P16x8, AVC_P8x16, AVC_P8, AVC_P8ref0};
-
-    mblock->mb_intra = FALSE;
-    if (mb_type < 5)
-    {
-        mblock->mbMode = map2mbMode[mb_type];
-        mblock->MbPartWidth = map2PartWidth[mb_type];
-        mblock->MbPartHeight = map2PartHeight[mb_type];
-        mblock->NumMbPart = map2NumPart[mb_type];
-        mblock->NumSubMbPart[0] = mblock->NumSubMbPart[1] =
-                                      mblock->NumSubMbPart[2] = mblock->NumSubMbPart[3] = 1;
-        mblock->SubMbPartWidth[0] = mblock->SubMbPartWidth[1] =
-                                        mblock->SubMbPartWidth[2] = mblock->SubMbPartWidth[3] = mblock->MbPartWidth;
-        mblock->SubMbPartHeight[0] = mblock->SubMbPartHeight[1] =
-                                         mblock->SubMbPartHeight[2] = mblock->SubMbPartHeight[3] = mblock->MbPartHeight;
-    }
-    else
-    {
-        InterpretMBModeI(mblock, mb_type - 5);
-        /* set MV and Ref_Idx codes of Intra blocks in P-slices  */
-        memset(mblock->mvL0, 0, sizeof(int32)*16);
-        mblock->ref_idx_L0[0] = mblock->ref_idx_L0[1] = mblock->ref_idx_L0[2] = mblock->ref_idx_L0[3] = -1;
-    }
-    return ;
-}
-
-void InterpretMBModeB(AVCMacroblock *mblock, uint mb_type)
-{
-    const static int map2PartWidth[23] = {8, 16, 16, 16, 16, 8, 16, 8, 16, 8,
-                                          16, 8, 16, 8, 16, 8, 16, 8, 16, 8, 16, 8, 8
-                                         };
-    const static int map2PartHeight[23] = {8, 16, 16, 16, 8, 16, 8, 16, 8,
-                                           16, 8, 16, 8, 16, 8, 16, 8, 16, 8, 16, 8, 16, 8
-                                          };
-    /* see enum AVCMBType declaration */
-    const static AVCMBMode map2mbMode[23] = {AVC_BDirect16, AVC_P16, AVC_P16, AVC_P16,
-                                            AVC_P16x8, AVC_P8x16, AVC_P16x8, AVC_P8x16, AVC_P16x8, AVC_P8x16,
-                                            AVC_P16x8, AVC_P8x16, AVC_P16x8, AVC_P8x16, AVC_P16x8, AVC_P8x16,
-                                            AVC_P16x8, AVC_P8x16, AVC_P16x8, AVC_P8x16, AVC_P16x8, AVC_P8x16, AVC_P8
-                                            };
-    const static int map2PredMode1[23] = {3, 0, 1, 2, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, -1};
-    const static int map2PredMode2[23] = { -1, -1, -1, -1, 0, 0, 1, 1, 1, 1, 0, 0, 2, 2, 2, 2, 0, 0, 1, 1, 2, 2, -1};
-    const static int map2NumPart[23] = { -1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4};
-
-    mblock->mb_intra = FALSE;
-
-    if (mb_type < 23)
-    {
-        mblock->mbMode = map2mbMode[mb_type];
-        mblock->NumMbPart = map2NumPart[mb_type];
-        mblock->MBPartPredMode[0][0] = (AVCPredMode)map2PredMode1[mb_type];
-        if (mblock->NumMbPart > 1)
-        {
-            mblock->MBPartPredMode[1][0] = (AVCPredMode)map2PredMode2[mb_type];
-        }
-        mblock->MbPartWidth = map2PartWidth[mb_type];
-        mblock->MbPartHeight = map2PartHeight[mb_type];
-    }
-    else
-    {
-        InterpretMBModeI(mblock, mb_type - 23);
-    }
-
-    return ;
-}
-
-void InterpretMBModeSI(AVCMacroblock *mblock, uint mb_type)
-{
-    mblock->mb_intra = TRUE;
-
-    if (mb_type == 0)
-    {
-        mblock->mbMode = AVC_SI4;
-        /* other values are N/A */
-    }
-    else
-    {
-        InterpretMBModeI(mblock, mb_type - 1);
-    }
-    return ;
-}
-
-/* input is mblock->sub_mb_type[] */
-void InterpretSubMBModeP(AVCMacroblock *mblock, uint *sub_mb_type)
-{
-    int i,  sub_type;
-    /* 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_type = (int) sub_mb_type[i];
-        //  mblock->subMbMode[i] = map2subMbMode[sub_type];
-        mblock->NumSubMbPart[i] = map2numSubPart[sub_type];
-        mblock->SubMbPartWidth[i] = map2subPartWidth[sub_type];
-        mblock->SubMbPartHeight[i] = map2subPartHeight[sub_type];
-    }
-
-    return ;
-}
-
-void InterpretSubMBModeB(AVCMacroblock *mblock, uint *sub_mb_type)
-{
-    int i, j, sub_type;
-    /* 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] = {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++)
-    {
-        sub_type = (int) sub_mb_type[i];
-        mblock->subMbMode[i] = map2subMbMode[sub_type];
-        mblock->NumSubMbPart[i] = map2numSubPart[sub_type];
-        mblock->SubMbPartWidth[i] = map2subPartWidth[sub_type];
-        mblock->SubMbPartHeight[i] = map2subPartHeight[sub_type];
-        for (j = 0; j < 4; j++)
-        {
-            mblock->MBPartPredMode[i][j] = (AVCPredMode)map2predMode[sub_type];
-        }
-    }
-
-    return ;
-}
-
-/* see subclause 8.3.1 */
-AVCDec_Status DecodeIntra4x4Mode(AVCCommonObj *video, AVCMacroblock *currMB, AVCDecBitstream *stream)
-{
-    int intra4x4PredModeA = 0, intra4x4PredModeB = 0, predIntra4x4PredMode = 0;
-    int component, SubBlock_indx, block_x, block_y;
-    int dcOnlyPredictionFlag;
-    uint    prev_intra4x4_pred_mode_flag[16];
-    int     rem_intra4x4_pred_mode[16];
-    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 */
-        {
-            BitstreamRead1Bit(stream, &(prev_intra4x4_pred_mode_flag[bindx]));
-
-            if (!prev_intra4x4_pred_mode_flag[bindx])
-            {
-                BitstreamReadBits(stream, 3, (uint*)&(rem_intra4x4_pred_mode[bindx]));
-            }
-
-            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);
-            if (prev_intra4x4_pred_mode_flag[bindx])
-            {
-                currMB->i4Mode[(block_y<<2)+block_x] = (AVCIntra4x4PredMode)predIntra4x4PredMode;
-            }
-            else
-            {
-                if (rem_intra4x4_pred_mode[bindx] < predIntra4x4PredMode)
-                {
-                    currMB->i4Mode[(block_y<<2)+block_x] = (AVCIntra4x4PredMode)rem_intra4x4_pred_mode[bindx];
-                }
-                else
-                {
-                    currMB->i4Mode[(block_y<<2)+block_x] = (AVCIntra4x4PredMode)(rem_intra4x4_pred_mode[bindx] + 1);
-                }
-            }
-            bindx++;
-            block_y += (SubBlock_indx & 1) ;
-            block_x += (1 - 2 * (SubBlock_indx & 1)) ;
-        }
-    }
-    return AVCDEC_SUCCESS;
-}
-AVCDec_Status ConcealSlice(AVCDecObject *decvid, int mbnum_start, int mbnum_end)
-{
-    AVCCommonObj *video = decvid->common;
-    AVCMacroblock *currMB ;
-
-    int CurrMbAddr;
-
-    if (video->RefPicList0[0] == NULL)
-    {
-        return AVCDEC_FAIL;
-    }
-
-    for (CurrMbAddr = mbnum_start; CurrMbAddr < mbnum_end; CurrMbAddr++)
-    {
-        currMB = video->currMB = &(video->mblock[CurrMbAddr]);
-        video->mbNum = CurrMbAddr;
-        currMB->slice_id = video->slice_id++;  //  slice
-
-        /* we can remove this check if we don't support Mbaff. */
-        /* we can wrap below into an initMB() function which will also
-        do necessary reset of macroblock related parameters. */
-
-        video->mb_x = CurrMbAddr % video->PicWidthInMbs;
-        video->mb_y = CurrMbAddr / video->PicWidthInMbs;
-
-        /* check the availability of neighboring macroblocks */
-        InitNeighborAvailability(video, CurrMbAddr);
-
-        currMB->mb_intra = FALSE;
-
-        currMB->mbMode = AVC_SKIP;
-        currMB->MbPartWidth = currMB->MbPartHeight = 16;
-
-        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;
-        currMB->QPy = 26;
-        currMB->QPc = 26;
-        memset(currMB->nz_coeff, 0, sizeof(uint8)*NUM_BLKS_IN_MB);
-
-        currMB->CBP = 0;
-        video->cbp4x4 = 0;
-        /* 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;
-        InterMBPrediction(video);
-
-        video->numMBs--;
-
-    }
-
-    return AVCDEC_SUCCESS;
-}
-
diff --git a/media/libstagefright/codecs/avc/dec/src/vlc.cpp b/media/libstagefright/codecs/avc/dec/src/vlc.cpp
deleted file mode 100644 (file)
index f531249..0000000
+++ /dev/null
@@ -1,815 +0,0 @@
-/* ------------------------------------------------------------------
- * 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 "avcdec_lib.h"
-#include "avcdec_bitstream.h"
-
-//#define PV_ARM_V5
-#ifdef PV_ARM_V5
-#define PV_CLZ(A,B) __asm{CLZ (A),(B)}  \
-    A -= 16;
-#else
-#define PV_CLZ(A,B) while (((B) & 0x8000) == 0) {(B) <<=1; A++;}
-#endif
-
-
-#define PV_NO_CLZ
-
-#ifndef PV_NO_CLZ
-typedef struct tagVLCNumCoeffTrail
-{
-    int trailing;
-    int total_coeff;
-    int length;
-} VLCNumCoeffTrail;
-
-typedef struct tagShiftOffset
-{
-    int shift;
-    int offset;
-} ShiftOffset;
-
-const VLCNumCoeffTrail NumCoeffTrailOnes[3][67] =
-{
-    {{0, 0, 1}, {1, 1, 2}, {2, 2, 3}, {1, 2, 6}, {0, 1, 6}, {3, 3, 5}, {3, 3, 5}, {3, 5, 7},
-        {2, 3, 7}, {3, 4, 6}, {3, 4, 6}, {3, 6, 8}, {2, 4, 8}, {1, 3, 8}, {0, 2, 8}, {3, 7, 9},
-        {2, 5, 9}, {1, 4, 9}, {0, 3, 9}, {3, 8, 10}, {2, 6, 10}, {1, 5, 10}, {0, 4, 10}, {3, 9, 11},
-        {2, 7, 11}, {1, 6, 11}, {0, 5, 11}, {0, 8, 13}, {2, 9, 13}, {1, 8, 13}, {0, 7, 13}, {3, 10, 13},
-        {2, 8, 13}, {1, 7, 13}, {0, 6, 13}, {3, 12, 14}, {2, 11, 14}, {1, 10, 14}, {0, 10, 14}, {3, 11, 14},
-        {2, 10, 14}, {1, 9, 14}, {0, 9, 14}, {3, 14, 15}, {2, 13, 15}, {1, 12, 15}, {0, 12, 15}, {3, 13, 15},
-        {2, 12, 15}, {1, 11, 15}, {0, 11, 15}, {3, 16, 16}, {2, 15, 16}, {1, 15, 16}, {0, 14, 16}, {3, 15, 16},
-        {2, 14, 16}, {1, 14, 16}, {0, 13, 16}, {0, 16, 16}, {2, 16, 16}, {1, 16, 16}, {0, 15, 16}, {1, 13, 15},
-        { -1, -1, -1}, { -1, -1, -1}, { -1, -1, -1}},
-
-    {{1, 1, 2}, {0, 0, 2}, {3, 4, 4}, {3, 3, 4}, {2, 2, 3}, {2, 2, 3}, {3, 6, 6}, {2, 3, 6},
-        {1, 3, 6}, {0, 1, 6}, {3, 5, 5}, {3, 5, 5}, {1, 2, 5}, {1, 2, 5}, {3, 7, 6}, {2, 4, 6},
-        {1, 4, 6}, {0, 2, 6}, {3, 8, 7}, {2, 5, 7}, {1, 5, 7}, {0, 3, 7}, {0, 5, 8}, {2, 6, 8},
-        {1, 6, 8}, {0, 4, 8}, {3, 9, 9}, {2, 7, 9}, {1, 7, 9}, {0, 6, 9}, {3, 11, 11}, {2, 9, 11},
-        {1, 9, 11}, {0, 8, 11}, {3, 10, 11}, {2, 8, 11}, {1, 8, 11}, {0, 7, 11}, {0, 11, 12}, {2, 11, 12},
-        {1, 11, 12}, {0, 10, 12}, {3, 12, 12}, {2, 10, 12}, {1, 10, 12}, {0, 9, 12}, {3, 14, 13}, {2, 13, 13},
-        {1, 13, 13}, {0, 13, 13}, {3, 13, 13}, {2, 12, 13}, {1, 12, 13}, {0, 12, 13}, {1, 15, 14}, {0, 15, 14},
-        {2, 15, 14}, {1, 14, 14}, {2, 14, 13}, {2, 14, 13}, {0, 14, 13}, {0, 14, 13}, {3, 16, 14}, {2, 16, 14},
-        {1, 16, 14}, {0, 16, 14}, {3, 15, 13}},
-
-    {{3, 7, 4}, {3, 6, 4}, {3, 5, 4}, {3, 4, 4}, {3, 3, 4}, {2, 2, 4}, {1, 1, 4}, {0, 0, 4},
-        {1, 5, 5}, {2, 5, 5}, {1, 4, 5}, {2, 4, 5}, {1, 3, 5}, {3, 8, 5}, {2, 3, 5}, {1, 2, 5},
-        {0, 3, 6}, {2, 7, 6}, {1, 7, 6}, {0, 2, 6}, {3, 9, 6}, {2, 6, 6}, {1, 6, 6}, {0, 1, 6},
-        {0, 7, 7}, {0, 6, 7}, {2, 9, 7}, {0, 5, 7}, {3, 10, 7}, {2, 8, 7}, {1, 8, 7}, {0, 4, 7},
-        {3, 12, 8}, {2, 11, 8}, {1, 10, 8}, {0, 9, 8}, {3, 11, 8}, {2, 10, 8}, {1, 9, 8}, {0, 8, 8},
-        {0, 12, 9}, {2, 13, 9}, {1, 12, 9}, {0, 11, 9}, {3, 13, 9}, {2, 12, 9}, {1, 11, 9}, {0, 10, 9},
-        {1, 15, 10}, {0, 14, 10}, {3, 14, 10}, {2, 14, 10}, {1, 14, 10}, {0, 13, 10}, {1, 13, 9}, {1, 13, 9},
-        {1, 16, 10}, {0, 15, 10}, {3, 15, 10}, {2, 15, 10}, {3, 16, 10}, {2, 16, 10}, {0, 16, 10}, { -1, -1, -1},
-        { -1, -1, -1}, { -1, -1, -1}, { -1, -1, -1}}
-};
-
-
-const ShiftOffset NumCoeffTrailOnes_indx[3][15] =
-{
-    {{15, -1}, {14, 0}, {13, 1}, {10, -1}, {9, 3}, {8, 7}, {7, 11}, {6, 15},
-        {5, 19}, {3, 19}, {2, 27}, {1, 35}, {0, 43}, {0, 55}, {1, 62}},
-
-    {{14, -2}, {12, -2}, {10, -2}, {10, 10}, {9, 14}, {8, 18}, {7, 22}, {5, 22},
-        {4, 30}, {3, 38}, {2, 46}, {2, 58}, {3, 65}, {16, 0}, {16, 0}},
-
-    {{12, -8}, {11, 0}, {10, 8}, {9, 16}, {8, 24}, {7, 32}, {6, 40}, {6, 52},
-        {6, 58}, {6, 61}, {16, 0}, {16, 0}, {16, 0}, {16, 0}, {16, 0}}
-};
-
-const static int nC_table[8] = {0, 0, 1, 1, 2, 2, 2, 2};
-
-#endif
-/**
-See algorithm in subclause 9.1, Table 9-1, Table 9-2. */
-AVCDec_Status ue_v(AVCDecBitstream *bitstream, uint *codeNum)
-{
-    uint temp, tmp_cnt;
-    int leading_zeros = 0;
-    BitstreamShowBits(bitstream, 16, &temp);
-    tmp_cnt = temp  | 0x1;
-
-    PV_CLZ(leading_zeros, tmp_cnt)
-
-    if (leading_zeros < 8)
-    {
-        *codeNum = (temp >> (15 - (leading_zeros << 1))) - 1;
-        BitstreamFlushBits(bitstream, (leading_zeros << 1) + 1);
-    }
-    else
-    {
-        BitstreamReadBits(bitstream, (leading_zeros << 1) + 1, &temp);
-        *codeNum = temp - 1;
-    }
-
-    return AVCDEC_SUCCESS;
-}
-
-/**
-See subclause 9.1.1, Table 9-3 */
-AVCDec_Status  se_v(AVCDecBitstream *bitstream, int *value)
-{
-    uint temp, tmp_cnt;
-    int leading_zeros = 0;
-    BitstreamShowBits(bitstream, 16, &temp);
-    tmp_cnt = temp | 0x1;
-
-    PV_CLZ(leading_zeros, tmp_cnt)
-
-    if (leading_zeros < 8)
-    {
-        temp >>= (15 - (leading_zeros << 1));
-        BitstreamFlushBits(bitstream, (leading_zeros << 1) + 1);
-    }
-    else
-    {
-        BitstreamReadBits(bitstream, (leading_zeros << 1) + 1, &temp);
-    }
-
-    *value = temp >> 1;
-
-    if (temp & 0x01)                          // lsb is signed bit
-        *value = -(*value);
-
-//  leading_zeros = temp >> 1;
-//  *value = leading_zeros - (leading_zeros*2*(temp&1));
-
-    return AVCDEC_SUCCESS;
-}
-
-AVCDec_Status  se_v32bit(AVCDecBitstream *bitstream, int32 *value)
-{
-    int leadingZeros;
-    uint32 infobits;
-    uint32 codeNum;
-
-    if (AVCDEC_SUCCESS != GetEGBitstring32bit(bitstream, &leadingZeros, &infobits))
-        return AVCDEC_FAIL;
-
-    codeNum = (1 << leadingZeros) - 1 + infobits;
-
-    *value = (codeNum + 1) / 2;
-
-    if ((codeNum & 0x01) == 0)                        // lsb is signed bit
-        *value = -(*value);
-
-    return AVCDEC_SUCCESS;
-}
-
-
-AVCDec_Status te_v(AVCDecBitstream *bitstream, uint *value, uint range)
-{
-    if (range > 1)
-    {
-        ue_v(bitstream, value);
-    }
-    else
-    {
-        BitstreamRead1Bit(bitstream, value);
-        *value = 1 - (*value);
-    }
-    return AVCDEC_SUCCESS;
-}
-
-
-
-/* This function is only used for syntax with range from -2^31 to 2^31-1 */
-/* only a few of them in the SPS and PPS */
-AVCDec_Status GetEGBitstring32bit(AVCDecBitstream *bitstream, int *leadingZeros, uint32 *infobits)
-{
-    int bit_value;
-    uint info_temp;
-
-    *leadingZeros = 0;
-
-    BitstreamRead1Bit(bitstream, (uint*)&bit_value);
-
-    while (!bit_value)
-    {
-        (*leadingZeros)++;
-        BitstreamRead1Bit(bitstream, (uint*)&bit_value);
-    }
-
-    if (*leadingZeros > 0)
-    {
-        if (sizeof(uint) == 4)  /* 32 bit machine */
-        {
-            BitstreamReadBits(bitstream, *leadingZeros, (uint*)&info_temp);
-            *infobits = (uint32)info_temp;
-        }
-        else if (sizeof(uint) == 2) /* 16 bit machine */
-        {
-            *infobits = 0;
-            if (*leadingZeros > 16)
-            {
-                BitstreamReadBits(bitstream, 16, (uint*)&info_temp);
-                (*leadingZeros) -= 16;
-                *infobits = ((uint32)info_temp) << (*leadingZeros);
-            }
-
-            BitstreamReadBits(bitstream, *leadingZeros, (uint*)&info_temp);
-            *infobits |= (uint32)info_temp ;
-        }
-    }
-    else
-        *infobits = 0;
-
-    return AVCDEC_SUCCESS;
-}
-
-/* see Table 9-4 assignment of codeNum to values of coded_block_pattern. */
-const static uint8 MapCBP[48][2] =
-{
-    {47, 0}, {31, 16}, {15, 1}, { 0, 2}, {23, 4}, {27, 8}, {29, 32}, {30, 3}, { 7, 5}, {11, 10}, {13, 12}, {14, 15},
-    {39, 47}, {43, 7}, {45, 11}, {46, 13}, {16, 14}, { 3, 6}, { 5, 9}, {10, 31}, {12, 35}, {19, 37}, {21, 42}, {26, 44},
-    {28, 33}, {35, 34}, {37, 36}, {42, 40}, {44, 39}, { 1, 43}, { 2, 45}, { 4, 46}, { 8, 17}, {17, 18}, {18, 20}, {20, 24},
-    {24, 19}, { 6, 21}, { 9, 26}, {22, 28}, {25, 23}, {32, 27}, {33, 29}, {34, 30}, {36, 22}, {40, 25}, {38, 38}, {41, 41},
-};
-
-AVCDec_Status DecodeCBP(AVCMacroblock *currMB, AVCDecBitstream *stream)
-{
-    uint codeNum;
-    uint coded_block_pattern;
-
-    ue_v(stream, &codeNum);
-
-    if (codeNum > 47)
-    {
-        return AVCDEC_FAIL;
-    }
-
-    /* can get rid of the if _OPTIMIZE */
-    if (currMB->mbMode == AVC_I4)
-    {
-        coded_block_pattern = MapCBP[codeNum][0];
-    }
-    else
-    {
-        coded_block_pattern = MapCBP[codeNum][1];
-    }
-
-//  currMB->cbpL = coded_block_pattern&0xF;  /* modulo 16 */
-//  currMB->cbpC = coded_block_pattern>>4;   /* divide 16 */
-    currMB->CBP = coded_block_pattern;
-
-    return AVCDEC_SUCCESS;
-}
-
-
-/* TO BE OPTIMIZED !!!!! */
-AVCDec_Status ce_TotalCoeffTrailingOnes(AVCDecBitstream *stream, int *TrailingOnes, int *TotalCoeff, int nC)
-{
-#ifdef PV_NO_CLZ
-    const static uint8 TotCofNTrail1[75][3] = {{0, 0, 16}/*error */, {0, 0, 16}/*error */, {1, 13, 15}, {1, 13, 15}, {0, 16, 16}, {2, 16, 16}, {1, 16, 16}, {0, 15, 16},
-        {3, 16, 16}, {2, 15, 16}, {1, 15, 16}, {0, 14, 16}, {3, 15, 16}, {2, 14, 16}, {1, 14, 16}, {0, 13, 16},
-        {3, 14, 15}, {2, 13, 15}, {1, 12, 15}, {0, 12, 15}, {3, 13, 15}, {2, 12, 15}, {1, 11, 15}, {0, 11, 15},
-        {3, 12, 14}, {2, 11, 14}, {1, 10, 14}, {0, 10, 14}, {3, 11, 14}, {2, 10, 14}, {1, 9, 14}, {0, 9, 14},
-        {0, 8, 13}, {2, 9, 13}, {1, 8, 13}, {0, 7, 13}, {3, 10, 13}, {2, 8, 13}, {1, 7, 13}, {0, 6, 13},
-        {3, 9, 11}, {2, 7, 11}, {1, 6, 11}, {0, 5, 11}, {3, 8, 10},
-        {2, 6, 10}, {1, 5, 10}, {0, 4, 10}, {3, 7, 9}, {2, 5, 9}, {1, 4, 9}, {0, 3, 9}, {3, 6, 8},
-        {2, 4, 8}, {1, 3, 8}, {0, 2, 8}, {3, 5, 7}, {2, 3, 7}, {3, 4, 6}, {3, 4, 6}, {1, 2, 6},
-        {1, 2, 6}, {0, 1, 6}, {0, 1, 6}, {3, 3, 5}, {3, 3, 5}, {3, 3, 5}, {3, 3, 5}, {2, 2, 3},
-        {1, 1, 2}, {1, 1, 2}, {0, 0, 1}, {0, 0, 1}, {0, 0, 1}, {0, 0, 1}
-    };
-
-    const static uint8 TotCofNTrail2[84][3] = {{0, 0, 14 /* error */}, {0, 0, 14/*error */}, {3, 15, 13}, {3, 15, 13}, {3, 16, 14}, {2, 16, 14}, {1, 16, 14}, {0, 16, 14},
-        {1, 15, 14}, {0, 15, 14}, {2, 15, 14}, {1, 14, 14}, {2, 14, 13}, {2, 14, 13}, {0, 14, 13}, {0, 14, 13},
-        {3, 14, 13}, {2, 13, 13}, {1, 13, 13}, {0, 13, 13}, {3, 13, 13}, {2, 12, 13}, {1, 12, 13}, {0, 12, 13},
-        {0, 11, 12}, {2, 11, 12}, {1, 11, 12}, {0, 10, 12}, {3, 12, 12}, {2, 10, 12}, {1, 10, 12}, {0, 9, 12},
-        {3, 11, 11}, {2, 9, 11}, {1, 9, 11}, {0, 8, 11}, {3, 10, 11}, {2, 8, 11}, {1, 8, 11}, {0, 7, 11},
-        {3, 9, 9}, {2, 7, 9}, {1, 7, 9}, {0, 6, 9}, {0, 5, 8}, {0, 5, 8}, {2, 6, 8}, {2, 6, 8},
-        {1, 6, 8}, {1, 6, 8}, {0, 4, 8}, {0, 4, 8}, {3, 8, 7}, {2, 5, 7}, {1, 5, 7}, {0, 3, 7},
-        {3, 7, 6}, {3, 7, 6}, {2, 4, 6}, {2, 4, 6}, {1, 4, 6}, {1, 4, 6}, {0, 2, 6}, {0, 2, 6},
-        {3, 6, 6}, {2, 3, 6}, {1, 3, 6}, {0, 1, 6}, {3, 5, 5}, {3, 5, 5}, {1, 2, 5}, {1, 2, 5},
-        {3, 4, 4}, {3, 3, 4}, {2, 2, 3}, {2, 2, 3}, {1, 1, 2}, {1, 1, 2}, {1, 1, 2}, {1, 1, 2},
-        {0, 0, 2}, {0, 0, 2}, {0, 0, 2}, {0, 0, 2}
-    };
-
-    const static uint8 TotCofNTrail3[64][3] = {{0, 0, 10/*error*/}, {0, 16, 10}, {3, 16, 10}, {2, 16, 10}, {1, 16, 10}, {0, 15, 10}, {3, 15, 10},
-        {2, 15, 10}, {1, 15, 10}, {0, 14, 10}, {3, 14, 10}, {2, 14, 10}, {1, 14, 10}, {0, 13, 10}, {1, 13, 9},
-        {1, 13, 9}, {0, 12, 9}, {2, 13, 9}, {1, 12, 9}, {0, 11, 9}, {3, 13, 9}, {2, 12, 9}, {1, 11, 9},
-        {0, 10, 9}, {3, 12, 8}, {2, 11, 8}, {1, 10, 8}, {0, 9, 8}, {3, 11, 8}, {2, 10, 8}, {1, 9, 8},
-        {0, 8, 8}, {0, 7, 7}, {0, 6, 7}, {2, 9, 7}, {0, 5, 7}, {3, 10, 7}, {2, 8, 7}, {1, 8, 7},
-        {0, 4, 7}, {0, 3, 6}, {2, 7, 6}, {1, 7, 6}, {0, 2, 6}, {3, 9, 6}, {2, 6, 6}, {1, 6, 6},
-        {0, 1, 6}, {1, 5, 5}, {2, 5, 5}, {1, 4, 5}, {2, 4, 5}, {1, 3, 5}, {3, 8, 5}, {2, 3, 5},
-        {1, 2, 5}, {3, 7, 4}, {3, 6, 4}, {3, 5, 4}, {3, 4, 4}, {3, 3, 4}, {2, 2, 4}, {1, 1, 4},
-        {0, 0, 4}
-    };
-#endif
-    uint code;
-
-#ifdef PV_NO_CLZ
-    uint8 *pcode;
-    if (nC < 2)
-    {
-        BitstreamShowBits(stream, 16, &code);
-
-        if (code >= 8192)
-        {
-            pcode = (uint8*) & (TotCofNTrail1[(code>>13)+65+2][0]);
-        }
-        else if (code >= 2048)
-        {
-            pcode = (uint8*) & (TotCofNTrail1[(code>>9)+50+2][0]);
-        }
-        else if (code >= 1024)
-        {
-            pcode = (uint8*) & (TotCofNTrail1[(code>>8)+46+2][0]);
-        }
-        else if (code >= 512)
-        {
-            pcode = (uint8*) & (TotCofNTrail1[(code>>7)+42+2][0]);
-        }
-        else if (code >= 256)
-        {
-            pcode = (uint8*) & (TotCofNTrail1[(code>>6)+38+2][0]);
-        }
-        else if (code >= 128)
-        {
-            pcode = (uint8*) & (TotCofNTrail1[(code>>5)+34+2][0]);
-        }
-        else if (code >= 64)
-        {
-            pcode = (uint8*) & (TotCofNTrail1[(code>>3)+22+2][0]);
-        }
-        else if (code >= 32)
-        {
-            pcode = (uint8*) & (TotCofNTrail1[(code>>2)+14+2][0]);
-        }
-        else if (code >= 16)
-        {
-            pcode = (uint8*) & (TotCofNTrail1[(code>>1)+6+2][0]);
-        }
-        else
-        {
-            pcode = (uint8*) & (TotCofNTrail1[(code-2)+2][0]);
-        }
-
-        *TrailingOnes = pcode[0];
-        *TotalCoeff = pcode[1];
-
-        BitstreamFlushBits(stream, pcode[2]);
-    }
-    else if (nC < 4)
-    {
-        BitstreamShowBits(stream, 14, &code);
-
-        if (code >= 4096)
-        {
-            pcode = (uint8*) & (TotCofNTrail2[(code>>10)+66+2][0]);
-        }
-        else if (code >= 2048)
-        {
-            pcode = (uint8*) & (TotCofNTrail2[(code>>8)+54+2][0]);
-        }
-        else if (code >= 512)
-        {
-            pcode = (uint8*) & (TotCofNTrail2[(code>>7)+46+2][0]);
-        }
-        else if (code >= 128)
-        {
-            pcode = (uint8*) & (TotCofNTrail2[(code>>5)+34+2][0]);
-        }
-        else if (code >= 64)
-        {
-            pcode = (uint8*) & (TotCofNTrail2[(code>>3)+22+2][0]);
-        }
-        else if (code >= 32)
-        {
-            pcode = (uint8*) & (TotCofNTrail2[(code>>2)+14+2][0]);
-        }
-        else if (code >= 16)
-        {
-            pcode = (uint8*) & (TotCofNTrail2[(code>>1)+6+2][0]);
-        }
-        else
-        {
-            pcode = (uint8*) & (TotCofNTrail2[code-2+2][0]);
-        }
-        *TrailingOnes = pcode[0];
-        *TotalCoeff = pcode[1];
-
-        BitstreamFlushBits(stream, pcode[2]);
-    }
-    else if (nC < 8)
-    {
-        BitstreamShowBits(stream, 10, &code);
-
-        if (code >= 512)
-        {
-            pcode = (uint8*) & (TotCofNTrail3[(code>>6)+47+1][0]);
-        }
-        else if (code >= 256)
-        {
-            pcode = (uint8*) & (TotCofNTrail3[(code>>5)+39+1][0]);
-        }
-        else if (code >= 128)
-        {
-            pcode = (uint8*) & (TotCofNTrail3[(code>>4)+31+1][0]);
-        }
-        else if (code >= 64)
-        {
-            pcode = (uint8*) & (TotCofNTrail3[(code>>3)+23+1][0]);
-        }
-        else if (code >= 32)
-        {
-            pcode = (uint8*) & (TotCofNTrail3[(code>>2)+15+1][0]);
-        }
-        else if (code >= 16)
-        {
-            pcode = (uint8*) & (TotCofNTrail3[(code>>1)+7+1][0]);
-        }
-        else
-        {
-            pcode = (uint8*) & (TotCofNTrail3[code-1+1][0]);
-        }
-        *TrailingOnes = pcode[0];
-        *TotalCoeff = pcode[1];
-
-        BitstreamFlushBits(stream, pcode[2]);
-    }
-    else
-    {
-        /* read 6 bit FLC */
-        BitstreamReadBits(stream, 6, &code);
-
-
-        *TrailingOnes = code & 3;
-        *TotalCoeff = (code >> 2) + 1;
-
-        if (*TotalCoeff > 16)
-        {
-            *TotalCoeff = 16;  // _ERROR
-        }
-
-        if (code == 3)
-        {
-            *TrailingOnes = 0;
-            (*TotalCoeff)--;
-        }
-    }
-#else
-    const VLCNumCoeffTrail *ptr;
-    const ShiftOffset *ptr_indx;
-    uint temp, leading_zeros = 0;
-
-    if (nC < 8)
-    {
-
-        BitstreamShowBits(stream, 16, &code);
-        temp = code | 1;
-
-        PV_CLZ(leading_zeros, temp)
-
-        temp = nC_table[nC];
-        ptr_indx = &NumCoeffTrailOnes_indx[temp][leading_zeros];
-        ptr = &NumCoeffTrailOnes[temp][(code >> ptr_indx->shift) + ptr_indx->offset];
-        *TrailingOnes = ptr->trailing;
-        *TotalCoeff = ptr->total_coeff;
-        BitstreamFlushBits(stream, ptr->length);
-    }
-    else
-    {
-        /* read 6 bit FLC */
-        BitstreamReadBits(stream, 6, &code);
-
-
-        *TrailingOnes = code & 3;
-        *TotalCoeff = (code >> 2) + 1;
-
-        if (*TotalCoeff > 16)
-        {
-            *TotalCoeff = 16;  // _ERROR
-        }
-
-        if (code == 3)
-        {
-            *TrailingOnes = 0;
-            (*TotalCoeff)--;
-        }
-    }
-#endif
-    return AVCDEC_SUCCESS;
-}
-
-/* TO BE OPTIMIZED !!!!! */
-AVCDec_Status ce_TotalCoeffTrailingOnesChromaDC(AVCDecBitstream *stream, int *TrailingOnes, int *TotalCoeff)
-{
-    AVCDec_Status status;
-
-    const static uint8 TotCofNTrail5[21][3] =
-    {
-        {3, 4, 7}, {3, 4, 7}, {2, 4, 8}, {1, 4, 8}, {2, 3, 7}, {2, 3, 7}, {1, 3, 7},
-        {1, 3, 7}, {0, 4, 6}, {0, 3, 6}, {0, 2, 6}, {3, 3, 6}, {1, 2, 6}, {0, 1, 6},
-        {2, 2, 3}, {0, 0, 2}, {0, 0, 2}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}
-    };
-
-    uint code;
-    uint8 *pcode;
-
-    status = BitstreamShowBits(stream, 8, &code);
-
-    if (code >= 32)
-    {
-        pcode = (uint8*) & (TotCofNTrail5[(code>>5)+13][0]);
-    }
-    else if (code >= 8)
-    {
-        pcode = (uint8*) & (TotCofNTrail5[(code>>2)+6][0]);
-    }
-    else
-    {
-        pcode = (uint8*) & (TotCofNTrail5[code][0]);
-    }
-
-    *TrailingOnes = pcode[0];
-    *TotalCoeff = pcode[1];
-
-    BitstreamFlushBits(stream, pcode[2]);
-
-    return status;
-}
-
-/* see Table 9-6 */
-AVCDec_Status ce_LevelPrefix(AVCDecBitstream *stream, uint *code)
-{
-    uint temp;
-    uint leading_zeros = 0;
-    BitstreamShowBits(stream, 16, &temp);
-    temp |= 1 ;
-
-    PV_CLZ(leading_zeros, temp)
-
-    BitstreamFlushBits(stream, leading_zeros + 1);
-    *code = leading_zeros;
-    return AVCDEC_SUCCESS;
-}
-
-/* see Table 9-7 and 9-8 */
-AVCDec_Status ce_TotalZeros(AVCDecBitstream *stream, int *code, int TotalCoeff)
-{
-    const static uint8 TotZero1[28][2] = {{15, 9}, {14, 9}, {13, 9}, {12, 8},
-        {12, 8}, {11, 8}, {11, 8}, {10, 7}, {9, 7}, {8, 6}, {8, 6}, {7, 6}, {7, 6}, {6, 5}, {6, 5},
-        {6, 5}, {6, 5}, {5, 5}, {5, 5}, {5, 5}, {5, 5}, {4, 4}, {3, 4},
-        {2, 3}, {2, 3}, {1, 3}, {1, 3}, {0, 1}
-    };
-
-    const static uint8 TotZero2n3[2][18][2] = {{{14, 6}, {13, 6}, {12, 6}, {11, 6},
-            {10, 5}, {10, 5}, {9, 5}, {9, 5}, {8, 4}, {7, 4}, {6, 4}, {5, 4}, {4, 3}, {4, 3},
-            {3, 3}, {2, 3}, {1, 3}, {0, 3}},
-
-        /*const static uint8 TotZero3[18][2]=*/{{13, 6}, {11, 6}, {12, 5}, {12, 5}, {10, 5},
-            {10, 5}, {9, 5}, {9, 5}, {8, 4}, {5, 4}, {4, 4}, {0, 4}, {7, 3}, {7, 3}, {6, 3}, {3, 3},
-            {2, 3}, {1, 3}}
-    };
-
-    const static uint8 TotZero4[17][2] = {{12, 5}, {11, 5}, {10, 5}, {0, 5}, {9, 4},
-        {9, 4}, {7, 4}, {7, 4}, {3, 4}, {3, 4}, {2, 4}, {2, 4}, {8, 3}, {6, 3}, {5, 3}, {4, 3}, {1, 3}
-    };
-
-    const static uint8 TotZero5[13][2] = {{11, 5}, {9, 5}, {10, 4}, {8, 4}, {2, 4},
-        {1, 4}, {0, 4}, {7, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}
-    };
-
-    const static uint8 TotZero6to10[5][15][2] = {{{10, 6}, {0, 6}, {1, 5}, {1, 5}, {8, 4},
-            {8, 4}, {8, 4}, {8, 4}, {9, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}},
-
-        /*const static uint8 TotZero7[15][2]=*/{{9, 6}, {0, 6}, {1, 5}, {1, 5}, {7, 4},
-            {7, 4}, {7, 4}, {7, 4}, {8, 3}, {6, 3}, {4, 3}, {3, 3}, {2, 3}, {5, 2}, {5, 2}},
-
-        /*const static uint8 TotZero8[15][2]=*/{{8, 6}, {0, 6}, {2, 5}, {2, 5}, {1, 4},
-            {1, 4}, {1, 4}, {1, 4}, {7, 3}, {6, 3}, {3, 3}, {5, 2}, {5, 2}, {4, 2}, {4, 2}},
-
-        /*const static uint8 TotZero9[15][2]=*/{{1, 6}, {0, 6}, {7, 5}, {7, 5}, {2, 4},
-            {2, 4}, {2, 4}, {2, 4}, {5, 3}, {6, 2}, {6, 2}, {4, 2}, {4, 2}, {3, 2}, {3, 2}},
-
-        /*const static uint8 TotZero10[11][2]=*/{{1, 5}, {0, 5}, {6, 4}, {6, 4}, {2, 3},
-            {2, 3}, {2, 3}, {2, 3}, {5, 2}, {4, 2}, {3, 2}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}
-    };
-
-    const static uint8 TotZero11[7][2] = {{0, 4}, {1, 4}, {2, 3}, {2, 3}, {3, 3}, {5, 3}, {4, 1}};
-
-    const static uint8 TotZero12to15[4][5][2] =
-    {
-        {{3, 1}, {2, 2}, {4, 3}, {1, 4}, {0, 4}},
-        {{2, 1}, {3, 2}, {1, 3}, {0, 3}, {0, 0}},
-        {{2, 1}, {1, 2}, {0, 2}, {0, 0}, {0, 0}},
-        {{1, 1}, {0, 1}, {0, 0}, {0, 0}, {0, 0}}
-    };
-
-    uint temp, mask;
-    int indx;
-    uint8 *pcode;
-
-    if (TotalCoeff == 1)
-    {
-        BitstreamShowBits(stream, 9, &temp);
-
-        if (temp >= 256)
-        {
-            pcode = (uint8*) & (TotZero1[27][0]);
-        }
-        else if (temp >= 64)
-        {
-            pcode = (uint8*) & (TotZero1[(temp>>5)+19][0]);
-        }
-        else if (temp >= 8)
-        {
-            pcode = (uint8*) & (TotZero1[(temp>>2)+5][0]);
-        }
-        else
-        {
-            pcode = (uint8*) & (TotZero1[temp-1][0]);
-        }
-
-    }
-    else if (TotalCoeff == 2 || TotalCoeff == 3)
-    {
-        BitstreamShowBits(stream, 6, &temp);
-
-        if (temp >= 32)
-        {
-            pcode = (uint8*) & (TotZero2n3[TotalCoeff-2][(temp>>3)+10][0]);
-        }
-        else if (temp >= 8)
-        {
-            pcode = (uint8*) & (TotZero2n3[TotalCoeff-2][(temp>>2)+6][0]);
-        }
-        else
-        {
-            pcode = (uint8*) & (TotZero2n3[TotalCoeff-2][temp][0]);
-        }
-    }
-    else if (TotalCoeff == 4)
-    {
-        BitstreamShowBits(stream, 5, &temp);
-
-        if (temp >= 12)
-        {
-            pcode = (uint8*) & (TotZero4[(temp>>2)+9][0]);
-        }
-        else
-        {
-            pcode = (uint8*) & (TotZero4[temp][0]);
-        }
-    }
-    else if (TotalCoeff == 5)
-    {
-        BitstreamShowBits(stream, 5, &temp);
-
-        if (temp >= 16)
-        {
-            pcode = (uint8*) & (TotZero5[(temp>>2)+5][0]);
-        }
-        else if (temp >= 2)
-        {
-            pcode = (uint8*) & (TotZero5[(temp>>1)+1][0]);
-        }
-        else
-        {
-            pcode = (uint8*) & (TotZero5[temp][0]);
-        }
-    }
-    else if (TotalCoeff >= 6 && TotalCoeff <= 10)
-    {
-        if (TotalCoeff == 10)
-        {
-            BitstreamShowBits(stream, 5, &temp);
-        }
-        else
-        {
-            BitstreamShowBits(stream, 6, &temp);
-        }
-
-
-        if (temp >= 8)
-        {
-            pcode = (uint8*) & (TotZero6to10[TotalCoeff-6][(temp>>3)+7][0]);
-        }
-        else
-        {
-            pcode = (uint8*) & (TotZero6to10[TotalCoeff-6][temp][0]);
-        }
-    }
-    else if (TotalCoeff == 11)
-    {
-        BitstreamShowBits(stream, 4, &temp);
-
-
-        if (temp >= 8)
-        {
-            pcode = (uint8*) & (TotZero11[6][0]);
-        }
-        else if (temp >= 4)
-        {
-            pcode = (uint8*) & (TotZero11[(temp>>1)+2][0]);
-        }
-        else
-        {
-            pcode = (uint8*) & (TotZero11[temp][0]);
-        }
-    }
-    else
-    {
-        BitstreamShowBits(stream, (16 - TotalCoeff), &temp);
-        mask = 1 << (15 - TotalCoeff);
-        indx = 0;
-        while ((temp&mask) == 0 && indx < (16 - TotalCoeff)) /* search location of 1 bit */
-        {
-            mask >>= 1;
-            indx++;
-        }
-
-        pcode = (uint8*) & (TotZero12to15[TotalCoeff-12][indx]);
-    }
-
-    *code = pcode[0];
-    BitstreamFlushBits(stream, pcode[1]);
-
-    return AVCDEC_SUCCESS;
-}
-
-/* see Table 9-9 */
-AVCDec_Status ce_TotalZerosChromaDC(AVCDecBitstream *stream, int *code, int TotalCoeff)
-{
-    const static uint8 TotZeroChrom1to3[3][8][2] =
-    {
-        {{3, 3}, {2, 3}, {1, 2}, {1, 2}, {0, 1}, {0, 1}, {0, 1}, {0, 1}},
-        {{2, 2}, {2, 2}, {1, 2}, {1, 2}, {0, 1}, {0, 1}, {0, 1}, {0, 1}},
-        {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}},
-    };
-
-
-    uint temp;
-    uint8 *pcode;
-
-    BitstreamShowBits(stream, 3, &temp);
-    pcode = (uint8*) & (TotZeroChrom1to3[TotalCoeff-1][temp]);
-
-    *code = pcode[0];
-
-    BitstreamFlushBits(stream, pcode[1]);
-
-    return AVCDEC_SUCCESS;
-}
-
-/* see Table 9-10 */
-AVCDec_Status ce_RunBefore(AVCDecBitstream *stream, int *code, int zerosLeft)
-{
-    const static int codlen[6] = {1, 2, 2, 3, 3, 3}; /* num bits to read */
-    const static uint8 RunBeforeTab[6][8][2] = {{{1, 1}, {0, 1}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},
-        /*const static int RunBefore2[4][2]=*/{{2, 2}, {1, 2}, {0, 1}, {0, 1}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},
-        /*const static int RunBefore3[4][2]=*/{{3, 2}, {2, 2}, {1, 2}, {0, 2}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},
-        /*const static int RunBefore4[7][2]=*/{{4, 3}, {3, 3}, {2, 2}, {2, 2}, {1, 2}, {1, 2}, {0, 2}, {0, 2}},
-        /*const static int RunBefore5[7][2]=*/{{5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 2}, {1, 2}, {0, 2}, {0, 2}},
-        /*const static int RunBefore6[7][2]=*/{{1, 3}, {2, 3}, {4, 3}, {3, 3}, {6, 3}, {5, 3}, {0, 2}, {0, 2}}
-    };
-
-    uint temp;
-    uint8 *pcode;
-    int indx;
-
-    if (zerosLeft <= 6)
-    {
-        BitstreamShowBits(stream, codlen[zerosLeft-1], &temp);
-
-        pcode = (uint8*) & (RunBeforeTab[zerosLeft-1][temp][0]);
-
-        *code = pcode[0];
-
-        BitstreamFlushBits(stream, pcode[1]);
-    }
-    else
-    {
-        BitstreamReadBits(stream, 3, &temp);
-        if (temp)
-        {
-            *code = 7 - temp;
-        }
-        else
-        {
-            BitstreamShowBits(stream, 9, &temp);
-            temp <<= 7;
-            temp |= 1;
-            indx = 0;
-            PV_CLZ(indx, temp)
-            *code = 7 + indx;
-            BitstreamFlushBits(stream, indx + 1);
-        }
-    }
-
-
-    return AVCDEC_SUCCESS;
-}
index a4ca32d..3246021 100644 (file)
@@ -93,6 +93,11 @@ SoftwareRenderer::SoftwareRenderer(
             GRALLOC_USAGE_SW_READ_NEVER | GRALLOC_USAGE_SW_WRITE_OFTEN
             | GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_EXTERNAL_DISP));
 
+    CHECK_EQ(0,
+            native_window_set_scaling_mode(
+            mNativeWindow.get(),
+            NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW));
+
     // Width must be multiple of 32???
     CHECK_EQ(0, native_window_set_buffers_geometry(
                 mNativeWindow.get(),
index 73b3d5b..90d64ba 100644 (file)
@@ -785,7 +785,10 @@ status_t LiveSession::decryptBuffer(
             keySource->setUID(mUID);
         }
 
-        status_t err = keySource->connect(keyURI.c_str());
+        status_t err =
+            keySource->connect(
+                    keyURI.c_str(),
+                    mExtraHeaders.isEmpty() ? NULL : &mExtraHeaders);
 
         if (err == OK) {
             size_t offset = 0;
index 123fbf8..9df9f59 100644 (file)
@@ -106,21 +106,38 @@ static bool MakeURL(const char *baseURL, const char *url, AString *out) {
         return true;
     }
 
-    size_t n = strlen(baseURL);
-    if (baseURL[n - 1] == '/') {
-        out->setTo(baseURL);
-        out->append(url);
-    } else {
-        const char *slashPos = strrchr(baseURL, '/');
+    if (url[0] == '/') {
+        // URL is an absolute path.
+
+        char *protocolEnd = strstr(baseURL, "//") + 2;
+        char *pathStart = strchr(protocolEnd, '/');
 
-        if (slashPos > &baseURL[6]) {
-            out->setTo(baseURL, slashPos - baseURL);
+        if (pathStart != NULL) {
+            out->setTo(baseURL, pathStart - baseURL);
         } else {
             out->setTo(baseURL);
         }
 
-        out->append("/");
         out->append(url);
+    } else {
+        // URL is a relative path
+
+        size_t n = strlen(baseURL);
+        if (baseURL[n - 1] == '/') {
+            out->setTo(baseURL);
+            out->append(url);
+        } else {
+            const char *slashPos = strrchr(baseURL, '/');
+
+            if (slashPos > &baseURL[6]) {
+                out->setTo(baseURL, slashPos - baseURL);
+            } else {
+                out->setTo(baseURL);
+            }
+
+            out->append("/");
+            out->append(url);
+        }
     }
 
     LOGV("base:'%s', url:'%s' => '%s'", baseURL, url, out->c_str());
index 02b1c8e..1e33f05 100644 (file)
@@ -38,7 +38,6 @@ static const struct {
     { "OMX.google.amrnb.decoder", "amrdec", "audio_decoder.amrnb" },
     { "OMX.google.amrwb.decoder", "amrdec", "audio_decoder.amrwb" },
     { "OMX.google.h264.decoder", "h264dec", "video_decoder.avc" },
-    { "OMX.google.avc.decoder", "avcdec", "video_decoder.avc" },
     { "OMX.google.g711.alaw.decoder", "g711dec", "audio_decoder.g711alaw" },
     { "OMX.google.g711.mlaw.decoder", "g711dec", "audio_decoder.g711mlaw" },
     { "OMX.google.h263.decoder", "mpeg4dec", "video_decoder.h263" },
index 5c016c4..36fc9bf 100644 (file)
@@ -76,7 +76,15 @@ int32_t ANativeWindow_getFormat(ANativeWindow* window) {
 
 int32_t ANativeWindow_setBuffersGeometry(ANativeWindow* window, int32_t width,
         int32_t height, int32_t format) {
-    return native_window_set_buffers_geometry(window, width, height, format);
+    int32_t err = native_window_set_buffers_geometry(window, width, height, format);
+    if (!err) {
+        int mode = NATIVE_WINDOW_SCALING_MODE_FREEZE;
+        if (width && height) {
+            mode = NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW;
+        }
+        err = native_window_set_scaling_mode(window, mode);
+    }
+    return err;
 }
 
 int32_t ANativeWindow_lock(ANativeWindow* window, ANativeWindow_Buffer* outBuffer,
diff --git a/opengl/tests/gl2_copyTexImage/Android.mk b/opengl/tests/gl2_copyTexImage/Android.mk
new file mode 100644 (file)
index 0000000..bef1f90
--- /dev/null
@@ -0,0 +1,19 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:= \
+       gl2_copyTexImage.cpp
+
+LOCAL_SHARED_LIBRARIES := \
+       libcutils \
+    libEGL \
+    libGLESv2 \
+    libui
+
+LOCAL_MODULE:= test-opengl-gl2_copyTexImage
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES
+
+include $(BUILD_EXECUTABLE)
diff --git a/opengl/tests/gl2_copyTexImage/gl2_copyTexImage.cpp b/opengl/tests/gl2_copyTexImage/gl2_copyTexImage.cpp
new file mode 100644 (file)
index 0000000..c2bfdec
--- /dev/null
@@ -0,0 +1,467 @@
+/*
+ * 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 <time.h>
+#include <sched.h>
+#include <sys/resource.h>
+
+#include <EGL/egl.h>
+#include <GLES2/gl2.h>
+#include <GLES2/gl2ext.h>
+
+#include <utils/Timers.h>
+
+#include <ui/FramebufferNativeWindow.h>
+#include <ui/EGLUtils.h>
+
+using namespace android;
+
+static void printGLString(const char *name, GLenum s) {
+    // fprintf(stderr, "printGLString %s, %d\n", name, s);
+    const char *v = (const char *) glGetString(s);
+    // int error = glGetError();
+    // fprintf(stderr, "glGetError() = %d, result of glGetString = %x\n", error,
+    //        (unsigned int) v);
+    // if ((v < (const char*) 0) || (v > (const char*) 0x10000))
+    //    fprintf(stderr, "GL %s = %s\n", name, v);
+    // else
+    //    fprintf(stderr, "GL %s = (null) 0x%08x\n", name, (unsigned int) v);
+    fprintf(stderr, "GL %s = %s\n", name, v);
+}
+
+static void checkEglError(const char* op, EGLBoolean returnVal = EGL_TRUE) {
+    if (returnVal != EGL_TRUE) {
+        fprintf(stderr, "%s() returned %d\n", op, returnVal);
+    }
+
+    for (EGLint error = eglGetError(); error != EGL_SUCCESS; error
+            = eglGetError()) {
+        fprintf(stderr, "after %s() eglError %s (0x%x)\n", op, EGLUtils::strerror(error),
+                error);
+    }
+}
+
+static void checkGlError(const char* op) {
+    for (GLint error = glGetError(); error; error
+            = glGetError()) {
+        fprintf(stderr, "after %s() glError (0x%x)\n", op, error);
+    }
+}
+
+static const char gVertexShader[] = "attribute vec4 vPosition;\n"
+    "void main() {\n"
+    "  gl_Position = vPosition;\n"
+    "}\n";
+
+static const char gFragmentShader[] = "precision mediump float;\n"
+    "void main() {\n"
+    "  gl_FragColor = vec4(0.0, 1.0, 0.0, 0.5);\n"
+    "}\n";
+
+GLuint loadShader(GLenum shaderType, const char* pSource) {
+    GLuint shader = glCreateShader(shaderType);
+    if (shader) {
+        glShaderSource(shader, 1, &pSource, NULL);
+        glCompileShader(shader);
+        GLint compiled = 0;
+        glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
+        if (!compiled) {
+            GLint infoLen = 0;
+            glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
+            if (infoLen) {
+                char* buf = (char*) malloc(infoLen);
+                if (buf) {
+                    glGetShaderInfoLog(shader, infoLen, NULL, buf);
+                    fprintf(stderr, "Could not compile shader %d:\n%s\n",
+                            shaderType, buf);
+                    free(buf);
+                }
+                glDeleteShader(shader);
+                shader = 0;
+            }
+        }
+    }
+    return shader;
+}
+
+GLuint createProgram(const char* pVertexSource, const char* pFragmentSource) {
+    GLuint vertexShader = loadShader(GL_VERTEX_SHADER, pVertexSource);
+    if (!vertexShader) {
+        return 0;
+    }
+
+    GLuint pixelShader = loadShader(GL_FRAGMENT_SHADER, pFragmentSource);
+    if (!pixelShader) {
+        return 0;
+    }
+
+    GLuint program = glCreateProgram();
+    if (program) {
+        glAttachShader(program, vertexShader);
+        checkGlError("glAttachShader");
+        glAttachShader(program, pixelShader);
+        checkGlError("glAttachShader");
+        glLinkProgram(program);
+        GLint linkStatus = GL_FALSE;
+        glGetProgramiv(program, GL_LINK_STATUS, &linkStatus);
+        if (linkStatus != GL_TRUE) {
+            GLint bufLength = 0;
+            glGetProgramiv(program, GL_INFO_LOG_LENGTH, &bufLength);
+            if (bufLength) {
+                char* buf = (char*) malloc(bufLength);
+                if (buf) {
+                    glGetProgramInfoLog(program, bufLength, NULL, buf);
+                    fprintf(stderr, "Could not link program:\n%s\n", buf);
+                    free(buf);
+                }
+            }
+            glDeleteProgram(program);
+            program = 0;
+        }
+    }
+    return program;
+}
+
+GLuint gProgram;
+GLuint gTextureProgram;
+GLuint gvPositionHandle;
+GLuint gvTexturePositionHandle;
+GLuint gvTextureTexCoordsHandle;
+GLuint gvTextureSamplerHandle;
+GLuint gFbo;
+GLuint gTexture;
+GLuint gBufferTexture;
+
+static const char gSimpleVS[] =
+    "attribute vec4 position;\n"
+    "attribute vec2 texCoords;\n"
+    "varying vec2 outTexCoords;\n"
+    "\nvoid main(void) {\n"
+    "    outTexCoords = texCoords;\n"
+    "    gl_Position = position;\n"
+    "}\n\n";
+static const char gSimpleFS[] =
+    "precision mediump float;\n\n"
+    "varying vec2 outTexCoords;\n"
+    "uniform sampler2D texture;\n"
+    "\nvoid main(void) {\n"
+    "    gl_FragColor = texture2D(texture, outTexCoords);\n"
+    "}\n\n";
+
+bool setupGraphics(int w, int h) {
+    gProgram = createProgram(gVertexShader, gFragmentShader);
+    if (!gProgram) {
+        return false;
+    }
+    gvPositionHandle = glGetAttribLocation(gProgram, "vPosition");
+    checkGlError("glGetAttribLocation");
+    fprintf(stderr, "glGetAttribLocation(\"vPosition\") = %d\n", gvPositionHandle);
+
+    gTextureProgram = createProgram(gSimpleVS, gSimpleFS);
+    if (!gTextureProgram) {
+        return false;
+    }
+    gvTexturePositionHandle = glGetAttribLocation(gTextureProgram, "position");
+    checkGlError("glGetAttribLocation");
+    gvTextureTexCoordsHandle = glGetAttribLocation(gTextureProgram, "texCoords");
+    checkGlError("glGetAttribLocation");
+    gvTextureSamplerHandle = glGetUniformLocation(gTextureProgram, "texture");
+    checkGlError("glGetAttribLocation");
+
+    glActiveTexture(GL_TEXTURE0);
+
+    glGenTextures(1, &gTexture);
+    glBindTexture(GL_TEXTURE_2D, gTexture);
+    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
+    glGenTextures(1, &gBufferTexture);
+    glBindTexture(GL_TEXTURE_2D, gBufferTexture);
+    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
+    glGenFramebuffers(1, &gFbo);
+    glBindFramebuffer(GL_FRAMEBUFFER, gFbo);
+    glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, gTexture, 0);
+
+    glBindFramebuffer(GL_FRAMEBUFFER, 0);
+
+    glViewport(0, 0, w, h);
+    checkGlError("glViewport");
+    return true;
+}
+
+const GLfloat gTriangleVertices[] = { 0.0f, 0.5f, -0.5f, -0.5f,
+        0.5f, -0.5f };
+
+const GLint FLOAT_SIZE_BYTES = 4;
+const GLint TRIANGLE_VERTICES_DATA_STRIDE_BYTES = 5 * FLOAT_SIZE_BYTES;
+const GLfloat gTriangleVerticesData[] = {
+    // X, Y, Z, U, V
+    -1.0f, -1.0f, 0, 0.f, 0.f,
+    1.0f, -1.0f, 0, 1.f, 0.f,
+    -1.0f,  1.0f, 0, 0.f, 1.f,
+    1.0f,   1.0f, 0, 1.f, 1.f,
+};
+
+void renderFrame(GLint w, GLint h) {
+    glClearColor(1.0f, 0.0f, 0.0f, 1.0f);
+    checkGlError("glClearColor");
+    glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
+    checkGlError("glClear");
+
+    // Bind FBO and draw into it
+    glBindFramebuffer(GL_FRAMEBUFFER, gFbo);
+    checkGlError("glBindFramebuffer");
+
+    glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+    checkGlError("glClearColor");
+    glClear(GL_COLOR_BUFFER_BIT);
+    checkGlError("glClear");
+
+    glUseProgram(gProgram);
+    checkGlError("glUseProgram");
+
+    glVertexAttribPointer(gvPositionHandle, 2, GL_FLOAT, GL_FALSE, 0, gTriangleVertices);
+    checkGlError("glVertexAttribPointer");
+    glEnableVertexAttribArray(gvPositionHandle);
+    checkGlError("glEnableVertexAttribArray");
+    glDrawArrays(GL_TRIANGLES, 0, 3);
+    checkGlError("glDrawArrays");
+
+    // Copy content of FBO into a texture
+    glBindTexture(GL_TEXTURE_2D, gBufferTexture);
+    glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, w / 2, h / 2);
+    checkGlError("glCopyTexSubImage2D");
+
+    // Back to the display
+    glBindFramebuffer(GL_FRAMEBUFFER, 0);
+    checkGlError("glBindFramebuffer");
+
+    // Draw copied content on the screen
+    glUseProgram(gTextureProgram);
+    checkGlError("glUseProgram");
+
+    glEnable(GL_BLEND);
+    glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+
+    glVertexAttribPointer(gvTexturePositionHandle, 3, GL_FLOAT, GL_FALSE,
+            TRIANGLE_VERTICES_DATA_STRIDE_BYTES, gTriangleVerticesData);
+    checkGlError("glVertexAttribPointer");
+    glVertexAttribPointer(gvTextureTexCoordsHandle, 2, GL_FLOAT, GL_FALSE,
+            TRIANGLE_VERTICES_DATA_STRIDE_BYTES, &gTriangleVerticesData[3]);
+    checkGlError("glVertexAttribPointer");
+    glEnableVertexAttribArray(gvTexturePositionHandle);
+    glEnableVertexAttribArray(gvTextureTexCoordsHandle);
+    checkGlError("glEnableVertexAttribArray");
+    glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+    checkGlError("glDrawArrays");
+}
+
+void printEGLConfiguration(EGLDisplay dpy, EGLConfig config) {
+
+#define X(VAL) {VAL, #VAL}
+    struct {EGLint attribute; const char* name;} names[] = {
+    X(EGL_BUFFER_SIZE),
+    X(EGL_ALPHA_SIZE),
+    X(EGL_BLUE_SIZE),
+    X(EGL_GREEN_SIZE),
+    X(EGL_RED_SIZE),
+    X(EGL_DEPTH_SIZE),
+    X(EGL_STENCIL_SIZE),
+    X(EGL_CONFIG_CAVEAT),
+    X(EGL_CONFIG_ID),
+    X(EGL_LEVEL),
+    X(EGL_MAX_PBUFFER_HEIGHT),
+    X(EGL_MAX_PBUFFER_PIXELS),
+    X(EGL_MAX_PBUFFER_WIDTH),
+    X(EGL_NATIVE_RENDERABLE),
+    X(EGL_NATIVE_VISUAL_ID),
+    X(EGL_NATIVE_VISUAL_TYPE),
+    X(EGL_SAMPLES),
+    X(EGL_SAMPLE_BUFFERS),
+    X(EGL_SURFACE_TYPE),
+    X(EGL_TRANSPARENT_TYPE),
+    X(EGL_TRANSPARENT_RED_VALUE),
+    X(EGL_TRANSPARENT_GREEN_VALUE),
+    X(EGL_TRANSPARENT_BLUE_VALUE),
+    X(EGL_BIND_TO_TEXTURE_RGB),
+    X(EGL_BIND_TO_TEXTURE_RGBA),
+    X(EGL_MIN_SWAP_INTERVAL),
+    X(EGL_MAX_SWAP_INTERVAL),
+    X(EGL_LUMINANCE_SIZE),
+    X(EGL_ALPHA_MASK_SIZE),
+    X(EGL_COLOR_BUFFER_TYPE),
+    X(EGL_RENDERABLE_TYPE),
+    X(EGL_CONFORMANT),
+   };
+#undef X
+
+    for (size_t j = 0; j < sizeof(names) / sizeof(names[0]); j++) {
+        EGLint value = -1;
+        EGLint returnVal = eglGetConfigAttrib(dpy, config, names[j].attribute, &value);
+        EGLint error = eglGetError();
+        if (returnVal && error == EGL_SUCCESS) {
+            printf(" %s: ", names[j].name);
+            printf("%d (0x%x)", value, value);
+        }
+    }
+    printf("\n");
+}
+
+int printEGLConfigurations(EGLDisplay dpy) {
+    EGLint numConfig = 0;
+    EGLint returnVal = eglGetConfigs(dpy, NULL, 0, &numConfig);
+    checkEglError("eglGetConfigs", returnVal);
+    if (!returnVal) {
+        return false;
+    }
+
+    printf("Number of EGL configuration: %d\n", numConfig);
+
+    EGLConfig* configs = (EGLConfig*) malloc(sizeof(EGLConfig) * numConfig);
+    if (! configs) {
+        printf("Could not allocate configs.\n");
+        return false;
+    }
+
+    returnVal = eglGetConfigs(dpy, configs, numConfig, &numConfig);
+    checkEglError("eglGetConfigs", returnVal);
+    if (!returnVal) {
+        free(configs);
+        return false;
+    }
+
+    for(int i = 0; i < numConfig; i++) {
+        printf("Configuration %d\n", i);
+        printEGLConfiguration(dpy, configs[i]);
+    }
+
+    free(configs);
+    return true;
+}
+
+int main(int argc, char** argv) {
+    EGLBoolean returnValue;
+    EGLConfig myConfig = {0};
+
+    EGLint context_attribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE };
+    EGLint s_configAttribs[] = {
+            EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
+            EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
+            EGL_RED_SIZE, 8,
+            EGL_GREEN_SIZE, 8,
+            EGL_BLUE_SIZE, 8,
+            EGL_ALPHA_SIZE, 8,
+            EGL_NONE };
+    EGLint majorVersion;
+    EGLint minorVersion;
+    EGLContext context;
+    EGLSurface surface;
+    EGLint w, h;
+
+    EGLDisplay dpy;
+
+    checkEglError("<init>");
+    dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+    checkEglError("eglGetDisplay");
+    if (dpy == EGL_NO_DISPLAY) {
+        printf("eglGetDisplay returned EGL_NO_DISPLAY.\n");
+        return 0;
+    }
+
+    returnValue = eglInitialize(dpy, &majorVersion, &minorVersion);
+    checkEglError("eglInitialize", returnValue);
+    fprintf(stderr, "EGL version %d.%d\n", majorVersion, minorVersion);
+    if (returnValue != EGL_TRUE) {
+        printf("eglInitialize failed\n");
+        return 0;
+    }
+
+    if (!printEGLConfigurations(dpy)) {
+        printf("printEGLConfigurations failed\n");
+        return 0;
+    }
+
+    checkEglError("printEGLConfigurations");
+
+    EGLNativeWindowType window = android_createDisplaySurface();
+    EGLint numConfigs = -1, n = 0;
+    eglChooseConfig(dpy, s_configAttribs, 0, 0, &numConfigs);
+    if (numConfigs) {
+        EGLConfig* const configs = new EGLConfig[numConfigs];
+        eglChooseConfig(dpy, s_configAttribs, configs, numConfigs, &n);
+        myConfig = configs[0];
+        delete[] configs;
+    }
+
+    checkEglError("EGLUtils::selectConfigForNativeWindow");
+
+    printf("Chose this configuration:\n");
+    printEGLConfiguration(dpy, myConfig);
+
+    surface = eglCreateWindowSurface(dpy, myConfig, window, NULL);
+    checkEglError("eglCreateWindowSurface");
+    if (surface == EGL_NO_SURFACE) {
+        printf("gelCreateWindowSurface failed.\n");
+        return 0;
+    }
+
+    context = eglCreateContext(dpy, myConfig, EGL_NO_CONTEXT, context_attribs);
+    checkEglError("eglCreateContext");
+    if (context == EGL_NO_CONTEXT) {
+        printf("eglCreateContext failed\n");
+        return 0;
+    }
+    returnValue = eglMakeCurrent(dpy, surface, surface, context);
+    checkEglError("eglMakeCurrent", returnValue);
+    if (returnValue != EGL_TRUE) {
+        return 0;
+    }
+    eglQuerySurface(dpy, surface, EGL_WIDTH, &w);
+    checkEglError("eglQuerySurface");
+    eglQuerySurface(dpy, surface, EGL_HEIGHT, &h);
+    checkEglError("eglQuerySurface");
+    GLint dim = w < h ? w : h;
+
+    fprintf(stderr, "Window dimensions: %d x %d\n", w, h);
+
+    printGLString("Version", GL_VERSION);
+    printGLString("Vendor", GL_VENDOR);
+    printGLString("Renderer", GL_RENDERER);
+    printGLString("Extensions", GL_EXTENSIONS);
+
+    if(!setupGraphics(w, h)) {
+        fprintf(stderr, "Could not set up graphics.\n");
+        return 0;
+    }
+
+    for (;;) {
+        renderFrame(w, h);
+        eglSwapBuffers(dpy, surface);
+        checkEglError("eglSwapBuffers");
+    }
+
+    return 0;
+}
index afe4246..a5022e9 100644 (file)
@@ -63,7 +63,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
     // database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion'
     // is properly propagated through your change.  Not doing so will result in a loss of user
     // settings.
-    private static final int DATABASE_VERSION = 66;
+    private static final int DATABASE_VERSION = 67;
 
     private Context mContext;
 
@@ -861,6 +861,36 @@ public class DatabaseHelper extends SQLiteOpenHelper {
             upgradeVersion = 66;
         }
 
+        if (upgradeVersion == 66) {
+            // This upgrade makes sure that MODE_RINGER_STREAMS_AFFECTED and
+            // NOTIFICATIONS_USE_RING_VOLUME settings are set according to device voice capability
+             db.beginTransaction();
+             try {
+                 int ringerModeAffectedStreams = (1 << AudioManager.STREAM_RING) |
+                                                 (1 << AudioManager.STREAM_NOTIFICATION) |
+                                                 (1 << AudioManager.STREAM_SYSTEM) |
+                                                 (1 << AudioManager.STREAM_SYSTEM_ENFORCED);
+                 if (!mContext.getResources().getBoolean(
+                         com.android.internal.R.bool.config_voice_capable)) {
+                     ringerModeAffectedStreams |= (1 << AudioManager.STREAM_MUSIC);
+
+                     db.execSQL("DELETE FROM system WHERE name='"
+                             + Settings.System.NOTIFICATIONS_USE_RING_VOLUME + "'");
+                     db.execSQL("INSERT INTO system ('name', 'value') values ('"
+                             + Settings.System.NOTIFICATIONS_USE_RING_VOLUME + "', '1')");
+                 }
+                 db.execSQL("DELETE FROM system WHERE name='"
+                         + Settings.System.MODE_RINGER_STREAMS_AFFECTED + "'");
+                 db.execSQL("INSERT INTO system ('name', 'value') values ('"
+                         + Settings.System.MODE_RINGER_STREAMS_AFFECTED + "', '"
+                         + String.valueOf(ringerModeAffectedStreams) + "')");
+                 db.setTransactionSuccessful();
+             } finally {
+                 db.endTransaction();
+             }
+             upgradeVersion = 67;
+         }
+
         // *** Remember to update DATABASE_VERSION above!
 
         if (upgradeVersion != currentVersion) {
@@ -1121,12 +1151,22 @@ public class DatabaseHelper extends SQLiteOpenHelper {
     
             loadVibrateSetting(db, false);
     
-            // By default, only the ring/notification, system and music streams are affected
+            // By default:
+            // - ringtones, notification, system and music streams are affected by ringer mode
+            // on non voice capable devices (tablets)
+            // - ringtones, notification and system streams are affected by ringer mode
+            // on voice capable devices (phones)
+            int ringerModeAffectedStreams = (1 << AudioManager.STREAM_RING) |
+                                            (1 << AudioManager.STREAM_NOTIFICATION) |
+                                            (1 << AudioManager.STREAM_SYSTEM) |
+                                            (1 << AudioManager.STREAM_SYSTEM_ENFORCED);
+            if (!mContext.getResources().getBoolean(
+                    com.android.internal.R.bool.config_voice_capable)) {
+                ringerModeAffectedStreams |= (1 << AudioManager.STREAM_MUSIC);
+            }
             loadSetting(stmt, Settings.System.MODE_RINGER_STREAMS_AFFECTED,
-                    (1 << AudioManager.STREAM_RING) | (1 << AudioManager.STREAM_NOTIFICATION) |
-                    (1 << AudioManager.STREAM_SYSTEM) | (1 << AudioManager.STREAM_SYSTEM_ENFORCED) |
-                    (1 << AudioManager.STREAM_MUSIC));
-    
+                    ringerModeAffectedStreams);
+
             loadSetting(stmt, Settings.System.MUTE_STREAMS_AFFECTED,
                     ((1 << AudioManager.STREAM_MUSIC) |
                      (1 << AudioManager.STREAM_RING) |
@@ -1232,8 +1272,13 @@ public class DatabaseHelper extends SQLiteOpenHelper {
                     R.bool.def_vibrate_in_silent);
 
             // Set notification volume to follow ringer volume by default
-            loadBooleanSetting(stmt, Settings.System.NOTIFICATIONS_USE_RING_VOLUME,
-                    R.bool.def_notifications_use_ring_volume);
+            if (mContext.getResources().getBoolean(
+                    com.android.internal.R.bool.config_voice_capable)) {
+                loadBooleanSetting(stmt, Settings.System.NOTIFICATIONS_USE_RING_VOLUME,
+                        R.bool.def_notifications_use_ring_volume);
+            } else {
+                loadSetting(stmt, Settings.System.NOTIFICATIONS_USE_RING_VOLUME, "1");
+            }
 
             loadIntegerSetting(stmt, Settings.System.POINTER_SPEED,
                     R.integer.def_pointer_speed);
index d29e495..a354336 100644 (file)
@@ -43,6 +43,7 @@
         android:layout_height="wrap_content"
         android:layout_centerInParent="true"
         android:src="@drawable/compat_mode_help_diagram"
+        android:contentDescription="@string/accessibility_compatibility_zoom_example"
         />
     <RelativeLayout
         android:orientation="horizontal"
@@ -61,6 +62,7 @@
             android:layout_alignParentRight="true"
             android:layout_centerVertical="true"
             android:src="@drawable/compat_mode_help_icon"
+            android:contentDescription="@string/accessibility_compatibility_zoom_button"
             />
         <TextView
             android:id="@+id/explanation"
index d9f3f23..a2a6473 100644 (file)
@@ -49,6 +49,7 @@
                 android:src="@drawable/ic_sysbar_back"
                 android:layout_alignParentLeft="true"
                 systemui:keyCode="4"
+                android:contentDescription="@string/accessibility_back"
                 />
             <LinearLayout
                 android:id="@+id/navigationArea"
                     android:layout_height="match_parent"
                     android:src="@drawable/ic_sysbar_home"
                     systemui:keyCode="3"
+                    android:contentDescription="@string/accessibility_home"
                     />
                 <ImageView android:id="@+id/recent_apps"
                     android:layout_width="80dip"
                     android:layout_height="match_parent"
                     android:src="@drawable/ic_sysbar_recent"
+                    android:contentDescription="@string/accessibility_menu"
                     />
                 <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/menu"
                     android:layout_width="80dip"
@@ -74,6 +77,7 @@
                     android:src="@drawable/ic_sysbar_menu"
                     systemui:keyCode="82"
                     android:visibility="invisible"
+                    android:contentDescription="@string/accessibility_menu"
                     />
             </LinearLayout>
 
index 3fef7e0..41a20fb 100644 (file)
@@ -53,7 +53,8 @@
                 android:id="@+id/item_icon"
                 android:layout_width="@android:dimen/app_icon_size"
                 android:layout_height="wrap_content"
-                android:scaleType="fitCenter" />
+                android:scaleType="fitCenter"
+                android:contentDescription="@null" />
             <LinearLayout
                 android:orientation="vertical"
                 android:layout_width="0px"
@@ -94,7 +95,8 @@
             android:visibility="visible"
             android:clickable="true"
             android:focusable="true"
-            android:background="?android:attr/selectableItemBackground" />
+            android:background="?android:attr/selectableItemBackground"
+            android:contentDescription="@string/accessibility_settings_button" />
     </LinearLayout>
     <View
         android:layout_width="match_parent"
index fecfe7f..1e3099d 100644 (file)
@@ -16,7 +16,7 @@
 -->
 
 <!-- notification icons & panel access -->
-<LinearLayout
+<com.android.systemui.statusbar.tablet.NotificationArea
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
     android:id="@+id/notificationArea"
@@ -40,6 +40,7 @@
             android:layout_marginLeft="8dip"
             android:src="@drawable/ic_sysbar_ime_default"
             android:visibility="gone"
+            android:contentDescription="@string/accessibility_ime_switch_button"
             />
 
         <com.android.systemui.statusbar.policy.CompatModeButton
@@ -49,6 +50,7 @@
             android:layout_marginLeft="8dip"
             android:src="@drawable/ic_sysbar_zoom"
             android:visibility="gone"
+            android:contentDescription="@string/accessibility_compatibility_zoom_button"
             />
 
         <com.android.systemui.statusbar.tablet.NotificationIconArea
                 />
         </LinearLayout>
     </LinearLayout>
-</LinearLayout>
+</com.android.systemui.statusbar.tablet.NotificationArea>
index 543f4ed..bbb2bc6 100644 (file)
   limitations under the License.
 -->
 
-<RelativeLayout
+<com.android.systemui.statusbar.tablet.NotificationPanelTitle
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
     android:id="@+id/title_area"
-    android:layout_width="0dp"
-    android:layout_height="0dp"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:clickable="true"
     android:orientation="vertical"
     android:background="@drawable/notify_panel_clock_bg"
     >
+
     <LinearLayout
         android:id="@+id/icons"
         android:layout_width="wrap_content"
@@ -34,6 +36,7 @@
         android:layout_marginTop="16dp"
         android:layout_marginBottom="16dp"
         >
+
         <ImageView
             android:id="@+id/bluetooth"
             android:layout_height="32dp"
@@ -41,6 +44,7 @@
             android:scaleType="centerInside"
             android:baseline="22dp"
             android:visibility="gone"
+            android:contentDescription="@null"
             />
 
         <FrameLayout
             android:layout_width="32dp"
             android:layout_marginRight="4dp"
             >
+
             <ImageView
                 android:id="@+id/network_signal"
                 android:layout_height="match_parent"
                 android:layout_width="match_parent"
+                android:contentDescription="@null"
                 />
+
             <ImageView
                 android:id="@+id/network_type"
                 android:layout_height="match_parent"
                 android:layout_width="match_parent"
+                android:contentDescription="@null"
                 />
+
             <ImageView
                 android:id="@+id/network_direction"
                 android:layout_height="match_parent"
                 android:layout_width="match_parent"
+                android:contentDescription="@null"
                 />
+
         </FrameLayout>
             
         <TextView
@@ -86,6 +97,7 @@
             android:layout_toRightOf="@id/network_text"
             android:layout_alignBaseline="@id/network_signal"
             android:baseline="22dp"
+            android:contentDescription="@null"
             />
 
         <TextView
         android:paddingRight="16dp"
         android:src="@drawable/ic_sysbar_quicksettings"
         android:baseline="21dp"
+        android:contentDescription="@string/accessibility_settings_button"
         />
 
     <ImageView
         android:src="@drawable/ic_notification_open"
         android:baseline="21dp"
         android:visibility="invisible"
+        android:contentDescription="@string/accessibility_notifications_button"
         />
 
     <View
     <com.android.systemui.statusbar.tablet.HoloClock
         android:id="@+id/clock"
         android:layout_height="wrap_content"
-        android:layout_width="match_parent"
+        android:layout_width="wrap_content"
         android:layout_alignParentRight="true"
         android:layout_above="@id/title_divider"
         android:layout_marginRight="6dip"
         android:id="@+id/date"
         style="@style/StatusBarNotificationText"
         android:layout_height="wrap_content"
-        android:layout_width="120dp"
+        android:layout_width="wrap_content"
         android:layout_alignBottom="@id/clock"
         android:layout_alignParentLeft="true"
         android:gravity="left"
         android:layout_marginLeft="32dp"
         />
 
-    <view
-        class="com.android.systemui.statusbar.tablet.NotificationPanel$ModeToggle"
-        android:id="@+id/mode_toggle"
-        android:background="@null"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:clickable="true"
-        />
-</RelativeLayout>
+</com.android.systemui.statusbar.tablet.NotificationPanelTitle>
index 51e7d97..5d7e8de 100644 (file)
@@ -54,6 +54,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:layout_weight="1"
+                android:contentDescription="@string/accessibility_back"
                 />
             <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/home"
                 android:layout_width="80dp"
@@ -66,6 +67,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:layout_weight="1"
+                android:contentDescription="@string/accessibility_home"
                 />
             <ImageView android:id="@+id/recent_apps"
                 android:layout_width="80dp"
@@ -80,6 +82,7 @@
                 systemui:keyCode="82"
                 android:layout_weight="0"
                 android:visibility="invisible"
+                android:contentDescription="@string/accessibility_menu"
                 />
         </LinearLayout>
 
                 android:layout_height="match_parent"
                 android:layout_width="match_parent"
                 android:layout_weight="1"
+                android:contentDescription="@string/accessibility_menu"
                 />
             <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/home"
                 android:layout_height="80dp"
                 android:src="@drawable/ic_sysbar_home_default_land"
                 systemui:keyCode="3"
                 android:layout_weight="0"
+                android:contentDescription="@string/accessibility_home"
                 />
             <View 
                 android:layout_height="match_parent"
                 android:layout_width="match_parent"
                 android:layout_weight="1"
+                android:contentDescription="@string/accessibility_back"
                 />
             <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/back"
                 android:layout_height="80dp"
                 android:layout_height="40dp"
                 android:layout_width="match_parent"
                 android:layout_weight="0"
+                android:contentDescription="@string/accessibility_menu"
                 />
         </LinearLayout>
 
index 01cf2dc..082dab3 100644 (file)
     <string name="screenshot_saving_toast">Screenshot saved to Gallery</string>
     <!-- toast message displayed when we fail to take a screenshot. -->
     <string name="screenshot_failed_toast">Could not save screenshot</string>
+
+    <!-- Title for the USB function chooser in UsbPreferenceActivity. [CHAR LIMIT=30] -->
+    <string name="usb_preference_title">USB file transfer options</string>
+    <!-- Label for the MTP USB function in UsbPreferenceActivity. [CHAR LIMIT=50] -->
+    <string name="use_mtp_button_title">Mount as a media player (MTP)</string>
+    <!-- Label for the PTP USB function in UsbPreferenceActivity. [CHAR LIMIT=50] -->
+    <string name="use_ptp_button_title">Mount as a camera (PTP)</string>
+    <!-- Label for the installer CD image option in UsbPreferenceActivity. [CHAR LIMIT=50] -->
+    <string name="installer_cd_button_title">Install Android File Transfer application for Mac</string>
+
+    <!-- Content description of the back button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_back">Back</string>
+    <!-- Content description of the home button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_home">Home</string>
+    <!-- Content description of the menu button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_menu">Menu</string>
+
+    <!-- Content description of the switch input method button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_ime_switch_button">Switch input method button.</string>
+    <!-- Content description of the compatibility zoom button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_compatibility_zoom_button">Compatibility zoom button.</string>
+
+    <!-- Content description of picture of the compatibility zoom example for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_compatibility_zoom_example">Zoom smaller to larger screen.</string>
+
+    <!-- Content description of the bluetooth icon when connected for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_bluetooth_connected">Bluetooth connected.</string>
+    <!-- Content description of the bluetooth icon when connecting for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_bluetooth_disconnected">Bluetooth disconnected.</string>
+
+    <!-- Content description of the battery when no battery for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_no_battery">No battery.</string>
+    <!-- Content description of the battery when it is one bar for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_battery_one_bar">Battery one bar.</string>
+    <!-- Content description of the battery when it is two bars for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_battery_two_bars">Battery two bars.</string>
+     <!-- Content description of the battery when it is three bars for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_battery_three_bars">Battery three bars.</string>
+    <!-- Content description of the battery when it is full for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_battery_full">Battery full.</string>
+
+    <!-- Content description of the phone signal when no signal for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_no_phone">No phone.</string>
+    <!-- Content description of the phone signal when it is one bar for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_phone_one_bar">Phone one bar.</string>
+    <!-- Content description of the phone signal when it is two bars for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_phone_two_bars">Phone two bars.</string>
+    <!-- Content description of the phone signal when it is three bars for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_phone_three_bars">Phone three bars.</string>
+    <!-- Content description of the phone signal when it is full for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_phone_signal_full">Phone signal full.</string>
+
+    <!-- Content description of the data signal when no signal for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_no_data">No data.</string>
+    <!-- Content description of the data signal when it is one bar for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_data_one_bar">Data one bar.</string>
+    <!-- Content description of the data signal when it is two bars for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_data_two_bars">Data two bars.</string>
+    <!-- Content description of the data signal when it is three bars for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_data_three_bars">Data three bars.</string>
+    <!-- Content description of the data signal when it is full for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_data_signal_full">Data signal full.</string>
+
+    <!-- Content description of the WIFI signal when no signal for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_no_wifi">No WiFi.</string>
+    <!-- Content description of the WIFI signal when it is one bar for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_wifi_one_bar">WiFi one bar.</string>
+    <!-- Content description of the WIFI signal when it is two bars for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_wifi_two_bars">WiFi two bars.</string>
+    <!-- Content description of the WIFI signal when it is three bars for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_wifi_three_bars">WiFi three bars.</string>
+    <!-- Content description of the WIFI signal when it is full for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_wifi_signal_full">WiFi signal full.</string>
+
+    <!-- Content description of the data connection type GPRS for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_data_connection_gprs">GPRS</string>
+
+    <!-- Content description of the data connection type 3G for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_data_connection_3g">3G</string>
+
+    <!-- Content description of the data connection type 3.5G for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_data_connection_3.5g">3.5G</string>
+
+    <!-- Content description of the data connection type 4G for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_data_connection_4g">4G</string>
+
+    <!-- Content description of the data connection type CDMA for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_data_connection_cdma">CDMA</string>
+
+    <!-- Content description of the data connection type Edge for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_data_connection_edge">Edge</string>
+
+    <!-- Content description of the data connection type WiFi for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_data_connection_wifi">WiFi</string>
+
+    <!-- Content description of the data connection with no SIM for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_no_sim">No SIM.</string>
+
+    <!-- Content description of the bluetooth tethering icon for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_bluetooth_tether">Bluetooth tethering.</string>
+
+    <!-- Content description of the airplane mode icon for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_airplane_mode">Airplane mode.</string>
+
+    <!-- Content description of the battery level icon for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_battery_level">Battery <xliff:g id="number">%d</xliff:g> percent.</string>
+
+    <!-- Content description of the button for showing a settings panel in the notification panel for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_settings_button">Settings button.</string>
+
+    <!-- Content description of the button for showing a notifications panel in the notification panel for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_notifications_button">Notifications button.</string>
+
+    <!-- Content description of the button for removing a notification in the notification panel for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_remove_notification">Remove notification.</string>
+
+    <!-- Content description of the enabled GPS icon in the notification panel for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_gps_enabled">GPS enabled.</string>
+
+    <!-- Content description of the acquiring GPS icon in the notification panel for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_gps_acquiring">GPS acquiring.</string>
+
+    <!-- Content description of the TeleTypewriter(TTY) enabled icon in the notification panel for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_tty_enabled">TeleTypewriter enabled.</string>
+
+    <!-- Content description of the ringer vibrate icon in the notification panel for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_ringer_vibrate">Ringer vibrate.</string>
+
+    <!-- Content description of the ringer silent icon in the notification panel for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_ringer_silent">Ringer silent.</string>
+
 </resources>
index bc0a508..ea54445 100644 (file)
@@ -22,7 +22,6 @@ import java.util.List;
 import android.animation.Animator;
 import android.animation.LayoutTransition;
 import android.app.ActivityManager;
-import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
 import android.content.pm.ActivityInfo;
@@ -48,6 +47,7 @@ import android.util.DisplayMetrics;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.MenuItem;
+import android.view.MotionEvent;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.AdapterView;
@@ -112,7 +112,7 @@ public class RecentsPanelView extends RelativeLayout
             position = _pos;
             packageName = _packageName;
         }
-    };
+    }
 
     private final class OnLongClickDelegate implements View.OnLongClickListener {
         View mOtherView;
@@ -252,6 +252,19 @@ public class RecentsPanelView extends RelativeLayout
         mChoreo.setPanelHeight(mRecentsContainer.getHeight());
     }
 
+    @Override
+    public boolean dispatchHoverEvent(MotionEvent event) {
+        // Ignore hover events outside of this panel bounds since such events
+        // generate spurious accessibility events with the panel content when
+        // tapping outside of it, thus confusing the user.
+        final int x = (int) event.getX();
+        final int y = (int) event.getY();
+        if (x >= 0 && x < getWidth() && y >= 0 && y < getHeight()) {
+            return super.dispatchHoverEvent(event);
+        }
+        return true;
+    }
+
     /**
      * Whether the panel is showing, or, if it's animating, whether it will be
      * when the animation is done.
index 64ec063..6419777 100644 (file)
@@ -18,8 +18,8 @@ package com.android.systemui.statusbar;
 
 import android.content.Context;
 import android.util.AttributeSet;
-import android.util.Slog;
-import android.view.MotionEvent;
+import android.view.View;
+import android.view.accessibility.AccessibilityEvent;
 import android.widget.FrameLayout;
 
 public class LatestItemView extends FrameLayout {
@@ -27,7 +27,22 @@ public class LatestItemView extends FrameLayout {
         super(context, attrs);
     }
 
+    @Override
     public void setOnClickListener(OnClickListener l) {
         super.setOnClickListener(l);
     }
+
+    @Override
+    public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) {
+        if (super.onRequestSendAccessibilityEvent(child, event)) {
+            // Add a record for the entire layout since its content is somehow small.
+            // The event comes from a leaf view that is interacted with.
+            AccessibilityEvent record = AccessibilityEvent.obtain();
+            onInitializeAccessibilityEvent(record);
+            dispatchPopulateAccessibilityEvent(record);
+            event.appendRecord(record);
+            return true;
+        }
+        return false;
+    }
 }
index d9d9c06..be4b395 100644 (file)
@@ -16,6 +16,7 @@
 
 package com.android.systemui.statusbar;
 
+import android.app.Notification;
 import android.content.Context;
 import android.content.pm.PackageManager;
 import android.content.res.Resources;
@@ -23,11 +24,11 @@ import android.graphics.drawable.Drawable;
 import android.graphics.Canvas;
 import android.graphics.Paint;
 import android.graphics.Rect;
+import android.text.TextUtils;
 import android.util.Slog;
 import android.util.Log;
-import android.view.View;
 import android.view.ViewDebug;
-import android.widget.FrameLayout;
+import android.view.accessibility.AccessibilityEvent;
 
 import java.text.NumberFormat;
 
@@ -45,8 +46,9 @@ public class StatusBarIconView extends AnimatedImageView {
     private int mNumberX;
     private int mNumberY;
     private String mNumberText;
+    private Notification mNotification;
 
-    public StatusBarIconView(Context context, String slot) {
+    public StatusBarIconView(Context context, String slot, Notification notification) {
         super(context);
         final Resources res = context.getResources();
         mSlot = slot;
@@ -54,6 +56,8 @@ public class StatusBarIconView extends AnimatedImageView {
         mNumberPain.setTextAlign(Paint.Align.CENTER);
         mNumberPain.setColor(res.getColor(R.drawable.notification_number_text_color));
         mNumberPain.setAntiAlias(true);
+        mNotification = notification;
+        setContentDescription(notification);
     }
 
     private static boolean streq(String a, String b) {
@@ -83,6 +87,7 @@ public class StatusBarIconView extends AnimatedImageView {
         final boolean numberEquals = mIcon != null
                 && mIcon.number == icon.number;
         mIcon = icon.clone();
+        setContentDescription(icon.contentDescription);
         if (!iconEquals) {
             Drawable drawable = getIcon(icon);
             if (drawable == null) {
@@ -159,6 +164,15 @@ public class StatusBarIconView extends AnimatedImageView {
         return mIcon;
     }
 
+    @Override
+    public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
+        super.onInitializeAccessibilityEvent(event);
+        if (mNotification != null) {
+            event.setParcelableData(mNotification);
+        }
+    }
+
+    @Override
     protected void onSizeChanged(int w, int h, int oldw, int oldh) {
         super.onSizeChanged(w, h, oldw, oldh);
         if (mNumberBackground != null) {
@@ -166,6 +180,7 @@ public class StatusBarIconView extends AnimatedImageView {
         }
     }
 
+    @Override
     protected void onDraw(Canvas canvas) {
         super.onDraw(canvas);
 
@@ -175,6 +190,7 @@ public class StatusBarIconView extends AnimatedImageView {
         }
     }
 
+    @Override
     protected void debug(int depth) {
         super.debug(depth);
         Log.d("View", debugIndent(depth) + "slot=" + mSlot);
@@ -213,4 +229,13 @@ public class StatusBarIconView extends AnimatedImageView {
         mNumberY = h-r.bottom-((dh-r.top-th-r.bottom)/2);
         mNumberBackground.setBounds(w-dw, h-dh, w, h);
     }
+
+    private void setContentDescription(Notification notification) {
+        if (notification != null) {
+            CharSequence tickerText = notification.tickerText;
+            if (!TextUtils.isEmpty(tickerText)) {
+                setContentDescription(tickerText);
+            }
+        }
+    }
 }
index e1d17a8..f6aa159 100644 (file)
@@ -33,7 +33,8 @@ public class IconMerger extends LinearLayout {
 
     private int mIconSize;
     private StatusBarIconView mMoreView;
-    private StatusBarIcon mMoreIcon = new StatusBarIcon(null, R.drawable.stat_notify_more, 0);
+    private StatusBarIcon mMoreIcon = new StatusBarIcon(null, R.drawable.stat_notify_more, 0, 0,
+            null);
 
     public IconMerger(Context context, AttributeSet attrs) {
         super(context, attrs);
@@ -41,7 +42,7 @@ public class IconMerger extends LinearLayout {
         mIconSize = context.getResources().getDimensionPixelSize(
                 com.android.internal.R.dimen.status_bar_icon_size);
 
-        mMoreView = new StatusBarIconView(context, "more");
+        mMoreView = new StatusBarIconView(context, "more", null);
         mMoreView.set(mMoreIcon);
         addView(mMoreView, 0, new LinearLayout.LayoutParams(mIconSize, mIconSize));
     }
index b50fd81..b93ad68 100644 (file)
@@ -472,7 +472,7 @@ public class PhoneStatusBar extends StatusBar {
     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(mContext, slot);
+        StatusBarIconView view = new StatusBarIconView(mContext, slot, null);
         view.set(icon);
         mStatusIcons.addView(view, viewIndex, new LinearLayout.LayoutParams(mIconSize, mIconSize));
     }
@@ -565,27 +565,33 @@ public class PhoneStatusBar extends StatusBar {
 
         final RemoteViews contentView = notification.notification.contentView;
 
-        if (false) {
+        if (DEBUG) {
             Slog.d(TAG, "old notification: when=" + oldNotification.notification.when
                     + " ongoing=" + oldNotification.isOngoing()
                     + " expanded=" + oldEntry.expanded
-                    + " contentView=" + oldContentView);
+                    + " contentView=" + oldContentView
+                    + " rowParent=" + oldEntry.row.getParent());
             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
+        boolean contentsUnchanged = 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");
+                && oldContentView.getLayoutId() == contentView.getLayoutId();
+        ViewGroup rowParent = (ViewGroup) oldEntry.row.getParent();
+        boolean orderUnchanged = notification.notification.when==oldNotification.notification.when
+                && notification.priority == oldNotification.priority;
+                // priority now encompasses isOngoing()
+        boolean isLastAnyway = rowParent.indexOfChild(oldEntry.row) == rowParent.getChildCount()-1;
+        if (contentsUnchanged && (orderUnchanged || isLastAnyway)) {
+            if (DEBUG) Slog.d(TAG, "reusing notification for key: " + key);
             oldEntry.notification = notification;
             try {
                 // Reapply the RemoteViews
@@ -601,7 +607,7 @@ public class PhoneStatusBar extends StatusBar {
                 // Update the icon.
                 final StatusBarIcon ic = new StatusBarIcon(notification.pkg,
                         notification.notification.icon, notification.notification.iconLevel,
-                        notification.notification.number);
+                        notification.notification.number, notification.notification.tickerText);
                 if (!oldEntry.icon.set(ic)) {
                     handleNotificationError(key, notification, "Couldn't update icon: " + ic);
                     return;
@@ -759,9 +765,11 @@ public class PhoneStatusBar extends StatusBar {
         final View expanded = views[2];
         // Construct the icon.
         final StatusBarIconView iconView = new StatusBarIconView(mContext,
-                notification.pkg + "/0x" + Integer.toHexString(notification.id));
+                notification.pkg + "/0x" + Integer.toHexString(notification.id),
+                notification.notification);
         final StatusBarIcon ic = new StatusBarIcon(notification.pkg, notification.notification.icon,
-                    notification.notification.iconLevel, notification.notification.number);
+                    notification.notification.iconLevel, notification.notification.number,
+                    notification.notification.tickerText);
         if (!iconView.set(ic)) {
             handleNotificationError(key, notification, "Coulding create icon: " + ic);
             return null;
index af5c72d..7b50985 100644 (file)
@@ -18,25 +18,17 @@ package com.android.systemui.statusbar.phone;
 
 import android.app.StatusBarManager;
 import android.bluetooth.BluetoothAdapter;
-import android.bluetooth.BluetoothProfile;
-import android.bluetooth.BluetoothPbap;
 import android.content.BroadcastReceiver;
 import android.content.Context;
 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.net.ConnectivityManager;
 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;
@@ -44,18 +36,7 @@ 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.widget.ImageView;
-import android.widget.LinearLayout;
 
 import com.android.internal.app.IBatteryStats;
 import com.android.internal.telephony.IccCard;
@@ -63,7 +44,6 @@ 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;
 
 /**
@@ -447,6 +427,32 @@ public class PhoneStatusBarPolicy {
               R.drawable.stat_sys_data_fully_inandout_1x }
             };
 
+    // Accessibility;
+
+    private static final int[] sPhoneSignalStrength = {
+        R.string.accessibility_no_phone,
+        R.string.accessibility_phone_one_bar,
+        R.string.accessibility_phone_two_bars,
+        R.string.accessibility_phone_three_bars,
+        R.string.accessibility_phone_signal_full
+    };
+
+    private static final int[] sDataConnectionStrength = {
+        R.string.accessibility_no_data,
+        R.string.accessibility_data_one_bar,
+        R.string.accessibility_data_two_bars,
+        R.string.accessibility_data_three_bars,
+        R.string.accessibility_data_signal_full
+    };
+
+    private static final int[] sWifiConnectionStrength = {
+        R.string.accessibility_no_wifi,
+        R.string.accessibility_wifi_one_bar,
+        R.string.accessibility_wifi_two_bars,
+        R.string.accessibility_wifi_three_bars,
+        R.string.accessibility_wifi_signal_full
+    };
+
     // 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;
@@ -546,12 +552,13 @@ public class PhoneStatusBarPolicy {
                 new com.android.systemui.usb.StorageNotification(context));
 
         // battery
-        mService.setIcon("battery", com.android.internal.R.drawable.stat_sys_battery_unknown, 0);
+        mService.setIcon("battery", com.android.internal.R.drawable.stat_sys_battery_unknown, 0,
+                null);
 
         // phone_signal
         mPhone = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
         mPhoneSignalIconId = R.drawable.stat_sys_signal_null;
-        mService.setIcon("phone_signal", mPhoneSignalIconId, 0);
+        mService.setIcon("phone_signal", mPhoneSignalIconId, 0, null);
 
         // register for phone state notifications.
         ((TelephonyManager)mContext.getSystemService(Context.TELEPHONY_SERVICE))
@@ -563,24 +570,24 @@ public class PhoneStatusBarPolicy {
                         | PhoneStateListener.LISTEN_DATA_ACTIVITY);
 
         // data_connection
-        mService.setIcon("data_connection", R.drawable.stat_sys_data_connected_g, 0);
+        mService.setIcon("data_connection", R.drawable.stat_sys_data_connected_g, 0, null);
         mService.setIconVisibility("data_connection", false);
 
         // wifi
-        mService.setIcon("wifi", sWifiSignalImages[0][0], 0);
+        mService.setIcon("wifi", sWifiSignalImages[0][0], 0, null);
         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.setIcon("tty",  R.drawable.stat_sys_tty_mode, 0, null);
         mService.setIconVisibility("tty", false);
 
         // Cdma Roaming Indicator, ERI
-        mService.setIcon("cdma_eri", R.drawable.stat_sys_roaming_cdma_0, 0);
+        mService.setIcon("cdma_eri", R.drawable.stat_sys_roaming_cdma_0, 0, null);
         mService.setIconVisibility("cdma_eri", false);
 
         // bluetooth status
-        mService.setIcon("bluetooth", R.drawable.stat_sys_data_bluetooth, 0);
+        mService.setIcon("bluetooth", R.drawable.stat_sys_data_bluetooth, 0, null);
         BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
         if (adapter != null) {
             mBluetoothEnabled = adapter.isEnabled();
@@ -590,21 +597,23 @@ public class PhoneStatusBarPolicy {
         mService.setIconVisibility("bluetooth", mBluetoothEnabled);
 
         // Gps status
-        mService.setIcon("gps", R.drawable.stat_sys_gps_acquiring_anim, 0);
+        mService.setIcon("gps", R.drawable.stat_sys_gps_acquiring_anim, 0, null);
         mService.setIconVisibility("gps", false);
 
         // Alarm clock
-        mService.setIcon("alarm_clock", R.drawable.stat_notify_alarm, 0);
+        mService.setIcon("alarm_clock", R.drawable.stat_notify_alarm, 0, null);
         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.setIcon("sync_active", com.android.internal.R.drawable.stat_notify_sync_anim0,
+                0, null);
+        mService.setIcon("sync_failing", com.android.internal.R.drawable.stat_notify_sync_error,
+                0, null);
         mService.setIconVisibility("sync_active", false);
         mService.setIconVisibility("sync_failing", false);
 
         // volume
-        mService.setIcon("volume", R.drawable.stat_sys_ringer_silent, 0);
+        mService.setIcon("volume", R.drawable.stat_sys_ringer_silent, 0, null);
         mService.setIconVisibility("volume", false);
         updateVolume();
 
@@ -655,7 +664,8 @@ public class PhoneStatusBarPolicy {
     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);
+        String contentDescription = mContext.getString(R.string.accessibility_battery_level, level);
+        mService.setIcon("battery", id, level, contentDescription);
     }
 
     private void updateConnectivity(Intent intent) {
@@ -677,12 +687,16 @@ public class PhoneStatusBarPolicy {
             if (info.isConnected()) {
                 mIsWifiConnected = true;
                 int iconId;
+                String contentDescription = null;
                 if (mLastWifiSignalLevel == -1) {
                     iconId = sWifiSignalImages[mInetCondition][0];
+                    contentDescription = mContext.getString(sWifiConnectionStrength[0]);
                 } else {
                     iconId = sWifiSignalImages[mInetCondition][mLastWifiSignalLevel];
-                }
-                mService.setIcon("wifi", iconId, 0);
+                    contentDescription = mContext.getString(
+                            sWifiConnectionStrength[mLastWifiSignalLevel]);
+                } 
+                mService.setIcon("wifi", iconId, 0, contentDescription);
                 // Show the icon since wi-fi is connected
                 mService.setIconVisibility("wifi", true);
             } else {
@@ -690,7 +704,8 @@ public class PhoneStatusBarPolicy {
                 mIsWifiConnected = false;
                 int iconId = sWifiSignalImages[0][0];
 
-                mService.setIcon("wifi", iconId, 0);
+                String contentDescription = mContext.getString(R.string.accessibility_no_wifi);
+                mService.setIcon("wifi", iconId, 0, contentDescription);
                 // Hide the icon since we're not connected
                 mService.setIconVisibility("wifi", false);
             }
@@ -781,6 +796,7 @@ public class PhoneStatusBarPolicy {
 
     private final void updateSignalStrength() {
         int[] iconList;
+        String contentDescription = null;
 
         // Display signal strength while in "emergency calls only" mode
         if (mServiceState == null || (!hasService() && !mServiceState.isEmergencyOnly())) {
@@ -788,10 +804,12 @@ public class PhoneStatusBarPolicy {
             if (Settings.System.getInt(mContext.getContentResolver(),
                     Settings.System.AIRPLANE_MODE_ON, 0) == 1) {
                 mPhoneSignalIconId = R.drawable.stat_sys_signal_flightmode;
+                contentDescription = mContext.getString(R.string.accessibility_airplane_mode);
             } else {
                 mPhoneSignalIconId = R.drawable.stat_sys_signal_null;
+                contentDescription = mContext.getString(R.string.accessibility_no_phone);
             }
-            mService.setIcon("phone_signal", mPhoneSignalIconId, 0);
+            mService.setIcon("phone_signal", mPhoneSignalIconId, 0, contentDescription);
             return;
         }
 
@@ -805,8 +823,11 @@ public class PhoneStatusBarPolicy {
         } else {
             iconList = sSignalImages[mInetCondition];
         }
-        mPhoneSignalIconId = iconList[mSignalStrength.getLevel()];
-        mService.setIcon("phone_signal", mPhoneSignalIconId, 0);
+
+        final int signalLevel = mSignalStrength.getLevel();
+        mPhoneSignalIconId = iconList[signalLevel];
+        contentDescription = mContext.getString(sPhoneSignalStrength[signalLevel]);
+        mService.setIcon("phone_signal", mPhoneSignalIconId, 0, contentDescription);
     }
 
     private final void updateDataNetType(int net) {
@@ -850,6 +871,7 @@ public class PhoneStatusBarPolicy {
 
     private final void updateDataIcon() {
         int iconId;
+        String contentDescription = null;
         boolean visible = true;
 
         if (!isCdma()) {
@@ -870,13 +892,15 @@ public class PhoneStatusBarPolicy {
                             iconId = mDataIconList[0];
                             break;
                     }
-                    mService.setIcon("data_connection", iconId, 0);
+                    contentDescription = mContext.getString(sDataConnectionStrength[mDataActivity]);
+                    mService.setIcon("data_connection", iconId, 0, contentDescription);
                 } else {
                     visible = false;
                 }
             } else {
                 iconId = R.drawable.stat_sys_no_sim;
-                mService.setIcon("data_connection", iconId, 0);
+                contentDescription = mContext.getString(R.string.accessibility_no_sim);
+                mService.setIcon("data_connection", iconId, 0, contentDescription);
             }
         } else {
             // CDMA case, mDataActivity can be also DATA_ACTIVITY_DORMANT
@@ -896,7 +920,7 @@ public class PhoneStatusBarPolicy {
                         iconId = mDataIconList[0];
                         break;
                 }
-                mService.setIcon("data_connection", iconId, 0);
+                mService.setIcon("data_connection", iconId, 0, null);
             } else {
                 visible = false;
             }
@@ -921,12 +945,19 @@ public class PhoneStatusBarPolicy {
         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;
+
+        final int iconId;
+        String contentDescription = null;
+        if (audioManager.shouldVibrate(AudioManager.VIBRATE_TYPE_RINGER)) {
+            iconId = R.drawable.stat_sys_ringer_vibrate;
+            contentDescription = mContext.getString(R.string.accessibility_ringer_vibrate);
+        } else {
+            iconId =  R.drawable.stat_sys_ringer_silent;
+            contentDescription = mContext.getString(R.string.accessibility_ringer_silent);
+        }
 
         if (visible) {
-            mService.setIcon("volume", iconId, 0);
+            mService.setIcon("volume", iconId, 0, contentDescription);
         }
         if (visible != mVolumeVisible) {
             mService.setIconVisibility("volume", visible);
@@ -936,6 +967,7 @@ public class PhoneStatusBarPolicy {
 
     private final void updateBluetooth(Intent intent) {
         int iconId = R.drawable.stat_sys_data_bluetooth;
+        String contentDescription = null;
         String action = intent.getAction();
         if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) {
             int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR);
@@ -945,12 +977,16 @@ public class PhoneStatusBarPolicy {
                 BluetoothAdapter.STATE_DISCONNECTED);
             if (state == BluetoothAdapter.STATE_CONNECTED) {
                 iconId = R.drawable.stat_sys_data_bluetooth_connected;
+                contentDescription = mContext.getString(R.string.accessibility_bluetooth_connected);
+            } else {
+                contentDescription = mContext.getString(
+                        R.string.accessibility_bluetooth_disconnected);
             }
         } else {
             return;
         }
 
-        mService.setIcon("bluetooth", iconId, 0);
+        mService.setIcon("bluetooth", iconId, 0, contentDescription);
         mService.setIconVisibility("bluetooth", mBluetoothEnabled);
     }
 
@@ -974,6 +1010,7 @@ public class PhoneStatusBarPolicy {
             }
         } else if (action.equals(WifiManager.RSSI_CHANGED_ACTION)) {
             int iconId;
+            String contentDescription = null;
             final int newRssi = intent.getIntExtra(WifiManager.EXTRA_NEW_RSSI, -200);
             int newSignalLevel = WifiManager.calculateSignalLevel(newRssi,
                                                                   sWifiSignalImages[0].length);
@@ -981,10 +1018,13 @@ public class PhoneStatusBarPolicy {
                 mLastWifiSignalLevel = newSignalLevel;
                 if (mIsWifiConnected) {
                     iconId = sWifiSignalImages[mInetCondition][newSignalLevel];
+                    contentDescription = mContext.getString(
+                            sWifiConnectionStrength[newSignalLevel]);
                 } else {
                     iconId = sWifiTemporarilyNotConnectedImage;
+                    contentDescription = mContext.getString(R.string.accessibility_no_wifi);
                 }
-                mService.setIcon("wifi", iconId, 0);
+                mService.setIcon("wifi", iconId, 0, contentDescription);
             }
         }
     }
@@ -995,14 +1035,16 @@ public class PhoneStatusBarPolicy {
 
         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.setIcon("gps", com.android.internal.R.drawable.stat_sys_gps_on, 0,
+                    mContext.getString(R.string.accessibility_gps_enabled));
             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.setIcon("gps", R.drawable.stat_sys_gps_acquiring_anim, 0,
+                    mContext.getString(R.string.accessibility_gps_acquiring));
             mService.setIconVisibility("gps", true);
         }
     }
@@ -1016,7 +1058,8 @@ public class PhoneStatusBarPolicy {
         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.setIcon("tty", R.drawable.stat_sys_tty_mode, 0,
+                    mContext.getString(R.string.accessibility_tty_enabled));
             mService.setIconVisibility("tty", true);
         } else {
             // TTY is off
@@ -1058,15 +1101,15 @@ public class PhoneStatusBarPolicy {
 
         switch (iconMode) {
             case EriInfo.ROAMING_ICON_MODE_NORMAL:
-                mService.setIcon("cdma_eri", iconList[iconIndex], 0);
+                mService.setIcon("cdma_eri", iconList[iconIndex], 0, null);
                 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.setIcon("cdma_eri", R.drawable.stat_sys_roaming_cdma_flash, 0, null);
                 mService.setIconVisibility("cdma_eri", true);
                 break;
 
         }
-        mService.setIcon("phone_signal", mPhoneSignalIconId, 0);
+        mService.setIcon("phone_signal", mPhoneSignalIconId, 0, null);
     }
 }
index 84c524a..c2390e8 100644 (file)
@@ -26,6 +26,7 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.ViewParent;
+import android.view.accessibility.AccessibilityEvent;
 import android.widget.FrameLayout;
 
 import com.android.systemui.R;
@@ -203,5 +204,19 @@ public class PhoneStatusBarView extends FrameLayout {
         return mService.interceptTouchEvent(event)
                 ? true : super.onInterceptTouchEvent(event);
     }
-}
 
+    @Override
+    public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) {
+        if (super.onRequestSendAccessibilityEvent(child, event)) {
+            // The status bar is very small so augment the view that the user is touching
+            // with the content of the status bar a whole. This way an accessibility service
+            // may announce the current item as well as the entire content if appropriate.
+            AccessibilityEvent record = AccessibilityEvent.obtain();
+            onInitializeAccessibilityEvent(record);
+            dispatchPopulateAccessibilityEvent(record);
+            event.appendRecord(record);
+            return true;
+        }
+        return false;
+    }
+}
index 8ee12de..e76fe51 100644 (file)
@@ -183,7 +183,8 @@ public abstract class Ticker {
         }
 
         final Drawable icon = StatusBarIconView.getIcon(mContext,
-                new StatusBarIcon(n.pkg, n.notification.icon, n.notification.iconLevel, 0));
+                new StatusBarIcon(n.pkg, n.notification.icon, n.notification.iconLevel, 0,
+                        n.notification.tickerText));
         final Segment newSegment = new Segment(n, icon, n.notification.tickerText);
 
         // If there's already a notification schedule for this package and id, remove it.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/AccessibilityContentDescriptions.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AccessibilityContentDescriptions.java
new file mode 100644 (file)
index 0000000..13fb03e
--- /dev/null
@@ -0,0 +1,37 @@
+// Copyright 2011 Google Inc. All Rights Reserved.
+
+package com.android.systemui.statusbar.policy;
+
+import com.android.systemui.R;
+
+/**
+ * Content descriptions for accessibility support.
+ */
+public class AccessibilityContentDescriptions {
+
+    private AccessibilityContentDescriptions() {}
+    
+    static final int[] PHONE_SIGNAL_STRENGTH = {
+        R.string.accessibility_no_phone,
+        R.string.accessibility_phone_one_bar,
+        R.string.accessibility_phone_two_bars,
+        R.string.accessibility_phone_three_bars,
+        R.string.accessibility_phone_signal_full
+    };
+
+    static final int[] DATA_CONNECTION_STRENGTH = {
+        R.string.accessibility_no_data,
+        R.string.accessibility_data_one_bar,
+        R.string.accessibility_data_two_bars,
+        R.string.accessibility_data_three_bars,
+        R.string.accessibility_data_signal_full
+    };
+
+    static final int[] WIFI_CONNECTION_STRENGTH = {
+        R.string.accessibility_no_wifi,
+        R.string.accessibility_wifi_one_bar,
+        R.string.accessibility_wifi_two_bars,
+        R.string.accessibility_wifi_three_bars,
+        R.string.accessibility_wifi_signal_full
+    };
+}
index ae2b6b2..3957c1b 100644 (file)
@@ -62,12 +62,15 @@ public class BatteryController extends BroadcastReceiver {
                 ImageView v = mIconViews.get(i);
                 v.setImageResource(icon);
                 v.setImageLevel(level);
+                v.setContentDescription(mContext.getString(R.string.accessibility_battery_level,
+                        level));
             }
             N = mLabelViews.size();
             for (int i=0; i<N; i++) {
                 //final boolean plugged = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, 0) != 0;
                 TextView v = mLabelViews.get(i);
-                v.setText(mContext.getString(R.string.status_bar_settings_battery_meter_format, level));
+                v.setText(mContext.getString(R.string.status_bar_settings_battery_meter_format,
+                        level));
             }
         }
     }
index 0525054..c6f416f 100644 (file)
@@ -19,12 +19,10 @@ package com.android.systemui.statusbar.policy;
 import java.util.ArrayList;
 
 import android.bluetooth.BluetoothAdapter;
-import android.bluetooth.BluetoothDevice;
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
-import android.util.Slog;
 import android.view.View;
 import android.widget.ImageView;
 
@@ -54,26 +52,24 @@ public class BluetoothController extends BroadcastReceiver {
 
     @Override
     public void onReceive(Context context, Intent intent) {
-        String action = intent.getAction();
-        if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) {
-            int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR);
-            mEnabled = state == BluetoothAdapter.STATE_ON;
-        } else if (action.equals(BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED)) {
-            int state = intent.getIntExtra(BluetoothAdapter.EXTRA_CONNECTION_STATE,
+        int state = intent.getIntExtra(BluetoothAdapter.EXTRA_CONNECTION_STATE,
                 BluetoothAdapter.STATE_DISCONNECTED);
-            if (state == BluetoothAdapter.STATE_CONNECTED) {
-                mIconId = R.drawable.stat_sys_data_bluetooth_connected;
-            } else {
-                mIconId = R.drawable.stat_sys_data_bluetooth;
-            }
-        }
+        int contentDescriptionResId = 0;
 
+        if (state == BluetoothAdapter.STATE_CONNECTED) {
+            mIconId = R.drawable.stat_sys_data_bluetooth_connected;
+            contentDescriptionResId = R.string.accessibility_bluetooth_connected;
+        } else {
+            mIconId = R.drawable.stat_sys_data_bluetooth;
+            contentDescriptionResId = R.string.accessibility_bluetooth_disconnected;
+        }
 
         int N = mIconViews.size();
         for (int i=0; i<N; i++) {
             ImageView v = mIconViews.get(i);
             v.setImageResource(mIconId);
             v.setVisibility(mEnabled ? View.VISIBLE : View.GONE);
+            v.setContentDescription(mContext.getString(contentDescriptionResId));
         }
     }
 }
index 3175a99..829855b 100644 (file)
@@ -28,14 +28,11 @@ import android.content.IntentFilter;
 import android.content.res.Resources;
 import android.net.ConnectivityManager;
 import android.net.NetworkInfo;
-import android.net.wifi.SupplicantState;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
 import android.os.Binder;
 import android.os.Handler;
-import android.os.HandlerThread;
-import android.os.Looper;
 import android.os.Message;
 import android.os.Messenger;
 import android.os.RemoteException;
@@ -87,6 +84,11 @@ public class NetworkController extends BroadcastReceiver {
     int mDataTypeIconId;
     boolean mDataActive;
 
+    String mContentDescriptionPhoneSignal;
+    String mContentDescriptionWifi;
+    String mContentDescriptionCombinedSignal;
+    String mContentDescriptionDataType;
+
     // wifi
     final WifiManager mWifiManager;
     AsyncChannel mWifiChannel;
@@ -366,6 +368,8 @@ public class NetworkController extends BroadcastReceiver {
             if (mSignalStrength == null) {
                 mPhoneSignalIconId = R.drawable.stat_sys_signal_null;
                 mDataSignalIconId = R.drawable.stat_sys_signal_0; // note we use 0 instead of null
+                mContentDescriptionPhoneSignal = mContext.getString(
+                        AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0]);
             } else {
                 int iconLevel;
                 int[] iconList;
@@ -385,6 +389,9 @@ public class NetworkController extends BroadcastReceiver {
                     }
                 }
                 mPhoneSignalIconId = iconList[iconLevel];
+                mContentDescriptionPhoneSignal = mContext.getString(
+                        AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[iconLevel]);
+
                 mDataSignalIconId = TelephonyIcons.DATA_SIGNAL_STRENGTH[mInetCondition][iconLevel];
             }
         }
@@ -395,14 +402,20 @@ public class NetworkController extends BroadcastReceiver {
             case TelephonyManager.NETWORK_TYPE_UNKNOWN:
                 mDataIconList = TelephonyIcons.DATA_G[mInetCondition];
                 mDataTypeIconId = 0;
+                mContentDescriptionDataType = mContext.getString(
+                        R.string.accessibility_data_connection_gprs);
                 break;
             case TelephonyManager.NETWORK_TYPE_EDGE:
                 mDataIconList = TelephonyIcons.DATA_E[mInetCondition];
                 mDataTypeIconId = R.drawable.stat_sys_signal_edge;
+                mContentDescriptionDataType = mContext.getString(
+                        R.string.accessibility_data_connection_edge);
                 break;
             case TelephonyManager.NETWORK_TYPE_UMTS:
                 mDataIconList = TelephonyIcons.DATA_3G[mInetCondition];
                 mDataTypeIconId = R.drawable.stat_sys_signal_3g;
+                mContentDescriptionDataType = mContext.getString(
+                        R.string.accessibility_data_connection_3g);
                 break;
             case TelephonyManager.NETWORK_TYPE_HSDPA:
             case TelephonyManager.NETWORK_TYPE_HSUPA:
@@ -410,19 +423,27 @@ public class NetworkController extends BroadcastReceiver {
                 if (mHspaDataDistinguishable) {
                     mDataIconList = TelephonyIcons.DATA_H[mInetCondition];
                     mDataTypeIconId = R.drawable.stat_sys_signal_hsdpa;
+                    mContentDescriptionDataType = mContext.getString(
+                            R.string.accessibility_data_connection_3_5g);
                 } else {
                     mDataIconList = TelephonyIcons.DATA_3G[mInetCondition];
                     mDataTypeIconId = R.drawable.stat_sys_signal_3g;
+                    mContentDescriptionDataType = mContext.getString(
+                            R.string.accessibility_data_connection_3g);
                 }
                 break;
             case TelephonyManager.NETWORK_TYPE_CDMA:
                 // display 1xRTT for IS95A/B
                 mDataIconList = TelephonyIcons.DATA_1X[mInetCondition];
                 mDataTypeIconId = R.drawable.stat_sys_signal_1x;
+                mContentDescriptionDataType = mContext.getString(
+                        R.string.accessibility_data_connection_cdma);
                 break;
             case TelephonyManager.NETWORK_TYPE_1xRTT:
                 mDataIconList = TelephonyIcons.DATA_1X[mInetCondition];
                 mDataTypeIconId = R.drawable.stat_sys_signal_1x;
+                mContentDescriptionDataType = mContext.getString(
+                        R.string.accessibility_data_connection_cdma);
                 break;
             case TelephonyManager.NETWORK_TYPE_EVDO_0: //fall through
             case TelephonyManager.NETWORK_TYPE_EVDO_A:
@@ -430,14 +451,20 @@ public class NetworkController extends BroadcastReceiver {
             case TelephonyManager.NETWORK_TYPE_EHRPD:
                 mDataIconList = TelephonyIcons.DATA_3G[mInetCondition];
                 mDataTypeIconId = R.drawable.stat_sys_signal_3g;
+                mContentDescriptionDataType = mContext.getString(
+                        R.string.accessibility_data_connection_3g);
                 break;
             case TelephonyManager.NETWORK_TYPE_LTE:
                 mDataIconList = TelephonyIcons.DATA_4G[mInetCondition];
                 mDataTypeIconId = R.drawable.stat_sys_signal_4g;
+                mContentDescriptionDataType = mContext.getString(
+                        R.string.accessibility_data_connection_4g);
                 break;
             default:
                 mDataIconList = TelephonyIcons.DATA_G[mInetCondition];
                 mDataTypeIconId = R.drawable.stat_sys_signal_gprs;
+                mContentDescriptionDataType = mContext.getString(
+                        R.string.accessibility_data_connection_gprs);
                 break;
         }
         if ((isCdma() && isCdmaEri()) || mPhone.isNetworkRoaming()) {
@@ -618,8 +645,11 @@ public class NetworkController extends BroadcastReceiver {
     private void updateWifiIcons() {
         if (mWifiConnected) {
             mWifiIconId = WifiIcons.WIFI_SIGNAL_STRENGTH[mInetCondition][mWifiLevel];
+            mContentDescriptionWifi = mContext.getString(
+                    AccessibilityContentDescriptions.WIFI_CONNECTION_STRENGTH[mWifiLevel]);
         } else {
             mWifiIconId = WifiIcons.WIFI_SIGNAL_STRENGTH[0][0];
+            mContentDescriptionWifi = mContext.getString(R.string.accessibility_no_wifi);
         }
     }
 
@@ -704,6 +734,7 @@ public class NetworkController extends BroadcastReceiver {
                 }
             }
             combinedSignalIconId = mWifiIconId;
+            mContentDescriptionCombinedSignal = mContentDescriptionWifi;
             dataTypeIconId = 0;
         } else if (mDataConnected) {
             label = mNetworkName;
@@ -723,22 +754,29 @@ public class NetworkController extends BroadcastReceiver {
                     break;
             }
             combinedSignalIconId = mDataSignalIconId;
+            mContentDescriptionCombinedSignal = mContentDescriptionDataType;
             dataTypeIconId = mDataTypeIconId;
         } else if (mBluetoothTethered) {
             label = mContext.getString(R.string.bluetooth_tethered);
             combinedSignalIconId = mBluetoothTetherIconId;
+            mContentDescriptionCombinedSignal = mContext.getString(
+                    R.string.accessibility_bluetooth_tether);
             dataTypeIconId = 0;
         } else if (mAirplaneMode &&
                 (mServiceState == null || (!hasService() && !mServiceState.isEmergencyOnly()))) {
             // Only display the flight-mode icon if not in "emergency calls only" mode.
             label = context.getString(R.string.status_bar_settings_signal_meter_disconnected);
             combinedSignalIconId = R.drawable.stat_sys_signal_flightmode;
+            mContentDescriptionCombinedSignal = mContext.getString(
+                    R.string.accessibility_airplane_mode);
             dataTypeIconId = 0;
         } else {
             label = context.getString(R.string.status_bar_settings_signal_meter_disconnected);
             // On devices without mobile radios, we want to show the wifi icon
             combinedSignalIconId =
                 hasMobileDataFeature() ? mDataSignalIconId : mWifiIconId;
+            mContentDescriptionCombinedSignal = hasMobileDataFeature()
+                ? mContentDescriptionDataType : mContentDescriptionWifi;
             dataTypeIconId = 0;
         }
 
@@ -764,6 +802,7 @@ public class NetworkController extends BroadcastReceiver {
             for (int i=0; i<N; i++) {
                 final ImageView v = mPhoneSignalIconViews.get(i);
                 v.setImageResource(mPhoneSignalIconId);
+                v.setContentDescription(mContentDescriptionPhoneSignal);
             }
         }
 
@@ -774,6 +813,7 @@ public class NetworkController extends BroadcastReceiver {
             for (int i=0; i<N; i++) {
                 final ImageView v = mDataDirectionIconViews.get(i);
                 v.setImageResource(mDataDirectionIconId);
+                v.setContentDescription(mContentDescriptionDataType);
             }
         }
 
@@ -784,6 +824,7 @@ public class NetworkController extends BroadcastReceiver {
             for (int i=0; i<N; i++) {
                 final ImageView v = mWifiIconViews.get(i);
                 v.setImageResource(mWifiIconId);
+                v.setContentDescription(mContentDescriptionWifi);
             }
         }
 
@@ -794,6 +835,7 @@ public class NetworkController extends BroadcastReceiver {
             for (int i=0; i<N; i++) {
                 final ImageView v = mCombinedSignalIconViews.get(i);
                 v.setImageResource(combinedSignalIconId);
+                v.setContentDescription(mContentDescriptionCombinedSignal);
             }
         }
 
@@ -808,6 +850,7 @@ public class NetworkController extends BroadcastReceiver {
                 } else {
                     v.setVisibility(View.VISIBLE);
                     v.setImageResource(dataTypeIconId);
+                    v.setContentDescription(mContentDescriptionDataType);
                 }
             }
         }
@@ -826,6 +869,7 @@ public class NetworkController extends BroadcastReceiver {
                 } else {
                     v.setVisibility(View.VISIBLE);
                     v.setImageResource(dataDirectionOverlayIconId);
+                    v.setContentDescription(mContentDescriptionDataType);
                 }
             }
         }
index 981fb24..d5885bb 100644 (file)
@@ -148,6 +148,11 @@ public class NotificationRowLayout extends ViewGroup {
                                 "now sliding child %d: %s (touchY=%.1f, rowHeight=%d, count=%d)",
                                 childIdx, mSlidingChild, mInitialTouchY, mRowHeight, count));
                         }
+
+
+                        // We need to prevent the surrounding ScrollView from intercepting us now;
+                        // the scroll position will be locked while we swipe
+                        requestDisallowInterceptTouchEvent(true);
                     }
                 }
                 break;
@@ -236,6 +241,7 @@ public class NotificationRowLayout extends ViewGroup {
                 @Override
                 public void onAnimationEnd(Animator animation) {
                     mAppearingViews.remove(childF);
+                    requestLayout(); // pick up any final changes in position
                 }
             });
             a.start();
@@ -274,6 +280,7 @@ public class NotificationRowLayout extends ViewGroup {
                     NotificationRowLayout.super.removeView(childF);
                     childF.setAlpha(1f);
                     mDisappearingViews.remove(childF);
+                    requestLayout(); // pick up any final changes in position
                 }
             });
 
@@ -372,7 +379,7 @@ public class NotificationRowLayout extends ViewGroup {
         final int width = right - left;
         final int height = bottom - top;
 
-        //if (DEBUG) Slog.d(TAG, "onLayout: height=" + height);
+        if (DEBUG) Slog.d(TAG, "onLayout: height=" + height);
 
         final int count = getChildCount();
         int y = 0;
@@ -381,20 +388,22 @@ public class NotificationRowLayout extends ViewGroup {
             if (child.getVisibility() == GONE) {
                 continue;
             }
-//            final int thisRowHeight = (int)(
-//                ((mAppearingViews.contains(child) || mDisappearingViews.contains(child))
-//                        ? child.getScaleY()
-//                        : 1.0f)
-//                * mRowHeight);
             final int thisRowHeight = (int)(child.getAlpha() * mRowHeight);
-//            child.layout(0, y, width, y + thisRowHeight);
-            child.layout(0, y, width, y + mRowHeight);
+            if (DEBUG) {
+                Slog.d(TAG, String.format(
+                            "laying out child #%d: (0, %d, %d, %d) h=%d",
+                            i, y, width, y + thisRowHeight, thisRowHeight));
+            }
+            child.layout(0, y, width, y + thisRowHeight);
             y += thisRowHeight;
         }
+        if (DEBUG) {
+            Slog.d(TAG, "onLayout: final y=" + y);
+        }
     }
 
     public void setForcedHeight(int h) {
-        //if (DEBUG) Slog.d(TAG, "forcedHeight: " + h);
+        if (DEBUG) Slog.d(TAG, "forcedHeight: " + h);
         if (h != mHeight) {
             mHeight = h;
             requestLayout();
index c62c4ad..8c4ae19 100644 (file)
@@ -22,6 +22,7 @@ import android.content.res.TypedArray;
 import android.os.RemoteException;
 import android.util.AttributeSet;
 import android.util.Slog;
+import android.view.MotionEvent;
 import android.view.View;
 import android.widget.FrameLayout;
 import android.widget.ImageView;
@@ -90,6 +91,19 @@ public class CompatModePanel extends FrameLayout implements StatusBarPanel,
         return false;
     }
 
+    @Override
+    public boolean dispatchHoverEvent(MotionEvent event) {
+        // Ignore hover events outside of this panel bounds since such events
+        // generate spurious accessibility events with the panel content when
+        // tapping outside of it, thus confusing the user.
+        final int x = (int) event.getX();
+        final int y = (int) event.getY();
+        if (x >= 0 && x < getWidth() && y >= 0 && y < getHeight()) {
+            return super.dispatchHoverEvent(event);
+        }
+        return true;
+    }
+
     public void setTrigger(View v) {
         mTrigger = v;
     }
index 339e3f3..1e417ac 100644 (file)
@@ -30,6 +30,7 @@ import android.text.TextUtils;
 import android.util.AttributeSet;
 import android.util.Log;
 import android.util.Pair;
+import android.view.MotionEvent;
 import android.view.View;
 import android.view.inputmethod.InputMethodInfo;
 import android.view.inputmethod.InputMethodManager;
@@ -160,6 +161,19 @@ public class InputMethodsPanel extends LinearLayout implements StatusBarPanel,
         }
     }
 
+    @Override
+    public boolean dispatchHoverEvent(MotionEvent event) {
+        // Ignore hover events outside of this panel bounds since such events
+        // generate spurious accessibility events with the panel content when
+        // tapping outside of it, thus confusing the user.
+        final int x = (int) event.getX();
+        final int y = (int) event.getY();
+        if (x >= 0 && x < getWidth() && y >= 0 && y < getHeight()) {
+            return super.dispatchHoverEvent(event);
+        }
+        return true;
+    }
+
     private void updateHardKeyboardEnabled() {
         if (mHardKeyboardAvailable) {
             final boolean checked = mHardKeyboardSwitch.isChecked();
@@ -222,6 +236,7 @@ public class InputMethodsPanel extends LinearLayout implements StatusBarPanel,
             itemSubtitle.setText(imiName);
         }
         subtypeIcon.setImageDrawable(icon);
+        subtypeIcon.setContentDescription(itemTitle.getText());
         final String settingsActivity = imi.getSettingsActivity();
         if (!TextUtils.isEmpty(settingsActivity)) {
             settingsIcon.setOnClickListener(new View.OnClickListener() {
@@ -463,4 +478,5 @@ public class InputMethodsPanel extends LinearLayout implements StatusBarPanel,
     public interface OnHardKeyboardEnabledChangeListener {
         public void onHardKeyboardEnabledChange(boolean enabled);
     }
+
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationArea.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationArea.java
new file mode 100644 (file)
index 0000000..42bdf3d
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.tablet;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.accessibility.AccessibilityEvent;
+import android.widget.LinearLayout;
+
+public class NotificationArea extends LinearLayout {
+
+    public NotificationArea(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    @Override
+    public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) {
+        if (super.onRequestSendAccessibilityEvent(child, event)) {
+            // The event is coming from a descendant like battery but append
+            // the content of the entire notification area so accessibility
+            // services can choose how to present the content to the user.
+            AccessibilityEvent record = AccessibilityEvent.obtain();
+            onInitializeAccessibilityEvent(record);
+            dispatchPopulateAccessibilityEvent(record);
+            event.appendRecord(record);
+            return true;
+        }
+        return false;
+    }
+}
index 64a4f16..a316e4b 100644 (file)
@@ -20,27 +20,15 @@ import android.animation.Animator;
 import android.animation.AnimatorListenerAdapter;
 import android.animation.AnimatorSet;
 import android.animation.ObjectAnimator;
-import android.animation.ValueAnimator;
 import android.content.Context;
-import android.content.res.Resources;
-import android.graphics.Canvas;
 import android.graphics.Rect;
-import android.graphics.drawable.Drawable;
 import android.util.AttributeSet;
 import android.util.Slog;
-import android.view.accessibility.AccessibilityEvent;
 import android.view.LayoutInflater;
 import android.view.MotionEvent;
-import android.view.SoundEffectConstants;
 import android.view.View;
 import android.view.ViewGroup;
-import android.view.animation.AccelerateInterpolator;
-import android.widget.FrameLayout;
-import android.widget.FrameLayout;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
 import android.widget.RelativeLayout;
-import android.widget.TextView;
 
 import com.android.systemui.R;
 
@@ -53,8 +41,7 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
 
     boolean mShowing;
     int mNotificationCount = 0;
-    View mTitleArea;
-    ModeToggle mModeToggle;
+    NotificationPanelTitle mTitleArea;
     View mSettingsButton;
     View mNotificationButton;
     View mNotificationScroller;
@@ -68,48 +55,6 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
 
     Choreographer mChoreo = new Choreographer();
 
-    static class ModeToggle extends View {
-        NotificationPanel mPanel;
-        View mTitle;
-        public ModeToggle(Context context, AttributeSet attrs) {
-            super(context, attrs);
-        }
-        public void setPanel(NotificationPanel p) {
-            mPanel = p;
-        }
-        public void setTitleArea(View v) {
-            mTitle = v;
-        }
-        @Override
-        public boolean onTouchEvent(MotionEvent e) {
-            final int x = (int)e.getX();
-            final int y = (int)e.getY();
-            switch (e.getAction()) {
-                case MotionEvent.ACTION_DOWN:
-                    mTitle.setPressed(true);
-                    break;
-                case MotionEvent.ACTION_MOVE:
-                    mTitle.setPressed(x >= 0
-                            && x < getWidth()
-                            && y >= 0
-                            && y < getHeight());
-                    break;
-                case MotionEvent.ACTION_CANCEL:
-                    mTitle.setPressed(false);
-                    break;
-                case MotionEvent.ACTION_UP:
-                    if (mTitle.isPressed()) {
-                        sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
-                        playSoundEffect(SoundEffectConstants.CLICK);
-                        mPanel.swapPanels();
-                        mTitle.setPressed(false);
-                    }
-                    break;
-            }
-            return true;
-        }
-    }
-
     public NotificationPanel(Context context, AttributeSet attrs) {
         this(context, attrs, 0);
     }
@@ -126,14 +71,11 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
 
         mContentParent = (ViewGroup)findViewById(R.id.content_parent);
         mContentParent.bringToFront();
-        mTitleArea = findViewById(R.id.title_area);
-        mModeToggle = (ModeToggle) findViewById(R.id.mode_toggle);
-        mModeToggle.setOnClickListener(this);
-        mModeToggle.setPanel(this);
-        mModeToggle.setTitleArea(mTitleArea);
+        mTitleArea = (NotificationPanelTitle) findViewById(R.id.title_area);
+        mTitleArea.setPanel(this);
 
-        mSettingsButton = (ImageView)findViewById(R.id.settings_button);
-        mNotificationButton = (ImageView)findViewById(R.id.notification_button);
+        mSettingsButton = findViewById(R.id.settings_button);
+        mNotificationButton = findViewById(R.id.notification_button);
 
         mNotificationScroller = findViewById(R.id.notification_scroller);
         mContentFrame = (ViewGroup)findViewById(R.id.content_frame);
@@ -185,6 +127,19 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
         }
     }
 
+    @Override
+    public boolean dispatchHoverEvent(MotionEvent event) {
+        // Ignore hover events outside of this panel bounds since such events
+        // generate spurious accessibility events with the panel content when
+        // tapping outside of it, thus confusing the user.
+        final int x = (int) event.getX();
+        final int y = (int) event.getY();
+        if (x >= 0 && x < getWidth() && y >= 0 && y < getHeight()) {
+            return super.dispatchHoverEvent(event);
+        }
+        return true;
+    }
+
     /*
     @Override
     protected void onLayout(boolean changed, int l, int t, int r, int b) {
@@ -205,7 +160,7 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
     */
 
     public void onClick(View v) {
-        if (v == mModeToggle) {
+        if (v == mTitleArea) {
             swapPanels();
         }
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanelTitle.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanelTitle.java
new file mode 100644 (file)
index 0000000..689bc36
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.tablet;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.MotionEvent;
+import android.view.SoundEffectConstants;
+import android.view.View;
+import android.view.accessibility.AccessibilityEvent;
+import android.widget.RelativeLayout;
+
+public class NotificationPanelTitle extends RelativeLayout implements View.OnClickListener {
+    private NotificationPanel mPanel;
+
+    public NotificationPanelTitle(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        setOnClickListener(this);
+    }
+
+    public void setPanel(NotificationPanel p) {
+        mPanel = p;
+    }
+
+    @Override
+    public boolean onTouchEvent(MotionEvent e) {
+        switch (e.getAction()) {
+            case MotionEvent.ACTION_DOWN:
+                setPressed(true);
+                break;
+            case MotionEvent.ACTION_MOVE:
+                final int x = (int) e.getX();
+                final int y = (int) e.getY();
+                setPressed(x > 0 && x < getWidth() && y > 0 && y < getHeight());
+                break;
+            case MotionEvent.ACTION_UP:
+                if (isPressed()) {
+                    playSoundEffect(SoundEffectConstants.CLICK);
+                    mPanel.swapPanels();
+                    setPressed(false);
+                }
+                break;
+            case MotionEvent.ACTION_CANCEL:
+                setPressed(false);
+                break;
+        }
+        return true;
+    }
+
+    @Override
+    public void onClick(View v) {
+        if (v == this) {
+            mPanel.swapPanels();
+        }
+    }
+
+    @Override
+    public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) {
+        if (super.onRequestSendAccessibilityEvent(child, event)) {
+            AccessibilityEvent record = AccessibilityEvent.obtain();
+            onInitializeAccessibilityEvent(record);
+            dispatchPopulateAccessibilityEvent(record);
+            event.appendRecord(record);
+            return true;
+        }
+        return false;
+    }
+}
index 8b68240..ba28306 100644 (file)
@@ -18,12 +18,9 @@ package com.android.systemui.statusbar.tablet;
 
 import android.content.Context;
 import android.util.AttributeSet;
-import android.util.Slog;
 import android.view.MotionEvent;
 import android.widget.RelativeLayout;
 
-import com.android.systemui.R;
-
 public class NotificationPeekPanel extends RelativeLayout implements StatusBarPanel {
     TabletStatusBar mBar;
 
@@ -54,5 +51,17 @@ public class NotificationPeekPanel extends RelativeLayout implements StatusBarPa
         mBar.resetNotificationPeekFadeTimer();
         return false;
     }
-}
 
+    @Override
+    public boolean dispatchHoverEvent(MotionEvent event) {
+        // Ignore hover events outside of this panel bounds since such events
+        // generate spurious accessibility events with the panel content when
+        // tapping outside of it, thus confusing the user.
+        final int x = (int) event.getX();
+        final int y = (int) event.getY();
+        if (x >= 0 && x < getWidth() && y >= 0 && y < getHeight()) {
+            return super.dispatchHoverEvent(event);
+        }
+        return true;
+    }
+}
index df09f84..13846ed 100644 (file)
@@ -808,7 +808,8 @@ public class TabletStatusBar extends StatusBar implements
                 // Update the icon.
                 final StatusBarIcon ic = new StatusBarIcon(notification.pkg,
                         notification.notification.icon, notification.notification.iconLevel,
-                        notification.notification.number);
+                        notification.notification.number,
+                        notification.notification.tickerText);
                 if (!oldEntry.icon.set(ic)) {
                     handleNotificationError(key, notification, "Couldn't update icon: " + ic);
                     return;
@@ -1012,10 +1013,7 @@ public class TabletStatusBar extends StatusBar implements
 
         mCompatModeButton.refresh();
         if (mCompatModeButton.getVisibility() == View.VISIBLE) {
-            if (DEBUG_COMPAT_HELP
-                    || ! Prefs.read(mContext).getBoolean(Prefs.SHOWN_COMPAT_MODE_HELP, false)) {
                 showCompatibilityHelp();
-            }
         } else {
             hideCompatibilityHelp();
             mCompatModePanel.closePanel();
@@ -1451,13 +1449,15 @@ public class TabletStatusBar extends StatusBar implements
         }
         // Construct the icon.
         final StatusBarIconView iconView = new StatusBarIconView(mContext,
-                notification.pkg + "/0x" + Integer.toHexString(notification.id));
+                notification.pkg + "/0x" + Integer.toHexString(notification.id),
+                notification.notification);
         iconView.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
 
         final StatusBarIcon ic = new StatusBarIcon(notification.pkg,
                     notification.notification.icon,
                     notification.notification.iconLevel,
-                    notification.notification.number);
+                    notification.notification.number,
+                    notification.notification.tickerText);
         if (!iconView.set(ic)) {
             handleNotificationError(key, notification, "Couldn't attach StatusBarIcon: " + ic);
             return null;
@@ -1501,11 +1501,6 @@ public class TabletStatusBar extends StatusBar implements
         // alternate behavior in DND mode
         if (mNotificationDNDMode) {
             if (mIconLayout.getChildCount() == 0) {
-                final StatusBarIconView iconView = new StatusBarIconView(mContext, "_dnd");
-                iconView.setImageResource(R.drawable.ic_notification_dnd);
-                iconView.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
-                iconView.setPadding(mIconHPadding, 0, mIconHPadding, 0);
-
                 final Notification dndNotification = new Notification.Builder(mContext)
                     .setContentTitle(mContext.getText(R.string.notifications_off_title))
                     .setContentText(mContext.getText(R.string.notifications_off_text))
@@ -1513,6 +1508,12 @@ public class TabletStatusBar extends StatusBar implements
                     .setOngoing(true)
                     .getNotification();
 
+                final StatusBarIconView iconView = new StatusBarIconView(mContext, "_dnd",
+                        dndNotification);
+                iconView.setImageResource(R.drawable.ic_notification_dnd);
+                iconView.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
+                iconView.setPadding(mIconHPadding, 0, mIconHPadding, 0);
+
                 mNotificationDNDDummyEntry = new NotificationData.Entry(
                         null,
                         new StatusBarNotification("", 0, "", 0, 0, dndNotification),
@@ -1634,19 +1635,24 @@ public class TabletStatusBar extends StatusBar implements
         } else {
             if ((sbn.notification.flags & Notification.FLAG_ONGOING_EVENT) == 0) {
                 vetoButton.setVisibility(View.INVISIBLE);
+                vetoButton.setContentDescription("VETO");
             } else {
                 vetoButton.setVisibility(View.GONE);
             }
         }
+        vetoButton.setContentDescription(mContext.getString(
+                R.string.accessibility_remove_notification));
 
         // the large icon
         ImageView largeIcon = (ImageView)row.findViewById(R.id.large_icon);
         if (sbn.notification.largeIcon != null) {
             largeIcon.setImageBitmap(sbn.notification.largeIcon);
+            largeIcon.setContentDescription(sbn.notification.tickerText);
         } else {
             largeIcon.getLayoutParams().width = 0;
             largeIcon.setVisibility(View.INVISIBLE);
         }
+        largeIcon.setContentDescription(sbn.notification.tickerText);
 
         // bind the click event to the content area
         ViewGroup content = (ViewGroup)row.findViewById(R.id.content);
index a8f4262..6045e31 100644 (file)
@@ -284,7 +284,7 @@ public class TabletTicker
         } else if (n.tickerText != null) {
             group = (ViewGroup)inflater.inflate(R.layout.status_bar_ticker_compat, mWindow, false);
             final Drawable icon = StatusBarIconView.getIcon(mContext,
-                    new StatusBarIcon(notification.pkg, n.icon, n.iconLevel, 0));
+                    new StatusBarIcon(notification.pkg, n.icon, n.iconLevel, 0, n.tickerText));
             ImageView iv = (ImageView)group.findViewById(iconId);
             iv.setImageDrawable(icon);
             iv.setVisibility(View.VISIBLE);
index 935f4ad..47d34b3 100644 (file)
@@ -35,7 +35,6 @@ 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;
@@ -43,7 +42,6 @@ import android.os.RemoteException;
 import android.os.SystemClock;
 import android.os.SystemProperties;
 import android.provider.Settings;
-import android.provider.Settings.SettingNotFoundException;
 import android.telephony.TelephonyManager;
 import android.util.EventLog;
 import android.util.Log;
@@ -1117,8 +1115,11 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
                 // Give feedback to user when secure keyguard is active and engaged
                 if (mShowing && isSecure()) {
                     if (!mShowingLockIcon) {
+                        String contentDescription = mContext.getString(
+                                com.android.internal.R.string.status_bar_device_locked);
                         mStatusBarManager.setIcon("secure",
-                                com.android.internal.R.drawable.stat_sys_secure, 0);
+                                com.android.internal.R.drawable.stat_sys_secure, 0,
+                                contentDescription);
                         mShowingLockIcon = true;
                     }
                 } else {
index b963b13..e0debf7 100644 (file)
@@ -388,6 +388,11 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
         st.isHandled = false;
         mPreparedPanel = st;
 
+        if (st.frozenActionViewState != null) {
+            st.menu.restoreActionViewStates(st.frozenActionViewState);
+            st.frozenActionViewState = null;
+        }
+
         return true;
     }
 
@@ -652,7 +657,13 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
     @Override
     public void invalidatePanelMenu(int featureId) {
         PanelFeatureState st = getPanelState(featureId, true);
+        Bundle savedActionViewStates = null;
         if (st.menu != null) {
+            savedActionViewStates = new Bundle();
+            st.menu.saveActionViewStates(savedActionViewStates);
+            if (savedActionViewStates.size() > 0) {
+                st.frozenActionViewState = savedActionViewStates;
+            }
             st.menu.clear();
         }
         st.refreshMenuContent = true;
@@ -3024,6 +3035,12 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
          */
         Bundle frozenMenuState;
 
+        /**
+         * Contains the state of associated action views when told to freeze.
+         * These are saved across invalidations.
+         */
+        Bundle frozenActionViewState;
+
         PanelFeatureState(int featureId) {
             this.featureId = featureId;
 
index ad6cebb..ae13ab5 100755 (executable)
@@ -166,22 +166,22 @@ public class PhoneWindowManager implements WindowManagerPolicy {
     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;
-    static final int STATUS_BAR_PANEL_LAYER = 9;
     // SIM errors and unlock.  Not sure if this really should be in a high layer.
-    static final int PRIORITY_PHONE_LAYER = 10;
+    static final int PRIORITY_PHONE_LAYER = 8;
     // like the ANR / app crashed dialogs
-    static final int SYSTEM_ALERT_LAYER = 11;
+    static final int SYSTEM_ALERT_LAYER = 9;
     // system-level error dialogs
-    static final int SYSTEM_ERROR_LAYER = 12;
+    static final int SYSTEM_ERROR_LAYER = 10;
     // on-screen keyboards and other such input method user interfaces go here.
-    static final int INPUT_METHOD_LAYER = 13;
+    static final int INPUT_METHOD_LAYER = 11;
     // on-screen keyboards and other such input method user interfaces go here.
-    static final int INPUT_METHOD_DIALOG_LAYER = 14;
+    static final int INPUT_METHOD_DIALOG_LAYER = 12;
     // the keyguard; nothing on top of these can take focus, since they are
     // responsible for power management when displayed.
-    static final int KEYGUARD_LAYER = 15;
-    static final int KEYGUARD_DIALOG_LAYER = 16;
+    static final int KEYGUARD_LAYER = 13;
+    static final int KEYGUARD_DIALOG_LAYER = 14;
+    static final int STATUS_BAR_LAYER = 15;
+    static final int STATUS_BAR_PANEL_LAYER = 16;
     // the navigation bar, if available, shows atop most things
     static final int NAVIGATION_BAR_LAYER = 17;
     // the drag layer: input for drag-and-drop is associated with this window,
@@ -1703,7 +1703,11 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                     }
                 }
             }
-            if (DEBUG_LAYOUT) Log.i(TAG, "mNavigationBar frame: " + navr);
+            if (DEBUG_LAYOUT) {
+                Log.i(TAG, "mNavigationBar frame: " + navr);
+                Log.i(TAG, String.format("mDock rect: (%d,%d - %d,%d)",
+                            mDockLeft, mDockTop, mDockRight, mDockBottom));
+            }
 
             // apply navigation bar insets
             pf.left = df.left = vf.left = mDockLeft;
@@ -1713,6 +1717,25 @@ public class PhoneWindowManager implements WindowManagerPolicy {
 
             mStatusBar.computeFrameLw(pf, df, vf, vf);
 
+            // now, let's consider the navigation bar; if it exists, it must be removed from the
+            // available screen real estate (like an un-hideable status bar)
+            if (navr != null) {
+                if (navr.top == 0) {
+                    // Navigation bar is vertical
+                    if (mRestrictedScreenLeft == navr.left) {
+                        mRestrictedScreenLeft = navr.right;
+                        mRestrictedScreenWidth -= (navr.right - navr.left);
+                    } else if ((mRestrictedScreenLeft+mRestrictedScreenWidth) == navr.right) {
+                        mRestrictedScreenWidth -= (navr.right - navr.left);
+                    }
+                } else {
+                    // Navigation bar horizontal, at bottom
+                    if ((mRestrictedScreenHeight+mRestrictedScreenTop) == navr.bottom) {
+                        mRestrictedScreenHeight -= (navr.bottom-navr.top);
+                    }
+                }
+            }
+
             if (mStatusBar.isVisibleLw()) {
                 // If the status bar is hidden, we don't want to cause
                 // windows behind it to scroll.
@@ -1745,23 +1768,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                         mRestrictedScreenHeight -= (r.bottom-r.top);
                     }
 
-                    if (navr != null) {
-                        if (navr.top == 0) {
-                            // Navigation bar is vertical
-                            if (mRestrictedScreenLeft == navr.left) {
-                                mRestrictedScreenLeft = navr.right;
-                                mRestrictedScreenWidth -= (navr.right - navr.left);
-                            } else if ((mRestrictedScreenLeft+mRestrictedScreenWidth) == navr.right) {
-                                mRestrictedScreenWidth -= (navr.right - navr.left);
-                            }
-                        } else {
-                            // Navigation bar horizontal, at bottom
-                            if ((mRestrictedScreenHeight-mRestrictedScreenTop) == r.bottom) {
-                                mRestrictedScreenHeight -= (navr.bottom-navr.top);
-                            }
-                        }
-                    }
-
                     mContentTop = mCurTop = mDockTop = mRestrictedScreenTop;
                     mContentBottom = mCurBottom = mDockBottom
                             = mRestrictedScreenTop + mRestrictedScreenHeight;
@@ -1873,19 +1879,22 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                         // permission, so they have the same privileges as the status
                         // bar itself.
                         //
-                        // However, they should still dodge the navigation bar if it exists. A
-                        // straightforward way to do this is to only allow the status bar panels to
-                        // extend to the extrema of the allowable region for the IME dock.
+                        // However, they should still dodge the navigation bar if it exists.
 
                         pf.left = df.left = hasNavBar ? mDockLeft : mUnrestrictedScreenLeft;
                         pf.top = df.top = mUnrestrictedScreenTop;
                         pf.right = df.right = hasNavBar
-                                            ? mDockRight
+                                            ? mRestrictedScreenLeft+mRestrictedScreenWidth
                                             : mUnrestrictedScreenLeft+mUnrestrictedScreenWidth;
                         pf.bottom = df.bottom = hasNavBar
-                                              ? mDockBottom
+                                              ? mRestrictedScreenTop+mRestrictedScreenHeight
                                               : mUnrestrictedScreenTop+mUnrestrictedScreenHeight;
 
+                        if (DEBUG_LAYOUT) {
+                            Log.v(TAG, String.format(
+                                        "Laying out status bar window: (%d,%d - %d,%d)",
+                                        pf.left, pf.top, pf.right, pf.bottom));
+                        }
                     } else {
                         pf.left = df.left = mRestrictedScreenLeft;
                         pf.top = df.top = mRestrictedScreenTop;
@@ -1922,12 +1931,23 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                     pf.left = df.left = cf.left = hasNavBar ? mDockLeft : mUnrestrictedScreenLeft;
                     pf.top = df.top = cf.top = mUnrestrictedScreenTop;
                     pf.right = df.right = cf.right = hasNavBar
-                                        ? mDockRight
+                                        ? mRestrictedScreenLeft+mRestrictedScreenWidth
                                         : mUnrestrictedScreenLeft+mUnrestrictedScreenWidth;
                     pf.bottom = df.bottom = cf.bottom = hasNavBar
-                                          ? mDockBottom
+                                          ? mRestrictedScreenTop+mRestrictedScreenHeight
                                           : mUnrestrictedScreenTop+mUnrestrictedScreenHeight;
 
+                } else if (attrs.type == TYPE_NAVIGATION_BAR) {
+                    // The navigation bar has Real Ultimate Power.
+                    pf.left = df.left = mUnrestrictedScreenLeft;
+                    pf.top = df.top = mUnrestrictedScreenTop;
+                    pf.right = df.right = mUnrestrictedScreenLeft+mUnrestrictedScreenWidth;
+                    pf.bottom = df.bottom = mUnrestrictedScreenTop+mUnrestrictedScreenHeight;
+                    if (DEBUG_LAYOUT) {
+                        Log.v(TAG, String.format(
+                                    "Laying out navigation bar window: (%d,%d - %d,%d)",
+                                    pf.left, pf.top, pf.right, pf.bottom));
+                    }
                 } else {
                     pf.left = df.left = cf.left = mRestrictedScreenLeft;
                     pf.top = df.top = cf.top = mRestrictedScreenTop;
index 86d4cc3..482336b 100644 (file)
@@ -81,6 +81,8 @@ static const int kDumpLockSleep = 20000;
 
 static const nsecs_t kWarningThrottle = seconds(5);
 
+// RecordThread loop sleep time upon application overrun or audio HAL read error
+static const int kRecordThreadSleepUs = 5000;
 
 // ----------------------------------------------------------------------------
 
@@ -417,7 +419,7 @@ sp<IAudioTrack> AudioFlinger::createTrack(
             lSessionId = *sessionId;
         } else {
             // if no audio session id is provided, create one here
-            lSessionId = nextUniqueId_l();
+            lSessionId = nextUniqueId();
             if (sessionId != NULL) {
                 *sessionId = lSessionId;
             }
@@ -725,6 +727,15 @@ status_t AudioFlinger::setParameters(int ioHandle, const String8& keyValuePairs)
         thread = checkPlaybackThread_l(ioHandle);
         if (thread == NULL) {
             thread = checkRecordThread_l(ioHandle);
+        } else if (thread.get() == primaryPlaybackThread_l()) {
+            // indicate output device change to all input threads for pre processing
+            AudioParameter param = AudioParameter(keyValuePairs);
+            int value;
+            if (param.getInt(String8(AudioParameter::keyRouting), value) == NO_ERROR) {
+                for (size_t i = 0; i < mRecordThreads.size(); i++) {
+                    mRecordThreads.valueAt(i)->setParameters(keyValuePairs);
+                }
+            }
         }
     }
     if (thread != NULL) {
@@ -873,10 +884,10 @@ void AudioFlinger::removeClient_l(pid_t pid)
 
 // ----------------------------------------------------------------------------
 
-AudioFlinger::ThreadBase::ThreadBase(const sp<AudioFlinger>& audioFlinger, int id)
+AudioFlinger::ThreadBase::ThreadBase(const sp<AudioFlinger>& audioFlinger, int id, uint32_t device)
     :   Thread(false),
         mAudioFlinger(audioFlinger), mSampleRate(0), mFrameCount(0), mChannelCount(0),
-        mFrameSize(1), mFormat(0), mStandby(false), mId(id), mExiting(false)
+        mFrameSize(1), mFormat(0), mStandby(false), mId(id), mExiting(false), mDevice(device)
 {
 }
 
@@ -1032,14 +1043,15 @@ status_t AudioFlinger::ThreadBase::dumpBase(int fd, const Vector<String16>& args
     return NO_ERROR;
 }
 
-
 // ----------------------------------------------------------------------------
 
-AudioFlinger::PlaybackThread::PlaybackThread(const sp<AudioFlinger>& audioFlinger, AudioStreamOut* output, int id, uint32_t device)
-    :   ThreadBase(audioFlinger, id),
+AudioFlinger::PlaybackThread::PlaybackThread(const sp<AudioFlinger>& audioFlinger,
+                                             AudioStreamOut* output,
+                                             int id,
+                                             uint32_t device)
+    :   ThreadBase(audioFlinger, id, device),
         mMixBuffer(0), mSuspended(0), mBytesWritten(0), mOutput(output),
-        mLastWriteTime(0), mNumWrites(0), mNumDelayedWrites(0), mInWrite(false),
-        mDevice(device)
+        mLastWriteTime(0), mNumWrites(0), mNumDelayedWrites(0), mInWrite(false)
 {
     readOutputParameters();
 
@@ -1199,9 +1211,9 @@ sp<AudioFlinger::PlaybackThread::Track>  AudioFlinger::PlaybackThread::createTra
         }
     }
 
-    if (mOutput == 0) {
+    lStatus = initCheck();
+    if (lStatus != NO_ERROR) {
         LOGE("Audio driver not initialized.");
-        lStatus = NO_INIT;
         goto Exit;
     }
 
@@ -1423,7 +1435,7 @@ status_t AudioFlinger::PlaybackThread::getRenderPosition(uint32_t *halFrames, ui
     if (halFrames == 0 || dspFrames == 0) {
         return BAD_VALUE;
     }
-    if (mOutput == 0) {
+    if (initCheck() != NO_ERROR) {
         return INVALID_OPERATION;
     }
     *halFrames = mBytesWritten / audio_stream_frame_size(&mOutput->stream->common);
@@ -1468,34 +1480,6 @@ uint32_t AudioFlinger::PlaybackThread::getStrategyForSession_l(int sessionId)
     return AudioSystem::getStrategyForStream(AUDIO_STREAM_MUSIC);
 }
 
-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);
-    }
-}
 
 // ----------------------------------------------------------------------------
 
@@ -1503,7 +1487,7 @@ AudioFlinger::MixerThread::MixerThread(const sp<AudioFlinger>& audioFlinger, Aud
     :   PlaybackThread(audioFlinger, output, id, device),
         mAudioMixer(0)
 {
-    mType = PlaybackThread::MIXER;
+    mType = ThreadBase::MIXER;
     mAudioMixer = new AudioMixer(mFrameCount, mSampleRate);
 
     // FIXME - Current mixer implementation only supports stereo output
@@ -2072,7 +2056,7 @@ uint32_t AudioFlinger::MixerThread::suspendSleepTimeUs()
 AudioFlinger::DirectOutputThread::DirectOutputThread(const sp<AudioFlinger>& audioFlinger, AudioStreamOut* output, int id, uint32_t device)
     :   PlaybackThread(audioFlinger, output, id, device)
 {
-    mType = PlaybackThread::DIRECT;
+    mType = ThreadBase::DIRECT;
 }
 
 AudioFlinger::DirectOutputThread::~DirectOutputThread()
@@ -2551,7 +2535,7 @@ uint32_t AudioFlinger::DirectOutputThread::suspendSleepTimeUs()
 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;
+    mType = ThreadBase::DUPLICATING;
     addOutputTrack(mainThread);
 }
 
@@ -3751,21 +3735,26 @@ sp<IAudioRecord> AudioFlinger::openRecord(
         if (sessionId != NULL && *sessionId != AUDIO_SESSION_OUTPUT_MIX) {
             lSessionId = *sessionId;
         } else {
-            lSessionId = nextUniqueId_l();
+            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, channelMask, frameCount, flags, lSessionId);
-    }
-    if (recordTrack->getCblk() == NULL) {
+        recordTrack = thread->createRecordTrack_l(client,
+                                                sampleRate,
+                                                format,
+                                                channelMask,
+                                                frameCount,
+                                                flags,
+                                                lSessionId,
+                                                &lStatus);
+    }
+    if (lStatus != NO_ERROR) {
         // 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;
     }
 
@@ -3814,10 +3803,16 @@ status_t AudioFlinger::RecordHandle::onTransact(
 
 // ----------------------------------------------------------------------------
 
-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)
+AudioFlinger::RecordThread::RecordThread(const sp<AudioFlinger>& audioFlinger,
+                                         AudioStreamIn *input,
+                                         uint32_t sampleRate,
+                                         uint32_t channels,
+                                         int id,
+                                         uint32_t device) :
+    ThreadBase(audioFlinger, id, device),
+    mInput(input), mTrack(NULL), mResampler(0), mRsmpOutBuffer(0), mRsmpInBuffer(0)
 {
+    mType = ThreadBase::RECORD;
     mReqChannelCount = popcount(channels);
     mReqSampleRate = sampleRate;
     readInputParameters();
@@ -3847,6 +3842,7 @@ bool AudioFlinger::RecordThread::threadLoop()
 {
     AudioBufferProvider::Buffer buffer;
     sp<RecordTrack> activeTrack;
+    Vector< sp<EffectChain> > effectChains;
 
     nsecs_t lastWarning = 0;
 
@@ -3897,14 +3893,22 @@ bool AudioFlinger::RecordThread::threadLoop()
                     mStandby = false;
                 }
             }
+            lockEffectChains_l(effectChains);
         }
 
         if (mActiveTrack != 0) {
             if (mActiveTrack->mState != TrackBase::ACTIVE &&
                 mActiveTrack->mState != TrackBase::RESUMING) {
-                usleep(5000);
+                unlockEffectChains(effectChains);
+                usleep(kRecordThreadSleepUs);
                 continue;
             }
+            for (size_t i = 0; i < effectChains.size(); i ++) {
+                effectChains[i]->process_l();
+            }
+            // enable changes in effect chain
+            unlockEffectChains(effectChains);
+
             buffer.frameCount = mFrameCount;
             if (LIKELY(mActiveTrack->getNextBuffer(&buffer) == NO_ERROR)) {
                 size_t framesOut = buffer.frameCount;
@@ -3953,7 +3957,7 @@ bool AudioFlinger::RecordThread::threadLoop()
                                     // Force input into standby so that it tries to
                                     // recover at next read attempt
                                     mInput->stream->common.standby(&mInput->stream->common);
-                                    usleep(5000);
+                                    usleep(kRecordThreadSleepUs);
                                 }
                                 mRsmpInIndex = mFrameCount;
                                 framesOut = 0;
@@ -4001,9 +4005,12 @@ bool AudioFlinger::RecordThread::threadLoop()
                 // 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);
+                usleep(kRecordThreadSleepUs);
             }
+        } else {
+            unlockEffectChains(effectChains);
         }
+        effectChains.clear();
     }
 
     if (!mStandby) {
@@ -4017,6 +4024,49 @@ bool AudioFlinger::RecordThread::threadLoop()
     return false;
 }
 
+
+sp<AudioFlinger::RecordThread::RecordTrack>  AudioFlinger::RecordThread::createRecordTrack_l(
+        const sp<AudioFlinger::Client>& client,
+        uint32_t sampleRate,
+        int format,
+        int channelMask,
+        int frameCount,
+        uint32_t flags,
+        int sessionId,
+        status_t *status)
+{
+    sp<RecordTrack> track;
+    status_t lStatus;
+
+    lStatus = initCheck();
+    if (lStatus != NO_ERROR) {
+        LOGE("Audio driver not initialized.");
+        goto Exit;
+    }
+
+    { // scope for mLock
+        Mutex::Autolock _l(mLock);
+
+        track = new RecordTrack(this, client, sampleRate,
+                      format, channelMask, frameCount, flags, sessionId);
+
+        if (track->getCblk() == NULL) {
+            lStatus = NO_MEMORY;
+            goto Exit;
+        }
+
+        mTrack = track.get();
+
+    }
+    lStatus = NO_ERROR;
+
+Exit:
+    if (status) {
+        *status = lStatus;
+    }
+    return track;
+}
+
 status_t AudioFlinger::RecordThread::start(RecordThread::RecordTrack* recordTrack)
 {
     LOGV("RecordThread::start");
@@ -4146,7 +4196,7 @@ status_t AudioFlinger::RecordThread::getNextBuffer(AudioBufferProvider::Buffer*
                 // Force input into standby so that it tries to
                 // recover at next read attempt
                 mInput->stream->common.standby(&mInput->stream->common);
-                usleep(5000);
+                usleep(kRecordThreadSleepUs);
             }
             buffer->raw = 0;
             buffer->frameCount = 0;
@@ -4211,6 +4261,23 @@ bool AudioFlinger::RecordThread::checkForNewParameters_l()
                 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.
+            for (size_t i = 0; i < mEffectChains.size(); i++) {
+                mEffectChains[i]->setDevice_l(value);
+            }
+            // store input device and output device but do not forward output device to audio HAL.
+            // Note that status is ignored by the caller for output device
+            // (see AudioFlinger::setParameters()
+            if (value & AUDIO_DEVICE_OUT_ALL) {
+                mDevice &= (uint32_t)~(value & AUDIO_DEVICE_OUT_ALL);
+                status = BAD_VALUE;
+            } else {
+                mDevice &= (uint32_t)~(value & AUDIO_DEVICE_IN_ALL);
+            }
+            mDevice |= (uint32_t)value;
+        }
         if (status == NO_ERROR) {
             status = mInput->stream->common.set_parameters(&mInput->stream->common, keyValuePair.string());
             if (status == INVALID_OPERATION) {
@@ -4320,6 +4387,21 @@ unsigned int AudioFlinger::RecordThread::getInputFramesLost()
     return mInput->stream->get_input_frames_lost(mInput->stream);
 }
 
+uint32_t AudioFlinger::RecordThread::hasAudioSession(int sessionId)
+{
+    Mutex::Autolock _l(mLock);
+    uint32_t result = 0;
+    if (getEffectChain_l(sessionId) != 0) {
+        result = EFFECT_SESSION;
+    }
+
+    if (mTrack != NULL && sessionId == mTrack->sessionId()) {
+        result |= TRACK_SESSION;
+    }
+
+    return result;
+}
+
 // ----------------------------------------------------------------------------
 
 int AudioFlinger::openOutput(uint32_t *pDevices,
@@ -4368,7 +4450,7 @@ int AudioFlinger::openOutput(uint32_t *pDevices,
     mHardwareStatus = AUDIO_HW_IDLE;
     if (outStream != NULL) {
         AudioStreamOut *output = new AudioStreamOut(outHwDev, outStream);
-        int id = nextUniqueId_l();
+        int id = nextUniqueId();
 
         if ((flags & AUDIO_POLICY_OUTPUT_FLAG_DIRECT) ||
             (format != AUDIO_FORMAT_PCM_16_BIT) ||
@@ -4405,7 +4487,7 @@ int AudioFlinger::openDuplicateOutput(int output1, int output2)
         return 0;
     }
 
-    int id = nextUniqueId_l();
+    int id = nextUniqueId();
     DuplicatingThread *thread = new DuplicatingThread(this, thread1, id);
     thread->addOutputTrack(thread2);
     mPlaybackThreads.add(id, thread);
@@ -4428,9 +4510,9 @@ status_t AudioFlinger::closeOutput(int output)
 
         LOGV("closeOutput() %d", output);
 
-        if (thread->type() == PlaybackThread::MIXER) {
+        if (thread->type() == ThreadBase::MIXER) {
             for (size_t i = 0; i < mPlaybackThreads.size(); i++) {
-                if (mPlaybackThreads.valueAt(i)->type() == PlaybackThread::DUPLICATING) {
+                if (mPlaybackThreads.valueAt(i)->type() == ThreadBase::DUPLICATING) {
                     DuplicatingThread *dupThread = (DuplicatingThread *)mPlaybackThreads.valueAt(i).get();
                     dupThread->removeOutputTrack((MixerThread *)thread.get());
                 }
@@ -4442,7 +4524,7 @@ status_t AudioFlinger::closeOutput(int output)
     }
     thread->exit();
 
-    if (thread->type() != PlaybackThread::DUPLICATING) {
+    if (thread->type() != ThreadBase::DUPLICATING) {
         AudioStreamOut *out = thread->getOutput();
         out->hwDev->close_output_stream(out->hwDev, out->stream);
         delete out;
@@ -4537,9 +4619,17 @@ int AudioFlinger::openInput(uint32_t *pDevices,
     if (inStream != NULL) {
         AudioStreamIn *input = new AudioStreamIn(inHwDev, inStream);
 
-        int id = nextUniqueId_l();
-         // Start record thread
-        thread = new RecordThread(this, input, reqSamplingRate, reqChannels, id);
+        int id = nextUniqueId();
+        // Start record thread
+        // RecorThread require both input and output device indication to forward to audio
+        // pre processing modules
+        uint32_t device = (*pDevices) | primaryOutputDevice_l();
+        thread = new RecordThread(this,
+                                  input,
+                                  reqSamplingRate,
+                                  reqChannels,
+                                  id,
+                                  device);
         mRecordThreads.add(id, thread);
         LOGV("openInput() created record thread: ID %d thread %p", id, thread);
         if (pSamplingRate) *pSamplingRate = reqSamplingRate;
@@ -4597,7 +4687,7 @@ status_t AudioFlinger::setStreamOutput(uint32_t stream, int output)
     for (size_t i = 0; i < mPlaybackThreads.size(); i++) {
         PlaybackThread *thread = mPlaybackThreads.valueAt(i).get();
         if (thread != dstThread &&
-            thread->type() != PlaybackThread::DIRECT) {
+            thread->type() != ThreadBase::DIRECT) {
             MixerThread *srcThread = (MixerThread *)thread;
             srcThread->invalidateTracks(stream);
         }
@@ -4609,8 +4699,7 @@ status_t AudioFlinger::setStreamOutput(uint32_t stream, int output)
 
 int AudioFlinger::newAudioSessionId()
 {
-    AutoMutex _l(mLock);
-    return nextUniqueId_l();
+    return nextUniqueId();
 }
 
 // checkPlaybackThread_l() must be called with AudioFlinger::mLock held
@@ -4628,7 +4717,7 @@ AudioFlinger::MixerThread *AudioFlinger::checkMixerThread_l(int output) const
 {
     PlaybackThread *thread = checkPlaybackThread_l(output);
     if (thread != NULL) {
-        if (thread->type() == PlaybackThread::DIRECT) {
+        if (thread->type() == ThreadBase::DIRECT) {
             thread = NULL;
         }
     }
@@ -4645,12 +4734,34 @@ AudioFlinger::RecordThread *AudioFlinger::checkRecordThread_l(int input) const
     return thread;
 }
 
-// nextUniqueId_l() must be called with AudioFlinger::mLock held
-int AudioFlinger::nextUniqueId_l()
+uint32_t AudioFlinger::nextUniqueId()
+{
+    return android_atomic_inc(&mNextUniqueId);
+}
+
+AudioFlinger::PlaybackThread *AudioFlinger::primaryPlaybackThread_l()
 {
-    return mNextUniqueId++;
+    for (size_t i = 0; i < mPlaybackThreads.size(); i++) {
+        PlaybackThread *thread = mPlaybackThreads.valueAt(i).get();
+        if (thread->getOutput()->hwDev == mPrimaryHardwareDev) {
+            return thread;
+        }
+    }
+    return NULL;
+}
+
+uint32_t AudioFlinger::primaryOutputDevice_l()
+{
+    PlaybackThread *thread = primaryPlaybackThread_l();
+
+    if (thread == NULL) {
+        return 0;
+    }
+
+    return thread->device();
 }
 
+
 // ----------------------------------------------------------------------------
 //  Effect management
 // ----------------------------------------------------------------------------
@@ -4683,7 +4794,7 @@ sp<IEffect> AudioFlinger::createEffect(pid_t pid,
         effect_descriptor_t *pDesc,
         const sp<IEffectClient>& effectClient,
         int32_t priority,
-        int output,
+        int io,
         int sessionId,
         status_t *status,
         int *id,
@@ -4695,8 +4806,8 @@ sp<IEffect> AudioFlinger::createEffect(pid_t pid,
     sp<Client> client;
     wp<Client> wclient;
 
-    LOGV("createEffect pid %d, client %p, priority %d, sessionId %d, output %d",
-            pid, effectClient.get(), priority, sessionId, output);
+    LOGV("createEffect pid %d, client %p, priority %d, sessionId %d, io %d",
+            pid, effectClient.get(), priority, sessionId, io);
 
     if (pDesc == NULL) {
         lStatus = BAD_VALUE;
@@ -4724,7 +4835,7 @@ sp<IEffect> AudioFlinger::createEffect(pid_t pid,
         goto Exit;
     }
 
-    if (output == 0) {
+    if (io == 0) {
         if (sessionId == AUDIO_SESSION_OUTPUT_STAGE) {
             // output must be specified by AudioPolicyManager when using session
             // AUDIO_SESSION_OUTPUT_STAGE
@@ -4732,9 +4843,9 @@ sp<IEffect> AudioFlinger::createEffect(pid_t pid,
             goto Exit;
         } else if (sessionId == AUDIO_SESSION_OUTPUT_MIX) {
             // if the output returned by getOutputForEffect() is removed before we lock the
-            // mutex below, the call to checkPlaybackThread_l(output) below will detect it
+            // mutex below, the call to checkPlaybackThread_l(io) below will detect it
             // and we will exit safely
-            output = AudioSystem::getOutputForEffect(&desc);
+            io = AudioSystem::getOutputForEffect(&desc);
         }
     }
 
@@ -4811,31 +4922,41 @@ sp<IEffect> AudioFlinger::createEffect(pid_t pid,
         // output threads.
         // If output is 0 here, sessionId is neither SESSION_OUTPUT_STAGE nor SESSION_OUTPUT_MIX
         // because of code checking output when entering the function.
-        if (output == 0) {
+        // Note: io is never 0 when creating an effect on an input
+        if (io == 0) {
              // 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) != 0) {
-                    output = mPlaybackThreads.keyAt(i);
+                    io = mPlaybackThreads.keyAt(i);
                     break;
                 }
             }
+            if (io == 0) {
+               for (size_t i = 0; i < mRecordThreads.size(); i++) {
+                   if (mRecordThreads.valueAt(i)->hasAudioSession(sessionId) != 0) {
+                       io = mRecordThreads.keyAt(i);
+                       break;
+                   }
+               }
+            }
             // If no output thread contains the requested session ID, default to
             // first output. The effect chain will be moved to the correct output
             // thread when a track with the same session ID is created
-            if (output == 0 && mPlaybackThreads.size()) {
-                output = mPlaybackThreads.keyAt(0);
+            if (io == 0 && mPlaybackThreads.size()) {
+                io = mPlaybackThreads.keyAt(0);
             }
+            LOGV("createEffect() got io %d for effect %s", io, desc.name);
         }
-        LOGV("createEffect() got output %d for effect %s", output, desc.name);
-        PlaybackThread *thread = checkPlaybackThread_l(output);
+        ThreadBase *thread = checkRecordThread_l(io);
         if (thread == NULL) {
-            LOGE("createEffect() unknown output thread");
-            lStatus = BAD_VALUE;
-            goto Exit;
+            thread = checkPlaybackThread_l(io);
+            if (thread == NULL) {
+                LOGE("createEffect() unknown output thread");
+                lStatus = BAD_VALUE;
+                goto Exit;
+            }
         }
 
-        // TODO: allow attachment of effect to inputs
-
         wclient = mClients.valueFor(pid);
 
         if (wclient != NULL) {
@@ -4943,8 +5064,9 @@ status_t AudioFlinger::moveEffectChain_l(int session,
     return NO_ERROR;
 }
 
+
 // PlaybackThread::createEffect_l() must be called with AudioFlinger::mLock held
-sp<AudioFlinger::EffectHandle> AudioFlinger::PlaybackThread::createEffect_l(
+sp<AudioFlinger::EffectHandle> AudioFlinger::ThreadBase::createEffect_l(
         const sp<AudioFlinger::Client>& client,
         const sp<IEffectClient>& effectClient,
         int32_t priority,
@@ -4957,24 +5079,14 @@ sp<AudioFlinger::EffectHandle> AudioFlinger::PlaybackThread::createEffect_l(
     sp<EffectModule> effect;
     sp<EffectHandle> handle;
     status_t lStatus;
-    sp<Track> track;
     sp<EffectChain> chain;
     bool chainCreated = false;
     bool effectCreated = false;
     bool effectRegistered = false;
 
-    if (mOutput == 0) {
+    lStatus = initCheck();
+    if (lStatus != NO_ERROR) {
         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 != AUDIO_SESSION_OUTPUT_MIX) {
-        LOGW("createEffect_l() Cannot add auxiliary effect %s to session %d",
-                desc->name, sessionId);
-        lStatus = BAD_VALUE;
         goto Exit;
     }
 
@@ -4986,6 +5098,16 @@ sp<AudioFlinger::EffectHandle> AudioFlinger::PlaybackThread::createEffect_l(
         lStatus = BAD_VALUE;
         goto Exit;
     }
+    // Only Pre processor effects are allowed on input threads and only on input threads
+    if ((mType == RECORD &&
+            (desc->flags & EFFECT_FLAG_TYPE_MASK) != EFFECT_FLAG_TYPE_PRE_PROC) ||
+            (mType != RECORD &&
+                    (desc->flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_PRE_PROC)) {
+        LOGW("createEffect_l() effect %s (flags %08x) created on wrong thread type %d",
+                desc->name, desc->flags, mType);
+        lStatus = BAD_VALUE;
+        goto Exit;
+    }
 
     LOGV("createEffect_l() thread %p effect %s on session %d", this, desc->name, sessionId);
 
@@ -5008,7 +5130,7 @@ sp<AudioFlinger::EffectHandle> AudioFlinger::PlaybackThread::createEffect_l(
         LOGV("createEffect_l() got effect %p on chain %p", effect == 0 ? 0 : effect.get(), chain.get());
 
         if (effect == 0) {
-            int id = mAudioFlinger->nextUniqueId_l();
+            int id = mAudioFlinger->nextUniqueId();
             // Check CPU and memory usage
             lStatus = AudioSystem::registerEffect(desc, mId, chain->strategy(), sessionId, id);
             if (lStatus != NO_ERROR) {
@@ -5059,9 +5181,20 @@ Exit:
     return handle;
 }
 
+sp<AudioFlinger::EffectModule> AudioFlinger::ThreadBase::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;
+}
+
 // PlaybackThread::addEffect_l() must be called with AudioFlinger::mLock and
 // PlaybackThread::mLock held
-status_t AudioFlinger::PlaybackThread::addEffect_l(const sp<EffectModule>& effect)
+status_t AudioFlinger::ThreadBase::addEffect_l(const sp<EffectModule>& effect)
 {
     // check for existing effect chain with the requested audio session
     int sessionId = effect->sessionId();
@@ -5097,7 +5230,7 @@ status_t AudioFlinger::PlaybackThread::addEffect_l(const sp<EffectModule>& effec
     return NO_ERROR;
 }
 
-void AudioFlinger::PlaybackThread::removeEffect_l(const sp<EffectModule>& effect) {
+void AudioFlinger::ThreadBase::removeEffect_l(const sp<EffectModule>& effect) {
 
     LOGV("removeEffect_l() %p effect %p", this, effect.get());
     effect_descriptor_t desc = effect->desc();
@@ -5116,7 +5249,53 @@ void AudioFlinger::PlaybackThread::removeEffect_l(const sp<EffectModule>& effect
     }
 }
 
-void AudioFlinger::PlaybackThread::disconnectEffect(const sp<EffectModule>& effect,
+void AudioFlinger::ThreadBase::lockEffectChains_l(
+        Vector<sp <AudioFlinger::EffectChain> >& effectChains)
+{
+    effectChains = mEffectChains;
+    for (size_t i = 0; i < mEffectChains.size(); i++) {
+        mEffectChains[i]->lock();
+    }
+}
+
+void AudioFlinger::ThreadBase::unlockEffectChains(
+        Vector<sp <AudioFlinger::EffectChain> >& effectChains)
+{
+    for (size_t i = 0; i < effectChains.size(); i++) {
+        effectChains[i]->unlock();
+    }
+}
+
+sp<AudioFlinger::EffectChain> AudioFlinger::ThreadBase::getEffectChain(int sessionId)
+{
+    Mutex::Autolock _l(mLock);
+    return getEffectChain_l(sessionId);
+}
+
+sp<AudioFlinger::EffectChain> AudioFlinger::ThreadBase::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::ThreadBase::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);
+    }
+}
+
+void AudioFlinger::ThreadBase::disconnectEffect(const sp<EffectModule>& effect,
                                                     const wp<EffectHandle>& handle) {
     Mutex::Autolock _l(mLock);
     LOGV("disconnectEffect() %p effect %p", this, effect.get());
@@ -5222,35 +5401,6 @@ size_t AudioFlinger::PlaybackThread::removeEffectChain_l(const sp<EffectChain>&
     return mEffectChains.size();
 }
 
-void AudioFlinger::PlaybackThread::lockEffectChains_l(
-        Vector<sp <AudioFlinger::EffectChain> >& effectChains)
-{
-    effectChains = mEffectChains;
-    for (size_t i = 0; i < mEffectChains.size(); i++) {
-        mEffectChains[i]->lock();
-    }
-}
-
-void AudioFlinger::PlaybackThread::unlockEffectChains(
-        Vector<sp <AudioFlinger::EffectChain> >& effectChains)
-{
-    for (size_t i = 0; i < effectChains.size(); i++) {
-        effectChains[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)
 {
@@ -5291,6 +5441,34 @@ void AudioFlinger::PlaybackThread::detachAuxEffect_l(int effectId)
     }
 }
 
+status_t AudioFlinger::RecordThread::addEffectChain_l(const sp<EffectChain>& chain)
+{
+    // only one chain per input thread
+    if (mEffectChains.size() != 0) {
+        return INVALID_OPERATION;
+    }
+    LOGV("addEffectChain_l() %p on thread %p", chain.get(), this);
+
+    chain->setInBuffer(NULL);
+    chain->setOutBuffer(NULL);
+
+    mEffectChains.add(chain);
+
+    return NO_ERROR;
+}
+
+size_t AudioFlinger::RecordThread::removeEffectChain_l(const sp<EffectChain>& chain)
+{
+    LOGV("removeEffectChain_l() %p from thread %p", chain.get(), this);
+    LOGW_IF(mEffectChains.size() != 1,
+            "removeEffectChain_l() %p invalid chain size %d on thread %p",
+            chain.get(), mEffectChains.size(), this);
+    if (mEffectChains.size() == 1) {
+        mEffectChains.removeAt(0);
+    }
+    return 0;
+}
+
 // ----------------------------------------------------------------------------
 //  EffectModule implementation
 // ----------------------------------------------------------------------------
@@ -5312,12 +5490,11 @@ AudioFlinger::EffectModule::EffectModule(const wp<ThreadBase>& wThread,
     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);
+    mStatus = EffectCreate(&desc->uuid, sessionId, thread->id(), &mEffectInterface);
 
     if (mStatus != NO_ERROR) {
         return;
@@ -5340,6 +5517,13 @@ AudioFlinger::EffectModule::~EffectModule()
 {
     LOGV("Destructor %p", this);
     if (mEffectInterface != NULL) {
+        if ((mDescriptor.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_PRE_PROC ||
+                (mDescriptor.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_POST_PROC) {
+            sp<ThreadBase> thread = mThread.promote();
+            if (thread != 0) {
+                thread->stream()->remove_audio_effect(thread->stream(), mEffectInterface);
+            }
+        }
         // release effect engine
         EffectRelease(mEffectInterface);
     }
@@ -5415,8 +5599,7 @@ void AudioFlinger::EffectModule::disconnect(const wp<EffectHandle>& handle)
     {
         sp<ThreadBase> thread = mThread.promote();
         if (thread != 0) {
-            PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
-            playbackThread->disconnectEffect(keep, handle);
+            thread->disconnectEffect(keep, handle);
         }
     }
 }
@@ -5626,6 +5809,14 @@ status_t AudioFlinger::EffectModule::start_l()
     if (status == 0) {
         status = cmdStatus;
     }
+    if (status == 0 &&
+            ((mDescriptor.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_PRE_PROC ||
+             (mDescriptor.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_POST_PROC)) {
+        sp<ThreadBase> thread = mThread.promote();
+        if (thread != 0) {
+            thread->stream()->add_audio_effect(thread->stream(), mEffectInterface);
+        }
+    }
     return status;
 }
 
@@ -5645,6 +5836,14 @@ status_t AudioFlinger::EffectModule::stop_l()
     if (status == 0) {
         status = cmdStatus;
     }
+    if (status == 0 &&
+            ((mDescriptor.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_PRE_PROC ||
+             (mDescriptor.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_POST_PROC)) {
+        sp<ThreadBase> thread = mThread.promote();
+        if (thread != 0) {
+            thread->stream()->remove_audio_effect(thread->stream(), mEffectInterface);
+        }
+    }
     return status;
 }
 
@@ -5784,17 +5983,41 @@ 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) {
-        status_t cmdStatus;
-        uint32_t size = sizeof(status_t);
-        status = (*mEffectInterface)->command(mEffectInterface,
-                                              EFFECT_CMD_SET_DEVICE,
-                                              sizeof(uint32_t),
-                                              &device,
-                                              &size,
-                                              &cmdStatus);
-        if (status == NO_ERROR) {
-            status = cmdStatus;
+    if (device && (mDescriptor.flags & EFFECT_FLAG_DEVICE_MASK) == EFFECT_FLAG_DEVICE_IND) {
+        // audio pre processing modules on RecordThread can receive both output and
+        // input device indication in the same call
+        uint32_t dev = device & AUDIO_DEVICE_OUT_ALL;
+        if (dev) {
+            status_t cmdStatus;
+            uint32_t size = sizeof(status_t);
+
+            status = (*mEffectInterface)->command(mEffectInterface,
+                                                  EFFECT_CMD_SET_DEVICE,
+                                                  sizeof(uint32_t),
+                                                  &dev,
+                                                  &size,
+                                                  &cmdStatus);
+            if (status == NO_ERROR) {
+                status = cmdStatus;
+            }
+        }
+        dev = device & AUDIO_DEVICE_IN_ALL;
+        if (dev) {
+            status_t cmdStatus;
+            uint32_t size = sizeof(status_t);
+
+            status_t status2 = (*mEffectInterface)->command(mEffectInterface,
+                                                  EFFECT_CMD_SET_INPUT_DEVICE,
+                                                  sizeof(uint32_t),
+                                                  &dev,
+                                                  &size,
+                                                  &cmdStatus);
+            if (status2 == NO_ERROR) {
+                status2 = cmdStatus;
+            }
+            if (status == NO_ERROR) {
+                status = status2;
+            }
         }
     }
     return status;
@@ -6168,7 +6391,6 @@ void AudioFlinger::EffectChain::process_l()
         LOGW("process_l(): cannot promote mixer thread");
         return;
     }
-    PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
     bool isGlobalSession = (mSessionId == AUDIO_SESSION_OUTPUT_MIX) ||
             (mSessionId == AUDIO_SESSION_OUTPUT_STAGE);
     bool tracksOnSession = false;
@@ -6180,7 +6402,7 @@ void AudioFlinger::EffectChain::process_l()
     // will not do it
     if (tracksOnSession &&
             activeTrackCnt() == 0) {
-        size_t numSamples = playbackThread->frameCount() * playbackThread->channelCount();
+        size_t numSamples = thread->frameCount() * thread->channelCount();
         memset(mInBuffer, 0, numSamples * sizeof(int16_t));
     }
 
index 1fad987..fff4f06 100644 (file)
@@ -157,7 +157,7 @@ public:
                         effect_descriptor_t *pDesc,
                         const sp<IEffectClient>& effectClient,
                         int32_t priority,
-                        int output,
+                        int io,
                         int sessionId,
                         status_t *status,
                         int *id,
@@ -273,9 +273,17 @@ private:
 
     class ThreadBase : public Thread {
     public:
-        ThreadBase (const sp<AudioFlinger>& audioFlinger, int id);
+        ThreadBase (const sp<AudioFlinger>& audioFlinger, int id, uint32_t device);
         virtual             ~ThreadBase();
 
+
+        enum type {
+            MIXER,              // Thread class is MixerThread
+            DIRECT,             // Thread class is DirectOutputThread
+            DUPLICATING,        // Thread class is DuplicatingThread
+            RECORD              // Thread class is RecordThread
+        };
+
         status_t dumpBase(int fd, const Vector<String16>& args);
 
         // base for record and playback
@@ -377,6 +385,8 @@ private:
             int mParam;
         };
 
+        virtual     status_t    initCheck() const = 0;
+                    int         type() const { return mType; }
                     uint32_t    sampleRate() const;
                     int         channelCount() const;
                     uint32_t    format() const;
@@ -392,6 +402,60 @@ private:
                     void        processConfigEvents();
                     int         id() const { return mId;}
                     bool        standby() { return mStandby; }
+                    uint32_t    device() { return mDevice; }
+        virtual     audio_stream_t* stream() = 0;
+
+                    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);
+
+                    // return values for hasAudioSession (bit field)
+                    enum effect_state {
+                        EFFECT_SESSION = 0x1,   // the audio session corresponds to at least one
+                                                // effect
+                        TRACK_SESSION = 0x2     // the audio session corresponds to at least one
+                                                // track
+                    };
+
+                    // get effect chain corresponding to session Id.
+                    sp<EffectChain> getEffectChain(int sessionId);
+                    // same as getEffectChain() but must be called with ThreadBase mutex locked
+                    sp<EffectChain> getEffectChain_l(int sessionId);
+                    // add an effect chain to the chain list (mEffectChains)
+        virtual     status_t addEffectChain_l(const sp<EffectChain>& chain) = 0;
+                    // remove an effect chain from the chain list (mEffectChains)
+        virtual     size_t removeEffectChain_l(const sp<EffectChain>& chain) = 0;
+                    // lock mall effect chains Mutexes. Must be called before releasing the
+                    // ThreadBase mutex before processing the mixer and effects. This guarantees the
+                    // integrity of the chains during the process.
+                    void lockEffectChains_l(Vector<sp <EffectChain> >& effectChains);
+                    // unlock effect chains after process
+                    void unlockEffectChains(Vector<sp <EffectChain> >& effectChains);
+                    // set audio mode to all effect chains
+                    void setMode(uint32_t mode);
+                    // get effect module with corresponding ID on specified audio session
+                    sp<AudioFlinger::EffectModule> getEffect_l(int sessionId, int effectId);
+                    // add and effect module. Also creates the effect chain is none exists for
+                    // the effects audio session
+                    status_t addEffect_l(const sp< EffectModule>& effect);
+                    // remove and effect module. Also removes the effect chain is this was the last
+                    // effect
+                    void removeEffect_l(const sp< EffectModule>& effect);
+                    // detach all tracks connected to an auxiliary effect
+        virtual     void detachAuxEffect_l(int effectId) {}
+                    // returns either EFFECT_SESSION if effects on this audio session exist in one
+                    // chain, or TRACK_SESSION if tracks on this audio session exist, or both
+                    virtual uint32_t hasAudioSession(int sessionId) = 0;
+                    // the value returned by default implementation is not important as the
+                    // strategy is only meaningful for PlaybackThread which implements this method
+                    virtual uint32_t getStrategyForSession_l(int sessionId) { return 0; }
 
         mutable     Mutex                   mLock;
 
@@ -406,6 +470,7 @@ private:
         friend class RecordThread;
         friend class RecordTrack;
 
+                    int                     mType;
                     Condition               mWaitWorkCV;
                     sp<AudioFlinger>        mAudioFlinger;
                     uint32_t                mSampleRate;
@@ -421,18 +486,15 @@ private:
                     bool                    mStandby;
                     int                     mId;
                     bool                    mExiting;
+                    Vector< sp<EffectChain> > mEffectChains;
+                    uint32_t                mDevice;    // output device for PlaybackThread
+                                                        // input + output devices for RecordThread
     };
 
     // --- PlaybackThread ---
     class PlaybackThread : public ThreadBase {
     public:
 
-        enum type {
-            MIXER,
-            DIRECT,
-            DUPLICATING
-        };
-
         enum mixer_state {
             MIXER_IDLE,
             MIXER_TRACKS_ENABLED,
@@ -569,6 +631,8 @@ private:
         virtual     status_t    readyToRun();
         virtual     void        onFirstRef();
 
+        virtual     status_t    initCheck() const { return (mOutput == 0) ? NO_INIT : NO_ERROR; }
+
         virtual     uint32_t    latency() const;
 
         virtual     status_t    setMasterVolume(float value);
@@ -595,8 +659,8 @@ private:
                                     status_t *status);
 
                     AudioStreamOut* getOutput() { return mOutput; }
+                    virtual audio_stream_t* stream() { return &mOutput->stream->common; }
 
-        virtual     int         type() const { return mType; }
                     void        suspend() { mSuspended++; }
                     void        restore() { if (mSuspended) mSuspended--; }
                     bool        isSuspended() { return (mSuspended != 0); }
@@ -605,45 +669,16 @@ private:
         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);
-
-                    // return values for hasAudioSession (bit field)
-                    enum effect_state {
-                        EFFECT_SESSION = 0x1,   // the audio session corresponds to at least one
-                                                // effect
-                        TRACK_SESSION = 0x2     // the audio session corresponds to at least one
-                                                // track
-                    };
-
-                    uint32_t 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(Vector<sp <EffectChain> >& effectChains);
-                    void unlockEffectChains(Vector<sp <EffectChain> >& effectChains);
-
-                    sp<AudioFlinger::EffectModule> getEffect_l(int sessionId, int effectId);
-                    void detachAuxEffect_l(int effectId);
+        virtual     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);
 
-                    status_t addEffect_l(const sp< EffectModule>& effect);
-                    void removeEffect_l(const sp< EffectModule>& effect);
-
-                    uint32_t getStrategyForSession_l(int sessionId);
+                    virtual status_t addEffectChain_l(const sp<EffectChain>& chain);
+                    virtual size_t removeEffectChain_l(const sp<EffectChain>& chain);
+                    virtual uint32_t hasAudioSession(int sessionId);
+                    virtual uint32_t getStrategyForSession_l(int sessionId);
 
         struct  stream_type_t {
             stream_type_t()
@@ -656,7 +691,6 @@ private:
         };
 
     protected:
-        int                             mType;
         int16_t*                        mMixBuffer;
         int                             mSuspended;
         int                             mBytesWritten;
@@ -688,8 +722,6 @@ private:
 
         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);
@@ -703,8 +735,6 @@ private:
         int                             mNumWrites;
         int                             mNumDelayedWrites;
         bool                            mInWrite;
-        Vector< sp<EffectChain> >       mEffectChains;
-        uint32_t                        mDevice;
     };
 
     class MixerThread : public PlaybackThread {
@@ -788,11 +818,13 @@ private:
               float streamVolumeInternal(int stream) const { return mStreamTypes[stream].volume; }
               void audioConfigChanged_l(int event, int ioHandle, void *param2);
 
-              int  nextUniqueId_l();
+              uint32_t nextUniqueId();
               status_t moveEffectChain_l(int session,
                                      AudioFlinger::PlaybackThread *srcThread,
                                      AudioFlinger::PlaybackThread *dstThread,
                                      bool reRegister);
+              PlaybackThread *primaryPlaybackThread_l();
+              uint32_t primaryOutputDevice_l();
 
     friend class AudioBuffer;
 
@@ -864,18 +896,33 @@ private:
                         AudioStreamIn *input,
                         uint32_t sampleRate,
                         uint32_t channels,
-                        int id);
+                        int id,
+                        uint32_t device);
                 ~RecordThread();
 
         virtual bool        threadLoop();
         virtual status_t    readyToRun() { return NO_ERROR; }
         virtual void        onFirstRef();
 
+        virtual status_t    initCheck() const { return (mInput == 0) ? NO_INIT : NO_ERROR; }
+                sp<AudioFlinger::RecordThread::RecordTrack>  createRecordTrack_l(
+                        const sp<AudioFlinger::Client>& client,
+                        uint32_t sampleRate,
+                        int format,
+                        int channelMask,
+                        int frameCount,
+                        uint32_t flags,
+                        int sessionId,
+                        status_t *status);
+
                 status_t    start(RecordTrack* recordTrack);
                 void        stop(RecordTrack* recordTrack);
                 status_t    dump(int fd, const Vector<String16>& args);
                 AudioStreamIn* getInput() { return mInput; }
+                virtual audio_stream_t* stream() { return &mInput->stream->common; }
+
 
+                void        setTrack(RecordTrack *recordTrack) { mTrack = recordTrack; }
         virtual status_t    getNextBuffer(AudioBufferProvider::Buffer* buffer);
         virtual void        releaseBuffer(AudioBufferProvider::Buffer* buffer);
         virtual bool        checkForNewParameters_l();
@@ -884,9 +931,14 @@ private:
                 void        readInputParameters();
         virtual unsigned int  getInputFramesLost();
 
+        virtual status_t addEffectChain_l(const sp<EffectChain>& chain);
+        virtual size_t removeEffectChain_l(const sp<EffectChain>& chain);
+        virtual uint32_t hasAudioSession(int sessionId);
+
     private:
                 RecordThread();
                 AudioStreamIn                       *mInput;
+                RecordTrack*                        mTrack;
                 sp<RecordTrack>                     mActiveTrack;
                 Condition                           mStartStopCond;
                 AudioResampler                      *mResampler;
@@ -1103,9 +1155,8 @@ private:
         status_t addEffect_l(const sp<EffectModule>& handle);
         size_t removeEffect_l(const sp<EffectModule>& handle);
 
-        int sessionId() {
-            return mSessionId;
-        }
+        int sessionId() { return mSessionId; }
+        void setSessionId(int sessionId) { mSessionId = sessionId; }
 
         sp<EffectModule> getEffectFromDesc_l(effect_descriptor_t *descriptor);
         sp<EffectModule> getEffectFromId_l(int id);
index 8e16d94..dd1e153 100644 (file)
 #include <cutils/properties.h>
 #include <dlfcn.h>
 #include <hardware_legacy/power.h>
+#include <media/AudioEffect.h>
+#include <media/EffectsFactoryApi.h>
 
 #include <hardware/hardware.h>
 #include <system/audio.h>
 #include <system/audio_policy.h>
 #include <hardware/audio_policy.h>
+#include <audio_effects/audio_effects_conf.h>
 
 namespace android {
 
@@ -101,6 +104,13 @@ AudioPolicyService::AudioPolicyService()
     mpAudioPolicy->set_can_mute_enforced_audible(mpAudioPolicy, !forced_val);
 
     LOGI("Loaded audio policy from %s (%s)", module->name, module->id);
+
+    // load audio pre processing modules
+    if (access(AUDIO_EFFECT_VENDOR_CONFIG_FILE, R_OK) == 0) {
+        loadPreProcessorConfig(AUDIO_EFFECT_VENDOR_CONFIG_FILE);
+    } else if (access(AUDIO_EFFECT_DEFAULT_CONFIG_FILE, R_OK) == 0) {
+        loadPreProcessorConfig(AUDIO_EFFECT_DEFAULT_CONFIG_FILE);
+    }
 }
 
 AudioPolicyService::~AudioPolicyService()
@@ -110,6 +120,31 @@ AudioPolicyService::~AudioPolicyService()
     mAudioCommandThread->exit();
     mAudioCommandThread.clear();
 
+
+    // release audio pre processing resources
+    for (size_t i = 0; i < mInputSources.size(); i++) {
+        InputSourceDesc *source = mInputSources.valueAt(i);
+        Vector <EffectDesc *> effects = source->mEffects;
+        for (size_t j = 0; j < effects.size(); j++) {
+            delete effects[j]->mName;
+            Vector <effect_param_t *> params = effects[j]->mParams;
+            for (size_t k = 0; k < params.size(); k++) {
+                delete params[k];
+            }
+            params.clear();
+            delete effects[j];
+        }
+        effects.clear();
+        delete source;
+    }
+    mInputSources.clear();
+
+    for (size_t i = 0; i < mInputs.size(); i++) {
+        mInputs.valueAt(i)->mEffects.clear();
+        delete mInputs.valueAt(i);
+    }
+    mInputs.clear();
+
     if (mpAudioPolicy && mpAudioPolicyDev)
         mpAudioPolicyDev->destroy_audio_policy(mpAudioPolicyDev, mpAudioPolicy);
     if (mpAudioPolicyDev)
@@ -276,13 +311,51 @@ audio_io_handle_t AudioPolicyService::getInput(int inputSource,
                                     uint32_t samplingRate,
                                     uint32_t format,
                                     uint32_t channels,
-                                    audio_in_acoustics_t acoustics)
+                                    audio_in_acoustics_t acoustics,
+                                    int audioSession)
 {
     if (mpAudioPolicy == NULL) {
         return 0;
     }
     Mutex::Autolock _l(mLock);
-    return mpAudioPolicy->get_input(mpAudioPolicy, inputSource, samplingRate, format, channels, acoustics);
+    audio_io_handle_t input = mpAudioPolicy->get_input(mpAudioPolicy, inputSource, samplingRate,
+                                                       format, channels, acoustics);
+
+    if (input == 0) {
+        return input;
+    }
+    // create audio pre processors according to input source
+    ssize_t index = mInputSources.indexOfKey((audio_source_t)inputSource);
+    if (index < 0) {
+        return input;
+    }
+    ssize_t idx = mInputs.indexOfKey(input);
+    InputDesc *inputDesc;
+    if (idx < 0) {
+        inputDesc = new InputDesc();
+        inputDesc->mSessionId = audioSession;
+        mInputs.add(input, inputDesc);
+    } else {
+        inputDesc = mInputs.valueAt(idx);
+    }
+
+    Vector <EffectDesc *> effects = mInputSources.valueAt(index)->mEffects;
+    for (size_t i = 0; i < effects.size(); i++) {
+        EffectDesc *effect = effects[i];
+        sp<AudioEffect> fx = new AudioEffect(NULL, &effect->mUuid, -1, 0, 0, audioSession, input);
+        status_t status = fx->initCheck();
+        if (status != NO_ERROR && status != ALREADY_EXISTS) {
+            LOGW("Failed to create Fx %s on input %d", effect->mName, input);
+            // fx goes out of scope and strong ref on AudioEffect is released
+            continue;
+        }
+        for (size_t j = 0; j < effect->mParams.size(); j++) {
+            fx->setParameter(effect->mParams[j]);
+        }
+        inputDesc->mEffects.add(fx);
+    }
+    setPreProcessorEnabled(inputDesc, true);
+    return input;
 }
 
 status_t AudioPolicyService::startInput(audio_io_handle_t input)
@@ -291,6 +364,7 @@ status_t AudioPolicyService::startInput(audio_io_handle_t input)
         return NO_INIT;
     }
     Mutex::Autolock _l(mLock);
+
     return mpAudioPolicy->start_input(mpAudioPolicy, input);
 }
 
@@ -300,6 +374,7 @@ status_t AudioPolicyService::stopInput(audio_io_handle_t input)
         return NO_INIT;
     }
     Mutex::Autolock _l(mLock);
+
     return mpAudioPolicy->stop_input(mpAudioPolicy, input);
 }
 
@@ -310,6 +385,16 @@ void AudioPolicyService::releaseInput(audio_io_handle_t input)
     }
     Mutex::Autolock _l(mLock);
     mpAudioPolicy->release_input(mpAudioPolicy, input);
+
+    ssize_t index = mInputs.indexOfKey(input);
+    if (index < 0) {
+        return;
+    }
+    InputDesc *inputDesc = mInputs.valueAt(index);
+    setPreProcessorEnabled(inputDesc, false);
+    inputDesc->mEffects.clear();
+    delete inputDesc;
+    mInputs.removeItemsAt(index);
 }
 
 status_t AudioPolicyService::initStreamVolume(audio_stream_type_t stream,
@@ -384,7 +469,7 @@ audio_io_handle_t AudioPolicyService::getOutputForEffect(effect_descriptor_t *de
 }
 
 status_t AudioPolicyService::registerEffect(effect_descriptor_t *desc,
-                                audio_io_handle_t output,
+                                audio_io_handle_t io,
                                 uint32_t strategy,
                                 int session,
                                 int id)
@@ -392,7 +477,7 @@ status_t AudioPolicyService::registerEffect(effect_descriptor_t *desc,
     if (mpAudioPolicy == NULL) {
         return NO_INIT;
     }
-    return mpAudioPolicy->register_effect(mpAudioPolicy, desc, output, strategy, session, id);
+    return mpAudioPolicy->register_effect(mpAudioPolicy, desc, io, strategy, session, id);
 }
 
 status_t AudioPolicyService::unregisterEffect(int id)
@@ -489,6 +574,15 @@ status_t AudioPolicyService::dumpPermissionDenial(int fd)
     return NO_ERROR;
 }
 
+void AudioPolicyService::setPreProcessorEnabled(InputDesc *inputDesc, bool enabled)
+{
+    Vector<sp<AudioEffect> > fxVector = inputDesc->mEffects;
+    for (size_t i = 0; i < fxVector.size(); i++) {
+        sp<AudioEffect> fx = fxVector.itemAt(i);
+        fx->setEnabled(enabled);
+    }
+}
+
 status_t AudioPolicyService::onTransact(
         uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
 {
@@ -918,6 +1012,300 @@ int AudioPolicyService::setVoiceVolume(float volume, int delayMs)
     return (int)mAudioCommandThread->voiceVolumeCommand(volume, delayMs);
 }
 
+// ----------------------------------------------------------------------------
+// Audio pre-processing configuration
+// ----------------------------------------------------------------------------
+
+const char *AudioPolicyService::kInputSourceNames[AUDIO_SOURCE_CNT -1] = {
+    MIC_SRC_TAG,
+    VOICE_UL_SRC_TAG,
+    VOICE_DL_SRC_TAG,
+    VOICE_CALL_SRC_TAG,
+    CAMCORDER_SRC_TAG,
+    VOICE_REC_SRC_TAG,
+    VOICE_COMM_SRC_TAG
+};
+
+// returns the audio_source_t enum corresponding to the input source name or
+// AUDIO_SOURCE_CNT is no match found
+audio_source_t AudioPolicyService::inputSourceNameToEnum(const char *name)
+{
+    int i;
+    for (i = AUDIO_SOURCE_MIC; i < AUDIO_SOURCE_CNT; i++) {
+        if (strcmp(name, kInputSourceNames[i - AUDIO_SOURCE_MIC]) == 0) {
+            LOGV("inputSourceNameToEnum found source %s %d", name, i);
+            break;
+        }
+    }
+    return (audio_source_t)i;
+}
+
+size_t AudioPolicyService::growParamSize(char *param,
+                                         size_t size,
+                                         size_t *curSize,
+                                         size_t *totSize)
+{
+    // *curSize is at least sizeof(effect_param_t) + 2 * sizeof(int)
+    size_t pos = ((*curSize - 1 ) / size + 1) * size;
+
+    if (pos + size > *totSize) {
+        while (pos + size > *totSize) {
+            *totSize += ((*totSize + 7) / 8) * 4;
+        }
+        param = (char *)realloc(param, *totSize);
+    }
+    *curSize = pos + size;
+    return pos;
+}
+
+size_t AudioPolicyService::readParamValue(cnode *node,
+                                          char *param,
+                                          size_t *curSize,
+                                          size_t *totSize)
+{
+    if (strncmp(node->name, SHORT_TAG, sizeof(SHORT_TAG) + 1) == 0) {
+        size_t pos = growParamSize(param, sizeof(short), curSize, totSize);
+        *(short *)((char *)param + pos) = (short)atoi(node->value);
+        LOGV("readParamValue() reading short %d", *(short *)((char *)param + pos));
+        return sizeof(short);
+    } else if (strncmp(node->name, INT_TAG, sizeof(INT_TAG) + 1) == 0) {
+        size_t pos = growParamSize(param, sizeof(int), curSize, totSize);
+        *(int *)((char *)param + pos) = atoi(node->value);
+        LOGV("readParamValue() reading int %d", *(int *)((char *)param + pos));
+        return sizeof(int);
+    } else if (strncmp(node->name, FLOAT_TAG, sizeof(FLOAT_TAG) + 1) == 0) {
+        size_t pos = growParamSize(param, sizeof(float), curSize, totSize);
+        *(float *)((char *)param + pos) = (float)atof(node->value);
+        LOGV("readParamValue() reading float %f",*(float *)((char *)param + pos));
+        return sizeof(float);
+    } else if (strncmp(node->name, BOOL_TAG, sizeof(BOOL_TAG) + 1) == 0) {
+        size_t pos = growParamSize(param, sizeof(bool), curSize, totSize);
+        if (strncmp(node->value, "false", strlen("false") + 1) == 0) {
+            *(bool *)((char *)param + pos) = false;
+        } else {
+            *(bool *)((char *)param + pos) = true;
+        }
+        LOGV("readParamValue() reading bool %s",*(bool *)((char *)param + pos) ? "true" : "false");
+        return sizeof(bool);
+    } else if (strncmp(node->name, STRING_TAG, sizeof(STRING_TAG) + 1) == 0) {
+        size_t len = strnlen(node->value, EFFECT_STRING_LEN_MAX);
+        if (*curSize + len + 1 > *totSize) {
+            *totSize = *curSize + len + 1;
+            param = (char *)realloc(param, *totSize);
+        }
+        strncpy(param + *curSize, node->value, len);
+        *curSize += len;
+        param[*curSize] = '\0';
+        LOGV("readParamValue() reading string %s", param + *curSize - len);
+        return len;
+    }
+    LOGW("readParamValue() unknown param type %s", node->name);
+    return 0;
+}
+
+effect_param_t *AudioPolicyService::loadEffectParameter(cnode *root)
+{
+    cnode *param;
+    cnode *value;
+    size_t curSize = sizeof(effect_param_t);
+    size_t totSize = sizeof(effect_param_t) + 2 * sizeof(int);
+    effect_param_t *fx_param = (effect_param_t *)malloc(totSize);
+
+    param = config_find(root, PARAM_TAG);
+    value = config_find(root, VALUE_TAG);
+    if (param == NULL && value == NULL) {
+        // try to parse simple parameter form {int int}
+        param = root->first_child;
+        if (param) {
+            // Note: that a pair of random strings is read as 0 0
+            int *ptr = (int *)fx_param->data;
+            int *ptr2 = (int *)((char *)param + sizeof(effect_param_t));
+            LOGW("loadEffectParameter() ptr %p ptr2 %p", ptr, ptr2);
+            *ptr++ = atoi(param->name);
+            *ptr = atoi(param->value);
+            fx_param->psize = sizeof(int);
+            fx_param->vsize = sizeof(int);
+            return fx_param;
+        }
+    }
+    if (param == NULL || value == NULL) {
+        LOGW("loadEffectParameter() invalid parameter description %s", root->name);
+        goto error;
+    }
+
+    fx_param->psize = 0;
+    param = param->first_child;
+    while (param) {
+        LOGV("loadEffectParameter() reading param of type %s", param->name);
+        size_t size = readParamValue(param, (char *)fx_param, &curSize, &totSize);
+        if (size == 0) {
+            goto error;
+        }
+        fx_param->psize += size;
+        param = param->next;
+    }
+
+    // align start of value field on 32 bit boundary
+    curSize = ((curSize - 1 ) / sizeof(int) + 1) * sizeof(int);
+
+    fx_param->vsize = 0;
+    value = value->first_child;
+    while (value) {
+        LOGV("loadEffectParameter() reading value of type %s", value->name);
+        size_t size = readParamValue(value, (char *)fx_param, &curSize, &totSize);
+        if (size == 0) {
+            goto error;
+        }
+        fx_param->vsize += size;
+        value = value->next;
+    }
+
+    return fx_param;
+
+error:
+    delete fx_param;
+    return NULL;
+}
+
+void AudioPolicyService::loadEffectParameters(cnode *root, Vector <effect_param_t *>& params)
+{
+    cnode *node = root->first_child;
+    while (node) {
+        LOGV("loadEffectParameters() loading param %s", node->name);
+        effect_param_t *param = loadEffectParameter(node);
+        if (param == NULL) {
+            node = node->next;
+            continue;
+        }
+        params.add(param);
+        node = node->next;
+    }
+}
+
+AudioPolicyService::InputSourceDesc *AudioPolicyService::loadInputSource(
+                                                            cnode *root,
+                                                            const Vector <EffectDesc *>& effects)
+{
+    cnode *node = root->first_child;
+    if (node == NULL) {
+        LOGW("loadInputSource() empty element %s", root->name);
+        return NULL;
+    }
+    InputSourceDesc *source = new InputSourceDesc();
+    while (node) {
+        size_t i;
+        for (i = 0; i < effects.size(); i++) {
+            if (strncmp(effects[i]->mName, node->name, EFFECT_STRING_LEN_MAX) == 0) {
+                LOGV("loadInputSource() found effect %s in list", node->name);
+                break;
+            }
+        }
+        if (i == effects.size()) {
+            LOGV("loadInputSource() effect %s not in list", node->name);
+            node = node->next;
+            continue;
+        }
+        EffectDesc *effect = new EffectDesc(*effects[i]);
+        loadEffectParameters(node, effect->mParams);
+        LOGV("loadInputSource() adding effect %s uuid %08x", effect->mName, effect->mUuid.timeLow);
+        source->mEffects.add(effect);
+        node = node->next;
+    }
+    if (source->mEffects.size() == 0) {
+        LOGW("loadInputSource() no valid effects found in source %s", root->name);
+        delete source;
+        return NULL;
+    }
+    return source;
+}
+
+status_t AudioPolicyService::loadInputSources(cnode *root, const Vector <EffectDesc *>& effects)
+{
+    cnode *node = config_find(root, PREPROCESSING_TAG);
+    if (node == NULL) {
+        return -ENOENT;
+    }
+    node = node->first_child;
+    while (node) {
+        audio_source_t source = inputSourceNameToEnum(node->name);
+        if (source == AUDIO_SOURCE_CNT) {
+            LOGW("loadInputSources() invalid input source %s", node->name);
+            node = node->next;
+            continue;
+        }
+        LOGV("loadInputSources() loading input source %s", node->name);
+        InputSourceDesc *desc = loadInputSource(node, effects);
+        if (desc == NULL) {
+            node = node->next;
+            continue;
+        }
+        mInputSources.add(source, desc);
+        node = node->next;
+    }
+    return NO_ERROR;
+}
+
+AudioPolicyService::EffectDesc *AudioPolicyService::loadEffect(cnode *root)
+{
+    cnode *node = config_find(root, UUID_TAG);
+    if (node == NULL) {
+        return NULL;
+    }
+    effect_uuid_t uuid;
+    if (AudioEffect::stringToGuid(node->value, &uuid) != NO_ERROR) {
+        LOGW("loadEffect() invalid uuid %s", node->value);
+        return NULL;
+    }
+    EffectDesc *effect = new EffectDesc();
+    effect->mName = strdup(root->name);
+    memcpy(&effect->mUuid, &uuid, sizeof(effect_uuid_t));
+
+    return effect;
+}
+
+status_t AudioPolicyService::loadEffects(cnode *root, Vector <EffectDesc *>& effects)
+{
+    cnode *node = config_find(root, EFFECTS_TAG);
+    if (node == NULL) {
+        return -ENOENT;
+    }
+    node = node->first_child;
+    while (node) {
+        LOGV("loadEffects() loading effect %s", node->name);
+        EffectDesc *effect = loadEffect(node);
+        if (effect == NULL) {
+            node = node->next;
+            continue;
+        }
+        effects.add(effect);
+        node = node->next;
+    }
+    return NO_ERROR;
+}
+
+status_t AudioPolicyService::loadPreProcessorConfig(const char *path)
+{
+    cnode *root;
+    char *data;
+
+    data = (char *)load_file(path, NULL);
+    if (data == NULL) {
+        return -ENODEV;
+    }
+    root = config_node("", "");
+    config_load(root, data);
+
+    Vector <EffectDesc *> effects;
+    loadEffects(root, effects);
+    loadInputSources(root, effects);
+
+    config_free(root);
+    free(root);
+    free(data);
+
+    return NO_ERROR;
+}
+
 /* implementation of the interface to the policy manager */
 extern "C" {
 
index b830120..62ad29e 100644 (file)
 #ifndef ANDROID_AUDIOPOLICYSERVICE_H
 #define ANDROID_AUDIOPOLICYSERVICE_H
 
-#include <media/IAudioPolicyService.h>
-#include <media/ToneGenerator.h>
+#include <cutils/misc.h>
+#include <cutils/config_utils.h>
 #include <utils/Vector.h>
+#include <utils/SortedVector.h>
 #include <binder/BinderService.h>
-
 #include <system/audio.h>
 #include <system/audio_policy.h>
 #include <hardware/audio_policy.h>
+#include <media/IAudioPolicyService.h>
+#include <media/ToneGenerator.h>
+#include <media/AudioEffect.h>
 
 namespace android {
 
@@ -78,7 +81,8 @@ public:
                                     uint32_t format = AUDIO_FORMAT_DEFAULT,
                                     uint32_t channels = 0,
                                     audio_in_acoustics_t acoustics =
-                                            (audio_in_acoustics_t)0);
+                                            (audio_in_acoustics_t)0,
+                                    int audioSession = 0);
     virtual status_t startInput(audio_io_handle_t input);
     virtual status_t stopInput(audio_io_handle_t input);
     virtual void releaseInput(audio_io_handle_t input);
@@ -93,7 +97,7 @@ public:
 
     virtual audio_io_handle_t getOutputForEffect(effect_descriptor_t *desc);
     virtual status_t registerEffect(effect_descriptor_t *desc,
-                                    audio_io_handle_t output,
+                                    audio_io_handle_t io,
                                     uint32_t strategy,
                                     int session,
                                     int id);
@@ -218,6 +222,51 @@ private:
         String8 mName;                      // string used by wake lock fo delayed commands
     };
 
+    class EffectDesc {
+    public:
+        EffectDesc() {}
+        virtual ~EffectDesc() {}
+        char *mName;
+        effect_uuid_t mUuid;
+        Vector <effect_param_t *> mParams;
+    };
+
+    class InputSourceDesc {
+    public:
+        InputSourceDesc() {}
+        virtual ~InputSourceDesc() {}
+        Vector <EffectDesc *> mEffects;
+    };
+
+
+    class InputDesc {
+    public:
+        InputDesc() {}
+        virtual ~InputDesc() {}
+        int mSessionId;
+        Vector< sp<AudioEffect> >mEffects;
+    };
+
+    static const char *kInputSourceNames[AUDIO_SOURCE_CNT -1];
+
+    void setPreProcessorEnabled(InputDesc *inputDesc, bool enabled);
+    status_t loadPreProcessorConfig(const char *path);
+    status_t loadEffects(cnode *root, Vector <EffectDesc *>& effects);
+    EffectDesc *loadEffect(cnode *root);
+    status_t loadInputSources(cnode *root, const Vector <EffectDesc *>& effects);
+    audio_source_t inputSourceNameToEnum(const char *name);
+    InputSourceDesc *loadInputSource(cnode *root, const Vector <EffectDesc *>& effects);
+    void loadEffectParameters(cnode *root, Vector <effect_param_t *>& params);
+    effect_param_t *loadEffectParameter(cnode *root);
+    size_t readParamValue(cnode *node,
+                          char *param,
+                          size_t *curSize,
+                          size_t *totSize);
+    size_t growParamSize(char *param,
+                         size_t size,
+                         size_t *curSize,
+                         size_t *totSize);
+
     // Internal dump utilities.
     status_t dumpPermissionDenial(int fd);
 
@@ -226,9 +275,10 @@ private:
                             // device connection state  or routing
     sp <AudioCommandThread> mAudioCommandThread;    // audio commands thread
     sp <AudioCommandThread> mTonePlaybackThread;     // tone playback thread
-
     struct audio_policy_device *mpAudioPolicyDev;
     struct audio_policy *mpAudioPolicy;
+    KeyedVector< audio_source_t, InputSourceDesc* > mInputSources;
+    KeyedVector< audio_io_handle_t, InputDesc* > mInputs;
 };
 
 }; // namespace android
index 0eff776..96b26e7 100644 (file)
@@ -458,6 +458,17 @@ status_t CameraService::Client::connect(const sp<ICameraClient>& client) {
     return NO_ERROR;
 }
 
+static void disconnectWindow(const sp<ANativeWindow>& window) {
+    if (window != 0) {
+        status_t result = native_window_disconnect(window.get(),
+                NATIVE_WINDOW_API_CAMERA);
+        if (result != NO_ERROR) {
+            LOGW("native_window_disconnect failed: %s (%d)", strerror(-result),
+                    result);
+        }
+    }
+}
+
 void CameraService::Client::disconnect() {
     int callingPid = getCallingPid();
     LOG1("disconnect E (pid %d)", callingPid);
@@ -489,6 +500,7 @@ void CameraService::Client::disconnect() {
 
     // Release the held ANativeWindow resources.
     if (mPreviewWindow != 0) {
+        disconnectWindow(mPreviewWindow);
         mPreviewWindow = 0;
         mHardware->setPreviewWindow(mPreviewWindow);
     }
@@ -502,17 +514,6 @@ void CameraService::Client::disconnect() {
 
 // ----------------------------------------------------------------------------
 
-static void disconnectWindow(const sp<ANativeWindow>& window) {
-    if (window != 0) {
-        status_t result = native_window_disconnect(window.get(),
-                NATIVE_WINDOW_API_CAMERA);
-        if (result != NO_ERROR) {
-            LOGW("native_window_disconnect failed: %s (%d)", strerror(-result),
-                    result);
-        }
-    }
-}
-
 status_t CameraService::Client::setPreviewWindow(const sp<IBinder>& binder,
         const sp<ANativeWindow>& window) {
     Mutex::Autolock lock(mLock);
@@ -536,6 +537,8 @@ status_t CameraService::Client::setPreviewWindow(const sp<IBinder>& binder,
     // If preview has been already started, register preview buffers now.
     if (mHardware->previewEnabled()) {
         if (window != 0) {
+            native_window_set_scaling_mode(window.get(),
+                    NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW);
             native_window_set_buffers_transform(window.get(), mOrientation);
             result = mHardware->setPreviewWindow(window);
         }
@@ -642,6 +645,8 @@ status_t CameraService::Client::startPreviewMode() {
     }
 
     if (mPreviewWindow != 0) {
+        native_window_set_scaling_mode(mPreviewWindow.get(),
+                NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW);
         native_window_set_buffers_transform(mPreviewWindow.get(),
                 mOrientation);
     }
index 1cac502..039b003 100644 (file)
@@ -215,14 +215,6 @@ InputDispatcher::InputDispatcher(const sp<InputDispatcherPolicyInterface>& polic
     mInputTargetWaitCause(INPUT_TARGET_WAIT_CAUSE_NONE) {
     mLooper = new Looper(false);
 
-    mInboundQueue.headSentinel.refCount = -1;
-    mInboundQueue.headSentinel.type = EventEntry::TYPE_SENTINEL;
-    mInboundQueue.headSentinel.eventTime = LONG_LONG_MIN;
-
-    mInboundQueue.tailSentinel.refCount = -1;
-    mInboundQueue.tailSentinel.type = EventEntry::TYPE_SENTINEL;
-    mInboundQueue.tailSentinel.eventTime = LONG_LONG_MAX;
-
     mKeyRepeatState.lastKeyEntry = NULL;
 
     policy->getDispatcherConfiguration(&mConfig);
@@ -319,7 +311,7 @@ void InputDispatcher::dispatchOnceInnerLocked(nsecs_t* nextWakeupTime) {
             }
         } else {
             // Inbound queue has at least one entry.
-            EventEntry* entry = mInboundQueue.headSentinel.next;
+            EventEntry* entry = mInboundQueue.head;
 
             // Throttle the entry if it is a move event and there are no
             // other events behind it in the queue.  Due to movement batching, additional
@@ -335,7 +327,7 @@ void InputDispatcher::dispatchOnceInnerLocked(nsecs_t* nextWakeupTime) {
                 int32_t deviceId = motionEntry->deviceId;
                 uint32_t source = motionEntry->source;
                 if (! isAppSwitchDue
-                        && motionEntry->next == & mInboundQueue.tailSentinel // exactly one event
+                        && !motionEntry->next // exactly one event, no successors
                         && (motionEntry->action == AMOTION_EVENT_ACTION_MOVE
                                 || motionEntry->action == AMOTION_EVENT_ACTION_HOVER_MOVE)
                         && deviceId == mThrottleState.lastDeviceId
@@ -641,13 +633,13 @@ bool InputDispatcher::runCommandsLockedInterruptible() {
         (this->*command)(commandEntry); // commands are implicitly 'LockedInterruptible'
 
         commandEntry->connection.clear();
-        mAllocator.releaseCommandEntry(commandEntry);
+        delete commandEntry;
     } while (! mCommandQueue.isEmpty());
     return true;
 }
 
 InputDispatcher::CommandEntry* InputDispatcher::postCommandLocked(Command command) {
-    CommandEntry* commandEntry = mAllocator.obtainCommandEntry(command);
+    CommandEntry* commandEntry = new CommandEntry(command);
     mCommandQueue.enqueueAtTail(commandEntry);
     return commandEntry;
 }
@@ -674,12 +666,12 @@ void InputDispatcher::releaseInboundEventLocked(EventEntry* entry) {
 #endif
         setInjectionResultLocked(entry, INPUT_EVENT_INJECTION_FAILED);
     }
-    mAllocator.releaseEventEntry(entry);
+    entry->release();
 }
 
 void InputDispatcher::resetKeyRepeatLocked() {
     if (mKeyRepeatState.lastKeyEntry) {
-        mAllocator.releaseKeyEntry(mKeyRepeatState.lastKeyEntry);
+        mKeyRepeatState.lastKeyEntry->release();
         mKeyRepeatState.lastKeyEntry = NULL;
     }
 }
@@ -691,18 +683,18 @@ InputDispatcher::KeyEntry* InputDispatcher::synthesizeKeyRepeatLocked(nsecs_t cu
     uint32_t policyFlags = (entry->policyFlags & POLICY_FLAG_RAW_MASK)
             | POLICY_FLAG_PASS_TO_USER | POLICY_FLAG_TRUSTED;
     if (entry->refCount == 1) {
-        mAllocator.recycleKeyEntry(entry);
+        entry->recycle();
         entry->eventTime = currentTime;
         entry->policyFlags = policyFlags;
         entry->repeatCount += 1;
     } else {
-        KeyEntry* newEntry = mAllocator.obtainKeyEntry(currentTime,
+        KeyEntry* newEntry = new KeyEntry(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->release();
 
         entry = newEntry;
     }
@@ -887,7 +879,7 @@ bool InputDispatcher::dispatchMotionLocked(
             uint32_t originalSampleCount = entry->countSamples();
 #endif
             MotionSample* nextSample = splitBatchAfterSample->next;
-            MotionEntry* nextEntry = mAllocator.obtainMotionEntry(nextSample->eventTime,
+            MotionEntry* nextEntry = new MotionEntry(nextSample->eventTime,
                     entry->deviceId, entry->source, entry->policyFlags,
                     entry->action, entry->flags,
                     entry->metaState, entry->buttonState, entry->edgeFlags,
@@ -897,7 +889,7 @@ bool InputDispatcher::dispatchMotionLocked(
                 nextEntry->firstSample.next = nextSample->next;
                 nextEntry->lastSample = entry->lastSample;
             }
-            mAllocator.freeMotionSample(nextSample);
+            delete nextSample;
 
             entry->lastSample = const_cast<MotionSample*>(splitBatchAfterSample);
             entry->lastSample->next = NULL;
@@ -1992,7 +1984,7 @@ void InputDispatcher::enqueueDispatchEntryLocked(
 
     // 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* dispatchEntry = new DispatchEntry(eventEntry, // increments ref
             inputTargetFlags, inputTarget->xOffset, inputTarget->yOffset,
             inputTarget->scaleFactor);
     if (dispatchEntry->hasForegroundTarget()) {
@@ -2087,7 +2079,7 @@ void InputDispatcher::startDispatchCycleLocked(nsecs_t currentTime,
     LOG_ASSERT(connection->status == Connection::STATUS_NORMAL);
     LOG_ASSERT(! connection->outboundQueue.isEmpty());
 
-    DispatchEntry* dispatchEntry = connection->outboundQueue.headSentinel.next;
+    DispatchEntry* dispatchEntry = connection->outboundQueue.head;
     LOG_ASSERT(! dispatchEntry->inProgress);
 
     // Mark the dispatch entry as in progress.
@@ -2276,7 +2268,7 @@ void InputDispatcher::startNextDispatchCycleLocked(nsecs_t currentTime,
         const sp<Connection>& connection) {
     // Start the next dispatch cycle for this connection.
     while (! connection->outboundQueue.isEmpty()) {
-        DispatchEntry* dispatchEntry = connection->outboundQueue.headSentinel.next;
+        DispatchEntry* dispatchEntry = connection->outboundQueue.head;
         if (dispatchEntry->inProgress) {
              // Finish or resume current event in progress.
             if (dispatchEntry->tailMotionSample) {
@@ -2293,7 +2285,7 @@ void InputDispatcher::startNextDispatchCycleLocked(nsecs_t currentTime,
             if (dispatchEntry->hasForegroundTarget()) {
                 decrementPendingForegroundDispatchesLocked(dispatchEntry->eventEntry);
             }
-            mAllocator.releaseDispatchEntry(dispatchEntry);
+            delete 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.
@@ -2333,7 +2325,7 @@ void InputDispatcher::drainOutboundQueueLocked(Connection* connection) {
         if (dispatchEntry->hasForegroundTarget()) {
             decrementPendingForegroundDispatchesLocked(dispatchEntry->eventEntry);
         }
-        mAllocator.releaseDispatchEntry(dispatchEntry);
+        delete dispatchEntry;
     }
 
     deactivateConnectionLocked(connection);
@@ -2407,7 +2399,7 @@ void InputDispatcher::synthesizeCancelationEventsForConnectionLocked(
     nsecs_t currentTime = now();
 
     mTempCancelationEvents.clear();
-    connection->inputState.synthesizeCancelationEvents(currentTime, & mAllocator,
+    connection->inputState.synthesizeCancelationEvents(currentTime,
             mTempCancelationEvents, options);
 
     if (! mTempCancelationEvents.isEmpty()
@@ -2448,10 +2440,10 @@ void InputDispatcher::synthesizeCancelationEventsForConnectionLocked(
             enqueueDispatchEntryLocked(connection, cancelationEventEntry, // increments ref
                     &target, false, InputTarget::FLAG_DISPATCH_AS_IS);
 
-            mAllocator.releaseEventEntry(cancelationEventEntry);
+            cancelationEventEntry->release();
         }
 
-        if (!connection->outboundQueue.headSentinel.next->inProgress) {
+        if (!connection->outboundQueue.head->inProgress) {
             startDispatchCycleLocked(currentTime, connection);
         }
     }
@@ -2523,7 +2515,7 @@ InputDispatcher::splitMotionEvent(const MotionEntry* originalMotionEntry, BitSet
         }
     }
 
-    MotionEntry* splitMotionEntry = mAllocator.obtainMotionEntry(
+    MotionEntry* splitMotionEntry = new MotionEntry(
             originalMotionEntry->eventTime,
             originalMotionEntry->deviceId,
             originalMotionEntry->source,
@@ -2547,8 +2539,7 @@ InputDispatcher::splitMotionEvent(const MotionEntry* originalMotionEntry, BitSet
                     originalMotionSample->pointerCoords[originalPointerIndex]);
         }
 
-        mAllocator.appendMotionSample(splitMotionEntry, originalMotionSample->eventTime,
-                splitPointerCoords);
+        splitMotionEntry->appendSample(originalMotionSample->eventTime, splitPointerCoords);
     }
 
     if (originalMotionEntry->injectionState) {
@@ -2568,7 +2559,7 @@ void InputDispatcher::notifyConfigurationChanged(nsecs_t eventTime) {
     { // acquire lock
         AutoMutex _l(mLock);
 
-        ConfigurationChangedEntry* newEntry = mAllocator.obtainConfigurationChangedEntry(eventTime);
+        ConfigurationChangedEntry* newEntry = new ConfigurationChangedEntry(eventTime);
         needWake = enqueueInboundEventLocked(newEntry);
     } // release lock
 
@@ -2638,7 +2629,7 @@ void InputDispatcher::notifyKey(nsecs_t eventTime, int32_t deviceId, uint32_t so
         }
 
         int32_t repeatCount = 0;
-        KeyEntry* newEntry = mAllocator.obtainKeyEntry(eventTime,
+        KeyEntry* newEntry = new KeyEntry(eventTime,
                 deviceId, source, policyFlags, action, flags, keyCode, scanCode,
                 metaState, repeatCount, downTime);
 
@@ -2718,8 +2709,7 @@ void InputDispatcher::notifyMotion(nsecs_t eventTime, int32_t deviceId, uint32_t
             // 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.tailSentinel.prev;
-                    entry != & mInboundQueue.headSentinel; entry = entry->prev) {
+            for (EventEntry* entry = mInboundQueue.tail; entry; entry = entry->prev) {
                 if (entry->type != EventEntry::TYPE_MOTION) {
                     // Keep looking for motion events.
                     continue;
@@ -2798,7 +2788,7 @@ void InputDispatcher::notifyMotion(nsecs_t eventTime, int32_t deviceId, uint32_t
                         continue;
                     }
 
-                    DispatchEntry* dispatchEntry = connection->outboundQueue.headSentinel.next;
+                    DispatchEntry* dispatchEntry = connection->outboundQueue.head;
                     if (! dispatchEntry->inProgress
                             || dispatchEntry->eventEntry->type != EventEntry::TYPE_MOTION
                             || dispatchEntry->isSplit()) {
@@ -2844,7 +2834,7 @@ void InputDispatcher::notifyMotion(nsecs_t eventTime, int32_t deviceId, uint32_t
 
                     // Hurray!  This foreground target is currently dispatching a move event
                     // that we can stream onto.  Append the motion sample and resume dispatch.
-                    mAllocator.appendMotionSample(motionEntry, eventTime, pointerCoords);
+                    motionEntry->appendSample(eventTime, pointerCoords);
 #if DEBUG_BATCHING
                     LOGD("Appended motion sample onto batch for most recently dispatched "
                             "motion event for this device and source in the outbound queues.  "
@@ -2864,7 +2854,7 @@ NoBatchingOrStreaming:;
         }
 
         // Just enqueue a new motion event.
-        MotionEntry* newEntry = mAllocator.obtainMotionEntry(eventTime,
+        MotionEntry* newEntry = new MotionEntry(eventTime,
                 deviceId, source, policyFlags, action, flags, metaState, buttonState, edgeFlags,
                 xPrecision, yPrecision, downTime,
                 pointerCount, pointerProperties, pointerCoords);
@@ -2901,7 +2891,7 @@ void InputDispatcher::batchMotionLocked(MotionEntry* entry, nsecs_t eventTime,
     }
 
     // Append the sample.
-    mAllocator.appendMotionSample(entry, eventTime, pointerCoords);
+    entry->appendSample(eventTime, pointerCoords);
 #if DEBUG_BATCHING
     LOGD("Appended motion sample onto batch for %s, events were %0.3f ms apart",
             eventDescription, interval * 0.000001f);
@@ -2958,7 +2948,7 @@ int32_t InputDispatcher::injectInputEvent(const InputEvent* event,
         }
 
         mLock.lock();
-        injectedEntry = mAllocator.obtainKeyEntry(keyEvent->getEventTime(),
+        injectedEntry = new KeyEntry(keyEvent->getEventTime(),
                 keyEvent->getDeviceId(), keyEvent->getSource(),
                 policyFlags, action, flags,
                 keyEvent->getKeyCode(), keyEvent->getScanCode(), keyEvent->getMetaState(),
@@ -2983,7 +2973,7 @@ int32_t InputDispatcher::injectInputEvent(const InputEvent* event,
         mLock.lock();
         const nsecs_t* sampleEventTimes = motionEvent->getSampleEventTimes();
         const PointerCoords* samplePointerCoords = motionEvent->getSamplePointerCoords();
-        MotionEntry* motionEntry = mAllocator.obtainMotionEntry(*sampleEventTimes,
+        MotionEntry* motionEntry = new MotionEntry(*sampleEventTimes,
                 motionEvent->getDeviceId(), motionEvent->getSource(), policyFlags,
                 action, motionEvent->getFlags(),
                 motionEvent->getMetaState(), motionEvent->getButtonState(),
@@ -2994,7 +2984,7 @@ int32_t InputDispatcher::injectInputEvent(const InputEvent* event,
         for (size_t i = motionEvent->getHistorySize(); i > 0; i--) {
             sampleEventTimes += 1;
             samplePointerCoords += pointerCount;
-            mAllocator.appendMotionSample(motionEntry, *sampleEventTimes, samplePointerCoords);
+            motionEntry->appendSample(*sampleEventTimes, samplePointerCoords);
         }
         injectedEntry = motionEntry;
         break;
@@ -3005,7 +2995,7 @@ int32_t InputDispatcher::injectInputEvent(const InputEvent* event,
         return INPUT_EVENT_INJECTION_FAILED;
     }
 
-    InjectionState* injectionState = mAllocator.obtainInjectionState(injectorPid, injectorUid);
+    InjectionState* injectionState = new InjectionState(injectorPid, injectorUid);
     if (syncMode == INPUT_EVENT_INJECTION_SYNC_NONE) {
         injectionState->injectionIsAsync = true;
     }
@@ -3068,7 +3058,7 @@ int32_t InputDispatcher::injectInputEvent(const InputEvent* event,
             }
         }
 
-        mAllocator.releaseInjectionState(injectionState);
+        injectionState->release();
     } // release lock
 
 #if DEBUG_INJECTION
@@ -3704,7 +3694,7 @@ void InputDispatcher::doInterceptKeyBeforeDispatchingLockedInterruptible(
     entry->interceptKeyResult = consumed
             ? KeyEntry::INTERCEPT_KEY_RESULT_SKIP
             : KeyEntry::INTERCEPT_KEY_RESULT_CONTINUE;
-    mAllocator.releaseKeyEntry(entry);
+    entry->release();
 }
 
 void InputDispatcher::doDispatchCycleFinishedLockedInterruptible(
@@ -3714,7 +3704,7 @@ void InputDispatcher::doDispatchCycleFinishedLockedInterruptible(
 
     bool skipNext = false;
     if (!connection->outboundQueue.isEmpty()) {
-        DispatchEntry* dispatchEntry = connection->outboundQueue.headSentinel.next;
+        DispatchEntry* dispatchEntry = connection->outboundQueue.head;
         if (dispatchEntry->inProgress) {
             if (dispatchEntry->eventEntry->type == EventEntry::TYPE_KEY) {
                 KeyEntry* keyEntry = static_cast<KeyEntry*>(dispatchEntry->eventEntry);
@@ -3796,7 +3786,7 @@ bool InputDispatcher::afterKeyEventLockedInterruptible(const sp<Connection>& con
                 return true; // skip next cycle
             }
 
-            LOG_ASSERT(connection->outboundQueue.headSentinel.next == dispatchEntry);
+            LOG_ASSERT(connection->outboundQueue.head == dispatchEntry);
 
             // Latch the fallback keycode for this key on an initial down.
             // The fallback keycode cannot change at any other point in the lifecycle.
@@ -3929,230 +3919,137 @@ void InputDispatcher::dump(String8& dump) {
 template <typename T>
 uint32_t InputDispatcher::Queue<T>::count() const {
     uint32_t result = 0;
-    for (const T* entry = headSentinel.next; entry != & tailSentinel; entry = entry->next) {
+    for (const T* entry = head; entry; entry = entry->next) {
         result += 1;
     }
     return result;
 }
 
 
-// --- InputDispatcher::Allocator ---
+// --- InputDispatcher::InjectionState ---
 
-InputDispatcher::Allocator::Allocator() {
+InputDispatcher::InjectionState::InjectionState(int32_t injectorPid, int32_t injectorUid) :
+        refCount(1),
+        injectorPid(injectorPid), injectorUid(injectorUid),
+        injectionResult(INPUT_EVENT_INJECTION_PENDING), injectionIsAsync(false),
+        pendingForegroundDispatches(0) {
 }
 
-InputDispatcher::InjectionState*
-InputDispatcher::Allocator::obtainInjectionState(int32_t injectorPid, int32_t injectorUid) {
-    InjectionState* injectionState = mInjectionStatePool.alloc();
-    injectionState->refCount = 1;
-    injectionState->injectorPid = injectorPid;
-    injectionState->injectorUid = injectorUid;
-    injectionState->injectionIsAsync = false;
-    injectionState->injectionResult = INPUT_EVENT_INJECTION_PENDING;
-    injectionState->pendingForegroundDispatches = 0;
-    return injectionState;
+InputDispatcher::InjectionState::~InjectionState() {
 }
 
-void InputDispatcher::Allocator::initializeEventEntry(EventEntry* entry, int32_t type,
-        nsecs_t eventTime, uint32_t policyFlags) {
-    entry->type = type;
-    entry->refCount = 1;
-    entry->dispatchInProgress = false;
-    entry->eventTime = eventTime;
-    entry->policyFlags = policyFlags;
-    entry->injectionState = NULL;
-}
-
-void InputDispatcher::Allocator::releaseEventEntryInjectionState(EventEntry* entry) {
-    if (entry->injectionState) {
-        releaseInjectionState(entry->injectionState);
-        entry->injectionState = NULL;
+void InputDispatcher::InjectionState::release() {
+    refCount -= 1;
+    if (refCount == 0) {
+        delete this;
+    } else {
+        LOG_ASSERT(refCount > 0);
     }
 }
 
-InputDispatcher::ConfigurationChangedEntry*
-InputDispatcher::Allocator::obtainConfigurationChangedEntry(nsecs_t eventTime) {
-    ConfigurationChangedEntry* entry = mConfigurationChangeEntryPool.alloc();
-    initializeEventEntry(entry, EventEntry::TYPE_CONFIGURATION_CHANGED, eventTime, 0);
-    return entry;
-}
 
-InputDispatcher::KeyEntry* InputDispatcher::Allocator::obtainKeyEntry(nsecs_t eventTime,
-        int32_t deviceId, uint32_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, policyFlags);
-
-    entry->deviceId = deviceId;
-    entry->source = source;
-    entry->action = action;
-    entry->flags = flags;
-    entry->keyCode = keyCode;
-    entry->scanCode = scanCode;
-    entry->metaState = metaState;
-    entry->repeatCount = repeatCount;
-    entry->downTime = downTime;
-    entry->syntheticRepeat = false;
-    entry->interceptKeyResult = KeyEntry::INTERCEPT_KEY_RESULT_UNKNOWN;
-    return entry;
-}
+// --- InputDispatcher::EventEntry ---
 
-InputDispatcher::MotionEntry* InputDispatcher::Allocator::obtainMotionEntry(nsecs_t eventTime,
-        int32_t deviceId, uint32_t source, uint32_t policyFlags, int32_t action, int32_t flags,
-        int32_t metaState, int32_t buttonState,
-        int32_t edgeFlags, float xPrecision, float yPrecision,
-        nsecs_t downTime, uint32_t pointerCount,
-        const PointerProperties* pointerProperties, const PointerCoords* pointerCoords) {
-    MotionEntry* entry = mMotionEntryPool.alloc();
-    initializeEventEntry(entry, EventEntry::TYPE_MOTION, eventTime, policyFlags);
-
-    entry->eventTime = eventTime;
-    entry->deviceId = deviceId;
-    entry->source = source;
-    entry->action = action;
-    entry->flags = flags;
-    entry->metaState = metaState;
-    entry->buttonState = buttonState;
-    entry->edgeFlags = edgeFlags;
-    entry->xPrecision = xPrecision;
-    entry->yPrecision = yPrecision;
-    entry->downTime = downTime;
-    entry->pointerCount = pointerCount;
-    entry->firstSample.eventTime = eventTime;
-    entry->firstSample.eventTimeBeforeCoalescing = eventTime;
-    entry->firstSample.next = NULL;
-    entry->lastSample = & entry->firstSample;
-    for (uint32_t i = 0; i < pointerCount; i++) {
-        entry->pointerProperties[i].copyFrom(pointerProperties[i]);
-        entry->firstSample.pointerCoords[i].copyFrom(pointerCoords[i]);
-    }
-    return entry;
+InputDispatcher::EventEntry::EventEntry(int32_t type, nsecs_t eventTime, uint32_t policyFlags) :
+        refCount(1), type(type), eventTime(eventTime), policyFlags(policyFlags),
+        injectionState(NULL), dispatchInProgress(false) {
 }
 
-InputDispatcher::DispatchEntry* InputDispatcher::Allocator::obtainDispatchEntry(
-        EventEntry* eventEntry,
-        int32_t targetFlags, float xOffset, float yOffset, float scaleFactor) {
-    DispatchEntry* entry = mDispatchEntryPool.alloc();
-    entry->eventEntry = eventEntry;
-    eventEntry->refCount += 1;
-    entry->targetFlags = targetFlags;
-    entry->xOffset = xOffset;
-    entry->yOffset = yOffset;
-    entry->scaleFactor = scaleFactor;
-    entry->inProgress = false;
-    entry->headMotionSample = NULL;
-    entry->tailMotionSample = NULL;
-    return entry;
+InputDispatcher::EventEntry::~EventEntry() {
+    releaseInjectionState();
 }
 
-InputDispatcher::CommandEntry* InputDispatcher::Allocator::obtainCommandEntry(Command command) {
-    CommandEntry* entry = mCommandEntryPool.alloc();
-    entry->command = command;
-    return entry;
-}
-
-void InputDispatcher::Allocator::releaseInjectionState(InjectionState* injectionState) {
-    injectionState->refCount -= 1;
-    if (injectionState->refCount == 0) {
-        mInjectionStatePool.free(injectionState);
+void InputDispatcher::EventEntry::release() {
+    refCount -= 1;
+    if (refCount == 0) {
+        delete this;
     } else {
-        LOG_ASSERT(injectionState->refCount > 0);
+        LOG_ASSERT(refCount > 0);
     }
 }
 
-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:
-        LOG_ASSERT(false);
-        break;
+void InputDispatcher::EventEntry::releaseInjectionState() {
+    if (injectionState) {
+        injectionState->release();
+        injectionState = NULL;
     }
 }
 
-void InputDispatcher::Allocator::releaseConfigurationChangedEntry(
-        ConfigurationChangedEntry* entry) {
-    entry->refCount -= 1;
-    if (entry->refCount == 0) {
-        releaseEventEntryInjectionState(entry);
-        mConfigurationChangeEntryPool.free(entry);
-    } else {
-        LOG_ASSERT(entry->refCount > 0);
-    }
-}
 
-void InputDispatcher::Allocator::releaseKeyEntry(KeyEntry* entry) {
-    entry->refCount -= 1;
-    if (entry->refCount == 0) {
-        releaseEventEntryInjectionState(entry);
-        mKeyEntryPool.free(entry);
-    } else {
-        LOG_ASSERT(entry->refCount > 0);
-    }
-}
+// --- InputDispatcher::ConfigurationChangedEntry ---
 
-void InputDispatcher::Allocator::releaseMotionEntry(MotionEntry* entry) {
-    entry->refCount -= 1;
-    if (entry->refCount == 0) {
-        releaseEventEntryInjectionState(entry);
-        for (MotionSample* sample = entry->firstSample.next; sample != NULL; ) {
-            MotionSample* next = sample->next;
-            mMotionSamplePool.free(sample);
-            sample = next;
-        }
-        mMotionEntryPool.free(entry);
-    } else {
-        LOG_ASSERT(entry->refCount > 0);
-    }
+InputDispatcher::ConfigurationChangedEntry::ConfigurationChangedEntry(nsecs_t eventTime) :
+        EventEntry(TYPE_CONFIGURATION_CHANGED, eventTime, 0) {
 }
 
-void InputDispatcher::Allocator::freeMotionSample(MotionSample* sample) {
-    mMotionSamplePool.free(sample);
+InputDispatcher::ConfigurationChangedEntry::~ConfigurationChangedEntry() {
 }
 
-void InputDispatcher::Allocator::releaseDispatchEntry(DispatchEntry* entry) {
-    releaseEventEntry(entry->eventEntry);
-    mDispatchEntryPool.free(entry);
+
+// --- InputDispatcher::KeyEntry ---
+
+InputDispatcher::KeyEntry::KeyEntry(nsecs_t eventTime,
+        int32_t deviceId, uint32_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) :
+        EventEntry(TYPE_KEY, eventTime, policyFlags),
+        deviceId(deviceId), source(source), action(action), flags(flags),
+        keyCode(keyCode), scanCode(scanCode), metaState(metaState),
+        repeatCount(repeatCount), downTime(downTime),
+        syntheticRepeat(false), interceptKeyResult(KeyEntry::INTERCEPT_KEY_RESULT_UNKNOWN) {
 }
 
-void InputDispatcher::Allocator::releaseCommandEntry(CommandEntry* entry) {
-    mCommandEntryPool.free(entry);
+InputDispatcher::KeyEntry::~KeyEntry() {
 }
 
-void InputDispatcher::Allocator::appendMotionSample(MotionEntry* motionEntry,
-        nsecs_t eventTime, const PointerCoords* pointerCoords) {
-    MotionSample* sample = mMotionSamplePool.alloc();
-    sample->eventTime = eventTime;
-    sample->eventTimeBeforeCoalescing = eventTime;
-    uint32_t pointerCount = motionEntry->pointerCount;
-    for (uint32_t i = 0; i < pointerCount; i++) {
-        sample->pointerCoords[i].copyFrom(pointerCoords[i]);
-    }
+void InputDispatcher::KeyEntry::recycle() {
+    releaseInjectionState();
 
-    sample->next = NULL;
-    motionEntry->lastSample->next = sample;
-    motionEntry->lastSample = sample;
+    dispatchInProgress = false;
+    syntheticRepeat = false;
+    interceptKeyResult = KeyEntry::INTERCEPT_KEY_RESULT_UNKNOWN;
 }
 
-void InputDispatcher::Allocator::recycleKeyEntry(KeyEntry* keyEntry) {
-    releaseEventEntryInjectionState(keyEntry);
 
-    keyEntry->dispatchInProgress = false;
-    keyEntry->syntheticRepeat = false;
-    keyEntry->interceptKeyResult = KeyEntry::INTERCEPT_KEY_RESULT_UNKNOWN;
+// --- InputDispatcher::MotionSample ---
+
+InputDispatcher::MotionSample::MotionSample(nsecs_t eventTime,
+        const PointerCoords* pointerCoords, uint32_t pointerCount) :
+        next(NULL), eventTime(eventTime), eventTimeBeforeCoalescing(eventTime) {
+    for (uint32_t i = 0; i < pointerCount; i++) {
+        this->pointerCoords[i].copyFrom(pointerCoords[i]);
+    }
 }
 
 
 // --- InputDispatcher::MotionEntry ---
 
+InputDispatcher::MotionEntry::MotionEntry(nsecs_t eventTime,
+        int32_t deviceId, uint32_t source, uint32_t policyFlags, int32_t action, int32_t flags,
+        int32_t metaState, int32_t buttonState,
+        int32_t edgeFlags, float xPrecision, float yPrecision,
+        nsecs_t downTime, uint32_t pointerCount,
+        const PointerProperties* pointerProperties, const PointerCoords* pointerCoords) :
+        EventEntry(TYPE_MOTION, eventTime, policyFlags),
+        deviceId(deviceId), source(source), action(action), flags(flags),
+        metaState(metaState), buttonState(buttonState), edgeFlags(edgeFlags),
+        xPrecision(xPrecision), yPrecision(yPrecision),
+        downTime(downTime), pointerCount(pointerCount),
+        firstSample(eventTime, pointerCoords, pointerCount),
+        lastSample(&firstSample) {
+    for (uint32_t i = 0; i < pointerCount; i++) {
+        this->pointerProperties[i].copyFrom(pointerProperties[i]);
+    }
+}
+
+InputDispatcher::MotionEntry::~MotionEntry() {
+    for (MotionSample* sample = firstSample.next; sample != NULL; ) {
+        MotionSample* next = sample->next;
+        delete sample;
+        sample = next;
+    }
+}
+
 uint32_t InputDispatcher::MotionEntry::countSamples() const {
     uint32_t count = 1;
     for (MotionSample* sample = firstSample.next; sample != NULL; sample = sample->next) {
@@ -4176,6 +4073,31 @@ bool InputDispatcher::MotionEntry::canAppendSamples(int32_t action, uint32_t poi
     return true;
 }
 
+void InputDispatcher::MotionEntry::appendSample(
+        nsecs_t eventTime, const PointerCoords* pointerCoords) {
+    MotionSample* sample = new MotionSample(eventTime, pointerCoords, pointerCount);
+
+    lastSample->next = sample;
+    lastSample = sample;
+}
+
+
+// --- InputDispatcher::DispatchEntry ---
+
+InputDispatcher::DispatchEntry::DispatchEntry(EventEntry* eventEntry,
+        int32_t targetFlags, float xOffset, float yOffset, float scaleFactor) :
+        eventEntry(eventEntry), targetFlags(targetFlags),
+        xOffset(xOffset), yOffset(yOffset), scaleFactor(scaleFactor),
+        inProgress(false),
+        resolvedAction(0), resolvedFlags(0),
+        headMotionSample(NULL), tailMotionSample(NULL) {
+    eventEntry->refCount += 1;
+}
+
+InputDispatcher::DispatchEntry::~DispatchEntry() {
+    eventEntry->release();
+}
+
 
 // --- InputDispatcher::InputState ---
 
@@ -4380,12 +4302,11 @@ void InputDispatcher::InputState::MotionMemento::setPointers(const MotionEntry*
 }
 
 void InputDispatcher::InputState::synthesizeCancelationEvents(nsecs_t currentTime,
-        Allocator* allocator, Vector<EventEntry*>& outEvents,
-        const CancelationOptions& options) {
+        Vector<EventEntry*>& outEvents, const CancelationOptions& options) {
     for (size_t i = 0; i < mKeyMementos.size(); i++) {
         const KeyMemento& memento = mKeyMementos.itemAt(i);
         if (shouldCancelKey(memento, options)) {
-            outEvents.push(allocator->obtainKeyEntry(currentTime,
+            outEvents.push(new KeyEntry(currentTime,
                     memento.deviceId, memento.source, 0,
                     AKEY_EVENT_ACTION_UP, memento.flags | AKEY_EVENT_FLAG_CANCELED,
                     memento.keyCode, memento.scanCode, 0, 0, memento.downTime));
@@ -4395,7 +4316,7 @@ void InputDispatcher::InputState::synthesizeCancelationEvents(nsecs_t currentTim
     for (size_t i = 0; i < mMotionMementos.size(); i++) {
         const MotionMemento& memento = mMotionMementos.itemAt(i);
         if (shouldCancelMotion(memento, options)) {
-            outEvents.push(allocator->obtainMotionEntry(currentTime,
+            outEvents.push(new MotionEntry(currentTime,
                     memento.deviceId, memento.source, 0,
                     memento.hovering
                             ? AMOTION_EVENT_ACTION_HOVER_EXIT
@@ -4516,8 +4437,8 @@ const char* InputDispatcher::Connection::getStatusLabel() const {
 
 InputDispatcher::DispatchEntry* InputDispatcher::Connection::findQueuedDispatchEntryForEvent(
         const EventEntry* eventEntry) const {
-    for (DispatchEntry* dispatchEntry = outboundQueue.tailSentinel.prev;
-            dispatchEntry != & outboundQueue.headSentinel; dispatchEntry = dispatchEntry->prev) {
+    for (DispatchEntry* dispatchEntry = outboundQueue.tail; dispatchEntry;
+            dispatchEntry = dispatchEntry->prev) {
         if (dispatchEntry->eventEntry == eventEntry) {
             return dispatchEntry;
         }
@@ -4528,8 +4449,8 @@ InputDispatcher::DispatchEntry* InputDispatcher::Connection::findQueuedDispatchE
 
 // --- InputDispatcher::CommandEntry ---
 
-InputDispatcher::CommandEntry::CommandEntry() :
-    keyEntry(NULL) {
+InputDispatcher::CommandEntry::CommandEntry(Command command) :
+    command(command), eventTime(0), keyEntry(NULL), userActivityEventType(0), handled(false) {
 }
 
 InputDispatcher::CommandEntry::~CommandEntry() {
index 15fd274..1d39b2e 100644 (file)
@@ -26,7 +26,6 @@
 #include <utils/RefBase.h>
 #include <utils/String8.h>
 #include <utils/Looper.h>
-#include <utils/Pool.h>
 #include <utils/BitSet.h>
 
 #include <stddef.h>
@@ -434,11 +433,16 @@ private:
         int32_t injectionResult;  // initially INPUT_EVENT_INJECTION_PENDING
         bool injectionIsAsync; // set to true if injection is not waiting for the result
         int32_t pendingForegroundDispatches; // the number of foreground dispatches in progress
+
+        InjectionState(int32_t injectorPid, int32_t injectorUid);
+        void release();
+
+    private:
+        ~InjectionState();
     };
 
     struct EventEntry : Link<EventEntry> {
         enum {
-            TYPE_SENTINEL,
             TYPE_CONFIGURATION_CHANGED,
             TYPE_KEY,
             TYPE_MOTION
@@ -453,9 +457,20 @@ private:
         bool dispatchInProgress; // initially false, set to true while dispatching
 
         inline bool isInjected() const { return injectionState != NULL; }
+
+        void release();
+
+    protected:
+        EventEntry(int32_t type, nsecs_t eventTime, uint32_t policyFlags);
+        virtual ~EventEntry();
+        void releaseInjectionState();
     };
 
     struct ConfigurationChangedEntry : EventEntry {
+        ConfigurationChangedEntry(nsecs_t eventTime);
+
+    protected:
+        virtual ~ConfigurationChangedEntry();
     };
 
     struct KeyEntry : EventEntry {
@@ -477,6 +492,15 @@ private:
             INTERCEPT_KEY_RESULT_CONTINUE,
         };
         InterceptKeyResult interceptKeyResult; // set based on the interception result
+
+        KeyEntry(nsecs_t eventTime,
+                int32_t deviceId, uint32_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);
+        void recycle();
+
+    protected:
+        virtual ~KeyEntry();
     };
 
     struct MotionSample {
@@ -485,6 +509,9 @@ private:
         nsecs_t eventTime; // may be updated during coalescing
         nsecs_t eventTimeBeforeCoalescing; // not updated during coalescing
         PointerCoords pointerCoords[MAX_POINTERS];
+
+        MotionSample(nsecs_t eventTime, const PointerCoords* pointerCoords,
+                uint32_t pointerCount);
     };
 
     struct MotionEntry : EventEntry {
@@ -505,11 +532,23 @@ private:
         MotionSample firstSample;
         MotionSample* lastSample;
 
+        MotionEntry(nsecs_t eventTime,
+                int32_t deviceId, uint32_t source, uint32_t policyFlags, int32_t action,
+                int32_t flags, int32_t metaState, int32_t buttonState, int32_t edgeFlags,
+                float xPrecision, float yPrecision,
+                nsecs_t downTime, uint32_t pointerCount,
+                const PointerProperties* pointerProperties, const PointerCoords* pointerCoords);
+
         uint32_t countSamples() const;
 
         // Checks whether we can append samples, assuming the device id and source are the same.
         bool canAppendSamples(int32_t action, uint32_t pointerCount,
                 const PointerProperties* pointerProperties) const;
+
+        void appendSample(nsecs_t eventTime, const PointerCoords* pointerCoords);
+
+    protected:
+        virtual ~MotionEntry();
     };
 
     // Tracks the progress of dispatching a particular event to a particular connection.
@@ -540,6 +579,10 @@ private:
         //   will be set to NULL.
         MotionSample* tailMotionSample;
 
+        DispatchEntry(EventEntry* eventEntry,
+                int32_t targetFlags, float xOffset, float yOffset, float scaleFactor);
+        ~DispatchEntry();
+
         inline bool hasForegroundTarget() const {
             return targetFlags & InputTarget::FLAG_FOREGROUND;
         }
@@ -570,7 +613,7 @@ private:
 
     class Connection;
     struct CommandEntry : Link<CommandEntry> {
-        CommandEntry();
+        CommandEntry(Command command);
         ~CommandEntry();
 
         Command command;
@@ -588,99 +631,65 @@ private:
     // Generic queue implementation.
     template <typename T>
     struct Queue {
-        T headSentinel;
-        T tailSentinel;
-
-        inline Queue() {
-            headSentinel.prev = NULL;
-            headSentinel.next = & tailSentinel;
-            tailSentinel.prev = & headSentinel;
-            tailSentinel.next = NULL;
+        T* head;
+        T* tail;
+
+        inline Queue() : head(NULL), tail(NULL) {
         }
 
         inline bool isEmpty() const {
-            return headSentinel.next == & tailSentinel;
+            return !head;
         }
 
         inline void enqueueAtTail(T* entry) {
-            T* last = tailSentinel.prev;
-            last->next = entry;
-            entry->prev = last;
-            entry->next = & tailSentinel;
-            tailSentinel.prev = entry;
+            entry->prev = tail;
+            if (tail) {
+                tail->next = entry;
+            } else {
+                head = entry;
+            }
+            entry->next = NULL;
+            tail = entry;
         }
 
         inline void enqueueAtHead(T* entry) {
-            T* first = headSentinel.next;
-            headSentinel.next = entry;
-            entry->prev = & headSentinel;
-            entry->next = first;
-            first->prev = entry;
+            entry->next = head;
+            if (head) {
+                head->prev = entry;
+            } else {
+                tail = entry;
+            }
+            entry->prev = NULL;
+            head = entry;
         }
 
         inline void dequeue(T* entry) {
-            entry->prev->next = entry->next;
-            entry->next->prev = entry->prev;
+            if (entry->prev) {
+                entry->prev->next = entry->next;
+            } else {
+                head = entry->next;
+            }
+            if (entry->next) {
+                entry->next->prev = entry->prev;
+            } else {
+                tail = entry->prev;
+            }
         }
 
         inline T* dequeueAtHead() {
-            T* first = headSentinel.next;
-            dequeue(first);
-            return first;
+            T* entry = head;
+            head = entry->next;
+            if (head) {
+                head->prev = NULL;
+            } else {
+                tail = NULL;
+            }
+            return entry;
         }
 
         uint32_t count() const;
     };
 
-    /* Allocates queue entries and performs reference counting as needed. */
-    class Allocator {
-    public:
-        Allocator();
-
-        InjectionState* obtainInjectionState(int32_t injectorPid, int32_t injectorUid);
-        ConfigurationChangedEntry* obtainConfigurationChangedEntry(nsecs_t eventTime);
-        KeyEntry* obtainKeyEntry(nsecs_t eventTime,
-                int32_t deviceId, uint32_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, uint32_t source, uint32_t policyFlags, int32_t action,
-                int32_t flags, int32_t metaState, int32_t buttonState, int32_t edgeFlags,
-                float xPrecision, float yPrecision,
-                nsecs_t downTime, uint32_t pointerCount,
-                const PointerProperties* pointerProperties, const PointerCoords* pointerCoords);
-        DispatchEntry* obtainDispatchEntry(EventEntry* eventEntry,
-                int32_t targetFlags, float xOffset, float yOffset, float scaleFactor);
-        CommandEntry* obtainCommandEntry(Command command);
-
-        void releaseInjectionState(InjectionState* injectionState);
-        void releaseEventEntry(EventEntry* entry);
-        void releaseConfigurationChangedEntry(ConfigurationChangedEntry* entry);
-        void releaseKeyEntry(KeyEntry* entry);
-        void releaseMotionEntry(MotionEntry* entry);
-        void freeMotionSample(MotionSample* sample);
-        void releaseDispatchEntry(DispatchEntry* entry);
-        void releaseCommandEntry(CommandEntry* entry);
-
-        void recycleKeyEntry(KeyEntry* entry);
-
-        void appendMotionSample(MotionEntry* motionEntry,
-                nsecs_t eventTime, const PointerCoords* pointerCoords);
-
-    private:
-        Pool<InjectionState> mInjectionStatePool;
-        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,
-                uint32_t policyFlags);
-        void releaseEventEntryInjectionState(EventEntry* entry);
-    };
-
     /* Specifies which events are to be canceled and why. */
     struct CancelationOptions {
         enum Mode {
@@ -728,7 +737,7 @@ private:
         bool trackMotion(const MotionEntry* entry, int32_t action, int32_t flags);
 
         // Synthesizes cancelation events for the current state and resets the tracked state.
-        void synthesizeCancelationEvents(nsecs_t currentTime, Allocator* allocator,
+        void synthesizeCancelationEvents(nsecs_t currentTime,
                 Vector<EventEntry*>& outEvents, const CancelationOptions& options);
 
         // Clears the current state.
@@ -856,7 +865,6 @@ private:
 
     Mutex mLock;
 
-    Allocator mAllocator;
     sp<Looper> mLooper;
 
     EventEntry* mPendingEvent;
index 0b15221..438883e 100644 (file)
@@ -1022,6 +1022,12 @@ class AppWidgetService extends IAppWidgetService.Stub
             info.minWidth = value != null ? value.data : 0; 
             value = sa.peekValue(com.android.internal.R.styleable.AppWidgetProviderInfo_minHeight);
             info.minHeight = value != null ? value.data : 0;
+            value = sa.peekValue(
+                    com.android.internal.R.styleable.AppWidgetProviderInfo_minResizeWidth);
+            info.minResizeWidth = value != null ? value.data : info.minWidth;
+            value = sa.peekValue(
+                    com.android.internal.R.styleable.AppWidgetProviderInfo_minResizeHeight);
+            info.minResizeHeight = value != null ? value.data : info.minHeight;
 
             info.updatePeriodMillis = sa.getInt(
                     com.android.internal.R.styleable.AppWidgetProviderInfo_updatePeriodMillis, 0);
index 55c92e8..5dd3a6a 100644 (file)
@@ -155,7 +155,9 @@ public class ConnectivityService extends IConnectivityManager.Stub {
     private boolean mInetConditionChangeInFlight = false;
     private int mDefaultConnectionSequence = 0;
 
+    private Object mDnsLock = new Object();
     private int mNumDnsEntries;
+    private boolean mDnsOverridden = false;
 
     private boolean mTestMode;
     private static ConnectivityService sServiceInstance;
@@ -244,11 +246,18 @@ public class ConnectivityService extends IConnectivityManager.Stub {
     private static final int EVENT_SET_DEPENDENCY_MET =
             MAX_NETWORK_STATE_TRACKER_EVENT + 10;
 
+    /**
+     * used internally to restore DNS properties back to the
+     * default network
+     */
+    private static final int EVENT_RESTORE_DNS =
+            MAX_NETWORK_STATE_TRACKER_EVENT + 11;
+
     private Handler mHandler;
 
     // list of DeathRecipients used to make sure features are turned off when
     // a process dies
-    private List mFeatureUsers;
+    private List<FeatureUser> mFeatureUsers;
 
     private boolean mSystemReady;
     private Intent mInitialBroadcast;
@@ -436,7 +445,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
             mNetRequestersPids[i] = new ArrayList();
         }
 
-        mFeatureUsers = new ArrayList();
+        mFeatureUsers = new ArrayList<FeatureUser>();
 
         mNumDnsEntries = 0;
 
@@ -484,6 +493,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
                 continue;
             }
             mCurrentLinkProperties[netType] = null;
+            if (mNetConfigs[netType].isDefault()) mNetTrackers[netType].reconnect();
         }
 
         IBinder b = ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE);
@@ -794,6 +804,20 @@ public class ConnectivityService extends IConnectivityManager.Stub {
             stopUsingNetworkFeature(this, false);
         }
 
+        public boolean isSameUser(FeatureUser u) {
+            if (u == null) return false;
+
+            return isSameUser(u.mPid, u.mUid, u.mNetworkType, u.mFeature);
+        }
+
+        public boolean isSameUser(int pid, int uid, int networkType, String feature) {
+            if ((mPid == pid) && (mUid == uid) && (mNetworkType == networkType) &&
+                TextUtils.equals(mFeature, feature)) {
+                return true;
+            }
+            return false;
+        }
+
         public String toString() {
             return "FeatureUser("+mNetworkType+","+mFeature+","+mPid+","+mUid+"), created " +
                     (System.currentTimeMillis() - mCreateTime) + " mSec ago";
@@ -844,16 +868,29 @@ public class ConnectivityService extends IConnectivityManager.Stub {
                     }
                 }
 
+                int restoreTimer = getRestoreDefaultNetworkDelay(usedNetworkType);
+
                 synchronized(this) {
-                    mFeatureUsers.add(f);
+                    boolean addToList = true;
+                    if (restoreTimer < 0) {
+                        // In case there is no timer is specified for the feature,
+                        // make sure we don't add duplicate entry with the same request.
+                        for (FeatureUser u : mFeatureUsers) {
+                            if (u.isSameUser(f)) {
+                                // Duplicate user is found. Do not add.
+                                addToList = false;
+                                break;
+                            }
+                        }
+                    }
+
+                    if (addToList) mFeatureUsers.add(f);
                     if (!mNetRequestersPids[usedNetworkType].contains(currentPid)) {
                         // this gets used for per-pid dns when connected
                         mNetRequestersPids[usedNetworkType].add(currentPid);
                     }
                 }
 
-                int restoreTimer = getRestoreDefaultNetworkDelay(usedNetworkType);
-
                 if (restoreTimer >= 0) {
                     mHandler.sendMessageDelayed(
                             mHandler.obtainMessage(EVENT_RESTORE_DEFAULT_NETWORK, f), restoreTimer);
@@ -903,11 +940,9 @@ public class ConnectivityService extends IConnectivityManager.Stub {
         boolean found = false;
 
         synchronized(this) {
-            for (int i = 0; i < mFeatureUsers.size() ; i++) {
-                u = (FeatureUser)mFeatureUsers.get(i);
-                if (uid == u.mUid && pid == u.mPid &&
-                        networkType == u.mNetworkType &&
-                        TextUtils.equals(feature, u.mFeature)) {
+            for (FeatureUser x : mFeatureUsers) {
+                if (x.isSameUser(pid, uid, networkType, feature)) {
+                    u = x;
                     found = true;
                     break;
                 }
@@ -959,11 +994,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
             // do not pay attention to duplicate requests - in effect the
             // API does not refcount and a single stop will counter multiple starts.
             if (ignoreDups == false) {
-                for (int i = 0; i < mFeatureUsers.size() ; i++) {
-                    FeatureUser x = (FeatureUser)mFeatureUsers.get(i);
-                    if (x.mUid == u.mUid && x.mPid == u.mPid &&
-                            x.mNetworkType == u.mNetworkType &&
-                            TextUtils.equals(x.mFeature, u.mFeature)) {
+                for (FeatureUser x : mFeatureUsers) {
+                    if (x.isSameUser(u)) {
                         if (DBG) log("ignoring stopUsingNetworkFeature as dup is found");
                         return 1;
                     }
@@ -1867,6 +1899,50 @@ public class ConnectivityService extends IConnectivityManager.Stub {
         mContext.sendBroadcast(intent);
     }
 
+    // Caller must grab mDnsLock.
+    private boolean updateDns(String network, Collection<InetAddress> dnses, String domains) {
+        boolean changed = false;
+        int last = 0;
+        if (dnses.size() == 0 && mDefaultDns != null) {
+            ++last;
+            String value = mDefaultDns.getHostAddress();
+            if (!value.equals(SystemProperties.get("net.dns1"))) {
+                if (DBG) {
+                    log("no dns provided for " + network + " - using " + value);
+                }
+                changed = true;
+                SystemProperties.set("net.dns1", value);
+            }
+        } else {
+            for (InetAddress dns : dnses) {
+                ++last;
+                String key = "net.dns" + last;
+                String value = dns.getHostAddress();
+                if (!changed && value.equals(SystemProperties.get(key))) {
+                    continue;
+                }
+                if (DBG) {
+                    log("adding dns " + value + " for " + network);
+                }
+                changed = true;
+                SystemProperties.set(key, value);
+            }
+        }
+        for (int i = last + 1; i <= mNumDnsEntries; ++i) {
+            String key = "net.dns" + i;
+            if (DBG) log("erasing " + key);
+            changed = true;
+            SystemProperties.set(key, "");
+        }
+        mNumDnsEntries = last;
+
+        if (!domains.equals(SystemProperties.get("net.dns.search"))) {
+            SystemProperties.set("net.dns.search", domains);
+            changed = true;
+        }
+        return changed;
+    }
+
     private void handleDnsConfigurationChange(int netType) {
         // add default net's dns entries
         NetworkStateTracker nt = mNetTrackers[netType];
@@ -1876,40 +1952,12 @@ public class ConnectivityService extends IConnectivityManager.Stub {
             Collection<InetAddress> dnses = p.getDnses();
             boolean changed = false;
             if (mNetConfigs[netType].isDefault()) {
-                int j = 1;
-                if (dnses.size() == 0 && mDefaultDns != null) {
-                    String dnsString = mDefaultDns.getHostAddress();
-                    if (!dnsString.equals(SystemProperties.get("net.dns1"))) {
-                        if (DBG) {
-                            log("no dns provided - using " + dnsString);
-                        }
-                        changed = true;
-                        SystemProperties.set("net.dns1", dnsString);
-                    }
-                    j++;
-                } else {
-                    for (InetAddress dns : dnses) {
-                        String dnsString = dns.getHostAddress();
-                        if (!changed && dnsString.equals(SystemProperties.get("net.dns" + j))) {
-                            j++;
-                            continue;
-                        }
-                        if (DBG) {
-                            log("adding dns " + dns + " for " +
-                                    nt.getNetworkInfo().getTypeName());
-                        }
-                        changed = true;
-                        SystemProperties.set("net.dns" + j++, dnsString);
-                    }
-                }
-                for (int k=j ; k<mNumDnsEntries; k++) {
-                    if (changed || !TextUtils.isEmpty(SystemProperties.get("net.dns" + k))) {
-                        if (DBG) log("erasing net.dns" + k);
-                        changed = true;
-                        SystemProperties.set("net.dns" + k, "");
+                String network = nt.getNetworkInfo().getTypeName();
+                synchronized (mDnsLock) {
+                    if (!mDnsOverridden) {
+                        changed = updateDns(network, dnses, "");
                     }
                 }
-                mNumDnsEntries = j;
             } else {
                 // set per-pid dns for attached secondary nets
                 List pids = mNetRequestersPids[netType];
@@ -2116,6 +2164,13 @@ public class ConnectivityService extends IConnectivityManager.Stub {
                     handleSetDependencyMet(msg.arg2, met);
                     break;
                 }
+                case EVENT_RESTORE_DNS:
+                {
+                    if (mActiveDefaultNetwork != -1) {
+                        handleDnsConfigurationChange(mActiveDefaultNetwork);
+                    }
+                    break;
+                }
             }
         }
     }
@@ -2563,12 +2618,57 @@ public class ConnectivityService extends IConnectivityManager.Stub {
         private VpnCallback() {
         }
 
-        public synchronized void override(List<String> dnsServers, List<String> searchDomains) {
-            // TODO: override DNS servers and http proxy.
+        public void override(List<String> dnsServers, List<String> searchDomains) {
+            if (dnsServers == null) {
+                restore();
+                return;
+            }
+
+            // Convert DNS servers into addresses.
+            List<InetAddress> addresses = new ArrayList<InetAddress>();
+            for (String address : dnsServers) {
+                // Double check the addresses and remove invalid ones.
+                try {
+                    addresses.add(InetAddress.parseNumericAddress(address));
+                } catch (Exception e) {
+                    // ignore
+                }
+            }
+            if (addresses.isEmpty()) {
+                restore();
+                return;
+            }
+
+            // Concatenate search domains into a string.
+            StringBuilder buffer = new StringBuilder();
+            if (searchDomains != null) {
+                for (String domain : searchDomains) {
+                    buffer.append(domain).append(' ');
+                }
+            }
+            String domains = buffer.toString().trim();
+
+            // Apply DNS changes.
+            boolean changed = false;
+            synchronized (mDnsLock) {
+                changed = updateDns("VPN", addresses, domains);
+                mDnsOverridden = true;
+            }
+            if (changed) {
+                bumpDns();
+            }
+
+            // TODO: temporarily remove http proxy?
         }
 
-        public synchronized void restore() {
-            // TODO: restore VPN changes.
+        public void restore() {
+            synchronized (mDnsLock) {
+                if (!mDnsOverridden) {
+                    return;
+                }
+                mDnsOverridden = false;
+            }
+            mHandler.sendEmptyMessage(EVENT_RESTORE_DNS);
         }
     }
 }
index 2597978..d39f565 100644 (file)
@@ -50,6 +50,7 @@ import android.content.ServiceConnection;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.pm.ResolveInfo;
 import android.content.pm.ServiceInfo;
 import android.content.res.Configuration;
@@ -165,7 +166,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
     private final KeyguardManager mKeyguardManager;
     private final Notification mImeSwitcherNotification;
     private final PendingIntent mImeSwitchPendingIntent;
-    private final boolean mShowOngoingImeSwitcherForPhones;
+    private boolean mShowOngoingImeSwitcherForPhones;
     private boolean mNotificationShown;
 
     class SessionState {
@@ -537,8 +538,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
         mImeSwitcherNotification.vibrate = null;
         Intent intent = new Intent(Settings.ACTION_SHOW_INPUT_METHOD_PICKER);
         mImeSwitchPendingIntent = PendingIntent.getBroadcast(mContext, 0, intent, 0);
-        mShowOngoingImeSwitcherForPhones = mRes.getBoolean(
-                com.android.internal.R.bool.show_ongoing_ime_switcher);
+
+        mShowOngoingImeSwitcherForPhones = false;
 
         synchronized (mMethodMap) {
             mFileManager = new InputMethodFileManager(mMethodMap);
@@ -611,6 +612,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
         synchronized (mMethodMap) {
             if (!mSystemReady) {
                 mSystemReady = true;
+                mShowOngoingImeSwitcherForPhones = mRes.getBoolean(
+                        com.android.internal.R.bool.show_ongoing_ime_switcher);
                 try {
                     startInputInnerLocked();
                 } catch (RuntimeException e) {
@@ -1046,7 +1049,16 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
                     mStatusBar.setIconVisibility("ime", false);
                 } else if (packageName != null) {
                     if (DEBUG) Slog.d(TAG, "show a small icon for the input method");
-                    mStatusBar.setIcon("ime", packageName, iconId, 0);
+                    CharSequence contentDescription = null;
+                    try {
+                        PackageManager packageManager = mContext.getPackageManager();
+                        contentDescription = packageManager.getApplicationLabel(
+                                packageManager.getApplicationInfo(packageName, 0));
+                    } catch (NameNotFoundException nnfe) {
+                        /* ignore */
+                    }
+                    mStatusBar.setIcon("ime", packageName, iconId, 0,
+                            contentDescription  != null ? contentDescription.toString() : null);
                     mStatusBar.setIconVisibility("ime", true);
                 }
             }
index bdb5a24..86f57d1 100644 (file)
@@ -43,11 +43,7 @@ public class MasterClearReceiver extends BroadcastReceiver {
             @Override
             public void run() {
                 try {
-                    if (intent.hasExtra("enableEFS")) {
-                        RecoverySystem.rebootToggleEFS(context, intent.getBooleanExtra("enableEFS", false));
-                    } else {
-                        RecoverySystem.rebootWipeUserData(context);
-                    }
+                    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);
index 41e8a31..2366fcb 100644 (file)
@@ -93,6 +93,7 @@ class NetworkManagementService extends INetworkManagementService.Stub {
     private static final String KEY_TX = "tx_bytes";
 
     class NetdResponseCode {
+        /* Keep in sync with system/netd/ResponseCode.h */
         public static final int InterfaceListResult       = 110;
         public static final int TetherInterfaceListResult = 111;
         public static final int TetherDnsFwdTgtListResult = 112;
@@ -108,6 +109,7 @@ class NetworkManagementService extends INetworkManagementService.Stub {
         public static final int InterfaceTxThrottleResult = 219;
 
         public static final int InterfaceChange           = 600;
+        public static final int BandwidthControl          = 601;
     }
 
     /**
@@ -265,6 +267,20 @@ class NetworkManagementService extends INetworkManagementService.Stub {
     }
 
     /**
+     * Notify our observers of a limit reached.
+     */
+    private void notifyLimitReached(String limitName, String iface) {
+        for (INetworkManagementEventObserver obs : mObservers) {
+            try {
+                obs.limitReached(limitName, iface);
+                Slog.d(TAG, "Observer notified limit reached for " + limitName + " " + iface);
+            } catch (Exception ex) {
+                Slog.w(TAG, "Observer notifier failed", ex);
+            }
+        }
+    }
+
+    /**
      * Let us know the daemon is connected
      */
     protected void onConnected() {
@@ -286,33 +302,52 @@ class NetworkManagementService extends INetworkManagementService.Stub {
             }.start();
         }
         public boolean onEvent(int code, String raw, String[] cooked) {
-            if (code == NetdResponseCode.InterfaceChange) {
-                /*
-                 * a network interface change occured
-                 * Format: "NNN Iface added <name>"
-                 *         "NNN Iface removed <name>"
-                 *         "NNN Iface changed <name> <up/down>"
-                 *         "NNN Iface linkstatus <name> <up/down>"
-                 */
-                if (cooked.length < 4 || !cooked[1].equals("Iface")) {
+            switch (code) {
+            case NetdResponseCode.InterfaceChange:
+                    /*
+                     * a network interface change occured
+                     * Format: "NNN Iface added <name>"
+                     *         "NNN Iface removed <name>"
+                     *         "NNN Iface changed <name> <up/down>"
+                     *         "NNN Iface linkstatus <name> <up/down>"
+                     */
+                    if (cooked.length < 4 || !cooked[1].equals("Iface")) {
+                        throw new IllegalStateException(
+                                String.format("Invalid event from daemon (%s)", raw));
+                    }
+                    if (cooked[2].equals("added")) {
+                        notifyInterfaceAdded(cooked[3]);
+                        return true;
+                    } else if (cooked[2].equals("removed")) {
+                        notifyInterfaceRemoved(cooked[3]);
+                        return true;
+                    } else if (cooked[2].equals("changed") && cooked.length == 5) {
+                        notifyInterfaceStatusChanged(cooked[3], cooked[4].equals("up"));
+                        return true;
+                    } else if (cooked[2].equals("linkstate") && cooked.length == 5) {
+                        notifyInterfaceLinkStateChanged(cooked[3], cooked[4].equals("up"));
+                        return true;
+                    }
                     throw new IllegalStateException(
                             String.format("Invalid event from daemon (%s)", raw));
-                }
-                if (cooked[2].equals("added")) {
-                    notifyInterfaceAdded(cooked[3]);
-                    return true;
-                } else if (cooked[2].equals("removed")) {
-                    notifyInterfaceRemoved(cooked[3]);
-                    return true;
-                } else if (cooked[2].equals("changed") && cooked.length == 5) {
-                    notifyInterfaceStatusChanged(cooked[3], cooked[4].equals("up"));
-                    return true;
-                } else if (cooked[2].equals("linkstate") && cooked.length == 5) {
-                    notifyInterfaceLinkStateChanged(cooked[3], cooked[4].equals("up"));
-                    return true;
-                }
-                throw new IllegalStateException(
-                        String.format("Invalid event from daemon (%s)", raw));
+                    // break;
+            case NetdResponseCode.BandwidthControl:
+                    /*
+                     * Bandwidth control needs some attention
+                     * Format: "NNN limit alert <alertName> <ifaceName>"
+                     */
+                    if (cooked.length < 5 || !cooked[1].equals("limit")) {
+                        throw new IllegalStateException(
+                                String.format("Invalid event from daemon (%s)", raw));
+                    }
+                    if (cooked[2].equals("alert")) {
+                        notifyLimitReached(cooked[3], cooked[4]);
+                        return true;
+                    }
+                    throw new IllegalStateException(
+                            String.format("Invalid event from daemon (%s)", raw));
+                    // break;
+            default: break;
             }
             return false;
         }
index 4ecdfed..5d7a48f 100755 (executable)
@@ -262,7 +262,7 @@ public class NotificationManagerService extends INotificationManager.Stub
 
         public void onNotificationClick(String pkg, String tag, int id) {
             cancelNotification(pkg, tag, id, Notification.FLAG_AUTO_CANCEL,
-                    Notification.FLAG_FOREGROUND_SERVICE, true);
+                    Notification.FLAG_FOREGROUND_SERVICE, false);
         }
 
         public void onNotificationClear(String pkg, String tag, int id) {
index 286a937..4ced83c 100644 (file)
@@ -22,10 +22,10 @@ import android.content.Context;
 import android.content.Intent;
 import android.content.pm.PackageManager;
 import android.content.res.Resources;
-import android.os.IBinder;
-import android.os.RemoteException;
 import android.os.Binder;
 import android.os.Handler;
+import android.os.IBinder;
+import android.os.RemoteException;
 import android.util.Slog;
 import android.view.View;
 
@@ -175,7 +175,8 @@ public class StatusBarManagerService extends IStatusBarService.Stub
         }
     }
 
-    public void setIcon(String slot, String iconPackage, int iconId, int iconLevel) {
+    public void setIcon(String slot, String iconPackage, int iconId, int iconLevel,
+            String contentDescription) {
         enforceStatusBar();
 
         synchronized (mIcons) {
@@ -184,7 +185,8 @@ public class StatusBarManagerService extends IStatusBarService.Stub
                 throw new SecurityException("invalid status bar icon slot: " + slot);
             }
 
-            StatusBarIcon icon = new StatusBarIcon(iconPackage, iconId, iconLevel);
+            StatusBarIcon icon = new StatusBarIcon(iconPackage, iconId, iconLevel, 0,
+                    contentDescription);
             //Slog.d(TAG, "setIcon slot=" + slot + " index=" + index + " icon=" + icon);
             mIcons.setIcon(index, icon);
 
index 8c7e279..7666591 100644 (file)
@@ -230,6 +230,7 @@ class ServerThread extends Thread {
         WallpaperManagerService wallpaper = null;
         LocationManagerService location = null;
         CountryDetectorService countryDetector = null;
+        TextServicesManagerService tsms = null;
 
         if (factoryTest != SystemServer.FACTORY_TEST_LOW_LEVEL) {
             try {
@@ -273,6 +274,14 @@ class ServerThread extends Thread {
             }
 
             try {
+                Slog.i(TAG, "Text Service Manager Service");
+                tsms = new TextServicesManagerService(context);
+                ServiceManager.addService(Context.TEXT_SERVICES_MANAGER_SERVICE, tsms);
+            } catch (Throwable e) {
+                Slog.e(TAG, "Failure starting Text Service Manager Service", e);
+            }
+
+            try {
                 Slog.i(TAG, "NetworkStats Service");
                 networkStats = new NetworkStatsService(context, networkManagement, alarm);
                 ServiceManager.addService(Context.NETWORK_STATS_SERVICE, networkStats);
@@ -538,6 +547,7 @@ class ServerThread extends Thread {
         final LocationManagerService locationF = location;
         final CountryDetectorService countryDetectorF = countryDetector;
         final NetworkTimeUpdateService networkTimeUpdaterF = networkTimeUpdater;
+        final TextServicesManagerService textServiceManagerServiceF = tsms;
 
         // We now tell the activity manager it is okay to run third party
         // code.  It will call back into us once it has gotten to the state
@@ -571,6 +581,7 @@ class ServerThread extends Thread {
                 if (countryDetectorF != null) countryDetectorF.systemReady();
                 if (throttleF != null) throttleF.systemReady();
                 if (networkTimeUpdaterF != null) networkTimeUpdaterF.systemReady();
+                if (textServiceManagerServiceF != null) textServiceManagerServiceF.systemReady();
             }
         });
 
diff --git a/services/java/com/android/server/TextServicesManagerService.java b/services/java/com/android/server/TextServicesManagerService.java
new file mode 100644 (file)
index 0000000..4a0c837
--- /dev/null
@@ -0,0 +1,346 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.content.PackageMonitor;
+import com.android.internal.textservice.ISpellCheckerService;
+import com.android.internal.textservice.ISpellCheckerSession;
+import com.android.internal.textservice.ISpellCheckerSessionListener;
+import com.android.internal.textservice.ITextServicesManager;
+import com.android.internal.textservice.ITextServicesSessionListener;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.content.pm.ServiceInfo;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.os.SystemClock;
+import android.provider.Settings;
+import android.text.TextUtils;
+import android.service.textservice.SpellCheckerService;
+import android.util.Log;
+import android.util.Slog;
+import android.view.textservice.SpellCheckerInfo;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+
+public class TextServicesManagerService extends ITextServicesManager.Stub {
+    private static final String TAG = TextServicesManagerService.class.getSimpleName();
+    private static final boolean DBG = false;
+
+    private final Context mContext;
+    private boolean mSystemReady;
+    private final TextServicesMonitor mMonitor;
+    private final HashMap<String, SpellCheckerInfo> mSpellCheckerMap =
+            new HashMap<String, SpellCheckerInfo>();
+    private final ArrayList<SpellCheckerInfo> mSpellCheckerList = new ArrayList<SpellCheckerInfo>();
+    private final HashMap<String, SpellCheckerBindGroup> mSpellCheckerBindGroups =
+            new HashMap<String, SpellCheckerBindGroup>();
+
+    public void systemReady() {
+        if (!mSystemReady) {
+            mSystemReady = true;
+        }
+    }
+
+    public TextServicesManagerService(Context context) {
+        mSystemReady = false;
+        mContext = context;
+        mMonitor = new TextServicesMonitor();
+        mMonitor.register(context, true);
+        synchronized (mSpellCheckerMap) {
+            buildSpellCheckerMapLocked(context, mSpellCheckerList, mSpellCheckerMap);
+        }
+    }
+
+    private class TextServicesMonitor extends PackageMonitor {
+        @Override
+        public void onSomePackagesChanged() {
+            synchronized (mSpellCheckerMap) {
+                buildSpellCheckerMapLocked(mContext, mSpellCheckerList, mSpellCheckerMap);
+                // TODO: Update for each locale
+                SpellCheckerInfo sci = getCurrentSpellChecker(null);
+                if (sci == null) {
+                    sci = findAvailSpellCheckerLocked(null, null);
+                    if (sci == null) return;
+                    // Set the current spell checker if there is one or more spell checkers
+                    // available. In this case, "sci" is the first one in the available spell
+                    // checkers.
+                    setCurrentSpellChecker(sci);
+                }
+                final String packageName = sci.getPackageName();
+                final int change = isPackageDisappearing(packageName);
+                if (change == PACKAGE_PERMANENT_CHANGE || change == PACKAGE_TEMPORARY_CHANGE) {
+                    // Package disappearing
+                    setCurrentSpellChecker(findAvailSpellCheckerLocked(null, packageName));
+                } else if (isPackageModified(packageName)) {
+                    // Package modified
+                    setCurrentSpellChecker(findAvailSpellCheckerLocked(null, packageName));
+                }
+            }
+        }
+    }
+
+    private static void buildSpellCheckerMapLocked(Context context,
+            ArrayList<SpellCheckerInfo> list, HashMap<String, SpellCheckerInfo> map) {
+        list.clear();
+        map.clear();
+        final PackageManager pm = context.getPackageManager();
+        List<ResolveInfo> services = pm.queryIntentServices(
+                new Intent(SpellCheckerService.SERVICE_INTERFACE), PackageManager.GET_META_DATA);
+        final int N = services.size();
+        for (int i = 0; i < N; ++i) {
+            final ResolveInfo ri = services.get(i);
+            final ServiceInfo si = ri.serviceInfo;
+            final ComponentName compName = new ComponentName(si.packageName, si.name);
+            if (!android.Manifest.permission.BIND_TEXT_SERVICE.equals(si.permission)) {
+                Slog.w(TAG, "Skipping text service " + compName
+                        + ": it does not require the permission "
+                        + android.Manifest.permission.BIND_TEXT_SERVICE);
+                continue;
+            }
+            if (DBG) Slog.d(TAG, "Add: " + compName);
+            final SpellCheckerInfo sci = new SpellCheckerInfo(context, ri);
+            list.add(sci);
+            map.put(sci.getId(), sci);
+        }
+    }
+
+    // TODO: find an appropriate spell checker for specified locale
+    private SpellCheckerInfo findAvailSpellCheckerLocked(String locale, String prefPackage) {
+        final int spellCheckersCount = mSpellCheckerList.size();
+        if (spellCheckersCount == 0) {
+            Slog.w(TAG, "no available spell checker services found");
+            return null;
+        }
+        if (prefPackage != null) {
+            for (int i = 0; i < spellCheckersCount; ++i) {
+                final SpellCheckerInfo sci = mSpellCheckerList.get(i);
+                if (prefPackage.equals(sci.getPackageName())) {
+                    return sci;
+                }
+            }
+        }
+        if (spellCheckersCount > 1) {
+            Slog.w(TAG, "more than one spell checker service found, picking first");
+        }
+        return mSpellCheckerList.get(0);
+    }
+
+    // TODO: Save SpellCheckerService by supported languages. Currently only one spell
+    // checker is saved.
+    @Override
+    public SpellCheckerInfo getCurrentSpellChecker(String locale) {
+        synchronized (mSpellCheckerMap) {
+            final String curSpellCheckerId =
+                    Settings.Secure.getString(mContext.getContentResolver(),
+                            Settings.Secure.SPELL_CHECKER_SERVICE);
+            if (TextUtils.isEmpty(curSpellCheckerId)) {
+                return null;
+            }
+            return mSpellCheckerMap.get(curSpellCheckerId);
+        }
+    }
+
+    @Override
+    public void getSpellCheckerService(SpellCheckerInfo info, String locale,
+            ITextServicesSessionListener tsListener, ISpellCheckerSessionListener scListener) {
+        if (!mSystemReady) {
+            return;
+        }
+        if (info == null || tsListener == null) {
+            Slog.e(TAG, "getSpellCheckerService: Invalid input.");
+            return;
+        }
+        final String sciId = info.getId();
+        synchronized(mSpellCheckerMap) {
+            if (!mSpellCheckerMap.containsKey(sciId)) {
+                return;
+            }
+            if (mSpellCheckerBindGroups.containsKey(sciId)) {
+                mSpellCheckerBindGroups.get(sciId).addListener(tsListener, locale, scListener);
+                return;
+            }
+            final InternalServiceConnection connection = new InternalServiceConnection(
+                    sciId, locale, scListener);
+            final Intent serviceIntent = new Intent(SpellCheckerService.SERVICE_INTERFACE);
+            serviceIntent.setComponent(info.getComponent());
+            if (!mContext.bindService(serviceIntent, connection, Context.BIND_AUTO_CREATE)) {
+                Slog.e(TAG, "Failed to get a spell checker service.");
+                return;
+            }
+            final SpellCheckerBindGroup group = new SpellCheckerBindGroup(
+                    connection, tsListener, locale, scListener);
+            mSpellCheckerBindGroups.put(sciId, group);
+        }
+        return;
+    }
+
+    @Override
+    public void finishSpellCheckerService(ISpellCheckerSessionListener listener) {
+        synchronized(mSpellCheckerMap) {
+            for (SpellCheckerBindGroup group : mSpellCheckerBindGroups.values()) {
+                if (group == null) continue;
+                group.removeListener(listener);
+            }
+        }
+    }
+
+    private void setCurrentSpellChecker(SpellCheckerInfo sci) {
+        if (sci == null || mSpellCheckerMap.containsKey(sci.getId())) return;
+        Settings.Secure.putString(mContext.getContentResolver(),
+                Settings.Secure.SPELL_CHECKER_SERVICE, sci == null ? "" : sci.getId());
+    }
+
+    // SpellCheckerBindGroup contains active text service session listeners.
+    // If there are no listeners anymore, the SpellCheckerBindGroup instance will be removed from
+    // mSpellCheckerBindGroups
+    private class SpellCheckerBindGroup {
+        final InternalServiceConnection mInternalConnection;
+        final ArrayList<InternalDeathRecipient> mListeners =
+                new ArrayList<InternalDeathRecipient>();
+
+        public SpellCheckerBindGroup(InternalServiceConnection connection,
+                ITextServicesSessionListener listener, String locale,
+                ISpellCheckerSessionListener scListener) {
+            mInternalConnection = connection;
+            addListener(listener, locale, scListener);
+        }
+
+        public void onServiceConnected(ISpellCheckerService spellChecker) {
+            synchronized(mSpellCheckerMap) {
+                for (InternalDeathRecipient listener : mListeners) {
+                    try {
+                        final ISpellCheckerSession session = spellChecker.getISpellCheckerSession(
+                                listener.mScLocale, listener.mScListener);
+                        listener.mTsListener.onServiceConnected(session);
+                    } catch (RemoteException e) {
+                    }
+                }
+            }
+        }
+
+        public void addListener(ITextServicesSessionListener tsListener, String locale,
+                ISpellCheckerSessionListener scListener) {
+            synchronized(mSpellCheckerMap) {
+                try {
+                    final int size = mListeners.size();
+                    for (int i = 0; i < size; ++i) {
+                        if (mListeners.get(i).hasSpellCheckerListener(scListener)) {
+                            // do not add the lister if the group already contains this.
+                            return;
+                        }
+                    }
+                    final InternalDeathRecipient recipient = new InternalDeathRecipient(
+                            this, tsListener, locale, scListener);
+                    scListener.asBinder().linkToDeath(recipient, 0);
+                    mListeners.add(new InternalDeathRecipient(
+                            this, tsListener, locale, scListener));
+                } catch(RemoteException e) {
+                    // do nothing
+                }
+                cleanLocked();
+            }
+        }
+
+        public void removeListener(ISpellCheckerSessionListener listener) {
+            synchronized(mSpellCheckerMap) {
+                final int size = mListeners.size();
+                final ArrayList<InternalDeathRecipient> removeList =
+                        new ArrayList<InternalDeathRecipient>();
+                for (int i = 0; i < size; ++i) {
+                    final InternalDeathRecipient tempRecipient = mListeners.get(i);
+                    if(tempRecipient.hasSpellCheckerListener(listener)) {
+                        removeList.add(tempRecipient);
+                    }
+                }
+                final int removeSize = removeList.size();
+                for (int i = 0; i < removeSize; ++i) {
+                    mListeners.remove(removeList.get(i));
+                }
+                cleanLocked();
+            }
+        }
+
+        private void cleanLocked() {
+            if (mListeners.isEmpty()) {
+                mSpellCheckerBindGroups.remove(this);
+                // Unbind service when there is no active clients.
+                mContext.unbindService(mInternalConnection);
+            }
+        }
+    }
+
+    private class InternalServiceConnection implements ServiceConnection {
+        private final ISpellCheckerSessionListener mListener;
+        private final String mSciId;
+        private final String mLocale;
+        public InternalServiceConnection(
+                String id, String locale, ISpellCheckerSessionListener listener) {
+            mSciId = id;
+            mLocale = locale;
+            mListener = listener;
+        }
+
+        @Override
+        public void onServiceConnected(ComponentName name, IBinder service) {
+            synchronized(mSpellCheckerMap) {
+                ISpellCheckerService spellChecker = ISpellCheckerService.Stub.asInterface(service);
+                final SpellCheckerBindGroup group = mSpellCheckerBindGroups.get(mSciId);
+                if (group != null) {
+                    group.onServiceConnected(spellChecker);
+                }
+            }
+        }
+
+        @Override
+        public void onServiceDisconnected(ComponentName name) {
+            mSpellCheckerBindGroups.remove(mSciId);
+        }
+    }
+
+    private class InternalDeathRecipient implements IBinder.DeathRecipient {
+        public final ITextServicesSessionListener mTsListener;
+        public final ISpellCheckerSessionListener mScListener;
+        public final String mScLocale;
+        private final SpellCheckerBindGroup mGroup;
+        public InternalDeathRecipient(SpellCheckerBindGroup group,
+                ITextServicesSessionListener tsListener, String scLocale,
+                ISpellCheckerSessionListener scListener) {
+            mTsListener = tsListener;
+            mScListener = scListener;
+            mScLocale = scLocale;
+            mGroup = group;
+        }
+
+        public boolean hasSpellCheckerListener(ISpellCheckerSessionListener listener) {
+            return mScListener.equals(listener);
+        }
+
+        @Override
+        public void binderDied() {
+            mGroup.removeListener(mScListener);
+        }
+    }
+}
index b8890aa..cd649ce 100644 (file)
@@ -194,6 +194,7 @@ public class ThrottleService extends IThrottleManager.Stub {
         }
 
         public void interfaceRemoved(String iface) {}
+        public void limitReached(String limitName, String iface) {}
     }
 
 
index 7112553..f9f63b1 100644 (file)
@@ -1461,7 +1461,7 @@ public class WifiService extends IWifiManager.Stub {
             if (mMulticasters.size() != 0) {
                 return;
             } else {
-                mWifiStateMachine.startPacketFiltering();
+                mWifiStateMachine.startFilteringMulticastV4Packets();
             }
         }
     }
@@ -1472,11 +1472,11 @@ public class WifiService extends IWifiManager.Stub {
         synchronized (mMulticasters) {
             mMulticastEnabled++;
             mMulticasters.add(new Multicaster(tag, binder));
-            // Note that we could call stopPacketFiltering only when
+            // Note that we could call stopFilteringMulticastV4Packets only when
             // our new size == 1 (first call), but this function won't
             // be called often and by making the stopPacket call each
             // time we're less fragile and self-healing.
-            mWifiStateMachine.stopPacketFiltering();
+            mWifiStateMachine.stopFilteringMulticastV4Packets();
         }
 
         int uid = Binder.getCallingUid();
@@ -1513,7 +1513,7 @@ public class WifiService extends IWifiManager.Stub {
             removed.unlinkDeathRecipient();
         }
         if (mMulticasters.size() == 0) {
-            mWifiStateMachine.startPacketFiltering();
+            mWifiStateMachine.startFilteringMulticastV4Packets();
         }
 
         Long ident = Binder.clearCallingIdentity();
index 94af46d..3389f33 100644 (file)
@@ -2439,7 +2439,7 @@ public final class ActivityManagerService extends ActivityManagerNative
                     r.mayFreezeScreenLocked(r.app) ? r : null);
             if (config != null) {
                 r.frozenBeforeDestroy = true;
-                if (!updateConfigurationLocked(config, r)) {
+                if (!updateConfigurationLocked(config, r, false)) {
                     mMainStack.resumeTopActivityLocked(null);
                 }
             }
@@ -3628,6 +3628,7 @@ public final class ActivityManagerService extends ActivityManagerNative
         app.setSchedGroup = Process.THREAD_GROUP_BG_NONINTERACTIVE;
         app.forcingToForeground = null;
         app.foregroundServices = false;
+        app.hasShownUi = false;
         app.debugging = false;
 
         mHandler.removeMessages(PROC_START_TIMEOUT_MSG, app);
@@ -9218,6 +9219,7 @@ public final class ActivityManagerService extends ActivityManagerNative
         app.forcingToForeground = null;
         app.foregroundServices = false;
         app.foregroundActivities = false;
+        app.hasShownUi = false;
 
         killServicesLocked(app, true);
 
@@ -9331,8 +9333,6 @@ public final class ActivityManagerService extends ActivityManagerNative
             // 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
             // and start a new process for it.
-            app.forcingToForeground = null;
-            app.foregroundServices = false;
             if (mPersistentStartingProcesses.indexOf(app) < 0) {
                 mPersistentStartingProcesses.add(app);
                 restart = true;
@@ -12398,6 +12398,22 @@ public final class ActivityManagerService extends ActivityManagerNative
         return ci;
     }
 
+    public void updatePersistentConfiguration(Configuration values) {
+        enforceCallingPermission(android.Manifest.permission.CHANGE_CONFIGURATION,
+                "updateConfiguration()");
+        enforceCallingPermission(android.Manifest.permission.WRITE_SETTINGS,
+                "updateConfiguration()");
+        if (values == null) {
+            throw new NullPointerException("Configuration must not be null");
+        }
+
+        synchronized(this) {
+            final long origId = Binder.clearCallingIdentity();
+            updateConfigurationLocked(values, null, true);
+            Binder.restoreCallingIdentity(origId);
+        }
+    }
+
     public void updateConfiguration(Configuration values) {
         enforceCallingPermission(android.Manifest.permission.CHANGE_CONFIGURATION,
                 "updateConfiguration()");
@@ -12409,7 +12425,10 @@ public final class ActivityManagerService extends ActivityManagerNative
             }
             
             final long origId = Binder.clearCallingIdentity();
-            updateConfigurationLocked(values, null);
+            if (values != null) {
+                Settings.System.clearConfiguration(values);
+            }
+            updateConfigurationLocked(values, null, false);
             Binder.restoreCallingIdentity(origId);
         }
     }
@@ -12420,9 +12439,10 @@ public final class ActivityManagerService extends ActivityManagerNative
      * configuration.  Returns true if the activity has been left running, or
      * false if <var>starting</var> is being destroyed to match the new
      * configuration.
+     * @param persistent TODO
      */
     public boolean updateConfigurationLocked(Configuration values,
-            ActivityRecord starting) {
+            ActivityRecord starting, boolean persistent) {
         int changes = 0;
         
         boolean kept = true;
@@ -12465,7 +12485,7 @@ public final class ActivityManagerService extends ActivityManagerNative
                 // code is executed.
                 mSystemThread.applyConfigurationToResources(newConfig);
 
-                if (Settings.System.hasInterestingConfigurationChanges(changes)) {
+                if (persistent && Settings.System.hasInterestingConfigurationChanges(changes)) {
                     Message msg = mHandler.obtainMessage(UPDATE_CONFIGURATION_MSG);
                     msg.obj = new Configuration(mConfiguration);
                     mHandler.sendMessage(msg);
@@ -12708,21 +12728,31 @@ public final class ActivityManagerService extends ActivityManagerNative
             while (jt.hasNext() && adj > FOREGROUND_APP_ADJ) {
                 ServiceRecord s = jt.next();
                 if (s.startRequested) {
-                    if (now < (s.lastActivity+MAX_SERVICE_INACTIVITY)) {
-                        // This service has seen some activity within
-                        // recent memory, so we will keep its process ahead
-                        // of the background processes.
+                    if (app.hasShownUi) {
+                        // If this process has shown some UI, let it immediately
+                        // go to the LRU list because it may be pretty heavy with
+                        // UI stuff.  We'll tag it with a label just to help
+                        // debug and understand what is going on.
                         if (adj > SECONDARY_SERVER_ADJ) {
-                            adj = SECONDARY_SERVER_ADJ;
-                            app.adjType = "started-services";
-                            app.hidden = false;
+                            app.adjType = "started-bg-ui-services";
+                        }
+                    } else {
+                        if (now < (s.lastActivity+MAX_SERVICE_INACTIVITY)) {
+                            // This service has seen some activity within
+                            // recent memory, so we will keep its process ahead
+                            // of the background processes.
+                            if (adj > SECONDARY_SERVER_ADJ) {
+                                adj = SECONDARY_SERVER_ADJ;
+                                app.adjType = "started-services";
+                                app.hidden = false;
+                            }
+                        }
+                        // If we have let the service slide into the background
+                        // state, still have some text describing what it is doing
+                        // even though the service no longer has an impact.
+                        if (adj > SECONDARY_SERVER_ADJ) {
+                            app.adjType = "started-bg-services";
                         }
-                    }
-                    // If we have let the service slide into the background
-                    // state, still have some text describing what it is doing
-                    // even though the service no longer has an impact.
-                    if (adj > SECONDARY_SERVER_ADJ) {
-                        app.adjType = "started-bg-services";
                     }
                     // Don't kill this process because it is doing work; it
                     // has said it is doing work.
@@ -13331,15 +13361,15 @@ public final class ActivityManagerService extends ActivityManagerNative
                                 break;
                         }
                     }
-                } else if (app.curAdj >= PERCEPTIBLE_APP_ADJ) {
-                    if (app.trimMemoryLevel < ComponentCallbacks.TRIM_MEMORY_INVISIBLE
+                } else if (app.curAdj == HEAVY_WEIGHT_APP_ADJ) {
+                    if (app.trimMemoryLevel < ComponentCallbacks.TRIM_MEMORY_BACKGROUND
                             && app.thread != null) {
                         try {
-                            app.thread.scheduleTrimMemory(ComponentCallbacks.TRIM_MEMORY_INVISIBLE);
+                            app.thread.scheduleTrimMemory(ComponentCallbacks.TRIM_MEMORY_BACKGROUND);
                         } catch (RemoteException e) {
                         }
                     }
-                    app.trimMemoryLevel = ComponentCallbacks.TRIM_MEMORY_INVISIBLE;
+                    app.trimMemoryLevel = ComponentCallbacks.TRIM_MEMORY_BACKGROUND;
                 } else {
                     app.trimMemoryLevel = 0;
                 }
@@ -13422,7 +13452,7 @@ public final class ActivityManagerService extends ActivityManagerNative
     }
 
     public boolean profileControl(String process, boolean start,
-            String path, ParcelFileDescriptor fd) throws RemoteException {
+            String path, ParcelFileDescriptor fd, int profileType) throws RemoteException {
 
         try {
             synchronized (this) {
@@ -13467,7 +13497,7 @@ public final class ActivityManagerService extends ActivityManagerNative
                     }
                 }
             
-                proc.thread.profilerControl(start, path, fd);
+                proc.thread.profilerControl(start, path, fd, profileType);
                 fd = null;
                 return true;
             }
index 93d8164..cc58eaf 100644 (file)
@@ -518,7 +518,7 @@ final class ActivityStack {
             Configuration config = mService.mWindowManager.updateOrientationFromAppTokens(
                     mService.mConfiguration,
                     r.mayFreezeScreenLocked(app) ? r : null);
-            mService.updateConfigurationLocked(config, r);
+            mService.updateConfigurationLocked(config, r, false);
         }
 
         r.app = app;
@@ -559,6 +559,7 @@ final class ActivityStack {
             r.forceNewConfig = false;
             showAskCompatModeDialogLocked(r);
             r.compat = mService.compatibilityInfoForPackageLocked(r.info.applicationInfo);
+            app.hasShownUi = true;
             app.thread.scheduleLaunchActivity(new Intent(r.intent), r,
                     System.identityHashCode(r),
                     r.info, r.compat, r.icicle, results, newIntents, !andResume,
@@ -1424,7 +1425,7 @@ final class ActivityStack {
                     if (config != null) {
                         next.frozenBeforeDestroy = true;
                     }
-                    updated = mService.updateConfigurationLocked(config, next);
+                    updated = mService.updateConfigurationLocked(config, next, false);
                 }
             }
             if (!updated) {
@@ -2817,7 +2818,7 @@ final class ActivityStack {
                 mConfigWillChange = false;
                 if (DEBUG_CONFIGURATION) Slog.v(TAG,
                         "Updating to new configuration after starting activity.");
-                mService.updateConfigurationLocked(config, null);
+                mService.updateConfigurationLocked(config, null, false);
             }
             
             Binder.restoreCallingIdentity(origId);
index 9e597aa..5b59363 100644 (file)
@@ -66,6 +66,7 @@ class ProcessRecord {
     boolean setIsForeground;    // Running foreground UI when last set?
     boolean foregroundServices; // Running any services that are foreground?
     boolean foregroundActivities; // Running any activities that are foreground?
+    boolean hasShownUi;         // Has UI been shown in this process since it was started?
     boolean bad;                // True if disabled in the bad process list
     boolean killedBackground;   // True when proc has been killed due to too many bg
     String waitingToKill;       // Process is waiting to be killed when in the bg; reason
@@ -185,6 +186,7 @@ class ProcessRecord {
         pw.print(prefix); pw.print("curSchedGroup="); pw.print(curSchedGroup);
                 pw.print(" setSchedGroup="); pw.print(setSchedGroup);
                 pw.print(" trimMemoryLevel="); pw.println(trimMemoryLevel);
+                pw.print(" hasShownUi="); pw.println(hasShownUi);
         pw.print(prefix); pw.print("setIsForeground="); pw.print(setIsForeground);
                 pw.print(" foregroundServices="); pw.print(foregroundServices);
                 pw.print(" forcingToForeground="); pw.println(forcingToForeground);
index d7d4b03..82bc505 100644 (file)
@@ -288,6 +288,8 @@ public class Tethering extends INetworkManagementEventObserver.Stub {
         }
     }
 
+    public void limitReached(String limitName, String iface) {}
+
     public int tether(String iface) {
         Log.d(TAG, "Tethering " + iface);
         TetherInterfaceSM sm = null;
index 05e95a7..cf75d6b 100644 (file)
@@ -248,6 +248,8 @@ public class Vpn extends INetworkManagementEventObserver.Stub {
         }
     }
 
+    public void limitReached(String limitName, String iface) {}
+
     private void showNotification(VpnConfig config, String label, Bitmap icon) {
         NotificationManager nm = (NotificationManager)
                 mContext.getSystemService(Context.NOTIFICATION_SERVICE);
index 5ed7988..f270003 100644 (file)
@@ -1093,8 +1093,7 @@ final class Settings {
             serializer.attribute(null, "uidError", "true");
         }
         if (pkg.enabled != COMPONENT_ENABLED_STATE_DEFAULT) {
-            serializer.attribute(null, "enabled",
-                    pkg.enabled == COMPONENT_ENABLED_STATE_ENABLED ? "true" : "false");
+            serializer.attribute(null, "enabled", Integer.toString(pkg.enabled));
         }
         if (pkg.installStatus == PackageSettingBase.PKG_INSTALL_INCOMPLETE) {
             serializer.attribute(null, "installStatus", "false");
@@ -1644,17 +1643,21 @@ final class Settings {
             packageSetting.nativeLibraryPathString = nativeLibraryPathStr;
             final String enabledStr = parser.getAttributeValue(null, "enabled");
             if (enabledStr != null) {
-                if (enabledStr.equalsIgnoreCase("true")) {
-                    packageSetting.enabled = COMPONENT_ENABLED_STATE_ENABLED;
-                } else if (enabledStr.equalsIgnoreCase("false")) {
-                    packageSetting.enabled = COMPONENT_ENABLED_STATE_DISABLED;
-                } else if (enabledStr.equalsIgnoreCase("default")) {
-                    packageSetting.enabled = COMPONENT_ENABLED_STATE_DEFAULT;
-                } else {
-                    PackageManagerService.reportSettingsProblem(Log.WARN,
-                            "Error in package manager settings: package " + name
-                                    + " has bad enabled value: " + idStr + " at "
-                                    + parser.getPositionDescription());
+                try {
+                    packageSetting.enabled = Integer.parseInt(enabledStr);
+                } catch (NumberFormatException e) {
+                    if (enabledStr.equalsIgnoreCase("true")) {
+                        packageSetting.enabled = COMPONENT_ENABLED_STATE_ENABLED;
+                    } else if (enabledStr.equalsIgnoreCase("false")) {
+                        packageSetting.enabled = COMPONENT_ENABLED_STATE_DISABLED;
+                    } else if (enabledStr.equalsIgnoreCase("default")) {
+                        packageSetting.enabled = COMPONENT_ENABLED_STATE_DEFAULT;
+                    } else {
+                        PackageManagerService.reportSettingsProblem(Log.WARN,
+                                "Error in package manager settings: package " + name
+                                        + " has bad enabled value: " + idStr + " at "
+                                        + parser.getPositionDescription());
+                    }
                 }
             } else {
                 packageSetting.enabled = COMPONENT_ENABLED_STATE_DEFAULT;
index c80cd0a..f183f83 100644 (file)
@@ -19,6 +19,7 @@ package com.android.server.usb;
 import android.app.PendingIntent;
 import android.app.Notification;
 import android.app.NotificationManager;
+import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.ContentResolver;
 import android.content.Context;
@@ -80,6 +81,7 @@ public class UsbDeviceManager {
     private static final int MSG_ENABLE_ADB = 1;
     private static final int MSG_SET_CURRENT_FUNCTION = 2;
     private static final int MSG_SYSTEM_READY = 3;
+    private static final int MSG_BOOT_COMPLETED = 4;
 
     // Delay for debouncing USB disconnects.
     // We often get rapid connect/disconnect events when enabling USB functions,
@@ -87,7 +89,7 @@ public class UsbDeviceManager {
     private static final int UPDATE_DELAY = 1000;
 
     private UsbHandler mHandler;
-    private boolean mSystemReady;
+    private boolean mBootCompleted;
 
     private final Context mContext;
     private final ContentResolver mContentResolver;
@@ -141,10 +143,15 @@ public class UsbDeviceManager {
                 Process.THREAD_PRIORITY_BACKGROUND);
         thread.start();
         mHandler = new UsbHandler(thread.getLooper());
+
+        if (nativeIsStartRequested()) {
+            if (DEBUG) Slog.d(TAG, "accessory attached at boot");
+            setCurrentFunction(UsbManager.USB_FUNCTION_ACCESSORY, false);
+        }
     }
 
     public void systemReady() {
-        mSystemReady = true;
+        if (DEBUG) Slog.d(TAG, "systemReady");
 
         mNotificationManager = (NotificationManager)
                 mContext.getSystemService(Context.NOTIFICATION_SERVICE);
@@ -236,15 +243,22 @@ public class UsbDeviceManager {
         private String mCurrentFunctions;
         private String mDefaultFunctions;
         private UsbAccessory mCurrentAccessory;
-        private boolean mDeferAccessoryAttached;
         private int mUsbNotificationId;
         private boolean mAdbNotificationShown;
 
+        private final BroadcastReceiver mBootCompletedReceiver = new BroadcastReceiver() {
+            public void onReceive(Context context, Intent intent) {
+                if (DEBUG) Slog.d(TAG, "boot completed");
+                mHandler.sendEmptyMessage(MSG_BOOT_COMPLETED);
+            }
+        };
+
         private static final int NOTIFICATION_NONE = 0;
         private static final int NOTIFICATION_MTP = 1;
         private static final int NOTIFICATION_PTP = 2;
         private static final int NOTIFICATION_INSTALLER = 3;
-        private static final int NOTIFICATION_ADB = 4;
+        private static final int NOTIFICATION_ACCESSORY = 4;
+        private static final int NOTIFICATION_ADB = 5;
 
         public UsbHandler(Looper looper) {
             super(looper);
@@ -285,6 +299,9 @@ public class UsbDeviceManager {
                 // Watch for USB configuration changes
                 mUEventObserver.startObserving(USB_STATE_MATCH);
                 mUEventObserver.startObserving(ACCESSORY_START_MATCH);
+
+                mContext.registerReceiver(mBootCompletedReceiver,
+                        new IntentFilter(Intent.ACTION_BOOT_COMPLETED));
             } catch (Exception e) {
                 Slog.e(TAG, "Error initializing UsbHandler", e);
             }
@@ -406,11 +423,9 @@ public class UsbDeviceManager {
                     mCurrentAccessory = new UsbAccessory(strings);
                     Slog.d(TAG, "entering USB accessory mode: " + mCurrentAccessory);
                     // defer accessoryAttached if system is not ready
-                    if (mSystemReady) {
+                    if (mBootCompleted) {
                         mSettingsManager.accessoryAttached(mCurrentAccessory);
-                    } else {
-                        mDeferAccessoryAttached = true;
-                    }
+                    } // else handle in mBootCompletedReceiver
                 } else {
                     Slog.e(TAG, "nativeGetAccessoryStrings failed");
                 }
@@ -421,7 +436,7 @@ public class UsbDeviceManager {
                 setEnabledFunctions(mDefaultFunctions);
 
                 if (mCurrentAccessory != null) {
-                    if (mSystemReady) {
+                    if (mBootCompleted) {
                         mSettingsManager.accessoryDetached(mCurrentAccessory);
                     }
                     mCurrentAccessory = null;
@@ -463,7 +478,7 @@ public class UsbDeviceManager {
                         // restore defaults when USB is disconnected
                         doSetCurrentFunctions(mDefaultFunctions);
                     }
-                    if (mSystemReady) {
+                    if (mBootCompleted) {
                         updateUsbState();
                     }
                     break;
@@ -497,7 +512,10 @@ public class UsbDeviceManager {
                     updateUsbNotification();
                     updateAdbNotification();
                     updateUsbState();
-                    if (mCurrentAccessory != null && mDeferAccessoryAttached) {
+                    break;
+                case MSG_BOOT_COMPLETED:
+                    mBootCompleted = true;
+                    if (mCurrentAccessory != null) {
                         mSettingsManager.accessoryAttached(mCurrentAccessory);
                     }
                     break;
@@ -527,6 +545,10 @@ public class UsbDeviceManager {
                     title = r.getText(
                         com.android.internal.R.string.usb_cd_installer_notification_title);
                     id = NOTIFICATION_INSTALLER;
+                } else if (containsFunction(mCurrentFunctions, UsbManager.USB_FUNCTION_ACCESSORY)) {
+                    title = r.getText(
+                        com.android.internal.R.string.usb_accessory_notification_title);
+                    id = NOTIFICATION_ACCESSORY;
                 } else {
                     Slog.e(TAG, "No known USB function in updateUsbNotification");
                 }
@@ -671,4 +693,5 @@ public class UsbDeviceManager {
 
     private native String[] nativeGetAccessoryStrings();
     private native ParcelFileDescriptor nativeOpenAccessory();
+    private native boolean nativeIsStartRequested();
 }
index 6954171..40f0dbd 100644 (file)
@@ -99,11 +99,26 @@ static jobject android_server_UsbDeviceManager_openAccessory(JNIEnv *env, jobjec
         gParcelFileDescriptorOffsets.mConstructor, fileDescriptor);
 }
 
+static jboolean android_server_UsbDeviceManager_isStartRequested(JNIEnv *env, jobject thiz)
+{
+    int fd = open(DRIVER_NAME, O_RDWR);
+    if (fd < 0) {
+        LOGE("could not open %s", DRIVER_NAME);
+        return false;
+    }
+    int result = ioctl(fd, ACCESSORY_IS_START_REQUESTED);
+    close(fd);
+    return (result == 1);
+}
+
+
 static JNINativeMethod method_table[] = {
     { "nativeGetAccessoryStrings",  "()[Ljava/lang/String;",
                                     (void*)android_server_UsbDeviceManager_getAccessoryStrings },
     { "nativeOpenAccessory",        "()Landroid/os/ParcelFileDescriptor;",
                                     (void*)android_server_UsbDeviceManager_openAccessory },
+    { "nativeIsStartRequested",     "()Z",
+                                    (void*)android_server_UsbDeviceManager_isStartRequested },
 };
 
 int register_android_server_UsbDeviceManager(JNIEnv *env)
index e0dce1f..5b74fb8 100644 (file)
@@ -586,12 +586,12 @@ status_t SensorService::SensorEventConnection::sendEvents(
     if (size == -EAGAIN) {
         // the destination doesn't accept events anymore, it's probably
         // full. For now, we just drop the events on the floor.
-        LOGW("dropping %d events on the floor", count);
+        //LOGW("dropping %d events on the floor", count);
         return size;
     }
 
-    LOGE_IF(size<0, "dropping %d events on the floor (%s)",
-            count, strerror(-size));
+    //LOGE_IF(size<0, "dropping %d events on the floor (%s)",
+    //        count, strerror(-size));
 
     return size < 0 ? status_t(size) : status_t(NO_ERROR);
 }
index f3b6c4d..e0268fa 100644 (file)
 
 namespace android {
 
-template <typename T> inline T min(T a, T b) {
-    return a<b ? a : b;
-}
-
 // ---------------------------------------------------------------------------
 
 Layer::Layer(SurfaceFlinger* flinger,
@@ -56,14 +52,14 @@ Layer::Layer(SurfaceFlinger* flinger,
         mTextureName(-1U),
         mQueuedFrames(0),
         mCurrentTransform(0),
+        mCurrentScalingMode(NATIVE_WINDOW_SCALING_MODE_FREEZE),
         mCurrentOpacity(true),
         mFormat(PIXEL_FORMAT_NONE),
         mGLExtensions(GLExtensions::getInstance()),
         mOpaqueLayer(true),
         mNeedsDithering(false),
         mSecure(false),
-        mProtectedByApp(false),
-        mFixedSize(false)
+        mProtectedByApp(false)
 {
     mCurrentCrop.makeInvalid();
     glGenTextures(1, &mTextureName);
@@ -400,14 +396,7 @@ uint32_t Layer::doTransaction(uint32_t flags)
 }
 
 bool Layer::isFixedSize() const {
-    Mutex::Autolock _l(mLock);
-    return mFixedSize;
-}
-
-void Layer::setFixedSize(bool fixedSize)
-{
-    Mutex::Autolock _l(mLock);
-    mFixedSize = fixedSize;
+    return mCurrentScalingMode != NATIVE_WINDOW_SCALING_MODE_FREEZE;
 }
 
 bool Layer::isCropped() const {
@@ -437,9 +426,14 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions)
 
         const Rect crop(mSurfaceTexture->getCurrentCrop());
         const uint32_t transform(mSurfaceTexture->getCurrentTransform());
-        if ((crop != mCurrentCrop) || (transform != mCurrentTransform)) {
+        const uint32_t scalingMode(mSurfaceTexture->getCurrentScalingMode());
+        if ((crop != mCurrentCrop) ||
+            (transform != mCurrentTransform) ||
+            (scalingMode != mCurrentScalingMode))
+        {
             mCurrentCrop = crop;
             mCurrentTransform = transform;
+            mCurrentScalingMode = scalingMode;
             mFlinger->invalidateHwcGeometry();
         }
 
@@ -459,13 +453,22 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions)
         // FIXME: mPostedDirtyRegion = dirty & bounds
         mPostedDirtyRegion.set(front.w, front.h);
 
-        sp<GraphicBuffer> newFrontBuffer(mActiveBuffer);
-        if ((newFrontBuffer->getWidth()  == front.requested_w &&
-            newFrontBuffer->getHeight() == front.requested_h) ||
-            isFixedSize())
+
+        if ((front.w != front.requested_w) ||
+            (front.h != front.requested_h))
         {
-            if ((front.w != front.requested_w) ||
-                (front.h != front.requested_h))
+            // check that we received a buffer of the right size
+            // (Take the buffer's orientation into account)
+            sp<GraphicBuffer> newFrontBuffer(mActiveBuffer);
+            uint32_t bufWidth  = newFrontBuffer->getWidth();
+            uint32_t bufHeight = newFrontBuffer->getHeight();
+            if (mCurrentTransform & Transform::ROT_90) {
+                swap(bufWidth, bufHeight);
+            }
+
+            if (isFixedSize() ||
+                    (bufWidth == front.requested_w &&
+                    bufHeight == front.requested_h))
             {
                 // Here we pretend the transaction happened by updating the
                 // current and drawing states. Drawing state is only accessed
@@ -485,10 +488,10 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions)
 
                 // recompute visible region
                 recomputeVisibleRegions = true;
-            }
 
-            // we now have the correct size, unfreeze the screen
-            mFreezeLock.clear();
+                // we now have the correct size, unfreeze the screen
+                mFreezeLock.clear();
+            }
         }
     }
 }
index e3fc13d..ddfc666 100644 (file)
@@ -59,7 +59,6 @@ public:
     status_t setBuffers(uint32_t w, uint32_t h, 
             PixelFormat format, uint32_t flags=0);
 
-    // Set this Layer's buffers size
     bool isFixedSize() const;
 
     // LayerBase interface
@@ -88,7 +87,6 @@ private:
     void onFrameQueued();
     virtual sp<ISurface> createSurface();
     uint32_t getEffectiveUsage(uint32_t usage) const;
-    void setFixedSize(bool fixedSize);
     bool isCropped() const;
     static bool getOpacityForFormat(uint32_t format);
 
@@ -106,6 +104,7 @@ private:
     GLfloat mTextureMatrix[16];
     Rect mCurrentCrop;
     uint32_t mCurrentTransform;
+    uint32_t mCurrentScalingMode;
     bool mCurrentOpacity;
 
     // constants
@@ -124,7 +123,6 @@ private:
 
     // binder thread, transaction thread
     mutable Mutex mLock;
-    bool mFixedSize;
 };
 
 // ---------------------------------------------------------------------------
index 680814c..4a27701 100644 (file)
@@ -1318,9 +1318,6 @@ sp<ISurface> SurfaceFlinger::createSurface(
         if (surfaceHandle != 0) {
             params->token = token;
             params->identity = layer->getIdentity();
-            params->width = w;
-            params->height = h;
-            params->format = format;
             if (normalLayer != 0) {
                 Mutex::Autolock _l(mStateLock);
                 mLayerMap.add(layer->getSurfaceBinder(), normalLayer);
index 60fa965..40659d4 100644 (file)
@@ -52,6 +52,24 @@ status_t SurfaceTextureLayer::setBufferCount(int bufferCount) {
     return res;
 }
 
+status_t SurfaceTextureLayer::queueBuffer(int buf, int64_t timestamp,
+        uint32_t* outWidth, uint32_t* outHeight, uint32_t* outTransform) {
+
+    status_t res = SurfaceTexture::queueBuffer(buf, timestamp,
+            outWidth, outHeight, outTransform);
+
+    sp<Layer> layer(mLayer.promote());
+    if (layer != NULL) {
+        uint32_t orientation = layer->getOrientation();
+        if (orientation & Transform::ROT_INVALID) {
+            orientation = 0;
+        }
+        *outTransform = layer->getOrientation();
+    }
+
+    return res;
+}
+
 status_t SurfaceTextureLayer::dequeueBuffer(int *buf,
         uint32_t w, uint32_t h, uint32_t format, uint32_t usage) {
 
@@ -64,9 +82,6 @@ status_t SurfaceTextureLayer::dequeueBuffer(int *buf,
         //LOGD("%s, w=%u, h=%u, format=%u, usage=%08x, effectiveUsage=%08x",
         //        __PRETTY_FUNCTION__, w, h, format, usage, effectiveUsage);
         res = SurfaceTexture::dequeueBuffer(buf, w, h, format, effectiveUsage);
-        if (res == NO_ERROR) {
-            layer->setFixedSize(w && h);
-        }
     }
     return res;
 }
index 7faff54..29a9cbe 100644 (file)
@@ -45,6 +45,9 @@ public:
     virtual status_t setBufferCount(int bufferCount);
 
 protected:
+    virtual status_t queueBuffer(int buf, int64_t timestamp,
+            uint32_t* outWidth, uint32_t* outHeight, uint32_t* outTransform);
+
     virtual status_t dequeueBuffer(int *buf, uint32_t w, uint32_t h,
             uint32_t format, uint32_t usage);
 };
index 4cedcbf..24d5f9a 100644 (file)
@@ -20,6 +20,7 @@
 #include <utils/String8.h>
 #include <ui/Region.h>
 
+#include "clz.h"
 #include "Transform.h"
 
 // ---------------------------------------------------------------------------
@@ -28,42 +29,6 @@ namespace android {
 
 // ---------------------------------------------------------------------------
 
-template <typename T>
-static inline T min(T a, T b) {
-    return a<b ? a : b;
-}
-template <typename T>
-static inline T min(T a, T b, T c) {
-    return min(a, min(b, c));
-}
-template <typename T>
-static inline T min(T a, T b, T c, T d) {
-    return min(a, b, min(c, d));
-}
-
-template <typename T>
-static inline T max(T a, T b) {
-    return a>b ? a : b;
-}
-template <typename T>
-static inline T max(T a, T b, T c) {
-    return max(a, max(b, c));
-}
-template <typename T>
-static inline T max(T a, T b, T c, T d) {
-    return max(a, b, max(c, d));
-}
-
-template <typename T>
-static inline
-void swap(T& a, T& b) {
-    T t(a);
-    a = b;
-    b = t;
-}
-
-// ---------------------------------------------------------------------------
-
 Transform::Transform() {
     reset();
 }
index ca44555..a4c5262 100644 (file)
@@ -24,6 +24,41 @@ int inline clz(int32_t x) {
     return __builtin_clz(x);
 }
 
+template <typename T>
+static inline T min(T a, T b) {
+    return a<b ? a : b;
+}
+template <typename T>
+static inline T min(T a, T b, T c) {
+    return min(a, min(b, c));
+}
+template <typename T>
+static inline T min(T a, T b, T c, T d) {
+    return min(a, b, min(c, d));
+}
+
+template <typename T>
+static inline T max(T a, T b) {
+    return a>b ? a : b;
+}
+template <typename T>
+static inline T max(T a, T b, T c) {
+    return max(a, max(b, c));
+}
+template <typename T>
+static inline T max(T a, T b, T c, T d) {
+    return max(a, b, max(c, d));
+}
+
+template <typename T>
+static inline
+void swap(T& a, T& b) {
+    T t(a);
+    a = b;
+    b = t;
+}
+
+
 }; // namespace android
 
 #endif /* ANDROID_SURFACE_FLINGER_CLZ_H */
index 40a70a8..a0961ca 100644 (file)
@@ -806,10 +806,10 @@ public abstract class PhoneBase extends Handler implements Phone {
         mNotifier.notifyDataConnection(this, reason, apnType, getDataConnectionState(apnType));
     }
 
-    public void notifyDataConnection() {
+    public void notifyDataConnection(String reason) {
         String types[] = getActiveApnTypes();
         for (String apnType : types) {
-            mNotifier.notifyDataConnection(this, null, apnType, getDataConnectionState(apnType));
+            mNotifier.notifyDataConnection(this, reason, apnType, getDataConnectionState(apnType));
         }
     }
 
index 0d9d27d..ac66b48 100644 (file)
@@ -141,6 +141,11 @@ public class CDMALTEPhone extends CDMAPhone {
     }
 
     @Override
+    public String getDeviceSvn() {
+        return mImeiSv;
+    }
+
+    @Override
     protected void log(String s) {
         if (DBG)
             Log.d(LOG_TAG, "[CDMALTEPhone] " + s);
index 0d551aa..5df2edd 100644 (file)
@@ -134,8 +134,6 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker {
                 }
             }
 
-            // Not sure if this is needed in CDMALTE phone.
-            // mDataRoaming = regCodeIsRoaming(regState);
             mLteSS.setRadioTechnology(type);
             mLteSS.setState(regCodeToServiceState(regState));
         } else {
@@ -345,13 +343,14 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker {
             }
 
             if (cm.getSimState().isSIMReady()) {
-                // SIM is found on the device. If ERI roaming is OFF, use operator name
-                // from CSIM record.
+                // SIM is found on the device. If ERI roaming is OFF and SID/NID matches
+                // one configfured in SIM, use operator name from CSIM record.
                 boolean showSpn =
                     ((CdmaLteUiccRecords)phone.mIccRecords).getCsimSpnDisplayCondition();
                 int iconIndex = ss.getCdmaEriIconIndex();
 
-                if (showSpn && (iconIndex == EriInfo.ROAMING_INDICATOR_OFF)) {
+                if (showSpn && (iconIndex == EriInfo.ROAMING_INDICATOR_OFF) &&
+                    isInHomeSidNid(ss.getSystemId(), ss.getNetworkId())) {
                     ss.setOperatorAlphaLong(phone.mIccRecords.getServiceProviderName());
                 }
             }
@@ -401,7 +400,7 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker {
         }
 
         if ((hasCdmaDataConnectionChanged || hasNetworkTypeChanged)) {
-            phone.notifyDataConnection();
+            phone.notifyDataConnection(null);
         }
 
         if (hasRoamingOn) {
@@ -469,6 +468,34 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker {
     }
 
     /**
+     * Check whether the specified SID and NID pair appears in the HOME SID/NID list
+     * read from NV or SIM.
+     *
+     * @return true if provided sid/nid pair belongs to operator's home network.
+     */
+    private boolean isInHomeSidNid(int sid, int nid) {
+        // if SID/NID is not available, assume this is home network.
+        if (isSidsAllZeros()) return true;
+
+        // length of SID/NID shold be same
+        if (mHomeSystemId.length != mHomeNetworkId.length) return true;
+
+        if (sid == 0) return true;
+
+        for (int i = 0; i < mHomeSystemId.length; i++) {
+            // Use SID only if NID is a reserved value.
+            // SID 0 and NID 0 and 65535 are reserved. (C.0005 2.6.5.2)
+            if ((mHomeSystemId[i] == sid) &&
+                ((mHomeNetworkId[i] == 0) || (mHomeNetworkId[i] == 65535) ||
+                 (nid == 0) || (nid == 65535) || (mHomeNetworkId[i] == nid))) {
+                return true;
+            }
+        }
+        // SID/NID are not in the list. So device is not in home network
+        return false;
+    }
+
+    /**
      * Returns OTASP_NOT_NEEDED as its not needed for LTE
      */
     @Override
index 24a468a..2cf4b88 100755 (executable)
@@ -130,8 +130,8 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
     protected String mCurPlmn = null;
 
     protected String mMdn;
-    private int mHomeSystemId[] = null;
-    private int mHomeNetworkId[] = null;
+    protected int mHomeSystemId[] = null;
+    protected int mHomeNetworkId[] = null;
     protected String mMin;
     protected String mPrlVersion;
     protected boolean mIsMinInfoReady = false;
@@ -999,7 +999,7 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
         }
 
         if (hasCdmaDataConnectionChanged || hasNetworkTypeChanged) {
-            phone.notifyDataConnection();
+            phone.notifyDataConnection(null);
         }
 
         if (hasRoamingOn) {
@@ -1481,7 +1481,7 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
         }
     }
 
-    private boolean isSidsAllZeros() {
+    protected boolean isSidsAllZeros() {
         if (mHomeSystemId != null) {
             for (int i=0; i < mHomeSystemId.length; i++) {
                 if (mHomeSystemId[i] != 0) {
index 93f4b4e..d3645fa 100644 (file)
@@ -915,7 +915,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
         }
 
         if (hasRadioTechnologyChanged) {
-            phone.notifyDataConnection(Phone.REASON_NW_TYPE_CHANGED, Phone.APN_TYPE_ALL);
+            phone.notifyDataConnection(Phone.REASON_NW_TYPE_CHANGED);
         }
 
         if (hasRoamingOn) {
diff --git a/tests/BiDiTests/Android b/tests/BiDiTests/Android
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tests/BiDiTests/new-attributes.txt b/tests/BiDiTests/new-attributes.txt
new file mode 100644 (file)
index 0000000..57854cc
--- /dev/null
@@ -0,0 +1,9 @@
+  <public type="attr" name="layoutDirection" />
+
+  <public type="attr" name="layout_marginStart"/>
+  <public type="attr" name="layout_marginEnd"/>
+
+  <public type="attr" name="paddingStart"/>
+  <public type="attr" name="paddingEnd"/>
+
+  <public type="attr" name="textDirection"/>
diff --git a/tests/BiDiTests/res/drawable/alphabet_a.png b/tests/BiDiTests/res/drawable/alphabet_a.png
new file mode 100644 (file)
index 0000000..2a80ec1
Binary files /dev/null and b/tests/BiDiTests/res/drawable/alphabet_a.png differ
diff --git a/tests/BiDiTests/res/drawable/alphabet_b.png b/tests/BiDiTests/res/drawable/alphabet_b.png
new file mode 100644 (file)
index 0000000..ac887ad
Binary files /dev/null and b/tests/BiDiTests/res/drawable/alphabet_b.png differ
diff --git a/tests/BiDiTests/res/drawable/alphabet_c.png b/tests/BiDiTests/res/drawable/alphabet_c.png
new file mode 100644 (file)
index 0000000..f8cc5c6
Binary files /dev/null and b/tests/BiDiTests/res/drawable/alphabet_c.png differ
diff --git a/tests/BiDiTests/res/drawable/alphabet_d.png b/tests/BiDiTests/res/drawable/alphabet_d.png
new file mode 100644 (file)
index 0000000..764dfe5
Binary files /dev/null and b/tests/BiDiTests/res/drawable/alphabet_d.png differ
diff --git a/tests/BiDiTests/res/drawable/alphabet_e.png b/tests/BiDiTests/res/drawable/alphabet_e.png
new file mode 100644 (file)
index 0000000..dbd00e1
Binary files /dev/null and b/tests/BiDiTests/res/drawable/alphabet_e.png differ
diff --git a/tests/BiDiTests/res/drawable/alphabet_f.png b/tests/BiDiTests/res/drawable/alphabet_f.png
new file mode 100644 (file)
index 0000000..f6a1bbe
Binary files /dev/null and b/tests/BiDiTests/res/drawable/alphabet_f.png differ
diff --git a/tests/BiDiTests/res/drawable/alphabet_g.png b/tests/BiDiTests/res/drawable/alphabet_g.png
new file mode 100644 (file)
index 0000000..e9d360c
Binary files /dev/null and b/tests/BiDiTests/res/drawable/alphabet_g.png differ
diff --git a/tests/BiDiTests/res/drawable/alphabet_h.png b/tests/BiDiTests/res/drawable/alphabet_h.png
new file mode 100644 (file)
index 0000000..cbc4eb1
Binary files /dev/null and b/tests/BiDiTests/res/drawable/alphabet_h.png differ
diff --git a/tests/BiDiTests/res/drawable/alphabet_i.png b/tests/BiDiTests/res/drawable/alphabet_i.png
new file mode 100644 (file)
index 0000000..bae2103
Binary files /dev/null and b/tests/BiDiTests/res/drawable/alphabet_i.png differ
diff --git a/tests/BiDiTests/res/drawable/alphabet_j.png b/tests/BiDiTests/res/drawable/alphabet_j.png
new file mode 100644 (file)
index 0000000..264c6a7
Binary files /dev/null and b/tests/BiDiTests/res/drawable/alphabet_j.png differ
diff --git a/tests/BiDiTests/res/layout/gallery_ltr.xml b/tests/BiDiTests/res/layout/gallery_ltr.xml
new file mode 100644 (file)
index 0000000..d0e4168
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@+id/gallery_ltr"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent"
+        android:layoutDirection="ltr">
+
+    <Gallery
+        android:id="@+id/galleryview"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:spacing="10dip"
+        />
+
+</FrameLayout>
diff --git a/tests/BiDiTests/res/layout/gallery_rtl.xml b/tests/BiDiTests/res/layout/gallery_rtl.xml
new file mode 100644 (file)
index 0000000..c5c2f5c
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@+id/gallery_rtl"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent"
+        android:layoutDirection="rtl">
+
+    <Gallery
+        android:id="@+id/galleryview"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:spacing="10dip"
+        />
+
+</FrameLayout>
index 6b38cc1..b45b98f 100644 (file)
@@ -137,6 +137,8 @@ public class BiDiTestActivity extends Activity {
 
         addItem(result, "TextView Drawables LTR", BiDiTestTextViewDrawablesLtr.class, R.id.textview_drawables_ltr);
         addItem(result, "TextView Drawables RTL", BiDiTestTextViewDrawablesRtl.class, R.id.textview_drawables_rtl);
+        addItem(result, "Gallery LTR", BiDiTestGalleryLtr.class, R.id.gallery_ltr);
+        addItem(result, "Gallery RTL", BiDiTestGalleryRtl.class, R.id.gallery_rtl);
 
         return result;
     }
@@ -147,4 +149,4 @@ public class BiDiTestActivity extends Activity {
         inflater.inflate(R.menu.main_menu, menu);
         return true;
     }
-}
\ No newline at end of file
+}
diff --git a/tests/BiDiTests/src/com/android/bidi/BiDiTestGalleryImages.java b/tests/BiDiTests/src/com/android/bidi/BiDiTestGalleryImages.java
new file mode 100644 (file)
index 0000000..adc17e1
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.bidi;
+
+import android.content.Context;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.ImageView;
+import android.widget.ImageView.ScaleType;
+
+public class BiDiTestGalleryImages extends BaseAdapter {
+    int mGalleryItemBackground;
+    private Context mContext;
+
+    private Integer[] mImageIds = {
+            R.drawable.alphabet_a,
+            R.drawable.alphabet_b,
+            R.drawable.alphabet_c,
+            R.drawable.alphabet_d,
+            R.drawable.alphabet_e,
+            R.drawable.alphabet_f,
+            R.drawable.alphabet_g,
+            R.drawable.alphabet_h,
+            R.drawable.alphabet_i,
+            R.drawable.alphabet_j,
+    };
+
+    public BiDiTestGalleryImages(Context c) {
+        mContext = c;
+    }
+
+    @Override
+    public int getCount() {
+        return mImageIds.length;
+    }
+
+    @Override
+    public Object getItem(int position) {
+        return position;
+    }
+
+    @Override
+    public long getItemId(int position) {
+        return position;
+    }
+
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        ImageView i = new ImageView(mContext);
+        i.setImageResource(mImageIds[position]);
+        i.setScaleType(ScaleType.CENTER_INSIDE);
+        return i;
+    }
+}
diff --git a/tests/BiDiTests/src/com/android/bidi/BiDiTestGalleryLtr.java b/tests/BiDiTests/src/com/android/bidi/BiDiTestGalleryLtr.java
new file mode 100644 (file)
index 0000000..fa86b1a
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.bidi;
+
+import android.app.Fragment;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Gallery;
+
+public class BiDiTestGalleryLtr extends Fragment {
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+            Bundle savedInstanceState) {
+        View v = inflater.inflate(R.layout.gallery_ltr, container, false);
+        Gallery g = (Gallery) v.findViewById(R.id.galleryview);
+        g.setAdapter(new BiDiTestGalleryImages(this.getActivity().getBaseContext()));
+        return v;
+    }
+}
diff --git a/tests/BiDiTests/src/com/android/bidi/BiDiTestGalleryRtl.java b/tests/BiDiTests/src/com/android/bidi/BiDiTestGalleryRtl.java
new file mode 100644 (file)
index 0000000..4cef658
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.bidi;
+
+import android.app.Fragment;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Gallery;
+
+public class BiDiTestGalleryRtl extends Fragment {
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+            Bundle savedInstanceState) {
+        View v = inflater.inflate(R.layout.gallery_rtl, container, false);
+        Gallery g = (Gallery) v.findViewById(R.id.galleryview);
+        g.setAdapter(new BiDiTestGalleryImages(this.getActivity().getBaseContext()));
+        return v;
+    }
+}
index 1493ab9..13b6129 100644 (file)
@@ -93,12 +93,9 @@ public class ListActivity extends Activity {
     }
     
     public void startProfiling(View v) {
-        ViewDebug.startLooperProfiling(new File(Environment.getExternalStorageDirectory(),
-                "looper.trace"));
     }
     
     public void stopProfiling(View v) {
-        ViewDebug.stopLooperProfiling();
     }
 
     @Override
index e776463..9aa70b0 100644 (file)
@@ -87,8 +87,6 @@ public class ImageProcessingActivity extends Activity
                     mIsProcessing = false;
                 }
 
-                // This is a hack to work around an invalidation bug
-                mBitmapOut.setPixel(0, 0, 0);
                 mOutPixelsAllocation.copyTo(mBitmapOut);
                 mDisplayView.invalidate();
             }
index b212533..e75a079 100644 (file)
@@ -100,22 +100,22 @@ public class StatusBarTest extends TestActivity
         new Test("Double Remove") {
             public void run() {
                 Log.d(TAG, "set 0");
-                mStatusBarManager.setIcon("speakerphone", R.drawable.stat_sys_phone, 0);
+                mStatusBarManager.setIcon("speakerphone", R.drawable.stat_sys_phone, 0, null);
                 Log.d(TAG, "remove 1");
                 mStatusBarManager.removeIcon("tty");
 
                 SystemClock.sleep(1000);
 
                 Log.d(TAG, "set 1");
-                mStatusBarManager.setIcon("tty", R.drawable.stat_sys_phone, 0);
+                mStatusBarManager.setIcon("tty", R.drawable.stat_sys_phone, 0, null);
                 if (false) {
                     Log.d(TAG, "set 2");
-                    mStatusBarManager.setIcon("tty", R.drawable.stat_sys_phone, 0);
+                    mStatusBarManager.setIcon("tty", R.drawable.stat_sys_phone, 0, null);
                 }
                 Log.d(TAG, "remove 2");
                 mStatusBarManager.removeIcon("tty");
                 Log.d(TAG, "set 3");
-                mStatusBarManager.setIcon("speakerphone", R.drawable.stat_sys_phone, 0);
+                mStatusBarManager.setIcon("speakerphone", R.drawable.stat_sys_phone, 0, null);
             }
         },
         new Test("Hide (FLAG_FULLSCREEN)") {
diff --git a/tests/TileBenchmark/Android.mk b/tests/TileBenchmark/Android.mk
new file mode 100644 (file)
index 0000000..430f0f1
--- /dev/null
@@ -0,0 +1,32 @@
+# Copyright (C) 2011 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT 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)
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+LOCAL_PACKAGE_NAME := TileBenchmark
+
+include $(BUILD_PACKAGE)
+
+##################################################
+include $(CLEAR_VARS)
+
+include $(BUILD_MULTI_PREBUILT)
+
+# Use the folloing include to make our test apk.
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tests/TileBenchmark/AndroidManifest.xml b/tests/TileBenchmark/AndroidManifest.xml
new file mode 100644 (file)
index 0000000..ab61a9e
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+      android:versionCode="1"
+      android:versionName="1.0" package="com.test.tilebenchmark">
+    <uses-permission android:name="android.permission.INTERNET"/>
+    <application android:icon="@drawable/icon"
+                 android:label="@string/app_name"
+                 android:hardwareAccelerated="true">
+        <activity android:name=".ProfileActivity"
+                  android:label="@string/profile_activity"
+                  android:theme="@android:style/Theme.Holo.NoActionBar">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name=".PlaybackActivity"
+                  android:label="@string/playback_activity"
+                  android:theme="@android:style/Theme.Holo.NoActionBar">
+        </activity>
+    </application>
+</manifest>
diff --git a/tests/TileBenchmark/res/drawable-hdpi/icon.png b/tests/TileBenchmark/res/drawable-hdpi/icon.png
new file mode 100644 (file)
index 0000000..8074c4c
Binary files /dev/null and b/tests/TileBenchmark/res/drawable-hdpi/icon.png differ
diff --git a/tests/TileBenchmark/res/drawable-ldpi/icon.png b/tests/TileBenchmark/res/drawable-ldpi/icon.png
new file mode 100644 (file)
index 0000000..1095584
Binary files /dev/null and b/tests/TileBenchmark/res/drawable-ldpi/icon.png differ
diff --git a/tests/TileBenchmark/res/drawable-mdpi/icon.png b/tests/TileBenchmark/res/drawable-mdpi/icon.png
new file mode 100644 (file)
index 0000000..a07c69f
Binary files /dev/null and b/tests/TileBenchmark/res/drawable-mdpi/icon.png differ
diff --git a/tests/TileBenchmark/res/layout/main.xml b/tests/TileBenchmark/res/layout/main.xml
new file mode 100644 (file)
index 0000000..577c466
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT 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:layout_width="match_parent"
+    android:layout_height="match_parent"
+    >
+    <LinearLayout
+        android:id="@+id/top"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        >
+        <Spinner
+            android:id="@+id/movement"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:prompt="@string/movement_method"
+            />
+        <Spinner
+            android:id="@+id/velocity"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:gravity="center_horizontal"
+            android:prompt="@string/desired_scroll_velocity"
+            />
+        <ToggleButton
+            android:id="@+id/capture"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textOn="@string/capture_stop"
+            android:textOff="@string/capture_start"
+            />
+        <EditText
+            android:id="@+id/url"
+            android:layout_width="0dip"
+            android:layout_height="wrap_content"
+            android:inputType="textUri"
+            android:imeOptions="actionGo"
+            android:layout_weight="1"
+            />
+        <Button
+            android:id="@+id/inspect"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/inspect_log"
+            />
+    </LinearLayout>
+    <com.test.tilebenchmark.ProfiledWebView
+        android:id="@+id/web"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        />
+</LinearLayout>
diff --git a/tests/TileBenchmark/res/layout/playback.xml b/tests/TileBenchmark/res/layout/playback.xml
new file mode 100644 (file)
index 0000000..aa1c8a4
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT 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:layout_width="match_parent"
+    android:layout_height="match_parent"
+    >
+    <LinearLayout
+        android:id="@+id/top"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        >
+        <Button
+            android:id="@+id/backward"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/backward"
+            />
+        <TextView
+            android:id="@+id/frame_display"
+            android:layout_width="0dip"
+            android:layout_height="wrap_content"
+            android:gravity="center_horizontal"
+            android:textAppearance="?android:attr/textAppearanceLarge"
+            android:layout_weight="1"
+            />
+        <Button
+            android:id="@+id/forward"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/forward"
+            />
+        <SeekBar
+            android:id="@+id/seek_bar"
+            android:layout_width="0dip"
+            android:layout_height="wrap_content"
+            android:layout_weight="10"
+            />
+    </LinearLayout>
+    <com.test.tilebenchmark.PlaybackView
+        android:id="@+id/playback"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        />
+</LinearLayout>
diff --git a/tests/TileBenchmark/res/values/colors.xml b/tests/TileBenchmark/res/values/colors.xml
new file mode 100644 (file)
index 0000000..dbb8e72
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT 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>
+    <!-- The color of tiles with valid textures -->
+    <color name="ready_tile">#ff4ac230</color>
+    <!-- The color of tiles with stale / invalid textures -->
+    <color name="unready_tile">#ff744400</color>
+    <!-- Viewport overlay in playback -->
+    <color name="view">#50000050</color>
+    <!-- Invalidated region overlay in playback - start color -->
+    <color name="inval_region_start">#80ff0000</color>
+    <!-- Invalidated region overlay in playback - stop color-->
+    <color name="inval_region_stop">#80ffffff</color>
+
+    <!-- Background color for not testing -->
+    <color name="background_not_testing">#ff000000</color>
+    <!-- Background color for during testing -->
+    <color name="background_start_testing">#ff400000</color>
+    <!-- Background color for testing complete -->
+    <color name="background_stop_testing">#ff004000</color>
+</resources>
diff --git a/tests/TileBenchmark/res/values/strings.xml b/tests/TileBenchmark/res/values/strings.xml
new file mode 100644 (file)
index 0000000..66972ac
--- /dev/null
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT 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>
+    <!-- Button, steps back a single frame [CHAR LIMIT=15] -->
+    <string name="backward">Backward</string>
+    <!-- Button, steps forward a single frame [CHAR LIMIT=15] -->
+    <string name="forward">Forward</string>
+    <!-- The name of the application [CHAR LIMIT=20] -->
+    <string name="app_name">TileBenchmark</string>
+    <!-- name of the auto-scroller / tile logger activity [CHAR LIMIT=100] -->
+    <string name="profile_activity">Webview Profiler</string>
+    <!-- name of the tile log playback activity [CHAR LIMIT=100] -->
+    <string name="playback_activity">Webview Tile Playback</string>
+    <!-- Button, loads another tile log [CHAR LIMIT=30] -->
+    <string name="loadbutton">Load</string>
+    <!-- Button, opens the playback activity [CHAR LIMIT=20] -->
+    <string name="inspect_log">Inspect Log</string>
+    <!-- ToggleButton label when pressing starts capture [CHAR LIMIT=15] -->
+    <string name="capture_start">Start Capture</string>
+    <!-- ToggleButton label when pressing stops capture [CHAR LIMIT=15] -->
+    <string name="capture_stop">Stop Capture</string>
+    <!-- The speed of auto-scrolling [CHAR LIMIT=30] -->
+    <string name="desired_scroll_velocity">Choose Scroll Velocity</string>
+    <!-- Pixels moved per frame [CHAR LIMIT=10] -->
+    <string-array name="velocity_array">
+        <item>1</item>
+        <item>25</item>
+        <item>50</item>
+        <item>100</item>
+        <item>200</item>
+        <item>400</item>
+    </string-array>
+    <!-- Drop down menu for selecting scrolling vs manual navigation for
+    capturing [CHAR LIMIT=15] -->
+    <string name="movement_method">Movement Method</string>
+    <!-- Drop down menu entry - automatically scroll to the end of the page
+    with scrollBy() [CHAR LIMIT=15] -->
+    <string name="movement_auto_scroll">Auto-scroll</string>
+    <!-- Drop down menu entry -  [CHAR LIMIT=15] -->
+    <string name="movement_auto_fling">Auto-fling</string>
+    <!-- Drop down menu entry - manually navigate the page(s), hit 'capture'
+    button [CHAR LIMIT=15] -->
+    <string name="movement_manual">Manual</string>
+
+    <!-- Error popup indicating log data couldn't be loaded [CHAR LIMIT=60] -->
+    <string name="error_no_data">Error: log data could not be loaded.</string>
+
+    <!-- 25th percentile - 25% of frames fall below this value [CHAR LIMIT=12]
+    -->
+    <string name="percentile_25">25%ile</string>
+    <!-- 50th percentile - 50% of frames fall below this value (aka median)
+    [CHAR LIMIT=12] -->
+    <string name="percentile_50">median</string>
+    <!-- 75th percentile - 75% of frames fall below this value [CHAR LIMIT=12]
+    -->
+    <string name="percentile_75">75%ile</string>
+    <!-- Frame rate [CHAR LIMIT=15] -->
+    <string name="frames_per_second">Frames/sec</string>
+    <!-- Portion of viewport covered by good tiles [CHAR LIMIT=15] -->
+    <string name="viewport_coverage">Coverage</string>
+    <!-- Format string for stat value overlay [CHAR LIMIT=15] -->
+    <string name="format_stat">%4.4f</string>
+    <!-- Format string for displaying aggregate stats+values (nr of valid tiles,
+    etc.) [CHAR LIMIT=20] -->
+    <string name="format_stat_name">%1$-20s %2$3d</string>
+    <!-- Text hovering over canvas, number of tiles ready [CHAR LIMIT=15] -->
+    <string name="ready_tiles">Ready Tiles</string>
+    <!-- Text hovering over canvas, number tiles not ready [CHAR LIMIT=15] -->
+    <string name="unready_tiles">Unready Tiles</string>
+    <!-- Text hovering over canvas, number of tiles that haven't been
+    allocated to a place on the page [CHAR LIMIT=15] -->
+    <string name="unplaced_tiles">Unplaced Tiles</string>
+    <!-- Text hovering over canvas, number of invalidated regions this frame
+    [CHAR LIMIT=15] -->
+    <string name="number_invalidates">Invalidates</string>
+</resources>
diff --git a/tests/TileBenchmark/src/com/test/tilebenchmark/PlaybackActivity.java b/tests/TileBenchmark/src/com/test/tilebenchmark/PlaybackActivity.java
new file mode 100644 (file)
index 0000000..36694a7
--- /dev/null
@@ -0,0 +1,173 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.test.tilebenchmark;
+
+import android.app.Activity;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.view.GestureDetector.SimpleOnGestureListener;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.Button;
+import android.widget.SeekBar;
+import android.widget.SeekBar.OnSeekBarChangeListener;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+
+/**
+ * Interface for playing back WebView tile rendering status. Draws viewport and
+ * states of tiles and statistics for off-line analysis.
+ */
+public class PlaybackActivity extends Activity {
+    private static final float SCROLL_SCALER = 0.125f;
+
+    PlaybackView mPlaybackView;
+    SeekBar mSeekBar;
+    Button mForward;
+    Button mBackward;
+    TextView mFrameDisplay;
+
+    private int mFrame = -1;
+    private int mFrameMax;
+
+    private class TouchFrameChangeListener extends SimpleOnGestureListener {
+        float mDist = 0;
+
+        @Override
+        public boolean onScroll(MotionEvent e1, MotionEvent e2,
+                float distanceX, float distanceY) {
+            // aggregate scrolls so that small ones can add up
+            mDist += distanceY * SCROLL_SCALER;
+            int intComponent = (int) Math.floor(Math.abs(mDist));
+            if (intComponent >= 1) {
+                int scrollDist = (mDist > 0) ? intComponent : -intComponent;
+                setFrame(null, mFrame + scrollDist);
+                mDist -= scrollDist;
+            }
+            return super.onScroll(e1, e2, distanceX, distanceY);
+        }
+    };
+
+    private class SeekFrameChangeListener implements OnSeekBarChangeListener {
+        @Override
+        public void onStopTrackingTouch(SeekBar seekBar) {
+        }
+
+        @Override
+        public void onStartTrackingTouch(SeekBar seekBar) {
+        }
+
+        @Override
+        public void onProgressChanged(SeekBar seekBar, int progress,
+                boolean fromUser) {
+            setFrame(seekBar, progress);
+        }
+    };
+
+    private class LoadFileTask extends AsyncTask<String, Void, TileData[][]> {
+        @Override
+        protected TileData[][] doInBackground(String... params) {
+            TileData[][] data = null;
+            try {
+                FileInputStream fis = openFileInput(params[0]);
+                ObjectInputStream in = new ObjectInputStream(fis);
+                data = (TileData[][]) in.readObject();
+                in.close();
+            } catch (IOException ex) {
+                ex.printStackTrace();
+            } catch (ClassNotFoundException ex) {
+                ex.printStackTrace();
+            }
+            return data;
+        }
+
+        @Override
+        protected void onPostExecute(TileData data[][]) {
+            if (data == null) {
+                Toast.makeText(getApplicationContext(),
+                        getResources().getString(R.string.error_no_data),
+                        Toast.LENGTH_LONG).show();
+                return;
+            }
+            mPlaybackView.setData(data);
+
+            mFrameMax = data.length - 1;
+            mSeekBar.setMax(mFrameMax);
+
+            setFrame(null, 0);
+        }
+    }
+
+    private void setFrame(View changer, int f) {
+        if (f < 0) {
+            f = 0;
+        } else if (f > mFrameMax) {
+            f = mFrameMax;
+        }
+
+        if (mFrame == f) {
+            return;
+        }
+
+        mFrame = f;
+        mForward.setEnabled(mFrame != mFrameMax);
+        mBackward.setEnabled(mFrame != 0);
+        if (changer != mSeekBar) {
+            mSeekBar.setProgress(mFrame);
+        }
+        mFrameDisplay.setText(Integer.toString(mFrame));
+        mPlaybackView.setFrame(mFrame);
+    };
+
+    /** Called when the activity is first created. */
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.playback);
+
+        mPlaybackView = (PlaybackView) findViewById(R.id.playback);
+        mSeekBar = (SeekBar) findViewById(R.id.seek_bar);
+        mForward = (Button) findViewById(R.id.forward);
+        mBackward = (Button) findViewById(R.id.backward);
+        mFrameDisplay = (TextView) findViewById(R.id.frame_display);
+
+        mForward.setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                setFrame(v, mFrame + 1);
+            }
+        });
+
+        mBackward.setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                setFrame(v, mFrame - 1);
+            }
+        });
+
+        mSeekBar.setOnSeekBarChangeListener(new SeekFrameChangeListener());
+
+        mPlaybackView.setOnGestureListener(new TouchFrameChangeListener());
+
+        new LoadFileTask().execute(ProfileActivity.TEMP_FILENAME);
+    }
+}
diff --git a/tests/TileBenchmark/src/com/test/tilebenchmark/PlaybackGraphs.java b/tests/TileBenchmark/src/com/test/tilebenchmark/PlaybackGraphs.java
new file mode 100644 (file)
index 0000000..35b1563
--- /dev/null
@@ -0,0 +1,263 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.test.tilebenchmark;
+
+import android.content.res.Resources;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.Rect;
+import android.graphics.drawable.ShapeDrawable;
+import android.os.Bundle;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+public class PlaybackGraphs {
+    private static final int BAR_WIDTH = PlaybackView.TILE_SCALE * 3;
+    private static final float CANVAS_SCALE = 0.2f;
+    private static final double IDEAL_FRAMES = 60;
+    private static final int LABELOFFSET = 100;
+    private static Paint whiteLabels;
+
+    private static double viewportCoverage(TileData view, TileData tile) {
+        if (tile.left < view.right
+                && tile.right >= view.left
+                && tile.top < view.bottom
+                && tile.bottom >= view.top) {
+            return 1.0f;
+        }
+        return 0.0f;
+    }
+
+    private interface MetricGen {
+        public double getValue(TileData[] frame);
+
+        public double getMax();
+
+        public int getLabelId();
+    };
+
+    private static MetricGen[] Metrics = new MetricGen[] {
+            new MetricGen() {
+                // framerate graph
+                @Override
+                public double getValue(TileData[] frame) {
+                    int renderTimeUS = frame[0].level;
+                    return 1.0e6f / renderTimeUS;
+                }
+
+                @Override
+                public double getMax() {
+                    return IDEAL_FRAMES;
+                }
+
+                @Override
+                public int getLabelId() {
+                    return R.string.frames_per_second;
+                }
+            }, new MetricGen() {
+                // coverage graph
+                @Override
+                public double getValue(TileData[] frame) {
+                    double total = 0, totalCount = 0;
+                    for (int tileID = 1; tileID < frame.length; tileID++) {
+                        TileData data = frame[tileID];
+                        double coverage = viewportCoverage(frame[0], data);
+                        total += coverage * (data.isReady ? 1 : 0);
+                        totalCount += coverage;
+                    }
+                    if (totalCount == 0) {
+                        return -1;
+                    }
+                    return total / totalCount;
+                }
+
+                @Override
+                public double getMax() {
+                    return 1;
+                }
+
+                @Override
+                public int getLabelId() {
+                    return R.string.viewport_coverage;
+                }
+            }
+    };
+
+    private interface StatGen {
+        public double getValue(double sortedValues[]);
+
+        public int getLabelId();
+    }
+
+    public static double getPercentile(double sortedValues[], double ratioAbove) {
+        double index = ratioAbove * (sortedValues.length - 1);
+        int intIndex = (int) Math.floor(index);
+        if (index == intIndex) {
+            return sortedValues[intIndex];
+        }
+        double alpha = index - intIndex;
+        return sortedValues[intIndex] * (1 - alpha)
+                + sortedValues[intIndex + 1] * (alpha);
+    }
+
+    private static StatGen[] Stats = new StatGen[] {
+            new StatGen() {
+                @Override
+                public double getValue(double[] sortedValues) {
+                    return getPercentile(sortedValues, 0.25);
+                }
+
+                @Override
+                public int getLabelId() {
+                    return R.string.percentile_25;
+                }
+            }, new StatGen() {
+                @Override
+                public double getValue(double[] sortedValues) {
+                    return getPercentile(sortedValues, 0.5);
+                }
+
+                @Override
+                public int getLabelId() {
+                    return R.string.percentile_50;
+                }
+            }, new StatGen() {
+                @Override
+                public double getValue(double[] sortedValues) {
+                    return getPercentile(sortedValues, 0.75);
+                }
+
+                @Override
+                public int getLabelId() {
+                    return R.string.percentile_75;
+                }
+            },
+    };
+
+    public PlaybackGraphs() {
+        whiteLabels = new Paint();
+        whiteLabels.setColor(Color.WHITE);
+        whiteLabels.setTextSize(PlaybackView.TILE_SCALE / 3);
+    }
+
+    private ArrayList<ShapeDrawable> mShapes = new ArrayList<ShapeDrawable>();
+    private double[][] mStats = new double[Metrics.length][Stats.length];
+
+    public void setData(TileData[][] tileProfilingData) {
+        mShapes.clear();
+        double metricValues[] = new double[tileProfilingData.length];
+
+        if (tileProfilingData.length == 0) {
+            return;
+        }
+
+        for (int metricIndex = 0; metricIndex < Metrics.length; metricIndex++) {
+            // create graph out of rectangles, one per frame
+            int lastBar = 0;
+            for (int frameIndex = 0; frameIndex < tileProfilingData.length; frameIndex++) {
+                TileData frame[] = tileProfilingData[frameIndex];
+                int newBar = (frame[0].top + frame[0].bottom) / 2;
+
+                MetricGen s = Metrics[metricIndex];
+                double absoluteValue = s.getValue(frame);
+                double relativeValue = absoluteValue / s.getMax();
+                relativeValue = Math.min(1,relativeValue);
+                relativeValue = Math.max(0,relativeValue);
+                int rightPos = (int) (-BAR_WIDTH * metricIndex);
+                int leftPos = (int) (-BAR_WIDTH * (metricIndex + relativeValue));
+
+                ShapeDrawable graphBar = new ShapeDrawable();
+                graphBar.getPaint().setColor(Color.BLUE);
+                graphBar.setBounds(leftPos, lastBar, rightPos, newBar);
+
+                mShapes.add(graphBar);
+                metricValues[frameIndex] = absoluteValue;
+                lastBar = newBar;
+            }
+
+            // store aggregate statistics per metric (median, and similar)
+            Arrays.sort(metricValues);
+            for (int statIndex = 0; statIndex < Stats.length; statIndex++) {
+                mStats[metricIndex][statIndex] = Stats[statIndex]
+                        .getValue(metricValues);
+            }
+        }
+    }
+
+    public void drawVerticalShiftedShapes(Canvas canvas,
+            ArrayList<ShapeDrawable> shapes) {
+        // Shapes drawn here are drawn relative to the viewRect
+        Rect viewRect = shapes.get(shapes.size() - 1).getBounds();
+        canvas.translate(0, 5 * PlaybackView.TILE_SCALE - viewRect.top);
+
+        for (ShapeDrawable shape : mShapes) {
+            shape.draw(canvas);
+        }
+        for (ShapeDrawable shape : shapes) {
+            shape.draw(canvas);
+        }
+    }
+
+    public void draw(Canvas canvas, ArrayList<ShapeDrawable> shapes,
+            String[] strings, Resources resources) {
+        canvas.scale(CANVAS_SCALE, CANVAS_SCALE);
+
+        canvas.translate(BAR_WIDTH * Metrics.length, 0);
+
+        canvas.save();
+        drawVerticalShiftedShapes(canvas, shapes);
+        canvas.restore();
+
+        for (int metricIndex = 0; metricIndex < Metrics.length; metricIndex++) {
+            String label = resources.getString(
+                    Metrics[metricIndex].getLabelId());
+            int xPos = (metricIndex + 1) * -BAR_WIDTH;
+            int yPos = LABELOFFSET;
+            canvas.drawText(label, xPos, yPos, whiteLabels);
+            for (int statIndex = 0; statIndex < Stats.length; statIndex++) {
+                label = resources.getString(R.string.format_stat,
+                        mStats[metricIndex][statIndex]);
+                yPos = LABELOFFSET + (1 + statIndex) * PlaybackView.TILE_SCALE
+                        / 2;
+                canvas.drawText(label, xPos, yPos, whiteLabels);
+            }
+        }
+        for (int stringIndex = 0; stringIndex < strings.length; stringIndex++) {
+            int yPos = LABELOFFSET + stringIndex * PlaybackView.TILE_SCALE / 2;
+            canvas.drawText(strings[stringIndex], 0, yPos, whiteLabels);
+        }
+    }
+
+    public Bundle getStatBundle(Resources resources) {
+        Bundle b = new Bundle();
+
+        for (int metricIndex = 0; metricIndex < Metrics.length; metricIndex++) {
+            for (int statIndex = 0; statIndex < Stats.length; statIndex++) {
+                String metricLabel = resources.getString(
+                        Metrics[metricIndex].getLabelId());
+                String statLabel = resources.getString(
+                        Stats[statIndex].getLabelId());
+                double value = mStats[metricIndex][statIndex];
+                b.putDouble(metricLabel + " " + statLabel, value);
+            }
+        }
+
+        return b;
+    }
+}
diff --git a/tests/TileBenchmark/src/com/test/tilebenchmark/PlaybackView.java b/tests/TileBenchmark/src/com/test/tilebenchmark/PlaybackView.java
new file mode 100644 (file)
index 0000000..edc8643
--- /dev/null
@@ -0,0 +1,213 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.test.tilebenchmark;
+
+import android.animation.ArgbEvaluator;
+import android.animation.ObjectAnimator;
+import android.animation.ValueAnimator;
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.drawable.ShapeDrawable;
+import android.util.AttributeSet;
+import android.view.GestureDetector;
+import android.view.GestureDetector.OnGestureListener;
+import android.view.MotionEvent;
+import android.view.View;
+
+import java.util.ArrayList;
+
+public class PlaybackView extends View {
+    public static final int TILE_SCALE = 300;
+    private static final int INVAL_FLAG = -2;
+    private static final int INVAL_CYCLE = 250;
+
+    private Paint levelPaint = null, coordPaint = null, goldPaint = null;
+    private PlaybackGraphs mGraphs;
+
+    private ArrayList<ShapeDrawable> mTempShapes = new ArrayList<ShapeDrawable>();
+    private TileData mProfData[][] = null;
+    private GestureDetector mGestureDetector = null;
+    private String mRenderStrings[] = new String[4];
+
+    private class TileDrawable extends ShapeDrawable {
+        TileData tile;
+        String label;
+
+        public TileDrawable(TileData t, int colorId) {
+            this.tile = t;
+            getPaint().setColor(getResources().getColor(colorId));
+            if (colorId == R.color.ready_tile
+                    || colorId == R.color.unready_tile) {
+
+                label = (int) (t.left / TILE_SCALE) + ", "
+                        + (int) (t.top / TILE_SCALE);
+                // ignore scale value for tiles
+                setBounds(t.left, t.top,
+                        t.right, t.bottom);
+            } else {
+                setBounds((int) (t.left * t.scale),
+                        (int) (t.top * t.scale),
+                        (int) (t.right * t.scale),
+                        (int) (t.bottom * t.scale));
+            }
+        }
+
+        @SuppressWarnings("unused")
+        public void setColor(int color) {
+            getPaint().setColor(color);
+        }
+
+        @Override
+        public void draw(Canvas canvas) {
+            super.draw(canvas);
+            if (label != null) {
+                canvas.drawText(Integer.toString(tile.level), getBounds().left,
+                        getBounds().bottom, levelPaint);
+                canvas.drawText(label, getBounds().left,
+                        ((getBounds().bottom + getBounds().top) / 2),
+                        coordPaint);
+            }
+        }
+    }
+
+    public PlaybackView(Context context) {
+        super(context);
+        init();
+    }
+
+    public PlaybackView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        init();
+    }
+
+    public PlaybackView(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+        init();
+    }
+
+    public void setOnGestureListener(OnGestureListener gl) {
+        mGestureDetector = new GestureDetector(getContext(), gl);
+    }
+
+    @Override
+    public boolean onTouchEvent(MotionEvent event) {
+        mGestureDetector.onTouchEvent(event);
+        return true;
+    }
+
+    private void init() {
+        levelPaint = new Paint();
+        levelPaint.setColor(Color.WHITE);
+        levelPaint.setTextSize(TILE_SCALE / 2);
+        coordPaint = new Paint();
+        coordPaint.setColor(Color.BLACK);
+        coordPaint.setTextSize(TILE_SCALE / 3);
+        goldPaint = new Paint();
+        goldPaint.setColor(0xffa0e010);
+        mGraphs = new PlaybackGraphs();
+    }
+
+    @Override
+    protected void onDraw(Canvas canvas) {
+        super.onDraw(canvas);
+
+        if (mTempShapes == null || mTempShapes.isEmpty()) {
+            return;
+        }
+
+        mGraphs.draw(canvas, mTempShapes, mRenderStrings, getResources());
+        invalidate(); // may have animations, force redraw
+    }
+
+    public int setFrame(int frame) {
+        if (mProfData == null || mProfData.length == 0) {
+            return 0;
+        }
+
+        int readyTiles = 0, unreadyTiles = 0, unplacedTiles = 0, numInvals = 0;
+        mTempShapes.clear();
+
+        // create tile shapes (as they're drawn on bottom)
+        for (TileData t : mProfData[frame]) {
+            if (t.level != INVAL_FLAG && t != mProfData[frame][0]) {
+                int colorId;
+                if (t.isReady) {
+                    readyTiles++;
+                    colorId = R.color.ready_tile;
+                } else {
+                    unreadyTiles++;
+                    colorId = R.color.unready_tile;
+                }
+                if (t.left < 0 || t.top < 0) {
+                    unplacedTiles++;
+                }
+                mTempShapes.add(new TileDrawable(t, colorId));
+            } else {
+                numInvals++;
+            }
+        }
+
+        // create invalidate shapes (drawn above tiles)
+        int invalId = 0;
+        for (TileData t : mProfData[frame]) {
+            if (t.level == INVAL_FLAG && t != mProfData[frame][0]) {
+                TileDrawable invalShape = new TileDrawable(t,
+                        R.color.inval_region_start);
+                ValueAnimator tileAnimator = ObjectAnimator.ofInt(invalShape,
+                        "color",
+                        getResources().getColor(R.color.inval_region_start),
+                        getResources().getColor(R.color.inval_region_stop));
+                tileAnimator.setDuration(numInvals * INVAL_CYCLE);
+                tileAnimator.setEvaluator(new ArgbEvaluator());
+                tileAnimator.setRepeatCount(ValueAnimator.INFINITE);
+                tileAnimator.setRepeatMode(ValueAnimator.RESTART);
+                float delay = (float) (invalId) * INVAL_CYCLE;
+                tileAnimator.setStartDelay((int) delay);
+                invalId++;
+                tileAnimator.start();
+
+                mTempShapes.add(invalShape);
+            }
+        }
+
+        mRenderStrings[0] = getResources().getString(R.string.format_stat_name,
+                getResources().getString(R.string.ready_tiles), readyTiles);
+        mRenderStrings[1] = getResources().getString(R.string.format_stat_name,
+                getResources().getString(R.string.unready_tiles), unreadyTiles);
+        mRenderStrings[2] = getResources().getString(R.string.format_stat_name,
+                getResources().getString(R.string.unplaced_tiles),
+                unplacedTiles);
+        mRenderStrings[3] = getResources().getString(R.string.format_stat_name,
+                getResources().getString(R.string.number_invalidates),
+                numInvals);
+
+        // draw view rect (using first TileData object, on top)
+        TileDrawable viewShape = new TileDrawable(mProfData[frame][0],
+                R.color.view);
+        mTempShapes.add(viewShape);
+        this.invalidate();
+        return frame;
+    }
+
+    public void setData(TileData[][] tileProfilingData) {
+        mProfData = tileProfilingData;
+
+        mGraphs.setData(mProfData);
+    }
+}
diff --git a/tests/TileBenchmark/src/com/test/tilebenchmark/ProfileActivity.java b/tests/TileBenchmark/src/com/test/tilebenchmark/ProfileActivity.java
new file mode 100644 (file)
index 0000000..1521807
--- /dev/null
@@ -0,0 +1,320 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.test.tilebenchmark;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.content.Context;
+import android.graphics.Bitmap;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.os.CountDownTimer;
+import android.util.Pair;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.webkit.WebSettings;
+import android.webkit.WebView;
+import android.webkit.WebViewClient;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemSelectedListener;
+import android.widget.ArrayAdapter;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.Spinner;
+import android.widget.TextView;
+import android.widget.TextView.OnEditorActionListener;
+import android.widget.ToggleButton;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.ObjectOutputStream;
+
+/**
+ * Interface for profiling the webview's scrolling, with simple controls on how
+ * to scroll, and what content to load.
+ */
+public class ProfileActivity extends Activity {
+
+    public interface ProfileCallback {
+        public void profileCallback(TileData data[][]);
+    }
+
+    public static final String TEMP_FILENAME = "profile.tiles";
+    private static final int LOAD_TEST_DELAY = 2000; // nr of millis after load,
+                                                     // before test
+
+    Button mInspectButton;
+    ToggleButton mCaptureButton;
+    Spinner mVelocitySpinner;
+    Spinner mMovementSpinner;
+    EditText mUrl;
+    ProfiledWebView mWeb;
+    ProfileCallback mCallback;
+
+    LoggingWebViewClient mLoggingWebViewClient = new LoggingWebViewClient();
+    AutoLoggingWebViewClient mAutoLoggingWebViewClient = new AutoLoggingWebViewClient();
+
+    private enum TestingState {
+        NOT_TESTING,
+        PRE_TESTING,
+        START_TESTING,
+        STOP_TESTING,
+        SAVED_TESTING
+    };
+
+    private class VelocitySelectedListener implements OnItemSelectedListener {
+        @Override
+        public void onItemSelected(AdapterView<?> parent, View view,
+                int position, long id) {
+            String speedStr = parent.getItemAtPosition(position).toString();
+            int speedInt = Integer.parseInt(speedStr);
+            mWeb.setAutoScrollSpeed(speedInt);
+        }
+
+        @Override
+        public void onNothingSelected(AdapterView<?> parent) {
+        }
+    }
+
+    private class MovementSelectedListener implements OnItemSelectedListener {
+        @Override
+        public void onItemSelected(AdapterView<?> parent, View view,
+                int position, long id) {
+            String movementStr = parent.getItemAtPosition(position).toString();
+            if (movementStr == getResources().getString(
+                    R.string.movement_auto_scroll)
+                    || movementStr == getResources().getString(
+                            R.string.movement_auto_fling)) {
+                mWeb.setWebViewClient(mAutoLoggingWebViewClient);
+                mCaptureButton.setEnabled(false);
+                mVelocitySpinner.setEnabled(true);
+            } else if (movementStr == getResources().getString(
+                    R.string.movement_manual)) {
+                mWeb.setWebViewClient(mLoggingWebViewClient);
+                mCaptureButton.setEnabled(true);
+                mVelocitySpinner.setEnabled(false);
+            }
+        }
+
+        @Override
+        public void onNothingSelected(AdapterView<?> parent) {
+        }
+    }
+
+    private class LoggingWebViewClient extends WebViewClient {
+        @Override
+        public boolean shouldOverrideUrlLoading(WebView view, String url) {
+            return false;
+        }
+
+        @Override
+        public void onPageStarted(WebView view, String url, Bitmap favicon) {
+            super.onPageStarted(view, url, favicon);
+            mUrl.setText(url);
+        }
+    }
+
+    private class AutoLoggingWebViewClient extends LoggingWebViewClient {
+
+        @Override
+        public void onPageFinished(WebView view, String url) {
+            super.onPageFinished(view, url);
+            view.requestFocus();
+            new CountDownTimer(LOAD_TEST_DELAY, LOAD_TEST_DELAY) {
+                @Override
+                public void onTick(long millisUntilFinished) {
+                }
+
+                @Override
+                public void onFinish() {
+                    startViewProfiling(true);
+                }
+            }.start();
+        }
+
+        @Override
+        public void onPageStarted(WebView view, String url, Bitmap favicon) {
+            super.onPageStarted(view, url, favicon);
+            setTestingState(TestingState.PRE_TESTING);
+        }
+    }
+
+    private class StoreFileTask extends
+            AsyncTask<Pair<String, TileData[][]>, Void, Void> {
+
+        @Override
+        protected Void doInBackground(Pair<String, TileData[][]>... params) {
+            try {
+                FileOutputStream fos = openFileOutput(params[0].first,
+                        Context.MODE_PRIVATE);
+                ObjectOutputStream out = new ObjectOutputStream(fos);
+                out.writeObject(params[0].second);
+                out.close();
+            } catch (IOException ex) {
+                ex.printStackTrace();
+            }
+            return null;
+        }
+
+        @Override
+        protected void onPostExecute(Void v) {
+            setTestingState(TestingState.SAVED_TESTING);
+        }
+    }
+
+    public void setTestingState(TestingState state) {
+        switch (state) {
+            case NOT_TESTING:
+                mUrl.setBackgroundResource(R.color.background_not_testing);
+                mInspectButton.setEnabled(true);
+                mMovementSpinner.setEnabled(true);
+                break;
+            case PRE_TESTING:
+                mInspectButton.setEnabled(false);
+                mMovementSpinner.setEnabled(false);
+                break;
+            case START_TESTING:
+                mUrl.setBackgroundResource(R.color.background_start_testing);
+                mInspectButton.setEnabled(false);
+                mMovementSpinner.setEnabled(false);
+                break;
+            case STOP_TESTING:
+                mUrl.setBackgroundResource(R.color.background_stop_testing);
+                break;
+            case SAVED_TESTING:
+                mInspectButton.setEnabled(true);
+                mMovementSpinner.setEnabled(true);
+                break;
+        }
+    }
+
+    /** auto - automatically scroll. */
+    private void startViewProfiling(boolean auto) {
+        if (!auto) {
+            // manual, toggle capture button to indicate capture state to user
+            mCaptureButton.setChecked(true);
+        }
+        mWeb.startScrollTest(mCallback, auto);
+        setTestingState(TestingState.START_TESTING);
+    }
+
+    /** Called when the activity is first created. */
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.main);
+        mInspectButton = (Button) findViewById(R.id.inspect);
+        mCaptureButton = (ToggleButton) findViewById(R.id.capture);
+        mVelocitySpinner = (Spinner) findViewById(R.id.velocity);
+        mMovementSpinner = (Spinner) findViewById(R.id.movement);
+        mUrl = (EditText) findViewById(R.id.url);
+        mWeb = (ProfiledWebView) findViewById(R.id.web);
+        mCallback = new ProfileCallback() {
+            @SuppressWarnings("unchecked")
+            @Override
+            public void profileCallback(TileData[][] data) {
+                new StoreFileTask().execute(new Pair<String, TileData[][]>(
+                        TEMP_FILENAME, data));
+                mCaptureButton.setChecked(false);
+                setTestingState(TestingState.STOP_TESTING);
+            }
+        };
+
+        // Inspect button (opens PlaybackActivity)
+        mInspectButton.setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                startActivity(new Intent(ProfileActivity.this,
+                        PlaybackActivity.class));
+            }
+        });
+
+        // Velocity spinner
+        ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(
+                this, R.array.velocity_array,
+                android.R.layout.simple_spinner_item);
+        adapter.setDropDownViewResource(
+                android.R.layout.simple_spinner_dropdown_item);
+        mVelocitySpinner.setAdapter(adapter);
+        mVelocitySpinner.setOnItemSelectedListener(
+                new VelocitySelectedListener());
+        mVelocitySpinner.setSelection(3);
+
+        // Movement spinner
+        String content[] = {
+                getResources().getString(R.string.movement_auto_scroll),
+                getResources().getString(R.string.movement_auto_fling),
+                getResources().getString(R.string.movement_manual)
+        };
+        adapter = new ArrayAdapter<CharSequence>(this,
+                android.R.layout.simple_spinner_item, content);
+        adapter.setDropDownViewResource(
+                android.R.layout.simple_spinner_dropdown_item);
+        mMovementSpinner.setAdapter(adapter);
+        mMovementSpinner.setOnItemSelectedListener(
+                new MovementSelectedListener());
+        mMovementSpinner.setSelection(0);
+
+        // Capture toggle button
+        mCaptureButton.setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (mCaptureButton.isChecked()) {
+                    startViewProfiling(false);
+                } else {
+                    mWeb.stopScrollTest();
+                }
+            }
+        });
+
+        // Custom profiling WebView
+        WebSettings settings = mWeb.getSettings();
+        settings.setJavaScriptEnabled(true);
+        settings.setSupportZoom(true);
+        settings.setEnableSmoothTransition(true);
+        settings.setBuiltInZoomControls(true);
+        settings.setLoadWithOverviewMode(true);
+        mWeb.setWebViewClient(new LoggingWebViewClient());
+
+        // URL text entry
+        mUrl.setOnEditorActionListener(new OnEditorActionListener() {
+            public boolean onEditorAction(TextView v, int actionId,
+                    KeyEvent event) {
+                String url = mUrl.getText().toString();
+                mWeb.loadUrl(url);
+                mWeb.requestFocus();
+                return true;
+            }
+        });
+
+        setTestingState(TestingState.NOT_TESTING);
+    }
+
+    public void setCallback(ProfileCallback callback) {
+        mCallback = callback;
+    }
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        if ((keyCode == KeyEvent.KEYCODE_BACK) && mWeb.canGoBack()) {
+            mWeb.goBack();
+            return true;
+        }
+        return super.onKeyDown(keyCode, event);
+    }
+}
diff --git a/tests/TileBenchmark/src/com/test/tilebenchmark/ProfiledWebView.java b/tests/TileBenchmark/src/com/test/tilebenchmark/ProfiledWebView.java
new file mode 100644 (file)
index 0000000..d3941be
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.test.tilebenchmark;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.webkit.WebView;
+
+import com.test.tilebenchmark.ProfileActivity.ProfileCallback;
+
+public class ProfiledWebView extends WebView {
+    private int mSpeed;
+
+    private boolean isScrolling = false;
+    private ProfileCallback mCallback;
+
+    public ProfiledWebView(Context context) {
+        super(context);
+    }
+
+    public ProfiledWebView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public ProfiledWebView(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+    }
+
+    public ProfiledWebView(Context context, AttributeSet attrs, int defStyle,
+            boolean privateBrowsing) {
+        super(context, attrs, defStyle, privateBrowsing);
+    }
+
+    @Override
+    protected void onDraw(android.graphics.Canvas canvas) {
+        if (isScrolling) {
+            if (canScrollVertically(1)) {
+                scrollBy(0, mSpeed);
+            } else {
+                stopScrollTest();
+                isScrolling = false;
+            }
+        }
+        super.onDraw(canvas);
+    }
+
+    /*
+     * Called once the page is loaded to start scrolling for evaluating tiles.
+     * If autoScrolling isn't set, stop must be called manually.
+     */
+    public void startScrollTest(ProfileCallback callback, boolean autoScrolling) {
+        isScrolling = autoScrolling;
+        mCallback = callback;
+        tileProfilingStart();
+        invalidate();
+    }
+
+    /*
+     * Called once the page has stopped scrolling
+     */
+    public void stopScrollTest() {
+        super.tileProfilingStop();
+
+        if (mCallback == null) {
+            tileProfilingClear();
+            return;
+        }
+
+        TileData data[][] = new TileData[super.tileProfilingNumFrames()][];
+        for (int frame = 0; frame < data.length; frame++) {
+            data[frame] = new TileData[
+                    tileProfilingNumTilesInFrame(frame)];
+            for (int tile = 0; tile < data[frame].length; tile++) {
+                int left = tileProfilingGetInt(frame, tile, "left");
+                int top = tileProfilingGetInt(frame, tile, "top");
+                int right = tileProfilingGetInt(frame, tile, "right");
+                int bottom = tileProfilingGetInt(frame, tile, "bottom");
+
+                boolean isReady = super.tileProfilingGetInt(
+                        frame, tile, "isReady") == 1;
+                int level = tileProfilingGetInt(frame, tile, "level");
+
+                float scale = tileProfilingGetFloat(frame, tile, "scale");
+
+                data[frame][tile] = new TileData(left, top, right, bottom,
+                        isReady, level, scale);
+            }
+        }
+        super.tileProfilingClear();
+
+        mCallback.profileCallback(data);
+    }
+
+    @Override
+    public void loadUrl(String url) {
+        if (!url.startsWith("http://")) {
+            url = "http://" + url;
+        }
+        super.loadUrl(url);
+    }
+
+    public void setAutoScrollSpeed(int speedInt) {
+        mSpeed = speedInt;
+    }
+}
diff --git a/tests/TileBenchmark/src/com/test/tilebenchmark/TileData.java b/tests/TileBenchmark/src/com/test/tilebenchmark/TileData.java
new file mode 100644 (file)
index 0000000..3e729a6
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.test.tilebenchmark;
+
+import java.io.Serializable;
+
+public class TileData implements Serializable {
+    int left, top, right, bottom;
+    public boolean isReady;
+    public int level;
+    public float scale;
+
+    public TileData(int left, int top, int right, int bottom, boolean isReady,
+            int level, float scale) {
+        this.left = left;
+        this.right = right;
+        this.top = top;
+        this.bottom = bottom;
+        this.isReady = isReady;
+        this.level = level;
+        this.scale = scale;
+    }
+
+    public String toString() {
+        return "Tile (" + left + "," + top + ")->("
+                + right + "," + bottom + ")";
+    }
+}
index 29d2b87..d66cdf0 100644 (file)
@@ -1560,10 +1560,10 @@ status_t AaptDir::addLeafFile(const String8& leafName, const sp<AaptFile>& file)
 }
 
 ssize_t AaptDir::slurpFullTree(Bundle* bundle, const String8& srcDir,
-                            const AaptGroupEntry& kind, const String8& resType)
+                            const AaptGroupEntry& kind, const String8& resType,
+                            sp<FilePathStore>& fullResPaths)
 {
     Vector<String8> fileNames;
-
     {
         DIR* dir = NULL;
 
@@ -1586,9 +1586,14 @@ ssize_t AaptDir::slurpFullTree(Bundle* bundle, const String8& srcDir,
             if (isHidden(srcDir.string(), entry->d_name))
                 continue;
 
-            fileNames.add(String8(entry->d_name));
+            String8 name(entry->d_name);
+            fileNames.add(name);
+            // Add fully qualified path for dependency purposes
+            // if we're collecting them
+            if (fullResPaths != NULL) {
+                fullResPaths->add(srcDir.appendPathCopy(name));
+            }
         }
-
         closedir(dir);
     }
 
@@ -1615,7 +1620,7 @@ ssize_t AaptDir::slurpFullTree(Bundle* bundle, const String8& srcDir,
                 notAdded = true;
             }
             ssize_t res = subdir->slurpFullTree(bundle, pathName, kind,
-                                                resType);
+                                                resType, fullResPaths);
             if (res < NO_ERROR) {
                 return res;
             }
@@ -1847,7 +1852,7 @@ ssize_t AaptAssets::slurpFromArgs(Bundle* bundle)
         sp<AaptDir> assetAaptDir = makeDir(String8(kAssetDir));
         AaptGroupEntry group;
         count = assetAaptDir->slurpFullTree(bundle, assetRoot, group,
-                                            String8());
+                                            String8(), mFullAssetPaths);
         if (count < 0) {
             totalCount = count;
             goto bail;
@@ -1878,6 +1883,7 @@ ssize_t AaptAssets::slurpFromArgs(Bundle* bundle)
                     sp<AaptAssets> nextOverlay = new AaptAssets();
                     current->setOverlay(nextOverlay);
                     current = nextOverlay;
+                    current->setFullResPaths(mFullResPaths);
                 }
                 count = current->slurpResourceTree(bundle, String8(res));
 
@@ -1920,7 +1926,7 @@ ssize_t AaptAssets::slurpFromArgs(Bundle* bundle)
          * guarantees about ordering, so we're okay with an inorder search
          * using whatever order the OS happens to hand back to us.
          */
-        count = slurpFullTree(bundle, assetRoot, AaptGroupEntry(), String8());
+        count = slurpFullTree(bundle, assetRoot, AaptGroupEntry(), String8(), mFullAssetPaths);
         if (count < 0) {
             /* failure; report error and remove archive */
             totalCount = count;
@@ -1946,9 +1952,10 @@ bail:
 
 ssize_t AaptAssets::slurpFullTree(Bundle* bundle, const String8& srcDir,
                                     const AaptGroupEntry& kind,
-                                    const String8& resType)
+                                    const String8& resType,
+                                    sp<FilePathStore>& fullResPaths)
 {
-    ssize_t res = AaptDir::slurpFullTree(bundle, srcDir, kind, resType);
+    ssize_t res = AaptDir::slurpFullTree(bundle, srcDir, kind, resType, fullResPaths);
     if (res > 0) {
         mGroupEntries.add(kind);
     }
@@ -2010,7 +2017,7 @@ ssize_t AaptAssets::slurpResourceTree(Bundle* bundle, const String8& srcDir)
         if (type == kFileTypeDirectory) {
             sp<AaptDir> dir = makeDir(String8(entry->d_name));
             ssize_t res = dir->slurpFullTree(bundle, subdirName, group,
-                                                resType);
+                                                resType, mFullResPaths);
             if (res < 0) {
                 count = res;
                 goto bail;
index 65743d8..82dfd71 100644 (file)
@@ -140,6 +140,7 @@ inline int strictly_order_type(const AaptGroupEntry& lhs, const AaptGroupEntry&
 }
 
 class AaptGroup;
+class FilePathStore;
 
 /**
  * A single asset file we know about.
@@ -269,7 +270,8 @@ public:
     virtual ssize_t slurpFullTree(Bundle* bundle,
                                   const String8& srcDir,
                                   const AaptGroupEntry& kind,
-                                  const String8& resType);
+                                  const String8& resType,
+                                  sp<FilePathStore>& fullResPaths);
 
     /*
      * Perform some sanity checks on the names of files and directories here.
@@ -484,6 +486,14 @@ public:
     ResourceTypeSet();
 };
 
+// Storage for lists of fully qualified paths for
+// resources encountered during slurping.
+class FilePathStore : public RefBase,
+                      public Vector<String8>
+{
+public:
+    FilePathStore();
+};
 
 /**
  * Asset hierarchy being operated on.
@@ -517,7 +527,8 @@ public:
     virtual ssize_t slurpFullTree(Bundle* bundle,
                                   const String8& srcDir,
                                   const AaptGroupEntry& kind,
-                                  const String8& resType);
+                                  const String8& resType,
+                                  sp<FilePathStore>& fullResPaths);
 
     ssize_t slurpResourceTree(Bundle* bundle, const String8& srcDir);
     ssize_t slurpResourceZip(Bundle* bundle, const char* filename);
@@ -545,6 +556,14 @@ public:
     inline void 
         setResources(KeyedVector<String8, sp<ResourceTypeSet> >* res) { delete mRes; mRes = res; }
 
+    inline sp<FilePathStore>& getFullResPaths() { return mFullResPaths; }
+    inline void
+        setFullResPaths(sp<FilePathStore>& res) { mFullResPaths = res; }
+
+    inline sp<FilePathStore>& getFullAssetPaths() { return mFullAssetPaths; }
+    inline void
+        setFullAssetPaths(sp<FilePathStore>& res) { mFullAssetPaths = res; }
+
 private:
     String8 mPackage;
     SortedVector<AaptGroupEntry> mGroupEntries;
@@ -558,6 +577,9 @@ private:
 
     sp<AaptAssets> mOverlay;
     KeyedVector<String8, sp<ResourceTypeSet> >* mRes;
+
+    sp<FilePathStore> mFullResPaths;
+    sp<FilePathStore> mFullAssetPaths;
 };
 
 #endif // __AAPT_ASSETS_H
index 094b7db..e507fb9 100644 (file)
@@ -13,6 +13,8 @@ include $(CLEAR_VARS)
 LOCAL_SRC_FILES := \
        AaptAssets.cpp \
        Command.cpp \
+       CrunchCache.cpp \
+       FileFinder.cpp \
        Main.cpp \
        Package.cpp \
        StringPool.cpp \
index fa84e93..539c312 100644 (file)
@@ -25,6 +25,7 @@ typedef enum Command {
     kCommandAdd,
     kCommandRemove,
     kCommandPackage,
+    kCommandCrunch,
 } Command;
 
 /*
@@ -41,13 +42,15 @@ public:
           mCompressionMethod(0), mOutputAPKFile(NULL),
           mManifestPackageNameOverride(NULL), mInstrumentationPackageNameOverride(NULL),
           mIsOverlayPackage(false),
-          mAutoAddOverlay(false), mAssetSourceDir(NULL), mProguardFile(NULL),
+          mAutoAddOverlay(false), mGenDependencies(false),
+          mAssetSourceDir(NULL), 
+          mCrunchedOutputDir(NULL), mProguardFile(NULL),
           mAndroidManifestFile(NULL), mPublicOutputFile(NULL),
           mRClassDir(NULL), mResourceIntermediatesDir(NULL), mManifestMinSdkVersion(NULL),
           mMinSdkVersion(NULL), mTargetSdkVersion(NULL), mMaxSdkVersion(NULL),
-          mVersionCode(NULL), mVersionName(NULL), mCustomPackage(NULL),
+          mVersionCode(NULL), mVersionName(NULL), mCustomPackage(NULL), mExtraPackages(NULL),
           mMaxResVersion(NULL), mDebugMode(false), mNonConstantId(false), mProduct(NULL),
-          mArgc(0), mArgv(NULL)
+          mUseCrunchCache(false), mArgc(0), mArgv(NULL)
         {}
     ~Bundle(void) {}
 
@@ -97,12 +100,16 @@ public:
     void setIsOverlayPackage(bool val) { mIsOverlayPackage = val; }
     bool getAutoAddOverlay() { return mAutoAddOverlay; }
     void setAutoAddOverlay(bool val) { mAutoAddOverlay = val; }
+    bool getGenDependencies() { return mGenDependencies; }
+    void setGenDependencies(bool val) { mGenDependencies = val; }
 
     /*
      * Input options.
      */
     const char* getAssetSourceDir() const { return mAssetSourceDir; }
     void setAssetSourceDir(const char* dir) { mAssetSourceDir = dir; }
+    const char* getCrunchedOutputDir() const { return mCrunchedOutputDir; }
+    void setCrunchedOutputDir(const char* dir) { mCrunchedOutputDir = dir; }
     const char* getProguardFile() const { return mProguardFile; }
     void setProguardFile(const char* file) { mProguardFile = file; }
     const android::Vector<const char*>& getResourceSourceDirs() const { return mResourceSourceDirs; }
@@ -138,6 +145,8 @@ public:
     void setVersionName(const char* val) { mVersionName = val; }
     const char* getCustomPackage() const { return mCustomPackage; }
     void setCustomPackage(const char* val) { mCustomPackage = val; }
+    const char* getExtraPackages() const { return mExtraPackages; }
+    void setExtraPackages(const char* val) { mExtraPackages = val; }
     const char* getMaxResVersion() const { return mMaxResVersion; }
     void setMaxResVersion(const char * val) { mMaxResVersion = val; }
     bool getDebugMode() { return mDebugMode; }
@@ -146,6 +155,8 @@ public:
     void setNonConstantId(bool val) { mNonConstantId = val; }
     const char* getProduct() const { return mProduct; }
     void setProduct(const char * val) { mProduct = val; }
+    void setUseCrunchCache(bool val) { mUseCrunchCache = val; }
+    bool getUseCrunchCache() { return mUseCrunchCache; }
 
     /*
      * Set and get the file specification.
@@ -224,7 +235,9 @@ private:
     const char* mInstrumentationPackageNameOverride;
     bool        mIsOverlayPackage;
     bool        mAutoAddOverlay;
+    bool        mGenDependencies;
     const char* mAssetSourceDir;
+    const char* mCrunchedOutputDir;
     const char* mProguardFile;
     const char* mAndroidManifestFile;
     const char* mPublicOutputFile;
@@ -243,10 +256,12 @@ private:
     const char* mVersionCode;
     const char* mVersionName;
     const char* mCustomPackage;
+    const char* mExtraPackages;
     const char* mMaxResVersion;
     bool        mDebugMode;
     bool        mNonConstantId;
     const char* mProduct;
+    bool        mUseCrunchCache;
 
     /* file specification */
     int         mArgc;
diff --git a/tools/aapt/CacheUpdater.h b/tools/aapt/CacheUpdater.h
new file mode 100644 (file)
index 0000000..0e65589
--- /dev/null
@@ -0,0 +1,107 @@
+//
+// Copyright 2011 The Android Open Source Project
+//
+// Abstraction of calls to system to make directories and delete files and
+// wrapper to image processing.
+
+#ifndef CACHE_UPDATER_H
+#define CACHE_UPDATER_H
+
+#include <utils/String8.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include "Images.h"
+
+using namespace android;
+
+/** CacheUpdater
+ *  This is a pure virtual class that declares abstractions of functions useful
+ *  for managing a cache files. This manager is set up to be used in a
+ *  mirror cache where the source tree is duplicated and filled with processed
+ *  images. This class is abstracted to allow for dependency injection during
+ *  unit testing.
+ *  Usage:
+ *      To update/add a file to the cache, call processImage
+ *      To remove a file from the cache, call deleteFile
+ */
+class CacheUpdater {
+public:
+    // Make sure all the directories along this path exist
+    virtual void ensureDirectoriesExist(String8 path) = 0;
+
+    // Delete a file
+    virtual void deleteFile(String8 path) = 0;
+
+    // Process an image from source out to dest
+    virtual void processImage(String8 source, String8 dest) = 0;
+private:
+};
+
+/** SystemCacheUpdater
+ * This is an implementation of the above virtual cache updater specification.
+ * This implementations hits the filesystem to manage a cache and calls out to
+ * the PNG crunching in images.h to process images out to its cache components.
+ */
+class SystemCacheUpdater : public CacheUpdater {
+public:
+    // Constructor to set bundle to pass to preProcessImage
+    SystemCacheUpdater (Bundle* b)
+        : bundle(b) { };
+
+    // Make sure all the directories along this path exist
+    virtual void ensureDirectoriesExist(String8 path)
+    {
+        // Check to see if we're dealing with a fully qualified path
+        String8 existsPath;
+        String8 toCreate;
+        String8 remains;
+        struct stat s;
+
+        // Check optomistically to see if all directories exist.
+        // If something in the path doesn't exist, then walk the path backwards
+        // and find the place to start creating directories forward.
+        if (stat(path.string(),&s) == -1) {
+            // Walk backwards to find place to start creating directories
+            existsPath = path;
+            do {
+                // As we remove the end of existsPath add it to
+                // the string of paths to create.
+                toCreate = existsPath.getPathLeaf().appendPath(toCreate);
+                existsPath = existsPath.getPathDir();
+            } while (stat(existsPath.string(),&s) == -1);
+
+            // Walk forwards and build directories as we go
+            do {
+                // Advance to the next segment of the path
+                existsPath.appendPath(toCreate.walkPath(&remains));
+                toCreate = remains;
+#ifdef HAVE_MS_C_RUNTIME
+                _mkdir(existsPath.string());
+#else
+                mkdir(existsPath.string(), S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP);
+#endif
+            } while (remains.length() > 0);
+        } //if
+    };
+
+    // Delete a file
+    virtual void deleteFile(String8 path)
+    {
+        if (remove(path.string()) != 0)
+            fprintf(stderr,"ERROR DELETING %s\n",path.string());
+    };
+
+    // Process an image from source out to dest
+    virtual void processImage(String8 source, String8 dest)
+    {
+        // Make sure we're trying to write to a directory that is extant
+        ensureDirectoriesExist(dest.getPathDir());
+
+        preProcessImageToCache(bundle, source, dest);
+    };
+private:
+    Bundle* bundle;
+};
+
+#endif // CACHE_UPDATER_H
\ No newline at end of file
index 7852197..daf53e0 100644 (file)
@@ -1508,6 +1508,8 @@ int doPackage(Bundle* bundle)
     status_t err;
     sp<AaptAssets> assets;
     int N;
+    FILE* fp;
+    String8 dependencyFile;
 
     // -c zz_ZZ means do pseudolocalization
     ResourceFilter filter;
@@ -1542,6 +1544,16 @@ int doPackage(Bundle* bundle)
 
     // Load the assets.
     assets = new AaptAssets();
+
+    // Set up the resource gathering in assets if we're going to generate
+    // dependency files
+    if (bundle->getGenDependencies()) {
+        sp<FilePathStore> resPathStore = new FilePathStore;
+        assets->setFullResPaths(resPathStore);
+        sp<FilePathStore> assetPathStore = new FilePathStore;
+        assets->setFullAssetPaths(assetPathStore);
+    }
+
     err = assets->slurpFromArgs(bundle);
     if (err < 0) {
         goto bail;
@@ -1551,7 +1563,7 @@ int doPackage(Bundle* bundle)
         assets->print();
     }
 
-    // If they asked for any files that need to be compiled, do so.
+    // If they asked for any fileAs that need to be compiled, do so.
     if (bundle->getResourceSourceDirs().size() || bundle->getAndroidManifestFile()) {
         err = buildResources(bundle, assets);
         if (err != 0) {
@@ -1565,10 +1577,36 @@ int doPackage(Bundle* bundle)
         goto bail;
     }
 
+    if (bundle->getGenDependencies()) {
+        if (outputAPKFile) {
+            dependencyFile = String8(outputAPKFile);
+            // Strip the extension and add new one
+            dependencyFile = dependencyFile.getBasePath();
+            dependencyFile.append(".d");
+        } else {
+            dependencyFile = String8(bundle->getRClassDir());
+            dependencyFile.appendPath("R.d");
+        }
+        // Make sure we have a clean dependency file to start with
+        fp = fopen(dependencyFile, "w");
+        fclose(fp);
+    }
+
     // Write out R.java constants
     if (assets->getPackage() == assets->getSymbolsPrivatePackage()) {
         if (bundle->getCustomPackage() == NULL) {
             err = writeResourceSymbols(bundle, assets, assets->getPackage(), true);
+            // Copy R.java for libraries
+            if (bundle->getExtraPackages() != NULL) {
+                // Split on colon
+                String8 libs(bundle->getExtraPackages());
+                char* packageString = strtok(libs.lockBuffer(libs.length()), ":");
+                while (packageString != NULL) {
+                    err = writeResourceSymbols(bundle, assets, String8(packageString), true);
+                    packageString = strtok(NULL, ":");
+                }
+                libs.unlockBuffer();
+            }
         } else {
             const String8 customPkg(bundle->getCustomPackage());
             err = writeResourceSymbols(bundle, assets, customPkg, true);
@@ -1602,6 +1640,18 @@ int doPackage(Bundle* bundle)
         }
     }
 
+    if (bundle->getGenDependencies()) {
+        // Now that writeResourceSymbols or writeAPK has taken care of writing
+        // the targets to our dependency file, we'll write the prereqs
+        fp = fopen(dependencyFile, "a+");
+        fprintf(fp, " : ");
+        bool includeRaw = (outputAPKFile != NULL);
+        err = writeDependencyPreReqs(bundle, assets, fp, includeRaw);
+        // Also manually add the AndroidManifeset since it's a non-asset
+        fprintf(fp, "%s \\\n", bundle->getAndroidManifestFile());
+        fclose(fp);
+    }
+
     retVal = 0;
 bail:
     if (SourcePos::hasErrors()) {
@@ -1609,3 +1659,25 @@ bail:
     }
     return retVal;
 }
+
+/*
+ * Do PNG Crunching
+ * PRECONDITIONS
+ *  -S flag points to a source directory containing drawable* folders
+ *  -C flag points to destination directory. The folder structure in the
+ *     source directory will be mirrored to the destination (cache) directory
+ *
+ * POSTCONDITIONS
+ *  Destination directory will be updated to match the PNG files in
+ *  the source directory. 
+ */
+int doCrunch(Bundle* bundle)
+{
+    fprintf(stdout, "Crunching PNG Files in ");
+    fprintf(stdout, "source dir: %s\n", bundle->getResourceSourceDirs()[0]);
+    fprintf(stdout, "To destination dir: %s\n", bundle->getCrunchedOutputDir());
+
+    updatePreProcessedCache(bundle);
+
+    return NO_ERROR;
+}
diff --git a/tools/aapt/CrunchCache.cpp b/tools/aapt/CrunchCache.cpp
new file mode 100644 (file)
index 0000000..c4cf6bc
--- /dev/null
@@ -0,0 +1,104 @@
+//
+// Copyright 2011 The Android Open Source Project
+//
+// Implementation file for CrunchCache
+// This file defines functions laid out and documented in
+// CrunchCache.h
+
+#include <utils/Vector.h>
+#include <utils/String8.h>
+
+#include "DirectoryWalker.h"
+#include "FileFinder.h"
+#include "CacheUpdater.h"
+#include "CrunchCache.h"
+
+using namespace android;
+
+CrunchCache::CrunchCache(String8 sourcePath, String8 destPath, FileFinder* ff)
+    : mSourcePath(sourcePath), mDestPath(destPath), mSourceFiles(0), mDestFiles(0), mFileFinder(ff)
+{
+    // We initialize the default value to return to 0 so if a file doesn't exist
+    // then all files are automatically "newer" than it.
+
+    // Set file extensions to look for. Right now just pngs.
+    mExtensions.push(String8(".png"));
+
+    // Load files into our data members
+    loadFiles();
+}
+
+size_t CrunchCache::crunch(CacheUpdater* cu, bool forceOverwrite)
+{
+    size_t numFilesUpdated = 0;
+
+    // Iterate through the source files and compare to cache.
+    // After processing a file, remove it from the source files and
+    // from the dest files.
+    // We're done when we're out of files in source.
+    String8 relativePath;
+    while (mSourceFiles.size() > 0) {
+        // Get the full path to the source file, then convert to a c-string
+        // and offset our beginning pointer to the length of the sourcePath
+        // This efficiently strips the source directory prefix from our path.
+        // Also, String8 doesn't have a substring method so this is what we've
+        // got to work with.
+        const char* rPathPtr = mSourceFiles.keyAt(0).string()+mSourcePath.length();
+        // Strip leading slash if present
+        int offset = 0;
+        if (rPathPtr[0] == OS_PATH_SEPARATOR)
+            offset = 1;
+        relativePath = String8(rPathPtr + offset);
+
+        if (forceOverwrite || needsUpdating(relativePath)) {
+            cu->processImage(mSourcePath.appendPathCopy(relativePath),
+                             mDestPath.appendPathCopy(relativePath));
+            numFilesUpdated++;
+            // crunchFile(relativePath);
+        }
+        // Delete this file from the source files and (if it exists) from the
+        // dest files.
+        mSourceFiles.removeItemsAt(0);
+        mDestFiles.removeItem(mDestPath.appendPathCopy(relativePath));
+    }
+
+    // Iterate through what's left of destFiles and delete leftovers
+    while (mDestFiles.size() > 0) {
+        cu->deleteFile(mDestFiles.keyAt(0));
+        mDestFiles.removeItemsAt(0);
+    }
+
+    // Update our knowledge of the files cache
+    // both source and dest should be empty by now.
+    loadFiles();
+
+    return numFilesUpdated;
+}
+
+void CrunchCache::loadFiles()
+{
+    // Clear out our data structures to avoid putting in duplicates
+    mSourceFiles.clear();
+    mDestFiles.clear();
+
+    // Make a directory walker that points to the system.
+    DirectoryWalker* dw = new SystemDirectoryWalker();
+
+    // Load files in the source directory
+    mFileFinder->findFiles(mSourcePath, mExtensions, mSourceFiles,dw);
+
+    // Load files in the destination directory
+    mFileFinder->findFiles(mDestPath,mExtensions,mDestFiles,dw);
+
+    delete dw;
+}
+
+bool CrunchCache::needsUpdating(String8 relativePath) const
+{
+    // Retrieve modification dates for this file entry under the source and
+    // cache directory trees. The vectors will return a modification date of 0
+    // if the file doesn't exist.
+    time_t sourceDate = mSourceFiles.valueFor(mSourcePath.appendPathCopy(relativePath));
+    time_t destDate = mDestFiles.valueFor(mDestPath.appendPathCopy(relativePath));
+    return sourceDate > destDate;
+}
\ No newline at end of file
diff --git a/tools/aapt/CrunchCache.h b/tools/aapt/CrunchCache.h
new file mode 100644 (file)
index 0000000..be3da5c
--- /dev/null
@@ -0,0 +1,102 @@
+//
+// Copyright 2011 The Android Open Source Project
+//
+// Cache manager for pre-processed PNG files.
+// Contains code for managing which PNG files get processed
+// at build time.
+//
+
+#ifndef CRUNCHCACHE_H
+#define CRUNCHCACHE_H
+
+#include <utils/KeyedVector.h>
+#include <utils/String8.h>
+#include "FileFinder.h"
+#include "CacheUpdater.h"
+
+using namespace android;
+
+/** CrunchCache
+ *  This class is a cache manager which can pre-process PNG files and store
+ *  them in a mirror-cache. It's capable of doing incremental updates to its
+ *  cache.
+ *
+ *  Usage:
+ *      Create an instance initialized with the root of the source tree, the
+ *      root location to store the cache files, and an instance of a file finder.
+ *      Then update the cache by calling crunch.
+ */
+class CrunchCache {
+public:
+    // Constructor
+    CrunchCache(String8 sourcePath, String8 destPath, FileFinder* ff);
+
+    // Nobody should be calling the default constructor
+    // So this space is intentionally left blank
+
+    // Default Copy Constructor and Destructor are fine
+
+    /** crunch is the workhorse of this class.
+     * It goes through all the files found in the sourcePath and compares
+     * them to the cached versions in the destPath. If the optional
+     * argument forceOverwrite is set to true, then all source files are
+     * re-crunched even if they have not been modified recently. Otherwise,
+     * source files are only crunched when they needUpdating. Afterwards,
+     * we delete any leftover files in the cache that are no longer present
+     * in source.
+     *
+     * PRECONDITIONS:
+     *      No setup besides construction is needed
+     * POSTCONDITIONS:
+     *      The cache is updated to fully reflect all changes in source.
+     *      The function then returns the number of files changed in cache
+     *      (counting deletions).
+     */
+    size_t crunch(CacheUpdater* cu, bool forceOverwrite=false);
+
+private:
+    /** loadFiles is a wrapper to the FileFinder that places matching
+     * files into mSourceFiles and mDestFiles.
+     *
+     *  POSTCONDITIONS
+     *      mDestFiles and mSourceFiles are refreshed to reflect the current
+     *      state of the files in the source and dest directories.
+     *      Any previous contents of mSourceFiles and mDestFiles are cleared.
+     */
+    void loadFiles();
+
+    /** needsUpdating takes a file path
+     * and returns true if the file represented by this path is newer in the
+     * sourceFiles than in the cache (mDestFiles).
+     *
+     * PRECONDITIONS:
+     *      mSourceFiles and mDestFiles must be initialized and filled.
+     * POSTCONDITIONS:
+     *      returns true if and only if source file's modification time
+     *      is greater than the cached file's mod-time. Otherwise returns false.
+     *
+     * USAGE:
+     *      Should be used something like the following:
+     *      if (needsUpdating(filePath))
+     *          // Recrunch sourceFile out to destFile.
+     *
+     */
+    bool needsUpdating(String8 relativePath) const;
+
+    // DATA MEMBERS ====================================================
+
+    String8 mSourcePath;
+    String8 mDestPath;
+
+    Vector<String8> mExtensions;
+
+    // Each vector of paths contains one entry per PNG file encountered.
+    // Each entry consists of a path pointing to that PNG.
+    DefaultKeyedVector<String8,time_t> mSourceFiles;
+    DefaultKeyedVector<String8,time_t> mDestFiles;
+
+    // Pointer to a FileFinder to use
+    FileFinder* mFileFinder;
+};
+
+#endif // CRUNCHCACHE_H
diff --git a/tools/aapt/DirectoryWalker.h b/tools/aapt/DirectoryWalker.h
new file mode 100644 (file)
index 0000000..88031d0
--- /dev/null
@@ -0,0 +1,98 @@
+//
+// Copyright 2011 The Android Open Source Project
+//
+// Defines an abstraction for opening a directory on the filesystem and
+// iterating through it.
+
+#ifndef DIRECTORYWALKER_H
+#define DIRECTORYWALKER_H
+
+#include <dirent.h>
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <utils/String8.h>
+
+#include <stdio.h>
+
+using namespace android;
+
+// Directory Walker
+// This is an abstraction for walking through a directory and getting files
+// and descriptions.
+
+class DirectoryWalker {
+public:
+    virtual ~DirectoryWalker() {};
+    virtual bool openDir(String8 path) = 0;
+    virtual bool openDir(const char* path) = 0;
+    // Advance to next directory entry
+    virtual struct dirent* nextEntry() = 0;
+    // Get the stats for the current entry
+    virtual struct stat*   entryStats() = 0;
+    // Clean Up
+    virtual void closeDir() = 0;
+    // This class is able to replicate itself on the heap
+    virtual DirectoryWalker* clone() = 0;
+
+    // DATA MEMBERS
+    // Current directory entry
+    struct dirent mEntry;
+    // Stats for that directory entry
+    struct stat mStats;
+    // Base path
+    String8 mBasePath;
+};
+
+// System Directory Walker
+// This is an implementation of the above abstraction that calls
+// real system calls and is fully functional.
+// functions are inlined since they're very short and simple
+
+class SystemDirectoryWalker : public DirectoryWalker {
+
+    // Default constructor, copy constructor, and destructor are fine
+public:
+    virtual bool openDir(String8 path) {
+        mBasePath = path;
+        dir = NULL;
+        dir = opendir(mBasePath.string() );
+
+        if (dir == NULL)
+            return false;
+
+        return true;
+    };
+    virtual bool openDir(const char* path) {
+        String8 p(path);
+        openDir(p);
+        return true;
+    };
+    // Advance to next directory entry
+    virtual struct dirent* nextEntry() {
+        struct dirent* entryPtr = readdir(dir);
+        if (entryPtr == NULL)
+            return NULL;
+
+        mEntry = *entryPtr;
+        // Get stats
+        String8 fullPath = mBasePath.appendPathCopy(mEntry.d_name);
+        stat(fullPath.string(),&mStats);
+        return &mEntry;
+    };
+    // Get the stats for the current entry
+    virtual struct stat*   entryStats() {
+        return &mStats;
+    };
+    virtual void closeDir() {
+        closedir(dir);
+    };
+    virtual DirectoryWalker* clone() {
+        return new SystemDirectoryWalker(*this);
+    };
+private:
+    DIR* dir;
+};
+
+#endif // DIRECTORYWALKER_H
diff --git a/tools/aapt/FileFinder.cpp b/tools/aapt/FileFinder.cpp
new file mode 100644 (file)
index 0000000..580528d
--- /dev/null
@@ -0,0 +1,113 @@
+//
+// Copyright 2011 The Android Open Source Project
+//
+
+// File Finder implementation.
+// Implementation for the functions declared and documented in FileFinder.h
+
+#include <utils/Vector.h>
+#include <utils/String8.h>
+#include <utils/KeyedVector.h>
+
+#include <iostream>
+#include <dirent.h>
+#include <sys/stat.h>
+
+#include "DirectoryWalker.h"
+#include "FileFinder.h"
+
+//#define DEBUG
+
+using android::String8;
+using std::cout;
+using std::endl;
+
+// Private function to check whether a file is a directory or not
+bool isDirectory(const char* filename) {
+    struct stat fileStat;
+    if (stat(filename, &fileStat) == -1) {
+        return false;
+    }
+    return(S_ISDIR(fileStat.st_mode));
+}
+
+
+// Private function to check whether a file is a regular file or not
+bool isFile(const char* filename) {
+    struct stat fileStat;
+    if (stat(filename, &fileStat) == -1) {
+        return false;
+    }
+    return(S_ISREG(fileStat.st_mode));
+}
+
+bool SystemFileFinder::findFiles(String8 basePath, Vector<String8>& extensions,
+                                 KeyedVector<String8,time_t>& fileStore,
+                                 DirectoryWalker* dw)
+{
+    // Scan the directory pointed to by basePath
+    // check files and recurse into subdirectories.
+    if (!dw->openDir(basePath)) {
+        return false;
+    }
+#ifdef DEBUG
+    cout << "FileFinder looking in " << basePath << endl;
+#endif // DEBUG
+    /*
+     *  Go through all directory entries. Check each file using checkAndAddFile
+     *  and recurse into sub-directories.
+     */
+    struct dirent* entry;
+    while ((entry = dw->nextEntry()) != NULL) {
+        String8 entryName(entry->d_name);
+        if (entry->d_name[0] == '.') // Skip hidden files and directories
+            continue;
+
+        String8 fullPath = basePath.appendPathCopy(entryName);
+        // If this entry is a directory we'll recurse into it
+        if (isDirectory(fullPath.string()) ) {
+            DirectoryWalker* copy = dw->clone();
+            findFiles(fullPath, extensions, fileStore,copy);
+            delete copy;
+        }
+
+        // If this entry is a file, we'll pass it over to checkAndAddFile
+        if (isFile(fullPath.string()) ) {
+            checkAndAddFile(fullPath,dw->entryStats(),extensions,fileStore);
+        }
+    }
+
+    // Clean up
+    dw->closeDir();
+
+    return true;
+}
+
+void SystemFileFinder::checkAndAddFile(String8 path, const struct stat* stats,
+                                       Vector<String8>& extensions,
+                                       KeyedVector<String8,time_t>& fileStore)
+{
+#ifdef DEBUG
+    cout << "Checking file " << path << "...";
+#endif // DEBUG
+    // Loop over the extensions, checking for a match
+    bool done = false;
+    String8 ext(path.getPathExtension());
+    ext.toLower();
+    for (size_t i = 0; i < extensions.size() && !done; ++i) {
+        String8 ext2 = extensions[i].getPathExtension();
+        ext2.toLower();
+        // Compare the extensions. If a match is found, add to storage.
+        if (ext == ext2) {
+#ifdef DEBUG
+            cout << "Match";
+#endif // DEBUG
+            done = true;
+            fileStore.add(path,stats->st_mtime);
+        }
+    }
+#ifdef DEBUG
+    cout << endl;
+#endif //DEBUG
+}
+
diff --git a/tools/aapt/FileFinder.h b/tools/aapt/FileFinder.h
new file mode 100644 (file)
index 0000000..6974aee
--- /dev/null
@@ -0,0 +1,80 @@
+//
+// Copyright 2011 The Android Open Source Project
+//
+
+// File Finder.
+// This is a collection of useful functions for finding paths and modification
+// times of files that match an extension pattern in a directory tree.
+// and finding files in it.
+
+#ifndef FILEFINDER_H
+#define FILEFINDER_H
+
+#include <utils/Vector.h>
+#include <utils/KeyedVector.h>
+#include <utils/String8.h>
+
+#include "DirectoryWalker.h"
+
+using namespace android;
+
+// Abstraction to allow for dependency injection. See MockFileFinder.h
+// for the testing implementation.
+class FileFinder {
+public:
+    virtual bool findFiles(String8 basePath, Vector<String8>& extensions,
+                           KeyedVector<String8,time_t>& fileStore,
+                           DirectoryWalker* dw) = 0;
+
+    virtual ~FileFinder() {};
+};
+
+class SystemFileFinder : public FileFinder {
+public:
+
+    /* findFiles takes a path, a Vector of extensions, and a destination KeyedVector
+     *           and places path/modification date key/values pointing to
+     *          all files with matching extensions found into the KeyedVector
+     * PRECONDITIONS
+     *     path is a valid system path
+     *     extensions should include leading "."
+     *                This is not necessary, but the comparison directly
+     *                compares the end of the path string so if the "."
+     *                is excluded there is a small chance you could have
+     *                a false positive match. (For example: extension "png"
+     *                would match a file called "blahblahpng")
+     *
+     * POSTCONDITIONS
+     *     fileStore contains (in no guaranteed order) paths to all
+     *                matching files encountered in subdirectories of path
+     *                as keys in the KeyedVector. Each key has the modification time
+     *                of the file as its value.
+     *
+     * Calls checkAndAddFile on each file encountered in the directory tree
+     * Recursively descends into subdirectories.
+     */
+    virtual bool findFiles(String8 basePath, Vector<String8>& extensions,
+                           KeyedVector<String8,time_t>& fileStore,
+                           DirectoryWalker* dw);
+
+private:
+    /**
+     * checkAndAddFile looks at a single file path and stat combo
+     * to determine whether it is a matching file (by looking at
+     * the extension)
+     *
+     * PRECONDITIONS
+     *    no setup is needed
+     *
+     * POSTCONDITIONS
+     *    If the given file has a matching extension then a new entry
+     *    is added to the KeyedVector with the path as the key and the modification
+     *    time as the value.
+     *
+     */
+    static void checkAndAddFile(String8 path, const struct stat* stats,
+                                Vector<String8>& extensions,
+                                KeyedVector<String8,time_t>& fileStore);
+
+};
+#endif // FILEFINDER_H
index 3c471ca..311ceea 100644 (file)
@@ -1080,7 +1080,128 @@ bail:
     return error;
 }
 
+status_t preProcessImageToCache(Bundle* bundle, String8 source, String8 dest)
+{
+    png_structp read_ptr = NULL;
+    png_infop read_info = NULL;
+
+    FILE* fp;
+
+    image_info imageInfo;
+
+    png_structp write_ptr = NULL;
+    png_infop write_info = NULL;
+
+    status_t error = UNKNOWN_ERROR;
+
+    // Get a file handler to read from
+    fp = fopen(source.string(),"rb");
+    if (fp == NULL) {
+        fprintf(stderr, "%s ERROR: Unable to open PNG file\n", source.string());
+        return error;
+    }
+
+    // Call libpng to get a struct to read image data into
+    read_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+    if (!read_ptr) {
+        fclose(fp);
+        png_destroy_read_struct(&read_ptr, &read_info,NULL);
+        return error;
+    }
+
+    // Call libpng to get a struct to read image info into
+    read_info = png_create_info_struct(read_ptr);
+    if (!read_info) {
+        fclose(fp);
+        png_destroy_read_struct(&read_ptr, &read_info,NULL);
+        return error;
+    }
+
+    // Set a jump point for libpng to long jump back to on error
+    if (setjmp(png_jmpbuf(read_ptr))) {
+        fclose(fp);
+        png_destroy_read_struct(&read_ptr, &read_info,NULL);
+        return error;
+    }
+
+    // Set up libpng to read from our file.
+    png_init_io(read_ptr,fp);
+
+    // Actually read data from the file
+    read_png(source.string(), read_ptr, read_info, &imageInfo);
 
+    // We're done reading so we can clean up
+    // Find old file size before releasing handle
+    fseek(fp, 0, SEEK_END);
+    size_t oldSize = (size_t)ftell(fp);
+    fclose(fp);
+    png_destroy_read_struct(&read_ptr, &read_info,NULL);
+
+    // Check to see if we're dealing with a 9-patch
+    // If we are, process appropriately
+    if (source.getBasePath().getPathExtension() == ".9")  {
+        if (do_9patch(source.string(), &imageInfo) != NO_ERROR) {
+            return error;
+        }
+    }
+
+    // Call libpng to create a structure to hold the processed image data
+    // that can be written to disk
+    write_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+    if (!write_ptr) {
+        png_destroy_write_struct(&write_ptr, &write_info);
+        return error;
+    }
+
+    // Call libpng to create a structure to hold processed image info that can
+    // be written to disk
+    write_info = png_create_info_struct(write_ptr);
+    if (!write_info) {
+        png_destroy_write_struct(&write_ptr, &write_info);
+        return error;
+    }
+
+    // Open up our destination file for writing
+    fp = fopen(dest.string(), "wb");
+    if (!fp) {
+        fprintf(stderr, "%s ERROR: Unable to open PNG file\n", dest.string());
+        png_destroy_write_struct(&write_ptr, &write_info);
+        return error;
+    }
+
+    // Set up libpng to write to our file
+    png_init_io(write_ptr, fp);
+
+    // Set up a jump for libpng to long jump back on on errors
+    if (setjmp(png_jmpbuf(write_ptr))) {
+        fclose(fp);
+        png_destroy_write_struct(&write_ptr, &write_info);
+        return error;
+    }
+
+    // Actually write out to the new png
+    write_png(dest.string(), write_ptr, write_info, imageInfo,
+              bundle->getGrayscaleTolerance());
+
+    if (bundle->getVerbose()) {
+        // Find the size of our new file
+        FILE* reader = fopen(dest.string(), "rb");
+        fseek(reader, 0, SEEK_END);
+        size_t newSize = (size_t)ftell(reader);
+        fclose(reader);
+
+        float factor = ((float)newSize)/oldSize;
+        int percent = (int)(factor*100);
+        printf("  (processed image to cache entry %s: %d%% size of source)\n",
+               dest.string(), percent);
+    }
+
+    //Clean up
+    fclose(fp);
+    png_destroy_write_struct(&write_ptr, &write_info);
+
+    return NO_ERROR;
+}
 
 status_t postProcessImage(const sp<AaptAssets>& assets,
                           ResourceTable* table, const sp<AaptFile>& file)
index 168e22f..4816905 100644 (file)
@@ -8,11 +8,19 @@
 #define IMAGES_H
 
 #include "ResourceTable.h"
+#include "Bundle.h"
+
+#include <utils/String8.h>
+#include <utils/RefBase.h>
+
+using android::String8;
 
 status_t preProcessImage(Bundle* bundle, const sp<AaptAssets>& assets,
                          const sp<AaptFile>& file, String8* outNewLeafName);
 
+status_t preProcessImageToCache(Bundle* bundle, String8 source, String8 dest);
+
 status_t postProcessImage(const sp<AaptAssets>& assets,
-                                                 ResourceTable* table, const sp<AaptFile>& file);
+                          ResourceTable* table, const sp<AaptFile>& file);
 
 #endif
index 1e63131..5135787 100644 (file)
@@ -83,6 +83,9 @@ void usage(void)
         " %s a[dd] [-v] file.{zip,jar,apk} file1 [file2 ...]\n"
         "   Add specified files to Zip-compatible archive.\n\n", gProgName);
     fprintf(stderr,
+        " %s c[runch] [-v] -S resource-sources ... -C output-folder ...\n"
+        "   Do PNG preprocessing and store the results in output folder.\n\n", gProgName);
+    fprintf(stderr,
         " %s v[ersion]\n"
         "   Print program version.\n\n", gProgName);
     fprintf(stderr,
@@ -145,6 +148,10 @@ void usage(void)
         "       inserts android:versionName in to manifest.\n"
         "   --custom-package\n"
         "       generates R.java into a different package.\n"
+        "   --extra-packages\n"
+        "       generate R.java for libraries. Separate libraries with ':'.\n"
+        "   --generate-dependencies\n"
+        "       generate dependency files in the same directories for R.java and resource package\n"
         "   --auto-add-overlay\n"
         "       Automatically add resources that are only in overlays.\n"
         "   --rename-manifest-package\n"
@@ -186,6 +193,7 @@ int handleCommand(Bundle* bundle)
     case kCommandAdd:       return doAdd(bundle);
     case kCommandRemove:    return doRemove(bundle);
     case kCommandPackage:   return doPackage(bundle);
+    case kCommandCrunch:    return doCrunch(bundle);
     default:
         fprintf(stderr, "%s: requested command not yet supported\n", gProgName);
         return 1;
@@ -223,6 +231,8 @@ int main(int argc, char* const argv[])
         bundle.setCommand(kCommandRemove);
     else if (argv[1][0] == 'p')
         bundle.setCommand(kCommandPackage);
+    else if (argv[1][0] == 'c')
+        bundle.setCommand(kCommandCrunch);
     else {
         fprintf(stderr, "ERROR: Unknown command '%s'\n", argv[1]);
         wantUsage = true;
@@ -393,6 +403,17 @@ int main(int argc, char* const argv[])
                 convertPath(argv[0]);
                 bundle.addResourceSourceDir(argv[0]);
                 break;
+            case 'C':
+                argc--;
+                argv++;
+                if (!argc) {
+                    fprintf(stderr, "ERROR: No argument supplied for '-C' option\n");
+                    wantUsage = true;
+                    goto bail;
+                }
+                convertPath(argv[0]);
+                bundle.setCrunchedOutputDir(argv[0]);
+                break;
             case '0':
                 argc--;
                 argv++;
@@ -475,6 +496,17 @@ int main(int argc, char* const argv[])
                         goto bail;
                     }
                     bundle.setCustomPackage(argv[0]);
+                } else if (strcmp(cp, "-extra-packages") == 0) {
+                    argc--;
+                    argv++;
+                    if (!argc) {
+                        fprintf(stderr, "ERROR: No argument supplied for '--extra-packages' option\n");
+                        wantUsage = true;
+                        goto bail;
+                    }
+                    bundle.setExtraPackages(argv[0]);
+                } else if (strcmp(cp, "-generate-dependencies") == 0) {
+                    bundle.setGenDependencies(true);
                 } else if (strcmp(cp, "-utf16") == 0) {
                     bundle.setWantUTF16(true);
                 } else if (strcmp(cp, "-rename-manifest-package") == 0) {
@@ -508,7 +540,9 @@ int main(int argc, char* const argv[])
                     bundle.setProduct(argv[0]);
                 } else if (strcmp(cp, "-non-constant-id") == 0) {
                     bundle.setNonConstantId(true);
-                } else {
+                } else if (strcmp(cp, "-no-crunch") == 0) {
+                    bundle.setUseCrunchCache(true);
+                }else {
                     fprintf(stderr, "ERROR: Unknown option '-%s'\n", cp);
                     wantUsage = true;
                     goto bail;
index 3ba4f39..d20c601 100644 (file)
 #include "AaptAssets.h"
 #include "ZipFile.h"
 
+
+/* Benchmarking Flag */
+//#define BENCHMARK 1
+
+#if BENCHMARK
+    #include <time.h>
+#endif /* BENCHMARK */
+
 extern int doVersion(Bundle* bundle);
 extern int doList(Bundle* bundle);
 extern int doDump(Bundle* bundle);
 extern int doAdd(Bundle* bundle);
 extern int doRemove(Bundle* bundle);
 extern int doPackage(Bundle* bundle);
+extern int doCrunch(Bundle* bundle);
 
 extern int calcPercent(long uncompressedLen, long compressedLen);
 
@@ -27,6 +36,8 @@ extern android::status_t writeAPK(Bundle* bundle,
     const sp<AaptAssets>& assets,
     const android::String8& outputFile);
 
+extern android::status_t updatePreProcessedCache(Bundle* bundle);
+
 extern android::status_t buildResources(Bundle* bundle,
     const sp<AaptAssets>& assets);
 
@@ -46,4 +57,6 @@ int dumpResources(Bundle* bundle);
 String8 getAttribute(const ResXMLTree& tree, const char* ns,
                             const char* attr, String8* outError);
 
+status_t writeDependencyPreReqs(Bundle* bundle, const sp<AaptAssets>& assets,
+                                FILE* fp, bool includeRaw);
 #endif // __MAIN_H
index ab71f34..c9f6870 100644 (file)
@@ -50,6 +50,11 @@ ssize_t processJarFiles(Bundle* bundle, ZipFile* zip);
 status_t writeAPK(Bundle* bundle, const sp<AaptAssets>& assets,
                        const String8& outputFile)
 {
+    #if BENCHMARK
+    fprintf(stdout, "BENCHMARK: Starting APK Bundling \n");
+    long startAPKTime = clock();
+    #endif /* BENCHMARK */
+
     status_t result = NO_ERROR;
     ZipFile* zip = NULL;
     int count;
@@ -172,6 +177,16 @@ status_t writeAPK(Bundle* bundle, const sp<AaptAssets>& assets,
         }
     }
 
+    if (bundle->getGenDependencies()) {
+        // Add this file to the dependency file
+        String8 dependencyFile = outputFile.getBasePath();
+        dependencyFile.append(".d");
+
+        FILE* fp = fopen(dependencyFile.string(), "a");
+        fprintf(fp, "%s \\\n", outputFile.string());
+        fclose(fp);
+    }
+
     assert(result == NO_ERROR);
 
 bail:
@@ -187,6 +202,10 @@ bail:
 
     if (result == NO_ERROR && bundle->getVerbose())
         printf("Done!\n");
+
+    #if BENCHMARK
+    fprintf(stdout, "BENCHMARK: End APK Bundling. Time Elapsed: %f ms \n",(clock() - startAPKTime)/1000.0);
+    #endif /* BENCHMARK */
     return result;
 }
 
index b4ac929..cb6484f 100644 (file)
 #include "ResourceTable.h"
 #include "Images.h"
 
+#include "CrunchCache.h"
+#include "FileFinder.h"
+#include "CacheUpdater.h"
+
 #define NOISY(x) // x
 
 // ==========================================================================
@@ -51,6 +55,12 @@ ResourceTypeSet::ResourceTypeSet()
 {
 }
 
+FilePathStore::FilePathStore()
+    :RefBase(),
+     Vector<String8>()
+{
+}
+
 class ResourceDirIterator
 {
 public:
@@ -287,18 +297,19 @@ static status_t makeFileResources(Bundle* bundle, const sp<AaptAssets>& assets,
 static status_t preProcessImages(Bundle* bundle, const sp<AaptAssets>& assets,
                           const sp<ResourceTypeSet>& set, const char* type)
 {
-    ResourceDirIterator it(set, String8(type));
-    Vector<sp<AaptFile> > newNameFiles;
-    Vector<String8> newNamePaths;
     bool hasErrors = false;
-    ssize_t res;
-    while ((res=it.next()) == NO_ERROR) {
-        res = preProcessImage(bundle, assets, it.getFile(), NULL);
-        if (res < NO_ERROR) {
-            hasErrors = true;
+    ssize_t res = NO_ERROR;
+    if (bundle->getUseCrunchCache() == false) {
+        ResourceDirIterator it(set, String8(type));
+        Vector<sp<AaptFile> > newNameFiles;
+        Vector<String8> newNamePaths;
+        while ((res=it.next()) == NO_ERROR) {
+            res = preProcessImage(bundle, assets, it.getFile(), NULL);
+            if (res < NO_ERROR) {
+                hasErrors = true;
+            }
         }
     }
-
     return (hasErrors || (res < NO_ERROR)) ? UNKNOWN_ERROR : NO_ERROR;
 }
 
@@ -748,6 +759,35 @@ status_t massageManifest(Bundle* bundle, sp<XMLNode> root)
             } \
         } while (0)
 
+status_t updatePreProcessedCache(Bundle* bundle)
+{
+    #if BENCHMARK
+    fprintf(stdout, "BENCHMARK: Starting PNG PreProcessing \n");
+    long startPNGTime = clock();
+    #endif /* BENCHMARK */
+
+    String8 source(bundle->getResourceSourceDirs()[0]);
+    String8 dest(bundle->getCrunchedOutputDir());
+
+    FileFinder* ff = new SystemFileFinder();
+    CrunchCache cc(source,dest,ff);
+
+    CacheUpdater* cu = new SystemCacheUpdater(bundle);
+    size_t numFiles = cc.crunch(cu);
+
+    if (bundle->getVerbose())
+        fprintf(stdout, "Crunched %d PNG files to update cache\n", (int)numFiles);
+
+    delete ff;
+    delete cu;
+
+    #if BENCHMARK
+    fprintf(stdout, "BENCHMARK: End PNG PreProcessing. Time Elapsed: %f ms \n"
+            ,(clock() - startPNGTime)/1000.0);
+    #endif /* BENCHMARK */
+    return 0;
+}
+
 status_t buildResources(Bundle* bundle, const sp<AaptAssets>& assets)
 {
     // First, look for a package file to parse.  This is required to
@@ -1917,6 +1957,16 @@ status_t writeResourceSymbols(Bundle* bundle, const sp<AaptAssets>& assets,
             return err;
         }
         fclose(fp);
+
+        if (bundle->getGenDependencies()) {
+            // Add this R.java to the dependency file
+            String8 dependencyFile(bundle->getRClassDir());
+            dependencyFile.appendPath("R.d");
+
+            fp = fopen(dependencyFile.string(), "a");
+            fprintf(fp,"%s \\\n", dest.string());
+            fclose(fp);
+        }
     }
 
     return NO_ERROR;
@@ -2244,3 +2294,27 @@ writeProguardFile(Bundle* bundle, const sp<AaptAssets>& assets)
 
     return err;
 }
+
+// Loops through the string paths and writes them to the file pointer
+// Each file path is written on its own line with a terminating backslash.
+status_t writePathsToFile(const sp<FilePathStore>& files, FILE* fp)
+{
+    status_t deps = -1;
+    for (size_t file_i = 0; file_i < files->size(); ++file_i) {
+        // Add the full file path to the dependency file
+        fprintf(fp, "%s \\\n", files->itemAt(file_i).string());
+        deps++;
+    }
+    return deps;
+}
+
+status_t
+writeDependencyPreReqs(Bundle* bundle, const sp<AaptAssets>& assets, FILE* fp, bool includeRaw)
+{
+    status_t deps = -1;
+    deps += writePathsToFile(assets->getFullResPaths(), fp);
+    if (includeRaw) {
+        deps += writePathsToFile(assets->getFullAssetPaths(), fp);
+    }
+    return deps;
+}
index 7877550..dbbd072 100644 (file)
@@ -57,7 +57,7 @@ public:
     /*
      * Open a new or existing archive.
      */
-    enum {
+    typedef enum {
         kOpenReadOnly   = 0x01,
         kOpenReadWrite  = 0x02,
         kOpenCreate     = 0x04,     // create if it doesn't exist
diff --git a/tools/aapt/tests/CrunchCache_test.cpp b/tools/aapt/tests/CrunchCache_test.cpp
new file mode 100644 (file)
index 0000000..20b5022
--- /dev/null
@@ -0,0 +1,97 @@
+//
+// Copyright 2011 The Android Open Source Project
+//
+#include <utils/String8.h>
+#include <iostream>
+#include <errno.h>
+
+#include "CrunchCache.h"
+#include "FileFinder.h"
+#include "MockFileFinder.h"
+#include "CacheUpdater.h"
+#include "MockCacheUpdater.h"
+
+using namespace android;
+using std::cout;
+using std::endl;
+
+void expectEqual(int got, int expected, const char* desc) {
+    cout << "Checking " << desc << ": ";
+    cout << "Got " << got << ", expected " << expected << "...";
+    cout << ( (got == expected) ? "PASSED" : "FAILED") << endl;
+    errno += ((got == expected) ? 0 : 1);
+}
+
+int main() {
+
+    errno = 0;
+
+    String8 source("res");
+    String8 dest("res2");
+
+    // Create data for MockFileFinder to feed to the cache
+    KeyedVector<String8, time_t> sourceData;
+    // This shouldn't be updated
+    sourceData.add(String8("res/drawable/hello.png"),3);
+    // This should be updated
+    sourceData.add(String8("res/drawable/world.png"),5);
+    // This should cause make directory to be called
+    sourceData.add(String8("res/drawable-cool/hello.png"),3);
+
+    KeyedVector<String8, time_t> destData;
+    destData.add(String8("res2/drawable/hello.png"),3);
+    destData.add(String8("res2/drawable/world.png"),3);
+    // this should call delete
+    destData.add(String8("res2/drawable/dead.png"),3);
+
+    // Package up data and create mock file finder
+    KeyedVector<String8, KeyedVector<String8,time_t> > data;
+    data.add(source,sourceData);
+    data.add(dest,destData);
+    FileFinder* ff = new MockFileFinder(data);
+    CrunchCache cc(source,dest,ff);
+
+    MockCacheUpdater* mcu = new MockCacheUpdater();
+    CacheUpdater* cu(mcu);
+
+    cout << "Running Crunch...";
+    int result = cc.crunch(cu);
+    cout << ((result > 0) ? "PASSED" : "FAILED") << endl;
+    errno += ((result > 0) ? 0 : 1);
+
+    const int EXPECTED_RESULT = 2;
+    expectEqual(result, EXPECTED_RESULT, "number of files touched");
+
+    cout << "Checking calls to deleteFile and processImage:" << endl;
+    const int EXPECTED_DELETES = 1;
+    const int EXPECTED_PROCESSED = 2;
+    // Deletes
+    expectEqual(mcu->deleteCount, EXPECTED_DELETES, "deleteFile");
+    // processImage
+    expectEqual(mcu->processCount, EXPECTED_PROCESSED, "processImage");
+
+    const int EXPECTED_OVERWRITES = 3;
+    result = cc.crunch(cu, true);
+    expectEqual(result, EXPECTED_OVERWRITES, "number of files touched with overwrite");
+    \
+
+    if (errno == 0)
+        cout << "ALL TESTS PASSED!" << endl;
+    else
+        cout << errno << " TESTS FAILED" << endl;
+
+    delete ff;
+    delete cu;
+
+    // TESTS BELOW WILL GO AWAY SOON
+
+    String8 source2("ApiDemos/res");
+    String8 dest2("ApiDemos/res2");
+
+    FileFinder* sff = new SystemFileFinder();
+    CacheUpdater* scu = new SystemCacheUpdater();
+
+    CrunchCache scc(source2,dest2,sff);
+
+    scc.crunch(scu);
+}
\ No newline at end of file
diff --git a/tools/aapt/tests/FileFinder_test.cpp b/tools/aapt/tests/FileFinder_test.cpp
new file mode 100644 (file)
index 0000000..07bd665
--- /dev/null
@@ -0,0 +1,101 @@
+//
+// Copyright 2011 The Android Open Source Project
+//
+#include <utils/Vector.h>
+#include <utils/KeyedVector.h>
+#include <iostream>
+#include <cassert>
+#include <utils/String8.h>
+#include <utility>
+
+#include "DirectoryWalker.h"
+#include "MockDirectoryWalker.h"
+#include "FileFinder.h"
+
+using namespace android;
+
+using std::pair;
+using std::cout;
+using std::endl;
+
+
+
+int main()
+{
+
+    cout << "\n\n STARTING FILE FINDER TESTS" << endl;
+    String8 path("ApiDemos");
+
+    // Storage to pass to findFiles()
+    KeyedVector<String8,time_t> testStorage;
+
+    // Mock Directory Walker initialization. First data, then sdw
+    Vector< pair<String8,time_t> > data;
+    data.push( pair<String8,time_t>(String8("hello.png"),3) );
+    data.push( pair<String8,time_t>(String8("world.PNG"),3) );
+    data.push( pair<String8,time_t>(String8("foo.pNg"),3) );
+    // Neither of these should be found
+    data.push( pair<String8,time_t>(String8("hello.jpg"),3) );
+    data.push( pair<String8,time_t>(String8(".hidden.png"),3));
+
+    DirectoryWalker* sdw = new StringDirectoryWalker(path,data);
+
+    // Extensions to look for
+    Vector<String8> exts;
+    exts.push(String8(".png"));
+
+    errno = 0;
+
+    // Make sure we get a valid mock directory walker
+    // Make sure we finish without errors
+    cout << "Checking DirectoryWalker...";
+    assert(sdw != NULL);
+    cout << "PASSED" << endl;
+
+    // Make sure we finish without errors
+    cout << "Running findFiles()...";
+    bool findStatus = FileFinder::findFiles(path,exts, testStorage, sdw);
+    assert(findStatus);
+    cout << "PASSED" << endl;
+
+    const size_t SIZE_EXPECTED = 3;
+    // Check to make sure we have the right number of things in our storage
+    cout << "Running size comparison: Size is " << testStorage.size() << ", ";
+    cout << "Expected " << SIZE_EXPECTED << "...";
+    if(testStorage.size() == SIZE_EXPECTED)
+        cout << "PASSED" << endl;
+    else {
+        cout << "FAILED" << endl;
+        errno++;
+    }
+
+    // Check to make sure that each of our found items has the right extension
+    cout << "Checking Returned Extensions...";
+    bool extsOkay = true;
+    String8 wrongExts;
+    for (size_t i = 0; i < SIZE_EXPECTED; ++i) {
+        String8 testExt(testStorage.keyAt(i).getPathExtension());
+        testExt.toLower();
+        if (testExt != ".png") {
+            wrongExts += testStorage.keyAt(i);
+            wrongExts += "\n";
+            extsOkay = false;
+        }
+    }
+    if (extsOkay)
+        cout << "PASSED" << endl;
+    else {
+        cout << "FAILED" << endl;
+        cout << "The following extensions didn't check out" << endl << wrongExts;
+    }
+
+    // Clean up
+    delete sdw;
+
+    if(errno == 0) {
+        cout << "ALL TESTS PASSED" << endl;
+    } else {
+        cout << errno << " TESTS FAILED" << endl;
+    }
+    return errno;
+}
\ No newline at end of file
diff --git a/tools/aapt/tests/MockCacheUpdater.h b/tools/aapt/tests/MockCacheUpdater.h
new file mode 100644 (file)
index 0000000..c7f4bd7
--- /dev/null
@@ -0,0 +1,40 @@
+//
+// Copyright 2011 The Android Open Source Project
+//
+#ifndef MOCKCACHEUPDATER_H
+#define MOCKCACHEUPDATER_H
+
+#include <utils/String8.h>
+#include "CacheUpdater.h"
+
+using namespace android;
+
+class MockCacheUpdater : public CacheUpdater {
+public:
+
+    MockCacheUpdater()
+        : deleteCount(0), processCount(0) { };
+
+    // Make sure all the directories along this path exist
+    virtual void ensureDirectoriesExist(String8 path)
+    {
+        // Nothing to do
+    };
+
+    // Delete a file
+    virtual void deleteFile(String8 path) {
+        deleteCount++;
+    };
+
+    // Process an image from source out to dest
+    virtual void processImage(String8 source, String8 dest) {
+        processCount++;
+    };
+
+    // DATA MEMBERS
+    int deleteCount;
+    int processCount;
+private:
+};
+
+#endif // MOCKCACHEUPDATER_H
\ No newline at end of file
diff --git a/tools/aapt/tests/MockDirectoryWalker.h b/tools/aapt/tests/MockDirectoryWalker.h
new file mode 100644 (file)
index 0000000..5900cf3
--- /dev/null
@@ -0,0 +1,85 @@
+//
+// Copyright 2011 The Android Open Source Project
+//
+#ifndef MOCKDIRECTORYWALKER_H
+#define MOCKDIRECTORYWALKER_H
+
+#include <utils/Vector.h>
+#include <utils/String8.h>
+#include <utility>
+#include "DirectoryWalker.h"
+
+using namespace android;
+using std::pair;
+
+// String8 Directory Walker
+// This is an implementation of the Directory Walker abstraction that is built
+// for testing.
+// Instead of system calls it queries a private data structure for the directory
+// entries. It takes a path and a map of filenames and their modification times.
+// functions are inlined since they are short and simple
+
+class StringDirectoryWalker : public DirectoryWalker {
+public:
+    StringDirectoryWalker(String8& path, Vector< pair<String8,time_t> >& data)
+        :  mPos(0), mBasePath(path), mData(data) {
+        //fprintf(stdout,"StringDW built to mimic %s with %d files\n",
+        //       mBasePath.string());
+    };
+    // Default copy constructor, and destructor are fine
+
+    virtual bool openDir(String8 path) {
+        // If the user is trying to query the "directory" that this
+        // walker was initialized with, then return success. Else fail.
+        return path == mBasePath;
+    };
+    virtual bool openDir(const char* path) {
+        String8 p(path);
+        openDir(p);
+        return true;
+    };
+    // Advance to next entry in the Vector
+    virtual struct dirent* nextEntry() {
+        // Advance position and check to see if we're done
+        if (mPos >= mData.size())
+            return NULL;
+
+        // Place data in the entry descriptor. This class only returns files.
+        mEntry.d_type = DT_REG;
+        mEntry.d_ino = mPos;
+        // Copy chars from the string name to the entry name
+        size_t i = 0;
+        for (i; i < mData[mPos].first.size(); ++i)
+            mEntry.d_name[i] = mData[mPos].first[i];
+        mEntry.d_name[i] = '\0';
+
+        // Place data in stats
+        mStats.st_ino = mPos;
+        mStats.st_mtime = mData[mPos].second;
+
+        // Get ready to move to the next entry
+        mPos++;
+
+        return &mEntry;
+    };
+    // Get the stats for the current entry
+    virtual struct stat*   entryStats() {
+        return &mStats;
+    };
+    // Nothing to do in clean up
+    virtual void closeDir() {
+        // Nothing to do
+    };
+    virtual DirectoryWalker* clone() {
+        return new StringDirectoryWalker(*this);
+    };
+private:
+    // Current position in the Vector
+    size_t mPos;
+    // Base path
+    String8 mBasePath;
+    // Data to simulate a directory full of files.
+    Vector< pair<String8,time_t> > mData;
+};
+
+#endif // MOCKDIRECTORYWALKER_H
\ No newline at end of file
diff --git a/tools/aapt/tests/MockFileFinder.h b/tools/aapt/tests/MockFileFinder.h
new file mode 100644 (file)
index 0000000..da5ea4f
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// Copyright 2011 The Android Open Source Project
+//
+
+#ifndef MOCKFILEFINDER_H
+#define MOCKFILEFINDER_H
+
+#include <utils/Vector.h>
+#include <utils/KeyedVector.h>
+#include <utils/String8.h>
+
+#include "DirectoryWalker.h"
+
+using namespace android;
+
+class MockFileFinder : public FileFinder {
+public:
+    MockFileFinder (KeyedVector<String8, KeyedVector<String8,time_t> >& files)
+        : mFiles(files)
+    {
+        // Nothing left to do
+    };
+
+    /**
+     * findFiles implementation for the abstraction.
+     * PRECONDITIONS:
+     *  No checking is done, so there MUST be an entry in mFiles with
+     *  path matching basePath.
+     *
+     * POSTCONDITIONS:
+     *  fileStore is filled with a copy of the data in mFiles corresponding
+     *  to the basePath.
+     */
+
+    virtual bool findFiles(String8 basePath, Vector<String8>& extensions,
+                           KeyedVector<String8,time_t>& fileStore,
+                           DirectoryWalker* dw)
+    {
+        const KeyedVector<String8,time_t>* payload(&mFiles.valueFor(basePath));
+        // Since KeyedVector doesn't implement swap
+        // (who doesn't use swap??) we loop and add one at a time.
+        for (size_t i = 0; i < payload->size(); ++i) {
+            fileStore.add(payload->keyAt(i),payload->valueAt(i));
+        }
+        return true;
+    }
+
+private:
+    // Virtual mapping between "directories" and the "files" contained
+    // in them
+    KeyedVector<String8, KeyedVector<String8,time_t> > mFiles;
+};
+
+
+#endif // MOCKFILEFINDER_H
\ No newline at end of file
index b4448a9..8e3ed93 100644 (file)
@@ -1093,33 +1093,6 @@ public final class Canvas_Delegate {
     }
 
     @LayoutlibDelegate
-    /*package*/ static void native_drawTextWithGlyphs(int nativeCanvas, char[] text,
-            int index, int count, float x,
-            float y, int flags, int paint) {
-        native_drawText(nativeCanvas, text, index, count, x, y, flags, paint);
-    }
-
-    @LayoutlibDelegate
-    /*package*/ static void native_drawTextWithGlyphs(int nativeCanvas, String text,
-            int start, int end, float x,
-            float y, int flags, int paint) {
-        int count = end - start;
-        char[] buffer = TemporaryBuffer.obtain(count);
-        TextUtils.getChars(text, start, end, buffer, 0);
-
-        native_drawText(nativeCanvas, text, 0, count, x, y, flags, paint);
-    }
-
-    @LayoutlibDelegate
-    /*package*/ static void native_drawGlyphs(int nativeCanvas, char[] glyphs,
-            int index, int count, float x,
-            float y, int flags, int paint) {
-        // FIXME
-        Bridge.getLog().fidelityWarning(LayoutLog.TAG_UNSUPPORTED,
-                "Canvas.drawGlyphs is not supported.", null, null /*data*/);
-    }
-
-    @LayoutlibDelegate
     /*package*/ static void native_drawPosText(int nativeCanvas,
                                                   char[] text, int index,
                                                   int count, float[] pos,
diff --git a/tools/layoutlib/bridge/src/android/text/AndroidBidi_Delegate.java b/tools/layoutlib/bridge/src/android/text/AndroidBidi_Delegate.java
new file mode 100644 (file)
index 0000000..52b8f34
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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 com.android.tools.layoutlib.annotations.LayoutlibDelegate;
+
+
+/**
+ * Delegate used to provide new implementation for the native methods of {@link AndroidBidi}
+ *
+ * Through the layoutlib_create tool, the original  methods of AndroidBidi have been replaced
+ * by calls to methods of the same name in this delegate class.
+ *
+ */
+public class AndroidBidi_Delegate {
+
+    @LayoutlibDelegate
+    /*package*/ static int runBidi(int dir, char[] chs, byte[] chInfo, int n, boolean haveInfo) {
+        // return the equivalent of Layout.DIR_LEFT_TO_RIGHT
+        // TODO: actually figure the direction.
+        return 0;
+    }
+}
index ec7a67e..f056040 100644 (file)
@@ -19,6 +19,7 @@ package android.view.inputmethod;
 import com.android.layoutlib.bridge.android.BridgeIInputMethodManager;
 import com.android.tools.layoutlib.annotations.LayoutlibDelegate;
 
+import android.content.Context;
 import android.os.Looper;
 
 
@@ -44,6 +45,18 @@ public class InputMethodManager_Delegate {
                     mainLooper);
         }
         return InputMethodManager.mInstance;
+    }
+
+    @LayoutlibDelegate
+    /*package*/ static InputMethodManager getInstance(Context context) {
+        synchronized (InputMethodManager.mInstanceSync) {
+            if (InputMethodManager.mInstance != null) {
+                return InputMethodManager.mInstance;
+            }
 
+            InputMethodManager.mInstance = new InputMethodManager(new BridgeIInputMethodManager(),
+                    Looper.myLooper());
+        }
+        return InputMethodManager.mInstance;
     }
 }
index 2519ebc..23e0ca1 100644 (file)
@@ -188,4 +188,10 @@ public class BridgeIInputMethodManager implements IInputMethodManager {
         return null;
     }
 
+    public boolean setAdditionalInputMethodSubtypes(IBinder arg0, InputMethodSubtype[] arg1)
+            throws RemoteException {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
 }
index df7e04f..93a35cc 100644 (file)
@@ -155,6 +155,7 @@ public final class CreateInfo implements ICreateInfo {
         "android.graphics.Typeface",
         "android.graphics.Xfermode",
         "android.os.SystemClock",
+        "android.text.AndroidBidi",
         "android.util.FloatMath",
         "android.view.Display",
         "libcore.icu.ICU",
index e3661bf..7bb927b 100644 (file)
@@ -81,6 +81,24 @@ public class WifiInfo implements Parcelable {
         mHiddenSSID = false;
     }
 
+    /**
+     * Copy constructor
+     * @hide
+     */
+    public WifiInfo(WifiInfo source) {
+        if (source != null) {
+            mSupplicantState = source.mSupplicantState;
+            mBSSID = source.mBSSID;
+            mSSID = source.mSSID;
+            mNetworkId = source.mNetworkId;
+            mHiddenSSID = source.mHiddenSSID;
+            mRssi = source.mRssi;
+            mLinkSpeed = source.mLinkSpeed;
+            mIpAddress = source.mIpAddress;
+            mMacAddress = source.mMacAddress;
+        }
+    }
+
     void setSSID(String SSID) {
         mSSID = SSID;
         // network is considered not hidden by default
index 9d1bdd4..cd6621f 100644 (file)
@@ -230,11 +230,13 @@ public class WifiManager {
     /**
      * Broadcast intent action indicating that the state of Wi-Fi connectivity
      * has changed. One extra provides the new state
-     * in the form of a {@link android.net.NetworkInfo} object. If the new state is
-     * CONNECTED, a second extra may provide the BSSID of the access point,
+     * in the form of a {@link android.net.NetworkInfo} object. If the new
+     * state is CONNECTED, additional extras may provide the BSSID and WifiInfo of
+     * the access point.
      * as a {@code String}.
      * @see #EXTRA_NETWORK_INFO
      * @see #EXTRA_BSSID
+     * @see #EXTRA_WIFI_INFO
      */
     @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
     public static final String NETWORK_STATE_CHANGED_ACTION = "android.net.wifi.STATE_CHANGE";
@@ -252,6 +254,13 @@ public class WifiManager {
      */
     public static final String EXTRA_BSSID = "bssid";
     /**
+     * The lookup key for a {@link android.net.wifi.WifiInfo} object giving the
+     * information about the access point to which we are connected. Only present
+     * when the new state is CONNECTED.  Retrieve with
+     * {@link android.content.Intent#getParcelableExtra(String)}.
+     */
+    public static final String EXTRA_WIFI_INFO = "wifiInfo";
+    /**
      * Broadcast intent action indicating that the state of establishing a connection to
      * an access point has changed.One extra provides the new
      * {@link SupplicantState}. Note that the supplicant state is Wi-Fi specific, and
index 6e13d0f..f1f0fcc 100644 (file)
@@ -104,18 +104,30 @@ public class WifiNative {
 
     public native static boolean stopDriverCommand();
 
+
+    /**
+     * Start filtering out Multicast V4 packets
+     * @return {@code true} if the operation succeeded, {@code false} otherwise
+     */
+    public native static boolean startFilteringMulticastV4Packets();
+
+    /**
+     * Stop filtering out Multicast V4 packets.
+     * @return {@code true} if the operation succeeded, {@code false} otherwise
+     */
+    public native static boolean stopFilteringMulticastV4Packets();
+
     /**
-     * Start filtering out multicast packets, to reduce battery consumption
-     * that would result from processing them, only to discard them.
+     * Start filtering out Multicast V6 packets
      * @return {@code true} if the operation succeeded, {@code false} otherwise
      */
-    public native static boolean startPacketFiltering();
+    public native static boolean startFilteringMulticastV6Packets();
 
     /**
-     * Stop filtering out multicast packets.
+     * Stop filtering out Multicast V6 packets.
      * @return {@code true} if the operation succeeded, {@code false} otherwise
      */
-    public native static boolean stopPacketFiltering();
+    public native static boolean stopFilteringMulticastV6Packets();
 
     public native static boolean setPowerModeCommand(int mode);
 
index 8c28319..f08bb6a 100644 (file)
@@ -82,6 +82,7 @@ import java.net.InetAddress;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.regex.Pattern;
 
 /**
@@ -160,6 +161,9 @@ public class WifiStateMachine extends StateMachine {
     /* Tracks current frequency mode */
     private AtomicInteger mFrequencyBand = new AtomicInteger(WifiManager.WIFI_FREQUENCY_BAND_AUTO);
 
+    /* Tracks if we are filtering Multicast v4 packets. Default is to filter. */
+    private AtomicBoolean mFilteringMulticastV4Packets = new AtomicBoolean(true);
+
     // Channel for sending replies.
     private AsyncChannel mReplyChannel = new AsyncChannel();
 
@@ -285,6 +289,11 @@ public class WifiStateMachine extends StateMachine {
     static final int CMD_START_PACKET_FILTERING           = BASE + 84;
     /* Clear packet filter */
     static final int CMD_STOP_PACKET_FILTERING            = BASE + 85;
+
+    /* arg1 values to CMD_STOP_PACKET_FILTERING and CMD_START_PACKET_FILTERING */
+    static final int MULTICAST_V6  = 1;
+    static final int MULTICAST_V4  = 0;
+
     /* Connect to a specified network (network id
      * or WifiConfiguration) This involves increasing
      * the priority of the network, enabling the network
@@ -868,17 +877,33 @@ public class WifiStateMachine extends StateMachine {
     }
 
     /**
-     * Start packet filtering
+     * Start filtering Multicast v4 packets
+     */
+    public void startFilteringMulticastV4Packets() {
+        mFilteringMulticastV4Packets.set(true);
+        sendMessage(obtainMessage(CMD_START_PACKET_FILTERING, MULTICAST_V4, 0));
+    }
+
+    /**
+     * Stop filtering Multicast v4 packets
+     */
+    public void stopFilteringMulticastV4Packets() {
+        mFilteringMulticastV4Packets.set(false);
+        sendMessage(obtainMessage(CMD_STOP_PACKET_FILTERING, MULTICAST_V4, 0));
+    }
+
+    /**
+     * Start filtering Multicast v4 packets
      */
-    public void startPacketFiltering() {
-        sendMessage(CMD_START_PACKET_FILTERING);
+    public void startFilteringMulticastV6Packets() {
+        sendMessage(obtainMessage(CMD_START_PACKET_FILTERING, MULTICAST_V6, 0));
     }
 
     /**
-     * Stop packet filtering
+     * Stop filtering Multicast v4 packets
      */
-    public void stopPacketFiltering() {
-        sendMessage(CMD_STOP_PACKET_FILTERING);
+    public void stopFilteringMulticastV6Packets() {
+        sendMessage(obtainMessage(CMD_STOP_PACKET_FILTERING, MULTICAST_V6, 0));
     }
 
     /**
@@ -1374,6 +1399,8 @@ public class WifiStateMachine extends StateMachine {
         intent.putExtra(WifiManager.EXTRA_LINK_PROPERTIES, new LinkProperties (mLinkProperties));
         if (bssid != null)
             intent.putExtra(WifiManager.EXTRA_BSSID, bssid);
+        if (mNetworkInfo.getState() == NetworkInfo.State.CONNECTED)
+            intent.putExtra(WifiManager.EXTRA_WIFI_INFO, new WifiInfo(mWifiInfo));
         mContext.sendStickyBroadcast(intent);
     }
 
@@ -2072,9 +2099,6 @@ public class WifiStateMachine extends StateMachine {
 
                     WifiConfigStore.initialize(mContext);
 
-                    //TODO: initialize and fix multicast filtering
-                    //mWM.initializeMulticastFiltering();
-
                     sendSupplicantConnectionChangedBroadcast(true);
                     transitionTo(mDriverStartedState);
                     break;
@@ -2357,6 +2381,16 @@ public class WifiStateMachine extends StateMachine {
             /* initialize network state */
             setNetworkDetailedState(DetailedState.DISCONNECTED);
 
+            /* Remove any filtering on Multicast v6 at start */
+            WifiNative.stopFilteringMulticastV6Packets();
+
+            /* Reset Multicast v4 filtering state */
+            if (mFilteringMulticastV4Packets.get()) {
+                WifiNative.startFilteringMulticastV4Packets();
+            } else {
+                WifiNative.stopFilteringMulticastV4Packets();
+            }
+
             if (mIsScanMode) {
                 WifiNative.setScanResultHandlingCommand(SCAN_ONLY_MODE);
                 WifiNative.disconnectCommand();
@@ -2417,10 +2451,22 @@ public class WifiStateMachine extends StateMachine {
                     mWakeLock.release();
                     break;
                 case CMD_START_PACKET_FILTERING:
-                    WifiNative.startPacketFiltering();
+                    if (message.arg1 == MULTICAST_V6) {
+                        WifiNative.startFilteringMulticastV6Packets();
+                    } else if (message.arg1 == MULTICAST_V4) {
+                        WifiNative.startFilteringMulticastV4Packets();
+                    } else {
+                        Log.e(TAG, "Illegal arugments to CMD_START_PACKET_FILTERING");
+                    }
                     break;
                 case CMD_STOP_PACKET_FILTERING:
-                    WifiNative.stopPacketFiltering();
+                    if (message.arg1 == MULTICAST_V6) {
+                        WifiNative.stopFilteringMulticastV6Packets();
+                    } else if (message.arg1 == MULTICAST_V4) {
+                        WifiNative.stopFilteringMulticastV4Packets();
+                    } else {
+                        Log.e(TAG, "Illegal arugments to CMD_STOP_PACKET_FILTERING");
+                    }
                     break;
                 default:
                     return NOT_HANDLED;
index 0eb73b7..b09e04b 100644 (file)
 
 package android.net.wifi;
 
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
 import android.content.BroadcastReceiver;
 import android.content.ContentResolver;
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
+import android.content.res.Resources;
 import android.database.ContentObserver;
 import android.net.ConnectivityManager;
 import android.net.DnsPinger;
@@ -29,7 +33,7 @@ import android.net.Uri;
 import android.os.Message;
 import android.os.SystemClock;
 import android.provider.Settings;
-import android.text.TextUtils;
+import android.provider.Settings.Secure;
 import android.util.Slog;
 
 import com.android.internal.util.Protocol;
@@ -45,6 +49,7 @@ import java.net.URL;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Scanner;
+import java.util.regex.Pattern;
 
 /**
  * {@link WifiWatchdogStateMachine} monitors the initial connection to a Wi-Fi
@@ -62,7 +67,8 @@ import java.util.Scanner;
  */
 public class WifiWatchdogStateMachine extends StateMachine {
 
-    private static final boolean VDBG = false;
+
+    private static final boolean VDBG = true;  //TODO : Remove this before merge
     private static final boolean DBG = true;
     private static final String WWSM_TAG = "WifiWatchdogStateMachine";
 
@@ -72,18 +78,22 @@ public class WifiWatchdogStateMachine extends StateMachine {
      */
     private static final int LOW_SIGNAL_CUTOFF = 1;
 
-    private static final long MIN_LOW_SIGNAL_CHECK_INTERVAL_MS = 2 * 60 * 1000;
-    private static final long MIN_SINGLE_DNS_CHECK_INTERVAL_MS = 10 * 60 * 1000;
-    private static final long MIN_WALLED_GARDEN_INTERVAL_MS = 30 * 60 * 1000;
-
-    private static final int MAX_CHECKS_PER_SSID = 7;
-    private static final int NUM_DNS_PINGS = 5;
-    private static final double MIN_DNS_RESPONSE_RATE = 0.50;
+    private static final long DEFAULT_DNS_CHECK_SHORT_INTERVAL_MS = 2 * 60 * 1000;
+    private static final long DEFAULT_DNS_CHECK_LONG_INTERVAL_MS = 10 * 60 * 1000;
+    private static final long DEFAULT_WALLED_GARDEN_INTERVAL_MS = 30 * 60 * 1000;
 
-    private static final int DNS_PING_TIMEOUT_MS = 800;
+    private static final int DEFAULT_MAX_SSID_BLACKLISTS = 7;
+    private static final int DEFAULT_NUM_DNS_PINGS = 5;
+    private static final int DEFAULT_MIN_DNS_RESPONSES = 3;
     private static final long DNS_PING_INTERVAL_MS = 100;
 
-    private static final long BLACKLIST_FOLLOWUP_INTERVAL_MS = 15 * 1000;
+    private static final int DEFAULT_DNS_PING_TIMEOUT_MS = 1500;
+
+    private static final long DEFAULT_BLACKLIST_FOLLOWUP_INTERVAL_MS = 15 * 1000;
+
+    private static final String DEFAULT_WALLED_GARDEN_URL = "http://www.google.com/";
+    private static final String DEFAULT_WALLED_GARDEN_PATTERN = "<title>.*Google.*</title>";
+
 
     private static final int BASE = Protocol.BASE_WIFI_WATCHDOG;
 
@@ -104,6 +114,7 @@ public class WifiWatchdogStateMachine extends StateMachine {
     private static final int EVENT_RSSI_CHANGE = BASE + 3;
     private static final int EVENT_SCAN_RESULTS_AVAILABLE = BASE + 4;
     private static final int EVENT_WIFI_RADIO_STATE_CHANGE = BASE + 5;
+    private static final int EVENT_WATCHDOG_SETTINGS_CHANGE = BASE + 6;
 
     private static final int MESSAGE_CHECK_STEP = BASE + 100;
     private static final int MESSAGE_HANDLE_WALLED_GARDEN = BASE + 101;
@@ -132,6 +143,19 @@ public class WifiWatchdogStateMachine extends StateMachine {
     private WalledGardenState mWalledGardenState = new WalledGardenState();
     private BlacklistedApState mBlacklistedApState = new BlacklistedApState();
 
+    private long mDnsCheckShortIntervalMs;
+    private long mDnsCheckLongIntervalMs;
+    private long mWalledGardenIntervalMs;
+    private int mMaxSsidBlacklists;
+    private int mNumDnsPings;
+    private int mMinDnsResponses;
+    private int mDnsPingTimeoutMs;
+    private long mBlacklistFollowupIntervalMs;
+    private boolean mWalledGardenTestEnabled;
+    private String mWalledGardenUrl;
+    private Pattern mWalledGardenPattern;
+
+    private boolean mShowDisabledNotification;
     /**
      * The {@link WifiInfo} object passed to WWSM on network broadcasts
      */
@@ -142,7 +166,7 @@ public class WifiWatchdogStateMachine extends StateMachine {
      * Currently maintained but not used, TODO
      */
     private HashSet<String> mBssids = new HashSet<String>();
-    private int mNumFullDNSchecks = 0;
+    private int mNumCheckFailures = 0;
 
     private Long mLastWalledGardenCheckTime = null;
 
@@ -158,7 +182,7 @@ public class WifiWatchdogStateMachine extends StateMachine {
      *         /       \
      * Disabled     Enabled
      *             /       \
-     * Disconnected      Connected
+     * NotConnected      Connected
      *                  /---------\
      *               (all other states)
      */
@@ -174,6 +198,7 @@ public class WifiWatchdogStateMachine extends StateMachine {
 
         // The content observer to listen needs a handler
         registerForSettingsChanges();
+        registerForWatchdogToggle();
         addState(mDefaultState);
             addState(mWatchdogDisabledState, mDefaultState);
             addState(mWatchdogEnabledState, mDefaultState);
@@ -186,6 +211,9 @@ public class WifiWatchdogStateMachine extends StateMachine {
                     addState(mOnlineWatchState, mConnectedState);
 
         setInitialState(mWatchdogDisabledState);
+        updateSettings();
+        mShowDisabledNotification = getSettingsBoolean(mContentResolver,
+                Settings.Secure.WIFI_WATCHDOG_SHOW_DISABLED_NETWORK_POPUP, true);
     }
 
     public static WifiWatchdogStateMachine makeWifiWatchdogStateMachine(Context context) {
@@ -228,7 +256,7 @@ public class WifiWatchdogStateMachine extends StateMachine {
     /**
      * Observes the watchdog on/off setting, and takes action when changed.
      */
-    private void registerForSettingsChanges() {
+    private void registerForWatchdogToggle() {
         ContentObserver contentObserver = new ContentObserver(this.getHandler()) {
             @Override
             public void onChange(boolean selfChange) {
@@ -242,6 +270,54 @@ public class WifiWatchdogStateMachine extends StateMachine {
     }
 
     /**
+     * Observes watchdogs secure setting changes.
+     */
+    private void registerForSettingsChanges() {
+        ContentObserver contentObserver = new ContentObserver(this.getHandler()) {
+            @Override
+            public void onChange(boolean selfChange) {
+                sendMessage(EVENT_WATCHDOG_SETTINGS_CHANGE);
+            }
+        };
+
+        mContext.getContentResolver().registerContentObserver(
+                Settings.Secure.getUriFor(
+                        Settings.Secure.WIFI_WATCHDOG_DNS_CHECK_SHORT_INTERVAL_MS),
+                        false, contentObserver);
+        mContext.getContentResolver().registerContentObserver(
+                Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_DNS_CHECK_LONG_INTERVAL_MS),
+                false, contentObserver);
+        mContext.getContentResolver().registerContentObserver(
+                Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_WALLED_GARDEN_INTERVAL_MS),
+                false, contentObserver);
+        mContext.getContentResolver().registerContentObserver(
+                Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_MAX_SSID_BLACKLISTS),
+                false, contentObserver);
+        mContext.getContentResolver().registerContentObserver(
+                Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_NUM_DNS_PINGS),
+                false, contentObserver);
+        mContext.getContentResolver().registerContentObserver(
+                Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_MIN_DNS_RESPONSES),
+                false, contentObserver);
+        mContext.getContentResolver().registerContentObserver(
+                Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_DNS_PING_TIMEOUT_MS),
+                false, contentObserver);
+        mContext.getContentResolver().registerContentObserver(
+                Settings.Secure.getUriFor(
+                        Settings.Secure.WIFI_WATCHDOG_BLACKLIST_FOLLOWUP_INTERVAL_MS),
+                        false, contentObserver);
+        mContext.getContentResolver().registerContentObserver(
+                Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_WALLED_GARDEN_TEST_ENABLED),
+                false, contentObserver);
+        mContext.getContentResolver().registerContentObserver(
+                Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_WALLED_GARDEN_URL),
+                false, contentObserver);
+        mContext.getContentResolver().registerContentObserver(
+                Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_WALLED_GARDEN_PATTERN),
+                false, contentObserver);
+    }
+
+    /**
      * DNS based detection techniques do not work at all hotspots. The one sure
      * way to check a walled garden is to see if a URL fetch on a known address
      * fetches the data we expect
@@ -250,11 +326,11 @@ public class WifiWatchdogStateMachine extends StateMachine {
         InputStream in = null;
         HttpURLConnection urlConnection = null;
         try {
-            URL url = new URL(getWalledGardenUrl());
+            URL url = new URL(mWalledGardenUrl);
             urlConnection = (HttpURLConnection) url.openConnection();
             in = new BufferedInputStream(urlConnection.getInputStream());
             Scanner scanner = new Scanner(in);
-            if (scanner.findInLine(getWalledGardenPattern()) != null) {
+            if (scanner.findInLine(mWalledGardenPattern) != null) {
                 return false;
             } else {
                 return true;
@@ -281,49 +357,49 @@ public class WifiWatchdogStateMachine extends StateMachine {
         pw.print("WatchdogStatus: ");
         pw.print("State " + getCurrentState());
         pw.println(", network [" + mInitialConnInfo + "]");
-        pw.print("checkCount " + mNumFullDNSchecks);
+        pw.print("checkFailures   " + mNumCheckFailures);
         pw.println(", bssids: " + mBssids);
         pw.println("lastSingleCheck: " + mOnlineWatchState.lastCheckTime);
     }
 
-    /**
-     * @see android.provider.Settings.Secure#WIFI_WATCHDOG_WALLED_GARDEN_TEST_ENABLED
-     */
-    private Boolean isWalledGardenTestEnabled() {
-        return Settings.Secure.getInt(mContentResolver,
-                Settings.Secure.WIFI_WATCHDOG_WALLED_GARDEN_TEST_ENABLED, 1) == 1;
-    }
-
-    /**
-     * @see android.provider.Settings.Secure#WIFI_WATCHDOG_WALLED_GARDEN_URL
-     */
-    private String getWalledGardenUrl() {
-        String url = Settings.Secure.getString(mContentResolver,
-                Settings.Secure.WIFI_WATCHDOG_WALLED_GARDEN_URL);
-        if (TextUtils.isEmpty(url))
-            return "http://www.google.com/";
-        return url;
-    }
-
-    /**
-     * @see android.provider.Settings.Secure#WIFI_WATCHDOG_WALLED_GARDEN_PATTERN
-     */
-    private String getWalledGardenPattern() {
-        String pattern = Settings.Secure.getString(mContentResolver,
-                Settings.Secure.WIFI_WATCHDOG_WALLED_GARDEN_PATTERN);
-        if (TextUtils.isEmpty(pattern))
-            return "<title>.*Google.*</title>";
-        return pattern;
-    }
-
-    /**
-     * @see android.provider.Settings.Secure#WIFI_WATCHDOG_ON
-     */
     private boolean isWatchdogEnabled() {
-        return Settings.Secure.getInt(mContentResolver,
-                Settings.Secure.WIFI_WATCHDOG_ON, 1) == 1;
+        return getSettingsBoolean(mContentResolver, Settings.Secure.WIFI_WATCHDOG_ON, true);
     }
 
+    private void updateSettings() {
+        mDnsCheckShortIntervalMs = Secure.getLong(mContentResolver,
+                Secure.WIFI_WATCHDOG_DNS_CHECK_SHORT_INTERVAL_MS,
+                DEFAULT_DNS_CHECK_SHORT_INTERVAL_MS);
+        mDnsCheckLongIntervalMs = Secure.getLong(mContentResolver,
+                Secure.WIFI_WATCHDOG_DNS_CHECK_LONG_INTERVAL_MS,
+                DEFAULT_DNS_CHECK_LONG_INTERVAL_MS);
+        mMaxSsidBlacklists = Secure.getInt(mContentResolver,
+                Secure.WIFI_WATCHDOG_MAX_SSID_BLACKLISTS,
+                DEFAULT_MAX_SSID_BLACKLISTS);
+        mNumDnsPings = Secure.getInt(mContentResolver,
+                Secure.WIFI_WATCHDOG_NUM_DNS_PINGS,
+                DEFAULT_NUM_DNS_PINGS);
+        mMinDnsResponses = Secure.getInt(mContentResolver,
+                Secure.WIFI_WATCHDOG_MIN_DNS_RESPONSES,
+                DEFAULT_MIN_DNS_RESPONSES);
+        mDnsPingTimeoutMs = Secure.getInt(mContentResolver,
+                Secure.WIFI_WATCHDOG_DNS_PING_TIMEOUT_MS,
+                DEFAULT_DNS_PING_TIMEOUT_MS);
+        mBlacklistFollowupIntervalMs = Secure.getLong(mContentResolver,
+                Settings.Secure.WIFI_WATCHDOG_BLACKLIST_FOLLOWUP_INTERVAL_MS,
+                DEFAULT_BLACKLIST_FOLLOWUP_INTERVAL_MS);
+        mWalledGardenTestEnabled = getSettingsBoolean(mContentResolver,
+                Settings.Secure.WIFI_WATCHDOG_WALLED_GARDEN_TEST_ENABLED, true);
+        mWalledGardenUrl = getSettingsStr(mContentResolver,
+                Settings.Secure.WIFI_WATCHDOG_WALLED_GARDEN_URL,
+                DEFAULT_WALLED_GARDEN_URL);
+        mWalledGardenPattern = Pattern.compile(getSettingsStr(mContentResolver,
+                Settings.Secure.WIFI_WATCHDOG_WALLED_GARDEN_PATTERN,
+                DEFAULT_WALLED_GARDEN_PATTERN));
+        mWalledGardenIntervalMs = Secure.getLong(mContentResolver,
+                Secure.WIFI_WATCHDOG_WALLED_GARDEN_INTERVAL_MS,
+                DEFAULT_WALLED_GARDEN_INTERVAL_MS);
+    }
 
     /**
      * Helper to return wait time left given a min interval and last run
@@ -353,7 +429,7 @@ public class WifiWatchdogStateMachine extends StateMachine {
         mInitialConnInfo = null;
         mDisableAPNextFailure = false;
         mLastWalledGardenCheckTime = null;
-        mNumFullDNSchecks = 0;
+        mNumCheckFailures = 0;
         mBssids.clear();
     }
 
@@ -365,13 +441,43 @@ public class WifiWatchdogStateMachine extends StateMachine {
         mContext.startActivity(intent);
     }
 
-    private void sendCheckStepMessage(long delay) {
-        sendMessageDelayed(obtainMessage(MESSAGE_CHECK_STEP, mNetEventCounter, 0), delay);
+    private void displayDisabledNetworkNotification() {
+        Resources r = Resources.getSystem();
+        CharSequence title =
+                r.getText(com.android.internal.R.string.wifi_watchdog_network_disabled);
+        CharSequence msg =
+                r.getText(com.android.internal.R.string.wifi_watchdog_network_disabled_detailed);
+
+        Notification wifiDisabledWarning = new Notification.Builder(mContext)
+            .setSmallIcon(com.android.internal.R.drawable.stat_sys_warning)
+            .setDefaults(Notification.DEFAULT_ALL)
+            .setTicker(title)
+            .setContentTitle(title)
+            .setContentText(msg)
+            .setContentIntent(PendingIntent.getActivity(mContext, 0,
+                    new Intent(Settings.ACTION_WIFI_IP_SETTINGS)
+                        .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK), 0))
+            .setWhen(System.currentTimeMillis())
+            .setAutoCancel(true)
+            .getNotification();
+
+        NotificationManager notificationManager = (NotificationManager) mContext
+                .getSystemService(Context.NOTIFICATION_SERVICE);
+
+        notificationManager.notify("WifiWatchdog", wifiDisabledWarning.icon, wifiDisabledWarning);
     }
 
     class DefaultState extends State {
         @Override
         public boolean processMessage(Message msg) {
+            switch (msg.what) {
+                case EVENT_WATCHDOG_SETTINGS_CHANGE:
+                    updateSettings();
+                    if (VDBG) {
+                        Slog.d(WWSM_TAG, "Updating wifi-watchdog secure settings");
+                    }
+                    return HANDLED;
+            }
             if (VDBG) {
                 Slog.v(WWSM_TAG, "Caught message " + msg.what + " in state " +
                         getCurrentState().getName());
@@ -509,6 +615,10 @@ public class WifiWatchdogStateMachine extends StateMachine {
                             mBssids.add(result.BSSID);
                     }
                     return HANDLED;
+                case EVENT_WATCHDOG_SETTINGS_CHANGE:
+                    // Stop current checks, but let state update
+                    transitionTo(mOnlineWatchState);
+                    return NOT_HANDLED;
             }
             return NOT_HANDLED;
         }
@@ -522,13 +632,12 @@ public class WifiWatchdogStateMachine extends StateMachine {
 
         @Override
         public void enter() {
-            mNumFullDNSchecks++;
             dnsCheckSuccesses = 0;
             dnsCheckTries = 0;
             if (DBG) {
                 Slog.d(WWSM_TAG, "Starting DNS pings at " + SystemClock.elapsedRealtime());
-                dnsCheckLogStr = String.format("Dns Check %d.  Pinging %s on ssid [%s]: ",
-                        mNumFullDNSchecks, mDnsPinger.getDns(), mInitialConnInfo.getSSID());
+                dnsCheckLogStr = String.format("Pinging %s on ssid [%s]: ",
+                        mDnsPinger.getDns(), mInitialConnInfo.getSSID());
             }
 
             sendCheckStepMessage(0);
@@ -545,7 +654,7 @@ public class WifiWatchdogStateMachine extends StateMachine {
             }
 
             long pingResponseTime = mDnsPinger.pingDns(mDnsPinger.getDns(),
-                    DNS_PING_TIMEOUT_MS);
+                    mDnsPingTimeoutMs);
 
             dnsCheckTries++;
             if (pingResponseTime >= 0)
@@ -567,14 +676,12 @@ public class WifiWatchdogStateMachine extends StateMachine {
              * After a full ping count, if we have more responses than this
              * cutoff, the outcome is success; else it is 'failure'.
              */
-            double pingResponseCutoff = MIN_DNS_RESPONSE_RATE * NUM_DNS_PINGS;
-            int remainingChecks = NUM_DNS_PINGS - dnsCheckTries;
 
             /**
              * Our final success count will be at least this big, so we're
              * guaranteed to succeed.
              */
-            if (dnsCheckSuccesses >= pingResponseCutoff) {
+            if (dnsCheckSuccesses >= mMinDnsResponses) {
                 // DNS CHECKS OK, NOW WALLED GARDEN
                 if (DBG) {
                     Slog.d(WWSM_TAG, dnsCheckLogStr + "|  SUCCESS");
@@ -603,7 +710,8 @@ public class WifiWatchdogStateMachine extends StateMachine {
              * Our final count will be at most the current count plus the
              * remaining pings - we're guaranteed to fail.
              */
-            if (remainingChecks + dnsCheckSuccesses < pingResponseCutoff) {
+            int remainingChecks = mNumDnsPings - dnsCheckTries;
+            if (remainingChecks + dnsCheckSuccesses < mMinDnsResponses) {
                 if (DBG) {
                     Slog.d(WWSM_TAG, dnsCheckLogStr + "|  FAILURE");
                 }
@@ -617,12 +725,12 @@ public class WifiWatchdogStateMachine extends StateMachine {
         }
 
         private boolean shouldCheckWalledGarden() {
-            if (!isWalledGardenTestEnabled()) {
+            if (!mWalledGardenTestEnabled) {
                 if (VDBG)
                     Slog.v(WWSM_TAG, "Skipping walled garden check - disabled");
                 return false;
             }
-            long waitTime = waitTime(MIN_WALLED_GARDEN_INTERVAL_MS,
+            long waitTime = waitTime(mWalledGardenIntervalMs,
                     mLastWalledGardenCheckTime);
             if (waitTime > 0) {
                 if (DBG) {
@@ -634,6 +742,10 @@ public class WifiWatchdogStateMachine extends StateMachine {
             return true;
         }
 
+        private void sendCheckStepMessage(long delay) {
+            sendMessageDelayed(obtainMessage(MESSAGE_CHECK_STEP, mNetEventCounter, 0), delay);
+        }
+
     }
 
     class OnlineWatchState extends State {
@@ -698,7 +810,7 @@ public class WifiWatchdogStateMachine extends StateMachine {
                     }
                     lastCheckTime = SystemClock.elapsedRealtime();
                     long responseTime = mDnsPinger.pingDns(mDnsPinger.getDns(),
-                            DNS_PING_TIMEOUT_MS);
+                            mDnsPingTimeoutMs);
                     if (responseTime >= 0) {
                         if (VDBG) {
                             Slog.v(WWSM_TAG, "Ran a single DNS ping. Response time: "
@@ -720,15 +832,15 @@ public class WifiWatchdogStateMachine extends StateMachine {
         }
 
         /**
-         * Times a dns check with an interval based on {@link #curSignalStable}
+         * Times a dns check with an interval based on {@link #signalUnstable}
          */
         private void triggerSingleDnsCheck() {
             long waitInterval;
             if (signalUnstable) {
-                waitInterval = MIN_LOW_SIGNAL_CHECK_INTERVAL_MS;
+                waitInterval = mDnsCheckShortIntervalMs;
                 unstableSignalChecks = true;
             } else {
-                waitInterval = MIN_SINGLE_DNS_CHECK_INTERVAL_MS;
+                waitInterval = mDnsCheckLongIntervalMs;
             }
             sendMessageDelayed(obtainMessage(MESSAGE_SINGLE_DNS_CHECK, checkGuard, 0),
                     waitTime(waitInterval, lastCheckTime));
@@ -738,6 +850,7 @@ public class WifiWatchdogStateMachine extends StateMachine {
     class DnsCheckFailureState extends State {
         @Override
         public void enter() {
+            mNumCheckFailures++;
             obtainMessage(MESSAGE_HANDLE_BAD_AP, mNetEventCounter, 0).sendToTarget();
         }
 
@@ -754,16 +867,22 @@ public class WifiWatchdogStateMachine extends StateMachine {
                 return HANDLED;
             }
 
-            if (mDisableAPNextFailure || mNumFullDNSchecks >= MAX_CHECKS_PER_SSID) {
+            if (mDisableAPNextFailure || mNumCheckFailures >= mMaxSsidBlacklists) {
                 // TODO : Unban networks if they had low signal ?
                 Slog.i(WWSM_TAG, "Disabling current SSID " + wifiInfoToStr(mInitialConnInfo)
-                        + ".  " +
-                        "numChecks " + mNumFullDNSchecks + ", numAPs " + mBssids.size());
+                        + ".  " + "numCheckFailures " + mNumCheckFailures
+                        + ", numAPs " + mBssids.size());
                 mWifiManager.disableNetwork(mInitialConnInfo.getNetworkId());
+                if (mShowDisabledNotification) {
+                    displayDisabledNetworkNotification();
+                    mShowDisabledNotification = false;
+                    putSettingsBoolean(mContentResolver,
+                            Settings.Secure.WIFI_WATCHDOG_SHOW_DISABLED_NETWORK_POPUP, false);
+                }
                 transitionTo(mNotConnectedState);
             } else {
-                Slog.i(WWSM_TAG, "Blacklisting current BSSID.  " + wifiInfoToStr(mInitialConnInfo) +
-                        "numChecks " + mNumFullDNSchecks + ", numAPs " + mBssids.size());
+                Slog.i(WWSM_TAG, "Blacklisting current BSSID.  " + wifiInfoToStr(mInitialConnInfo)
+                       + "numCheckFailures " + mNumCheckFailures + ", numAPs " + mBssids.size());
 
                 mWifiManager.addToBlacklist(mInitialConnInfo.getBSSID());
                 mWifiManager.reassociate();
@@ -802,7 +921,7 @@ public class WifiWatchdogStateMachine extends StateMachine {
         public void enter() {
             mDisableAPNextFailure = true;
             sendMessageDelayed(obtainMessage(MESSAGE_NETWORK_FOLLOWUP, mNetEventCounter, 0),
-                    BLACKLIST_FOLLOWUP_INTERVAL_MS);
+                    mBlacklistFollowupIntervalMs);
         }
 
         @Override
@@ -822,4 +941,57 @@ public class WifiWatchdogStateMachine extends StateMachine {
             return HANDLED;
         }
     }
+
+
+    /**
+     * Convenience function for retrieving a single secure settings value
+     * as a string with a default value.
+     *
+     * @param cr The ContentResolver to access.
+     * @param name The name of the setting to retrieve.
+     * @param def Value to return if the setting is not defined.
+     *
+     * @return The setting's current value, or 'def' if it is not defined
+     */
+    private static String getSettingsStr(ContentResolver cr, String name, String def) {
+        String v = Settings.Secure.getString(cr, name);
+        return v != null ? v : def;
+    }
+
+    /**
+     * Convenience function for retrieving a single secure settings value
+     * as a boolean.  Note that internally setting values are always
+     * stored as strings; this function converts the string to a boolean
+     * for you.  The default value will be returned if the setting is
+     * not defined or not a valid boolean.
+     *
+     * @param cr The ContentResolver to access.
+     * @param name The name of the setting to retrieve.
+     * @param def Value to return if the setting is not defined.
+     *
+     * @return The setting's current value, or 'def' if it is not defined
+     * or not a valid boolean.
+     */
+    private static boolean getSettingsBoolean(ContentResolver cr, String name, boolean def) {
+        return Settings.Secure.getInt(cr, name, def ? 1 : 0) == 1;
+    }
+
+    /**
+     * Convenience function for updating a single settings value as an
+     * integer. This will either create a new entry in the table if the
+     * given name does not exist, or modify the value of the existing row
+     * with that name.  Note that internally setting values are always
+     * stored as strings, so this function converts the given value to a
+     * string before storing it.
+     *
+     * @param cr The ContentResolver to access.
+     * @param name The name of the setting to modify.
+     * @param value The new value for the setting.
+     * @return true if the value was set, false on database errors
+     */
+    private static boolean putSettingsBoolean(ContentResolver cr, String name, boolean value) {
+        return Settings.Secure.putInt(cr, name, value ? 1 : 0);
+    }
+
+
 }