summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Android.mk4
-rw-r--r--api/6.xml1453
-rw-r--r--api/current.xml333
-rw-r--r--cleanspec.mk1
-rw-r--r--core/java/android/app/ApplicationContext.java18
-rw-r--r--core/java/android/app/SearchManager.java27
-rw-r--r--core/java/android/content/Context.java1
-rw-r--r--core/java/android/content/Intent.java1
-rw-r--r--core/java/android/os/Build.java4
-rw-r--r--core/java/android/os/DropBoxManager.aidl (renamed from core/java/android/os/DropBox.aidl)2
-rw-r--r--core/java/android/os/DropBoxManager.java (renamed from core/java/android/os/DropBox.java)18
-rw-r--r--core/java/android/pim/vcard/ContactStruct.java84
-rw-r--r--core/java/android/pim/vcard/VCardComposer.java88
-rw-r--r--core/java/android/pim/vcard/VCardConfig.java39
-rw-r--r--core/java/android/pim/vcard/VCardUtils.java70
-rw-r--r--core/java/android/provider/Settings.java13
-rw-r--r--core/java/android/widget/AutoCompleteTextView.java6
-rw-r--r--core/java/com/android/internal/os/IDropBoxManagerService.aidl (renamed from core/java/com/android/internal/os/IDropBoxService.aidl)24
-rw-r--r--core/java/com/android/internal/widget/DigitalClock.java186
-rw-r--r--core/java/com/android/internal/widget/SlidingTab.java84
-rw-r--r--core/res/AndroidManifest.xml2
-rw-r--r--core/res/res/drawable-hdpi/blank_tile.pngbin685 -> 557 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_jog_dial_answer.pngbin0 -> 6203 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_jog_dial_answer_and_end.pngbin0 -> 6640 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_jog_dial_answer_and_hold.pngbin0 -> 6919 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_jog_dial_decline.pngbin0 -> 5703 bytes
-rw-r--r--core/res/res/drawable-hdpi/jog_tab_bar_confirm_gray.9.pngbin390 -> 0 bytes
-rw-r--r--core/res/res/drawable-hdpi/jog_tab_bar_confirm_green.9.pngbin470 -> 0 bytes
-rw-r--r--core/res/res/drawable-hdpi/jog_tab_bar_confirm_red.9.pngbin463 -> 0 bytes
-rw-r--r--core/res/res/drawable-hdpi/jog_tab_bar_confirm_yellow.9.pngbin476 -> 0 bytes
-rw-r--r--core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_gray.9.pngbin0 -> 3069 bytes
-rw-r--r--core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_green.9.pngbin0 -> 4534 bytes
-rw-r--r--core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_red.9.pngbin0 -> 4510 bytes
-rw-r--r--core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_yellow.9.pngbin0 -> 4561 bytes
-rw-r--r--core/res/res/drawable-hdpi/jog_tab_bar_left_end_normal.9.pngbin0 -> 4389 bytes
-rw-r--r--core/res/res/drawable-hdpi/jog_tab_bar_left_end_pressed.9.pngbin0 -> 4211 bytes
-rw-r--r--core/res/res/drawable-hdpi/jog_tab_bar_normal.9.pngbin492 -> 0 bytes
-rw-r--r--core/res/res/drawable-hdpi/jog_tab_bar_pressed.9.pngbin462 -> 0 bytes
-rw-r--r--core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_gray.9.pngbin0 -> 3274 bytes
-rw-r--r--core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_green.9.pngbin0 -> 4926 bytes
-rw-r--r--core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_red.9.pngbin0 -> 4952 bytes
-rw-r--r--core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_yellow.9.pngbin0 -> 4864 bytes
-rw-r--r--core/res/res/drawable-hdpi/jog_tab_bar_right_end_normal.9.pngbin0 -> 4511 bytes
-rw-r--r--core/res/res/drawable-hdpi/jog_tab_bar_right_end_pressed.9.pngbin0 -> 4267 bytes
-rw-r--r--core/res/res/drawable-hdpi/loading_tile.pngbin617 -> 729 bytes
-rw-r--r--core/res/res/drawable-hdpi/no_tile_128.pngbin1698 -> 1392 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_gray.9.pngbin491 -> 0 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_green.9.pngbin561 -> 0 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_red.9.pngbin560 -> 0 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_yellow.9.pngbin569 -> 0 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_gray.9.pngbin0 -> 3062 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_green.9.pngbin0 -> 4498 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_red.9.pngbin0 -> 4510 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_yellow.9.pngbin0 -> 4494 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_normal.9.pngbin0 -> 4090 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_pressed.9.pngbin0 -> 3934 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_bar_normal.9.pngbin586 -> 0 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_bar_pressed.9.pngbin554 -> 0 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_gray.9.pngbin0 -> 2890 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_green.9.pngbin0 -> 4258 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_red.9.pngbin0 -> 4286 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_yellow.9.pngbin0 -> 4291 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_normal.9.pngbin0 -> 3983 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_pressed.9.pngbin0 -> 3775 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_left_confirm_gray.pngbin8706 -> 6622 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_left_confirm_green.pngbin14035 -> 11463 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_left_confirm_red.pngbin14006 -> 11529 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_left_confirm_yellow.pngbin14037 -> 11615 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_left_normal.pngbin13312 -> 10462 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_left_pressed.pngbin12987 -> 9964 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_right_confirm_gray.pngbin8653 -> 6702 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_right_confirm_green.pngbin14119 -> 11547 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_right_confirm_red.pngbin14096 -> 11616 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_right_confirm_yellow.pngbin14198 -> 11728 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_right_normal.pngbin13221 -> 10482 bytes
-rw-r--r--core/res/res/drawable-land-hdpi/jog_tab_right_pressed.pngbin12990 -> 9922 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_gray.9.pngbin0 -> 1975 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_green.9.pngbin0 -> 2744 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_red.9.pngbin0 -> 2694 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_yellow.9.pngbin0 -> 2717 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_normal.9.pngbin0 -> 2525 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_pressed.9.pngbin0 -> 2446 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_gray.9.pngbin0 -> 1883 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_green.9.pngbin0 -> 2656 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_red.9.pngbin0 -> 2608 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_yellow.9.pngbin0 -> 2638 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_normal.9.pngbin0 -> 2477 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_pressed.9.pngbin0 -> 2357 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_left_confirm_gray.pngbin0 -> 4161 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_left_confirm_green.pngbin0 -> 6823 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_left_confirm_red.pngbin0 -> 6863 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_left_confirm_yellow.pngbin0 -> 6867 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_left_normal.pngbin0 -> 6272 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_left_pressed.pngbin0 -> 5947 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_right_confirm_gray.pngbin0 -> 4180 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_right_confirm_green.pngbin0 -> 6806 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_right_confirm_red.pngbin0 -> 6854 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_right_confirm_yellow.pngbin0 -> 6890 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_right_normal.pngbin0 -> 6234 bytes
-rw-r--r--core/res/res/drawable-land-mdpi/jog_tab_right_pressed.pngbin0 -> 5944 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_jog_dial_answer.pngbin0 -> 3610 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_jog_dial_answer_and_end.pngbin0 -> 3875 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_jog_dial_answer_and_hold.pngbin0 -> 4039 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_jog_dial_decline.pngbin0 -> 3284 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_gray.9.pngbin0 -> 2052 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_green.9.pngbin0 -> 2853 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_red.9.pngbin0 -> 2774 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_yellow.9.pngbin0 -> 2853 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_bar_left_end_normal.9.pngbin0 -> 2728 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_bar_left_end_pressed.9.pngbin0 -> 2634 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_gray.9.pngbin0 -> 2190 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_green.9.pngbin0 -> 3075 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_red.9.pngbin0 -> 3005 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_yellow.9.pngbin0 -> 3011 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_bar_right_end_normal.9.pngbin0 -> 2820 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_bar_right_end_pressed.9.pngbin0 -> 2716 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_left_confirm_gray.pngbin0 -> 4306 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_left_confirm_green.pngbin0 -> 6753 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_left_confirm_red.pngbin0 -> 6842 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_left_confirm_yellow.pngbin0 -> 6879 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_left_normal.pngbin0 -> 6227 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_left_pressed.pngbin0 -> 5994 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_right_confirm_gray.pngbin0 -> 3959 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_right_confirm_green.pngbin0 -> 6278 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_right_confirm_red.pngbin0 -> 6312 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_right_confirm_yellow.pngbin0 -> 6392 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_right_normal.pngbin0 -> 5750 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_right_pressed.pngbin0 -> 5626 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_target_gray.pngbin0 -> 650 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_target_green.pngbin0 -> 710 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_target_red.pngbin0 -> 728 bytes
-rw-r--r--core/res/res/drawable-mdpi/jog_tab_target_yellow.pngbin0 -> 719 bytes
-rw-r--r--core/res/res/drawable/jog_tab_bar_left_answer.xml6
-rw-r--r--core/res/res/drawable/jog_tab_bar_left_generic.xml6
-rw-r--r--core/res/res/drawable/jog_tab_bar_left_unlock.xml6
-rw-r--r--core/res/res/drawable/jog_tab_bar_right_decline.xml6
-rw-r--r--core/res/res/drawable/jog_tab_bar_right_generic.xml6
-rw-r--r--core/res/res/drawable/jog_tab_bar_right_sound_off.xml6
-rw-r--r--core/res/res/drawable/jog_tab_bar_right_sound_on.xml6
-rw-r--r--core/res/res/layout/keyguard_screen_sim_pin_portrait.xml5
-rw-r--r--core/res/res/layout/keyguard_screen_tab_unlock.xml71
-rw-r--r--core/res/res/layout/keyguard_screen_tab_unlock_land.xml62
-rw-r--r--core/res/res/layout/keyguard_screen_unlock_landscape.xml93
-rw-r--r--core/res/res/layout/keyguard_screen_unlock_portrait.xml95
-rw-r--r--core/res/res/values/attrs.xml15
-rw-r--r--core/res/res/values/config.xml4
-rw-r--r--data/fonts/Android.mk3
-rw-r--r--data/fonts/Clockopia.ttfbin0 -> 6880 bytes
-rw-r--r--graphics/java/android/renderscript/RSSurfaceView.java16
-rw-r--r--graphics/java/android/renderscript/RenderScript.java26
-rw-r--r--graphics/jni/android_renderscript_RenderScript.cpp27
-rw-r--r--include/media/AudioSystem.h6
-rw-r--r--include/media/stagefright/HardwareAPI.h35
-rw-r--r--libs/audioflinger/AudioFlinger.cpp155
-rw-r--r--libs/audioflinger/AudioFlinger.h18
-rw-r--r--libs/binder/ProcessState.cpp2
-rw-r--r--libs/rs/RenderScript.h2
-rw-r--r--libs/rs/java/Fountain/src/com/android/fountain/FountainView.java28
-rw-r--r--libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java3
-rw-r--r--libs/rs/rs.spec6
-rw-r--r--libs/rs/rsContext.cpp99
-rw-r--r--libs/rs/rsContext.h7
-rw-r--r--libs/rs/rsLocklessFifo.cpp2
-rw-r--r--libs/rs/rsProgramVertex.cpp9
-rw-r--r--libs/rs/rsProgramVertex.h1
-rw-r--r--libs/rs/rsUtils.h2
-rw-r--r--libs/surfaceflinger/LayerBuffer.cpp74
-rw-r--r--libs/surfaceflinger/LayerBuffer.h4
-rw-r--r--libs/ui/FramebufferNativeWindow.cpp2
-rw-r--r--media/java/android/media/AudioService.java103
-rw-r--r--media/java/android/media/AudioSystem.java3
-rw-r--r--media/libmedia/AudioTrack.cpp27
-rw-r--r--media/libstagefright/include/QComHardwareRenderer.h57
-rw-r--r--media/libstagefright/include/TIHardwareRenderer.h59
-rw-r--r--media/libstagefright/omx/Android.mk11
-rw-r--r--media/libstagefright/omx/OMX.cpp50
-rw-r--r--media/libstagefright/omx/QComHardwareRenderer.cpp144
-rw-r--r--media/libstagefright/omx/TIHardwareRenderer.cpp131
-rw-r--r--opengl/libagl/egl.cpp2
-rw-r--r--opengl/libagl/state.cpp2
-rw-r--r--services/java/com/android/server/DropBoxManagerService.java (renamed from services/java/com/android/server/DropBoxService.java)69
-rw-r--r--services/java/com/android/server/HeadsetObserver.java32
-rw-r--r--services/java/com/android/server/PackageManagerService.java195
-rw-r--r--services/java/com/android/server/SystemServer.java4
-rw-r--r--services/java/com/android/server/WallpaperManagerService.java60
-rw-r--r--services/java/com/android/server/am/ActivityManagerService.java10
-rw-r--r--telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java24
-rwxr-xr-xtelephony/java/com/android/internal/telephony/gsm/GSMPhone.java11
-rw-r--r--tests/AndroidTests/res/raw/v21_invalid_comment_line.vcf10
-rw-r--r--tests/AndroidTests/src/com/android/unit_tests/DropBoxTest.java130
-rw-r--r--tests/AndroidTests/src/com/android/unit_tests/vcard/PropertyNodesVerifier.java12
-rw-r--r--tests/AndroidTests/src/com/android/unit_tests/vcard/VCardExporterTests.java36
-rw-r--r--tests/AndroidTests/src/com/android/unit_tests/vcard/VCardImporterTests.java20
-rw-r--r--tests/AndroidTests/src/com/android/unit_tests/vcard/VCardJapanizationTests.java98
-rw-r--r--tests/AndroidTests/src/com/android/unit_tests/vcard/VCardTestsBase.java20
-rw-r--r--tests/DumpRenderTree/src/com/android/dumprendertree/FsUtils.java35
-rw-r--r--tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java19
197 files changed, 1988 insertions, 2758 deletions
diff --git a/Android.mk b/Android.mk
index f538d8e..a46e4f7 100644
--- a/Android.mk
+++ b/Android.mk
@@ -136,7 +136,7 @@ LOCAL_SRC_FILES += \
core/java/com/android/internal/appwidget/IAppWidgetService.aidl \
core/java/com/android/internal/appwidget/IAppWidgetHost.aidl \
core/java/com/android/internal/backup/IBackupTransport.aidl \
- core/java/com/android/internal/os/IDropBoxService.aidl \
+ core/java/com/android/internal/os/IDropBoxManagerService.aidl \
core/java/com/android/internal/os/IResultReceiver.aidl \
core/java/com/android/internal/view/IInputContext.aidl \
core/java/com/android/internal/view/IInputContextCallback.aidl \
@@ -218,7 +218,7 @@ aidl_files := \
frameworks/base/core/java/android/appwidget/AppWidgetProviderInfo.aidl \
frameworks/base/core/java/android/net/Uri.aidl \
frameworks/base/core/java/android/os/Bundle.aidl \
- frameworks/base/core/java/android/os/DropBox.aidl \
+ frameworks/base/core/java/android/os/DropBoxManager.aidl \
frameworks/base/core/java/android/os/ParcelFileDescriptor.aidl \
frameworks/base/core/java/android/os/ParcelUuid.aidl \
frameworks/base/core/java/android/view/KeyEvent.aidl \
diff --git a/api/6.xml b/api/6.xml
index 32d0f1e..74c2375 100644
--- a/api/6.xml
+++ b/api/6.xml
@@ -6389,72 +6389,6 @@
visibility="public"
>
</field>
-<field name="quickContactBadgeStyleSmallWindowLarge"
- type="int"
- transient="false"
- volatile="false"
- value="16843443"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="quickContactBadgeStyleSmallWindowMedium"
- type="int"
- transient="false"
- volatile="false"
- value="16843442"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="quickContactBadgeStyleSmallWindowSmall"
- type="int"
- transient="false"
- volatile="false"
- value="16843441"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="quickContactBadgeStyleWindowLarge"
- type="int"
- transient="false"
- volatile="false"
- value="16843440"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="quickContactBadgeStyleWindowMedium"
- type="int"
- transient="false"
- volatile="false"
- value="16843439"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="quickContactBadgeStyleWindowSmall"
- type="int"
- transient="false"
- volatile="false"
- value="16843438"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="radioButtonStyle"
type="int"
transient="false"
@@ -8842,17 +8776,6 @@
visibility="public"
>
</field>
-<field name="wallpaperAuthor"
- type="int"
- transient="false"
- volatile="false"
- value="16843444"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="wallpaperCloseEnterAnimation"
type="int"
transient="false"
@@ -8875,17 +8798,6 @@
visibility="public"
>
</field>
-<field name="wallpaperDescription"
- type="int"
- transient="false"
- volatile="false"
- value="16843445"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="wallpaperIntraCloseEnterAnimation"
type="int"
transient="false"
@@ -13892,8 +13804,6 @@
</parameter>
<parameter name="options" type="android.os.Bundle">
</parameter>
-<exception name="NetworkErrorException" type="android.accounts.NetworkErrorException">
-</exception>
</method>
<method name="editProperties"
return="android.os.Bundle"
@@ -13943,7 +13853,7 @@
</parameter>
<parameter name="authTokenType" type="java.lang.String">
</parameter>
-<parameter name="options" type="android.os.Bundle">
+<parameter name="loginOptions" type="android.os.Bundle">
</parameter>
<exception name="NetworkErrorException" type="android.accounts.NetworkErrorException">
</exception>
@@ -14007,10 +13917,8 @@
</parameter>
<parameter name="authTokenType" type="java.lang.String">
</parameter>
-<parameter name="options" type="android.os.Bundle">
+<parameter name="loginOptions" type="android.os.Bundle">
</parameter>
-<exception name="NetworkErrorException" type="android.accounts.NetworkErrorException">
-</exception>
</method>
</class>
<class name="Account"
@@ -14275,7 +14183,7 @@
</parameter>
<parameter name="password" type="java.lang.String">
</parameter>
-<parameter name="userdata" type="android.os.Bundle">
+<parameter name="extras" type="android.os.Bundle">
</parameter>
</method>
<method name="addOnAccountsUpdatedListener"
@@ -14441,7 +14349,7 @@
</parameter>
<parameter name="authTokenType" type="java.lang.String">
</parameter>
-<parameter name="options" type="android.os.Bundle">
+<parameter name="loginOptions" type="android.os.Bundle">
</parameter>
<parameter name="activity" type="android.app.Activity">
</parameter>
@@ -14491,7 +14399,7 @@
</parameter>
<parameter name="addAccountOptions" type="android.os.Bundle">
</parameter>
-<parameter name="getAuthTokenOptions" type="android.os.Bundle">
+<parameter name="loginOptions" type="android.os.Bundle">
</parameter>
<parameter name="callback" type="android.accounts.AccountManagerCallback&lt;android.os.Bundle&gt;">
</parameter>
@@ -14660,7 +14568,7 @@
</parameter>
<parameter name="authTokenType" type="java.lang.String">
</parameter>
-<parameter name="options" type="android.os.Bundle">
+<parameter name="loginOptions" type="android.os.Bundle">
</parameter>
<parameter name="activity" type="android.app.Activity">
</parameter>
@@ -15058,71 +14966,6 @@
>
</method>
</interface>
-<class name="AccountManagerResponse"
- extends="java.lang.Object"
- abstract="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<implements name="android.os.Parcelable">
-</implements>
-<method name="describeContents"
- return="int"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="onError"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="errorCode" type="int">
-</parameter>
-<parameter name="errorMessage" type="java.lang.String">
-</parameter>
-</method>
-<method name="onResult"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="result" type="android.os.Bundle">
-</parameter>
-</method>
-<method name="writeToParcel"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="dest" type="android.os.Parcel">
-</parameter>
-<parameter name="flags" type="int">
-</parameter>
-</method>
-</class>
<class name="AccountsException"
extends="java.lang.Exception"
abstract="false"
@@ -24703,208 +24546,6 @@
</parameter>
</method>
</interface>
-<class name="WallpaperInfo"
- extends="java.lang.Object"
- abstract="false"
- static="false"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-<implements name="android.os.Parcelable">
-</implements>
-<constructor name="WallpaperInfo"
- type="android.app.WallpaperInfo"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="context" type="android.content.Context">
-</parameter>
-<parameter name="service" type="android.content.pm.ResolveInfo">
-</parameter>
-<exception name="IOException" type="java.io.IOException">
-</exception>
-<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
-</exception>
-</constructor>
-<method name="describeContents"
- return="int"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="dump"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="pw" type="android.util.Printer">
-</parameter>
-<parameter name="prefix" type="java.lang.String">
-</parameter>
-</method>
-<method name="getComponent"
- return="android.content.ComponentName"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getPackageName"
- return="java.lang.String"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getServiceInfo"
- return="android.content.pm.ServiceInfo"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getServiceName"
- return="java.lang.String"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getSettingsActivity"
- return="java.lang.String"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="loadAuthor"
- return="java.lang.CharSequence"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="pm" type="android.content.pm.PackageManager">
-</parameter>
-<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
-</exception>
-</method>
-<method name="loadDescription"
- return="java.lang.CharSequence"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="pm" type="android.content.pm.PackageManager">
-</parameter>
-<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
-</exception>
-</method>
-<method name="loadIcon"
- return="android.graphics.drawable.Drawable"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="pm" type="android.content.pm.PackageManager">
-</parameter>
-</method>
-<method name="loadLabel"
- return="java.lang.CharSequence"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="pm" type="android.content.pm.PackageManager">
-</parameter>
-</method>
-<method name="loadThumbnail"
- return="android.graphics.drawable.Drawable"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="pm" type="android.content.pm.PackageManager">
-</parameter>
-</method>
-<method name="writeToParcel"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="dest" type="android.os.Parcel">
-</parameter>
-<parameter name="flags" type="int">
-</parameter>
-</method>
-<field name="CREATOR"
- type="android.os.Parcelable.Creator"
- transient="false"
- volatile="false"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-</class>
<class name="WallpaperManager"
extends="java.lang.Object"
abstract="false"
@@ -24996,17 +24637,6 @@
<parameter name="context" type="android.content.Context">
</parameter>
</method>
-<method name="getWallpaperInfo"
- return="android.app.WallpaperInfo"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="peekDrawable"
return="android.graphics.drawable.Drawable"
abstract="false"
@@ -25029,29 +24659,6 @@
visibility="public"
>
</method>
-<method name="sendWallpaperCommand"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="windowToken" type="android.os.IBinder">
-</parameter>
-<parameter name="action" type="java.lang.String">
-</parameter>
-<parameter name="x" type="int">
-</parameter>
-<parameter name="y" type="int">
-</parameter>
-<parameter name="z" type="int">
-</parameter>
-<parameter name="extras" type="android.os.Bundle">
-</parameter>
-</method>
<method name="setBitmap"
return="void"
abstract="false"
@@ -25097,21 +24704,6 @@
<exception name="IOException" type="java.io.IOException">
</exception>
</method>
-<method name="setWallpaperOffsetSteps"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="xStep" type="float">
-</parameter>
-<parameter name="yStep" type="float">
-</parameter>
-</method>
<method name="setWallpaperOffsets"
return="void"
abstract="false"
@@ -25144,17 +24736,6 @@
<parameter name="minimumHeight" type="int">
</parameter>
</method>
-<field name="ACTION_LIVE_WALLPAPER_CHOOSER"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value="&quot;android.service.wallpaper.LIVE_WALLPAPER_CHOOSER&quot;"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
</class>
</package>
<package name="android.appwidget"
@@ -79940,17 +79521,6 @@
deprecated="not deprecated"
visibility="public"
>
-<field name="CAMCORDER"
- type="int"
- transient="false"
- volatile="false"
- value="5"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="DEFAULT"
type="int"
transient="false"
@@ -79995,17 +79565,6 @@
visibility="public"
>
</field>
-<field name="VOICE_RECOGNITION"
- type="int"
- transient="false"
- volatile="false"
- value="6"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="VOICE_UPLINK"
type="int"
transient="false"
@@ -99828,7 +99387,7 @@
visibility="public"
>
</field>
-<field name="ECLAIR_MR1"
+<field name="ECLAIR_0_1"
type="int"
transient="false"
volatile="false"
@@ -105903,17 +105462,6 @@
<parameter name="time" type="long">
</parameter>
</method>
-<method name="isScreenOn"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="newWakeLock"
return="android.os.PowerManager.WakeLock"
abstract="false"
@@ -123478,341 +123026,6 @@
</implements>
</interface>
</package>
-<package name="android.service.wallpaper"
->
-<class name="WallpaperService"
- extends="android.app.Service"
- abstract="true"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<constructor name="WallpaperService"
- type="android.service.wallpaper.WallpaperService"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</constructor>
-<method name="onBind"
- return="android.os.IBinder"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="intent" type="android.content.Intent">
-</parameter>
-</method>
-<method name="onCreateEngine"
- return="android.service.wallpaper.WallpaperService.Engine"
- abstract="true"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<field name="SERVICE_INTERFACE"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value="&quot;android.service.wallpaper.WallpaperService&quot;"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="SERVICE_META_DATA"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value="&quot;android.service.wallpaper&quot;"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-</class>
-<class name="WallpaperService.Engine"
- extends="java.lang.Object"
- abstract="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<constructor name="WallpaperService.Engine"
- type="android.service.wallpaper.WallpaperService.Engine"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</constructor>
-<method name="getDesiredMinimumHeight"
- return="int"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getDesiredMinimumWidth"
- return="int"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getSurfaceHolder"
- return="android.view.SurfaceHolder"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="isPreview"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="isVisible"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="onCommand"
- return="android.os.Bundle"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="action" type="java.lang.String">
-</parameter>
-<parameter name="x" type="int">
-</parameter>
-<parameter name="y" type="int">
-</parameter>
-<parameter name="z" type="int">
-</parameter>
-<parameter name="extras" type="android.os.Bundle">
-</parameter>
-<parameter name="resultRequested" type="boolean">
-</parameter>
-</method>
-<method name="onCreate"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="surfaceHolder" type="android.view.SurfaceHolder">
-</parameter>
-</method>
-<method name="onDesiredSizeChanged"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="desiredWidth" type="int">
-</parameter>
-<parameter name="desiredHeight" type="int">
-</parameter>
-</method>
-<method name="onDestroy"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="onOffsetsChanged"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="xOffset" type="float">
-</parameter>
-<parameter name="yOffset" type="float">
-</parameter>
-<parameter name="xOffsetStep" type="float">
-</parameter>
-<parameter name="yOffsetStep" type="float">
-</parameter>
-<parameter name="xPixelOffset" type="int">
-</parameter>
-<parameter name="yPixelOffset" type="int">
-</parameter>
-</method>
-<method name="onSurfaceChanged"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="holder" type="android.view.SurfaceHolder">
-</parameter>
-<parameter name="format" type="int">
-</parameter>
-<parameter name="width" type="int">
-</parameter>
-<parameter name="height" type="int">
-</parameter>
-</method>
-<method name="onSurfaceCreated"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="holder" type="android.view.SurfaceHolder">
-</parameter>
-</method>
-<method name="onSurfaceDestroyed"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="holder" type="android.view.SurfaceHolder">
-</parameter>
-</method>
-<method name="onTouchEvent"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="event" type="android.view.MotionEvent">
-</parameter>
-</method>
-<method name="onVisibilityChanged"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="visible" type="boolean">
-</parameter>
-</method>
-<method name="setTouchEventsEnabled"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="enabled" type="boolean">
-</parameter>
-</method>
-</class>
-<class name="WallpaperSettingsActivity"
- extends="android.preference.PreferenceActivity"
- abstract="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<constructor name="WallpaperSettingsActivity"
- type="android.service.wallpaper.WallpaperSettingsActivity"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</constructor>
-<field name="EXTRA_PREVIEW_MODE"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value="&quot;android.service.wallpaper.PREVIEW_MODE&quot;"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-</class>
-</package>
<package name="android.speech"
>
<class name="RecognizerIntent"
@@ -158737,17 +157950,6 @@
visibility="public"
>
</method>
-<method name="isOpaque"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="isPaddingOffsetRequired"
return="boolean"
abstract="false"
@@ -159029,19 +158231,6 @@
<parameter name="canvas" type="android.graphics.Canvas">
</parameter>
</method>
-<method name="onDrawScrollBars"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="true"
- deprecated="not deprecated"
- visibility="protected"
->
-<parameter name="canvas" type="android.graphics.Canvas">
-</parameter>
-</method>
<method name="onFinishInflate"
return="void"
abstract="false"
@@ -162629,17 +161818,6 @@
visibility="public"
>
</method>
-<method name="isChildrenDrawingOrderEnabled"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="protected"
->
-</method>
<method name="isChildrenDrawnWithCacheEnabled"
return="boolean"
abstract="false"
@@ -163023,19 +162201,6 @@
<parameter name="enabled" type="boolean">
</parameter>
</method>
-<method name="setChildrenDrawingOrderEnabled"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="protected"
->
-<parameter name="enabled" type="boolean">
-</parameter>
-</method>
<method name="setChildrenDrawnWithCacheEnabled"
return="void"
abstract="false"
@@ -172907,17 +172072,6 @@
visibility="public"
>
</constructor>
-<method name="getContentDisposition"
- return="java.lang.String"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="getContentLength"
return="long"
abstract="false"
@@ -172962,17 +172116,6 @@
visibility="public"
>
</method>
-<method name="getExpiresString"
- return="java.lang.String"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="getHttpStatusCode"
return="int"
abstract="false"
@@ -173097,23 +172240,6 @@
<parameter name="w" type="android.webkit.WebView">
</parameter>
</constructor>
-<method name="addMessageToConsole"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="message" type="java.lang.String">
-</parameter>
-<parameter name="lineNumber" type="int">
-</parameter>
-<parameter name="sourceID" type="java.lang.String">
-</parameter>
-</method>
<method name="createWindow"
return="android.webkit.WebView"
abstract="false"
@@ -173166,30 +172292,6 @@
visibility="public"
>
</method>
-<method name="getVisitedHistory"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="callback" type="android.webkit.ValueCallback&lt;java.lang.String[]&gt;">
-</parameter>
-</method>
-<method name="getWebChromeClient"
- return="android.webkit.WebChromeClient"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="onCloseWindow"
return="void"
abstract="false"
@@ -173262,32 +172364,6 @@
<parameter name="resend" type="android.os.Message">
</parameter>
</method>
-<method name="onGeolocationPermissionsHidePrompt"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="onGeolocationPermissionsShowPrompt"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="origin" type="java.lang.String">
-</parameter>
-<parameter name="callback" type="android.webkit.GeolocationPermissions.Callback">
-</parameter>
-</method>
<method name="onJsAlert"
return="void"
abstract="false"
@@ -173350,17 +172426,6 @@
<parameter name="defaultValue" type="java.lang.String">
</parameter>
</method>
-<method name="onJsTimeout"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="onLoadResource"
return="void"
abstract="false"
@@ -173415,23 +172480,6 @@
<parameter name="newProgress" type="int">
</parameter>
</method>
-<method name="onReachedMaxAppCacheSize"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="spaceNeeded" type="long">
-</parameter>
-<parameter name="totalUsedQuota" type="long">
-</parameter>
-<parameter name="quotaUpdater" type="android.webkit.WebStorage.QuotaUpdater">
-</parameter>
-</method>
<method name="onReceivedError"
return="void"
abstract="false"
@@ -173918,82 +172966,6 @@
visibility="public"
>
</constructor>
-<method name="allow"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="origin" type="java.lang.String">
-</parameter>
-</method>
-<method name="clear"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="origin" type="java.lang.String">
-</parameter>
-</method>
-<method name="clearAll"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getAllowed"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="origin" type="java.lang.String">
-</parameter>
-<parameter name="callback" type="android.webkit.ValueCallback&lt;java.lang.Boolean&gt;">
-</parameter>
-</method>
-<method name="getInstance"
- return="android.webkit.GeolocationPermissions"
- abstract="false"
- native="false"
- synchronized="false"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getOrigins"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="callback" type="android.webkit.ValueCallback&lt;java.util.Set&gt;">
-</parameter>
-</method>
</class>
<interface name="GeolocationPermissions.Callback"
abstract="true"
@@ -174991,27 +173963,6 @@
>
</method>
</class>
-<interface name="ValueCallback"
- abstract="true"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<method name="onReceiveValue"
- return="void"
- abstract="true"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="value" type="T">
-</parameter>
-</method>
-</interface>
<class name="WebBackForwardList"
extends="java.lang.Object"
abstract="false"
@@ -175087,58 +174038,6 @@
visibility="public"
>
</constructor>
-<method name="addMessageToConsole"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="message" type="java.lang.String">
-</parameter>
-<parameter name="lineNumber" type="int">
-</parameter>
-<parameter name="sourceID" type="java.lang.String">
-</parameter>
-</method>
-<method name="getDefaultVideoPoster"
- return="android.graphics.Bitmap"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getVideoLoadingProgressView"
- return="android.view.View"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getVisitedHistory"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="callback" type="android.webkit.ValueCallback&lt;java.lang.String[]&gt;">
-</parameter>
-</method>
<method name="onCloseWindow"
return="void"
abstract="false"
@@ -175220,17 +174119,6 @@
<parameter name="callback" type="android.webkit.GeolocationPermissions.Callback">
</parameter>
</method>
-<method name="onHideCustomView"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="onJsAlert"
return="boolean"
abstract="false"
@@ -175309,17 +174197,6 @@
<parameter name="result" type="android.webkit.JsPromptResult">
</parameter>
</method>
-<method name="onJsTimeout"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="onProgressChanged"
return="void"
abstract="false"
@@ -175335,23 +174212,6 @@
<parameter name="newProgress" type="int">
</parameter>
</method>
-<method name="onReachedMaxAppCacheSize"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="spaceNeeded" type="long">
-</parameter>
-<parameter name="totalUsedQuota" type="long">
-</parameter>
-<parameter name="quotaUpdater" type="android.webkit.WebStorage.QuotaUpdater">
-</parameter>
-</method>
<method name="onReceivedIcon"
return="void"
abstract="false"
@@ -175382,23 +174242,6 @@
<parameter name="title" type="java.lang.String">
</parameter>
</method>
-<method name="onReceivedTouchIconUrl"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="view" type="android.webkit.WebView">
-</parameter>
-<parameter name="url" type="java.lang.String">
-</parameter>
-<parameter name="precomposed" type="boolean">
-</parameter>
-</method>
<method name="onRequestFocus"
return="void"
abstract="false"
@@ -175412,41 +174255,7 @@
<parameter name="view" type="android.webkit.WebView">
</parameter>
</method>
-<method name="onShowCustomView"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="view" type="android.view.View">
-</parameter>
-<parameter name="callback" type="android.webkit.WebChromeClient.CustomViewCallback">
-</parameter>
-</method>
</class>
-<interface name="WebChromeClient.CustomViewCallback"
- abstract="true"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<method name="onCustomViewHidden"
- return="void"
- abstract="true"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-</interface>
<class name="WebHistoryItem"
extends="java.lang.Object"
abstract="false"
@@ -175750,28 +174559,6 @@
visibility="public"
>
</method>
-<method name="getDefaultZoom"
- return="android.webkit.WebSettings.ZoomDensity"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getDomStorageEnabled"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="true"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="getFantasyFontFamily"
return="java.lang.String"
abstract="false"
@@ -175838,17 +174625,6 @@
visibility="public"
>
</method>
-<method name="getLoadWithOverviewMode"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="getLoadsImagesAutomatically"
return="boolean"
abstract="false"
@@ -176038,45 +174814,6 @@
<parameter name="allow" type="boolean">
</parameter>
</method>
-<method name="setAppCacheEnabled"
- return="void"
- abstract="false"
- native="false"
- synchronized="true"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="flag" type="boolean">
-</parameter>
-</method>
-<method name="setAppCacheMaxSize"
- return="void"
- abstract="false"
- native="false"
- synchronized="true"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="appCacheMaxSize" type="long">
-</parameter>
-</method>
-<method name="setAppCachePath"
- return="void"
- abstract="false"
- native="false"
- synchronized="true"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="appCachePath" type="java.lang.String">
-</parameter>
-</method>
<method name="setBlockNetworkImage"
return="void"
abstract="false"
@@ -176194,32 +174931,6 @@
<parameter name="encoding" type="java.lang.String">
</parameter>
</method>
-<method name="setDefaultZoom"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="zoom" type="android.webkit.WebSettings.ZoomDensity">
-</parameter>
-</method>
-<method name="setDomStorageEnabled"
- return="void"
- abstract="false"
- native="false"
- synchronized="true"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="flag" type="boolean">
-</parameter>
-</method>
<method name="setFantasyFontFamily"
return="void"
abstract="false"
@@ -176324,19 +175035,6 @@
<parameter name="enabled" type="boolean">
</parameter>
</method>
-<method name="setLoadWithOverviewMode"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="overview" type="boolean">
-</parameter>
-</method>
<method name="setLoadsImagesAutomatically"
return="void"
abstract="false"
@@ -176774,39 +175472,6 @@
>
</method>
</class>
-<class name="WebSettings.ZoomDensity"
- extends="java.lang.Enum"
- abstract="false"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-<method name="valueOf"
- return="android.webkit.WebSettings.ZoomDensity"
- abstract="false"
- native="false"
- synchronized="false"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="name" type="java.lang.String">
-</parameter>
-</method>
-<method name="values"
- return="android.webkit.WebSettings.ZoomDensity[]"
- abstract="false"
- native="false"
- synchronized="false"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-</class>
<class name="WebStorage"
extends="java.lang.Object"
abstract="false"
@@ -176823,99 +175488,6 @@
visibility="public"
>
</constructor>
-<method name="deleteAllData"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="deleteOrigin"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="origin" type="java.lang.String">
-</parameter>
-</method>
-<method name="getInstance"
- return="android.webkit.WebStorage"
- abstract="false"
- native="false"
- synchronized="false"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getOrigins"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="callback" type="android.webkit.ValueCallback&lt;java.util.Map&gt;">
-</parameter>
-</method>
-<method name="getQuotaForOrigin"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="origin" type="java.lang.String">
-</parameter>
-<parameter name="callback" type="android.webkit.ValueCallback&lt;java.lang.Long&gt;">
-</parameter>
-</method>
-<method name="getUsageForOrigin"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="origin" type="java.lang.String">
-</parameter>
-<parameter name="callback" type="android.webkit.ValueCallback&lt;java.lang.Long&gt;">
-</parameter>
-</method>
-<method name="setQuotaForOrigin"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="origin" type="java.lang.String">
-</parameter>
-<parameter name="quota" type="long">
-</parameter>
-</method>
</class>
<interface name="WebStorage.QuotaUpdater"
abstract="true"
@@ -177357,17 +175929,6 @@
<parameter name="vy" type="int">
</parameter>
</method>
-<method name="freeMemory"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="getCertificate"
return="android.net.http.SslCertificate"
abstract="false"
diff --git a/api/current.xml b/api/current.xml
index 81148ed..dd2d42f 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -32012,6 +32012,17 @@
visibility="public"
>
</field>
+<field name="DROPBOX_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;dropbox&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="INPUT_METHOD_SERVICE"
type="java.lang.String"
transient="false"
@@ -99861,7 +99872,7 @@
visibility="public"
>
</field>
-<field name="ECLAIR_MR1"
+<field name="ECLAIR_0_1"
type="int"
transient="false"
volatile="false"
@@ -102116,6 +102127,326 @@
>
</field>
</class>
+<class name="DropBoxManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DropBoxManager"
+ type="android.os.DropBoxManager"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="addData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="addFile"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="fd" type="android.os.ParcelFileDescriptor">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="addText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="data" type="java.lang.String">
+</parameter>
+</method>
+<method name="getNextEntry"
+ return="android.os.DropBoxManager.Entry"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="msec" type="long">
+</parameter>
+</method>
+<method name="isTagEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+</method>
+<field name="IS_EMPTY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IS_GZIPPED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IS_TEXT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="DropBoxManager.Entry"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="DropBoxManager.Entry"
+ type="android.os.DropBoxManager.Entry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="millis" type="long">
+</parameter>
+</constructor>
+<constructor name="DropBoxManager.Entry"
+ type="android.os.DropBoxManager.Entry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="millis" type="long">
+</parameter>
+<parameter name="text" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="DropBoxManager.Entry"
+ type="android.os.DropBoxManager.Entry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="millis" type="long">
+</parameter>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</constructor>
+<constructor name="DropBoxManager.Entry"
+ type="android.os.DropBoxManager.Entry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="millis" type="long">
+</parameter>
+<parameter name="data" type="android.os.ParcelFileDescriptor">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</constructor>
+<constructor name="DropBoxManager.Entry"
+ type="android.os.DropBoxManager.Entry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="millis" type="long">
+</parameter>
+<parameter name="data" type="java.io.File">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFlags"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInputStream"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getTag"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getText"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="maxBytes" type="int">
+</parameter>
+</method>
+<method name="getTimeMillis"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
<class name="Environment"
extends="java.lang.Object"
abstract="false"
diff --git a/cleanspec.mk b/cleanspec.mk
new file mode 100644
index 0000000..683e303
--- /dev/null
+++ b/cleanspec.mk
@@ -0,0 +1 @@
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/com/android/internal/os/IDropBoxService.java)
diff --git a/core/java/android/app/ApplicationContext.java b/core/java/android/app/ApplicationContext.java
index 305ee6a..1e04abf 100644
--- a/core/java/android/app/ApplicationContext.java
+++ b/core/java/android/app/ApplicationContext.java
@@ -70,7 +70,7 @@ import android.net.wifi.IWifiManager;
import android.net.wifi.WifiManager;
import android.os.Binder;
import android.os.Bundle;
-import android.os.DropBox;
+import android.os.DropBoxManager;
import android.os.FileUtils;
import android.os.Handler;
import android.os.IBinder;
@@ -94,7 +94,7 @@ import android.view.inputmethod.InputMethodManager;
import android.accounts.AccountManager;
import android.accounts.IAccountManager;
-import com.android.internal.os.IDropBoxService;
+import com.android.internal.os.IDropBoxManagerService;
import java.io.File;
import java.io.FileInputStream;
@@ -185,7 +185,7 @@ class ApplicationContext extends Context {
private ClipboardManager mClipboardManager = null;
private boolean mRestricted;
private AccountManager mAccountManager; // protected by mSync
- private DropBox mDropBox = null;
+ private DropBoxManager mDropBoxManager = null;
private final Object mSync = new Object();
@@ -901,7 +901,7 @@ class ApplicationContext extends Context {
} else if (WALLPAPER_SERVICE.equals(name)) {
return getWallpaperManager();
} else if (DROPBOX_SERVICE.equals(name)) {
- return getDropBox();
+ return getDropBoxManager();
}
return null;
@@ -1060,15 +1060,15 @@ class ApplicationContext extends Context {
return mAudioManager;
}
- private DropBox getDropBox() {
+ private DropBoxManager getDropBoxManager() {
synchronized (mSync) {
- if (mDropBox == null) {
+ if (mDropBoxManager == null) {
IBinder b = ServiceManager.getService(DROPBOX_SERVICE);
- IDropBoxService service = IDropBoxService.Stub.asInterface(b);
- mDropBox = new DropBox(service);
+ IDropBoxManagerService service = IDropBoxManagerService.Stub.asInterface(b);
+ mDropBoxManager = new DropBoxManager(service);
}
}
- return mDropBox;
+ return mDropBoxManager;
}
@Override
diff --git a/core/java/android/app/SearchManager.java b/core/java/android/app/SearchManager.java
index 7f5a1e7..2e94a2f 100644
--- a/core/java/android/app/SearchManager.java
+++ b/core/java/android/app/SearchManager.java
@@ -769,17 +769,15 @@ import java.util.List;
* </tr>
*
* <tr><th>android:icon</th>
- * <td>If provided, this icon will be shown in place of the label above the search box.
- * This is a reference to a drawable (icon) resource. Note that the application icon
- * is also used as an icon to the left of the search box and you cannot modify this
- * behavior, so including the icon attribute is unecessary and this may be
- * deprecated in the future.</td>
+ * <td><strong>This is deprecated.</strong><br/>The default
+ * application icon is now always used, so this attribute is
+ * obsolete.</td>
* <td align="center">No</td>
* </tr>
*
* <tr><th>android:hint</th>
- * <td>This is the text to display in the search text field when no user text has been
- * entered.</td>
+ * <td>This is the text to display in the search text field when no text
+ * has been entered by the user.</td>
* <td align="center">No</td>
* </tr>
*
@@ -790,17 +788,14 @@ import java.util.List;
* <tbody>
* <tr><th>showSearchLabelAsBadge</th>
* <td>If set, this flag enables the display of the search target (label)
- * above the search box. If this flag and showSearchIconAsBadge
- * (see below) are both not set, no badge will be shown.</td>
+ * above the search box. As an alternative, you may
+ * want to instead use "hint" text in the search box.
+ * See the "android:hint" attribute above.</td>
* </tr>
* <tr><th>showSearchIconAsBadge</th>
- * <td>If set, this flag enables the display of the search target (icon)
- * above the search box. If this flag and showSearchLabelAsBadge
- * (see above) are both not set, no badge will be shown. If both flags
- * are set, showSearchIconAsBadge has precedence and the icon will be
- * shown. Because the application icon is now used to the left of the
- * search box by default, using this search mode is no longer necessary
- * and may be deprecated in the future.</td>
+ * <td><strong>This is deprecated.</strong><br/>The default
+ * application icon is now always used, so this
+ * option is obsolete.</td>
* </tr>
* <tr><th>queryRewriteFromData</th>
* <td>If set, this flag causes the suggestion column SUGGEST_COLUMN_INTENT_DATA
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index b4ab408..d77a6ca 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -1324,7 +1324,6 @@ public abstract class Context {
* Use with {@link #getSystemService} to retrieve a
* {@blink android.os.DropBox DropBox} instance for recording
* diagnostic logs.
- * @hide
* @see #getSystemService
*/
public static final String DROPBOX_SERVICE = "dropbox";
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 398f211..0085f26 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -1678,6 +1678,7 @@ public class Intent implements Parcelable {
* <ul>
* <li><em>state</em> - 0 for unplugged, 1 for plugged. </li>
* <li><em>name</em> - Headset type, human readable string </li>
+ * <li><em>microphone</em> - 1 if headset has a microphone, 0 otherwise </li>
* </ul>
* </ul>
*/
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index d4aaba3..ee18e88 100644
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -158,9 +158,9 @@ public class Build {
public static final int ECLAIR = 5;
/**
- * Current work on Eclair MR1.
+ * December 2009: Android 2.0.1
*/
- public static final int ECLAIR_MR1 = 6;
+ public static final int ECLAIR_0_1 = 6;
}
/** The type of build, like "user" or "eng". */
diff --git a/core/java/android/os/DropBox.aidl b/core/java/android/os/DropBoxManager.aidl
index 77abd22..6474ec2 100644
--- a/core/java/android/os/DropBox.aidl
+++ b/core/java/android/os/DropBoxManager.aidl
@@ -16,4 +16,4 @@
package android.os;
-parcelable DropBox.Entry;
+parcelable DropBoxManager.Entry;
diff --git a/core/java/android/os/DropBox.java b/core/java/android/os/DropBoxManager.java
index 0551dc1..b374043 100644
--- a/core/java/android/os/DropBox.java
+++ b/core/java/android/os/DropBoxManager.java
@@ -18,7 +18,7 @@ package android.os;
import android.util.Log;
-import com.android.internal.os.IDropBoxService;
+import com.android.internal.os.IDropBoxManagerService;
import java.io.ByteArrayInputStream;
import java.io.File;
@@ -37,14 +37,12 @@ import java.util.zip.GZIPInputStream;
* {@link android.content.Context#getSystemService}
* with {@link android.content.Context#DROPBOX_SERVICE}.
*
- * <p>DropBox entries are not sent anywhere directly, but other system services
- * and debugging tools may scan and upload entries for processing.
- *
- * {@pending}
+ * <p>DropBoxManager entries are not sent anywhere directly, but other system
+ * services and debugging tools may scan and upload entries for processing.
*/
-public class DropBox {
- private static final String TAG = "DropBox";
- private final IDropBoxService mService;
+public class DropBoxManager {
+ private static final String TAG = "DropBoxManager";
+ private final IDropBoxManagerService mService;
/** Flag value: Entry's content was deleted to save space. */
public static final int IS_EMPTY = 1;
@@ -198,14 +196,14 @@ public class DropBox {
}
/** {@hide} */
- public DropBox(IDropBoxService service) { mService = service; }
+ public DropBoxManager(IDropBoxManagerService service) { mService = service; }
/**
* Create a dummy instance for testing. All methods will fail unless
* overridden with an appropriate mock implementation. To obtain a
* functional instance, use {@link android.content.Context#getSystemService}.
*/
- protected DropBox() { mService = null; }
+ protected DropBoxManager() { mService = null; }
/**
* Stores human-readable text. The data may be discarded eventually (or even
diff --git a/core/java/android/pim/vcard/ContactStruct.java b/core/java/android/pim/vcard/ContactStruct.java
index f01659e8..530d5ad 100644
--- a/core/java/android/pim/vcard/ContactStruct.java
+++ b/core/java/android/pim/vcard/ContactStruct.java
@@ -20,8 +20,10 @@ import android.content.ContentProviderOperation;
import android.content.ContentResolver;
import android.content.OperationApplicationException;
import android.database.Cursor;
+import android.net.Uri;
import android.os.RemoteException;
import android.provider.ContactsContract;
+import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.Data;
import android.provider.ContactsContract.Groups;
import android.provider.ContactsContract.RawContacts;
@@ -675,16 +677,53 @@ public class ContactStruct {
*/
@SuppressWarnings("fallthrough")
private void handlePhoneticNameFromSound(List<String> elems) {
- // Family, Given, Middle. (1-3)
- // This is not from specification but mere assumption. Some Japanese phones use this order.
+ if (!(TextUtils.isEmpty(mPhoneticFamilyName) &&
+ TextUtils.isEmpty(mPhoneticMiddleName) &&
+ TextUtils.isEmpty(mPhoneticGivenName))) {
+ // This means the other properties like "X-PHONETIC-FIRST-NAME" was already found.
+ // Ignore "SOUND;X-IRMC-N".
+ return;
+ }
+
int size;
if (elems == null || (size = elems.size()) < 1) {
return;
}
+
+ // Assume that the order is "Family, Given, Middle".
+ // This is not from specification but mere assumption. Some Japanese phones use this order.
if (size > 3) {
size = 3;
}
+ if (elems.get(0).length() > 0) {
+ boolean onlyFirstElemIsNonEmpty = true;
+ for (int i = 1; i < size; i++) {
+ if (elems.get(i).length() > 0) {
+ onlyFirstElemIsNonEmpty = false;
+ break;
+ }
+ }
+ if (onlyFirstElemIsNonEmpty) {
+ final String[] namesArray = elems.get(0).split(" ");
+ final int nameArrayLength = namesArray.length;
+ if (nameArrayLength == 3) {
+ // Assume the string is "Family Middle Given".
+ mPhoneticFamilyName = namesArray[0];
+ mPhoneticMiddleName = namesArray[1];
+ mPhoneticGivenName = namesArray[2];
+ } else if (nameArrayLength == 2) {
+ // Assume the string is "Family Given" based on the Japanese mobile
+ // phones' preference.
+ mPhoneticFamilyName = namesArray[0];
+ mPhoneticGivenName = namesArray[1];
+ } else {
+ mPhoneticFullName = elems.get(0);
+ }
+ return;
+ }
+ }
+
switch (size) {
// fallthrough
case 3:
@@ -976,36 +1015,8 @@ public class ContactStruct {
if (!TextUtils.isEmpty(mFullName)) {
mDisplayName = mFullName;
} else if (!(TextUtils.isEmpty(mFamilyName) && TextUtils.isEmpty(mGivenName))) {
- StringBuilder builder = new StringBuilder();
- List<String> nameList;
- switch (VCardConfig.getNameOrderType(mVCardType)) {
- case VCardConfig.NAME_ORDER_JAPANESE:
- if (VCardUtils.containsOnlyPrintableAscii(mFamilyName) &&
- VCardUtils.containsOnlyPrintableAscii(mGivenName)) {
- nameList = Arrays.asList(mPrefix, mGivenName, mMiddleName, mFamilyName, mSuffix);
- } else {
- nameList = Arrays.asList(mPrefix, mFamilyName, mMiddleName, mGivenName, mSuffix);
- }
- break;
- case VCardConfig.NAME_ORDER_EUROPE:
- nameList = Arrays.asList(mPrefix, mMiddleName, mGivenName, mFamilyName, mSuffix);
- break;
- default:
- nameList = Arrays.asList(mPrefix, mGivenName, mMiddleName, mFamilyName, mSuffix);
- break;
- }
- boolean first = true;
- for (String namePart : nameList) {
- if (!TextUtils.isEmpty(namePart)) {
- if (first) {
- first = false;
- } else {
- builder.append(' ');
- }
- builder.append(namePart);
- }
- }
- mDisplayName = builder.toString();
+ mDisplayName = VCardUtils.constructNameFromElements(mVCardType,
+ mFamilyName, mMiddleName, mGivenName, mPrefix, mSuffix);
} else if (!(TextUtils.isEmpty(mPhoneticFamilyName) &&
TextUtils.isEmpty(mPhoneticGivenName))) {
mDisplayName = VCardUtils.constructNameFromElements(mVCardType,
@@ -1282,6 +1293,15 @@ public class ContactStruct {
}
}
+ public static ContactStruct buildFromResolver(ContentResolver resolver) {
+ return buildFromResolver(resolver, Contacts.CONTENT_URI);
+ }
+
+ public static ContactStruct buildFromResolver(ContentResolver resolver, Uri uri) {
+
+ return null;
+ }
+
private boolean nameFieldsAreEmpty() {
return (TextUtils.isEmpty(mFamilyName)
&& TextUtils.isEmpty(mMiddleName)
diff --git a/core/java/android/pim/vcard/VCardComposer.java b/core/java/android/pim/vcard/VCardComposer.java
index 980dd05..bbd19fb 100644
--- a/core/java/android/pim/vcard/VCardComposer.java
+++ b/core/java/android/pim/vcard/VCardComposer.java
@@ -682,10 +682,18 @@ public class VCardComposer {
final String givenName = contentValues.getAsString(StructuredName.GIVEN_NAME);
final String prefix = contentValues.getAsString(StructuredName.PREFIX);
final String suffix = contentValues.getAsString(StructuredName.SUFFIX);
+ final String phoneticFamilyName =
+ contentValues.getAsString(StructuredName.PHONETIC_FAMILY_NAME);
+ final String phoneticMiddleName =
+ contentValues.getAsString(StructuredName.PHONETIC_MIDDLE_NAME);
+ final String phoneticGivenName =
+ contentValues.getAsString(StructuredName.PHONETIC_GIVEN_NAME);
final String displayName = contentValues.getAsString(StructuredName.DISPLAY_NAME);
return !(TextUtils.isEmpty(familyName) && TextUtils.isEmpty(middleName) &&
TextUtils.isEmpty(givenName) && TextUtils.isEmpty(prefix) &&
- TextUtils.isEmpty(suffix) && TextUtils.isEmpty(displayName));
+ TextUtils.isEmpty(suffix) && TextUtils.isEmpty(phoneticFamilyName) &&
+ TextUtils.isEmpty(phoneticMiddleName) && TextUtils.isEmpty(phoneticGivenName) &&
+ TextUtils.isEmpty(displayName));
}
private void appendStructuredNamesInternal(final StringBuilder builder,
@@ -865,17 +873,18 @@ public class VCardComposer {
builder.append(VCARD_ITEM_SEPARATOR);
builder.append(VCARD_ITEM_SEPARATOR);
builder.append(VCARD_END_OF_LINE);
- if (mIsV30) {
- builder.append(Constants.PROPERTY_FN);
- // TODO: Not allowed formally...
- if (shouldAppendCharsetParameter(displayName)) {
- builder.append(VCARD_PARAM_SEPARATOR);
- builder.append(mVCardCharsetParameter);
- }
- builder.append(VCARD_DATA_SEPARATOR);
- builder.append(encodedDisplayName);
- builder.append(VCARD_END_OF_LINE);
+ builder.append(Constants.PROPERTY_FN);
+
+ // Note: "CHARSET" param is not allowed in vCard 3.0, but we may add it
+ // when it would be useful for external importers, assuming no external
+ // importer allows this vioration.
+ if (shouldAppendCharsetParameter(displayName)) {
+ builder.append(VCARD_PARAM_SEPARATOR);
+ builder.append(mVCardCharsetParameter);
}
+ builder.append(VCARD_DATA_SEPARATOR);
+ builder.append(encodedDisplayName);
+ builder.append(VCARD_END_OF_LINE);
} else if (mIsV30) {
// vCard 3.0 specification requires these fields.
appendVCardLine(builder, Constants.PROPERTY_N, "");
@@ -913,15 +922,12 @@ public class VCardComposer {
.constructNameFromElements(mVCardType,
phoneticFamilyName, phoneticMiddleName, phoneticGivenName);
builder.append(Constants.PROPERTY_SORT_STRING);
-
- // Do not need to care about QP, since vCard 3.0 does not allow it.
- final String encodedSortString = escapeCharacters(sortString);
- if (shouldAppendCharsetParameter(encodedSortString)) {
+ if (shouldAppendCharsetParameter(sortString)) {
builder.append(VCARD_PARAM_SEPARATOR);
builder.append(mVCardCharsetParameter);
}
builder.append(VCARD_DATA_SEPARATOR);
- builder.append(encodedSortString);
+ builder.append(escapeCharacters(sortString));
builder.append(VCARD_END_OF_LINE);
} else if (mIsJapaneseMobilePhone) {
// Note: There is no appropriate property for expressing
@@ -964,11 +970,31 @@ public class VCardComposer {
builder.append(mVCardCharsetParameter);
}
builder.append(VCARD_DATA_SEPARATOR);
- builder.append(encodedPhoneticFamilyName);
+ // DoCoMo's specification requires vCard composer to use just the first
+ // column.
+ {
+ boolean first = true;
+ if (!TextUtils.isEmpty(encodedPhoneticFamilyName)) {
+ builder.append(encodedPhoneticFamilyName);
+ first = false;
+ }
+ if (!TextUtils.isEmpty(encodedPhoneticMiddleName)) {
+ if (first) {
+ first = false;
+ } else {
+ builder.append(' ');
+ }
+ builder.append(encodedPhoneticMiddleName);
+ }
+ if (!TextUtils.isEmpty(encodedPhoneticGivenName)) {
+ if (!first) {
+ builder.append(' ');
+ }
+ builder.append(encodedPhoneticGivenName);
+ }
+ }
builder.append(VCARD_ITEM_SEPARATOR);
- builder.append(encodedPhoneticGivenName);
builder.append(VCARD_ITEM_SEPARATOR);
- builder.append(encodedPhoneticMiddleName);
builder.append(VCARD_ITEM_SEPARATOR);
builder.append(VCARD_ITEM_SEPARATOR);
builder.append(VCARD_END_OF_LINE);
@@ -988,7 +1014,8 @@ public class VCardComposer {
if (mUsesDefactProperty) {
if (!TextUtils.isEmpty(phoneticGivenName)) {
final boolean reallyUseQuotedPrintable =
- !VCardUtils.containsOnlyNonCrLfPrintableAscii(phoneticGivenName);
+ (mUsesQuotedPrintable &&
+ !VCardUtils.containsOnlyNonCrLfPrintableAscii(phoneticGivenName));
final String encodedPhoneticGivenName;
if (reallyUseQuotedPrintable) {
encodedPhoneticGivenName = encodeQuotedPrintable(phoneticGivenName);
@@ -996,7 +1023,7 @@ public class VCardComposer {
encodedPhoneticGivenName = escapeCharacters(phoneticGivenName);
}
builder.append(Constants.PROPERTY_X_PHONETIC_FIRST_NAME);
- if (shouldAppendCharsetParameter(encodedPhoneticGivenName)) {
+ if (shouldAppendCharsetParameter(phoneticGivenName)) {
builder.append(VCARD_PARAM_SEPARATOR);
builder.append(mVCardCharsetParameter);
}
@@ -1010,7 +1037,8 @@ public class VCardComposer {
}
if (!TextUtils.isEmpty(phoneticMiddleName)) {
final boolean reallyUseQuotedPrintable =
- !VCardUtils.containsOnlyNonCrLfPrintableAscii(phoneticMiddleName);
+ (mUsesQuotedPrintable &&
+ !VCardUtils.containsOnlyNonCrLfPrintableAscii(phoneticMiddleName));
final String encodedPhoneticMiddleName;
if (reallyUseQuotedPrintable) {
encodedPhoneticMiddleName = encodeQuotedPrintable(phoneticMiddleName);
@@ -1018,7 +1046,7 @@ public class VCardComposer {
encodedPhoneticMiddleName = escapeCharacters(phoneticMiddleName);
}
builder.append(Constants.PROPERTY_X_PHONETIC_MIDDLE_NAME);
- if (shouldAppendCharsetParameter(encodedPhoneticMiddleName)) {
+ if (shouldAppendCharsetParameter(phoneticMiddleName)) {
builder.append(VCARD_PARAM_SEPARATOR);
builder.append(mVCardCharsetParameter);
}
@@ -1032,7 +1060,8 @@ public class VCardComposer {
}
if (!TextUtils.isEmpty(phoneticFamilyName)) {
final boolean reallyUseQuotedPrintable =
- !VCardUtils.containsOnlyNonCrLfPrintableAscii(phoneticFamilyName);
+ (mUsesQuotedPrintable &&
+ !VCardUtils.containsOnlyNonCrLfPrintableAscii(phoneticFamilyName));
final String encodedPhoneticFamilyName;
if (reallyUseQuotedPrintable) {
encodedPhoneticFamilyName = encodeQuotedPrintable(phoneticFamilyName);
@@ -1040,7 +1069,7 @@ public class VCardComposer {
encodedPhoneticFamilyName = escapeCharacters(phoneticFamilyName);
}
builder.append(Constants.PROPERTY_X_PHONETIC_LAST_NAME);
- if (shouldAppendCharsetParameter(encodedPhoneticFamilyName)) {
+ if (shouldAppendCharsetParameter(phoneticFamilyName)) {
builder.append(VCARD_PARAM_SEPARATOR);
builder.append(mVCardCharsetParameter);
}
@@ -2255,8 +2284,7 @@ public class VCardComposer {
* to know this text is NOT UTF-8 but Shift_Jis.
*/
private boolean shouldAppendCharsetParameter(final String propertyValue) {
- return (!VCardUtils.containsOnlyPrintableAscii(propertyValue) &&
- (!mIsV30 || !mUsesUtf8));
+ return (!(mIsV30 && mUsesUtf8) && !VCardUtils.containsOnlyPrintableAscii(propertyValue));
}
private boolean shouldAppendCharsetParameters(final List<String> propertyValueList) {
@@ -2350,8 +2378,10 @@ public class VCardComposer {
appendVCardLine(builder, Constants.PROPERTY_FN, phoneName, needCharset, false);
appendVCardLine(builder, Constants.PROPERTY_N, phoneName, needCharset, false);
- String label = Integer.toString(phonetype);
- appendVCardTelephoneLine(builder, phonetype, label, phoneNumber, false);
+ if (!TextUtils.isEmpty(phoneNumber)) {
+ String label = Integer.toString(phonetype);
+ appendVCardTelephoneLine(builder, phonetype, label, phoneNumber, false);
+ }
appendVCardLine(builder, Constants.PROPERTY_END, VCARD_DATA_VCARD);
diff --git a/core/java/android/pim/vcard/VCardConfig.java b/core/java/android/pim/vcard/VCardConfig.java
index 545c09b..fff4c82 100644
--- a/core/java/android/pim/vcard/VCardConfig.java
+++ b/core/java/android/pim/vcard/VCardConfig.java
@@ -60,7 +60,8 @@ public class VCardConfig {
// 0x10 is reserved for safety
private static final int FLAG_CHARSET_UTF8 = 0;
- private static final int FLAG_CHARSET_SHIFT_JIS = 0x20;
+ private static final int FLAG_CHARSET_SHIFT_JIS = 0x100;
+ private static final int FLAG_CHARSET_MASK = 0xF00;
/**
* The flag indicating the vCard composer will add some "X-" properties used only in Android
@@ -349,8 +350,8 @@ public class VCardConfig {
sJapaneseMobileTypeSet.add(VCARD_TYPE_DOCOMO);
}
- public static int getVCardTypeFromString(String vcardTypeString) {
- String loweredKey = vcardTypeString.toLowerCase();
+ public static int getVCardTypeFromString(final String vcardTypeString) {
+ final String loweredKey = vcardTypeString.toLowerCase();
if (sVCardTypeMap.containsKey(loweredKey)) {
return sVCardTypeMap.get(loweredKey);
} else {
@@ -360,31 +361,31 @@ public class VCardConfig {
}
}
- public static boolean isV30(int vcardType) {
+ public static boolean isV30(final int vcardType) {
return ((vcardType & FLAG_V30) != 0);
}
- public static boolean usesQuotedPrintable(int vcardType) {
+ public static boolean usesQuotedPrintable(final int vcardType) {
return !isV30(vcardType);
}
- public static boolean usesUtf8(int vcardType) {
- return ((vcardType & FLAG_CHARSET_UTF8) != 0);
+ public static boolean usesUtf8(final int vcardType) {
+ return ((vcardType & FLAG_CHARSET_MASK) == FLAG_CHARSET_UTF8);
}
- public static boolean usesShiftJis(int vcardType) {
- return ((vcardType & FLAG_CHARSET_SHIFT_JIS) != 0);
+ public static boolean usesShiftJis(final int vcardType) {
+ return ((vcardType & FLAG_CHARSET_MASK) == FLAG_CHARSET_SHIFT_JIS);
}
-
- public static int getNameOrderType(int vcardType) {
+
+ public static int getNameOrderType(final int vcardType) {
return vcardType & NAME_ORDER_MASK;
}
- public static boolean usesAndroidSpecificProperty(int vcardType) {
+ public static boolean usesAndroidSpecificProperty(final int vcardType) {
return ((vcardType & FLAG_USE_ANDROID_PROPERTY) != 0);
}
- public static boolean usesDefactProperty(int vcardType) {
+ public static boolean usesDefactProperty(final int vcardType) {
return ((vcardType & FLAG_USE_DEFACT_PROPERTY) != 0);
}
@@ -392,12 +393,12 @@ public class VCardConfig {
return (VCardConfig.LOG_LEVEL & VCardConfig.LOG_LEVEL_PERFORMANCE_MEASUREMENT) != 0;
}
- public static boolean refrainsQPToPrimaryProperties(int vcardType) {
+ public static boolean refrainsQPToPrimaryProperties(final int vcardType) {
return (!usesQuotedPrintable(vcardType) ||
((vcardType & FLAG_REFRAIN_QP_TO_PRIMARY_PROPERTIES) != 0));
}
- public static boolean appendTypeParamName(int vcardType) {
+ public static boolean appendTypeParamName(final int vcardType) {
return (isV30(vcardType) || ((vcardType & FLAG_APPEND_TYPE_PARAM) != 0));
}
@@ -405,19 +406,19 @@ public class VCardConfig {
* @return true if the device is Japanese and some Japanese convension is
* applied to creating "formatted" something like FORMATTED_ADDRESS.
*/
- public static boolean isJapaneseDevice(int vcardType) {
+ public static boolean isJapaneseDevice(final int vcardType) {
return sJapaneseMobileTypeSet.contains(vcardType);
}
- public static boolean needsToConvertPhoneticString(int vcardType) {
+ public static boolean needsToConvertPhoneticString(final int vcardType) {
return ((vcardType & FLAG_CONVERT_PHONETIC_NAME_STRINGS) != 0);
}
- public static boolean onlyOneNoteFieldIsAvailable(int vcardType) {
+ public static boolean onlyOneNoteFieldIsAvailable(final int vcardType) {
return vcardType == VCARD_TYPE_DOCOMO;
}
- public static boolean isDoCoMo(int vcardType) {
+ public static boolean isDoCoMo(final int vcardType) {
return ((vcardType & FLAG_DOCOMO) != 0);
}
diff --git a/core/java/android/pim/vcard/VCardUtils.java b/core/java/android/pim/vcard/VCardUtils.java
index 9e5dbb5..00679bd 100644
--- a/core/java/android/pim/vcard/VCardUtils.java
+++ b/core/java/android/pim/vcard/VCardUtils.java
@@ -23,6 +23,7 @@ import android.provider.ContactsContract.CommonDataKinds.Phone;
import android.provider.ContactsContract.CommonDataKinds.StructuredPostal;
import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
+import android.util.Log;
import java.util.ArrayList;
import java.util.Collection;
@@ -181,26 +182,36 @@ public class VCardUtils {
sPhoneTypesSetUnknownToContacts.contains(phoneType));
}
- public static String[] sortNameElements(int vcardType,
- String familyName, String middleName, String givenName) {
- String[] list = new String[3];
- switch (VCardConfig.getNameOrderType(vcardType)) {
- case VCardConfig.NAME_ORDER_JAPANESE:
- // TODO: Should handle Ascii case?
- list[0] = familyName;
- list[1] = middleName;
- list[2] = givenName;
- break;
- case VCardConfig.NAME_ORDER_EUROPE:
- list[0] = middleName;
- list[1] = givenName;
- list[2] = familyName;
- break;
- default:
- list[0] = givenName;
- list[1] = middleName;
- list[2] = familyName;
- break;
+ public static String[] sortNameElements(final int vcardType,
+ final String familyName, final String middleName, final String givenName) {
+ final String[] list = new String[3];
+ final int nameOrderType = VCardConfig.getNameOrderType(vcardType);
+ switch (nameOrderType) {
+ case VCardConfig.NAME_ORDER_JAPANESE: {
+ if (containsOnlyPrintableAscii(familyName) &&
+ containsOnlyPrintableAscii(givenName)) {
+ list[0] = givenName;
+ list[1] = middleName;
+ list[2] = familyName;
+ } else {
+ list[0] = familyName;
+ list[1] = middleName;
+ list[2] = givenName;
+ }
+ break;
+ }
+ case VCardConfig.NAME_ORDER_EUROPE: {
+ list[0] = middleName;
+ list[1] = givenName;
+ list[2] = familyName;
+ break;
+ }
+ default: {
+ list[0] = givenName;
+ list[1] = middleName;
+ list[2] = familyName;
+ break;
+ }
}
return list;
}
@@ -302,24 +313,23 @@ public class VCardUtils {
return dataArray;
}
- public static String constructNameFromElements(int nameOrderType,
- String familyName, String middleName, String givenName) {
- return constructNameFromElements(nameOrderType, familyName, middleName, givenName,
+ public static String constructNameFromElements(final int vcardType,
+ final String familyName, final String middleName, final String givenName) {
+ return constructNameFromElements(vcardType, familyName, middleName, givenName,
null, null);
}
- public static String constructNameFromElements(int nameOrderType,
- String familyName, String middleName, String givenName,
- String prefix, String suffix) {
- StringBuilder builder = new StringBuilder();
- String[] nameList = sortNameElements(nameOrderType,
- familyName, middleName, givenName);
+ public static String constructNameFromElements(final int vcardType,
+ final String familyName, final String middleName, final String givenName,
+ final String prefix, final String suffix) {
+ final StringBuilder builder = new StringBuilder();
+ final String[] nameList = sortNameElements(vcardType, familyName, middleName, givenName);
boolean first = true;
if (!TextUtils.isEmpty(prefix)) {
first = false;
builder.append(prefix);
}
- for (String namePart : nameList) {
+ for (final String namePart : nameList) {
if (!TextUtils.isEmpty(namePart)) {
if (first) {
first = false;
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index af709ac..819f3a0 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -3711,6 +3711,19 @@ public final class Settings {
"dropbox:";
/**
+ * The length of time in milli-seconds that automatic small adjustments to
+ * SystemClock are ignored if NITZ_UPDATE_DIFF is not exceeded.
+ */
+ public static final String NITZ_UPDATE_SPACING = "nitz_update_spacing";
+
+ /**
+ * If the NITZ_UPDATE_DIFF time is exceeded then an automatic adjustment
+ * to SystemClock will be allowed even if NITZ_UPDATE_SPACING has not been
+ * exceeded.
+ */
+ public static final String NITZ_UPDATE_DIFF = "nitz_update_diff";
+
+ /**
* @deprecated
* @hide
*/
diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java
index 75d0f31..ce985e3 100644
--- a/core/java/android/widget/AutoCompleteTextView.java
+++ b/core/java/android/widget/AutoCompleteTextView.java
@@ -1027,7 +1027,6 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
@Override
public void onWindowFocusChanged(boolean hasWindowFocus) {
super.onWindowFocusChanged(hasWindowFocus);
- performValidation();
if (!hasWindowFocus && !mDropDownAlwaysVisible) {
dismissDropDown();
}
@@ -1036,7 +1035,10 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
@Override
protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
super.onFocusChanged(focused, direction, previouslyFocusedRect);
- performValidation();
+ // Perform validation if the view is losing focus.
+ if (!focused) {
+ performValidation();
+ }
if (!focused && !mDropDownAlwaysVisible) {
dismissDropDown();
}
diff --git a/core/java/com/android/internal/os/IDropBoxService.aidl b/core/java/com/android/internal/os/IDropBoxManagerService.aidl
index f940041..d067926 100644
--- a/core/java/com/android/internal/os/IDropBoxService.aidl
+++ b/core/java/com/android/internal/os/IDropBoxManagerService.aidl
@@ -16,27 +16,27 @@
package com.android.internal.os;
-import android.os.DropBox;
+import android.os.DropBoxManager;
import android.os.ParcelFileDescriptor;
/**
- * "Backend" interface used by {@link android.os.DropBox} to talk to the
- * DropBoxService that actually implements the drop box functionality.
+ * "Backend" interface used by {@link android.os.DropBoxManager} to talk to the
+ * DropBoxManagerService that actually implements the drop box functionality.
*
- * @see DropBox
+ * @see DropBoxManager
* @hide
*/
-interface IDropBoxService {
+interface IDropBoxManagerService {
/**
- * @see DropBox#addText
- * @see DropBox#addData
- * @see DropBox#addFile
+ * @see DropBoxManager#addText
+ * @see DropBoxManager#addData
+ * @see DropBoxManager#addFile
*/
- void add(in DropBox.Entry entry);
+ void add(in DropBoxManager.Entry entry);
- /** @see DropBox#getNextEntry */
+ /** @see DropBoxManager#getNextEntry */
boolean isTagEnabled(String tag);
- /** @see DropBox#getNextEntry */
- DropBox.Entry getNextEntry(String tag, long millis);
+ /** @see DropBoxManager#getNextEntry */
+ DropBoxManager.Entry getNextEntry(String tag, long millis);
}
diff --git a/core/java/com/android/internal/widget/DigitalClock.java b/core/java/com/android/internal/widget/DigitalClock.java
new file mode 100644
index 0000000..ca71722
--- /dev/null
+++ b/core/java/com/android/internal/widget/DigitalClock.java
@@ -0,0 +1,186 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.widget;
+
+import com.android.internal.R;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.res.Resources;
+import android.database.ContentObserver;
+import android.graphics.Typeface;
+import android.os.Handler;
+import android.provider.Settings;
+import android.text.format.DateFormat;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import java.text.DateFormatSymbols;
+import java.util.Calendar;
+
+/**
+ * Displays the time
+ */
+public class DigitalClock extends LinearLayout {
+
+ private final static String M12 = "h:mm";
+ private final static String M24 = "kk:mm";
+
+ private Calendar mCalendar;
+ private String mFormat;
+ private TextView mTimeDisplay;
+ private AmPm mAmPm;
+ private ContentObserver mFormatChangeObserver;
+ private boolean mLive = true;
+ private boolean mAttached;
+
+ /* called by system on minute ticks */
+ private final Handler mHandler = new Handler();
+ private final BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ if (mLive && intent.getAction().equals(
+ Intent.ACTION_TIMEZONE_CHANGED)) {
+ mCalendar = Calendar.getInstance();
+ }
+ updateTime();
+ }
+ };
+
+ static class AmPm {
+ private TextView mAmPm;
+ private String mAmString, mPmString;
+
+ AmPm(View parent, Typeface tf) {
+ mAmPm = (TextView) parent.findViewById(R.id.am_pm);
+ if (tf != null) {
+ mAmPm.setTypeface(tf);
+ }
+
+ String[] ampm = new DateFormatSymbols().getAmPmStrings();
+ mAmString = ampm[0];
+ mPmString = ampm[1];
+ }
+
+ void setShowAmPm(boolean show) {
+ mAmPm.setVisibility(show ? View.VISIBLE : View.GONE);
+ }
+
+ void setIsMorning(boolean isMorning) {
+ mAmPm.setText(isMorning ? mAmString : mPmString);
+ }
+ }
+
+ private class FormatChangeObserver extends ContentObserver {
+ public FormatChangeObserver() {
+ super(new Handler());
+ }
+ @Override
+ public void onChange(boolean selfChange) {
+ setDateFormat();
+ updateTime();
+ }
+ }
+
+ public DigitalClock(Context context) {
+ this(context, null);
+ }
+
+ public DigitalClock(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ @Override
+ protected void onFinishInflate() {
+ super.onFinishInflate();
+
+ mTimeDisplay = (TextView) findViewById(R.id.timeDisplay);
+ mTimeDisplay.setTypeface(Typeface.createFromFile("/system/fonts/Clockopia.ttf"));
+ mAmPm = new AmPm(this, Typeface.createFromFile("/system/fonts/DroidSans-Bold.ttf"));
+ mCalendar = Calendar.getInstance();
+
+ setDateFormat();
+ }
+
+ @Override
+ protected void onAttachedToWindow() {
+ super.onAttachedToWindow();
+
+ if (mAttached) return;
+ mAttached = true;
+
+ if (mLive) {
+ /* monitor time ticks, time changed, timezone */
+ IntentFilter filter = new IntentFilter();
+ filter.addAction(Intent.ACTION_TIME_TICK);
+ filter.addAction(Intent.ACTION_TIME_CHANGED);
+ filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
+ mContext.registerReceiver(mIntentReceiver, filter, null, mHandler);
+ }
+
+ /* monitor 12/24-hour display preference */
+ mFormatChangeObserver = new FormatChangeObserver();
+ mContext.getContentResolver().registerContentObserver(
+ Settings.System.CONTENT_URI, true, mFormatChangeObserver);
+
+ updateTime();
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+
+ if (!mAttached) return;
+ mAttached = false;
+
+ if (mLive) {
+ mContext.unregisterReceiver(mIntentReceiver);
+ }
+ mContext.getContentResolver().unregisterContentObserver(
+ mFormatChangeObserver);
+ }
+
+
+ void updateTime(Calendar c) {
+ mCalendar = c;
+ updateTime();
+ }
+
+ private void updateTime() {
+ if (mLive) {
+ mCalendar.setTimeInMillis(System.currentTimeMillis());
+ }
+
+ CharSequence newTime = DateFormat.format(mFormat, mCalendar);
+ mTimeDisplay.setText(newTime);
+ mAmPm.setIsMorning(mCalendar.get(Calendar.AM_PM) == 0);
+ }
+
+ private void setDateFormat() {
+ mFormat = android.text.format.DateFormat.is24HourFormat(getContext())
+ ? M24 : M12;
+ mAmPm.setShowAmPm(mFormat.equals(M12));
+ }
+
+ void setLive(boolean live) {
+ mLive = live;
+ }
+}
diff --git a/core/java/com/android/internal/widget/SlidingTab.java b/core/java/com/android/internal/widget/SlidingTab.java
index dfd4f40..6ea6460 100644
--- a/core/java/com/android/internal/widget/SlidingTab.java
+++ b/core/java/com/android/internal/widget/SlidingTab.java
@@ -37,8 +37,11 @@ import com.android.internal.R;
/**
* A special widget containing two Sliders and a threshold for each. Moving either slider beyond
- * the threshold will cause the registered OnTriggerListener.onTrigger() to be called with
- * {@link OnTriggerListener#LEFT_HANDLE} or {@link OnTriggerListener#RIGHT_HANDLE} to be called.
+ * the threshold will cause the registered OnTriggerListener.onTrigger() to be called with
+ * whichHandle being {@link OnTriggerListener#LEFT_HANDLE} or {@link OnTriggerListener#RIGHT_HANDLE}
+ * Equivalently, selecting a tab will result in a call to
+ * {@link OnTriggerListener#onGrabbedStateChange(View, int)} with one of these two states. Releasing
+ * the tab will result in whichHandle being {@link OnTriggerListener#NO_HANDLE}.
*
*/
public class SlidingTab extends ViewGroup {
@@ -50,7 +53,7 @@ public class SlidingTab extends ViewGroup {
private static final int MSG_ANIMATE = 100;
// TODO: Make these configurable
- private static final float TARGET_ZONE = 2.0f / 3.0f;
+ private static final float THRESHOLD = 2.0f / 3.0f;
private static final long VIBRATE_SHORT = 30;
private static final long VIBRATE_LONG = 40;
@@ -71,35 +74,35 @@ public class SlidingTab extends ViewGroup {
private Slider mRightSlider;
private Slider mCurrentSlider;
private boolean mTracking;
- private float mTargetZone;
+ private float mThreshold;
private Slider mOtherSlider;
private boolean mAnimating;
/**
* Interface definition for a callback to be invoked when a tab is triggered
- * by moving it beyond a target zone.
+ * by moving it beyond a threshold.
*/
public interface OnTriggerListener {
/**
* The interface was triggered because the user let go of the handle without reaching the
- * target zone.
+ * threshold.
*/
public static final int NO_HANDLE = 0;
/**
* The interface was triggered because the user grabbed the left handle and moved it past
- * the target zone.
+ * the threshold.
*/
public static final int LEFT_HANDLE = 1;
/**
* The interface was triggered because the user grabbed the right handle and moved it past
- * the target zone.
+ * the threshold.
*/
public static final int RIGHT_HANDLE = 2;
/**
- * Called when the user moves a handle beyond the target zone.
+ * Called when the user moves a handle beyond the threshold.
*
* @param v The view that was triggered.
* @param whichHandle Which "dial handle" the user grabbed,
@@ -146,6 +149,7 @@ public class SlidingTab extends ViewGroup {
private final ImageView tab;
private final TextView text;
private final ImageView target;
+ private int currentState = STATE_NORMAL;
/**
* Constructor
@@ -223,6 +227,7 @@ public class SlidingTab extends ViewGroup {
} else {
text.setTextAppearance(text.getContext(), R.style.TextAppearance_SlidingTabNormal);
}
+ currentState = state;
}
void showTarget() {
@@ -260,8 +265,8 @@ public class SlidingTab extends ViewGroup {
final int parentWidth = r - l;
final int parentHeight = b - t;
- final int leftTarget = (int) (TARGET_ZONE * parentWidth) - targetWidth + handleWidth / 2;
- final int rightTarget = (int) ((1.0f - TARGET_ZONE) * parentWidth) - handleWidth / 2;
+ final int leftTarget = (int) (THRESHOLD * parentWidth) - targetWidth + handleWidth / 2;
+ final int rightTarget = (int) ((1.0f - THRESHOLD) * parentWidth) - handleWidth / 2;
final int left = (parentWidth - handleWidth) / 2;
final int right = left + handleWidth;
@@ -286,8 +291,8 @@ public class SlidingTab extends ViewGroup {
// vertical
final int targetLeft = (parentWidth - targetWidth) / 2;
final int targetRight = (parentWidth + targetWidth) / 2;
- final int top = (int) (TARGET_ZONE * parentHeight) + handleHeight / 2 - targetHeight;
- final int bottom = (int) ((1.0f - TARGET_ZONE) * parentHeight) - handleHeight / 2;
+ final int top = (int) (THRESHOLD * parentHeight) + handleHeight / 2 - targetHeight;
+ final int bottom = (int) ((1.0f - THRESHOLD) * parentHeight) - handleHeight / 2;
if (alignment == ALIGN_TOP) {
tab.layout(left, 0, right, handleHeight);
text.layout(left, 0 - parentHeight, right, 0);
@@ -300,12 +305,34 @@ public class SlidingTab extends ViewGroup {
}
}
+ public void updateDrawableStates() {
+ setState(currentState);
+ }
+
+ /**
+ * Ensure all the dependent widgets are measured.
+ */
+ public void measure() {
+ tab.measure(View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED),
+ View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED));
+ text.measure(View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED),
+ View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED));
+ }
+
+ /**
+ * Get the measured tab width. Must be called after {@link Slider#measure()}.
+ * @return
+ */
public int getTabWidth() {
- return tab.getDrawable().getIntrinsicWidth();
+ return tab.getMeasuredWidth();
}
+ /**
+ * Get the measured tab width. Must be called after {@link Slider#measure()}.
+ * @return
+ */
public int getTabHeight() {
- return tab.getDrawable().getIntrinsicHeight();
+ return tab.getMeasuredHeight();
}
}
@@ -351,11 +378,12 @@ public class SlidingTab extends ViewGroup {
throw new RuntimeException(LOG_TAG + " cannot have UNSPECIFIED dimensions");
}
- final float density = mDensity;
- final int leftTabWidth = (int) (density * mLeftSlider.getTabWidth() + 0.5f);
- final int rightTabWidth = (int) (density * mRightSlider.getTabWidth() + 0.5f);
- final int leftTabHeight = (int) (density * mLeftSlider.getTabHeight() + 0.5f);
- final int rightTabHeight = (int) (density * mRightSlider.getTabHeight() + 0.5f);
+ mLeftSlider.measure();
+ mRightSlider.measure();
+ final int leftTabWidth = mLeftSlider.getTabWidth();
+ final int rightTabWidth = mRightSlider.getTabWidth();
+ final int leftTabHeight = mLeftSlider.getTabHeight();
+ final int rightTabHeight = mRightSlider.getTabHeight();
final int width;
final int height;
if (isHorizontal()) {
@@ -400,12 +428,12 @@ public class SlidingTab extends ViewGroup {
if (leftHit) {
mCurrentSlider = mLeftSlider;
mOtherSlider = mRightSlider;
- mTargetZone = isHorizontal() ? TARGET_ZONE : 1.0f - TARGET_ZONE;
+ mThreshold = isHorizontal() ? THRESHOLD : 1.0f - THRESHOLD;
setGrabbedState(OnTriggerListener.LEFT_HANDLE);
} else {
mCurrentSlider = mRightSlider;
mOtherSlider = mLeftSlider;
- mTargetZone = isHorizontal() ? 1.0f - TARGET_ZONE : TARGET_ZONE;
+ mThreshold = isHorizontal() ? 1.0f - THRESHOLD : THRESHOLD;
setGrabbedState(OnTriggerListener.RIGHT_HANDLE);
}
mCurrentSlider.setState(Slider.STATE_PRESSED);
@@ -429,16 +457,16 @@ public class SlidingTab extends ViewGroup {
case MotionEvent.ACTION_MOVE:
moveHandle(x, y);
float position = isHorizontal() ? x : y;
- float target = mTargetZone * (isHorizontal() ? getWidth() : getHeight());
- boolean targetZoneReached;
+ float target = mThreshold * (isHorizontal() ? getWidth() : getHeight());
+ boolean thresholdReached;
if (isHorizontal()) {
- targetZoneReached = mCurrentSlider == mLeftSlider ?
+ thresholdReached = mCurrentSlider == mLeftSlider ?
position > target : position < target;
} else {
- targetZoneReached = mCurrentSlider == mLeftSlider ?
+ thresholdReached = mCurrentSlider == mLeftSlider ?
position < target : position > target;
}
- if (!mTriggered && targetZoneReached) {
+ if (!mTriggered && thresholdReached) {
mTriggered = true;
mTracking = false;
mCurrentSlider.setState(Slider.STATE_ACTIVE);
@@ -527,6 +555,7 @@ public class SlidingTab extends ViewGroup {
mLeftSlider.setTarget(targetId);
mLeftSlider.setBarBackgroundResource(barId);
mLeftSlider.setTabBackgroundResource(tabId);
+ mLeftSlider.updateDrawableStates();
}
/**
@@ -554,6 +583,7 @@ public class SlidingTab extends ViewGroup {
mRightSlider.setTarget(targetId);
mRightSlider.setBarBackgroundResource(barId);
mRightSlider.setTabBackgroundResource(tabId);
+ mRightSlider.updateDrawableStates();
}
/**
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 1c3cf3c..22716b8 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -515,7 +515,7 @@
<!-- Allows an application to modify the Google service map. -->
<permission android:name="android.permission.WRITE_GSERVICES"
- android:protectionLevel="signature"
+ android:protectionLevel="signatureOrSystem"
android:label="@string/permlab_writeGservices"
android:description="@string/permdesc_writeGservices" />
diff --git a/core/res/res/drawable-hdpi/blank_tile.png b/core/res/res/drawable-hdpi/blank_tile.png
index e2a386c..63b9296 100644
--- a/core/res/res/drawable-hdpi/blank_tile.png
+++ b/core/res/res/drawable-hdpi/blank_tile.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_jog_dial_answer.png b/core/res/res/drawable-hdpi/ic_jog_dial_answer.png
new file mode 100644
index 0000000..ca0a825
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_jog_dial_answer.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_jog_dial_answer_and_end.png b/core/res/res/drawable-hdpi/ic_jog_dial_answer_and_end.png
new file mode 100644
index 0000000..82237bd
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_jog_dial_answer_and_end.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_jog_dial_answer_and_hold.png b/core/res/res/drawable-hdpi/ic_jog_dial_answer_and_hold.png
new file mode 100644
index 0000000..4946ada
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_jog_dial_answer_and_hold.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_jog_dial_decline.png b/core/res/res/drawable-hdpi/ic_jog_dial_decline.png
new file mode 100644
index 0000000..006a6e4
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_jog_dial_decline.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_confirm_gray.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_confirm_gray.9.png
deleted file mode 100644
index 92db44f..0000000
--- a/core/res/res/drawable-hdpi/jog_tab_bar_confirm_gray.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_confirm_green.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_confirm_green.9.png
deleted file mode 100644
index 0bed1a0..0000000
--- a/core/res/res/drawable-hdpi/jog_tab_bar_confirm_green.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_confirm_red.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_confirm_red.9.png
deleted file mode 100644
index 81fbe5a..0000000
--- a/core/res/res/drawable-hdpi/jog_tab_bar_confirm_red.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_confirm_yellow.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_confirm_yellow.9.png
deleted file mode 100644
index d9c33fb..0000000
--- a/core/res/res/drawable-hdpi/jog_tab_bar_confirm_yellow.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_gray.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_gray.9.png
new file mode 100644
index 0000000..53ed136
--- /dev/null
+++ b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_gray.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_green.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_green.9.png
new file mode 100644
index 0000000..6455790
--- /dev/null
+++ b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_green.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_red.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_red.9.png
new file mode 100644
index 0000000..49bb9c1
--- /dev/null
+++ b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_red.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_yellow.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_yellow.9.png
new file mode 100644
index 0000000..b3c4c4c
--- /dev/null
+++ b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_yellow.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_left_end_normal.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_normal.9.png
new file mode 100644
index 0000000..00dea6ec
--- /dev/null
+++ b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_left_end_pressed.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_pressed.9.png
new file mode 100644
index 0000000..45b1850
--- /dev/null
+++ b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_normal.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_normal.9.png
deleted file mode 100644
index 1cf7f1c..0000000
--- a/core/res/res/drawable-hdpi/jog_tab_bar_normal.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_pressed.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_pressed.9.png
deleted file mode 100644
index c7b367e..0000000
--- a/core/res/res/drawable-hdpi/jog_tab_bar_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_gray.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_gray.9.png
new file mode 100644
index 0000000..35b3529
--- /dev/null
+++ b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_gray.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_green.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_green.9.png
new file mode 100644
index 0000000..720de7f
--- /dev/null
+++ b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_green.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_red.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_red.9.png
new file mode 100644
index 0000000..b3387be
--- /dev/null
+++ b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_red.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_yellow.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_yellow.9.png
new file mode 100644
index 0000000..7ddfbcc
--- /dev/null
+++ b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_yellow.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_right_end_normal.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_normal.9.png
new file mode 100644
index 0000000..1855e5f
--- /dev/null
+++ b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_right_end_pressed.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_pressed.9.png
new file mode 100644
index 0000000..844f304
--- /dev/null
+++ b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/loading_tile.png b/core/res/res/drawable-hdpi/loading_tile.png
index 691ca45..f5a80c9 100644
--- a/core/res/res/drawable-hdpi/loading_tile.png
+++ b/core/res/res/drawable-hdpi/loading_tile.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/no_tile_128.png b/core/res/res/drawable-hdpi/no_tile_128.png
index 86b998d..a9b007d 100644
--- a/core/res/res/drawable-hdpi/no_tile_128.png
+++ b/core/res/res/drawable-hdpi/no_tile_128.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_gray.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_gray.9.png
deleted file mode 100644
index c0f7706..0000000
--- a/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_gray.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_green.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_green.9.png
deleted file mode 100644
index 0f2ce13..0000000
--- a/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_green.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_red.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_red.9.png
deleted file mode 100644
index a34eb7d..0000000
--- a/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_red.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_yellow.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_yellow.9.png
deleted file mode 100644
index e143356..0000000
--- a/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_yellow.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_gray.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_gray.9.png
new file mode 100644
index 0000000..76f76bc
--- /dev/null
+++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_gray.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_green.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_green.9.png
new file mode 100644
index 0000000..d070fad
--- /dev/null
+++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_green.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_red.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_red.9.png
new file mode 100644
index 0000000..8d38ea6
--- /dev/null
+++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_red.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_yellow.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_yellow.9.png
new file mode 100644
index 0000000..2da4677
--- /dev/null
+++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_yellow.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_normal.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_normal.9.png
new file mode 100644
index 0000000..a181652
--- /dev/null
+++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_pressed.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_pressed.9.png
new file mode 100644
index 0000000..6cf3131
--- /dev/null
+++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_normal.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_normal.9.png
deleted file mode 100644
index b5837f7..0000000
--- a/core/res/res/drawable-land-hdpi/jog_tab_bar_normal.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_pressed.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_pressed.9.png
deleted file mode 100644
index 79ad83d..0000000
--- a/core/res/res/drawable-land-hdpi/jog_tab_bar_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_gray.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_gray.9.png
new file mode 100644
index 0000000..05541f3
--- /dev/null
+++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_gray.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_green.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_green.9.png
new file mode 100644
index 0000000..0bf0ea9
--- /dev/null
+++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_green.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_red.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_red.9.png
new file mode 100644
index 0000000..b82a30f
--- /dev/null
+++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_red.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_yellow.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_yellow.9.png
new file mode 100644
index 0000000..5f530fa
--- /dev/null
+++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_yellow.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_normal.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_normal.9.png
new file mode 100644
index 0000000..d8bbd17
--- /dev/null
+++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_pressed.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_pressed.9.png
new file mode 100644
index 0000000..c408087
--- /dev/null
+++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_gray.png b/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_gray.png
index 9c63b22..dff38b4 100644
--- a/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_gray.png
+++ b/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_gray.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_green.png b/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_green.png
index 4f9877c..88a95be 100644
--- a/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_green.png
+++ b/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_green.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_red.png b/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_red.png
index bdce97d..b9486ea 100644
--- a/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_red.png
+++ b/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_red.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_yellow.png b/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_yellow.png
index 327fc2c..9144d7a 100644
--- a/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_yellow.png
+++ b/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_yellow.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_left_normal.png b/core/res/res/drawable-land-hdpi/jog_tab_left_normal.png
index e69d91c..b2d7695 100644
--- a/core/res/res/drawable-land-hdpi/jog_tab_left_normal.png
+++ b/core/res/res/drawable-land-hdpi/jog_tab_left_normal.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_left_pressed.png b/core/res/res/drawable-land-hdpi/jog_tab_left_pressed.png
index b6153d8..55e170d 100644
--- a/core/res/res/drawable-land-hdpi/jog_tab_left_pressed.png
+++ b/core/res/res/drawable-land-hdpi/jog_tab_left_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_gray.png b/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_gray.png
index 6e3e00b..131b720 100644
--- a/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_gray.png
+++ b/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_gray.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_green.png b/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_green.png
index dae9efc..c36b0ad 100644
--- a/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_green.png
+++ b/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_green.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_red.png b/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_red.png
index 9de3158..d388619 100644
--- a/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_red.png
+++ b/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_red.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_yellow.png b/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_yellow.png
index 8c9f180..24f1aec 100644
--- a/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_yellow.png
+++ b/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_yellow.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_right_normal.png b/core/res/res/drawable-land-hdpi/jog_tab_right_normal.png
index 0c4faf2..9111649 100644
--- a/core/res/res/drawable-land-hdpi/jog_tab_right_normal.png
+++ b/core/res/res/drawable-land-hdpi/jog_tab_right_normal.png
Binary files differ
diff --git a/core/res/res/drawable-land-hdpi/jog_tab_right_pressed.png b/core/res/res/drawable-land-hdpi/jog_tab_right_pressed.png
index 4ec7b56..3bd2e5b 100644
--- a/core/res/res/drawable-land-hdpi/jog_tab_right_pressed.png
+++ b/core/res/res/drawable-land-hdpi/jog_tab_right_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_gray.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_gray.9.png
new file mode 100644
index 0000000..61222f4
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_gray.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_green.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_green.9.png
new file mode 100644
index 0000000..3060f72
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_green.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_red.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_red.9.png
new file mode 100644
index 0000000..cee7bf5
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_red.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_yellow.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_yellow.9.png
new file mode 100644
index 0000000..4bd56d1
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_yellow.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_normal.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_normal.9.png
new file mode 100644
index 0000000..367e887
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_pressed.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_pressed.9.png
new file mode 100644
index 0000000..02f3f27
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_gray.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_gray.9.png
new file mode 100644
index 0000000..bfaba2f
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_gray.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_green.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_green.9.png
new file mode 100644
index 0000000..d35fe7b
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_green.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_red.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_red.9.png
new file mode 100644
index 0000000..508f6bd
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_red.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_yellow.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_yellow.9.png
new file mode 100644
index 0000000..a6041e5
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_yellow.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_normal.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_normal.9.png
new file mode 100644
index 0000000..28cdd0b
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_pressed.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_pressed.9.png
new file mode 100644
index 0000000..46ba76b
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_gray.png b/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_gray.png
new file mode 100644
index 0000000..396dcf7
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_gray.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_green.png b/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_green.png
new file mode 100644
index 0000000..d928310
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_green.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_red.png b/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_red.png
new file mode 100644
index 0000000..c377463
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_red.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_yellow.png b/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_yellow.png
new file mode 100644
index 0000000..b868c76
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_yellow.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_left_normal.png b/core/res/res/drawable-land-mdpi/jog_tab_left_normal.png
new file mode 100644
index 0000000..5ca876b
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_left_normal.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_left_pressed.png b/core/res/res/drawable-land-mdpi/jog_tab_left_pressed.png
new file mode 100644
index 0000000..8c33a78
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_left_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_gray.png b/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_gray.png
new file mode 100644
index 0000000..4f1a002
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_gray.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_green.png b/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_green.png
new file mode 100644
index 0000000..af1550f
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_green.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_red.png b/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_red.png
new file mode 100644
index 0000000..b458d27
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_red.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_yellow.png b/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_yellow.png
new file mode 100644
index 0000000..8e55d6a
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_yellow.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_right_normal.png b/core/res/res/drawable-land-mdpi/jog_tab_right_normal.png
new file mode 100644
index 0000000..c607c7c
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_right_normal.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_right_pressed.png b/core/res/res/drawable-land-mdpi/jog_tab_right_pressed.png
new file mode 100644
index 0000000..2537d73
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_right_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_jog_dial_answer.png b/core/res/res/drawable-mdpi/ic_jog_dial_answer.png
new file mode 100644
index 0000000..e2bc483
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_jog_dial_answer.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_jog_dial_answer_and_end.png b/core/res/res/drawable-mdpi/ic_jog_dial_answer_and_end.png
new file mode 100644
index 0000000..aa0fab2
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_jog_dial_answer_and_end.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_jog_dial_answer_and_hold.png b/core/res/res/drawable-mdpi/ic_jog_dial_answer_and_hold.png
new file mode 100644
index 0000000..9effe37
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_jog_dial_answer_and_hold.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_jog_dial_decline.png b/core/res/res/drawable-mdpi/ic_jog_dial_decline.png
new file mode 100644
index 0000000..81c76b5
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_jog_dial_decline.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_gray.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_gray.9.png
new file mode 100644
index 0000000..adbb146
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_gray.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_green.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_green.9.png
new file mode 100644
index 0000000..e8be7bf
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_green.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_red.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_red.9.png
new file mode 100644
index 0000000..120a9d8
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_red.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_yellow.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_yellow.9.png
new file mode 100644
index 0000000..60ec146
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_yellow.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_normal.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_normal.9.png
new file mode 100644
index 0000000..7477453
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_pressed.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_pressed.9.png
new file mode 100644
index 0000000..c79a35c
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_gray.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_gray.9.png
new file mode 100644
index 0000000..4ce09fa
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_gray.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_green.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_green.9.png
new file mode 100644
index 0000000..9d7565f
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_green.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_red.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_red.9.png
new file mode 100644
index 0000000..d5f9bd8
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_red.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_yellow.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_yellow.9.png
new file mode 100644
index 0000000..5b9c5b4
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_yellow.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_right_end_normal.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_normal.9.png
new file mode 100644
index 0000000..2e6ca2e
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_right_end_pressed.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_pressed.9.png
new file mode 100644
index 0000000..f41750d
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_left_confirm_gray.png b/core/res/res/drawable-mdpi/jog_tab_left_confirm_gray.png
new file mode 100644
index 0000000..e8544ff
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_left_confirm_gray.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_left_confirm_green.png b/core/res/res/drawable-mdpi/jog_tab_left_confirm_green.png
new file mode 100644
index 0000000..d0ba8f8
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_left_confirm_green.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_left_confirm_red.png b/core/res/res/drawable-mdpi/jog_tab_left_confirm_red.png
new file mode 100644
index 0000000..5188c86
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_left_confirm_red.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_left_confirm_yellow.png b/core/res/res/drawable-mdpi/jog_tab_left_confirm_yellow.png
new file mode 100644
index 0000000..861e17a
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_left_confirm_yellow.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_left_normal.png b/core/res/res/drawable-mdpi/jog_tab_left_normal.png
new file mode 100644
index 0000000..7af1b85
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_left_normal.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_left_pressed.png b/core/res/res/drawable-mdpi/jog_tab_left_pressed.png
new file mode 100644
index 0000000..b76e83e
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_left_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_right_confirm_gray.png b/core/res/res/drawable-mdpi/jog_tab_right_confirm_gray.png
new file mode 100644
index 0000000..814a50d
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_right_confirm_gray.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_right_confirm_green.png b/core/res/res/drawable-mdpi/jog_tab_right_confirm_green.png
new file mode 100644
index 0000000..cf157fc
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_right_confirm_green.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_right_confirm_red.png b/core/res/res/drawable-mdpi/jog_tab_right_confirm_red.png
new file mode 100644
index 0000000..74f2935
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_right_confirm_red.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_right_confirm_yellow.png b/core/res/res/drawable-mdpi/jog_tab_right_confirm_yellow.png
new file mode 100644
index 0000000..6655731
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_right_confirm_yellow.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_right_normal.png b/core/res/res/drawable-mdpi/jog_tab_right_normal.png
new file mode 100644
index 0000000..479c9a5
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_right_normal.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_right_pressed.png b/core/res/res/drawable-mdpi/jog_tab_right_pressed.png
new file mode 100644
index 0000000..454aaf2
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_right_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_target_gray.png b/core/res/res/drawable-mdpi/jog_tab_target_gray.png
new file mode 100644
index 0000000..517b253
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_target_gray.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_target_green.png b/core/res/res/drawable-mdpi/jog_tab_target_green.png
new file mode 100644
index 0000000..188f3cc
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_target_green.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_target_red.png b/core/res/res/drawable-mdpi/jog_tab_target_red.png
new file mode 100644
index 0000000..a36394d
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_target_red.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/jog_tab_target_yellow.png b/core/res/res/drawable-mdpi/jog_tab_target_yellow.png
new file mode 100644
index 0000000..ba999b1
--- /dev/null
+++ b/core/res/res/drawable-mdpi/jog_tab_target_yellow.png
Binary files differ
diff --git a/core/res/res/drawable/jog_tab_bar_left_answer.xml b/core/res/res/drawable/jog_tab_bar_left_answer.xml
index b1d7c31..32ce3dc 100644
--- a/core/res/res/drawable/jog_tab_bar_left_answer.xml
+++ b/core/res/res/drawable/jog_tab_bar_left_answer.xml
@@ -17,12 +17,12 @@
<!-- StateListDrawable used for buttons in the in-call onscreen touch UI. -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
- android:drawable="@drawable/jog_tab_bar_pressed" />
+ android:drawable="@drawable/jog_tab_bar_left_end_pressed" />
<item android:state_enabled="true"
- android:drawable="@drawable/jog_tab_bar_normal" />
+ android:drawable="@drawable/jog_tab_bar_left_end_normal" />
<item android:state_active="true"
- android:drawable="@drawable/jog_tab_bar_confirm_green" />
+ android:drawable="@drawable/jog_tab_bar_left_end_confirm_green" />
</selector>
diff --git a/core/res/res/drawable/jog_tab_bar_left_generic.xml b/core/res/res/drawable/jog_tab_bar_left_generic.xml
index de1a42f..7e38193 100644
--- a/core/res/res/drawable/jog_tab_bar_left_generic.xml
+++ b/core/res/res/drawable/jog_tab_bar_left_generic.xml
@@ -17,12 +17,12 @@
<!-- StateListDrawable used for buttons in the in-call onscreen touch UI. -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
- android:drawable="@drawable/jog_tab_bar_pressed" />
+ android:drawable="@drawable/jog_tab_bar_left_end_pressed" />
<item android:state_enabled="true"
- android:drawable="@drawable/jog_tab_bar_normal" />
+ android:drawable="@drawable/jog_tab_bar_left_end_normal" />
<item android:state_active="true"
- android:drawable="@drawable/jog_tab_bar_confirm_gray" />
+ android:drawable="@drawable/jog_tab_bar_left_end_confirm_gray" />
</selector>
diff --git a/core/res/res/drawable/jog_tab_bar_left_unlock.xml b/core/res/res/drawable/jog_tab_bar_left_unlock.xml
index b1d7c31..32ce3dc 100644
--- a/core/res/res/drawable/jog_tab_bar_left_unlock.xml
+++ b/core/res/res/drawable/jog_tab_bar_left_unlock.xml
@@ -17,12 +17,12 @@
<!-- StateListDrawable used for buttons in the in-call onscreen touch UI. -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
- android:drawable="@drawable/jog_tab_bar_pressed" />
+ android:drawable="@drawable/jog_tab_bar_left_end_pressed" />
<item android:state_enabled="true"
- android:drawable="@drawable/jog_tab_bar_normal" />
+ android:drawable="@drawable/jog_tab_bar_left_end_normal" />
<item android:state_active="true"
- android:drawable="@drawable/jog_tab_bar_confirm_green" />
+ android:drawable="@drawable/jog_tab_bar_left_end_confirm_green" />
</selector>
diff --git a/core/res/res/drawable/jog_tab_bar_right_decline.xml b/core/res/res/drawable/jog_tab_bar_right_decline.xml
index ae82aba..83183ac 100644
--- a/core/res/res/drawable/jog_tab_bar_right_decline.xml
+++ b/core/res/res/drawable/jog_tab_bar_right_decline.xml
@@ -17,12 +17,12 @@
<!-- StateListDrawable used for buttons in the in-call onscreen touch UI. -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
- android:drawable="@drawable/jog_tab_bar_pressed" />
+ android:drawable="@drawable/jog_tab_bar_right_end_pressed" />
<item android:state_enabled="true"
- android:drawable="@drawable/jog_tab_bar_normal" />
+ android:drawable="@drawable/jog_tab_bar_right_end_normal" />
<item android:state_active="true"
- android:drawable="@drawable/jog_tab_bar_confirm_red" />
+ android:drawable="@drawable/jog_tab_bar_right_end_confirm_red" />
</selector>
diff --git a/core/res/res/drawable/jog_tab_bar_right_generic.xml b/core/res/res/drawable/jog_tab_bar_right_generic.xml
index de1a42f..8797e15 100644
--- a/core/res/res/drawable/jog_tab_bar_right_generic.xml
+++ b/core/res/res/drawable/jog_tab_bar_right_generic.xml
@@ -17,12 +17,12 @@
<!-- StateListDrawable used for buttons in the in-call onscreen touch UI. -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
- android:drawable="@drawable/jog_tab_bar_pressed" />
+ android:drawable="@drawable/jog_tab_bar_right_end_pressed" />
<item android:state_enabled="true"
- android:drawable="@drawable/jog_tab_bar_normal" />
+ android:drawable="@drawable/jog_tab_bar_right_end_normal" />
<item android:state_active="true"
- android:drawable="@drawable/jog_tab_bar_confirm_gray" />
+ android:drawable="@drawable/jog_tab_bar_right_end_confirm_gray" />
</selector>
diff --git a/core/res/res/drawable/jog_tab_bar_right_sound_off.xml b/core/res/res/drawable/jog_tab_bar_right_sound_off.xml
index de1a42f..8797e15 100644
--- a/core/res/res/drawable/jog_tab_bar_right_sound_off.xml
+++ b/core/res/res/drawable/jog_tab_bar_right_sound_off.xml
@@ -17,12 +17,12 @@
<!-- StateListDrawable used for buttons in the in-call onscreen touch UI. -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
- android:drawable="@drawable/jog_tab_bar_pressed" />
+ android:drawable="@drawable/jog_tab_bar_right_end_pressed" />
<item android:state_enabled="true"
- android:drawable="@drawable/jog_tab_bar_normal" />
+ android:drawable="@drawable/jog_tab_bar_right_end_normal" />
<item android:state_active="true"
- android:drawable="@drawable/jog_tab_bar_confirm_gray" />
+ android:drawable="@drawable/jog_tab_bar_right_end_confirm_gray" />
</selector>
diff --git a/core/res/res/drawable/jog_tab_bar_right_sound_on.xml b/core/res/res/drawable/jog_tab_bar_right_sound_on.xml
index febe32a..d66e1c2 100644
--- a/core/res/res/drawable/jog_tab_bar_right_sound_on.xml
+++ b/core/res/res/drawable/jog_tab_bar_right_sound_on.xml
@@ -17,12 +17,12 @@
<!-- StateListDrawable used for buttons in the in-call onscreen touch UI. -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
- android:drawable="@drawable/jog_tab_bar_pressed" />
+ android:drawable="@drawable/jog_tab_bar_right_end_pressed" />
<item android:state_enabled="true"
- android:drawable="@drawable/jog_tab_bar_normal" />
+ android:drawable="@drawable/jog_tab_bar_right_end_normal" />
<item android:state_active="true"
- android:drawable="@drawable/jog_tab_bar_confirm_yellow" />
+ android:drawable="@drawable/jog_tab_bar_right_end_confirm_yellow" />
</selector>
diff --git a/core/res/res/layout/keyguard_screen_sim_pin_portrait.xml b/core/res/res/layout/keyguard_screen_sim_pin_portrait.xml
index ac404f2..45e96a3 100644
--- a/core/res/res/layout/keyguard_screen_sim_pin_portrait.xml
+++ b/core/res/res/layout/keyguard_screen_sim_pin_portrait.xml
@@ -24,7 +24,7 @@
<LinearLayout android:id="@+id/topDisplayGroup"
android:layout_width="fill_parent"
- android:layout_height="115dip"
+ android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:orientation="vertical"
>
@@ -35,8 +35,9 @@
android:layout_height="wrap_content"
android:layout_marginTop="9dip"
android:gravity="center"
+ android:lines="2"
android:textAppearance="?android:attr/textAppearanceLarge"
- />
+ />
<RelativeLayout
android:layout_width="fill_parent"
diff --git a/core/res/res/layout/keyguard_screen_tab_unlock.xml b/core/res/res/layout/keyguard_screen_tab_unlock.xml
index 84b5751..1991e98 100644
--- a/core/res/res/layout/keyguard_screen_tab_unlock.xml
+++ b/core/res/res/layout/keyguard_screen_tab_unlock.xml
@@ -38,58 +38,80 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
- android:layout_marginTop="20dip"
+ android:layout_alignParentRight="true"
+ android:layout_marginTop="16dip"
+ android:layout_marginRight="16dip"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
/>
- <TextView
- android:id="@+id/time"
+ <!-- time and date -->
+ <com.android.internal.widget.DigitalClock android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/carrier"
- android:layout_marginTop="25dip"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textSize="55sp"
- />
+ android:layout_marginBottom="8dip"
+ android:layout_marginTop="16dip"
+ android:layout_marginLeft="24dip"
+ >
+
+ <TextView android:id="@+id/timeDisplay"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="bottom"
+ android:textSize="72sp"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:shadowColor="#C0000000"
+ android:shadowDx="0"
+ android:shadowDy="0"
+ android:shadowRadius="3.0"
+ />
+
+
+ <TextView android:id="@+id/am_pm"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:gravity="bottom"
+ android:textSize="22sp"
+ android:singleLine="true"
+ android:layout_marginLeft="8dip"
+ android:layout_marginBottom="-6dip"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:shadowColor="#C0000000"
+ android:shadowDx="0"
+ android:shadowDy="0"
+ android:shadowRadius="3.0"
+ />
+
+ </com.android.internal.widget.DigitalClock>
<TextView
android:id="@+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/time"
- android:layout_marginTop="-12dip"
+ android:layout_marginLeft="24dip"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
- <View
- android:id="@+id/divider"
- android:layout_width="fill_parent"
- android:layout_height="1dip"
- android:layout_marginTop="10dip"
- android:layout_below="@id/date"
- android:background="@android:drawable/divider_horizontal_dark"
- />
-
<TextView
android:id="@+id/status1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_below="@id/divider"
+ android:layout_below="@id/date"
android:layout_marginTop="6dip"
+ android:layout_marginLeft="24dip"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
android:drawablePadding="4dip"
/>
-
+
<TextView
android:id="@+id/status2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/status1"
android:layout_marginTop="6dip"
+ android:layout_marginLeft="24dip"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
android:drawablePadding="4dip"
/>
@@ -98,9 +120,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/status2"
+ android:layout_marginLeft="24dip"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
- android:gravity="center"
android:layout_marginTop="12dip"
/>
@@ -110,7 +131,7 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
- android:layout_marginBottom="50dip"
+ android:layout_marginBottom="80dip"
/>
<!-- emergency call button shown when sim is missing or PUKd -->
diff --git a/core/res/res/layout/keyguard_screen_tab_unlock_land.xml b/core/res/res/layout/keyguard_screen_tab_unlock_land.xml
index b80806b..5c80235 100644
--- a/core/res/res/layout/keyguard_screen_tab_unlock_land.xml
+++ b/core/res/res/layout/keyguard_screen_tab_unlock_land.xml
@@ -33,7 +33,8 @@
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="1.0"
- android:gravity="center_horizontal">
+ android:layout_marginLeft="24dip"
+ android:gravity="left">
<TextView
android:id="@+id/carrier"
@@ -42,45 +43,62 @@
android:layout_alignParentTop="true"
android:layout_marginTop="20dip"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
/>
- <TextView
- android:id="@+id/time"
+ <com.android.internal.widget.DigitalClock android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/carrier"
- android:layout_marginTop="25dip"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textSize="55sp"
- />
+ android:layout_marginBottom="8dip"
+ android:layout_marginTop="56dip"
+ >
+
+ <TextView android:id="@+id/timeDisplay"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="bottom"
+ android:textSize="72sp"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:shadowColor="#C0000000"
+ android:shadowDx="0"
+ android:shadowDy="0"
+ android:shadowRadius="3.0"
+ />
+
+
+ <TextView android:id="@+id/am_pm"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:gravity="bottom"
+ android:textSize="22sp"
+ android:singleLine="true"
+ android:layout_marginLeft="8dip"
+ android:layout_marginBottom="-6dip"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:shadowColor="#C0000000"
+ android:shadowDx="0"
+ android:shadowDy="0"
+ android:shadowRadius="3.0"
+ />
+
+ </com.android.internal.widget.DigitalClock>
<TextView
android:id="@+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/time"
- android:layout_marginTop="-12dip"
+ android:layout_marginTop="6dip"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
- <View
- android:id="@+id/divider"
- android:layout_width="fill_parent"
- android:layout_height="1dip"
- android:layout_marginTop="10dip"
- android:layout_below="@id/date"
- android:background="@android:drawable/divider_horizontal_dark"
- />
-
<TextView
android:id="@+id/status1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_below="@id/divider"
+ android:layout_below="@id/date"
android:layout_marginTop="6dip"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
android:drawablePadding="4dip"
/>
@@ -91,7 +109,6 @@
android:layout_below="@id/status1"
android:layout_marginTop="6dip"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
android:drawablePadding="4dip"
/>
@@ -101,7 +118,6 @@
android:layout_height="wrap_content"
android:layout_below="@id/status2"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
android:gravity="center"
android:layout_marginTop="12dip"
/>
@@ -124,7 +140,7 @@
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
- android:layout_marginRight="50dip"
+ android:layout_marginRight="80dip"
/>
</LinearLayout>
diff --git a/core/res/res/layout/keyguard_screen_unlock_landscape.xml b/core/res/res/layout/keyguard_screen_unlock_landscape.xml
index 3e00ae8e1..6da82e9 100644
--- a/core/res/res/layout/keyguard_screen_unlock_landscape.xml
+++ b/core/res/res/layout/keyguard_screen_unlock_landscape.xml
@@ -35,56 +35,73 @@
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="1.0"
- android:gravity="center_horizontal"
+ android:layout_marginLeft="24dip"
+ android:gravity="left"
>
<TextView
- android:id="@+id/carrier"
+ android:id="@+id/status1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="5dip"
+ android:layout_marginTop="16dip"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
/>
+
<TextView
- android:id="@+id/centerDot"
- android:visibility="gone"
+ android:id="@+id/carrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginLeft="5dip"
- android:layout_marginRight="5dip"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
android:textSize="17sp"
+ android:drawablePadding="4dip"
+ android:layout_marginTop="32dip"
/>
- <TextView
- android:id="@+id/time"
+ <com.android.internal.widget.DigitalClock android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_centerHorizontal="true"
- android:layout_marginTop="5dip"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textSize="35sp"
- />
+ android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true"
+ android:layout_marginBottom="8dip"
+ android:layout_marginTop="8dip"
+ >
+
+ <TextView android:id="@+id/timeDisplay"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="bottom"
+ android:textSize="72sp"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:shadowColor="#C0000000"
+ android:shadowDx="0"
+ android:shadowDy="0"
+ android:shadowRadius="3.0"
+ />
+
+
+ <TextView android:id="@+id/am_pm"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:gravity="bottom"
+ android:textSize="22sp"
+ android:singleLine="true"
+ android:layout_marginLeft="8dip"
+ android:layout_marginBottom="-6dip"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:shadowColor="#C0000000"
+ android:shadowDx="0"
+ android:shadowDy="0"
+ android:shadowRadius="3.0"
+ />
+
+ </com.android.internal.widget.DigitalClock>
+
<TextView
android:id="@+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_marginTop="-12dip"
+ android:layout_below="@id/time"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
- android:textSize="17sp"
/>
-
- <View
- android:id="@+id/divider"
- android:layout_width="fill_parent"
- android:layout_height="1dip"
- android:layout_centerHorizontal="true"
- android:background="@android:drawable/divider_horizontal_dark"
- />
-
<!-- used for instructions such as "draw pattern to unlock", the next alarm, and charging
status. -->
<LinearLayout
@@ -95,22 +112,12 @@
android:gravity="center"
>
<TextView
- android:id="@+id/status1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
- android:textSize="17sp"
- android:drawablePadding="4dip"
- />
- <TextView
android:id="@+id/statusSep"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
android:textSize="17sp"
/>
<TextView
@@ -119,7 +126,6 @@
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
android:textSize="17sp"
android:drawablePadding="4dip"
/>
@@ -136,13 +142,14 @@
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
+ android:layout_marginBottom="16dip"
>
<!-- option 1: a single emergency call button -->
<RelativeLayout android:id="@+id/footerNormal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:gravity="center"
+ android:gravity="left"
>
<Button android:id="@+id/emergencyCallAlone"
android:layout_width="wrap_content"
@@ -162,7 +169,7 @@
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:gravity="center"
+ android:gravity="left"
>
<Button android:id="@+id/forgotPattern"
android:layout_width="fill_parent"
@@ -193,4 +200,4 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
-</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient> \ No newline at end of file
+</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
diff --git a/core/res/res/layout/keyguard_screen_unlock_portrait.xml b/core/res/res/layout/keyguard_screen_unlock_portrait.xml
index 0525356..2856794 100644
--- a/core/res/res/layout/keyguard_screen_unlock_portrait.xml
+++ b/core/res/res/layout/keyguard_screen_unlock_portrait.xml
@@ -27,78 +27,99 @@
android:layout_height="fill_parent"
android:gravity="center_horizontal"
android:background="#70000000"
- >
+ >
- <LinearLayout
- android:id="@+id/carrierAndDate"
- android:orientation="horizontal"
- android:layout_width="wrap_content"
+ <RelativeLayout
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="13dip"
>
<TextView
android:id="@+id/carrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentRight="true"
+ android:layout_marginTop="16dip"
+ android:layout_marginRight="16dip"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
- android:textSize="17sp"
/>
- <TextView
- android:id="@+id/centerDot"
+
+ <com.android.internal.widget.DigitalClock android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginLeft="5dip"
- android:layout_marginRight="5dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
- android:textSize="17sp"
- />
+ android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true"
+ android:layout_marginBottom="8dip"
+ android:layout_marginTop="16dip"
+ android:layout_marginLeft="24dip"
+ >
+
+ <TextView android:id="@+id/timeDisplay"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="bottom"
+ android:textSize="72sp"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:shadowColor="#C0000000"
+ android:shadowDx="0"
+ android:shadowDy="0"
+ android:shadowRadius="3.0"
+ />
+
+
+ <TextView android:id="@+id/am_pm"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:gravity="bottom"
+ android:textSize="22sp"
+ android:singleLine="true"
+ android:layout_marginLeft="8dip"
+ android:layout_marginBottom="-6dip"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:shadowColor="#C0000000"
+ android:shadowDx="0"
+ android:shadowDy="0"
+ android:shadowRadius="3.0"
+ />
+
+ </com.android.internal.widget.DigitalClock>
+
<TextView
android:id="@+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
+ android:layout_below="@id/time"
+ android:layout_marginLeft="24dip"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
- android:textSize="17sp"
/>
- </LinearLayout>
-
- <TextView
- android:id="@+id/time"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerHorizontal="true"
- android:layout_marginTop="-9dip"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textSize="48sp"
- />
+
+ </RelativeLayout>
<View
android:id="@+id/divider"
+ android:layout_below="@id/date"
android:layout_width="fill_parent"
android:layout_height="1dip"
- android:layout_marginTop="-4dip"
- android:layout_centerHorizontal="true"
+ android:layout_marginTop="8dip"
+ android:layout_marginBottom="8dip"
android:background="@android:drawable/divider_horizontal_dark"
- />
+ />
<!-- used for instructions such as "draw pattern to unlock", the next alarm, and charging
status. -->
<LinearLayout
android:orientation="horizontal"
- android:layout_width="wrap_content"
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="3dip"
- android:gravity="center"
+ android:layout_marginLeft="24dip"
+ android:gravity="left"
>
<TextView
android:id="@+id/status1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
android:textSize="17sp"
android:drawablePadding="4dip"
/>
@@ -109,7 +130,6 @@
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
android:textSize="17sp"
/>
<TextView
@@ -118,7 +138,6 @@
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
android:textSize="17sp"
android:drawablePadding="4dip"
/>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 88ea70e..9d1b2c8 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -2894,12 +2894,9 @@
For a more in-depth discussion of search configuration, please refer to
{@link android.app.SearchManager}. -->
<declare-styleable name="Searchable">
- <!-- If provided, this icon will be shown in place of the label above the search box.
- This is a reference to a drawable (icon) resource. Note that the application icon
- is also used as an icon to the left of the search box and you cannot modify this
- behavior, so including the icon attribute is unecessary and this may be
- deprecated in the future.
- <i>Optional attribute.</i> -->
+ <!--<strong>This is deprecated.</strong><br/>The default
+ application icon is now always used, so this attribute is
+ obsolete.-->
<attr name="icon" />
<!-- This is the user-displayed name of the searchable activity. <i>Required
attribute.</i> -->
@@ -2922,9 +2919,9 @@
<!-- If set, this flag enables the display of the search target (label) within the
search bar. If neither bad mode is selected, no badge will be shown. -->
<flag name="showSearchLabelAsBadge" value="0x04" />
- <!-- If set, this flag enables the display of the search target (icon) within the
- search bar. (Note, overrides showSearchLabel) If neither bad mode is selected,
- no badge will be shown.-->
+ <!--<strong>This is deprecated.</strong><br/>The default
+ application icon is now always used, so this option is
+ obsolete.-->
<flag name="showSearchIconAsBadge" value="0x08" />
<!-- If set, this flag causes the suggestion column SUGGEST_COLUMN_INTENT_DATA to
be considered as the text for suggestion query rewriting. This should only
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 822a59a..0b6f97e 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -214,4 +214,8 @@
it will be removed when the lower-level touch driver generates better
data. -->
<bool name="config_filterTouchEvents">false</bool>
+
+ <!-- Component name of the default wallpaper. This will be ImageWallpaper if not
+ specified -->
+ <string name="default_wallpaper_component">@null</string>
</resources>
diff --git a/data/fonts/Android.mk b/data/fonts/Android.mk
index a8abf8b..597cb57 100644
--- a/data/fonts/Android.mk
+++ b/data/fonts/Android.mk
@@ -22,7 +22,8 @@ copy_from := \
DroidSerif-Bold.ttf \
DroidSerif-Italic.ttf \
DroidSerif-BoldItalic.ttf \
- DroidSansMono.ttf
+ DroidSansMono.ttf \
+ Clockopia.ttf
ifneq ($(NO_FALLBACK_FONT),true)
copy_from += DroidSansFallback.ttf
diff --git a/data/fonts/Clockopia.ttf b/data/fonts/Clockopia.ttf
new file mode 100644
index 0000000..123ea4f
--- /dev/null
+++ b/data/fonts/Clockopia.ttf
Binary files differ
diff --git a/graphics/java/android/renderscript/RSSurfaceView.java b/graphics/java/android/renderscript/RSSurfaceView.java
index 1bc03ac..ad1bb54 100644
--- a/graphics/java/android/renderscript/RSSurfaceView.java
+++ b/graphics/java/android/renderscript/RSSurfaceView.java
@@ -80,10 +80,10 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback
*/
public void surfaceDestroyed(SurfaceHolder holder) {
// Surface will be destroyed when we return
+ Log.v(RenderScript.LOG_TAG, "surfaceDestroyed");
if (mRS != null) {
- mRS.contextSetSurface(null);
+ mRS.contextSetSurface(0, 0, null);
}
- //Log.v(RenderScript.LOG_TAG, "surfaceDestroyed");
}
/**
@@ -91,10 +91,10 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback
* not normally called or subclassed by clients of RSSurfaceView.
*/
public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
+ Log.v(RenderScript.LOG_TAG, "surfaceChanged");
if (mRS != null) {
- mRS.contextSetSurface(holder.getSurface());
+ mRS.contextSetSurface(w, h, holder.getSurface());
}
- //Log.v(RenderScript.LOG_TAG, "surfaceChanged");
}
/**
@@ -147,11 +147,8 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback
// ----------------------------------------------------------------------
public RenderScript createRenderScript(boolean useDepth, boolean forceSW) {
- Surface sur = null;
- while ((sur == null) || (mSurfaceHolder == null)) {
- sur = getHolder().getSurface();
- }
- mRS = new RenderScript(sur, useDepth, forceSW);
+ Log.v(RenderScript.LOG_TAG, "createRenderScript");
+ mRS = new RenderScript(useDepth, forceSW);
return mRS;
}
@@ -160,6 +157,7 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback
}
public void destroyRenderScript() {
+ Log.v(RenderScript.LOG_TAG, "destroyRenderScript");
mRS.destroy();
mRS = null;
}
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java
index f1e5af1..ea11882 100644
--- a/graphics/java/android/renderscript/RenderScript.java
+++ b/graphics/java/android/renderscript/RenderScript.java
@@ -30,10 +30,12 @@ import android.view.Surface;
*
**/
public class RenderScript {
- static final String LOG_TAG = "libRS_jni";
+ static final String LOG_TAG = "RenderScript_jni";
private static final boolean DEBUG = false;
@SuppressWarnings({"UnusedDeclaration", "deprecation"})
private static final boolean LOG_ENABLED = DEBUG ? Config.LOGD : Config.LOGV;
+ int mWidth;
+ int mHeight;
@@ -62,9 +64,9 @@ public class RenderScript {
native int nDeviceCreate();
native void nDeviceDestroy(int dev);
native void nDeviceSetConfig(int dev, int param, int value);
- native int nContextCreate(int dev, Surface sur, int ver, boolean useDepth);
+ native int nContextCreate(int dev, int ver, boolean useDepth);
native void nContextDestroy(int con);
- native void nContextSetSurface(Surface sur);
+ native void nContextSetSurface(int w, int h, Surface sur);
native void nContextBindRootScript(int script);
native void nContextBindSampler(int sampler, int slot);
@@ -259,27 +261,31 @@ public class RenderScript {
mRS.mMessageCallback.mID = msg;
mRS.mMessageCallback.run();
}
- //Log.d("rs", "MessageThread msg " + msg + " v1 " + rbuf[0] + " v2 " + rbuf[1] + " v3 " +rbuf[2]);
+ //Log.d(LOG_TAG, "MessageThread msg " + msg + " v1 " + rbuf[0] + " v2 " + rbuf[1] + " v3 " +rbuf[2]);
}
- Log.d("rs", "MessageThread exiting.");
+ Log.d(LOG_TAG, "MessageThread exiting.");
}
}
- public RenderScript(Surface sur, boolean useDepth, boolean forceSW) {
- mSurface = sur;
+ public RenderScript(boolean useDepth, boolean forceSW) {
+ mSurface = null;
+ mWidth = 0;
+ mHeight = 0;
mDev = nDeviceCreate();
if(forceSW) {
nDeviceSetConfig(mDev, 0, 1);
}
- mContext = nContextCreate(mDev, mSurface, 0, useDepth);
+ mContext = nContextCreate(mDev, 0, useDepth);
Element.initPredefined(this);
mMessageThread = new MessageThread(this);
mMessageThread.start();
}
- public void contextSetSurface(Surface sur) {
+ public void contextSetSurface(int w, int h, Surface sur) {
mSurface = sur;
- nContextSetSurface(mSurface);
+ mWidth = w;
+ mHeight = h;
+ nContextSetSurface(w, h, mSurface);
}
public void destroy() {
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp
index f3dda41..709cb97 100644
--- a/graphics/jni/android_renderscript_RenderScript.cpp
+++ b/graphics/jni/android_renderscript_RenderScript.cpp
@@ -151,30 +151,17 @@ nDeviceSetConfig(JNIEnv *_env, jobject _this, jint dev, jint p, jint value)
}
static jint
-nContextCreate(JNIEnv *_env, jobject _this, jint dev, jobject wnd, jint ver, jboolean useDepth)
+nContextCreate(JNIEnv *_env, jobject _this, jint dev, jint ver, jboolean useDepth)
{
LOG_API("nContextCreate");
-
- if (wnd == NULL) {
- not_valid_surface:
- doThrow(_env, "java/lang/IllegalArgumentException",
- "Make sure the SurfaceView or associated SurfaceHolder has a valid Surface");
- return 0;
- }
- jclass surface_class = _env->FindClass("android/view/Surface");
- jfieldID surfaceFieldID = _env->GetFieldID(surface_class, "mSurface", "I");
- Surface * window = (Surface*)_env->GetIntField(wnd, surfaceFieldID);
- if (window == NULL)
- goto not_valid_surface;
-
- return (jint)rsContextCreate((RsDevice)dev, window, ver, useDepth);
+ return (jint)rsContextCreate((RsDevice)dev, ver, useDepth);
}
static void
-nContextSetSurface(JNIEnv *_env, jobject _this, jobject wnd)
+nContextSetSurface(JNIEnv *_env, jobject _this, jint width, jint height, jobject wnd)
{
RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
- LOG_API("nContextSetSurface, con(%p), surface(%p)", con, (Surface *)wnd);
+ LOG_API("nContextSetSurface, con(%p), width(%i), height(%i), surface(%p)", con, width, height, (Surface *)wnd);
Surface * window = NULL;
if (wnd == NULL) {
@@ -185,7 +172,7 @@ nContextSetSurface(JNIEnv *_env, jobject _this, jobject wnd)
window = (Surface*)_env->GetIntField(wnd, surfaceFieldID);
}
- rsContextSetSurface(con, window);
+ rsContextSetSurface(con, width, height, window);
}
static void
@@ -1345,8 +1332,8 @@ static JNINativeMethod methods[] = {
{"nDeviceCreate", "()I", (void*)nDeviceCreate },
{"nDeviceDestroy", "(I)V", (void*)nDeviceDestroy },
{"nDeviceSetConfig", "(III)V", (void*)nDeviceSetConfig },
-{"nContextCreate", "(ILandroid/view/Surface;IZ)I", (void*)nContextCreate },
-{"nContextSetSurface", "(Landroid/view/Surface;)V", (void*)nContextSetSurface },
+{"nContextCreate", "(IIZ)I", (void*)nContextCreate },
+{"nContextSetSurface", "(IILandroid/view/Surface;)V", (void*)nContextSetSurface },
{"nContextDestroy", "(I)V", (void*)nContextDestroy },
{"nContextPause", "()V", (void*)nContextPause },
{"nContextResume", "()V", (void*)nContextResume },
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h
index e066177..bc3dd36 100644
--- a/include/media/AudioSystem.h
+++ b/include/media/AudioSystem.h
@@ -239,15 +239,11 @@ public:
DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES = 0x100,
DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER = 0x200,
DEVICE_OUT_AUX_DIGITAL = 0x400,
- DEVICE_OUT_FM_HEADPHONE = 0x800,
- DEVICE_OUT_FM_SPEAKER = 0x1000,
- DEVICE_OUT_TTY = 0x2000,
DEVICE_OUT_DEFAULT = 0x8000,
DEVICE_OUT_ALL = (DEVICE_OUT_EARPIECE | DEVICE_OUT_SPEAKER | DEVICE_OUT_WIRED_HEADSET |
DEVICE_OUT_WIRED_HEADPHONE | DEVICE_OUT_BLUETOOTH_SCO | DEVICE_OUT_BLUETOOTH_SCO_HEADSET |
DEVICE_OUT_BLUETOOTH_SCO_CARKIT | DEVICE_OUT_BLUETOOTH_A2DP | DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES |
- DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER | DEVICE_OUT_AUX_DIGITAL | DEVICE_OUT_FM_HEADPHONE |
- DEVICE_OUT_FM_SPEAKER | DEVICE_OUT_TTY | DEVICE_OUT_DEFAULT),
+ DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER | DEVICE_OUT_AUX_DIGITAL | DEVICE_OUT_DEFAULT),
// input devices
DEVICE_IN_COMMUNICATION = 0x10000,
diff --git a/include/media/stagefright/HardwareAPI.h b/include/media/stagefright/HardwareAPI.h
new file mode 100644
index 0000000..7e1f08d
--- /dev/null
+++ b/include/media/stagefright/HardwareAPI.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef HARDWARE_API_H_
+
+#define HARDWARE_API_H_
+
+#include <media/stagefright/VideoRenderer.h>
+#include <ui/ISurface.h>
+#include <utils/RefBase.h>
+
+#include <OMX_Component.h>
+
+extern android::VideoRenderer *createRenderer(
+ const android::sp<android::ISurface> &surface,
+ const char *componentName,
+ OMX_COLOR_FORMATTYPE colorFormat,
+ size_t displayWidth, size_t displayHeight,
+ size_t decodedWidth, size_t decodedHeight);
+
+#endif // HARDWARE_API_H_
+
diff --git a/libs/audioflinger/AudioFlinger.cpp b/libs/audioflinger/AudioFlinger.cpp
index ebd470f..d918998 100644
--- a/libs/audioflinger/AudioFlinger.cpp
+++ b/libs/audioflinger/AudioFlinger.cpp
@@ -1185,7 +1185,6 @@ void AudioFlinger::PlaybackThread::readOutputParameters()
mFrameSize = mOutput->frameSize();
mFrameCount = mOutput->bufferSize() / mFrameSize;
- mMinBytesToWrite = (mOutput->latency() * mSampleRate * mFrameSize) / 1000;
// FIXME - Current mixer implementation only supports stereo output: Always
// Allocate a stereo buffer even if HW output is mono.
if (mMixBuffer != NULL) delete mMixBuffer;
@@ -1215,23 +1214,25 @@ AudioFlinger::MixerThread::~MixerThread()
bool AudioFlinger::MixerThread::threadLoop()
{
- uint32_t sleepTime = 1000;
- uint32_t maxBufferRecoveryInUsecs = getMaxBufferRecoveryInUsecs();
int16_t* curBuf = mMixBuffer;
Vector< sp<Track> > tracksToRemove;
- size_t enabledTracks = 0;
+ uint32_t mixerStatus = MIXER_IDLE;
nsecs_t standbyTime = systemTime();
size_t mixBufferSize = mFrameCount * mFrameSize;
// FIXME: Relaxed timing because of a certain device that can't meet latency
// Should be reduced to 2x after the vendor fixes the driver issue
nsecs_t maxPeriod = seconds(mFrameCount) / mSampleRate * 3;
nsecs_t lastWarning = 0;
+ bool longStandbyExit = false;
+ uint32_t activeSleepTime = activeSleepTimeUs();
+ uint32_t idleSleepTime = idleSleepTimeUs();
+ uint32_t sleepTime = idleSleepTime;
while (!exitPending())
{
processConfigEvents();
- enabledTracks = 0;
+ mixerStatus = MIXER_IDLE;
{ // scope for mLock
Mutex::Autolock _l(mLock);
@@ -1241,7 +1242,8 @@ bool AudioFlinger::MixerThread::threadLoop()
// FIXME: Relaxed timing because of a certain device that can't meet latency
// Should be reduced to 2x after the vendor fixes the driver issue
maxPeriod = seconds(mFrameCount) / mSampleRate * 3;
- maxBufferRecoveryInUsecs = getMaxBufferRecoveryInUsecs();
+ activeSleepTime = activeSleepTimeUs();
+ idleSleepTime = idleSleepTimeUs();
}
const SortedVector< wp<Track> >& activeTracks = mActiveTracks;
@@ -1277,15 +1279,15 @@ bool AudioFlinger::MixerThread::threadLoop()
}
standbyTime = systemTime() + kStandbyTimeInNsecs;
- sleepTime = 1000;
+ sleepTime = idleSleepTime;
continue;
}
}
- enabledTracks = prepareTracks_l(activeTracks, &tracksToRemove);
+ mixerStatus = prepareTracks_l(activeTracks, &tracksToRemove);
}
- if (LIKELY(enabledTracks)) {
+ if (LIKELY(mixerStatus == MIXER_TRACKS_READY)) {
// mix buffers...
mAudioMixer->process(curBuf);
sleepTime = 0;
@@ -1294,15 +1296,22 @@ bool AudioFlinger::MixerThread::threadLoop()
// If no tracks are ready, sleep once for the duration of an output
// buffer size, then write 0s to the output
if (sleepTime == 0) {
- sleepTime = maxBufferRecoveryInUsecs;
- } else if (mBytesWritten != 0) {
+ if (mixerStatus == MIXER_TRACKS_ENABLED) {
+ sleepTime = activeSleepTime;
+ } else {
+ sleepTime = idleSleepTime;
+ }
+ } else if (mBytesWritten != 0 ||
+ (mixerStatus == MIXER_TRACKS_ENABLED && longStandbyExit)) {
+ LOGV("NO DATA READY, %p", this);
memset (curBuf, 0, mixBufferSize);
sleepTime = 0;
+ LOGV_IF((mBytesWritten == 0 && (mixerStatus == MIXER_TRACKS_ENABLED && longStandbyExit)), "anticipated start");
}
}
if (mSuspended) {
- sleepTime = maxBufferRecoveryInUsecs;
+ sleepTime = idleSleepTime;
}
// sleepTime == 0 means we must write to audio hardware
if (sleepTime == 0) {
@@ -1312,7 +1321,6 @@ bool AudioFlinger::MixerThread::threadLoop()
if (bytesWritten > 0) mBytesWritten += bytesWritten;
mNumWrites++;
mInWrite = false;
- mStandby = false;
nsecs_t now = systemTime();
nsecs_t delta = now - mLastWriteTime;
if (delta > maxPeriod) {
@@ -1322,7 +1330,11 @@ bool AudioFlinger::MixerThread::threadLoop()
ns2ms(delta), mNumDelayedWrites, this);
lastWarning = now;
}
+ if (mStandby) {
+ longStandbyExit = true;
+ }
}
+ mStandby = false;
} else {
usleep(sleepTime);
}
@@ -1342,10 +1354,10 @@ bool AudioFlinger::MixerThread::threadLoop()
}
// prepareTracks_l() must be called with ThreadBase::mLock held
-size_t AudioFlinger::MixerThread::prepareTracks_l(const SortedVector< wp<Track> >& activeTracks, Vector< sp<Track> > *tracksToRemove)
+uint32_t AudioFlinger::MixerThread::prepareTracks_l(const SortedVector< wp<Track> >& activeTracks, Vector< sp<Track> > *tracksToRemove)
{
- size_t enabledTracks = 0;
+ uint32_t mixerStatus = MIXER_IDLE;
// find out which tracks need to be processed
size_t count = activeTracks.size();
for (size_t i=0 ; i<count ; i++) {
@@ -1415,7 +1427,7 @@ size_t AudioFlinger::MixerThread::prepareTracks_l(const SortedVector< wp<Track>
// reset retry count
track->mRetryCount = kMaxTrackRetries;
- enabledTracks++;
+ mixerStatus = MIXER_TRACKS_READY;
} else {
//LOGV("track %d u=%08x, s=%08x [NOT READY]", track->name(), cblk->user, cblk->server);
if (track->isStopped()) {
@@ -1432,16 +1444,11 @@ size_t AudioFlinger::MixerThread::prepareTracks_l(const SortedVector< wp<Track>
if (--(track->mRetryCount) <= 0) {
LOGV("BUFFER TIMEOUT: remove(%d) from active list on thread %p", track->name(), this);
tracksToRemove->add(track);
+ } else if (mixerStatus != MIXER_TRACKS_READY) {
+ mixerStatus = MIXER_TRACKS_ENABLED;
}
- // For tracks using static shared memory buffer, make sure that we have
- // written enough data to audio hardware before disabling the track
- // NOTE: this condition with arrive before track->mRetryCount <= 0 so we
- // don't care about code removing track from active list above.
- if ((track->mSharedBuffer == 0) || (mBytesWritten >= mMinBytesToWrite)) {
- mAudioMixer->disable(AudioMixer::MIXING);
- } else {
- enabledTracks++;
- }
+
+ mAudioMixer->disable(AudioMixer::MIXING);
}
}
}
@@ -1459,7 +1466,7 @@ size_t AudioFlinger::MixerThread::prepareTracks_l(const SortedVector< wp<Track>
}
}
- return enabledTracks;
+ return mixerStatus;
}
void AudioFlinger::MixerThread::getTracks(
@@ -1621,14 +1628,14 @@ status_t AudioFlinger::MixerThread::dumpInternals(int fd, const Vector<String16>
return NO_ERROR;
}
-uint32_t AudioFlinger::MixerThread::getMaxBufferRecoveryInUsecs()
+uint32_t AudioFlinger::MixerThread::activeSleepTimeUs()
{
- uint32_t time = ((mFrameCount * 1000) / mSampleRate) * 1000;
- // Add some margin with regard to scheduling precision
- if (time > 10000) {
- time -= 10000;
- }
- return time;
+ return (uint32_t)(mOutput->latency() * 1000) / 2;
+}
+
+uint32_t AudioFlinger::MixerThread::idleSleepTimeUs()
+{
+ return (uint32_t)((mFrameCount * 1000) / mSampleRate) * 1000;
}
// ----------------------------------------------------------------------------
@@ -1646,25 +1653,31 @@ AudioFlinger::DirectOutputThread::~DirectOutputThread()
bool AudioFlinger::DirectOutputThread::threadLoop()
{
- uint32_t sleepTime = 1000;
- uint32_t maxBufferRecoveryInUsecs = getMaxBufferRecoveryInUsecs();
+ uint32_t mixerStatus = MIXER_IDLE;
sp<Track> trackToRemove;
sp<Track> activeTrack;
nsecs_t standbyTime = systemTime();
int8_t *curBuf;
size_t mixBufferSize = mFrameCount*mFrameSize;
+ uint32_t activeSleepTime = activeSleepTimeUs();
+ uint32_t idleSleepTime = idleSleepTimeUs();
+ uint32_t sleepTime = idleSleepTime;
+
while (!exitPending())
{
processConfigEvents();
+ mixerStatus = MIXER_IDLE;
+
{ // scope for the mLock
Mutex::Autolock _l(mLock);
if (checkForNewParameters_l()) {
mixBufferSize = mFrameCount*mFrameSize;
- maxBufferRecoveryInUsecs = getMaxBufferRecoveryInUsecs();
+ activeSleepTime = activeSleepTimeUs();
+ idleSleepTime = idleSleepTimeUs();
}
// put audio hardware into standby after short delay
@@ -1698,7 +1711,7 @@ bool AudioFlinger::DirectOutputThread::threadLoop()
}
standbyTime = systemTime() + kStandbyTimeInNsecs;
- sleepTime = 1000;
+ sleepTime = idleSleepTime;
continue;
}
}
@@ -1753,6 +1766,7 @@ bool AudioFlinger::DirectOutputThread::threadLoop()
// reset retry count
track->mRetryCount = kMaxTrackRetries;
activeTrack = t;
+ mixerStatus = MIXER_TRACKS_READY;
} else {
//LOGV("track %d u=%08x, s=%08x [NOT READY]", track->name(), cblk->user, cblk->server);
if (track->isStopped()) {
@@ -1768,16 +1782,10 @@ bool AudioFlinger::DirectOutputThread::threadLoop()
if (--(track->mRetryCount) <= 0) {
LOGV("BUFFER TIMEOUT: remove(%d) from active list", track->name());
trackToRemove = track;
+ } else {
+ mixerStatus = MIXER_TRACKS_ENABLED;
}
-
- // For tracks using static shared memry buffer, make sure that we have
- // written enough data to audio hardware before disabling the track
- // NOTE: this condition with arrive before track->mRetryCount <= 0 so we
- // don't care about code removing track from active list above.
- if ((track->mSharedBuffer != 0) && (mBytesWritten < mMinBytesToWrite)) {
- activeTrack = t;
- }
- }
+ }
}
}
@@ -1791,7 +1799,7 @@ bool AudioFlinger::DirectOutputThread::threadLoop()
}
}
- if (activeTrack != 0) {
+ if (LIKELY(mixerStatus == MIXER_TRACKS_READY)) {
AudioBufferProvider::Buffer buffer;
size_t frameCount = mFrameCount;
curBuf = (int8_t *)mMixBuffer;
@@ -1812,7 +1820,11 @@ bool AudioFlinger::DirectOutputThread::threadLoop()
standbyTime = systemTime() + kStandbyTimeInNsecs;
} else {
if (sleepTime == 0) {
- sleepTime = maxBufferRecoveryInUsecs;
+ if (mixerStatus == MIXER_TRACKS_ENABLED) {
+ sleepTime = activeSleepTime;
+ } else {
+ sleepTime = idleSleepTime;
+ }
} else if (mBytesWritten != 0 && AudioSystem::isLinearPCM(mFormat)) {
memset (mMixBuffer, 0, mFrameCount * mFrameSize);
sleepTime = 0;
@@ -1820,7 +1832,7 @@ bool AudioFlinger::DirectOutputThread::threadLoop()
}
if (mSuspended) {
- sleepTime = maxBufferRecoveryInUsecs;
+ sleepTime = idleSleepTime;
}
// sleepTime == 0 means we must write to audio hardware
if (sleepTime == 0) {
@@ -1905,15 +1917,22 @@ bool AudioFlinger::DirectOutputThread::checkForNewParameters_l()
return reconfig;
}
-uint32_t AudioFlinger::DirectOutputThread::getMaxBufferRecoveryInUsecs()
+uint32_t AudioFlinger::DirectOutputThread::activeSleepTimeUs()
{
uint32_t time;
if (AudioSystem::isLinearPCM(mFormat)) {
- time = ((mFrameCount * 1000) / mSampleRate) * 1000;
- // Add some margin with regard to scheduling precision
- if (time > 10000) {
- time -= 10000;
- }
+ time = (uint32_t)(mOutput->latency() * 1000) / 2;
+ } else {
+ time = 10000;
+ }
+ return time;
+}
+
+uint32_t AudioFlinger::DirectOutputThread::idleSleepTimeUs()
+{
+ uint32_t time;
+ if (AudioSystem::isLinearPCM(mFormat)) {
+ time = (uint32_t)((mFrameCount * 1000) / mSampleRate) * 1000;
} else {
time = 10000;
}
@@ -1936,28 +1955,30 @@ AudioFlinger::DuplicatingThread::~DuplicatingThread()
bool AudioFlinger::DuplicatingThread::threadLoop()
{
- uint32_t sleepTime = 1000;
- uint32_t maxBufferRecoveryInUsecs = getMaxBufferRecoveryInUsecs();
int16_t* curBuf = mMixBuffer;
Vector< sp<Track> > tracksToRemove;
- size_t enabledTracks = 0;
+ uint32_t mixerStatus = MIXER_IDLE;
nsecs_t standbyTime = systemTime();
size_t mixBufferSize = mFrameCount*mFrameSize;
SortedVector< sp<OutputTrack> > outputTracks;
uint32_t writeFrames = 0;
+ uint32_t activeSleepTime = activeSleepTimeUs();
+ uint32_t idleSleepTime = idleSleepTimeUs();
+ uint32_t sleepTime = idleSleepTime;
while (!exitPending())
{
processConfigEvents();
- enabledTracks = 0;
+ mixerStatus = MIXER_IDLE;
{ // scope for the mLock
Mutex::Autolock _l(mLock);
if (checkForNewParameters_l()) {
mixBufferSize = mFrameCount*mFrameSize;
- maxBufferRecoveryInUsecs = getMaxBufferRecoveryInUsecs();
+ activeSleepTime = activeSleepTimeUs();
+ idleSleepTime = idleSleepTimeUs();
}
const SortedVector< wp<Track> >& activeTracks = mActiveTracks;
@@ -1997,22 +2018,26 @@ bool AudioFlinger::DuplicatingThread::threadLoop()
}
standbyTime = systemTime() + kStandbyTimeInNsecs;
- sleepTime = 1000;
+ sleepTime = idleSleepTime;
continue;
}
}
- enabledTracks = prepareTracks_l(activeTracks, &tracksToRemove);
+ mixerStatus = prepareTracks_l(activeTracks, &tracksToRemove);
}
- if (LIKELY(enabledTracks)) {
+ if (LIKELY(mixerStatus == MIXER_TRACKS_READY)) {
// mix buffers...
mAudioMixer->process(curBuf);
sleepTime = 0;
writeFrames = mFrameCount;
} else {
if (sleepTime == 0) {
- sleepTime = maxBufferRecoveryInUsecs;
+ if (mixerStatus == MIXER_TRACKS_ENABLED) {
+ sleepTime = activeSleepTime;
+ } else {
+ sleepTime = idleSleepTime;
+ }
} else if (mBytesWritten != 0) {
// flush remaining overflow buffers in output tracks
for (size_t i = 0; i < outputTracks.size(); i++) {
@@ -2026,7 +2051,7 @@ bool AudioFlinger::DuplicatingThread::threadLoop()
}
if (mSuspended) {
- sleepTime = maxBufferRecoveryInUsecs;
+ sleepTime = idleSleepTime;
}
// sleepTime == 0 means we must write to audio hardware
if (sleepTime == 0) {
diff --git a/libs/audioflinger/AudioFlinger.h b/libs/audioflinger/AudioFlinger.h
index 22d15c9..594d878 100644
--- a/libs/audioflinger/AudioFlinger.h
+++ b/libs/audioflinger/AudioFlinger.h
@@ -361,6 +361,12 @@ private:
DUPLICATING
};
+ enum mixer_state {
+ MIXER_IDLE,
+ MIXER_TRACKS_ENABLED,
+ MIXER_TRACKS_READY
+ };
+
// playback track
class Track : public TrackBase {
public:
@@ -530,7 +536,8 @@ private:
virtual int getTrackName_l() = 0;
virtual void deleteTrackName_l(int name) = 0;
- virtual uint32_t getMaxBufferRecoveryInUsecs() = 0;
+ virtual uint32_t activeSleepTimeUs() = 0;
+ virtual uint32_t idleSleepTimeUs() = 0;
private:
@@ -562,7 +569,6 @@ private:
int mNumWrites;
int mNumDelayedWrites;
bool mInWrite;
- int mMinBytesToWrite;
};
class MixerThread : public PlaybackThread {
@@ -582,10 +588,11 @@ private:
virtual status_t dumpInternals(int fd, const Vector<String16>& args);
protected:
- size_t prepareTracks_l(const SortedVector< wp<Track> >& activeTracks, Vector< sp<Track> > *tracksToRemove);
+ uint32_t prepareTracks_l(const SortedVector< wp<Track> >& activeTracks, Vector< sp<Track> > *tracksToRemove);
virtual int getTrackName_l();
virtual void deleteTrackName_l(int name);
- virtual uint32_t getMaxBufferRecoveryInUsecs();
+ virtual uint32_t activeSleepTimeUs();
+ virtual uint32_t idleSleepTimeUs();
AudioMixer* mAudioMixer;
};
@@ -604,7 +611,8 @@ private:
protected:
virtual int getTrackName_l();
virtual void deleteTrackName_l(int name);
- virtual uint32_t getMaxBufferRecoveryInUsecs();
+ virtual uint32_t activeSleepTimeUs();
+ virtual uint32_t idleSleepTimeUs();
private:
float mLeftVolume;
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index d7daf73..2d4e10d 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -41,7 +41,7 @@
#include <sys/mman.h>
#include <sys/stat.h>
-#define BINDER_VM_SIZE (1*1024*1024)
+#define BINDER_VM_SIZE ((1*1024*1024) - (4096 *2))
static bool gSingleProcess = false;
diff --git a/libs/rs/RenderScript.h b/libs/rs/RenderScript.h
index 9b04393..3ca8b15 100644
--- a/libs/rs/RenderScript.h
+++ b/libs/rs/RenderScript.h
@@ -55,7 +55,7 @@ RsDevice rsDeviceCreate();
void rsDeviceDestroy(RsDevice);
void rsDeviceSetConfig(RsDevice, RsDeviceParam, int32_t value);
-RsContext rsContextCreate(RsDevice, void *, uint32_t version, bool useDepth);
+RsContext rsContextCreate(RsDevice, uint32_t version, bool useDepth);
void rsContextDestroy(RsContext);
void rsObjDestroyOOB(RsContext, void *);
diff --git a/libs/rs/java/Fountain/src/com/android/fountain/FountainView.java b/libs/rs/java/Fountain/src/com/android/fountain/FountainView.java
index cda005e..1e7c5a2 100644
--- a/libs/rs/java/Fountain/src/com/android/fountain/FountainView.java
+++ b/libs/rs/java/Fountain/src/com/android/fountain/FountainView.java
@@ -48,29 +48,25 @@ public class FountainView extends RSSurfaceView {
private RenderScript mRS;
private FountainRS mRender;
- private void destroyRS() {
- if(mRS != null) {
- mRS = null;
- destroyRenderScript();
- }
- java.lang.System.gc();
- }
-
public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
super.surfaceChanged(holder, format, w, h);
- destroyRS();
- mRS = createRenderScript(false, true);
- mRender = new FountainRS();
- mRender.init(mRS, getResources(), w, h);
+ if (mRS == null) {
+ mRS = createRenderScript(false, true);
+ mRS.contextSetSurface(w, h, holder.getSurface());
+ mRender = new FountainRS();
+ mRender.init(mRS, getResources(), w, h);
+ }
}
- public void surfaceDestroyed(SurfaceHolder holder) {
- // Surface will be destroyed when we return
- destroyRS();
+ @Override
+ protected void onDetachedFromWindow() {
+ if(mRS != null) {
+ mRS = null;
+ destroyRenderScript();
+ }
}
-
@Override
public boolean onTouchEvent(MotionEvent ev)
{
diff --git a/libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java b/libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java
index b1facfc..334fd9c 100644
--- a/libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java
+++ b/libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java
@@ -126,13 +126,14 @@ public class ImageProcessingActivity extends Activity implements SurfaceHolder.C
}
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
+ mRS.contextSetSurface(width, height, holder.getSurface());
}
public void surfaceDestroyed(SurfaceHolder holder) {
}
private Script.Invokable createScript() {
- mRS = new RenderScript(mSurfaceView.getHolder().getSurface(), false, false);
+ mRS = new RenderScript(false, false);
mRS.mMessageCallback = new FilterCallback();
mParamsType = Type.createFromClass(mRS, Params.class, 1, "Parameters");
diff --git a/libs/rs/rs.spec b/libs/rs/rs.spec
index 865e435..da25a27 100644
--- a/libs/rs/rs.spec
+++ b/libs/rs/rs.spec
@@ -37,9 +37,15 @@ ContextResume {
}
ContextSetSurface {
+ param uint32_t width
+ param uint32_t height
param void *sur
}
+ContextSetPriority {
+ param uint32_t priority
+ }
+
AssignName {
param void *obj
param const char *name
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index 3e4cc36..c835dda 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -92,38 +92,12 @@ void Context::initEGL()
LOGE("eglCreateContext returned EGL_NO_CONTEXT");
}
gGLContextCount++;
-
- if (mWndSurface) {
- setSurface(mWndSurface);
- } else {
- setSurface((Surface *)android_createDisplaySurface());
- }
-
- eglQuerySurface(mEGL.mDisplay, mEGL.mSurface, EGL_WIDTH, &mEGL.mWidth);
- eglQuerySurface(mEGL.mDisplay, mEGL.mSurface, EGL_HEIGHT, &mEGL.mHeight);
-
-
- mGL.mVersion = glGetString(GL_VERSION);
- mGL.mVendor = glGetString(GL_VENDOR);
- mGL.mRenderer = glGetString(GL_RENDERER);
- mGL.mExtensions = glGetString(GL_EXTENSIONS);
-
- LOGV("EGL Version %i %i", mEGL.mMajorVersion, mEGL.mMinorVersion);
- LOGV("GL Version %s", mGL.mVersion);
- LOGV("GL Vendor %s", mGL.mVendor);
- LOGV("GL Renderer %s", mGL.mRenderer);
- LOGV("GL Extensions %s", mGL.mExtensions);
-
- if ((strlen((const char *)mGL.mVersion) < 12) || memcmp(mGL.mVersion, "OpenGL ES-CM", 12)) {
- LOGE("Error, OpenGL ES Lite not supported");
- } else {
- sscanf((const char *)mGL.mVersion + 13, "%i.%i", &mGL.mMajorVersion, &mGL.mMinorVersion);
- }
}
void Context::deinitEGL()
{
- setSurface(NULL);
+ LOGV("deinitEGL");
+ setSurface(0, 0, NULL);
eglDestroyContext(mEGL.mDisplay, mEGL.mContext);
checkEglError("eglDestroyContext");
@@ -265,9 +239,9 @@ void * Context::threadProc(void *vrsc)
rsc->props.mLogScripts = getProp("debug.rs.script");
rsc->props.mLogObjects = getProp("debug.rs.objects");
- pthread_mutex_lock(&gInitMutex);
- rsc->initEGL();
- pthread_mutex_unlock(&gInitMutex);
+ //pthread_mutex_lock(&gInitMutex);
+ //rsc->initEGL();
+ //pthread_mutex_unlock(&gInitMutex);
ScriptTLSStruct *tlsStruct = new ScriptTLSStruct;
if (!tlsStruct) {
@@ -342,7 +316,7 @@ void * Context::threadProc(void *vrsc)
return NULL;
}
-Context::Context(Device *dev, Surface *sur, bool useDepth)
+Context::Context(Device *dev, bool useDepth)
{
pthread_mutex_lock(&gInitMutex);
@@ -353,6 +327,7 @@ Context::Context(Device *dev, Surface *sur, bool useDepth)
mUseDepth = useDepth;
mPaused = false;
mObjHead = NULL;
+ memset(&mEGL, 0, sizeof(mEGL));
int status;
pthread_attr_t threadAttr;
@@ -380,7 +355,7 @@ Context::Context(Device *dev, Surface *sur, bool useDepth)
sparam.sched_priority = ANDROID_PRIORITY_DISPLAY;
pthread_attr_setschedparam(&threadAttr, &sparam);
- mWndSurface = sur;
+ mWndSurface = NULL;
objDestroyOOBInit();
timerInit();
@@ -426,8 +401,10 @@ Context::~Context()
objDestroyOOBDestroy();
}
-void Context::setSurface(Surface *sur)
+void Context::setSurface(uint32_t w, uint32_t h, Surface *sur)
{
+ LOGV("setSurface %i %i %p", w, h, sur);
+
EGLBoolean ret;
if (mEGL.mSurface != NULL) {
ret = eglMakeCurrent(mEGL.mDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
@@ -437,10 +414,22 @@ void Context::setSurface(Surface *sur)
checkEglError("eglDestroySurface", ret);
mEGL.mSurface = NULL;
+ mEGL.mWidth = 0;
+ mEGL.mHeight = 0;
+ mWidth = 0;
+ mHeight = 0;
}
mWndSurface = sur;
if (mWndSurface != NULL) {
+ bool first = false;
+ if (!mEGL.mContext) {
+ first = true;
+ pthread_mutex_lock(&gInitMutex);
+ initEGL();
+ pthread_mutex_unlock(&gInitMutex);
+ }
+
mEGL.mSurface = eglCreateWindowSurface(mEGL.mDisplay, mEGL.mConfig, mWndSurface, NULL);
checkEglError("eglCreateWindowSurface");
if (mEGL.mSurface == EGL_NO_SURFACE) {
@@ -449,6 +438,36 @@ void Context::setSurface(Surface *sur)
ret = eglMakeCurrent(mEGL.mDisplay, mEGL.mSurface, mEGL.mSurface, mEGL.mContext);
checkEglError("eglMakeCurrent", ret);
+
+ eglQuerySurface(mEGL.mDisplay, mEGL.mSurface, EGL_WIDTH, &mEGL.mWidth);
+ eglQuerySurface(mEGL.mDisplay, mEGL.mSurface, EGL_HEIGHT, &mEGL.mHeight);
+ mWidth = w;
+ mHeight = h;
+ mStateVertex.updateSize(this, w, h);
+
+ if ((int)mWidth != mEGL.mWidth || (int)mHeight != mEGL.mHeight) {
+ LOGE("EGL/Surface mismatch EGL (%i x %i) SF (%i x %i)", mEGL.mWidth, mEGL.mHeight, mWidth, mHeight);
+ }
+
+ if (first) {
+ mGL.mVersion = glGetString(GL_VERSION);
+ mGL.mVendor = glGetString(GL_VENDOR);
+ mGL.mRenderer = glGetString(GL_RENDERER);
+ mGL.mExtensions = glGetString(GL_EXTENSIONS);
+
+ //LOGV("EGL Version %i %i", mEGL.mMajorVersion, mEGL.mMinorVersion);
+ LOGV("GL Version %s", mGL.mVersion);
+ LOGV("GL Vendor %s", mGL.mVendor);
+ LOGV("GL Renderer %s", mGL.mRenderer);
+ //LOGV("GL Extensions %s", mGL.mExtensions);
+
+ if ((strlen((const char *)mGL.mVersion) < 12) || memcmp(mGL.mVersion, "OpenGL ES-CM", 12)) {
+ LOGE("Error, OpenGL ES Lite not supported");
+ } else {
+ sscanf((const char *)mGL.mVersion + 13, "%i.%i", &mGL.mMajorVersion, &mGL.mMinorVersion);
+ }
+ }
+
}
}
@@ -767,19 +786,23 @@ void rsi_ContextResume(Context *rsc)
rsc->resume();
}
-void rsi_ContextSetSurface(Context *rsc, void *sur)
+void rsi_ContextSetSurface(Context *rsc, uint32_t w, uint32_t h, void *sur)
+{
+ rsc->setSurface(w, h, (Surface *)sur);
+}
+
+void rsi_ContextSetPriority(Context *rsc, uint32_t p)
{
- rsc->setSurface((Surface *)sur);
}
}
}
-RsContext rsContextCreate(RsDevice vdev, void *sur, uint32_t version, bool useDepth)
+RsContext rsContextCreate(RsDevice vdev, uint32_t version, bool useDepth)
{
Device * dev = static_cast<Device *>(vdev);
- Context *rsc = new Context(dev, (Surface *)sur, useDepth);
+ Context *rsc = new Context(dev, useDepth);
return rsc;
}
diff --git a/libs/rs/rsContext.h b/libs/rs/rsContext.h
index bffc55b..f3803a5 100644
--- a/libs/rs/rsContext.h
+++ b/libs/rs/rsContext.h
@@ -49,7 +49,7 @@ namespace renderscript {
class Context
{
public:
- Context(Device *, Surface *, bool useDepth);
+ Context(Device *, bool useDepth);
~Context();
static pthread_key_t gThreadTLSKey;
@@ -94,7 +94,7 @@ public:
void pause();
void resume();
- void setSurface(Surface *sur);
+ void setSurface(uint32_t w, uint32_t h, Surface *sur);
void assignName(ObjectBase *obj, const char *name, uint32_t len);
void removeName(ObjectBase *obj);
@@ -189,6 +189,9 @@ protected:
} mGL;
+ uint32_t mWidth;
+ uint32_t mHeight;
+
bool mRunning;
bool mExit;
bool mUseDepth;
diff --git a/libs/rs/rsLocklessFifo.cpp b/libs/rs/rsLocklessFifo.cpp
index 085a81e..c796520 100644
--- a/libs/rs/rsLocklessFifo.cpp
+++ b/libs/rs/rsLocklessFifo.cpp
@@ -57,7 +57,7 @@ bool LocklessCommandFifo::init(uint32_t sizeInBytes)
mPut = mBuffer;
mGet = mBuffer;
mEnd = mBuffer + (sizeInBytes) - 1;
- dumpState("init");
+ //dumpState("init");
return true;
}
diff --git a/libs/rs/rsProgramVertex.cpp b/libs/rs/rsProgramVertex.cpp
index eea8b3b..68f589f 100644
--- a/libs/rs/rsProgramVertex.cpp
+++ b/libs/rs/rsProgramVertex.cpp
@@ -157,12 +157,17 @@ void ProgramVertexState::init(Context *rsc, int32_t w, int32_t h)
pv->bindAllocation(alloc);
+ updateSize(rsc, w, h);
+}
+
+void ProgramVertexState::updateSize(Context *rsc, int32_t w, int32_t h)
+{
Matrix m;
m.loadOrtho(0,w, h,0, -1,1);
- alloc->subData(RS_PROGRAM_VERTEX_PROJECTION_OFFSET, 16, &m.m[0], 16*4);
+ mDefaultAlloc->subData(RS_PROGRAM_VERTEX_PROJECTION_OFFSET, 16, &m.m[0], 16*4);
m.loadIdentity();
- alloc->subData(RS_PROGRAM_VERTEX_MODELVIEW_OFFSET, 16, &m.m[0], 16*4);
+ mDefaultAlloc->subData(RS_PROGRAM_VERTEX_MODELVIEW_OFFSET, 16, &m.m[0], 16*4);
}
void ProgramVertexState::deinit(Context *rsc)
diff --git a/libs/rs/rsProgramVertex.h b/libs/rs/rsProgramVertex.h
index 493668c..a97ba38 100644
--- a/libs/rs/rsProgramVertex.h
+++ b/libs/rs/rsProgramVertex.h
@@ -63,6 +63,7 @@ public:
void init(Context *rsc, int32_t w, int32_t h);
void deinit(Context *rsc);
+ void updateSize(Context *rsc, int32_t w, int32_t h);
ObjectBaseRef<ProgramVertex> mDefault;
ObjectBaseRef<ProgramVertex> mLast;
diff --git a/libs/rs/rsUtils.h b/libs/rs/rsUtils.h
index 63d73a1..07f8933 100644
--- a/libs/rs/rsUtils.h
+++ b/libs/rs/rsUtils.h
@@ -18,7 +18,7 @@
#define ANDROID_RS_UTILS_H
#define LOG_NDEBUG 0
-#define LOG_TAG "rs"
+#define LOG_TAG "RenderScript"
#include <utils/Log.h>
#include <utils/Vector.h>
#include <utils/KeyedVector.h>
diff --git a/libs/surfaceflinger/LayerBuffer.cpp b/libs/surfaceflinger/LayerBuffer.cpp
index a36304c..28d7c48 100644
--- a/libs/surfaceflinger/LayerBuffer.cpp
+++ b/libs/surfaceflinger/LayerBuffer.cpp
@@ -26,6 +26,8 @@
#include <ui/GraphicBuffer.h>
#include <ui/PixelFormat.h>
#include <ui/FramebufferNativeWindow.h>
+#include <ui/Rect.h>
+#include <ui/Region.h>
#include <hardware/copybit.h>
@@ -46,12 +48,15 @@ gralloc_module_t const* LayerBuffer::sGrallocModule = 0;
LayerBuffer::LayerBuffer(SurfaceFlinger* flinger, DisplayID display,
const sp<Client>& client, int32_t i)
: LayerBaseClient(flinger, display, client, i),
- mNeedsBlending(false)
+ mNeedsBlending(false), mBlitEngine(0)
{
}
LayerBuffer::~LayerBuffer()
{
+ if (mBlitEngine) {
+ copybit_close(mBlitEngine);
+ }
}
void LayerBuffer::onFirstRef()
@@ -69,6 +74,10 @@ void LayerBuffer::onFirstRef()
sGrallocModule = (gralloc_module_t const *)module;
}
}
+
+ if (hw_get_module(COPYBIT_HARDWARE_MODULE_ID, &module) == 0) {
+ copybit_open(module, &mBlitEngine);
+ }
}
sp<LayerBaseClient::Surface> LayerBuffer::createSurface() const
@@ -350,6 +359,35 @@ LayerBuffer::BufferSource::BufferSource(LayerBuffer& layer,
return;
}
+ if (mLayer.mBlitEngine) {
+ // create our temporary buffer and corresponding EGLImageKHR.
+ // note that the size of this buffer doesn't really matter,
+ // the final image will always be drawn with proper aspect ratio.
+
+ int w = buffers.w;
+ int h = buffers.h;
+ mTempGraphicBuffer.clear();
+ mTempGraphicBuffer = new GraphicBuffer(
+ w, h, HAL_PIXEL_FORMAT_RGBX_8888,
+ GraphicBuffer::USAGE_HW_TEXTURE |
+ GraphicBuffer::USAGE_HW_2D);
+
+ if (mTempGraphicBuffer->initCheck() == NO_ERROR) {
+ NativeBuffer& dst(mTempBuffer);
+ dst.img.w = mTempGraphicBuffer->getStride();
+ dst.img.h = mTempGraphicBuffer->getHeight();
+ dst.img.format = mTempGraphicBuffer->getPixelFormat();
+ dst.img.handle = (native_handle_t *)mTempGraphicBuffer->handle;
+ dst.img.base = 0;
+ dst.crop.l = 0;
+ dst.crop.t = 0;
+ dst.crop.r = mTempGraphicBuffer->getWidth();
+ dst.crop.b = mTempGraphicBuffer->getHeight();
+ } else {
+ mTempGraphicBuffer.clear();
+ }
+ }
+
mBufferHeap = buffers;
mLayer.setNeedsBlending((info.h_alpha - info.l_alpha) > 0);
mBufferSize = info.getScanlineSize(buffers.hor_stride)*buffers.ver_stride;
@@ -438,15 +476,35 @@ void LayerBuffer::BufferSource::onDraw(const Region& clip) const
#if defined(EGL_ANDROID_image_native_buffer)
if (mLayer.mFlags & DisplayHardware::DIRECT_TEXTURE) {
- // NOTE: Assume the buffer is allocated with the proper USAGE flags
- sp<GraphicBuffer> graphicBuffer = new GraphicBuffer(
- src.crop.r, src.crop.b, src.img.format,
- GraphicBuffer::USAGE_HW_TEXTURE,
- src.img.w, src.img.handle, false);
+ copybit_device_t* copybit = mLayer.mBlitEngine;
+ if (copybit) {
+ // create our EGLImageKHR the first time
+ if (mTexture.image == EGL_NO_IMAGE_KHR) {
+ err = NO_MEMORY;
+ if (mTempGraphicBuffer!=0) {
+ err = mLayer.initializeEglImage(
+ mTempGraphicBuffer, &mTexture);
+ // once the EGLImage has been created (whether it fails
+ // or not) we don't need the graphic buffer reference
+ // anymore.
+ mTempGraphicBuffer.clear();
+ }
+ }
- graphicBuffer->setVerticalStride(src.img.h);
+ if (err == NO_ERROR) {
+ // NOTE: Assume the buffer is allocated with the proper USAGE flags
+ const NativeBuffer& dst(mTempBuffer);
+ region_iterator clip(Region(Rect(dst.crop.r, dst.crop.b)));
+ copybit->set_parameter(copybit, COPYBIT_TRANSFORM, 0);
+ copybit->set_parameter(copybit, COPYBIT_PLANE_ALPHA, 0xFF);
+ copybit->set_parameter(copybit, COPYBIT_DITHER, COPYBIT_ENABLE);
+ err = copybit->stretch(copybit, &dst.img, &src.img,
+ &dst.crop, &src.crop, &clip);
- err = mLayer.initializeEglImage(graphicBuffer, &mTexture);
+ }
+ } else {
+ err = INVALID_OPERATION;
+ }
}
#endif
else {
diff --git a/libs/surfaceflinger/LayerBuffer.h b/libs/surfaceflinger/LayerBuffer.h
index 47482f4..1abb103 100644
--- a/libs/surfaceflinger/LayerBuffer.h
+++ b/libs/surfaceflinger/LayerBuffer.h
@@ -135,8 +135,9 @@ private:
status_t mStatus;
ISurface::BufferHeap mBufferHeap;
size_t mBufferSize;
- mutable sp<GraphicBuffer> mTempBitmap;
mutable LayerBase::Texture mTexture;
+ NativeBuffer mTempBuffer;
+ mutable sp<GraphicBuffer> mTempGraphicBuffer;
};
class OverlaySource : public Source {
@@ -205,6 +206,7 @@ private:
sp<Surface> mSurface;
bool mInvalidate;
bool mNeedsBlending;
+ copybit_device_t* mBlitEngine;
};
// ---------------------------------------------------------------------------
diff --git a/libs/ui/FramebufferNativeWindow.cpp b/libs/ui/FramebufferNativeWindow.cpp
index 0efba9c..c5e22e5 100644
--- a/libs/ui/FramebufferNativeWindow.cpp
+++ b/libs/ui/FramebufferNativeWindow.cpp
@@ -118,8 +118,6 @@ FramebufferNativeWindow::FramebufferNativeWindow()
LOGE_IF(err, "fb buffer 1 allocation failed w=%d, h=%d, err=%s",
fbDev->width, fbDev->height, strerror(-err));
- LOGE("xDpi %d", fbDev->xdpi);
- LOGE("yDpi %d", fbDev->ydpi);
const_cast<uint32_t&>(android_native_window_t::flags) = fbDev->flags;
const_cast<float&>(android_native_window_t::xdpi) = fbDev->xdpi;
const_cast<float&>(android_native_window_t::ydpi) = fbDev->ydpi;
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index 58a0bba..3b40612 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -222,15 +222,6 @@ public class AudioService extends IAudioService.Stub {
// Broadcast receiver for device connections intent broadcasts
private final BroadcastReceiver mReceiver = new AudioServiceBroadcastReceiver();
- //TODO: use common definitions with HeadsetObserver
- private static final int BIT_HEADSET = (1 << 0);
- private static final int BIT_HEADSET_NO_MIC = (1 << 1);
- private static final int BIT_TTY = (1 << 2);
- private static final int BIT_FM_HEADSET = (1 << 3);
- private static final int BIT_FM_SPEAKER = (1 << 4);
-
- private int mHeadsetState;
-
// Devices currently connected
private HashMap <Integer, String> mConnectedDevices = new HashMap <Integer, String>();
@@ -254,7 +245,6 @@ public class AudioService extends IAudioService.Stub {
mVolumePanel = new VolumePanel(context, this);
mSettingsObserver = new SettingsObserver();
mMode = AudioSystem.MODE_NORMAL;
- mHeadsetState = 0;
mForcedUseForComm = AudioSystem.FORCE_NONE;
createAudioSystemThread();
readPersistedSettings();
@@ -1460,72 +1450,35 @@ public class AudioService extends IAudioService.Stub {
}
} else if (action.equals(Intent.ACTION_HEADSET_PLUG)) {
int state = intent.getIntExtra("state", 0);
- if ((state & BIT_HEADSET) == 0 &&
- (mHeadsetState & BIT_HEADSET) != 0) {
- AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_WIRED_HEADSET,
- AudioSystem.DEVICE_STATE_UNAVAILABLE,
- "");
- mConnectedDevices.remove(AudioSystem.DEVICE_OUT_WIRED_HEADSET);
- } else if ((state & BIT_HEADSET) != 0 &&
- (mHeadsetState & BIT_HEADSET) == 0) {
- AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_WIRED_HEADSET,
- AudioSystem.DEVICE_STATE_AVAILABLE,
- "");
- mConnectedDevices.put( new Integer(AudioSystem.DEVICE_OUT_WIRED_HEADSET), "");
- }
- if ((state & BIT_HEADSET_NO_MIC) == 0 &&
- (mHeadsetState & BIT_HEADSET_NO_MIC) != 0) {
- AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE,
- AudioSystem.DEVICE_STATE_UNAVAILABLE,
- "");
- mConnectedDevices.remove(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE);
- } else if ((state & BIT_HEADSET_NO_MIC) != 0 &&
- (mHeadsetState & BIT_HEADSET_NO_MIC) == 0) {
- AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE,
- AudioSystem.DEVICE_STATE_AVAILABLE,
- "");
- mConnectedDevices.put( new Integer(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE), "");
- }
- if ((state & BIT_TTY) == 0 &&
- (mHeadsetState & BIT_TTY) != 0) {
- AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_TTY,
- AudioSystem.DEVICE_STATE_UNAVAILABLE,
- "");
- mConnectedDevices.remove(AudioSystem.DEVICE_OUT_TTY);
- } else if ((state & BIT_TTY) != 0 &&
- (mHeadsetState & BIT_TTY) == 0) {
- AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_TTY,
- AudioSystem.DEVICE_STATE_AVAILABLE,
- "");
- mConnectedDevices.put( new Integer(AudioSystem.DEVICE_OUT_TTY), "");
- }
- if ((state & BIT_FM_HEADSET) == 0 &&
- (mHeadsetState & BIT_FM_HEADSET) != 0) {
- AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_FM_HEADPHONE,
- AudioSystem.DEVICE_STATE_UNAVAILABLE,
- "");
- mConnectedDevices.remove(AudioSystem.DEVICE_OUT_FM_HEADPHONE);
- } else if ((state & BIT_FM_HEADSET) != 0 &&
- (mHeadsetState & BIT_FM_HEADSET) == 0) {
- AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_FM_HEADPHONE,
- AudioSystem.DEVICE_STATE_AVAILABLE,
- "");
- mConnectedDevices.put( new Integer(AudioSystem.DEVICE_OUT_FM_HEADPHONE), "");
- }
- if ((state & BIT_FM_SPEAKER) == 0 &&
- (mHeadsetState & BIT_FM_SPEAKER) != 0) {
- AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_FM_SPEAKER,
- AudioSystem.DEVICE_STATE_UNAVAILABLE,
- "");
- mConnectedDevices.remove(AudioSystem.DEVICE_OUT_FM_SPEAKER);
- } else if ((state & BIT_FM_SPEAKER) != 0 &&
- (mHeadsetState & BIT_FM_SPEAKER) == 0) {
- AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_FM_SPEAKER,
- AudioSystem.DEVICE_STATE_AVAILABLE,
- "");
- mConnectedDevices.put( new Integer(AudioSystem.DEVICE_OUT_FM_SPEAKER), "");
+ int microphone = intent.getIntExtra("microphone", 0);
+
+ if (microphone != 0) {
+ boolean isConnected = mConnectedDevices.containsKey(AudioSystem.DEVICE_OUT_WIRED_HEADSET);
+ if (state == 0 && isConnected) {
+ AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_WIRED_HEADSET,
+ AudioSystem.DEVICE_STATE_UNAVAILABLE,
+ "");
+ mConnectedDevices.remove(AudioSystem.DEVICE_OUT_WIRED_HEADSET);
+ } else if (state == 1 && !isConnected) {
+ AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_WIRED_HEADSET,
+ AudioSystem.DEVICE_STATE_AVAILABLE,
+ "");
+ mConnectedDevices.put( new Integer(AudioSystem.DEVICE_OUT_WIRED_HEADSET), "");
+ }
+ } else {
+ boolean isConnected = mConnectedDevices.containsKey(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE);
+ if (state == 0 && isConnected) {
+ AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE,
+ AudioSystem.DEVICE_STATE_UNAVAILABLE,
+ "");
+ mConnectedDevices.remove(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE);
+ } else if (state == 1 && !isConnected) {
+ AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE,
+ AudioSystem.DEVICE_STATE_AVAILABLE,
+ "");
+ mConnectedDevices.put( new Integer(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE), "");
+ }
}
- mHeadsetState = state;
}
}
}
diff --git a/media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java
index dbf6d9d..9fe5328 100644
--- a/media/java/android/media/AudioSystem.java
+++ b/media/java/android/media/AudioSystem.java
@@ -243,9 +243,6 @@ public class AudioSystem
public static final int DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES = 0x100;
public static final int DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER = 0x200;
public static final int DEVICE_OUT_AUX_DIGITAL = 0x400;
- public static final int DEVICE_OUT_FM_HEADPHONE = 0x800;
- public static final int DEVICE_OUT_FM_SPEAKER = 0x1000;
- public static final int DEVICE_OUT_TTY = 0x2000;
public static final int DEVICE_OUT_DEFAULT = 0x8000;
// input devices
public static final int DEVICE_IN_COMMUNICATION = 0x10000;
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index 8529a8e..cedd79d 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -318,26 +318,35 @@ void AudioTrack::start()
}
if (android_atomic_or(1, &mActive) == 0) {
- audio_io_handle_t output = AudioTrack::getOutput();
+ audio_io_handle_t output = getOutput();
+ AudioSystem::startOutput(output, (AudioSystem::stream_type)mStreamType);
+ mNewPosition = mCblk->server + mUpdatePeriod;
+ mCblk->bufferTimeoutMs = MAX_STARTUP_TIMEOUT_MS;
+ mCblk->waitTimeMs = 0;
+ if (t != 0) {
+ t->run("AudioTrackThread", THREAD_PRIORITY_AUDIO_CLIENT);
+ } else {
+ setpriority(PRIO_PROCESS, 0, THREAD_PRIORITY_AUDIO_CLIENT);
+ }
+
status_t status = mAudioTrack->start();
if (status == DEAD_OBJECT) {
LOGV("start() dead IAudioTrack: creating a new one");
status = createTrack(mStreamType, mCblk->sampleRate, mFormat, mChannelCount,
mFrameCount, mFlags, mSharedBuffer, output);
- }
- if (status == NO_ERROR) {
- AudioSystem::startOutput(output, (AudioSystem::stream_type)mStreamType);
mNewPosition = mCblk->server + mUpdatePeriod;
mCblk->bufferTimeoutMs = MAX_STARTUP_TIMEOUT_MS;
mCblk->waitTimeMs = 0;
+ }
+ if (status != NO_ERROR) {
+ LOGV("start() failed");
+ android_atomic_and(~1, &mActive);
if (t != 0) {
- t->run("AudioTrackThread", THREAD_PRIORITY_AUDIO_CLIENT);
+ t->requestExit();
} else {
- setpriority(PRIO_PROCESS, 0, THREAD_PRIORITY_AUDIO_CLIENT);
+ setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_NORMAL);
}
- } else {
- LOGV("start() failed");
- android_atomic_and(~1, &mActive);
+ AudioSystem::stopOutput(output, (AudioSystem::stream_type)mStreamType);
}
}
diff --git a/media/libstagefright/include/QComHardwareRenderer.h b/media/libstagefright/include/QComHardwareRenderer.h
deleted file mode 100644
index 8292dd5..0000000
--- a/media/libstagefright/include/QComHardwareRenderer.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef QCOM_HARDWARE_RENDERER_H_
-
-#define QCOM_HARDWARE_RENDERER_H_
-
-#include <media/stagefright/VideoRenderer.h>
-#include <utils/RefBase.h>
-
-namespace android {
-
-class ISurface;
-class MemoryHeapPmem;
-
-class QComHardwareRenderer : public VideoRenderer {
-public:
- QComHardwareRenderer(
- const sp<ISurface> &surface,
- size_t displayWidth, size_t displayHeight,
- size_t decodedWidth, size_t decodedHeight);
-
- virtual ~QComHardwareRenderer();
-
- virtual void render(
- const void *data, size_t size, void *platformPrivate);
-
-private:
- sp<ISurface> mISurface;
- size_t mDisplayWidth, mDisplayHeight;
- size_t mDecodedWidth, mDecodedHeight;
- size_t mFrameSize;
- sp<MemoryHeapPmem> mMemoryHeap;
-
- bool getOffset(void *platformPrivate, size_t *offset);
- void publishBuffers(uint32_t pmem_fd);
-
- QComHardwareRenderer(const QComHardwareRenderer &);
- QComHardwareRenderer &operator=(const QComHardwareRenderer &);
-};
-
-} // namespace android
-
-#endif // QCOM_HARDWARE_RENDERER_H_
diff --git a/media/libstagefright/include/TIHardwareRenderer.h b/media/libstagefright/include/TIHardwareRenderer.h
deleted file mode 100644
index ef42648..0000000
--- a/media/libstagefright/include/TIHardwareRenderer.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef TI_HARDWARE_RENDERER_H_
-
-#define TI_HARDWARE_RENDERER_H_
-
-#include <media/stagefright/VideoRenderer.h>
-#include <utils/RefBase.h>
-#include <utils/Vector.h>
-
-namespace android {
-
-class ISurface;
-class Overlay;
-
-class TIHardwareRenderer : public VideoRenderer {
-public:
- TIHardwareRenderer(
- const sp<ISurface> &surface,
- size_t displayWidth, size_t displayHeight,
- size_t decodedWidth, size_t decodedHeight);
-
- virtual ~TIHardwareRenderer();
-
- virtual void render(
- const void *data, size_t size, void *platformPrivate);
-
-private:
- sp<ISurface> mISurface;
- size_t mDisplayWidth, mDisplayHeight;
- size_t mDecodedWidth, mDecodedHeight;
- size_t mFrameSize;
- sp<Overlay> mOverlay;
- Vector<void *> mOverlayAddresses;
- bool mIsFirstFrame;
- size_t mIndex;
-
- TIHardwareRenderer(const TIHardwareRenderer &);
- TIHardwareRenderer &operator=(const TIHardwareRenderer &);
-};
-
-} // namespace android
-
-#endif // TI_HARDWARE_RENDERER_H_
-
diff --git a/media/libstagefright/omx/Android.mk b/media/libstagefright/omx/Android.mk
index edbc04e..389c2c9 100644
--- a/media/libstagefright/omx/Android.mk
+++ b/media/libstagefright/omx/Android.mk
@@ -6,16 +6,13 @@ include external/opencore/Config.mk
LOCAL_C_INCLUDES := $(PV_INCLUDES)
LOCAL_CFLAGS := $(PV_CFLAGS_MINUS_VISIBILITY)
-LOCAL_C_INCLUDES += $(TOP)/hardware/ti/omap3/liboverlay
LOCAL_C_INCLUDES += $(JNI_H_INCLUDE)
LOCAL_SRC_FILES:= \
ColorConverter.cpp \
OMX.cpp \
OMXNodeInstance.cpp \
- QComHardwareRenderer.cpp \
- SoftwareRenderer.cpp \
- TIHardwareRenderer.cpp
+ SoftwareRenderer.cpp
LOCAL_SHARED_LIBRARIES := \
libbinder \
@@ -26,7 +23,11 @@ LOCAL_SHARED_LIBRARIES := \
libopencore_common
ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
- LOCAL_LDLIBS += -lpthread
+ LOCAL_LDLIBS += -lpthread -ldl
+endif
+
+ifneq ($(TARGET_SIMULATOR),true)
+LOCAL_SHARED_LIBRARIES += libdl
endif
LOCAL_PRELINK_MODULE:= false
diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp
index e361018..5b3cc1b 100644
--- a/media/libstagefright/omx/OMX.cpp
+++ b/media/libstagefright/omx/OMX.cpp
@@ -24,9 +24,7 @@
#include "pv_omxcore.h"
#include "../include/OMXNodeInstance.h"
-#include "../include/QComHardwareRenderer.h"
#include "../include/SoftwareRenderer.h"
-#include "../include/TIHardwareRenderer.h"
#include <binder/IMemory.h>
#include <media/stagefright/MediaDebug.h>
@@ -431,27 +429,37 @@ sp<IOMXRenderer> OMX::createRenderer(
OMX_COLOR_FORMATTYPE colorFormat,
size_t encodedWidth, size_t encodedHeight,
size_t displayWidth, size_t displayHeight) {
+ Mutex::Autolock autoLock(mLock);
+
VideoRenderer *impl = NULL;
- static const int OMX_QCOM_COLOR_FormatYVU420SemiPlanar = 0x7FA30C00;
-
- if (colorFormat == OMX_QCOM_COLOR_FormatYVU420SemiPlanar
- && !strncmp(componentName, "OMX.qcom.video.decoder.", 23)) {
- LOGW("Using QComHardwareRenderer.");
- impl =
- new QComHardwareRenderer(
- surface,
- displayWidth, displayHeight,
- encodedWidth, encodedHeight);
- } else if (colorFormat == OMX_COLOR_FormatCbYCrY
- && !strcmp(componentName, "OMX.TI.Video.Decoder")) {
- LOGW("Using TIHardwareRenderer.");
- impl =
- new TIHardwareRenderer(
- surface,
- displayWidth, displayHeight,
- encodedWidth, encodedHeight);
- } else {
+ static void *libHandle = NULL;
+
+ if (!libHandle) {
+ libHandle = dlopen("libstagefrighthw.so", RTLD_NOW);
+ }
+
+ if (libHandle) {
+ typedef VideoRenderer *(*CreateRendererFunc)(
+ const sp<ISurface> &surface,
+ const char *componentName,
+ OMX_COLOR_FORMATTYPE colorFormat,
+ size_t displayWidth, size_t displayHeight,
+ size_t decodedWidth, size_t decodedHeight);
+
+ CreateRendererFunc func =
+ (CreateRendererFunc)dlsym(
+ libHandle,
+ "_Z14createRendererRKN7android2spINS_8ISurfaceEEEPKc20"
+ "OMX_COLOR_FORMATTYPEjjjj");
+
+ if (func) {
+ impl = (*func)(surface, componentName, colorFormat,
+ displayWidth, displayHeight, encodedWidth, encodedHeight);
+ }
+ }
+
+ if (!impl) {
LOGW("Using software renderer.");
impl = new SoftwareRenderer(
colorFormat,
diff --git a/media/libstagefright/omx/QComHardwareRenderer.cpp b/media/libstagefright/omx/QComHardwareRenderer.cpp
deleted file mode 100644
index 837b6a4..0000000
--- a/media/libstagefright/omx/QComHardwareRenderer.cpp
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "../include/QComHardwareRenderer.h"
-
-#include <binder/MemoryHeapBase.h>
-#include <binder/MemoryHeapPmem.h>
-#include <media/stagefright/MediaDebug.h>
-#include <ui/ISurface.h>
-
-namespace android {
-
-////////////////////////////////////////////////////////////////////////////////
-
-typedef struct PLATFORM_PRIVATE_ENTRY
-{
- /* Entry type */
- uint32_t type;
-
- /* Pointer to platform specific entry */
- void *entry;
-
-} PLATFORM_PRIVATE_ENTRY;
-
-typedef struct PLATFORM_PRIVATE_LIST
-{
- /* Number of entries */
- uint32_t nEntries;
-
- /* Pointer to array of platform specific entries *
- * Contiguous block of PLATFORM_PRIVATE_ENTRY elements */
- PLATFORM_PRIVATE_ENTRY *entryList;
-
-} PLATFORM_PRIVATE_LIST;
-
-// data structures for tunneling buffers
-typedef struct PLATFORM_PRIVATE_PMEM_INFO
-{
- /* pmem file descriptor */
- uint32_t pmem_fd;
- uint32_t offset;
-
-} PLATFORM_PRIVATE_PMEM_INFO;
-
-#define PLATFORM_PRIVATE_PMEM 1
-
-QComHardwareRenderer::QComHardwareRenderer(
- const sp<ISurface> &surface,
- size_t displayWidth, size_t displayHeight,
- size_t decodedWidth, size_t decodedHeight)
- : mISurface(surface),
- mDisplayWidth(displayWidth),
- mDisplayHeight(displayHeight),
- mDecodedWidth(decodedWidth),
- mDecodedHeight(decodedHeight),
- mFrameSize((mDecodedWidth * mDecodedHeight * 3) / 2) {
- CHECK(mISurface.get() != NULL);
- CHECK(mDecodedWidth > 0);
- CHECK(mDecodedHeight > 0);
-}
-
-QComHardwareRenderer::~QComHardwareRenderer() {
- mISurface->unregisterBuffers();
-}
-
-void QComHardwareRenderer::render(
- const void *data, size_t size, void *platformPrivate) {
- size_t offset;
- if (!getOffset(platformPrivate, &offset)) {
- return;
- }
-
- mISurface->postBuffer(offset);
-
- // Since we cannot tell how long it'll take until surface flinger
- // has displayed the data onscreen, we'll just have to guess...
- // We must not return the buffer to the decoder before it's been displayed.
- usleep(25000);
-}
-
-bool QComHardwareRenderer::getOffset(void *platformPrivate, size_t *offset) {
- *offset = 0;
-
- PLATFORM_PRIVATE_LIST *list = (PLATFORM_PRIVATE_LIST *)platformPrivate;
- for (uint32_t i = 0; i < list->nEntries; ++i) {
- if (list->entryList[i].type != PLATFORM_PRIVATE_PMEM) {
- continue;
- }
-
- PLATFORM_PRIVATE_PMEM_INFO *info =
- (PLATFORM_PRIVATE_PMEM_INFO *)list->entryList[i].entry;
-
- if (info != NULL) {
- if (mMemoryHeap.get() == NULL) {
- publishBuffers(info->pmem_fd);
- }
-
- if (mMemoryHeap.get() == NULL) {
- return false;
- }
-
- *offset = info->offset;
-
- return true;
- }
- }
-
- return false;
-}
-
-void QComHardwareRenderer::publishBuffers(uint32_t pmem_fd) {
- sp<MemoryHeapBase> master =
- reinterpret_cast<MemoryHeapBase *>(pmem_fd);
-
- master->setDevice("/dev/pmem");
-
- uint32_t heap_flags = master->getFlags() & MemoryHeapBase::NO_CACHING;
- mMemoryHeap = new MemoryHeapPmem(master, heap_flags);
- mMemoryHeap->slap();
-
- ISurface::BufferHeap bufferHeap(
- mDisplayWidth, mDisplayHeight,
- mDecodedWidth, mDecodedHeight,
- PIXEL_FORMAT_YCbCr_420_SP,
- mMemoryHeap);
-
- status_t err = mISurface->registerBuffers(bufferHeap);
- CHECK_EQ(err, OK);
-}
-
-} // namespace android
diff --git a/media/libstagefright/omx/TIHardwareRenderer.cpp b/media/libstagefright/omx/TIHardwareRenderer.cpp
deleted file mode 100644
index 6dde86a..0000000
--- a/media/libstagefright/omx/TIHardwareRenderer.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "TIHardwareRenderer"
-#include <utils/Log.h>
-
-#include "../include/TIHardwareRenderer.h"
-
-#include <media/stagefright/MediaDebug.h>
-#include <ui/ISurface.h>
-#include <ui/Overlay.h>
-
-#include "v4l2_utils.h"
-
-#define CACHEABLE_BUFFERS 0x1
-
-namespace android {
-
-////////////////////////////////////////////////////////////////////////////////
-
-TIHardwareRenderer::TIHardwareRenderer(
- const sp<ISurface> &surface,
- size_t displayWidth, size_t displayHeight,
- size_t decodedWidth, size_t decodedHeight)
- : mISurface(surface),
- mDisplayWidth(displayWidth),
- mDisplayHeight(displayHeight),
- mDecodedWidth(decodedWidth),
- mDecodedHeight(decodedHeight),
- mFrameSize(mDecodedWidth * mDecodedHeight * 2),
- mIsFirstFrame(true),
- mIndex(0) {
- CHECK(mISurface.get() != NULL);
- CHECK(mDecodedWidth > 0);
- CHECK(mDecodedHeight > 0);
-
- sp<OverlayRef> ref = mISurface->createOverlay(
- mDisplayWidth, mDisplayHeight, OVERLAY_FORMAT_CbYCrY_422_I);
-
- if (ref.get() == NULL) {
- LOGE("Unable to create the overlay!");
- return;
- }
-
- mOverlay = new Overlay(ref);
- mOverlay->setParameter(CACHEABLE_BUFFERS, 0);
-
- for (size_t i = 0; i < (size_t)mOverlay->getBufferCount(); ++i) {
- mapping_data_t *data =
- (mapping_data_t *)mOverlay->getBufferAddress((void *)i);
-
- mOverlayAddresses.push(data->ptr);
- }
-}
-
-TIHardwareRenderer::~TIHardwareRenderer() {
- if (mOverlay.get() != NULL) {
- mOverlay->destroy();
- mOverlay.clear();
-
- // XXX apparently destroying an overlay is an asynchronous process...
- sleep(1);
- }
-}
-
-void TIHardwareRenderer::render(
- const void *data, size_t size, void *platformPrivate) {
- // CHECK_EQ(size, mFrameSize);
-
- if (mOverlay.get() == NULL) {
- return;
- }
-
-#if 0
- size_t i = 0;
- for (; i < mOverlayAddresses.size(); ++i) {
- if (mOverlayAddresses[i] == data) {
- break;
- }
-
- if (mIsFirstFrame) {
- LOGI("overlay buffer #%d: %p", i, mOverlayAddresses[i]);
- }
- }
-
- if (i == mOverlayAddresses.size()) {
- LOGE("No suitable overlay buffer found.");
- return;
- }
-
- mOverlay->queueBuffer((void *)i);
-
- overlay_buffer_t overlay_buffer;
- if (!mIsFirstFrame) {
- CHECK_EQ(mOverlay->dequeueBuffer(&overlay_buffer), OK);
- } else {
- mIsFirstFrame = false;
- }
-#else
- memcpy(mOverlayAddresses[mIndex], data, size);
-
- mOverlay->queueBuffer((void *)mIndex);
-
- if (++mIndex == mOverlayAddresses.size()) {
- mIndex = 0;
- }
-
- overlay_buffer_t overlay_buffer;
- if (!mIsFirstFrame) {
- CHECK_EQ(mOverlay->dequeueBuffer(&overlay_buffer), OK);
- } else {
- mIsFirstFrame = false;
- }
-#endif
-}
-
-} // namespace android
-
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index 673c174..781b8c3 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -876,7 +876,7 @@ struct config_management_t {
#define VERSION_MAJOR 1
#define VERSION_MINOR 2
static char const * const gVendorString = "Google Inc.";
-static char const * const gVersionString = "1.2 Android Driver";
+static char const * const gVersionString = "1.2 Android Driver 1.1.0";
static char const * const gClientApiString = "OpenGL ES";
static char const * const gExtensionsString =
"EGL_KHR_image_base "
diff --git a/opengl/libagl/state.cpp b/opengl/libagl/state.cpp
index a59b3b0..0f1f27d 100644
--- a/opengl/libagl/state.cpp
+++ b/opengl/libagl/state.cpp
@@ -37,7 +37,7 @@ namespace android {
// ----------------------------------------------------------------------------
static char const * const gVendorString = "Android";
-static char const * const gRendererString = "Android PixelFlinger 1.1";
+static char const * const gRendererString = "Android PixelFlinger 1.2";
static char const * const gVersionString = "OpenGL ES-CM 1.0";
static char const * const gExtensionsString =
"GL_OES_byte_coordinates " // OK
diff --git a/services/java/com/android/server/DropBoxService.java b/services/java/com/android/server/DropBoxManagerService.java
index f4e5ebc..48d455d 100644
--- a/services/java/com/android/server/DropBoxService.java
+++ b/services/java/com/android/server/DropBoxManagerService.java
@@ -23,7 +23,7 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.net.Uri;
-import android.os.DropBox;
+import android.os.DropBoxManager;
import android.os.ParcelFileDescriptor;
import android.os.StatFs;
import android.os.SystemClock;
@@ -31,7 +31,7 @@ import android.provider.Settings;
import android.text.format.DateFormat;
import android.util.Log;
-import com.android.internal.os.IDropBoxService;
+import com.android.internal.os.IDropBoxManagerService;
import java.io.File;
import java.io.FileDescriptor;
@@ -54,13 +54,13 @@ import java.util.TreeSet;
import java.util.zip.GZIPOutputStream;
/**
- * Implementation of {@link IDropBoxService} using the filesystem.
- * Clients use {@link DropBox} to access this service.
+ * Implementation of {@link IDropBoxManagerService} using the filesystem.
+ * Clients use {@link DropBoxManager} to access this service.
*
* {@hide}
*/
-public final class DropBoxService extends IDropBoxService.Stub {
- private static final String TAG = "DropBoxService";
+public final class DropBoxManagerService extends IDropBoxManagerService.Stub {
+ private static final String TAG = "DropBoxManagerService";
private static final int DEFAULT_RESERVE_PERCENT = 10;
private static final int DEFAULT_QUOTA_PERCENT = 10;
private static final int DEFAULT_QUOTA_KB = 5 * 1024;
@@ -113,7 +113,7 @@ public final class DropBoxService extends IDropBoxService.Stub {
* @param context to use for receiving free space & gservices intents
* @param path to store drop box entries in
*/
- public DropBoxService(Context context, File path) {
+ public DropBoxManagerService(Context context, File path) {
mDropBoxDir = path;
// Set up intent receivers
@@ -131,13 +131,13 @@ public final class DropBoxService extends IDropBoxService.Stub {
mContext.unregisterReceiver(mReceiver);
}
- public void add(DropBox.Entry entry) {
+ public void add(DropBoxManager.Entry entry) {
File temp = null;
OutputStream output = null;
final String tag = entry.getTag();
try {
int flags = entry.getFlags();
- if ((flags & DropBox.IS_EMPTY) != 0) throw new IllegalArgumentException();
+ if ((flags & DropBoxManager.IS_EMPTY) != 0) throw new IllegalArgumentException();
init();
if (!isTagEnabled(tag)) return;
@@ -162,9 +162,9 @@ public final class DropBoxService extends IDropBoxService.Stub {
temp = new File(mDropBoxDir, "drop" + Thread.currentThread().getId() + ".tmp");
output = new FileOutputStream(temp);
- if (read == buffer.length && ((flags & DropBox.IS_GZIPPED) == 0)) {
+ if (read == buffer.length && ((flags & DropBoxManager.IS_GZIPPED) == 0)) {
output = new GZIPOutputStream(output);
- flags = flags | DropBox.IS_GZIPPED;
+ flags = flags | DropBoxManager.IS_GZIPPED;
}
do {
@@ -209,7 +209,7 @@ public final class DropBoxService extends IDropBoxService.Stub {
mContentResolver, Settings.Gservices.DROPBOX_TAG_PREFIX + tag));
}
- public synchronized DropBox.Entry getNextEntry(String tag, long millis) {
+ public synchronized DropBoxManager.Entry getNextEntry(String tag, long millis) {
if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.READ_LOGS)
!= PackageManager.PERMISSION_GRANTED) {
throw new SecurityException("READ_LOGS permission required");
@@ -227,11 +227,12 @@ public final class DropBoxService extends IDropBoxService.Stub {
for (EntryFile entry : list.contents.tailSet(new EntryFile(millis + 1))) {
if (entry.tag == null) continue;
- if ((entry.flags & DropBox.IS_EMPTY) != 0) {
- return new DropBox.Entry(entry.tag, entry.timestampMillis);
+ if ((entry.flags & DropBoxManager.IS_EMPTY) != 0) {
+ return new DropBoxManager.Entry(entry.tag, entry.timestampMillis);
}
try {
- return new DropBox.Entry(entry.tag, entry.timestampMillis, entry.file, entry.flags);
+ return new DropBoxManager.Entry(
+ entry.tag, entry.timestampMillis, entry.file, entry.flags);
} catch (IOException e) {
Log.e(TAG, "Can't read: " + entry.file, e);
// Continue to next file
@@ -244,7 +245,7 @@ public final class DropBoxService extends IDropBoxService.Stub {
public synchronized void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
!= PackageManager.PERMISSION_GRANTED) {
- pw.println("Permission Denial: Can't dump DropBoxService");
+ pw.println("Permission Denial: Can't dump DropBoxManagerService");
return;
}
@@ -298,25 +299,25 @@ public final class DropBoxService extends IDropBoxService.Stub {
if (entry.file == null) {
pw.println(" (no file)");
continue;
- } else if ((entry.flags & DropBox.IS_EMPTY) != 0) {
+ } else if ((entry.flags & DropBoxManager.IS_EMPTY) != 0) {
pw.println(" (contents lost)");
continue;
} else {
- pw.print((entry.flags & DropBox.IS_GZIPPED) != 0 ? " (comopressed " : " (");
- pw.print((entry.flags & DropBox.IS_TEXT) != 0 ? "text" : "data");
+ pw.print((entry.flags & DropBoxManager.IS_GZIPPED) != 0 ? " (comopressed " : " (");
+ pw.print((entry.flags & DropBoxManager.IS_TEXT) != 0 ? "text" : "data");
pw.format(", %d bytes)", entry.file.length());
pw.println();
}
- if (doFile || (doPrint && (entry.flags & DropBox.IS_TEXT) == 0)) {
+ if (doFile || (doPrint && (entry.flags & DropBoxManager.IS_TEXT) == 0)) {
if (!doPrint) pw.print(" ");
pw.println(entry.file.getPath());
}
- if ((entry.flags & DropBox.IS_TEXT) != 0 && (doPrint || !doFile)) {
- DropBox.Entry dbe = null;
+ if ((entry.flags & DropBoxManager.IS_TEXT) != 0 && (doPrint || !doFile)) {
+ DropBoxManager.Entry dbe = null;
try {
- dbe = new DropBox.Entry(
+ dbe = new DropBoxManager.Entry(
entry.tag, entry.timestampMillis, entry.file, entry.flags);
if (doPrint) {
@@ -408,14 +409,14 @@ public final class DropBoxService extends IDropBoxService.Stub {
*/
public EntryFile(File temp, File dir, String tag,long timestampMillis,
int flags, int blockSize) throws IOException {
- if ((flags & DropBox.IS_EMPTY) != 0) throw new IllegalArgumentException();
+ if ((flags & DropBoxManager.IS_EMPTY) != 0) throw new IllegalArgumentException();
this.tag = tag;
this.timestampMillis = timestampMillis;
this.flags = flags;
this.file = new File(dir, Uri.encode(tag) + "@" + timestampMillis +
- ((flags & DropBox.IS_TEXT) != 0 ? ".txt" : ".dat") +
- ((flags & DropBox.IS_GZIPPED) != 0 ? ".gz" : ""));
+ ((flags & DropBoxManager.IS_TEXT) != 0 ? ".txt" : ".dat") +
+ ((flags & DropBoxManager.IS_GZIPPED) != 0 ? ".gz" : ""));
if (!temp.renameTo(this.file)) {
throw new IOException("Can't rename " + temp + " to " + this.file);
@@ -433,7 +434,7 @@ public final class DropBoxService extends IDropBoxService.Stub {
public EntryFile(File dir, String tag, long timestampMillis) throws IOException {
this.tag = tag;
this.timestampMillis = timestampMillis;
- this.flags = DropBox.IS_EMPTY;
+ this.flags = DropBoxManager.IS_EMPTY;
this.file = new File(dir, Uri.encode(tag) + "@" + timestampMillis + ".lost");
this.blocks = 0;
new FileOutputStream(this.file).close();
@@ -453,26 +454,26 @@ public final class DropBoxService extends IDropBoxService.Stub {
if (at < 0) {
this.tag = null;
this.timestampMillis = 0;
- this.flags = DropBox.IS_EMPTY;
+ this.flags = DropBoxManager.IS_EMPTY;
return;
}
int flags = 0;
this.tag = Uri.decode(name.substring(0, at));
if (name.endsWith(".gz")) {
- flags |= DropBox.IS_GZIPPED;
+ flags |= DropBoxManager.IS_GZIPPED;
name = name.substring(0, name.length() - 3);
}
if (name.endsWith(".lost")) {
- flags |= DropBox.IS_EMPTY;
+ flags |= DropBoxManager.IS_EMPTY;
name = name.substring(at + 1, name.length() - 5);
} else if (name.endsWith(".txt")) {
- flags |= DropBox.IS_TEXT;
+ flags |= DropBoxManager.IS_TEXT;
name = name.substring(at + 1, name.length() - 4);
} else if (name.endsWith(".dat")) {
name = name.substring(at + 1, name.length() - 4);
} else {
- this.flags = DropBox.IS_EMPTY;
+ this.flags = DropBoxManager.IS_EMPTY;
this.timestampMillis = 0;
return;
}
@@ -490,7 +491,7 @@ public final class DropBoxService extends IDropBoxService.Stub {
public EntryFile(long millis) {
this.tag = null;
this.timestampMillis = millis;
- this.flags = DropBox.IS_EMPTY;
+ this.flags = DropBoxManager.IS_EMPTY;
this.file = null;
this.blocks = 0;
}
@@ -585,7 +586,7 @@ public final class DropBoxService extends IDropBoxService.Stub {
mAllFiles.blocks -= late.blocks;
FileList tagFiles = mFilesByTag.get(late.tag);
if (tagFiles.contents.remove(late)) tagFiles.blocks -= late.blocks;
- if ((late.flags & DropBox.IS_EMPTY) == 0) {
+ if ((late.flags & DropBoxManager.IS_EMPTY) == 0) {
enrollEntry(new EntryFile(
late.file, mDropBoxDir, late.tag, t++, late.flags, mBlockSize));
} else {
diff --git a/services/java/com/android/server/HeadsetObserver.java b/services/java/com/android/server/HeadsetObserver.java
index bee3108..58fa69e 100644
--- a/services/java/com/android/server/HeadsetObserver.java
+++ b/services/java/com/android/server/HeadsetObserver.java
@@ -43,9 +43,6 @@ class HeadsetObserver extends UEventObserver {
private static final int BIT_HEADSET = (1 << 0);
private static final int BIT_HEADSET_NO_MIC = (1 << 1);
- private static final int BIT_TTY = (1 << 2);
- private static final int BIT_FM_HEADSET = (1 << 3);
- private static final int BIT_FM_SPEAKER = (1 << 4);
private int mHeadsetState;
private int mPrevHeadsetState;
@@ -102,15 +99,18 @@ class HeadsetObserver extends UEventObserver {
}
private synchronized final void update(String newName, int newState) {
- if (newName != mHeadsetName || newState != mHeadsetState) {
+ // Retain only relevant bits
+ int headsetState = newState & (BIT_HEADSET|BIT_HEADSET_NO_MIC);
+
+ if (headsetState != mHeadsetState) {
boolean isUnplug = false;
- if ( (mHeadsetState & BIT_HEADSET) > 0 || (mHeadsetState & BIT_HEADSET_NO_MIC) > 0) {
- if ((newState & BIT_HEADSET) == 0 && (newState & BIT_HEADSET_NO_MIC) == 0)
- isUnplug = true;
+ if (((mHeadsetState & BIT_HEADSET) != 0 && (headsetState & BIT_HEADSET) == 0) ||
+ ((mHeadsetState & BIT_HEADSET_NO_MIC) != 0 && (headsetState & BIT_HEADSET_NO_MIC) == 0)) {
+ isUnplug = true;
}
mHeadsetName = newName;
mPrevHeadsetState = mHeadsetState;
- mHeadsetState = newState;
+ mHeadsetState = headsetState;
mPendingIntent = true;
if (isUnplug) {
@@ -135,9 +135,23 @@ class HeadsetObserver extends UEventObserver {
// Pack up the values and broadcast them to everyone
Intent intent = new Intent(Intent.ACTION_HEADSET_PLUG);
intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
+ int state = 0;
+ int microphone = 0;
+
+ if ((mHeadsetState & BIT_HEADSET) != (mPrevHeadsetState & BIT_HEADSET)) {
+ microphone = 1;
+ if ((mHeadsetState & BIT_HEADSET) != 0) {
+ state = 1;
+ }
+ } else if ((mHeadsetState & BIT_HEADSET_NO_MIC) != (mPrevHeadsetState & BIT_HEADSET_NO_MIC)) {
+ if ((mHeadsetState & BIT_HEADSET_NO_MIC) != 0) {
+ state = 1;
+ }
+ }
- intent.putExtra("state", mHeadsetState);
+ intent.putExtra("state", state);
intent.putExtra("name", mHeadsetName);
+ intent.putExtra("microphone", microphone);
// TODO: Should we require a permission?
ActivityManagerNative.broadcastStickyIntent(intent, null);
diff --git a/services/java/com/android/server/PackageManagerService.java b/services/java/com/android/server/PackageManagerService.java
index 39129d4..5ed2d35 100644
--- a/services/java/com/android/server/PackageManagerService.java
+++ b/services/java/com/android/server/PackageManagerService.java
@@ -102,6 +102,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.zip.ZipEntry;
+import java.util.zip.ZipException;
import java.util.zip.ZipFile;
import java.util.zip.ZipOutputStream;
@@ -2781,72 +2782,156 @@ class PackageManagerService extends IPackageManager.Stub {
return pkg;
}
- private int cachePackageSharedLibsLI(PackageParser.Package pkg,
- File dataPath, File scanFile) {
+ // The following constants are returned by cachePackageSharedLibsForAbiLI
+ // to indicate if native shared libraries were found in the package.
+ // Values are:
+ // PACKAGE_INSTALL_NATIVE_FOUND_LIBRARIES => native libraries found and installed
+ // PACKAGE_INSTALL_NATIVE_NO_LIBRARIES => no native libraries in package
+ // PACKAGE_INSTALL_NATIVE_ABI_MISMATCH => native libraries for another ABI found
+ // in package (and not installed)
+ //
+ private static final int PACKAGE_INSTALL_NATIVE_FOUND_LIBRARIES = 0;
+ private static final int PACKAGE_INSTALL_NATIVE_NO_LIBRARIES = 1;
+ private static final int PACKAGE_INSTALL_NATIVE_ABI_MISMATCH = 2;
+
+ // Find all files of the form lib/<cpuAbi>/lib<name>.so in the .apk
+ // and automatically copy them to /data/data/<appname>/lib if present.
+ //
+ // NOTE: this method may throw an IOException if the library cannot
+ // be copied to its final destination, e.g. if there isn't enough
+ // room left on the data partition, or a ZipException if the package
+ // file is malformed.
+ //
+ private int cachePackageSharedLibsForAbiLI( PackageParser.Package pkg,
+ File dataPath, File scanFile, String cpuAbi)
+ throws IOException, ZipException {
File sharedLibraryDir = new File(dataPath.getPath() + "/lib");
- final String sharedLibraryABI = Build.CPU_ABI;
- final String apkLibraryDirectory = "lib/" + sharedLibraryABI + "/";
- final String apkSharedLibraryPrefix = apkLibraryDirectory + "lib";
- final String sharedLibrarySuffix = ".so";
- boolean hasNativeCode = false;
- boolean installedNativeCode = false;
- try {
- ZipFile zipFile = new ZipFile(scanFile);
- Enumeration<ZipEntry> entries =
- (Enumeration<ZipEntry>) zipFile.entries();
+ final String apkLib = "lib/";
+ final int apkLibLen = apkLib.length();
+ final int cpuAbiLen = cpuAbi.length();
+ final String libPrefix = "lib";
+ final int libPrefixLen = libPrefix.length();
+ final String libSuffix = ".so";
+ final int libSuffixLen = libSuffix.length();
+ boolean hasNativeLibraries = false;
+ boolean installedNativeLibraries = false;
+
+ // the minimum length of a valid native shared library of the form
+ // lib/<something>/lib<name>.so.
+ final int minEntryLen = apkLibLen + 2 + libPrefixLen + 1 + libSuffixLen;
+
+ ZipFile zipFile = new ZipFile(scanFile);
+ Enumeration<ZipEntry> entries =
+ (Enumeration<ZipEntry>) zipFile.entries();
+
+ while (entries.hasMoreElements()) {
+ ZipEntry entry = entries.nextElement();
+ // skip directories
+ if (entry.isDirectory()) {
+ continue;
+ }
+ String entryName = entry.getName();
+
+ // check that the entry looks like lib/<something>/lib<name>.so
+ // here, but don't check the ABI just yet.
+ //
+ // - must be sufficiently long
+ // - must end with libSuffix, i.e. ".so"
+ // - must start with apkLib, i.e. "lib/"
+ if (entryName.length() < minEntryLen ||
+ !entryName.endsWith(libSuffix) ||
+ !entryName.startsWith(apkLib) ) {
+ continue;
+ }
- while (entries.hasMoreElements()) {
- ZipEntry entry = entries.nextElement();
- if (entry.isDirectory()) {
- if (!hasNativeCode && entry.getName().startsWith("lib")) {
- hasNativeCode = true;
- }
- continue;
+ // file name must start with libPrefix, i.e. "lib"
+ int lastSlash = entryName.lastIndexOf('/');
+
+ if (lastSlash < 0 ||
+ !entryName.regionMatches(lastSlash+1, libPrefix, 0, libPrefixLen) ) {
+ continue;
+ }
+
+ hasNativeLibraries = true;
+
+ // check the cpuAbi now, between lib/ and /lib<name>.so
+ //
+ if (lastSlash != apkLibLen + cpuAbiLen ||
+ !entryName.regionMatches(apkLibLen, cpuAbi, 0, cpuAbiLen) )
+ continue;
+
+ // extract the library file name, ensure it doesn't contain
+ // weird characters. we're guaranteed here that it doesn't contain
+ // a directory separator though.
+ String libFileName = entryName.substring(lastSlash+1);
+ if (!FileUtils.isFilenameSafe(new File(libFileName))) {
+ continue;
+ }
+
+ installedNativeLibraries = true;
+
+ String sharedLibraryFilePath = sharedLibraryDir.getPath() +
+ File.separator + libFileName;
+ File sharedLibraryFile = new File(sharedLibraryFilePath);
+ if (! sharedLibraryFile.exists() ||
+ sharedLibraryFile.length() != entry.getSize() ||
+ sharedLibraryFile.lastModified() != entry.getTime()) {
+ if (Config.LOGD) {
+ Log.d(TAG, "Caching shared lib " + entry.getName());
}
- String entryName = entry.getName();
- if (entryName.startsWith("lib/")) {
- hasNativeCode = true;
+ if (mInstaller == null) {
+ sharedLibraryDir.mkdir();
}
- if (! (entryName.startsWith(apkSharedLibraryPrefix)
- && entryName.endsWith(sharedLibrarySuffix))) {
- continue;
- }
- String libFileName = entryName.substring(
- apkLibraryDirectory.length());
- if (libFileName.contains("/")
- || (!FileUtils.isFilenameSafe(new File(libFileName)))) {
- continue;
+ cacheSharedLibLI(pkg, zipFile, entry, sharedLibraryDir,
+ sharedLibraryFile);
+ }
+ }
+ if (!hasNativeLibraries)
+ return PACKAGE_INSTALL_NATIVE_NO_LIBRARIES;
+
+ if (!installedNativeLibraries)
+ return PACKAGE_INSTALL_NATIVE_ABI_MISMATCH;
+
+ return PACKAGE_INSTALL_NATIVE_FOUND_LIBRARIES;
+ }
+
+ // extract shared libraries stored in the APK as lib/<cpuAbi>/lib<name>.so
+ // and copy them to /data/data/<appname>/lib.
+ //
+ // This function will first try the main CPU ABI defined by Build.CPU_ABI
+ // (which corresponds to ro.product.cpu.abi), and also try an alternate
+ // one if ro.product.cpu.abi2 is defined.
+ //
+ private int cachePackageSharedLibsLI(PackageParser.Package pkg,
+ File dataPath, File scanFile) {
+ final String cpuAbi = Build.CPU_ABI;
+ try {
+ int result = cachePackageSharedLibsForAbiLI(pkg, dataPath, scanFile, cpuAbi);
+
+ // some architectures are capable of supporting several CPU ABIs
+ // for example, 'armeabi-v7a' also supports 'armeabi' native code
+ // this is indicated by the definition of the ro.product.cpu.abi2
+ // system property.
+ //
+ // only scan the package twice in case of ABI mismatch
+ if (result == PACKAGE_INSTALL_NATIVE_ABI_MISMATCH) {
+ String cpuAbi2 = SystemProperties.get("ro.product.cpu.abi2",null);
+ if (cpuAbi2 != null) {
+ result = cachePackageSharedLibsForAbiLI(pkg, dataPath, scanFile, cpuAbi2);
}
-
- installedNativeCode = true;
-
- String sharedLibraryFilePath = sharedLibraryDir.getPath() +
- File.separator + libFileName;
- File sharedLibraryFile = new File(sharedLibraryFilePath);
- if (! sharedLibraryFile.exists() ||
- sharedLibraryFile.length() != entry.getSize() ||
- sharedLibraryFile.lastModified() != entry.getTime()) {
- if (Config.LOGD) {
- Log.d(TAG, "Caching shared lib " + entry.getName());
- }
- if (mInstaller == null) {
- sharedLibraryDir.mkdir();
- }
- cacheSharedLibLI(pkg, zipFile, entry, sharedLibraryDir,
- sharedLibraryFile);
+
+ if (result == PACKAGE_INSTALL_NATIVE_ABI_MISMATCH) {
+ Log.w(TAG,"Native ABI mismatch from package file");
+ return PackageManager.INSTALL_FAILED_INVALID_APK;
}
}
+ } catch (ZipException e) {
+ Log.w(TAG, "Failed to extract data from package file", e);
+ return PackageManager.INSTALL_FAILED_INVALID_APK;
} catch (IOException e) {
Log.w(TAG, "Failed to cache package shared libs", e);
return PackageManager.INSTALL_FAILED_INSUFFICIENT_STORAGE;
}
-
- if (hasNativeCode && !installedNativeCode) {
- Log.w(TAG, "Install failed: .apk has native code but none for arch "
- + Build.CPU_ABI);
- return PackageManager.INSTALL_FAILED_CPU_ABI_INCOMPATIBLE;
- }
-
return PackageManager.INSTALL_SUCCEEDED;
}
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 5f30710..3cfd1a9 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -297,9 +297,9 @@ class ServerThread extends Thread {
try {
Log.i(TAG, "DropBox Service");
ServiceManager.addService(Context.DROPBOX_SERVICE,
- new DropBoxService(context, new File("/data/system/dropbox")));
+ new DropBoxManagerService(context, new File("/data/system/dropbox")));
} catch (Throwable e) {
- Log.e(TAG, "Failure starting DropBox Service", e);
+ Log.e(TAG, "Failure starting DropBoxManagerService", e);
}
try {
diff --git a/services/java/com/android/server/WallpaperManagerService.java b/services/java/com/android/server/WallpaperManagerService.java
index 4b6049f..5b8e11c 100644
--- a/services/java/com/android/server/WallpaperManagerService.java
+++ b/services/java/com/android/server/WallpaperManagerService.java
@@ -164,7 +164,7 @@ class WallpaperManagerService extends IWallpaperManager.Stub {
if ((mLastDiedTime+MIN_WALLPAPER_CRASH_TIME)
< SystemClock.uptimeMillis()) {
Log.w(TAG, "Reverting to built-in wallpaper!");
- bindWallpaperComponentLocked(null);
+ bindWallpaperComponentLocked(null, false);
}
}
}
@@ -203,11 +203,11 @@ class WallpaperManagerService extends IWallpaperManager.Stub {
public void systemReady() {
synchronized (mLock) {
try {
- bindWallpaperComponentLocked(mWallpaperComponent);
+ bindWallpaperComponentLocked(mWallpaperComponent, false);
} catch (RuntimeException e) {
Log.w(TAG, "Failure starting previous wallpaper", e);
try {
- bindWallpaperComponentLocked(null);
+ bindWallpaperComponentLocked(null, false);
} catch (RuntimeException e2) {
Log.w(TAG, "Failure starting default wallpaper", e2);
clearWallpaperComponentLocked();
@@ -224,7 +224,7 @@ class WallpaperManagerService extends IWallpaperManager.Stub {
}
final long ident = Binder.clearCallingIdentity();
try {
- bindWallpaperComponentLocked(null);
+ bindWallpaperComponentLocked(null, false);
} finally {
Binder.restoreCallingIdentity(ident);
}
@@ -307,7 +307,8 @@ class WallpaperManagerService extends IWallpaperManager.Stub {
try {
ParcelFileDescriptor pfd = updateWallpaperBitmapLocked(name);
if (pfd != null) {
- bindWallpaperComponentLocked(null);
+ // Bind the wallpaper to an ImageWallpaper
+ bindWallpaperComponentLocked(null, true);
saveSettingsLocked();
}
return pfd;
@@ -335,48 +336,57 @@ class WallpaperManagerService extends IWallpaperManager.Stub {
synchronized (mLock) {
final long ident = Binder.clearCallingIdentity();
try {
- bindWallpaperComponentLocked(name);
+ bindWallpaperComponentLocked(name, false);
} finally {
Binder.restoreCallingIdentity(ident);
}
}
}
- void bindWallpaperComponentLocked(ComponentName name) {
+ void bindWallpaperComponentLocked(ComponentName componentName, boolean isBitmap) {
// Has the component changed?
if (mWallpaperConnection != null) {
if (mWallpaperComponent == null) {
- if (name == null) {
+ if (componentName == null) {
// Still using default wallpaper.
return;
}
- } else if (mWallpaperComponent.equals(name)) {
+ } else if (mWallpaperComponent.equals(componentName)) {
// Changing to same wallpaper.
return;
}
}
try {
- ComponentName realName = name;
- if (realName == null) {
- // The default component is our static image wallpaper.
- realName = new ComponentName("android",
- ImageWallpaper.class.getName());
- //clearWallpaperComponentLocked();
- //return;
+ ComponentName realComponentName = componentName;
+ if (realComponentName == null) {
+ String defaultComponent =
+ mContext.getString(com.android.internal.R.string.default_wallpaper_component);
+ if (defaultComponent != null && !isBitmap) {
+ // See if there is a default wallpaper component specified
+ // Only look for this if the wallpaper is not being set to a bitmap
+ realComponentName = ComponentName.unflattenFromString(defaultComponent);
+ }
+ if (realComponentName == null) {
+ // Fall back to static image wallpaper
+ realComponentName = new ComponentName("android",
+ ImageWallpaper.class.getName());
+ //clearWallpaperComponentLocked();
+ //return;
+ }
}
- ServiceInfo si = mContext.getPackageManager().getServiceInfo(realName,
+ ServiceInfo si = mContext.getPackageManager().getServiceInfo(realComponentName,
PackageManager.GET_META_DATA | PackageManager.GET_PERMISSIONS);
if (!android.Manifest.permission.BIND_WALLPAPER.equals(si.permission)) {
throw new SecurityException("Selected service does not require "
+ android.Manifest.permission.BIND_WALLPAPER
- + ": " + realName);
+ + ": " + realComponentName);
}
WallpaperInfo wi = null;
Intent intent = new Intent(WallpaperService.SERVICE_INTERFACE);
- if (name != null) {
+ if (componentName != null) {
// Make sure the selected service is actually a wallpaper service.
List<ResolveInfo> ris = mContext.getPackageManager()
.queryIntentServices(intent, PackageManager.GET_META_DATA);
@@ -396,13 +406,13 @@ class WallpaperManagerService extends IWallpaperManager.Stub {
}
if (wi == null) {
throw new SecurityException("Selected service is not a wallpaper: "
- + realName);
+ + realComponentName);
}
}
// Bind the service!
WallpaperConnection newConn = new WallpaperConnection(wi);
- intent.setComponent(realName);
+ intent.setComponent(realComponentName);
intent.putExtra(Intent.EXTRA_CLIENT_LABEL,
com.android.internal.R.string.wallpaper_binding_label);
intent.putExtra(Intent.EXTRA_CLIENT_INTENT, PendingIntent.getActivity(
@@ -413,11 +423,11 @@ class WallpaperManagerService extends IWallpaperManager.Stub {
if (!mContext.bindService(intent, newConn,
Context.BIND_AUTO_CREATE)) {
throw new IllegalArgumentException("Unable to bind service: "
- + name);
+ + componentName);
}
clearWallpaperComponentLocked();
- mWallpaperComponent = name;
+ mWallpaperComponent = componentName;
mWallpaperConnection = newConn;
mLastDiedTime = SystemClock.uptimeMillis();
try {
@@ -428,7 +438,7 @@ class WallpaperManagerService extends IWallpaperManager.Stub {
}
} catch (PackageManager.NameNotFoundException e) {
- throw new IllegalArgumentException("Unknown component " + name);
+ throw new IllegalArgumentException("Unknown component " + componentName);
}
}
@@ -459,7 +469,7 @@ class WallpaperManagerService extends IWallpaperManager.Stub {
mWidth, mHeight);
} catch (RemoteException e) {
Log.w(TAG, "Failed attaching wallpaper; clearing", e);
- bindWallpaperComponentLocked(null);
+ bindWallpaperComponentLocked(null, false);
}
}
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index e728091..aa79ab4 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -12816,6 +12816,11 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
mConfiguration = newConfig;
Log.i(TAG, "Config changed: " + newConfig);
+
+ AttributeCache ac = AttributeCache.instance();
+ if (ac != null) {
+ ac.updateConfiguration(mConfiguration);
+ }
Message msg = mHandler.obtainMessage(UPDATE_CONFIGURATION_MSG);
msg.obj = new Configuration(mConfiguration);
@@ -12843,11 +12848,6 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
null, null, 0, null, null,
null, false, false, MY_PID, Process.SYSTEM_UID);
}
-
- AttributeCache ac = AttributeCache.instance();
- if (ac != null) {
- ac.updateConfiguration(mConfiguration);
- }
}
}
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
index 799277b..c3d4940 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
@@ -76,6 +76,7 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
private static final int NITZ_UPDATE_DIFF_DEFAULT = 2000;
private int mNitzUpdateDiff = SystemProperties.getInt("ro.nitz_update_diff",
NITZ_UPDATE_DIFF_DEFAULT);
+
/**
* Values correspond to ServiceStateTracker.DATA_ACCESS_ definitions.
*/
@@ -159,6 +160,7 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
super();
this.phone = phone;
+ cr = phone.getContext().getContentResolver();
cm = phone.mCM;
ss = new ServiceState();
newSS = new ServiceState();
@@ -184,12 +186,9 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
cm.registerForCdmaOtaProvision(this,EVENT_OTA_PROVISION_STATUS_CHANGE, null);
// System setting property AIRPLANE_MODE_ON is set in Settings.
- int airplaneMode = Settings.System.getInt(
- phone.getContext().getContentResolver(),
- Settings.System.AIRPLANE_MODE_ON, 0);
+ int airplaneMode = Settings.System.getInt(cr, Settings.System.AIRPLANE_MODE_ON, 0);
mDesiredPowerState = ! (airplaneMode > 0);
- cr = phone.getContext().getContentResolver();
cr.registerContentObserver(
Settings.System.getUriFor(Settings.System.AUTO_TIME), true,
mAutoTimeObserver);
@@ -1027,8 +1026,7 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
}
if (hasRegistered) {
- Checkin.updateStats(phone.getContext().getContentResolver(),
- Checkin.Stats.Tag.PHONE_CDMA_REGISTERED, 1, 0.0);
+ Checkin.updateStats(cr, Checkin.Stats.Tag.PHONE_CDMA_REGISTERED, 1, 0.0);
networkAttachedRegistrants.notifyRegistrants();
}
@@ -1466,9 +1464,13 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
*/
long gained = c.getTimeInMillis() - System.currentTimeMillis();
long timeSinceLastUpdate = SystemClock.elapsedRealtime() - mSavedAtTime;
+ int nitzUpdateSpacing = Settings.Gservices.getInt(cr,
+ Settings.Gservices.NITZ_UPDATE_SPACING, mNitzUpdateSpacing);
+ int nitzUpdateDiff = Settings.Gservices.getInt(cr,
+ Settings.Gservices.NITZ_UPDATE_DIFF, mNitzUpdateDiff);
- if ((timeSinceLastUpdate > mNitzUpdateSpacing)
- || (Math.abs(gained) > mNitzUpdateDiff)) {
+ if ((mSavedAtTime == 0) || (timeSinceLastUpdate > nitzUpdateSpacing)
+ || (Math.abs(gained) > nitzUpdateDiff)) {
Log.i(LOG_TAG, "NITZ: Auto updating time of day to " + c.getTime()
+ " NITZ receive delay=" + millisSinceNitzReceived
+ "ms gained=" + gained + "ms from " + nitz);
@@ -1500,8 +1502,7 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
private boolean getAutoTime() {
try {
- return Settings.System.getInt(phone.getContext().getContentResolver(),
- Settings.System.AUTO_TIME) > 0;
+ return Settings.System.getInt(cr, Settings.System.AUTO_TIME) > 0;
} catch (SettingNotFoundException snfe) {
return true;
}
@@ -1540,8 +1541,7 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
}
private void revertToNitz() {
- if (Settings.System.getInt(phone.getContext().getContentResolver(),
- Settings.System.AUTO_TIME, 0) == 0) {
+ if (Settings.System.getInt(cr, Settings.System.AUTO_TIME, 0) == 0) {
return;
}
Log.d(LOG_TAG, "Reverting to NITZ: tz='" + mSavedTimeZone
diff --git a/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java b/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java
index 56499a8..2843cde 100755
--- a/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java
@@ -879,16 +879,7 @@ public class GSMPhone extends PhoneBase {
}
public String getLine1AlphaTag() {
- String ret;
-
- ret = mSIMRecords.getMsisdnAlphaTag();
-
- if (ret == null || ret.length() == 0) {
- return mContext.getText(
- com.android.internal.R.string.defaultMsisdnAlphaTag).toString();
- }
-
- return ret;
+ return mSIMRecords.getMsisdnAlphaTag();
}
public void setLine1Number(String alphaTag, String number, Message onComplete) {
diff --git a/tests/AndroidTests/res/raw/v21_invalid_comment_line.vcf b/tests/AndroidTests/res/raw/v21_invalid_comment_line.vcf
new file mode 100644
index 0000000..f910710
--- /dev/null
+++ b/tests/AndroidTests/res/raw/v21_invalid_comment_line.vcf
@@ -0,0 +1,10 @@
+BEGIN:vCard
+VERSION:2.1
+UID:357
+N:;Conference Call
+FN:Conference Call
+# This line must be ignored.
+NOTE;ENCODING=QUOTED-PRINTABLE:This is an (sharp ->=
+#<- sharp) example. This message must NOT be ignored.
+# This line must be ignored too.
+END:vCard
diff --git a/tests/AndroidTests/src/com/android/unit_tests/DropBoxTest.java b/tests/AndroidTests/src/com/android/unit_tests/DropBoxTest.java
index 286f702..a0d096e 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/DropBoxTest.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/DropBoxTest.java
@@ -19,14 +19,14 @@ package com.android.unit_tests;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
-import android.os.DropBox;
+import android.os.DropBoxManager;
import android.os.ParcelFileDescriptor;
import android.os.ServiceManager;
import android.os.StatFs;
import android.provider.Settings;
import android.test.AndroidTestCase;
-import com.android.server.DropBoxService;
+import com.android.server.DropBoxManagerService;
import java.io.File;
import java.io.FileOutputStream;
@@ -35,7 +35,7 @@ import java.io.InputStream;
import java.util.Random;
import java.util.zip.GZIPOutputStream;
-/** Test {@link DropBox} functionality. */
+/** Test {@link DropBoxManager} functionality. */
public class DropBoxTest extends AndroidTestCase {
public void tearDown() throws Exception {
Intent override = new Intent(Settings.Gservices.OVERRIDE_ACTION);
@@ -46,7 +46,8 @@ public class DropBoxTest extends AndroidTestCase {
}
public void testAddText() throws Exception {
- DropBox dropbox = (DropBox) getContext().getSystemService(Context.DROPBOX_SERVICE);
+ DropBoxManager dropbox = (DropBoxManager) getContext().getSystemService(
+ Context.DROPBOX_SERVICE);
long before = System.currentTimeMillis();
Thread.sleep(5);
dropbox.addText("DropBoxTest", "TEST0");
@@ -58,9 +59,9 @@ public class DropBoxTest extends AndroidTestCase {
Thread.sleep(5);
long after = System.currentTimeMillis();
- DropBox.Entry e0 = dropbox.getNextEntry("DropBoxTest", before);
- DropBox.Entry e1 = dropbox.getNextEntry("DropBoxTest", e0.getTimeMillis());
- DropBox.Entry e2 = dropbox.getNextEntry("DropBoxTest", e1.getTimeMillis());
+ DropBoxManager.Entry e0 = dropbox.getNextEntry("DropBoxTest", before);
+ DropBoxManager.Entry e1 = dropbox.getNextEntry("DropBoxTest", e0.getTimeMillis());
+ DropBoxManager.Entry e2 = dropbox.getNextEntry("DropBoxTest", e1.getTimeMillis());
assertTrue(null == dropbox.getNextEntry("DropBoxTest", e2.getTimeMillis()));
assertTrue(e0.getTimeMillis() > before);
@@ -79,12 +80,13 @@ public class DropBoxTest extends AndroidTestCase {
}
public void testAddData() throws Exception {
- DropBox dropbox = (DropBox) getContext().getSystemService(Context.DROPBOX_SERVICE);
+ DropBoxManager dropbox = (DropBoxManager) getContext().getSystemService(
+ Context.DROPBOX_SERVICE);
long before = System.currentTimeMillis();
dropbox.addData("DropBoxTest", "TEST".getBytes(), 0);
long after = System.currentTimeMillis();
- DropBox.Entry e = dropbox.getNextEntry("DropBoxTest", before);
+ DropBoxManager.Entry e = dropbox.getNextEntry("DropBoxTest", before);
assertTrue(null == dropbox.getNextEntry("DropBoxTest", e.getTimeMillis()));
assertEquals("DropBoxTest", e.getTag());
@@ -122,7 +124,8 @@ public class DropBoxTest extends AndroidTestCase {
os2.close();
gz3.close();
- DropBox dropbox = (DropBox) getContext().getSystemService(Context.DROPBOX_SERVICE);
+ DropBoxManager dropbox = (DropBoxManager) getContext().getSystemService(
+ Context.DROPBOX_SERVICE);
int mode = ParcelFileDescriptor.MODE_READ_ONLY;
ParcelFileDescriptor pfd0 = ParcelFileDescriptor.open(f0, mode);
@@ -130,20 +133,20 @@ public class DropBoxTest extends AndroidTestCase {
ParcelFileDescriptor pfd2 = ParcelFileDescriptor.open(f2, mode);
ParcelFileDescriptor pfd3 = ParcelFileDescriptor.open(f3, mode);
- dropbox.addFile("DropBoxTest", pfd0, DropBox.IS_TEXT);
- dropbox.addFile("DropBoxTest", pfd1, DropBox.IS_TEXT | DropBox.IS_GZIPPED);
+ dropbox.addFile("DropBoxTest", pfd0, DropBoxManager.IS_TEXT);
+ dropbox.addFile("DropBoxTest", pfd1, DropBoxManager.IS_TEXT | DropBoxManager.IS_GZIPPED);
dropbox.addFile("DropBoxTest", pfd2, 0);
- dropbox.addFile("DropBoxTest", pfd3, DropBox.IS_GZIPPED);
+ dropbox.addFile("DropBoxTest", pfd3, DropBoxManager.IS_GZIPPED);
pfd0.close();
pfd1.close();
pfd2.close();
pfd3.close();
- DropBox.Entry e0 = dropbox.getNextEntry("DropBoxTest", before);
- DropBox.Entry e1 = dropbox.getNextEntry("DropBoxTest", e0.getTimeMillis());
- DropBox.Entry e2 = dropbox.getNextEntry("DropBoxTest", e1.getTimeMillis());
- DropBox.Entry e3 = dropbox.getNextEntry("DropBoxTest", e2.getTimeMillis());
+ DropBoxManager.Entry e0 = dropbox.getNextEntry("DropBoxTest", before);
+ DropBoxManager.Entry e1 = dropbox.getNextEntry("DropBoxTest", e0.getTimeMillis());
+ DropBoxManager.Entry e2 = dropbox.getNextEntry("DropBoxTest", e1.getTimeMillis());
+ DropBoxManager.Entry e3 = dropbox.getNextEntry("DropBoxTest", e2.getTimeMillis());
assertTrue(null == dropbox.getNextEntry("DropBoxTest", e3.getTimeMillis()));
assertTrue(e0.getTimeMillis() > before);
@@ -151,8 +154,8 @@ public class DropBoxTest extends AndroidTestCase {
assertTrue(e2.getTimeMillis() > e1.getTimeMillis());
assertTrue(e3.getTimeMillis() > e2.getTimeMillis());
- assertEquals(DropBox.IS_TEXT, e0.getFlags());
- assertEquals(DropBox.IS_TEXT, e1.getFlags());
+ assertEquals(DropBoxManager.IS_TEXT, e0.getFlags());
+ assertEquals(DropBoxManager.IS_TEXT, e1.getFlags());
assertEquals(0, e2.getFlags());
assertEquals(0, e3.getFlags());
@@ -198,14 +201,14 @@ public class DropBoxTest extends AndroidTestCase {
// Tombstone in the far future
new FileOutputStream(new File(dir, "DropBoxTest@" + (before + 100002) + ".lost")).close();
- DropBoxService service = new DropBoxService(getContext(), dir);
- DropBox dropbox = new DropBox(service);
+ DropBoxManagerService service = new DropBoxManagerService(getContext(), dir);
+ DropBoxManager dropbox = new DropBoxManager(service);
// Until a write, the timestamps are taken at face value
- DropBox.Entry e0 = dropbox.getNextEntry(null, before);
- DropBox.Entry e1 = dropbox.getNextEntry(null, e0.getTimeMillis());
- DropBox.Entry e2 = dropbox.getNextEntry(null, e1.getTimeMillis());
- DropBox.Entry e3 = dropbox.getNextEntry(null, e2.getTimeMillis());
+ DropBoxManager.Entry e0 = dropbox.getNextEntry(null, before);
+ DropBoxManager.Entry e1 = dropbox.getNextEntry(null, e0.getTimeMillis());
+ DropBoxManager.Entry e2 = dropbox.getNextEntry(null, e1.getTimeMillis());
+ DropBoxManager.Entry e3 = dropbox.getNextEntry(null, e2.getTimeMillis());
assertTrue(null == dropbox.getNextEntry(null, e3.getTimeMillis()));
assertEquals("FUTURE0", e0.getText(80));
@@ -249,7 +252,8 @@ public class DropBoxTest extends AndroidTestCase {
}
public void testIsTagEnabled() throws Exception {
- DropBox dropbox = (DropBox) getContext().getSystemService(Context.DROPBOX_SERVICE);
+ DropBoxManager dropbox = (DropBoxManager) getContext().getSystemService(
+ Context.DROPBOX_SERVICE);
long before = System.currentTimeMillis();
dropbox.addText("DropBoxTest", "TEST-ENABLED");
assertTrue(dropbox.isTagEnabled("DropBoxTest"));
@@ -268,8 +272,8 @@ public class DropBoxTest extends AndroidTestCase {
dropbox.addText("DropBoxTest", "TEST-ENABLED-AGAIN");
assertTrue(dropbox.isTagEnabled("DropBoxTest"));
- DropBox.Entry e0 = dropbox.getNextEntry("DropBoxTest", before);
- DropBox.Entry e1 = dropbox.getNextEntry("DropBoxTest", e0.getTimeMillis());
+ DropBoxManager.Entry e0 = dropbox.getNextEntry("DropBoxTest", before);
+ DropBoxManager.Entry e1 = dropbox.getNextEntry("DropBoxTest", e0.getTimeMillis());
assertTrue(null == dropbox.getNextEntry("DropBoxTest", e1.getTimeMillis()));
assertEquals("TEST-ENABLED", e0.getText(80));
@@ -281,24 +285,24 @@ public class DropBoxTest extends AndroidTestCase {
public void testGetNextEntry() throws Exception {
File dir = getEmptyDir("testGetNextEntry");
- DropBoxService service = new DropBoxService(getContext(), dir);
- DropBox dropbox = new DropBox(service);
+ DropBoxManagerService service = new DropBoxManagerService(getContext(), dir);
+ DropBoxManager dropbox = new DropBoxManager(service);
long before = System.currentTimeMillis();
dropbox.addText("DropBoxTest.A", "A0");
dropbox.addText("DropBoxTest.B", "B0");
dropbox.addText("DropBoxTest.A", "A1");
- DropBox.Entry a0 = dropbox.getNextEntry("DropBoxTest.A", before);
- DropBox.Entry a1 = dropbox.getNextEntry("DropBoxTest.A", a0.getTimeMillis());
+ DropBoxManager.Entry a0 = dropbox.getNextEntry("DropBoxTest.A", before);
+ DropBoxManager.Entry a1 = dropbox.getNextEntry("DropBoxTest.A", a0.getTimeMillis());
assertTrue(null == dropbox.getNextEntry("DropBoxTest.A", a1.getTimeMillis()));
- DropBox.Entry b0 = dropbox.getNextEntry("DropBoxTest.B", before);
+ DropBoxManager.Entry b0 = dropbox.getNextEntry("DropBoxTest.B", before);
assertTrue(null == dropbox.getNextEntry("DropBoxTest.B", b0.getTimeMillis()));
- DropBox.Entry x0 = dropbox.getNextEntry(null, before);
- DropBox.Entry x1 = dropbox.getNextEntry(null, x0.getTimeMillis());
- DropBox.Entry x2 = dropbox.getNextEntry(null, x1.getTimeMillis());
+ DropBoxManager.Entry x0 = dropbox.getNextEntry(null, before);
+ DropBoxManager.Entry x1 = dropbox.getNextEntry(null, x0.getTimeMillis());
+ DropBoxManager.Entry x2 = dropbox.getNextEntry(null, x1.getTimeMillis());
assertTrue(null == dropbox.getNextEntry(null, x2.getTimeMillis()));
assertEquals("DropBoxTest.A", a0.getTag());
@@ -345,8 +349,8 @@ public class DropBoxTest extends AndroidTestCase {
final int overhead = 64;
long before = System.currentTimeMillis();
- DropBoxService service = new DropBoxService(getContext(), dir);
- DropBox dropbox = new DropBox(service);
+ DropBoxManagerService service = new DropBoxManagerService(getContext(), dir);
+ DropBoxManager dropbox = new DropBoxManager(service);
addRandomEntry(dropbox, "DropBoxTest0", blockSize - overhead);
addRandomEntry(dropbox, "DropBoxTest0", blockSize - overhead);
@@ -361,16 +365,16 @@ public class DropBoxTest extends AndroidTestCase {
addRandomEntry(dropbox, "DropBoxTest2", blockSize - overhead);
addRandomEntry(dropbox, "DropBoxTest2", blockSize - overhead);
- DropBox.Entry e0 = dropbox.getNextEntry(null, before);
- DropBox.Entry e1 = dropbox.getNextEntry(null, e0.getTimeMillis());
- DropBox.Entry e2 = dropbox.getNextEntry(null, e1.getTimeMillis());
- DropBox.Entry e3 = dropbox.getNextEntry(null, e2.getTimeMillis());
- DropBox.Entry e4 = dropbox.getNextEntry(null, e3.getTimeMillis());
- DropBox.Entry e5 = dropbox.getNextEntry(null, e4.getTimeMillis());
- DropBox.Entry e6 = dropbox.getNextEntry(null, e5.getTimeMillis());
- DropBox.Entry e7 = dropbox.getNextEntry(null, e6.getTimeMillis());
- DropBox.Entry e8 = dropbox.getNextEntry(null, e7.getTimeMillis());
- DropBox.Entry e9 = dropbox.getNextEntry(null, e8.getTimeMillis());
+ DropBoxManager.Entry e0 = dropbox.getNextEntry(null, before);
+ DropBoxManager.Entry e1 = dropbox.getNextEntry(null, e0.getTimeMillis());
+ DropBoxManager.Entry e2 = dropbox.getNextEntry(null, e1.getTimeMillis());
+ DropBoxManager.Entry e3 = dropbox.getNextEntry(null, e2.getTimeMillis());
+ DropBoxManager.Entry e4 = dropbox.getNextEntry(null, e3.getTimeMillis());
+ DropBoxManager.Entry e5 = dropbox.getNextEntry(null, e4.getTimeMillis());
+ DropBoxManager.Entry e6 = dropbox.getNextEntry(null, e5.getTimeMillis());
+ DropBoxManager.Entry e7 = dropbox.getNextEntry(null, e6.getTimeMillis());
+ DropBoxManager.Entry e8 = dropbox.getNextEntry(null, e7.getTimeMillis());
+ DropBoxManager.Entry e9 = dropbox.getNextEntry(null, e8.getTimeMillis());
assertTrue(null == dropbox.getNextEntry(null, e9.getTimeMillis()));
assertEquals("DropBoxTest0", e0.getTag());
@@ -409,9 +413,9 @@ public class DropBoxTest extends AndroidTestCase {
// Specifying a tag name skips tombstone records.
- DropBox.Entry t0 = dropbox.getNextEntry("DropBoxTest1", before);
- DropBox.Entry t1 = dropbox.getNextEntry("DropBoxTest1", t0.getTimeMillis());
- DropBox.Entry t2 = dropbox.getNextEntry("DropBoxTest1", t1.getTimeMillis());
+ DropBoxManager.Entry t0 = dropbox.getNextEntry("DropBoxTest1", before);
+ DropBoxManager.Entry t1 = dropbox.getNextEntry("DropBoxTest1", t0.getTimeMillis());
+ DropBoxManager.Entry t2 = dropbox.getNextEntry("DropBoxTest1", t1.getTimeMillis());
assertTrue(null == dropbox.getNextEntry("DropBoxTest1", t2.getTimeMillis()));
assertEquals("DropBoxTest1", t0.getTag());
@@ -441,15 +445,15 @@ public class DropBoxTest extends AndroidTestCase {
// Write one normal entry and another so big that it is instantly tombstoned
long before = System.currentTimeMillis();
- DropBoxService service = new DropBoxService(getContext(), dir);
- DropBox dropbox = new DropBox(service);
+ DropBoxManagerService service = new DropBoxManagerService(getContext(), dir);
+ DropBoxManager dropbox = new DropBoxManager(service);
dropbox.addText("DropBoxTest", "TEST");
addRandomEntry(dropbox, "DropBoxTest", blockSize * 20);
// Verify that things are as expected
- DropBox.Entry e0 = dropbox.getNextEntry(null, before);
- DropBox.Entry e1 = dropbox.getNextEntry(null, e0.getTimeMillis());
+ DropBoxManager.Entry e0 = dropbox.getNextEntry(null, before);
+ DropBoxManager.Entry e1 = dropbox.getNextEntry(null, e0.getTimeMillis());
assertTrue(null == dropbox.getNextEntry(null, e1.getTimeMillis()));
assertEquals("TEST", e0.getText(80));
@@ -469,15 +473,15 @@ public class DropBoxTest extends AndroidTestCase {
e0.close();
}
- public void testCreateDropBoxWithInvalidDirectory() throws Exception {
- // If created with an invalid directory, the DropBox should suffer quietly
+ public void testCreateDropBoxManagerWithInvalidDirectory() throws Exception {
+ // If created with an invalid directory, the DropBoxManager should suffer quietly
// and fail all operations (this is how it survives a full disk).
// Once the directory becomes possible to create, it will start working.
- File dir = new File(getEmptyDir("testCreateDropBoxWith"), "InvalidDirectory");
+ File dir = new File(getEmptyDir("testCreateDropBoxManagerWith"), "InvalidDirectory");
new FileOutputStream(dir).close(); // Create an empty file
- DropBoxService service = new DropBoxService(getContext(), dir);
- DropBox dropbox = new DropBox(service);
+ DropBoxManagerService service = new DropBoxManagerService(getContext(), dir);
+ DropBoxManager dropbox = new DropBoxManager(service);
dropbox.addText("DropBoxTest", "should be ignored");
dropbox.addData("DropBoxTest", "should be ignored".getBytes(), 0);
@@ -485,7 +489,7 @@ public class DropBoxTest extends AndroidTestCase {
dir.delete(); // Remove the file so a directory can be created
dropbox.addText("DropBoxTest", "TEST");
- DropBox.Entry e = dropbox.getNextEntry("DropBoxTest", 0);
+ DropBoxManager.Entry e = dropbox.getNextEntry("DropBoxTest", 0);
assertTrue(null == dropbox.getNextEntry("DropBoxTest", e.getTimeMillis()));
assertEquals("DropBoxTest", e.getTag());
assertEquals("TEST", e.getText(80));
@@ -493,7 +497,7 @@ public class DropBoxTest extends AndroidTestCase {
service.stop();
}
- private void addRandomEntry(DropBox dropbox, String tag, int size) throws Exception {
+ private void addRandomEntry(DropBoxManager dropbox, String tag, int size) throws Exception {
byte[] bytes = new byte[size];
new Random(System.currentTimeMillis()).nextBytes(bytes);
@@ -507,7 +511,7 @@ public class DropBoxTest extends AndroidTestCase {
fd.close();
}
- private int getEntrySize(DropBox.Entry e) throws Exception {
+ private int getEntrySize(DropBoxManager.Entry e) throws Exception {
InputStream is = e.getInputStream();
if (is == null) return -1;
int length = 0;
diff --git a/tests/AndroidTests/src/com/android/unit_tests/vcard/PropertyNodesVerifier.java b/tests/AndroidTests/src/com/android/unit_tests/vcard/PropertyNodesVerifier.java
index a9775fa..1d45893 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/vcard/PropertyNodesVerifier.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/vcard/PropertyNodesVerifier.java
@@ -163,6 +163,12 @@ class PropertyNodesVerifierElem {
}
public PropertyNodesVerifierElem addNodeWithOrder(String propName, String propValue,
+ ContentValues paramMap, TypeSet paramMap_TYPE) {
+ return addNodeWithOrder(propName, propValue, null, null,
+ paramMap, paramMap_TYPE, null);
+ }
+
+ public PropertyNodesVerifierElem addNodeWithOrder(String propName, String propValue,
List<String> propValueList, TypeSet paramMap_TYPE) {
return addNodeWithOrder(propName, propValue, propValueList, null, null,
paramMap_TYPE, null);
@@ -224,6 +230,12 @@ class PropertyNodesVerifierElem {
}
public PropertyNodesVerifierElem addNodeWithoutOrder(String propName, String propValue,
+ ContentValues paramMap, TypeSet paramMap_TYPE) {
+ return addNodeWithoutOrder(propName, propValue, null, null,
+ paramMap, paramMap_TYPE, null);
+ }
+
+ public PropertyNodesVerifierElem addNodeWithoutOrder(String propName, String propValue,
List<String> propValueList, byte[] propValue_bytes,
ContentValues paramMap, TypeSet paramMap_TYPE, GroupSet propGroupSet) {
mUnorderedNodeList.add(new PropertyNode(propName, propValue,
diff --git a/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardExporterTests.java b/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardExporterTests.java
index 6dabd01..c8289dc 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardExporterTests.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardExporterTests.java
@@ -268,7 +268,7 @@ public class VCardExporterTests extends VCardTestsBase {
.put(Nickname.NAME, "Nicky");
VCardVerifier verifier = new VCardVerifier(resolver, V30);
- verifier.addPropertyNodesVerifierWithEmptyName()
+ verifier.addPropertyNodesVerifierElemWithEmptyName()
.addNodeWithOrder("NICKNAME", "Nicky");
verifier.verify();
@@ -282,7 +282,7 @@ public class VCardExporterTests extends VCardTestsBase {
.put(Phone.TYPE, Phone.TYPE_HOME);
VCardVerifier verifier = new VCardVerifier(resolver, version);
- verifier.addPropertyNodesVerifierWithEmptyName()
+ verifier.addPropertyNodesVerifierElemWithEmptyName()
.addNodeWithoutOrder("TEL", "1", new TypeSet("HOME"));
verifier.verify();
@@ -353,7 +353,7 @@ public class VCardExporterTests extends VCardTestsBase {
.put(Phone.TYPE, Phone.TYPE_MMS);
VCardVerifier verifier = new VCardVerifier(resolver, version);
- verifier.addPropertyNodesVerifierWithEmptyName()
+ verifier.addPropertyNodesVerifierElemWithEmptyName()
.addNodeWithoutOrder("TEL", "10", new TypeSet("HOME"))
.addNodeWithoutOrder("TEL", "20", new TypeSet("WORK"))
.addNodeWithoutOrder("TEL", "30", new TypeSet("HOME", "FAX"))
@@ -403,7 +403,7 @@ public class VCardExporterTests extends VCardTestsBase {
.put(Phone.TYPE, Phone.TYPE_FAX_WORK);
VCardVerifier verifier = new VCardVerifier(resolver, version);
- verifier.addPropertyNodesVerifierWithEmptyName()
+ verifier.addPropertyNodesVerifierElemWithEmptyName()
.addNodeWithoutOrder("TEL", "4", new TypeSet("WORK", "FAX"))
.addNodeWithoutOrder("TEL", "3", new TypeSet("HOME", "FAX", "PREF"))
.addNodeWithoutOrder("TEL", "2", new TypeSet("WORK", "PREF"))
@@ -426,7 +426,7 @@ public class VCardExporterTests extends VCardTestsBase {
VCardVerifier verifier = new VCardVerifier(resolver, version);
- verifier.addPropertyNodesVerifierWithEmptyName()
+ verifier.addPropertyNodesVerifierElemWithEmptyName()
.addNodeWithoutOrder("EMAIL", "sample@example.com");
verifier.verify();
@@ -459,7 +459,7 @@ public class VCardExporterTests extends VCardTestsBase {
VCardVerifier verifier = new VCardVerifier(resolver, version);
- verifier.addPropertyNodesVerifierWithEmptyName()
+ verifier.addPropertyNodesVerifierElemWithEmptyName()
.addNodeWithoutOrder("EMAIL", "type_home@example.com", new TypeSet("HOME"))
.addNodeWithoutOrder("EMAIL", "type_work@example.com", new TypeSet("WORK"))
.addNodeWithoutOrder("EMAIL", "type_mobile@example.com", new TypeSet("CELL"))
@@ -490,7 +490,7 @@ public class VCardExporterTests extends VCardTestsBase {
VCardVerifier verifier = new VCardVerifier(resolver, version);
- verifier.addPropertyNodesVerifierWithEmptyName()
+ verifier.addPropertyNodesVerifierElemWithEmptyName()
.addNodeWithoutOrder("EMAIL", "type_notype@example.com", new TypeSet("PREF"))
.addNodeWithoutOrder("EMAIL", "type_home@example.com", new TypeSet("HOME", "PREF"));
@@ -520,7 +520,7 @@ public class VCardExporterTests extends VCardTestsBase {
.put(StructuredPostal.POSTCODE, "100")
.put(StructuredPostal.COUNTRY, "Country");
VCardVerifier verifier = new VCardVerifier(resolver, version);
- verifier.addPropertyNodesVerifierWithEmptyName()
+ verifier.addPropertyNodesVerifierElemWithEmptyName()
.addNodeWithoutOrder("ADR", "Pobox;Neighborhood;Street;City;Region;100;Country",
Arrays.asList("Pobox", "Neighborhood", "Street", "City",
"Region", "100", "Country"), new TypeSet("HOME"));
@@ -544,7 +544,7 @@ public class VCardExporterTests extends VCardTestsBase {
"Formatted address CA 123-334 United Statue");
VCardVerifier verifier = new VCardVerifier(resolver, version);
- verifier.addPropertyNodesVerifierWithEmptyName()
+ verifier.addPropertyNodesVerifierElemWithEmptyName()
.addNodeWithOrder("ADR", ";Formatted address CA 123-334 United Statue;;;;;",
Arrays.asList("", "Formatted address CA 123-334 United Statue",
"", "", "", "", ""), new TypeSet("HOME"));
@@ -574,7 +574,7 @@ public class VCardExporterTests extends VCardTestsBase {
"Formatted address CA 123-334 United Statue"); // Should be ignored
VCardVerifier verifier = new VCardVerifier(resolver, version);
- verifier.addPropertyNodesVerifierWithEmptyName()
+ verifier.addPropertyNodesVerifierElemWithEmptyName()
.addNodeWithoutOrder("ADR", "Pobox;;;;;;Country",
Arrays.asList("Pobox", "", "", "", "", "", "Country"),
new TypeSet("HOME"));
@@ -615,7 +615,7 @@ public class VCardExporterTests extends VCardTestsBase {
VCardVerifier verifier = new VCardVerifier(resolver, version);
// Currently we do not use group but depend on the order.
- verifier.addPropertyNodesVerifierWithEmptyName()
+ verifier.addPropertyNodesVerifierElemWithEmptyName()
.addNodeWithOrder("ORG", "CompanyX;DepartmentY",
Arrays.asList("CompanyX", "DepartmentY"))
.addNodeWithOrder("TITLE", "TitleZ")
@@ -677,7 +677,7 @@ public class VCardExporterTests extends VCardTestsBase {
// No determined way to express unknown type...
VCardVerifier verifier = new VCardVerifier(resolver, version);
- verifier.addPropertyNodesVerifierWithEmptyName()
+ verifier.addPropertyNodesVerifierElemWithEmptyName()
.addNodeWithoutOrder("X-JABBER", "jabber")
.addNodeWithoutOrder("X-ICQ", "icq")
.addNodeWithoutOrder("X-GOOGLE-TALK", "google talk")
@@ -714,7 +714,7 @@ public class VCardExporterTests extends VCardTestsBase {
.put(Im.IS_PRIMARY, 1);
VCardVerifier verifier = new VCardVerifier(resolver, version);
- verifier.addPropertyNodesVerifierWithEmptyName()
+ verifier.addPropertyNodesVerifierElemWithEmptyName()
.addNodeWithoutOrder("X-AIM", "aim1")
.addNodeWithoutOrder("X-AIM", "aim2", new TypeSet("HOME", "PREF"));
@@ -743,7 +743,7 @@ public class VCardExporterTests extends VCardTestsBase {
// We drop TYPE information since vCard (especially 3.0) does not allow us to emit it.
VCardVerifier verifier = new VCardVerifier(resolver, version);
- verifier.addPropertyNodesVerifierWithEmptyName()
+ verifier.addPropertyNodesVerifierElemWithEmptyName()
.addNodeWithoutOrder("URL", "ftp://ftp.example.android.com/index.html")
.addNodeWithoutOrder("URL", "http://website.example.android.com/index.html");
verifier.verify();
@@ -779,7 +779,7 @@ public class VCardExporterTests extends VCardTestsBase {
.put(Event.START_DATE, "2009-05-19");
VCardVerifier verifier = new VCardVerifier(resolver, version);
- verifier.addPropertyNodesVerifierWithEmptyName()
+ verifier.addPropertyNodesVerifierElemWithEmptyName()
.addNodeWithoutOrder("BDAY", "2008-10-22");
verifier.verify();
@@ -804,7 +804,7 @@ public class VCardExporterTests extends VCardTestsBase {
.put(Note.IS_PRIMARY, 1); // Just ignored.
VCardVerifier verifier = new VCardVerifier(resolver, version);
- verifier.addPropertyNodesVerifierWithEmptyName()
+ verifier.addPropertyNodesVerifierElemWithEmptyName()
.addNodeWithOrder("NOTE", "note1")
.addNodeWithOrder("NOTE", "note2");
@@ -881,7 +881,7 @@ public class VCardExporterTests extends VCardTestsBase {
.put(Nickname.NAME, "Nicky");
VCardVerifier verifier = new VCardVerifier(resolver, V21);
- verifier.addPropertyNodesVerifierWithEmptyName()
+ verifier.addPropertyNodesVerifierElemWithEmptyName()
.addNodeWithOrder("X-ANDROID-CUSTOM",
Nickname.CONTENT_ITEM_TYPE + ";Nicky;;;;;;;;;;;;;;");
verifier.addImportVerifier()
@@ -897,7 +897,7 @@ public class VCardExporterTests extends VCardTestsBase {
.put(Phone.NUMBER, "111-222-3333 (Miami)\n444-5555-666 (Tokyo);"
+ "777-888-9999 (Chicago);111-222-3333 (Miami)");
VCardVerifier verifier = new VCardVerifier(resolver, V21);
- verifier.addPropertyNodesVerifierWithEmptyName()
+ verifier.addPropertyNodesVerifierElemWithEmptyName()
.addNodeWithoutOrder("TEL", "111-222-3333", new TypeSet("HOME"))
.addNodeWithoutOrder("TEL", "444-555-5666", new TypeSet("HOME"))
.addNodeWithoutOrder("TEL", "777-888-9999", new TypeSet("HOME"));
diff --git a/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardImporterTests.java b/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardImporterTests.java
index b1fccaa..36cc966 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardImporterTests.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardImporterTests.java
@@ -784,7 +784,7 @@ public class VCardImporterTests extends VCardTestsBase {
.put(StructuredName.DISPLAY_NAME, "\u5B89\u85E4\u30ED\u30A4\u30C9")
// While vCard parser does not split "SOUND" property values,
// ContactStruct care it.
- .put(StructuredName.PHONETIC_FAMILY_NAME,
+ .put(StructuredName.PHONETIC_GIVEN_NAME,
"\uFF71\uFF9D\uFF84\uFF9E\uFF73\uFF9B\uFF72\uFF84\uFF9E");
elem.addExpected(Phone.CONTENT_ITEM_TYPE)
@@ -937,7 +937,7 @@ public class VCardImporterTests extends VCardTestsBase {
elem.addExpected(StructuredName.CONTENT_ITEM_TYPE)
.put(StructuredName.FAMILY_NAME, "\u5B89\u85E4\u30ED\u30A4\u30C9\u0033")
.put(StructuredName.DISPLAY_NAME, "\u5B89\u85E4\u30ED\u30A4\u30C9\u0033")
- .put(StructuredName.PHONETIC_FAMILY_NAME,
+ .put(StructuredName.PHONETIC_GIVEN_NAME,
"\uFF71\uFF9D\uFF84\uFF9E\uFF73\uFF9B\uFF72\uFF84\uFF9E\u0033");
elem.addExpected(Phone.CONTENT_ITEM_TYPE)
.put(Phone.TYPE, Phone.TYPE_CUSTOM)
@@ -959,7 +959,7 @@ public class VCardImporterTests extends VCardTestsBase {
elem.addExpected(StructuredName.CONTENT_ITEM_TYPE)
.put(StructuredName.FAMILY_NAME, "\u5B89\u85E4\u30ED\u30A4\u30C9\u0034")
.put(StructuredName.DISPLAY_NAME, "\u5B89\u85E4\u30ED\u30A4\u30C9\u0034")
- .put(StructuredName.PHONETIC_FAMILY_NAME,
+ .put(StructuredName.PHONETIC_GIVEN_NAME,
"\uFF71\uFF9D\uFF84\uFF9E\uFF73\uFF9B\uFF72\uFF84\uFF9E\u0034");
elem.addExpected(Phone.CONTENT_ITEM_TYPE)
.put(Phone.TYPE, Phone.TYPE_CUSTOM)
@@ -981,7 +981,7 @@ public class VCardImporterTests extends VCardTestsBase {
elem.addExpected(StructuredName.CONTENT_ITEM_TYPE)
.put(StructuredName.FAMILY_NAME, "\u5B89\u85E4\u30ED\u30A4\u30C9\u0035")
.put(StructuredName.DISPLAY_NAME, "\u5B89\u85E4\u30ED\u30A4\u30C9\u0035")
- .put(StructuredName.PHONETIC_FAMILY_NAME,
+ .put(StructuredName.PHONETIC_GIVEN_NAME,
"\uFF71\uFF9D\uFF84\uFF9E\uFF73\uFF9B\uFF72\uFF84\uFF9E\u0035");
elem.addExpected(Phone.CONTENT_ITEM_TYPE)
.put(Phone.TYPE, Phone.TYPE_CUSTOM)
@@ -1031,6 +1031,18 @@ public class VCardImporterTests extends VCardTestsBase {
new VCardParser_V21(VCardParser.PARSER_MODE_SCAN));
}
+ public void testTolerateInvalidCommentLikeLineV21() throws IOException, VCardException {
+ ImportVerifier verifier = new ImportVerifier();
+ ImportVerifierElem elem = verifier.addImportVerifierElem();
+ elem.addExpected(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.GIVEN_NAME, "Conference Call")
+ .put(StructuredName.DISPLAY_NAME, "Conference Call");
+ elem.addExpected(Note.CONTENT_ITEM_TYPE)
+ .put(Note.NOTE, "This is an (sharp ->#<- sharp) example. "
+ + "This message must NOT be ignored.");
+ verifier.verify(R.raw.v21_invalid_comment_line, V21);
+ }
+
public void testPagerV30_Parse() throws IOException, VCardException {
PropertyNodesVerifier verifier = new PropertyNodesVerifier(this);
verifier.addPropertyNodesVerifierElem()
diff --git a/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardJapanizationTests.java b/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardJapanizationTests.java
index 4b65008..70e4966 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardJapanizationTests.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardJapanizationTests.java
@@ -106,4 +106,102 @@ public class VCardJapanizationTests extends VCardTestsBase {
.addNodeWithoutOrder("X-DCM-HMN-MODE", "");
verifier.verify();
}
+
+ private void testPhoneticNameCommon(int vcardType) {
+ ExportTestResolver resolver = new ExportTestResolver();
+ resolver.buildContactEntry().buildData(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.PHONETIC_FAMILY_NAME, "\u3084\u307E\u3060")
+ .put(StructuredName.PHONETIC_MIDDLE_NAME, "\u30DF\u30C9\u30EB\u30CD\u30FC\u30E0")
+ .put(StructuredName.PHONETIC_GIVEN_NAME, "\u305F\u308D\u3046");
+
+ final ContentValues contentValues =
+ (VCardConfig.usesShiftJis(vcardType) ?
+ (VCardConfig.isV30(vcardType) ? mContentValuesForSJis :
+ mContentValuesForQPAndSJis) :
+ (VCardConfig.isV30(vcardType) ? null : mContentValuesForQPAndUtf8));
+ VCardVerifier verifier = new VCardVerifier(resolver, vcardType);
+ PropertyNodesVerifierElem elem = verifier.addPropertyNodesVerifierElemWithEmptyName();
+ elem.addNodeWithoutOrder("X-PHONETIC-LAST-NAME", "\u3084\u307E\u3060",
+ contentValues)
+ .addNodeWithoutOrder("X-PHONETIC-MIDDLE-NAME",
+ "\u30DF\u30C9\u30EB\u30CD\u30FC\u30E0",
+ contentValues)
+ .addNodeWithoutOrder("X-PHONETIC-FIRST-NAME", "\u305F\u308D\u3046",
+ contentValues);
+ if (VCardConfig.isV30(vcardType)) {
+ elem.addNodeWithoutOrder("SORT-STRING",
+ "\u3084\u307E\u3060 \u30DF\u30C9\u30EB\u30CD\u30FC\u30E0 \u305F\u308D\u3046",
+ contentValues);
+ }
+ ContentValuesBuilder builder = verifier.addImportVerifier()
+ .addExpected(StructuredName.CONTENT_ITEM_TYPE);
+ builder.put(StructuredName.PHONETIC_FAMILY_NAME, "\u3084\u307E\u3060")
+ .put(StructuredName.PHONETIC_MIDDLE_NAME, "\u30DF\u30C9\u30EB\u30CD\u30FC\u30E0")
+ .put(StructuredName.PHONETIC_GIVEN_NAME, "\u305F\u308D\u3046")
+ .put(StructuredName.DISPLAY_NAME,
+ "\u3084\u307E\u3060 \u30DF\u30C9\u30EB\u30CD\u30FC\u30E0 " +
+ "\u305F\u308D\u3046");
+ verifier.verify();
+ }
+
+ public void testPhoneticNameForJapaneseV21Utf8() {
+ testPhoneticNameCommon(VCardConfig.VCARD_TYPE_V21_JAPANESE_UTF8);
+ }
+
+ public void testPhoneticNameForJapaneseV21Sjis() {
+ testPhoneticNameCommon(VCardConfig.VCARD_TYPE_V21_JAPANESE_SJIS);
+ }
+
+ public void testPhoneticNameForJapaneseV30Utf8() {
+ testPhoneticNameCommon(VCardConfig.VCARD_TYPE_V30_JAPANESE_UTF8);
+ }
+
+ public void testPhoneticNameForJapaneseV30SJis() {
+ testPhoneticNameCommon(VCardConfig.VCARD_TYPE_V30_JAPANESE_SJIS);
+ }
+
+ public void testPhoneticNameForMobileV21_1() {
+ ExportTestResolver resolver = new ExportTestResolver();
+ resolver.buildContactEntry().buildData(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.PHONETIC_FAMILY_NAME, "\u3084\u307E\u3060")
+ .put(StructuredName.PHONETIC_MIDDLE_NAME, "\u30DF\u30C9\u30EB\u30CD\u30FC\u30E0")
+ .put(StructuredName.PHONETIC_GIVEN_NAME, "\u305F\u308D\u3046");
+
+ VCardVerifier verifier = new VCardVerifier(resolver,
+ VCardConfig.VCARD_TYPE_V21_JAPANESE_MOBILE);
+ verifier.addPropertyNodesVerifierElem()
+ .addNodeWithoutOrder("SOUND",
+ "\uFF94\uFF8F\uFF80\uFF9E \uFF90\uFF84\uFF9E\uFF99\uFF88\uFF70\uFF91 " +
+ "\uFF80\uFF9B\uFF73;;;;",
+ mContentValuesForSJis, new TypeSet("X-IRMC-N"));
+ ContentValuesBuilder builder = verifier.addImportVerifier()
+ .addExpected(StructuredName.CONTENT_ITEM_TYPE);
+ builder.put(StructuredName.PHONETIC_FAMILY_NAME, "\uFF94\uFF8F\uFF80\uFF9E")
+ .put(StructuredName.PHONETIC_MIDDLE_NAME,
+ "\uFF90\uFF84\uFF9E\uFF99\uFF88\uFF70\uFF91")
+ .put(StructuredName.PHONETIC_GIVEN_NAME, "\uFF80\uFF9B\uFF73")
+ .put(StructuredName.DISPLAY_NAME,
+ "\uFF94\uFF8F\uFF80\uFF9E \uFF90\uFF84\uFF9E\uFF99\uFF88\uFF70\uFF91 " +
+ "\uFF80\uFF9B\uFF73");
+ verifier.verify();
+ }
+
+ public void testPhoneticNameForMobileV21_2() {
+ ExportTestResolver resolver = new ExportTestResolver();
+ resolver.buildContactEntry().buildData(StructuredName.CONTENT_ITEM_TYPE)
+ .put(StructuredName.PHONETIC_FAMILY_NAME, "\u3084\u307E\u3060")
+ .put(StructuredName.PHONETIC_GIVEN_NAME, "\u305F\u308D\u3046");
+
+ VCardVerifier verifier = new VCardVerifier(resolver,
+ VCardConfig.VCARD_TYPE_V21_JAPANESE_MOBILE);
+ verifier.addPropertyNodesVerifierElem()
+ .addNodeWithoutOrder("SOUND", "\uFF94\uFF8F\uFF80\uFF9E \uFF80\uFF9B\uFF73;;;;",
+ mContentValuesForSJis, new TypeSet("X-IRMC-N"));
+ ContentValuesBuilder builder = verifier.addImportVerifier()
+ .addExpected(StructuredName.CONTENT_ITEM_TYPE);
+ builder.put(StructuredName.PHONETIC_FAMILY_NAME, "\uFF94\uFF8F\uFF80\uFF9E")
+ .put(StructuredName.PHONETIC_GIVEN_NAME, "\uFF80\uFF9B\uFF73")
+ .put(StructuredName.DISPLAY_NAME, "\uFF94\uFF8F\uFF80\uFF9E \uFF80\uFF9B\uFF73");
+ verifier.verify();
+ }
} \ No newline at end of file
diff --git a/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardTestsBase.java b/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardTestsBase.java
index 6176f5c..af8b718 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardTestsBase.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardTestsBase.java
@@ -349,10 +349,14 @@ class CustomMockContext extends MockContext {
}
}
if (!checked) {
- final String failMsg =
- "Unexpected ContentValues for MimeType " + mimeType
- + ": " + actualContentValues;
- fail(failMsg);
+ final StringBuilder builder = new StringBuilder();
+ builder.append("Unexpected: ");
+ builder.append(convertToEasilyReadableString(actualContentValues));
+ builder.append("\nExpected: ");
+ for (ContentValues expectedContentValues : contentValuesCollection) {
+ builder.append(convertToEasilyReadableString(expectedContentValues));
+ }
+ fail(builder.toString());
}
} else {
fail("Unexpected Uri has come: " + uri);
@@ -823,7 +827,7 @@ class CustomMockContext extends MockContext {
return elem;
}
- public PropertyNodesVerifierElem addPropertyNodesVerifierWithEmptyName() {
+ public PropertyNodesVerifierElem addPropertyNodesVerifierElemWithEmptyName() {
PropertyNodesVerifierElem elem = addPropertyNodesVerifierElem();
if (mIsV30) {
elem.addNodeWithOrder("N", "").addNodeWithOrder("FN", "");
@@ -847,14 +851,16 @@ class CustomMockContext extends MockContext {
}
private void verifyOneVCard(final String vcard) {
+ // Log.d("@@@", vcard);
final VCardBuilder builder;
if (mImportVerifier != null) {
final VNodeBuilder vnodeBuilder = mPropertyNodesVerifier;
- final VCardDataBuilder vcardDataBuilder = new VCardDataBuilder();
+ final VCardDataBuilder vcardDataBuilder =
+ new VCardDataBuilder(mVCardType);
vcardDataBuilder.addEntryHandler(mImportVerifier);
if (mPropertyNodesVerifier != null) {
builder = new VCardBuilderCollection(Arrays.asList(
- vcardDataBuilder, mPropertyNodesVerifier));
+ mPropertyNodesVerifier, vcardDataBuilder));
} else {
builder = vnodeBuilder;
}
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/FsUtils.java b/tests/DumpRenderTree/src/com/android/dumprendertree/FsUtils.java
index 85e0422..fea366c 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/FsUtils.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/FsUtils.java
@@ -26,6 +26,7 @@ import java.io.File;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
+import java.util.regex.Pattern;
public class FsUtils {
@@ -121,4 +122,38 @@ public class FsUtils {
return url;
}
+ public static boolean diffIgnoreSpaces(String file1, String file2) throws IOException {
+ BufferedReader br1 = new BufferedReader(new FileReader(file1));
+ BufferedReader br2 = new BufferedReader(new FileReader(file2));
+ boolean same = true;
+ Pattern trailingSpace = Pattern.compile("\\s+$");
+
+ while(true) {
+ String line1 = br1.readLine();
+ String line2 = br2.readLine();
+
+ if (line1 == null && line2 == null)
+ break;
+ if (line1 != null) {
+ line1 = trailingSpace.matcher(line1).replaceAll("");
+ } else {
+ line1 = "";
+ }
+ if (line2 != null) {
+ line2 = trailingSpace.matcher(line2).replaceAll("");
+ } else {
+ line2 = "";
+ }
+ if(!line1.equals(line2)) {
+ same = false;
+ break;
+ }
+ }
+
+ br1.close();
+ br2.close();
+
+ return same;
+ }
+
}
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java
index 235e10e..8983612 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java
@@ -249,28 +249,11 @@ public class LayoutTestsAutoTest extends ActivityInstrumentationTestCase2<TestSh
File expected = new File(expectedResultFile);
if (actual.exists() && expected.exists()) {
try {
- boolean passing = true;
- BufferedReader fr = new BufferedReader(new FileReader(actual));
- BufferedReader fe = new BufferedReader(new FileReader(expected));
- while (true) {
- String s1 = fr.readLine();
- String s2 = fe.readLine();
- if (s1 == null && s2 == null)
- break; // both files are the same
- if (s1 == null || s2 == null || !s1.equals(s2)) {
- passing = false;
- break;
- }
- }
-
- if (passing) {
+ if (FsUtils.diffIgnoreSpaces(actualResultFile, expectedResultFile)) {
passedCase(testFile);
} else {
failedCase(testFile);
}
-
- fe.close();
- fr.close();
} catch (FileNotFoundException ex) {
Log.e(LOGTAG, "File not found : " + ex.getMessage());
} catch (IOException ex) {