summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Android.mk1
-rw-r--r--api/16.txt1
-rw-r--r--api/current.txt17
-rw-r--r--cmds/bootanimation/BootAnimation.cpp4
-rw-r--r--cmds/bootanimation/BootAnimation.h7
-rw-r--r--cmds/bootanimation/bootanimation_main.cpp2
-rw-r--r--cmds/content/src/com/android/commands/content/Content.java15
-rw-r--r--cmds/dumpstate/dumpstate.c32
-rw-r--r--cmds/dumpstate/dumpstate.h2
-rw-r--r--cmds/dumpstate/utils.c2
-rw-r--r--cmds/screencap/screencap.cpp2
-rw-r--r--cmds/stagefright/SimplePlayer.cpp2
-rw-r--r--cmds/stagefright/codec.cpp4
-rw-r--r--cmds/stagefright/sf2.cpp3
-rw-r--r--cmds/stagefright/stagefright.cpp4
-rw-r--r--cmds/stagefright/stream.cpp3
-rw-r--r--core/java/android/app/ActivityThread.java52
-rw-r--r--core/java/android/app/Fragment.java2
-rw-r--r--core/java/android/content/Context.java11
-rw-r--r--core/java/android/content/res/Configuration.java23
-rw-r--r--core/java/android/database/sqlite/SQLiteConnection.java52
-rw-r--r--core/java/android/database/sqlite/SQLiteConnectionPool.java186
-rw-r--r--core/java/android/database/sqlite/SQLiteDatabase.java80
-rw-r--r--core/java/android/database/sqlite/SQLiteDatabaseConfiguration.java25
-rw-r--r--core/java/android/database/sqlite/SQLiteDebug.java12
-rw-r--r--core/java/android/database/sqlite/SQLiteGlobal.java41
-rw-r--r--core/java/android/database/sqlite/SQLiteOpenHelper.java175
-rw-r--r--core/java/android/net/NetworkInfo.java5
-rw-r--r--core/java/android/net/arp/ArpPeer.java132
-rw-r--r--core/java/android/os/IUpdateLock.aidl (renamed from services/audioflinger/AudioBufferProvider.cpp)23
-rwxr-xr-xcore/java/android/os/TokenWatcher.java22
-rw-r--r--core/java/android/os/UpdateLock.java166
-rw-r--r--core/java/android/provider/CalendarContract.java15
-rw-r--r--core/java/android/provider/Settings.java55
-rw-r--r--core/java/android/text/Html.java25
-rw-r--r--core/java/android/text/StaticLayout.java3
-rw-r--r--core/java/android/text/TextDirectionHeuristics.java3
-rw-r--r--core/java/android/util/LocaleUtil.java27
-rw-r--r--core/java/android/util/TimeUtils.java161
-rw-r--r--core/java/android/view/View.java13
-rw-r--r--core/java/android/view/ViewGroup.java8
-rw-r--r--core/java/android/view/animation/Animation.java2
-rw-r--r--core/java/android/view/inputmethod/BaseInputConnection.java9
-rw-r--r--core/java/android/view/inputmethod/InputMethodManager.java4
-rw-r--r--core/java/android/view/textservice/SentenceSuggestionsInfo.java7
-rw-r--r--core/java/android/view/textservice/SpellCheckerSession.java4
-rw-r--r--core/java/android/webkit/HTML5VideoInline.java5
-rw-r--r--core/java/android/webkit/WebView.java254
-rw-r--r--core/java/android/webkit/WebViewCore.java9
-rw-r--r--core/java/android/widget/NumberPicker.java63
-rw-r--r--core/java/android/widget/SpellChecker.java249
-rw-r--r--core/java/android/widget/TextView.java461
-rw-r--r--core/java/com/android/internal/net/NetworkStatsFactory.java95
-rw-r--r--core/java/com/android/internal/util/FileRotator.java2
-rw-r--r--core/java/com/android/internal/widget/EditableInputConnection.java32
-rw-r--r--core/jni/android/graphics/TextLayoutCache.cpp18
-rw-r--r--core/jni/android/graphics/TextLayoutCache.h2
-rw-r--r--core/jni/android_app_NativeActivity.cpp11
-rw-r--r--core/jni/android_database_CursorWindow.cpp2
-rw-r--r--core/jni/android_database_SQLiteConnection.cpp19
-rw-r--r--core/jni/android_hardware_Camera.cpp2
-rw-r--r--core/jni/android_view_Display.cpp2
-rw-r--r--core/jni/android_view_Surface.cpp8
-rw-r--r--core/jni/com_google_android_gles_jni_EGLImpl.cpp11
-rw-r--r--core/res/AndroidManifest.xml8
-rw-r--r--core/res/res/layout/number_picker.xml3
-rw-r--r--core/res/res/layout/simple_list_item_multiple_choice.xml8
-rw-r--r--core/res/res/values-af/strings.xml3
-rw-r--r--core/res/res/values-am/strings.xml3
-rw-r--r--core/res/res/values-ar/strings.xml3
-rw-r--r--core/res/res/values-be/strings.xml3
-rw-r--r--core/res/res/values-bg/strings.xml6
-rw-r--r--core/res/res/values-ca/strings.xml3
-rw-r--r--core/res/res/values-cs/strings.xml3
-rw-r--r--core/res/res/values-da/strings.xml25
-rw-r--r--core/res/res/values-de/strings.xml3
-rw-r--r--core/res/res/values-el/strings.xml3
-rw-r--r--core/res/res/values-en-rGB/strings.xml3
-rw-r--r--core/res/res/values-es-rUS/strings.xml3
-rw-r--r--core/res/res/values-es/strings.xml3
-rw-r--r--core/res/res/values-et/strings.xml3
-rw-r--r--core/res/res/values-fa/strings.xml6
-rw-r--r--core/res/res/values-fi/strings.xml3
-rw-r--r--core/res/res/values-fr/strings.xml5
-rw-r--r--core/res/res/values-hi/strings.xml3
-rw-r--r--core/res/res/values-hr/strings.xml3
-rw-r--r--core/res/res/values-hu/strings.xml3
-rw-r--r--core/res/res/values-in/strings.xml3
-rw-r--r--core/res/res/values-it/strings.xml3
-rw-r--r--core/res/res/values-iw/strings.xml3
-rw-r--r--core/res/res/values-ja/strings.xml3
-rw-r--r--core/res/res/values-ko/strings.xml3
-rw-r--r--core/res/res/values-lt/strings.xml3
-rw-r--r--core/res/res/values-lv/strings.xml3
-rw-r--r--core/res/res/values-ms/strings.xml6
-rw-r--r--core/res/res/values-nb/strings.xml3
-rw-r--r--core/res/res/values-nl/strings.xml3
-rw-r--r--core/res/res/values-pl/strings.xml5
-rw-r--r--core/res/res/values-pt-rPT/strings.xml3
-rw-r--r--core/res/res/values-pt/strings.xml3
-rw-r--r--core/res/res/values-rm/strings.xml6
-rw-r--r--core/res/res/values-ro/strings.xml6
-rw-r--r--core/res/res/values-ru/strings.xml3
-rw-r--r--core/res/res/values-sk/strings.xml3
-rw-r--r--core/res/res/values-sl/strings.xml3
-rw-r--r--core/res/res/values-sr/strings.xml3
-rw-r--r--core/res/res/values-sv/strings.xml6
-rw-r--r--core/res/res/values-sw/strings.xml6
-rw-r--r--core/res/res/values-th/strings.xml3
-rw-r--r--core/res/res/values-tl/strings.xml3
-rw-r--r--core/res/res/values-tr/strings.xml6
-rw-r--r--core/res/res/values-uk/strings.xml3
-rw-r--r--core/res/res/values-vi/strings.xml3
-rw-r--r--core/res/res/values-zh-rCN/strings.xml8
-rw-r--r--core/res/res/values-zh-rTW/strings.xml6
-rw-r--r--core/res/res/values-zu/strings.xml13
-rwxr-xr-xcore/res/res/values/config.xml23
-rw-r--r--core/res/res/values/public.xml4
-rwxr-xr-xcore/res/res/values/strings.xml4
-rw-r--r--core/tests/coretests/src/android/util/LocaleUtilTest.java119
-rw-r--r--data/fonts/AndroidEmoji.ttfbin328104 -> 328252 bytes
-rw-r--r--docs/html/design/building-blocks/buttons.html10
-rw-r--r--docs/html/design/building-blocks/dialogs.html4
-rw-r--r--docs/html/design/building-blocks/grid-lists.html6
-rw-r--r--docs/html/design/building-blocks/index.html4
-rw-r--r--docs/html/design/building-blocks/lists.html4
-rw-r--r--docs/html/design/building-blocks/pickers.html6
-rw-r--r--docs/html/design/building-blocks/progress.html7
-rw-r--r--docs/html/design/building-blocks/scrolling.html10
-rw-r--r--docs/html/design/building-blocks/seek-bars.html4
-rw-r--r--docs/html/design/building-blocks/spinners.html4
-rw-r--r--docs/html/design/building-blocks/switches.html13
-rw-r--r--docs/html/design/building-blocks/tabs.html4
-rw-r--r--docs/html/design/building-blocks/text-fields.html6
-rw-r--r--docs/html/design/downloads/index.html278
-rw-r--r--docs/html/design/get-started/creative-vision.html4
-rw-r--r--docs/html/design/get-started/principles.html10
-rw-r--r--docs/html/design/get-started/ui-overview.html10
-rw-r--r--docs/html/design/index.html4
-rw-r--r--docs/html/design/patterns/actionbar.html32
-rw-r--r--docs/html/design/patterns/app-structure.html19
-rw-r--r--docs/html/design/patterns/compatibility.html6
-rw-r--r--docs/html/design/patterns/gestures.html4
-rw-r--r--docs/html/design/patterns/index.html4
-rw-r--r--docs/html/design/patterns/multi-pane-layouts.html13
-rw-r--r--docs/html/design/patterns/navigation.html13
-rw-r--r--docs/html/design/patterns/new-4-0.html4
-rw-r--r--docs/html/design/patterns/notifications.html8
-rw-r--r--docs/html/design/patterns/pure-android.html6
-rw-r--r--docs/html/design/patterns/selection.html7
-rw-r--r--docs/html/design/patterns/swipe-views.html12
-rw-r--r--docs/html/design/static/content/downloads_color_swatches.pngbin0 -> 2479 bytes
-rw-r--r--docs/html/design/static/content/downloads_roboto_specimen_preview.pngbin0 -> 20900 bytes
-rw-r--r--docs/html/design/static/content/downloads_stencils.pngbin0 -> 12181 bytes
-rw-r--r--docs/html/design/static/default.css68
-rw-r--r--docs/html/design/static/default.js8
-rw-r--r--docs/html/design/static/download/RobotoSpecimenBook.pdfbin317985 -> 0 bytes
-rw-r--r--docs/html/design/static/download/Roboto_Hinted_20111129.zipbin1505533 -> 0 bytes
-rw-r--r--docs/html/design/static/download/action_bar_icons-v4.0.zipbin1104707 -> 0 bytes
-rw-r--r--docs/html/design/static/download/color_swatches.zipbin1756 -> 0 bytes
-rw-r--r--docs/html/design/static/ico_styleguide.pngbin697 -> 0 bytes
-rw-r--r--docs/html/design/style/color.html9
-rw-r--r--docs/html/design/style/devices-displays.html4
-rw-r--r--docs/html/design/style/iconography.html11
-rw-r--r--docs/html/design/style/index.html4
-rw-r--r--docs/html/design/style/metrics-grids.html8
-rw-r--r--docs/html/design/style/themes.html4
-rw-r--r--docs/html/design/style/touch-feedback.html4
-rw-r--r--docs/html/design/style/typography.html8
-rw-r--r--docs/html/design/style/writing.html6
-rw-r--r--docs/html/guide/topics/fundamentals/fragments.jd2
-rw-r--r--drm/drmserver/DrmManagerService.cpp21
-rw-r--r--drm/drmserver/main_drmserver.cpp5
-rwxr-xr-xdrm/java/android/drm/DrmRights.java55
-rwxr-xr-xdrm/java/android/drm/DrmStore.java30
-rwxr-xr-xdrm/java/android/drm/DrmSupportInfo.java11
-rwxr-xr-xdrm/java/android/drm/DrmUtils.java30
-rw-r--r--graphics/jni/android_renderscript_RenderScript.cpp2
-rw-r--r--include/androidfw/CursorWindow.h (renamed from include/binder/CursorWindow.h)0
-rw-r--r--include/binder/MemoryHeapPmem.h79
-rw-r--r--include/camera/ICamera.h4
-rw-r--r--include/drm/drm_framework_common.h1
-rw-r--r--include/gui/BufferQueue.h2
-rw-r--r--include/gui/IGraphicBufferAlloc.h (renamed from include/surfaceflinger/IGraphicBufferAlloc.h)10
-rw-r--r--include/gui/ISurface.h (renamed from include/surfaceflinger/ISurface.h)6
-rw-r--r--include/gui/ISurfaceComposer.h (renamed from include/surfaceflinger/ISurfaceComposer.h)10
-rw-r--r--include/gui/ISurfaceComposerClient.h (renamed from include/surfaceflinger/ISurfaceComposerClient.h)8
-rw-r--r--include/gui/Surface.h (renamed from include/surfaceflinger/Surface.h)11
-rw-r--r--include/gui/SurfaceComposerClient.h (renamed from include/surfaceflinger/SurfaceComposerClient.h)8
-rw-r--r--include/media/AudioRecord.h16
-rw-r--r--include/media/AudioSystem.h2
-rw-r--r--include/media/IAudioPolicyService.h2
-rw-r--r--include/media/stagefright/ACodec.h10
-rw-r--r--include/media/stagefright/MediaCodec.h9
-rw-r--r--include/media/stagefright/timedtext/TimedTextDriver.h (renamed from media/libstagefright/timedtext/TimedTextDriver.h)0
-rw-r--r--include/private/gui/LayerState.h (renamed from include/private/surfaceflinger/LayerState.h)3
-rw-r--r--include/private/gui/SharedBufferStack.h (renamed from include/private/surfaceflinger/SharedBufferStack.h)0
-rw-r--r--include/private/opengles/gl_context.h640
-rw-r--r--include/utils/AndroidThreads.h136
-rw-r--r--include/utils/Condition.h134
-rw-r--r--include/utils/Mutex.h137
-rw-r--r--include/utils/RWLock.h126
-rw-r--r--include/utils/Thread.h113
-rw-r--r--include/utils/ThreadDefs.h123
-rw-r--r--include/utils/Trace.h166
-rw-r--r--include/utils/threads.h554
-rw-r--r--libs/androidfw/Android.mk1
-rw-r--r--libs/androidfw/CursorWindow.cpp (renamed from libs/binder/CursorWindow.cpp)2
-rw-r--r--libs/binder/Android.mk2
-rw-r--r--libs/binder/MemoryHeapPmem.cpp248
-rw-r--r--libs/binder/ProcessState.cpp4
-rw-r--r--libs/camera/Camera.cpp3
-rw-r--r--libs/camera/ICamera.cpp2
-rw-r--r--libs/gui/BufferQueue.cpp28
-rw-r--r--libs/gui/DisplayEventReceiver.cpp3
-rw-r--r--libs/gui/IGraphicBufferAlloc.cpp2
-rw-r--r--libs/gui/ISurface.cpp2
-rw-r--r--libs/gui/ISurfaceComposer.cpp10
-rw-r--r--libs/gui/ISurfaceComposerClient.cpp6
-rw-r--r--libs/gui/LayerState.cpp4
-rw-r--r--libs/gui/Surface.cpp11
-rw-r--r--libs/gui/SurfaceComposerClient.cpp13
-rw-r--r--libs/gui/SurfaceTexture.cpp16
-rw-r--r--libs/gui/SurfaceTextureClient.cpp22
-rw-r--r--libs/gui/tests/SurfaceTexture_test.cpp6
-rw-r--r--libs/gui/tests/Surface_test.cpp6
-rw-r--r--libs/rs/driver/rsdGL.cpp34
-rw-r--r--libs/rs/driver/rsdGL.h9
-rw-r--r--libs/rs/driver/rsdRuntimeStubs.cpp8
-rw-r--r--libs/rs/rsRuntime.h4
-rw-r--r--libs/rs/rsScriptC_LibGL.cpp18
-rw-r--r--libs/rs/scriptc/rs_allocation.rsh62
-rw-r--r--libs/rs/scriptc/rs_graphics.rsh59
-rw-r--r--libs/rs/scriptc/rs_types.rsh158
-rw-r--r--libs/surfaceflinger_client/Android.mk10
-rw-r--r--libs/utils/Android.mk3
-rw-r--r--libs/utils/BlobCache.cpp4
-rw-r--r--libs/utils/Debug.cpp2
-rw-r--r--libs/utils/Static.cpp4
-rw-r--r--libs/utils/StopWatch.cpp8
-rw-r--r--libs/utils/Trace.cpp47
-rw-r--r--media/jni/android_media_MediaCodec.cpp6
-rw-r--r--media/jni/android_media_MediaPlayer.cpp2
-rw-r--r--media/jni/android_media_MediaRecorder.cpp2
-rwxr-xr-xmedia/jni/mediaeditor/VideoEditorMain.cpp3
-rwxr-xr-xmedia/libeffects/preprocessing/PreProcessing.cpp15
-rw-r--r--media/libmedia/AudioRecord.cpp16
-rw-r--r--media/libmedia/AudioTrack.cpp2
-rw-r--r--media/libmedia/IMediaPlayer.cpp2
-rw-r--r--media/libmedia/IMediaRecorder.cpp2
-rw-r--r--media/libmedia/IOMX.cpp2
-rw-r--r--media/libmedia/mediaplayer.cpp2
-rw-r--r--media/libmedia/mediarecorder.cpp1
-rw-r--r--media/libmediaplayerservice/StagefrightRecorder.cpp2
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayer.cpp1
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayer.h2
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp2
-rw-r--r--media/libstagefright/ACodec.cpp197
-rw-r--r--media/libstagefright/Android.mk1
-rw-r--r--media/libstagefright/AwesomePlayer.cpp5
-rwxr-xr-xmedia/libstagefright/CameraSource.cpp2
-rw-r--r--media/libstagefright/MediaCodec.cpp46
-rw-r--r--media/libstagefright/SurfaceMediaSource.cpp5
-rw-r--r--media/libstagefright/codecs/aacenc/basic_op/typedefs.h4
-rw-r--r--media/libstagefright/codecs/aacenc/src/qc_main.c2
-rw-r--r--media/libstagefright/codecs/aacenc/src/sf_estim.c2
-rw-r--r--media/libstagefright/codecs/aacenc/src/transform.c6
-rw-r--r--media/libstagefright/codecs/amrnb/common/include/az_lsp.h2
-rw-r--r--media/libstagefright/codecs/amrnb/common/include/inv_sqrt.h2
-rw-r--r--media/libstagefright/codecs/amrnb/common/include/log2_norm.h2
-rw-r--r--media/libstagefright/codecs/amrnb/common/include/pow2.h2
-rw-r--r--media/libstagefright/codecs/amrnb/common/include/sqrt_l.h2
-rw-r--r--media/libstagefright/codecs/amrnb/common/src/bitno_tab.cpp24
-rw-r--r--media/libstagefright/codecs/amrnb/common/src/bitreorder_tab.cpp23
-rw-r--r--media/libstagefright/codecs/amrnb/common/src/bytesused.cpp2
-rw-r--r--media/libstagefright/codecs/amrnb/common/src/c2_9pf_tab.cpp3
-rw-r--r--media/libstagefright/codecs/amrnb/common/src/gains_tbl.cpp6
-rw-r--r--media/libstagefright/codecs/amrnb/common/src/gray_tbl.cpp6
-rw-r--r--media/libstagefright/codecs/amrnb/common/src/grid_tbl.cpp3
-rw-r--r--media/libstagefright/codecs/amrnb/common/src/inv_sqrt_tbl.cpp3
-rw-r--r--media/libstagefright/codecs/amrnb/common/src/log2_tbl.cpp3
-rw-r--r--media/libstagefright/codecs/amrnb/common/src/lsp_lsf_tbl.cpp6
-rw-r--r--media/libstagefright/codecs/amrnb/common/src/lsp_tab.cpp3
-rw-r--r--media/libstagefright/codecs/amrnb/common/src/overflow_tbl.cpp2
-rw-r--r--media/libstagefright/codecs/amrnb/common/src/ph_disp_tab.cpp12
-rw-r--r--media/libstagefright/codecs/amrnb/common/src/pow2_tbl.cpp3
-rw-r--r--media/libstagefright/codecs/amrnb/common/src/q_plsf_5_tbl.cpp13
-rw-r--r--media/libstagefright/codecs/amrnb/common/src/qua_gain_tbl.cpp5
-rw-r--r--media/libstagefright/codecs/amrnb/common/src/sqrt_l_tbl.cpp3
-rw-r--r--media/libstagefright/codecs/amrnb/common/src/window_tab.cpp7
-rw-r--r--media/libstagefright/codecs/amrnb/dec/src/dec_input_format_tab.cpp5
-rw-r--r--media/libstagefright/codecs/amrnb/dec/src/qgain475_tab.cpp2
-rw-r--r--media/libstagefright/codecs/amrnb/enc/src/corrwght_tab.cpp3
-rw-r--r--media/libstagefright/codecs/amrnb/enc/src/enc_output_format_tab.cpp5
-rw-r--r--media/libstagefright/codecs/amrnb/enc/src/inter_36_tab.cpp3
-rw-r--r--media/libstagefright/codecs/amrnb/enc/src/lag_wind_tab.cpp5
-rw-r--r--media/libstagefright/codecs/amrnb/enc/src/ton_stab.cpp3
-rw-r--r--media/libstagefright/codecs/amrwb/include/pvamrwbdecoder_api.h2
-rw-r--r--media/libstagefright/codecs/amrwb/src/get_amr_wb_bits.cpp3
-rw-r--r--media/libstagefright/codecs/amrwb/src/homing_amr_wb_dec.cpp20
-rw-r--r--media/libstagefright/codecs/amrwb/src/isp_isf.cpp2
-rw-r--r--media/libstagefright/codecs/amrwb/src/oversamp_12k8_to_16k.cpp6
-rw-r--r--media/libstagefright/codecs/amrwb/src/phase_dispersion.cpp4
-rw-r--r--media/libstagefright/codecs/amrwbenc/inc/isp_isf.tab4
-rw-r--r--media/libstagefright/codecs/amrwbenc/src/voAMRWBEnc.c2
-rw-r--r--media/libstagefright/colorconversion/SoftwareRenderer.cpp3
-rw-r--r--media/libstagefright/tests/SurfaceMediaSource_test.cpp8
-rw-r--r--media/libstagefright/timedtext/Android.mk1
-rw-r--r--media/libstagefright/timedtext/TimedTextDriver.cpp3
-rw-r--r--media/libstagefright/timedtext/TimedTextPlayer.cpp2
-rwxr-xr-xmedia/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaRecorderStressTestRunner.java4
-rw-r--r--media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaRecorderStressTest.java110
-rw-r--r--native/android/native_window.cpp2
-rw-r--r--opengl/libagl/context.h658
-rw-r--r--opengl/libs/EGL/eglApi.cpp5
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_api.cpp2431
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_fixup.cpp223
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_fixup.h2
-rwxr-xr-xopengl/libs/GLES_trace/tools/genapi.py17
-rw-r--r--packages/FakeOemFeatures/Android.mk15
-rw-r--r--packages/FakeOemFeatures/AndroidManifest.xml25
-rw-r--r--packages/FakeOemFeatures/MODULE_LICENSE_APACHE20
-rw-r--r--packages/FakeOemFeatures/NOTICE190
-rw-r--r--packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeApp.java157
-rw-r--r--packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeBackgroundService.java110
-rw-r--r--packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeCoreService.java31
-rw-r--r--packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeCoreService2.java20
-rw-r--r--packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeCoreService3.java20
-rw-r--r--packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeView.java79
-rw-r--r--packages/SystemUI/res/layout/navigation_bar.xml2
-rw-r--r--packages/SystemUI/res/values/colors.xml1
-rw-r--r--packages/SystemUI/src/com/android/systemui/SwipeHelper.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/recent/RecentsCallback.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java23
-rw-r--r--packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java87
-rw-r--r--packages/SystemUI/src/com/android/systemui/recent/RecentsScrollViewPerformanceHelper.java121
-rw-r--r--packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java24
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java8
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java15
-rw-r--r--packages/VpnDialogs/res/layout/manage.xml4
-rw-r--r--packages/VpnDialogs/res/values-af/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-am/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-ar/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-be/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-bg/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-ca/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-cs/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-da/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-de/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-el/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-en-rGB/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-es-rUS/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-es/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-et/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-fa/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-fi/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-fr/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-hi/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-hr/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-hu/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-in/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-it/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-iw/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-ja/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-ko/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-lt/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-lv/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-ms/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-nb/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-nl/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-pl/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-pt-rPT/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-pt/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-ro/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-ru/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-sk/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-sl/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-sr/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-sv/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-sw/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-th/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-tl/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-tr/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-uk/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-vi/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-zh-rCN/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-zh-rTW/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values-zu/strings.xml1
-rw-r--r--packages/VpnDialogs/res/values/strings.xml2
-rw-r--r--packages/VpnDialogs/res/values/styles.xml1
-rw-r--r--packages/VpnDialogs/src/com/android/vpndialogs/ManageDialog.java13
-rw-r--r--policy/src/com/android/internal/policy/impl/LockScreen.java3
-rwxr-xr-xpolicy/src/com/android/internal/policy/impl/PhoneWindowManager.java21
-rw-r--r--services/audioflinger/Android.mk1
-rw-r--r--services/audioflinger/AudioBufferProvider.h7
-rw-r--r--services/audioflinger/AudioFlinger.cpp247
-rw-r--r--services/audioflinger/AudioFlinger.h105
-rw-r--r--services/audioflinger/AudioMixer.cpp4
-rw-r--r--services/audioflinger/AudioPolicyService.cpp4
-rw-r--r--services/audioflinger/AudioPolicyService.h2
-rw-r--r--services/camera/libcameraservice/CameraHardwareInterface.h1
-rw-r--r--services/camera/libcameraservice/CameraService.cpp2
-rw-r--r--services/camera/tests/CameraServiceTest/CameraServiceTest.cpp1
-rw-r--r--services/input/SpriteController.h4
-rw-r--r--services/java/com/android/server/BootReceiver.java6
-rw-r--r--services/java/com/android/server/SystemServer.java8
-rw-r--r--services/java/com/android/server/TextServicesManagerService.java32
-rw-r--r--services/java/com/android/server/UpdateLockService.java125
-rw-r--r--services/java/com/android/server/WifiService.java9
-rw-r--r--services/java/com/android/server/am/ActivityManagerService.java9
-rw-r--r--services/java/com/android/server/am/ActivityStack.java55
-rw-r--r--services/java/com/android/server/connectivity/Tethering.java10
-rwxr-xr-xservices/java/com/android/server/location/GpsLocationProvider.java1
-rw-r--r--services/java/com/android/server/net/NetworkStatsRecorder.java2
-rw-r--r--services/java/com/android/server/wm/WindowManagerService.java11
-rw-r--r--services/java/com/android/server/wm/WindowState.java4
-rw-r--r--services/jni/com_android_server_PowerManagerService.cpp3
-rw-r--r--services/surfaceflinger/DisplayHardware/DisplayHardware.cpp2
-rw-r--r--services/surfaceflinger/DisplayHardware/DisplayHardware.h2
-rw-r--r--services/surfaceflinger/Layer.cpp21
-rw-r--r--services/surfaceflinger/Layer.h6
-rw-r--r--services/surfaceflinger/LayerBase.h5
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp10
-rw-r--r--services/surfaceflinger/SurfaceFlinger.h6
-rw-r--r--services/surfaceflinger/tests/Transaction_test.cpp9
-rw-r--r--services/surfaceflinger/tests/resize/resize.cpp5
-rw-r--r--services/surfaceflinger/tests/screencap/screencap.cpp2
-rw-r--r--services/surfaceflinger/tests/surface/surface.cpp5
-rw-r--r--telephony/java/com/android/internal/telephony/RIL.java17
-rw-r--r--telephony/java/com/android/internal/telephony/TelephonyProperties.java5
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/GsmCallTracker.java4
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java90
-rwxr-xr-xtelephony/java/com/android/internal/telephony/gsm/SIMRecords.java6
-rw-r--r--tests/RenderScriptTests/tests/src/com/android/rs/test/RSTestCore.java1
-rw-r--r--tests/RenderScriptTests/tests/src/com/android/rs/test/UT_convert.java40
-rw-r--r--tests/RenderScriptTests/tests/src/com/android/rs/test/convert.rs37
-rw-r--r--wifi/java/android/net/wifi/IWifiManager.aidl4
-rw-r--r--wifi/java/android/net/wifi/SupplicantState.java4
-rw-r--r--wifi/java/android/net/wifi/WifiManager.java21
-rw-r--r--wifi/java/android/net/wifi/WifiStateMachine.java291
-rw-r--r--wifi/java/android/net/wifi/WifiWatchdogStateMachine.java993
441 files changed, 9308 insertions, 4982 deletions
diff --git a/Android.mk b/Android.mk
index 79f6220..5572c50 100644
--- a/Android.mk
+++ b/Android.mk
@@ -127,6 +127,7 @@ LOCAL_SRC_FILES += \
core/java/android/os/IPermissionController.aidl \
core/java/android/os/IPowerManager.aidl \
core/java/android/os/IRemoteCallback.aidl \
+ core/java/android/os/IUpdateLock.aidl \
core/java/android/os/IVibratorService.aidl \
core/java/android/service/wallpaper/IWallpaperConnection.aidl \
core/java/android/service/wallpaper/IWallpaperEngine.aidl \
diff --git a/api/16.txt b/api/16.txt
index be544de..357d618 100644
--- a/api/16.txt
+++ b/api/16.txt
@@ -27303,7 +27303,6 @@ package android.widget {
method public boolean onTextContextMenuItem(int);
method public void removeTextChangedListener(android.text.TextWatcher);
method protected void resetResolvedDrawables();
- method protected void resetResolvedLayoutDirection();
method protected void resolveDrawables();
method protected void resolveTextDirection();
method public void setAllCaps(boolean);
diff --git a/api/current.txt b/api/current.txt
index fffa1fe..cce28a4 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -7616,11 +7616,11 @@ package android.drm {
}
public class DrmStore {
- ctor public DrmStore();
+ ctor public deprecated DrmStore();
}
public static class DrmStore.Action {
- ctor public DrmStore.Action();
+ ctor public deprecated DrmStore.Action();
field public static final int DEFAULT = 0; // 0x0
field public static final int DISPLAY = 7; // 0x7
field public static final int EXECUTE = 6; // 0x6
@@ -7641,7 +7641,7 @@ package android.drm {
}
public static class DrmStore.DrmObjectType {
- ctor public DrmStore.DrmObjectType();
+ ctor public deprecated DrmStore.DrmObjectType();
field public static final int CONTENT = 1; // 0x1
field public static final int RIGHTS_OBJECT = 2; // 0x2
field public static final int TRIGGER_OBJECT = 3; // 0x3
@@ -7649,7 +7649,7 @@ package android.drm {
}
public static class DrmStore.Playback {
- ctor public DrmStore.Playback();
+ ctor public deprecated DrmStore.Playback();
field public static final int PAUSE = 2; // 0x2
field public static final int RESUME = 3; // 0x3
field public static final int START = 0; // 0x0
@@ -7657,7 +7657,7 @@ package android.drm {
}
public static class DrmStore.RightsStatus {
- ctor public DrmStore.RightsStatus();
+ ctor public deprecated DrmStore.RightsStatus();
field public static final int RIGHTS_EXPIRED = 2; // 0x2
field public static final int RIGHTS_INVALID = 1; // 0x1
field public static final int RIGHTS_NOT_ACQUIRED = 3; // 0x3
@@ -7668,7 +7668,8 @@ package android.drm {
ctor public DrmSupportInfo();
method public void addFileSuffix(java.lang.String);
method public void addMimeType(java.lang.String);
- method public java.lang.String getDescriprition();
+ method public deprecated java.lang.String getDescriprition();
+ method public java.lang.String getDescription();
method public java.util.Iterator<java.lang.String> getFileSuffixIterator();
method public java.util.Iterator<java.lang.String> getMimeTypeIterator();
method public void setDescription(java.lang.String);
@@ -11814,6 +11815,7 @@ package android.net {
enum_constant public static final android.net.NetworkInfo.DetailedState OBTAINING_IPADDR;
enum_constant public static final android.net.NetworkInfo.DetailedState SCANNING;
enum_constant public static final android.net.NetworkInfo.DetailedState SUSPENDED;
+ enum_constant public static final android.net.NetworkInfo.DetailedState VERIFYING_POOR_LINK;
}
public static final class NetworkInfo.State extends java.lang.Enum {
@@ -15342,6 +15344,7 @@ package android.os {
method public abstract void acquired();
method public void cleanup(android.os.IBinder, boolean);
method public void dump();
+ method public void dump(java.io.PrintWriter);
method public boolean isAcquired();
method public void release(android.os.IBinder);
method public abstract void released();
@@ -16080,6 +16083,7 @@ package android.provider {
protected static abstract interface CalendarContract.RemindersColumns {
field public static final java.lang.String EVENT_ID = "event_id";
field public static final java.lang.String METHOD = "method";
+ field public static final int METHOD_ALARM = 4; // 0x4
field public static final int METHOD_ALERT = 1; // 0x1
field public static final int METHOD_DEFAULT = 0; // 0x0
field public static final int METHOD_EMAIL = 2; // 0x2
@@ -27658,7 +27662,6 @@ package android.widget {
method public boolean onTextContextMenuItem(int);
method public void removeTextChangedListener(android.text.TextWatcher);
method protected void resetResolvedDrawables();
- method protected void resetResolvedLayoutDirection();
method protected void resolveDrawables();
method public void setAllCaps(boolean);
method public final void setAutoLinkMask(int);
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index 3545ace..0ab6aa3 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -38,8 +38,8 @@
#include <ui/DisplayInfo.h>
#include <ui/FramebufferNativeWindow.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/ISurfaceComposerClient.h>
+#include <gui/Surface.h>
+#include <gui/SurfaceComposerClient.h>
#include <core/SkBitmap.h>
#include <core/SkStream.h>
diff --git a/cmds/bootanimation/BootAnimation.h b/cmds/bootanimation/BootAnimation.h
index c85d72c..62da82f 100644
--- a/cmds/bootanimation/BootAnimation.h
+++ b/cmds/bootanimation/BootAnimation.h
@@ -23,9 +23,6 @@
#include <androidfw/AssetManager.h>
#include <utils/threads.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
-
#include <EGL/egl.h>
#include <GLES/gl.h>
@@ -33,7 +30,9 @@ class SkBitmap;
namespace android {
-class AssetManager;
+class Surface;
+class SurfaceComposerClient;
+class SurfaceControl;
// ---------------------------------------------------------------------------
diff --git a/cmds/bootanimation/bootanimation_main.cpp b/cmds/bootanimation/bootanimation_main.cpp
index ff809d3..417e138 100644
--- a/cmds/bootanimation/bootanimation_main.cpp
+++ b/cmds/bootanimation/bootanimation_main.cpp
@@ -25,8 +25,6 @@
#include <utils/Log.h>
#include <utils/threads.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-
#if defined(HAVE_PTHREADS)
# include <pthread.h>
# include <sys/resource.h>
diff --git a/cmds/content/src/com/android/commands/content/Content.java b/cmds/content/src/com/android/commands/content/Content.java
index 1dcba70..bd9eb9a 100644
--- a/cmds/content/src/com/android/commands/content/Content.java
+++ b/cmds/content/src/com/android/commands/content/Content.java
@@ -69,6 +69,7 @@ public class Content {
+ " <COLUMN_NAME>:<TYPE>:<COLUMN_VALUE> where:\n"
+ " <TYPE> specifies data type such as:\n"
+ " b - boolean, s - string, i - integer, l - long, f - float, d - double\n"
+ + " Note: Omit the value for passing an empty string, e.g column:s:\n"
+ " Example:\n"
+ " # Add \"new_setting\" secure setting with value \"new_value\".\n"
+ " adb shell content insert --uri content://settings/secure --bind name:s:new_setting"
@@ -245,13 +246,17 @@ public class Content {
if (TextUtils.isEmpty(argument)) {
throw new IllegalArgumentException("Binding not well formed: " + argument);
}
- String[] binding = argument.split(COLON);
- if (binding.length != 3) {
+ final int firstColonIndex = argument.indexOf(COLON);
+ if (firstColonIndex < 0) {
throw new IllegalArgumentException("Binding not well formed: " + argument);
}
- String column = binding[0];
- String type = binding[1];
- String value = binding[2];
+ final int secondColonIndex = argument.indexOf(COLON, firstColonIndex + 1);
+ if (secondColonIndex < 0) {
+ throw new IllegalArgumentException("Binding not well formed: " + argument);
+ }
+ String column = argument.substring(0, firstColonIndex);
+ String type = argument.substring(firstColonIndex + 1, secondColonIndex);
+ String value = argument.substring(secondColonIndex + 1);
if (TYPE_STRING.equals(type)) {
values.put(column, value);
} else if (TYPE_BOOLEAN.equalsIgnoreCase(type)) {
diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c
index 16dc517..ebe28db 100644
--- a/cmds/dumpstate/dumpstate.c
+++ b/cmds/dumpstate/dumpstate.c
@@ -88,11 +88,11 @@ static void dumpstate() {
if (screenshot_path[0]) {
ALOGI("taking screenshot\n");
- run_command(NULL, 5, "su", "root", "screenshot", screenshot_path, NULL);
+ run_command(NULL, 5, SU_PATH, "root", "screenshot", screenshot_path, NULL);
ALOGI("wrote screenshot: %s\n", screenshot_path);
}
- run_command("SYSTEM SETTINGS", 20, "su", "root", "sqlite3",
+ run_command("SYSTEM SETTINGS", 20, SU_PATH, "root", "sqlite3",
"/data/data/com.android.providers.settings/databases/settings.db",
"pragma user_version; select * from system; select * from secure;", NULL);
run_command("SYSTEM LOG", 20, "logcat", "-v", "threadtime", "-d", "*:v", NULL);
@@ -118,7 +118,7 @@ static void dumpstate() {
run_command("EVENT LOG", 20, "logcat", "-b", "events", "-v", "threadtime", "-d", "*:v", NULL);
run_command("RADIO LOG", 20, "logcat", "-b", "radio", "-v", "threadtime", "-d", "*:v", NULL);
- run_command("NETWORK INTERFACES", 10, "su", "root", "netcfg", NULL);
+ run_command("NETWORK INTERFACES", 10, SU_PATH, "root", "netcfg", NULL);
dump_file("NETWORK DEV INFO", "/proc/net/dev");
dump_file("QTAGUID NETWORK INTERFACES INFO", "/proc/net/xt_qtaguid/iface_stat_all");
dump_file("QTAGUID CTRL INFO", "/proc/net/xt_qtaguid/ctrl");
@@ -133,28 +133,28 @@ static void dumpstate() {
run_command("ROUTE TABLE 61", 10, "ip", "route", "show", "table", "61", NULL);
run_command("ROUTE TABLE 61 v6", 10, "ip", "-6", "route", "show", "table", "61", NULL);
dump_file("ARP CACHE", "/proc/net/arp");
- run_command("IPTABLES", 10, "su", "root", "iptables", "-L", "-nvx", NULL);
- run_command("IP6TABLES", 10, "su", "root", "ip6tables", "-L", "-nvx", NULL);
- run_command("IPTABLE NAT", 10, "su", "root", "iptables", "-t", "nat", "-L", "-n", NULL);
- run_command("IPT6ABLE NAT", 10, "su", "root", "ip6tables", "-t", "nat", "-L", "-n", NULL);
+ run_command("IPTABLES", 10, SU_PATH, "root", "iptables", "-L", "-nvx", NULL);
+ run_command("IP6TABLES", 10, SU_PATH, "root", "ip6tables", "-L", "-nvx", NULL);
+ run_command("IPTABLE NAT", 10, SU_PATH, "root", "iptables", "-t", "nat", "-L", "-n", NULL);
+ run_command("IPT6ABLE NAT", 10, SU_PATH, "root", "ip6tables", "-t", "nat", "-L", "-n", NULL);
run_command("WIFI NETWORKS", 20,
- "su", "root", "wpa_cli", "list_networks", NULL);
+ SU_PATH, "root", "wpa_cli", "list_networks", NULL);
property_get("dhcp.wlan0.gateway", network, "");
if (network[0])
- run_command("PING GATEWAY", 10, "su", "root", "ping", "-c", "3", "-i", ".5", network, NULL);
+ run_command("PING GATEWAY", 10, SU_PATH, "root", "ping", "-c", "3", "-i", ".5", network, NULL);
property_get("dhcp.wlan0.dns1", network, "");
if (network[0])
- run_command("PING DNS1", 10, "su", "root", "ping", "-c", "3", "-i", ".5", network, NULL);
+ run_command("PING DNS1", 10, SU_PATH, "root", "ping", "-c", "3", "-i", ".5", network, NULL);
property_get("dhcp.wlan0.dns2", network, "");
if (network[0])
- run_command("PING DNS2", 10, "su", "root", "ping", "-c", "3", "-i", ".5", network, NULL);
+ run_command("PING DNS2", 10, SU_PATH, "root", "ping", "-c", "3", "-i", ".5", network, NULL);
#ifdef FWDUMP_bcm4329
run_command("DUMP WIFI STATUS", 20,
- "su", "root", "dhdutil", "-i", "wlan0", "dump", NULL);
+ SU_PATH, "root", "dhdutil", "-i", "wlan0", "dump", NULL);
run_command("DUMP WIFI INTERNAL COUNTERS", 20,
- "su", "root", "wlutil", "counters", NULL);
+ SU_PATH, "root", "wlutil", "counters", NULL);
#endif
char ril_dumpstate_timeout[PROPERTY_VALUE_MAX] = {0};
@@ -168,7 +168,7 @@ static void dumpstate() {
"vril-dump", NULL);
} else {
run_command("DUMP VENDOR RIL LOGS", atoi(ril_dumpstate_timeout),
- "su", "root", "vril-dump", NULL);
+ SU_PATH, "root", "vril-dump", NULL);
}
}
@@ -192,7 +192,7 @@ static void dumpstate() {
dump_file("BINDER STATS", "/sys/kernel/debug/binder/stats");
dump_file("BINDER STATE", "/sys/kernel/debug/binder/state");
- run_command("FILESYSTEMS & FREE SPACE", 10, "su", "root", "df", NULL);
+ run_command("FILESYSTEMS & FREE SPACE", 10, SU_PATH, "root", "df", NULL);
dump_file("PACKAGE SETTINGS", "/data/system/packages.xml");
dump_file("PACKAGE UID ERRORS", "/data/system/uiderrors.txt");
@@ -218,7 +218,7 @@ static void dumpstate() {
dump_file(NULL, "/sys/class/leds/lcd-backlight/registers");
printf("\n");
- run_command("LIST OF OPEN FILES", 10, "su", "root", "lsof", NULL);
+ run_command("LIST OF OPEN FILES", 10, SU_PATH, "root", "lsof", NULL);
for_each_pid(do_showmap, "SMAPS OF ALL PROCESSES");
diff --git a/cmds/dumpstate/dumpstate.h b/cmds/dumpstate/dumpstate.h
index b02db0b..c1c2ad8 100644
--- a/cmds/dumpstate/dumpstate.h
+++ b/cmds/dumpstate/dumpstate.h
@@ -21,6 +21,8 @@
#include <unistd.h>
#include <stdio.h>
+#define SU_PATH "/system/xbin/su"
+
/* prints the contents of a file */
int dump_file(const char *title, const char* path);
diff --git a/cmds/dumpstate/utils.c b/cmds/dumpstate/utils.c
index 21526f9..0d5ab90 100644
--- a/cmds/dumpstate/utils.c
+++ b/cmds/dumpstate/utils.c
@@ -127,7 +127,7 @@ void do_showmap(int pid, const char *name) {
sprintf(title, "SHOW MAP %d (%s)", pid, name);
sprintf(arg, "%d", pid);
- run_command(title, 10, "su", "root", "showmap", arg, NULL);
+ run_command(title, 10, SU_PATH, "root", "showmap", arg, NULL);
}
/* prints the contents of a file */
diff --git a/cmds/screencap/screencap.cpp b/cmds/screencap/screencap.cpp
index 90dfe76..46e41e3 100644
--- a/cmds/screencap/screencap.cpp
+++ b/cmds/screencap/screencap.cpp
@@ -24,7 +24,7 @@
#include <sys/mman.h>
#include <binder/IMemory.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
+#include <gui/SurfaceComposerClient.h>
#include <SkImageEncoder.h>
#include <SkBitmap.h>
diff --git a/cmds/stagefright/SimplePlayer.cpp b/cmds/stagefright/SimplePlayer.cpp
index f269e80..fac3a8c 100644
--- a/cmds/stagefright/SimplePlayer.cpp
+++ b/cmds/stagefright/SimplePlayer.cpp
@@ -396,7 +396,7 @@ status_t SimplePlayer::onReset() {
for (size_t i = 0; i < mStateByTrackIndex.size(); ++i) {
CodecState *state = &mStateByTrackIndex.editValueAt(i);
- CHECK_EQ(state->mCodec->stop(), (status_t)OK);
+ CHECK_EQ(state->mCodec->release(), (status_t)OK);
}
mStartTimeRealUs = -1ll;
diff --git a/cmds/stagefright/codec.cpp b/cmds/stagefright/codec.cpp
index 1b01bd6..fbf800c 100644
--- a/cmds/stagefright/codec.cpp
+++ b/cmds/stagefright/codec.cpp
@@ -30,7 +30,7 @@
#include <media/stagefright/MediaCodec.h>
#include <media/stagefright/MediaDefs.h>
#include <media/stagefright/NuMediaExtractor.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
+#include <gui/SurfaceComposerClient.h>
static void usage(const char *me) {
fprintf(stderr, "usage: %s [-a] use audio\n"
@@ -295,7 +295,7 @@ static int decode(
for (size_t i = 0; i < stateByTrack.size(); ++i) {
CodecState *state = &stateByTrack.editValueAt(i);
- CHECK_EQ((status_t)OK, state->mCodec->stop());
+ CHECK_EQ((status_t)OK, state->mCodec->release());
}
return 0;
diff --git a/cmds/stagefright/sf2.cpp b/cmds/stagefright/sf2.cpp
index 6f0fb54..1d28793 100644
--- a/cmds/stagefright/sf2.cpp
+++ b/cmds/stagefright/sf2.cpp
@@ -32,8 +32,7 @@
#include <media/stagefright/NativeWindowWrapper.h>
#include <media/stagefright/Utils.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
+#include <gui/SurfaceComposerClient.h>
#include "include/ESDS.h"
diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp
index 7cb8f62..dab2e0f 100644
--- a/cmds/stagefright/stagefright.cpp
+++ b/cmds/stagefright/stagefright.cpp
@@ -55,9 +55,7 @@
#include <fcntl.h>
#include <gui/SurfaceTextureClient.h>
-
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
+#include <gui/SurfaceComposerClient.h>
using namespace android;
diff --git a/cmds/stagefright/stream.cpp b/cmds/stagefright/stream.cpp
index 0d6c738..efa1445 100644
--- a/cmds/stagefright/stream.cpp
+++ b/cmds/stagefright/stream.cpp
@@ -32,8 +32,7 @@
#include <binder/IServiceManager.h>
#include <media/IMediaPlayerService.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
+#include <gui/SurfaceComposerClient.h>
#include <fcntl.h>
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 5d1d461..1230c81 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -3986,31 +3986,39 @@ public final class ActivityThread {
dalvik.system.VMRuntime.getRuntime().clearGrowthLimit();
}
- // If the app is being launched for full backup or restore, bring it up in
- // a restricted environment with the base application class.
- Application app = data.info.makeApplication(data.restrictedBackupMode, null);
- mInitialApplication = app;
-
- // don't bring up providers in restricted mode; they may depend on the
- // app's custom Application class
- if (!data.restrictedBackupMode){
- List<ProviderInfo> providers = data.providers;
- if (providers != null) {
- installContentProviders(app, providers);
- // For process that contains content providers, we want to
- // ensure that the JIT is enabled "at some point".
- mH.sendEmptyMessageDelayed(H.ENABLE_JIT, 10*1000);
+ // Allow disk access during application and provider setup. This could
+ // block processing ordered broadcasts, but later processing would
+ // probably end up doing the same disk access.
+ final StrictMode.ThreadPolicy savedPolicy = StrictMode.allowThreadDiskWrites();
+ try {
+ // If the app is being launched for full backup or restore, bring it up in
+ // a restricted environment with the base application class.
+ Application app = data.info.makeApplication(data.restrictedBackupMode, null);
+ mInitialApplication = app;
+
+ // don't bring up providers in restricted mode; they may depend on the
+ // app's custom Application class
+ if (!data.restrictedBackupMode) {
+ List<ProviderInfo> providers = data.providers;
+ if (providers != null) {
+ installContentProviders(app, providers);
+ // For process that contains content providers, we want to
+ // ensure that the JIT is enabled "at some point".
+ mH.sendEmptyMessageDelayed(H.ENABLE_JIT, 10*1000);
+ }
}
- }
- try {
- mInstrumentation.callApplicationOnCreate(app);
- } catch (Exception e) {
- if (!mInstrumentation.onException(app, e)) {
- throw new RuntimeException(
- "Unable to create application " + app.getClass().getName()
- + ": " + e.toString(), e);
+ try {
+ mInstrumentation.callApplicationOnCreate(app);
+ } catch (Exception e) {
+ if (!mInstrumentation.onException(app, e)) {
+ throw new RuntimeException(
+ "Unable to create application " + app.getClass().getName()
+ + ": " + e.toString(), e);
+ }
}
+ } finally {
+ StrictMode.setThreadPolicy(savedPolicy);
}
}
diff --git a/core/java/android/app/Fragment.java b/core/java/android/app/Fragment.java
index f427e78..492fcc7 100644
--- a/core/java/android/app/Fragment.java
+++ b/core/java/android/app/Fragment.java
@@ -149,7 +149,7 @@ final class FragmentState implements Parcelable {
* {@link Fragment#getFragmentManager() Fragment.getFragmentManager()}.
*
* <p>The Fragment class can be used many ways to achieve a wide variety of
- * results. It is core, it represents a particular operation or interface
+ * results. In its core, it represents a particular operation or interface
* that is running within a larger {@link Activity}. A Fragment is closely
* tied to the Activity it is in, and can not be used apart from one. Though
* Fragment defines its own lifecycle, that lifecycle is dependent on its
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index a1198de..111f45e 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -1646,6 +1646,17 @@ public abstract class Context {
/**
* Use with {@link #getSystemService} to retrieve a {@link
+ * android.os.IUpdateLock} for managing runtime sequences that
+ * must not be interrupted by headless OTA application or similar.
+ *
+ * @hide
+ * @see #getSystemService
+ * @see android.os.UpdateLock
+ */
+ public static final String UPDATE_LOCK_SERVICE = "updatelock";
+
+ /**
+ * Use with {@link #getSystemService} to retrieve a {@link
* android.net.NetworkManagementService} for handling management of
* system network services
*
diff --git a/core/java/android/content/res/Configuration.java b/core/java/android/content/res/Configuration.java
index e04b2f7..079f739 100644
--- a/core/java/android/content/res/Configuration.java
+++ b/core/java/android/content/res/Configuration.java
@@ -20,6 +20,7 @@ import android.content.pm.ActivityInfo;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.LocaleUtil;
+import android.view.View;
import java.util.Locale;
@@ -280,9 +281,9 @@ public final class Configuration implements Parcelable, Comparable<Configuration
public int compatSmallestScreenWidthDp;
/**
- * @hide The text layout direction associated to the current Locale
+ * @hide The layout direction associated to the current Locale
*/
- public int textLayoutDirection;
+ public int layoutDirection;
/**
* @hide Internal book-keeping.
@@ -310,7 +311,7 @@ public final class Configuration implements Parcelable, Comparable<Configuration
mnc = o.mnc;
if (o.locale != null) {
locale = (Locale) o.locale.clone();
- textLayoutDirection = o.textLayoutDirection;
+ layoutDirection = o.layoutDirection;
}
userSetLocale = o.userSetLocale;
touchscreen = o.touchscreen;
@@ -346,10 +347,10 @@ public final class Configuration implements Parcelable, Comparable<Configuration
} else {
sb.append(" (no locale)");
}
- switch (textLayoutDirection) {
- case LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE: /* ltr not interesting */ break;
- case LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE: sb.append(" rtl"); break;
- default: sb.append(" layoutdir="); sb.append(textLayoutDirection); break;
+ switch (layoutDirection) {
+ case View.LAYOUT_DIRECTION_LTR: /* ltr not interesting */ break;
+ case View.LAYOUT_DIRECTION_RTL: sb.append(" rtl"); break;
+ default: sb.append(" layoutDir="); sb.append(layoutDirection); break;
}
if (smallestScreenWidthDp != SMALLEST_SCREEN_WIDTH_DP_UNDEFINED) {
sb.append(" sw"); sb.append(smallestScreenWidthDp); sb.append("dp");
@@ -472,7 +473,7 @@ public final class Configuration implements Parcelable, Comparable<Configuration
screenWidthDp = compatScreenWidthDp = SCREEN_WIDTH_DP_UNDEFINED;
screenHeightDp = compatScreenHeightDp = SCREEN_HEIGHT_DP_UNDEFINED;
smallestScreenWidthDp = compatSmallestScreenWidthDp = SMALLEST_SCREEN_WIDTH_DP_UNDEFINED;
- textLayoutDirection = LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE;
+ layoutDirection = View.LAYOUT_DIRECTION_LTR;
seq = 0;
}
@@ -508,7 +509,7 @@ public final class Configuration implements Parcelable, Comparable<Configuration
changed |= ActivityInfo.CONFIG_LOCALE;
locale = delta.locale != null
? (Locale) delta.locale.clone() : null;
- textLayoutDirection = LocaleUtil.getLayoutDirectionFromLocale(locale);
+ layoutDirection = LocaleUtil.getLayoutDirectionFromLocale(locale);
}
if (delta.userSetLocale && (!userSetLocale || ((changed & ActivityInfo.CONFIG_LOCALE) != 0)))
{
@@ -776,7 +777,7 @@ public final class Configuration implements Parcelable, Comparable<Configuration
dest.writeInt(compatScreenWidthDp);
dest.writeInt(compatScreenHeightDp);
dest.writeInt(compatSmallestScreenWidthDp);
- dest.writeInt(textLayoutDirection);
+ dest.writeInt(layoutDirection);
dest.writeInt(seq);
}
@@ -804,7 +805,7 @@ public final class Configuration implements Parcelable, Comparable<Configuration
compatScreenWidthDp = source.readInt();
compatScreenHeightDp = source.readInt();
compatSmallestScreenWidthDp = source.readInt();
- textLayoutDirection = source.readInt();
+ layoutDirection = source.readInt();
seq = source.readInt();
}
diff --git a/core/java/android/database/sqlite/SQLiteConnection.java b/core/java/android/database/sqlite/SQLiteConnection.java
index b5cef81..1900301 100644
--- a/core/java/android/database/sqlite/SQLiteConnection.java
+++ b/core/java/android/database/sqlite/SQLiteConnection.java
@@ -208,6 +208,11 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen
mConfiguration.label,
SQLiteDebug.DEBUG_SQL_STATEMENTS, SQLiteDebug.DEBUG_SQL_TIME);
+ setSyncMode();
+ setPageSize();
+ setAutoCheckpointInterval();
+ setJournalSizeLimit();
+ setJournalModeFromConfiguration();
setLocaleFromConfiguration();
}
@@ -231,6 +236,44 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen
}
}
+ private void setSyncMode() {
+ if (!mConfiguration.isInMemoryDb()) {
+ execute("PRAGMA synchronous=" + SQLiteGlobal.getSyncMode(), null, null);
+ }
+ }
+
+ private void setPageSize() {
+ if (!mConfiguration.isInMemoryDb()) {
+ execute("PRAGMA page_size=" + SQLiteGlobal.getDefaultPageSize(), null, null);
+ }
+ }
+
+ private void setAutoCheckpointInterval() {
+ if (!mConfiguration.isInMemoryDb()) {
+ executeForLong("PRAGMA wal_autocheckpoint=" + SQLiteGlobal.getWALAutoCheckpoint(),
+ null, null);
+ }
+ }
+
+ private void setJournalSizeLimit() {
+ if (!mConfiguration.isInMemoryDb()) {
+ executeForLong("PRAGMA journal_size_limit=" + SQLiteGlobal.getJournalSizeLimit(),
+ null, null);
+ }
+ }
+
+ private void setJournalModeFromConfiguration() {
+ if (!mConfiguration.isInMemoryDb()) {
+ String result = executeForString("PRAGMA journal_mode=" + mConfiguration.journalMode,
+ null, null);
+ if (!result.equalsIgnoreCase(mConfiguration.journalMode)) {
+ Log.e(TAG, "setting journal_mode to " + mConfiguration.journalMode
+ + " failed for db: " + mConfiguration.label
+ + " (on pragma set journal_mode, sqlite returned:" + result);
+ }
+ }
+ }
+
private void setLocaleFromConfiguration() {
nativeSetLocale(mConnectionPtr, mConfiguration.locale.toString());
}
@@ -246,7 +289,9 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen
}
}
- // Remember whether locale has changed.
+ // Remember what changed.
+ boolean journalModeChanged = !configuration.journalMode.equalsIgnoreCase(
+ mConfiguration.journalMode);
boolean localeChanged = !configuration.locale.equals(mConfiguration.locale);
// Update configuration parameters.
@@ -255,6 +300,11 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen
// Update prepared statement cache size.
mPreparedStatementCache.resize(configuration.maxSqlCacheSize);
+ // Update journal mode.
+ if (journalModeChanged) {
+ setJournalModeFromConfiguration();
+ }
+
// Update locale.
if (localeChanged) {
setLocaleFromConfiguration();
diff --git a/core/java/android/database/sqlite/SQLiteConnectionPool.java b/core/java/android/database/sqlite/SQLiteConnectionPool.java
index 236948e..3562e89 100644
--- a/core/java/android/database/sqlite/SQLiteConnectionPool.java
+++ b/core/java/android/database/sqlite/SQLiteConnectionPool.java
@@ -92,13 +92,25 @@ public final class SQLiteConnectionPool implements Closeable {
new ArrayList<SQLiteConnection>();
private SQLiteConnection mAvailablePrimaryConnection;
+ // Describes what should happen to an acquired connection when it is returned to the pool.
+ enum AcquiredConnectionStatus {
+ // The connection should be returned to the pool as usual.
+ NORMAL,
+
+ // The connection must be reconfigured before being returned.
+ RECONFIGURE,
+
+ // The connection must be closed and discarded.
+ DISCARD,
+ }
+
// Weak references to all acquired connections. The associated value
- // is a boolean that indicates whether the connection must be reconfigured
- // before being returned to the available connection list.
+ // indicates whether the connection must be reconfigured before being
+ // returned to the available connection list or discarded.
// For example, the prepared statement cache size may have changed and
- // need to be updated.
- private final WeakHashMap<SQLiteConnection, Boolean> mAcquiredConnections =
- new WeakHashMap<SQLiteConnection, Boolean>();
+ // need to be updated in preparation for the next client.
+ private final WeakHashMap<SQLiteConnection, AcquiredConnectionStatus> mAcquiredConnections =
+ new WeakHashMap<SQLiteConnection, AcquiredConnectionStatus>();
/**
* Connection flag: Read-only.
@@ -168,7 +180,7 @@ public final class SQLiteConnectionPool implements Closeable {
private void open() {
// Open the primary connection.
// This might throw if the database is corrupt.
- mAvailablePrimaryConnection = openConnectionLocked(
+ mAvailablePrimaryConnection = openConnectionLocked(mConfiguration,
true /*primaryConnection*/); // might throw
// Mark the pool as being open for business.
@@ -209,16 +221,7 @@ public final class SQLiteConnectionPool implements Closeable {
mIsOpen = false;
- final int count = mAvailableNonPrimaryConnections.size();
- for (int i = 0; i < count; i++) {
- closeConnectionAndLogExceptionsLocked(mAvailableNonPrimaryConnections.get(i));
- }
- mAvailableNonPrimaryConnections.clear();
-
- if (mAvailablePrimaryConnection != null) {
- closeConnectionAndLogExceptionsLocked(mAvailablePrimaryConnection);
- mAvailablePrimaryConnection = null;
- }
+ closeAvailableConnectionsAndLogExceptionsLocked();
final int pendingCount = mAcquiredConnections.size();
if (pendingCount != 0) {
@@ -254,20 +257,26 @@ public final class SQLiteConnectionPool implements Closeable {
synchronized (mLock) {
throwIfClosedLocked();
- final boolean poolSizeChanged = mConfiguration.maxConnectionPoolSize
- != configuration.maxConnectionPoolSize;
- mConfiguration.updateParametersFrom(configuration);
+ if (mConfiguration.openFlags != configuration.openFlags) {
+ // Try to reopen the primary connection using the new open flags then
+ // close and discard all existing connections.
+ // This might throw if the database is corrupt or cannot be opened in
+ // the new mode in which case existing connections will remain untouched.
+ SQLiteConnection newPrimaryConnection = openConnectionLocked(configuration,
+ true /*primaryConnection*/); // might throw
- if (poolSizeChanged) {
- int availableCount = mAvailableNonPrimaryConnections.size();
- while (availableCount-- > mConfiguration.maxConnectionPoolSize - 1) {
- SQLiteConnection connection =
- mAvailableNonPrimaryConnections.remove(availableCount);
- closeConnectionAndLogExceptionsLocked(connection);
- }
- }
+ closeAvailableConnectionsAndLogExceptionsLocked();
+ discardAcquiredConnectionsLocked();
- reconfigureAllConnectionsLocked();
+ mAvailablePrimaryConnection = newPrimaryConnection;
+ mConfiguration.updateParametersFrom(configuration);
+ } else {
+ // Reconfigure the database connections in place.
+ mConfiguration.updateParametersFrom(configuration);
+
+ closeExcessConnectionsAndLogExceptionsLocked();
+ reconfigureAllConnectionsLocked();
+ }
wakeConnectionWaitersLocked();
}
@@ -310,8 +319,8 @@ public final class SQLiteConnectionPool implements Closeable {
*/
public void releaseConnection(SQLiteConnection connection) {
synchronized (mLock) {
- Boolean mustReconfigure = mAcquiredConnections.remove(connection);
- if (mustReconfigure == null) {
+ AcquiredConnectionStatus status = mAcquiredConnections.remove(connection);
+ if (status == null) {
throw new IllegalStateException("Cannot perform this operation "
+ "because the specified connection was not acquired "
+ "from this pool or has already been released.");
@@ -320,18 +329,8 @@ public final class SQLiteConnectionPool implements Closeable {
if (!mIsOpen) {
closeConnectionAndLogExceptionsLocked(connection);
} else if (connection.isPrimaryConnection()) {
- assert mAvailablePrimaryConnection == null;
- try {
- if (mustReconfigure == Boolean.TRUE) {
- connection.reconfigure(mConfiguration); // might throw
- }
- } catch (RuntimeException ex) {
- Log.e(TAG, "Failed to reconfigure released primary connection, closing it: "
- + connection, ex);
- closeConnectionAndLogExceptionsLocked(connection);
- connection = null;
- }
- if (connection != null) {
+ if (recycleConnectionLocked(connection, status)) {
+ assert mAvailablePrimaryConnection == null;
mAvailablePrimaryConnection = connection;
}
wakeConnectionWaitersLocked();
@@ -339,17 +338,7 @@ public final class SQLiteConnectionPool implements Closeable {
mConfiguration.maxConnectionPoolSize - 1) {
closeConnectionAndLogExceptionsLocked(connection);
} else {
- try {
- if (mustReconfigure == Boolean.TRUE) {
- connection.reconfigure(mConfiguration); // might throw
- }
- } catch (RuntimeException ex) {
- Log.e(TAG, "Failed to reconfigure released non-primary connection, "
- + "closing it: " + connection, ex);
- closeConnectionAndLogExceptionsLocked(connection);
- connection = null;
- }
- if (connection != null) {
+ if (recycleConnectionLocked(connection, status)) {
mAvailableNonPrimaryConnections.add(connection);
}
wakeConnectionWaitersLocked();
@@ -357,6 +346,25 @@ public final class SQLiteConnectionPool implements Closeable {
}
}
+ // Can't throw.
+ private boolean recycleConnectionLocked(SQLiteConnection connection,
+ AcquiredConnectionStatus status) {
+ if (status == AcquiredConnectionStatus.RECONFIGURE) {
+ try {
+ connection.reconfigure(mConfiguration); // might throw
+ } catch (RuntimeException ex) {
+ Log.e(TAG, "Failed to reconfigure released connection, closing it: "
+ + connection, ex);
+ status = AcquiredConnectionStatus.DISCARD;
+ }
+ }
+ if (status == AcquiredConnectionStatus.DISCARD) {
+ closeConnectionAndLogExceptionsLocked(connection);
+ return false;
+ }
+ return true;
+ }
+
/**
* Returns true if the session should yield the connection due to
* contention over available database connections.
@@ -407,9 +415,10 @@ public final class SQLiteConnectionPool implements Closeable {
}
// Might throw.
- private SQLiteConnection openConnectionLocked(boolean primaryConnection) {
+ private SQLiteConnection openConnectionLocked(SQLiteDatabaseConfiguration configuration,
+ boolean primaryConnection) {
final int connectionId = mNextConnectionId++;
- return SQLiteConnection.open(this, mConfiguration,
+ return SQLiteConnection.open(this, configuration,
connectionId, primaryConnection); // might throw
}
@@ -443,6 +452,30 @@ public final class SQLiteConnectionPool implements Closeable {
}
// Can't throw.
+ private void closeAvailableConnectionsAndLogExceptionsLocked() {
+ final int count = mAvailableNonPrimaryConnections.size();
+ for (int i = 0; i < count; i++) {
+ closeConnectionAndLogExceptionsLocked(mAvailableNonPrimaryConnections.get(i));
+ }
+ mAvailableNonPrimaryConnections.clear();
+
+ if (mAvailablePrimaryConnection != null) {
+ closeConnectionAndLogExceptionsLocked(mAvailablePrimaryConnection);
+ mAvailablePrimaryConnection = null;
+ }
+ }
+
+ // Can't throw.
+ private void closeExcessConnectionsAndLogExceptionsLocked() {
+ int availableCount = mAvailableNonPrimaryConnections.size();
+ while (availableCount-- > mConfiguration.maxConnectionPoolSize - 1) {
+ SQLiteConnection connection =
+ mAvailableNonPrimaryConnections.remove(availableCount);
+ closeConnectionAndLogExceptionsLocked(connection);
+ }
+ }
+
+ // Can't throw.
private void closeConnectionAndLogExceptionsLocked(SQLiteConnection connection) {
try {
connection.close(); // might throw
@@ -453,8 +486,12 @@ public final class SQLiteConnectionPool implements Closeable {
}
// Can't throw.
+ private void discardAcquiredConnectionsLocked() {
+ markAcquiredConnectionsLocked(AcquiredConnectionStatus.DISCARD);
+ }
+
+ // Can't throw.
private void reconfigureAllConnectionsLocked() {
- boolean wake = false;
if (mAvailablePrimaryConnection != null) {
try {
mAvailablePrimaryConnection.reconfigure(mConfiguration); // might throw
@@ -463,7 +500,6 @@ public final class SQLiteConnectionPool implements Closeable {
+ mAvailablePrimaryConnection, ex);
closeConnectionAndLogExceptionsLocked(mAvailablePrimaryConnection);
mAvailablePrimaryConnection = null;
- wake = true;
}
}
@@ -478,27 +514,30 @@ public final class SQLiteConnectionPool implements Closeable {
closeConnectionAndLogExceptionsLocked(connection);
mAvailableNonPrimaryConnections.remove(i--);
count -= 1;
- wake = true;
}
}
+ markAcquiredConnectionsLocked(AcquiredConnectionStatus.RECONFIGURE);
+ }
+
+ // Can't throw.
+ private void markAcquiredConnectionsLocked(AcquiredConnectionStatus status) {
if (!mAcquiredConnections.isEmpty()) {
ArrayList<SQLiteConnection> keysToUpdate = new ArrayList<SQLiteConnection>(
mAcquiredConnections.size());
- for (Map.Entry<SQLiteConnection, Boolean> entry : mAcquiredConnections.entrySet()) {
- if (entry.getValue() != Boolean.TRUE) {
+ for (Map.Entry<SQLiteConnection, AcquiredConnectionStatus> entry
+ : mAcquiredConnections.entrySet()) {
+ AcquiredConnectionStatus oldStatus = entry.getValue();
+ if (status != oldStatus
+ && oldStatus != AcquiredConnectionStatus.DISCARD) {
keysToUpdate.add(entry.getKey());
}
}
final int updateCount = keysToUpdate.size();
for (int i = 0; i < updateCount; i++) {
- mAcquiredConnections.put(keysToUpdate.get(i), Boolean.TRUE);
+ mAcquiredConnections.put(keysToUpdate.get(i), status);
}
}
-
- if (wake) {
- wakeConnectionWaitersLocked();
- }
}
// Might throw.
@@ -658,8 +697,7 @@ public final class SQLiteConnectionPool implements Closeable {
int activeConnections = 0;
int idleConnections = 0;
if (!mAcquiredConnections.isEmpty()) {
- for (Map.Entry<SQLiteConnection, Boolean> entry : mAcquiredConnections.entrySet()) {
- final SQLiteConnection connection = entry.getKey();
+ for (SQLiteConnection connection : mAcquiredConnections.keySet()) {
String description = connection.describeCurrentOperationUnsafe();
if (description != null) {
requests.add(description);
@@ -769,7 +807,8 @@ public final class SQLiteConnectionPool implements Closeable {
// Uhoh. No primary connection! Either this is the first time we asked
// for it, or maybe it leaked?
- connection = openConnectionLocked(true /*primaryConnection*/); // might throw
+ connection = openConnectionLocked(mConfiguration,
+ true /*primaryConnection*/); // might throw
finishAcquireConnectionLocked(connection, connectionFlags); // might throw
return connection;
}
@@ -807,7 +846,8 @@ public final class SQLiteConnectionPool implements Closeable {
if (openConnections >= mConfiguration.maxConnectionPoolSize) {
return null;
}
- connection = openConnectionLocked(false /*primaryConnection*/); // might throw
+ connection = openConnectionLocked(mConfiguration,
+ false /*primaryConnection*/); // might throw
finishAcquireConnectionLocked(connection, connectionFlags); // might throw
return connection;
}
@@ -818,7 +858,7 @@ public final class SQLiteConnectionPool implements Closeable {
final boolean readOnly = (connectionFlags & CONNECTION_FLAG_READ_ONLY) != 0;
connection.setOnlyAllowReadOnlyOperations(readOnly);
- mAcquiredConnections.put(connection, Boolean.FALSE);
+ mAcquiredConnections.put(connection, AcquiredConnectionStatus.NORMAL);
} catch (RuntimeException ex) {
Log.e(TAG, "Failed to prepare acquired connection for session, closing it: "
+ connection +", connectionFlags=" + connectionFlags);
@@ -858,7 +898,7 @@ public final class SQLiteConnectionPool implements Closeable {
private void throwIfClosedLocked() {
if (!mIsOpen) {
throw new IllegalStateException("Cannot perform this operation "
- + "because the connection pool have been closed.");
+ + "because the connection pool has been closed.");
}
}
@@ -922,11 +962,11 @@ public final class SQLiteConnectionPool implements Closeable {
printer.println(" Acquired connections:");
if (!mAcquiredConnections.isEmpty()) {
- for (Map.Entry<SQLiteConnection, Boolean> entry :
+ for (Map.Entry<SQLiteConnection, AcquiredConnectionStatus> entry :
mAcquiredConnections.entrySet()) {
final SQLiteConnection connection = entry.getKey();
connection.dumpUnsafe(indentedPrinter, verbose);
- indentedPrinter.println(" Pending reconfiguration: " + entry.getValue());
+ indentedPrinter.println(" Status: " + entry.getValue());
}
} else {
indentedPrinter.println("<none>");
diff --git a/core/java/android/database/sqlite/SQLiteDatabase.java b/core/java/android/database/sqlite/SQLiteDatabase.java
index 505f83e..515658f 100644
--- a/core/java/android/database/sqlite/SQLiteDatabase.java
+++ b/core/java/android/database/sqlite/SQLiteDatabase.java
@@ -677,6 +677,38 @@ public class SQLiteDatabase extends SQLiteClosable {
return openDatabase(path, factory, CREATE_IF_NECESSARY, errorHandler);
}
+ /**
+ * Reopens the database in read-write mode.
+ * If the database is already read-write, does nothing.
+ *
+ * @throws SQLiteException if the database could not be reopened as requested, in which
+ * case it remains open in read only mode.
+ * @throws IllegalStateException if the database is not open.
+ *
+ * @see #isReadOnly()
+ * @hide
+ */
+ public void reopenReadWrite() {
+ synchronized (mLock) {
+ throwIfNotOpenLocked();
+
+ if (!isReadOnlyLocked()) {
+ return; // nothing to do
+ }
+
+ // Reopen the database in read-write mode.
+ final int oldOpenFlags = mConfigurationLocked.openFlags;
+ mConfigurationLocked.openFlags = (mConfigurationLocked.openFlags & ~OPEN_READ_MASK)
+ | OPEN_READWRITE;
+ try {
+ mConnectionPoolLocked.reconfigure(mConfigurationLocked);
+ } catch (RuntimeException ex) {
+ mConfigurationLocked.openFlags = oldOpenFlags;
+ throw ex;
+ }
+ }
+ }
+
private void open() {
try {
try {
@@ -685,9 +717,6 @@ public class SQLiteDatabase extends SQLiteClosable {
onCorruption();
openInner();
}
-
- // Disable WAL if it was previously enabled.
- setJournalMode("TRUNCATE");
} catch (SQLiteException ex) {
Log.e(TAG, "Failed to open database '" + getLabel() + "'.", ex);
close();
@@ -707,19 +736,6 @@ public class SQLiteDatabase extends SQLiteClosable {
}
}
- private void setJournalMode(String mode) {
- // Journal mode can be set only for non-memory databases
- // AND can't be set for readonly databases
- if (isInMemoryDatabase() || isReadOnly()) {
- return;
- }
- String s = DatabaseUtils.stringForQuery(this, "PRAGMA journal_mode=" + mode, null);
- if (!s.equalsIgnoreCase(mode)) {
- Log.e(TAG, "setting journal_mode to " + mode + " failed for db: " + getLabel()
- + " (on pragma set journal_mode, sqlite returned:" + s);
- }
- }
-
/**
* Create a memory backed SQLite database. Its contents will be destroyed
* when the database is closed.
@@ -1729,13 +1745,10 @@ public class SQLiteDatabase extends SQLiteClosable {
}
mIsWALEnabledLocked = true;
- mConfigurationLocked.maxConnectionPoolSize = Math.max(2,
- Resources.getSystem().getInteger(
- com.android.internal.R.integer.db_connection_pool_size));
+ mConfigurationLocked.maxConnectionPoolSize = SQLiteGlobal.getWALConnectionPoolSize();
+ mConfigurationLocked.journalMode = "WAL";
mConnectionPoolLocked.reconfigure(mConfigurationLocked);
}
-
- setJournalMode("WAL");
return true;
}
@@ -1753,10 +1766,9 @@ public class SQLiteDatabase extends SQLiteClosable {
mIsWALEnabledLocked = false;
mConfigurationLocked.maxConnectionPoolSize = 1;
+ mConfigurationLocked.journalMode = SQLiteGlobal.getDefaultJournalMode();
mConnectionPoolLocked.reconfigure(mConfigurationLocked);
}
-
- setJournalMode("TRUNCATE");
}
/**
@@ -1902,28 +1914,6 @@ public class SQLiteDatabase extends SQLiteClosable {
return true;
}
- /**
- * Prevent other threads from using the database's primary connection.
- *
- * This method is only used by {@link SQLiteOpenHelper} when transitioning from
- * a readable to a writable database. It should not be used in any other way.
- *
- * @see #unlockPrimaryConnection()
- */
- void lockPrimaryConnection() {
- getThreadSession().beginTransaction(SQLiteSession.TRANSACTION_MODE_DEFERRED,
- null, SQLiteConnectionPool.CONNECTION_FLAG_PRIMARY_CONNECTION_AFFINITY, null);
- }
-
- /**
- * Allow other threads to use the database's primary connection.
- *
- * @see #lockPrimaryConnection()
- */
- void unlockPrimaryConnection() {
- getThreadSession().endTransaction(null);
- }
-
@Override
public String toString() {
return "SQLiteDatabase: " + getPath();
diff --git a/core/java/android/database/sqlite/SQLiteDatabaseConfiguration.java b/core/java/android/database/sqlite/SQLiteDatabaseConfiguration.java
index bc79ad3..32a1bcb 100644
--- a/core/java/android/database/sqlite/SQLiteDatabaseConfiguration.java
+++ b/core/java/android/database/sqlite/SQLiteDatabaseConfiguration.java
@@ -51,17 +51,17 @@ public final class SQLiteDatabaseConfiguration {
public final String path;
/**
- * The flags used to open the database.
- */
- public final int openFlags;
-
- /**
* The label to use to describe the database when it appears in logs.
* This is derived from the path but is stripped to remove PII.
*/
public final String label;
/**
+ * The flags used to open the database.
+ */
+ public int openFlags;
+
+ /**
* The maximum number of connections to retain in the connection pool.
* Must be at least 1.
*
@@ -85,6 +85,13 @@ public final class SQLiteDatabaseConfiguration {
public Locale locale;
/**
+ * The database journal mode.
+ *
+ * Default is {@link SQLiteGlobal#getDefaultJournalMode()}.
+ */
+ public String journalMode;
+
+ /**
* The custom functions to register.
*/
public final ArrayList<SQLiteCustomFunction> customFunctions =
@@ -103,13 +110,14 @@ public final class SQLiteDatabaseConfiguration {
}
this.path = path;
- this.openFlags = openFlags;
label = stripPathForLogs(path);
+ this.openFlags = openFlags;
// Set default values for optional parameters.
maxConnectionPoolSize = 1;
maxSqlCacheSize = 25;
locale = Locale.getDefault();
+ journalMode = SQLiteGlobal.getDefaultJournalMode();
}
/**
@@ -123,7 +131,6 @@ public final class SQLiteDatabaseConfiguration {
}
this.path = other.path;
- this.openFlags = other.openFlags;
this.label = other.label;
updateParametersFrom(other);
}
@@ -138,14 +145,16 @@ public final class SQLiteDatabaseConfiguration {
if (other == null) {
throw new IllegalArgumentException("other must not be null.");
}
- if (!path.equals(other.path) || openFlags != other.openFlags) {
+ if (!path.equals(other.path)) {
throw new IllegalArgumentException("other configuration must refer to "
+ "the same database.");
}
+ openFlags = other.openFlags;
maxConnectionPoolSize = other.maxConnectionPoolSize;
maxSqlCacheSize = other.maxSqlCacheSize;
locale = other.locale;
+ journalMode = other.journalMode;
customFunctions.clear();
customFunctions.addAll(other.customFunctions);
}
diff --git a/core/java/android/database/sqlite/SQLiteDebug.java b/core/java/android/database/sqlite/SQLiteDebug.java
index 204483d..10ce991 100644
--- a/core/java/android/database/sqlite/SQLiteDebug.java
+++ b/core/java/android/database/sqlite/SQLiteDebug.java
@@ -33,12 +33,16 @@ public final class SQLiteDebug {
/**
* Controls the printing of informational SQL log messages.
+ *
+ * Enable using "adb shell setprop log.tag.SQLiteLog VERBOSE".
*/
public static final boolean DEBUG_SQL_LOG =
Log.isLoggable("SQLiteLog", Log.VERBOSE);
/**
* Controls the printing of SQL statements as they are executed.
+ *
+ * Enable using "adb shell setprop log.tag.SQLiteStatements VERBOSE".
*/
public static final boolean DEBUG_SQL_STATEMENTS =
Log.isLoggable("SQLiteStatements", Log.VERBOSE);
@@ -46,6 +50,8 @@ public final class SQLiteDebug {
/**
* Controls the printing of wall-clock time taken to execute SQL statements
* as they are executed.
+ *
+ * Enable using "adb shell setprop log.tag.SQLiteTime VERBOSE".
*/
public static final boolean DEBUG_SQL_TIME =
Log.isLoggable("SQLiteTime", Log.VERBOSE);
@@ -61,15 +67,17 @@ public final class SQLiteDebug {
*
* Reads the "db.log.slow_query_threshold" system property, which can be changed
* by the user at any time. If the value is zero, then all queries will
- * be considered slow. If the value does not exist, then no queries will
+ * be considered slow. If the value does not exist or is negative, then no queries will
* be considered slow.
*
* This value can be changed dynamically while the system is running.
+ * For example, "adb shell setprop db.log.slow_query_threshold 200" will
+ * log all queries that take 200ms or longer to run.
* @hide
*/
public static final boolean shouldLogSlowQuery(long elapsedTimeMillis) {
int slowQueryMillis = SystemProperties.getInt("db.log.slow_query_threshold", -1);
- return slowQueryMillis >= 0 && elapsedTimeMillis > slowQueryMillis;
+ return slowQueryMillis >= 0 && elapsedTimeMillis >= slowQueryMillis;
}
/**
diff --git a/core/java/android/database/sqlite/SQLiteGlobal.java b/core/java/android/database/sqlite/SQLiteGlobal.java
index dbefd63..af0cf45 100644
--- a/core/java/android/database/sqlite/SQLiteGlobal.java
+++ b/core/java/android/database/sqlite/SQLiteGlobal.java
@@ -16,6 +16,7 @@
package android.database.sqlite;
+import android.content.res.Resources;
import android.os.StatFs;
/**
@@ -64,4 +65,44 @@ public final class SQLiteGlobal {
return sDefaultPageSize;
}
}
+
+ /**
+ * Gets the default journal mode when WAL is not in use.
+ */
+ public static String getDefaultJournalMode() {
+ return Resources.getSystem().getString(
+ com.android.internal.R.string.db_default_journal_mode);
+ }
+
+ /**
+ * Gets the journal size limit in bytes.
+ */
+ public static int getJournalSizeLimit() {
+ return Resources.getSystem().getInteger(
+ com.android.internal.R.integer.db_journal_size_limit);
+ }
+
+ /**
+ * Gets the database synchronization mode.
+ */
+ public static String getSyncMode() {
+ return Resources.getSystem().getString(
+ com.android.internal.R.string.db_sync_mode);
+ }
+
+ /**
+ * Gets the WAL auto-checkpoint integer in database pages.
+ */
+ public static int getWALAutoCheckpoint() {
+ return Math.max(1, Resources.getSystem().getInteger(
+ com.android.internal.R.integer.db_wal_autocheckpoint));
+ }
+
+ /**
+ * Gets the default connection pool size when in WAL mode.
+ */
+ public static int getWALConnectionPoolSize() {
+ return Math.max(2, Resources.getSystem().getInteger(
+ com.android.internal.R.integer.db_connection_pool_size));
+ }
}
diff --git a/core/java/android/database/sqlite/SQLiteOpenHelper.java b/core/java/android/database/sqlite/SQLiteOpenHelper.java
index 46d9369..ffa4663 100644
--- a/core/java/android/database/sqlite/SQLiteOpenHelper.java
+++ b/core/java/android/database/sqlite/SQLiteOpenHelper.java
@@ -43,13 +43,21 @@ import android.util.Log;
public abstract class SQLiteOpenHelper {
private static final String TAG = SQLiteOpenHelper.class.getSimpleName();
+ // When true, getReadableDatabase returns a read-only database if it is just being opened.
+ // The database handle is reopened in read/write mode when getWritableDatabase is called.
+ // We leave this behavior disabled in production because it is inefficient and breaks
+ // many applications. For debugging purposes it can be useful to turn on strict
+ // read-only semantics to catch applications that call getReadableDatabase when they really
+ // wanted getWritableDatabase.
+ private static final boolean DEBUG_STRICT_READONLY = false;
+
private final Context mContext;
private final String mName;
private final CursorFactory mFactory;
private final int mNewVersion;
- private SQLiteDatabase mDatabase = null;
- private boolean mIsInitializing = false;
+ private SQLiteDatabase mDatabase;
+ private boolean mIsInitializing;
private final DatabaseErrorHandler mErrorHandler;
/**
@@ -127,41 +135,89 @@ public abstract class SQLiteOpenHelper {
* @throws SQLiteException if the database cannot be opened for writing
* @return a read/write database object valid until {@link #close} is called
*/
- public synchronized SQLiteDatabase getWritableDatabase() {
+ public SQLiteDatabase getWritableDatabase() {
+ synchronized (this) {
+ return getDatabaseLocked(true);
+ }
+ }
+
+ /**
+ * Create and/or open a database. This will be the same object returned by
+ * {@link #getWritableDatabase} unless some problem, such as a full disk,
+ * requires the database to be opened read-only. In that case, a read-only
+ * database object will be returned. If the problem is fixed, a future call
+ * to {@link #getWritableDatabase} may succeed, in which case the read-only
+ * database object will be closed and the read/write object will be returned
+ * in the future.
+ *
+ * <p class="caution">Like {@link #getWritableDatabase}, this method may
+ * take a long time to return, so you should not call it from the
+ * application main thread, including from
+ * {@link android.content.ContentProvider#onCreate ContentProvider.onCreate()}.
+ *
+ * @throws SQLiteException if the database cannot be opened
+ * @return a database object valid until {@link #getWritableDatabase}
+ * or {@link #close} is called.
+ */
+ public SQLiteDatabase getReadableDatabase() {
+ synchronized (this) {
+ return getDatabaseLocked(false);
+ }
+ }
+
+ private SQLiteDatabase getDatabaseLocked(boolean writable) {
if (mDatabase != null) {
if (!mDatabase.isOpen()) {
- // darn! the user closed the database by calling mDatabase.close()
+ // Darn! The user closed the database by calling mDatabase.close().
mDatabase = null;
- } else if (!mDatabase.isReadOnly()) {
- return mDatabase; // The database is already open for business
+ } else if (!writable || !mDatabase.isReadOnly()) {
+ // The database is already open for business.
+ return mDatabase;
}
}
if (mIsInitializing) {
- throw new IllegalStateException("getWritableDatabase called recursively");
+ throw new IllegalStateException("getDatabase called recursively");
}
- // If we have a read-only database open, someone could be using it
- // (though they shouldn't), which would cause a lock to be held on
- // the file, and our attempts to open the database read-write would
- // fail waiting for the file lock. To prevent that, we acquire a lock
- // on the read-only database, which shuts out other users.
-
- boolean success = false;
- SQLiteDatabase db = null;
- if (mDatabase != null) {
- mDatabase.lockPrimaryConnection();
- }
+ SQLiteDatabase db = mDatabase;
try {
mIsInitializing = true;
- if (mName == null) {
+
+ if (db != null) {
+ if (writable && db.isReadOnly()) {
+ db.reopenReadWrite();
+ }
+ } else if (mName == null) {
db = SQLiteDatabase.create(null);
} else {
- db = mContext.openOrCreateDatabase(mName, 0, mFactory, mErrorHandler);
+ try {
+ if (DEBUG_STRICT_READONLY && !writable) {
+ final String path = mContext.getDatabasePath(mName).getPath();
+ db = SQLiteDatabase.openDatabase(path, mFactory,
+ SQLiteDatabase.OPEN_READONLY, mErrorHandler);
+ } else {
+ db = mContext.openOrCreateDatabase(mName, 0, mFactory, mErrorHandler);
+ }
+ } catch (SQLiteException ex) {
+ if (writable) {
+ throw ex;
+ }
+ Log.e(TAG, "Couldn't open " + mName
+ + " for writing (will try read-only):", ex);
+ final String path = mContext.getDatabasePath(mName).getPath();
+ db = SQLiteDatabase.openDatabase(path, mFactory,
+ SQLiteDatabase.OPEN_READONLY, mErrorHandler);
+ }
}
- int version = db.getVersion();
+ final int version = db.getVersion();
if (version != mNewVersion) {
+ if (db.isReadOnly()) {
+ throw new SQLiteException("Can't upgrade read-only database from version " +
+ db.getVersion() + " to " + mNewVersion + ": " + mName);
+ }
+
db.beginTransaction();
try {
if (version == 0) {
@@ -179,84 +235,19 @@ public abstract class SQLiteOpenHelper {
db.endTransaction();
}
}
-
onOpen(db);
- success = true;
- return db;
- } finally {
- mIsInitializing = false;
- if (success) {
- if (mDatabase != null) {
- try { mDatabase.close(); } catch (Exception e) { }
- mDatabase.unlockPrimaryConnection();
- }
- mDatabase = db;
- } else {
- if (mDatabase != null) {
- mDatabase.unlockPrimaryConnection();
- }
- if (db != null) db.close();
- }
- }
- }
- /**
- * Create and/or open a database. This will be the same object returned by
- * {@link #getWritableDatabase} unless some problem, such as a full disk,
- * requires the database to be opened read-only. In that case, a read-only
- * database object will be returned. If the problem is fixed, a future call
- * to {@link #getWritableDatabase} may succeed, in which case the read-only
- * database object will be closed and the read/write object will be returned
- * in the future.
- *
- * <p class="caution">Like {@link #getWritableDatabase}, this method may
- * take a long time to return, so you should not call it from the
- * application main thread, including from
- * {@link android.content.ContentProvider#onCreate ContentProvider.onCreate()}.
- *
- * @throws SQLiteException if the database cannot be opened
- * @return a database object valid until {@link #getWritableDatabase}
- * or {@link #close} is called.
- */
- public synchronized SQLiteDatabase getReadableDatabase() {
- if (mDatabase != null) {
- if (!mDatabase.isOpen()) {
- // darn! the user closed the database by calling mDatabase.close()
- mDatabase = null;
- } else {
- return mDatabase; // The database is already open for business
- }
- }
-
- if (mIsInitializing) {
- throw new IllegalStateException("getReadableDatabase called recursively");
- }
-
- try {
- return getWritableDatabase();
- } catch (SQLiteException e) {
- if (mName == null) throw e; // Can't open a temp database read-only!
- Log.e(TAG, "Couldn't open " + mName + " for writing (will try read-only):", e);
- }
-
- SQLiteDatabase db = null;
- try {
- mIsInitializing = true;
- String path = mContext.getDatabasePath(mName).getPath();
- db = SQLiteDatabase.openDatabase(path, mFactory, SQLiteDatabase.OPEN_READONLY,
- mErrorHandler);
- if (db.getVersion() != mNewVersion) {
- throw new SQLiteException("Can't upgrade read-only database from version " +
- db.getVersion() + " to " + mNewVersion + ": " + path);
+ if (db.isReadOnly()) {
+ Log.w(TAG, "Opened " + mName + " in read-only mode");
}
- onOpen(db);
- Log.w(TAG, "Opened " + mName + " in read-only mode");
mDatabase = db;
- return mDatabase;
+ return db;
} finally {
mIsInitializing = false;
- if (db != null && db != mDatabase) db.close();
+ if (db != null && db != mDatabase) {
+ db.close();
+ }
}
}
diff --git a/core/java/android/net/NetworkInfo.java b/core/java/android/net/NetworkInfo.java
index 2f43cb8..0bc6b58 100644
--- a/core/java/android/net/NetworkInfo.java
+++ b/core/java/android/net/NetworkInfo.java
@@ -77,7 +77,9 @@ public class NetworkInfo implements Parcelable {
/** Attempt to connect failed. */
FAILED,
/** Access to this network is blocked. */
- BLOCKED
+ BLOCKED,
+ /** Link has poor connectivity. */
+ VERIFYING_POOR_LINK
}
/**
@@ -94,6 +96,7 @@ public class NetworkInfo implements Parcelable {
stateMap.put(DetailedState.CONNECTING, State.CONNECTING);
stateMap.put(DetailedState.AUTHENTICATING, State.CONNECTING);
stateMap.put(DetailedState.OBTAINING_IPADDR, State.CONNECTING);
+ stateMap.put(DetailedState.VERIFYING_POOR_LINK, State.CONNECTING);
stateMap.put(DetailedState.CONNECTED, State.CONNECTED);
stateMap.put(DetailedState.SUSPENDED, State.SUSPENDED);
stateMap.put(DetailedState.DISCONNECTING, State.DISCONNECTING);
diff --git a/core/java/android/net/arp/ArpPeer.java b/core/java/android/net/arp/ArpPeer.java
new file mode 100644
index 0000000..8e666bc
--- /dev/null
+++ b/core/java/android/net/arp/ArpPeer.java
@@ -0,0 +1,132 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.net.arp;
+
+import android.os.SystemClock;
+import android.util.Log;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.Inet6Address;
+import java.net.SocketException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.Arrays;
+
+import libcore.net.RawSocket;
+
+/**
+ * This class allows simple ARP exchanges over an uninitialized network
+ * interface.
+ *
+ * @hide
+ */
+public class ArpPeer {
+ private String mInterfaceName;
+ private final InetAddress mMyAddr;
+ private final byte[] mMyMac = new byte[6];
+ private final InetAddress mPeer;
+ private final RawSocket mSocket;
+ private final byte[] L2_BROADCAST; // TODO: refactor from DhcpClient.java
+ private static final int MAX_LENGTH = 1500; // refactor from DhcpPacket.java
+ private static final int ETHERNET_TYPE = 1;
+ private static final int ARP_LENGTH = 28;
+ private static final int MAC_ADDR_LENGTH = 6;
+ private static final int IPV4_LENGTH = 4;
+ private static final String TAG = "ArpPeer";
+
+ public ArpPeer(String interfaceName, InetAddress myAddr, String mac,
+ InetAddress peer) throws SocketException {
+ mInterfaceName = interfaceName;
+ mMyAddr = myAddr;
+
+ for (int i = 0; i < MAC_ADDR_LENGTH; i++) {
+ mMyMac[i] = (byte) Integer.parseInt(mac.substring(
+ i*3, (i*3) + 2), 16);
+ }
+
+ if (myAddr instanceof Inet6Address || peer instanceof Inet6Address) {
+ throw new IllegalArgumentException("IPv6 unsupported");
+ }
+
+ mPeer = peer;
+ L2_BROADCAST = new byte[MAC_ADDR_LENGTH];
+ Arrays.fill(L2_BROADCAST, (byte) 0xFF);
+
+ mSocket = new RawSocket(mInterfaceName, RawSocket.ETH_P_ARP);
+ }
+
+ /**
+ * Returns the MAC address (or null if timeout) for the requested
+ * peer.
+ */
+ public byte[] doArp(int timeoutMillis) {
+ ByteBuffer buf = ByteBuffer.allocate(MAX_LENGTH);
+ byte[] desiredIp = mPeer.getAddress();
+ long timeout = SystemClock.elapsedRealtime() + timeoutMillis;
+
+ // construct ARP request packet, using a ByteBuffer as a
+ // convenient container
+ buf.clear();
+ buf.order(ByteOrder.BIG_ENDIAN);
+
+ buf.putShort((short) ETHERNET_TYPE); // Ethernet type, 16 bits
+ buf.putShort(RawSocket.ETH_P_IP); // Protocol type IP, 16 bits
+ buf.put((byte)MAC_ADDR_LENGTH); // MAC address length, 6 bytes
+ buf.put((byte)IPV4_LENGTH); // IPv4 protocol size
+ buf.putShort((short) 1); // ARP opcode 1: 'request'
+ buf.put(mMyMac); // six bytes: sender MAC
+ buf.put(mMyAddr.getAddress()); // four bytes: sender IP address
+ buf.put(new byte[MAC_ADDR_LENGTH]); // target MAC address: unknown
+ buf.put(desiredIp); // target IP address, 4 bytes
+ buf.flip();
+ mSocket.write(L2_BROADCAST, buf.array(), 0, buf.limit());
+
+ byte[] recvBuf = new byte[MAX_LENGTH];
+
+ while (SystemClock.elapsedRealtime() < timeout) {
+ long duration = (long) timeout - SystemClock.elapsedRealtime();
+ int readLen = mSocket.read(recvBuf, 0, recvBuf.length, -1,
+ (int) duration);
+
+ // Verify packet details. see RFC 826
+ if ((readLen >= ARP_LENGTH) // trailing bytes at times
+ && (recvBuf[0] == 0) && (recvBuf[1] == ETHERNET_TYPE) // type Ethernet
+ && (recvBuf[2] == 8) && (recvBuf[3] == 0) // protocol IP
+ && (recvBuf[4] == MAC_ADDR_LENGTH) // mac length
+ && (recvBuf[5] == IPV4_LENGTH) // IPv4 protocol size
+ && (recvBuf[6] == 0) && (recvBuf[7] == 2) // ARP reply
+ // verify desired IP address
+ && (recvBuf[14] == desiredIp[0]) && (recvBuf[15] == desiredIp[1])
+ && (recvBuf[16] == desiredIp[2]) && (recvBuf[17] == desiredIp[3]))
+ {
+ // looks good. copy out the MAC
+ byte[] result = new byte[MAC_ADDR_LENGTH];
+ System.arraycopy(recvBuf, 8, result, 0, MAC_ADDR_LENGTH);
+ return result;
+ }
+ }
+
+ return null;
+ }
+
+ public void close() {
+ try {
+ mSocket.close();
+ } catch (IOException ex) {
+ }
+ }
+}
diff --git a/services/audioflinger/AudioBufferProvider.cpp b/core/java/android/os/IUpdateLock.aidl
index 678fd58..4492fb8 100644
--- a/services/audioflinger/AudioBufferProvider.cpp
+++ b/core/java/android/os/IUpdateLock.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 The Android Open Source Project
+ * Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,15 +14,14 @@
* limitations under the License.
*/
-#undef __STRICT_ANSI__
-#define __STDINT_LIMITS
-#define __STDC_LIMIT_MACROS
-#include <stdint.h>
+package android.os;
-#include "AudioBufferProvider.h"
-
-namespace android {
-
-const int64_t AudioBufferProvider::kInvalidPTS = INT64_MAX;
-
-}; // namespace android
+/**
+ * Direct interface to the UpdateLockService's functionality
+ *
+ * {@hide}
+ */
+interface IUpdateLock {
+ void acquireUpdateLock(IBinder token, String tag);
+ void releaseUpdateLock(IBinder token);
+}
diff --git a/core/java/android/os/TokenWatcher.java b/core/java/android/os/TokenWatcher.java
index ac3cc92..9b3a2d6 100755
--- a/core/java/android/os/TokenWatcher.java
+++ b/core/java/android/os/TokenWatcher.java
@@ -16,6 +16,8 @@
package android.os;
+import java.io.PrintWriter;
+import java.util.ArrayList;
import java.util.WeakHashMap;
import java.util.Set;
import android.util.Log;
@@ -115,15 +117,31 @@ public abstract class TokenWatcher
public void dump()
{
+ ArrayList<String> a = dumpInternal();
+ for (String s : a) {
+ Log.i(mTag, s);
+ }
+ }
+
+ public void dump(PrintWriter pw) {
+ ArrayList<String> a = dumpInternal();
+ for (String s : a) {
+ pw.println(s);
+ }
+ }
+
+ private ArrayList<String> dumpInternal() {
+ ArrayList<String> a = new ArrayList<String>();
synchronized (mTokens) {
Set<IBinder> keys = mTokens.keySet();
- Log.i(mTag, "Token count: " + mTokens.size());
+ a.add("Token count: " + mTokens.size());
int i = 0;
for (IBinder b: keys) {
- Log.i(mTag, "[" + i + "] " + mTokens.get(b).tag + " - " + b);
+ a.add("[" + i + "] " + mTokens.get(b).tag + " - " + b);
i++;
}
}
+ return a;
}
private Runnable mNotificationTask = new Runnable() {
diff --git a/core/java/android/os/UpdateLock.java b/core/java/android/os/UpdateLock.java
new file mode 100644
index 0000000..4060326
--- /dev/null
+++ b/core/java/android/os/UpdateLock.java
@@ -0,0 +1,166 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.os;
+
+import android.content.Context;
+import android.util.Log;
+
+/**
+ * Advisory wakelock-like mechanism by which processes that should not be interrupted for
+ * OTA/update purposes can so advise the OS. This is particularly relevant for headless
+ * or kiosk-like operation.
+ *
+ * @hide
+ */
+public class UpdateLock {
+ private static final boolean DEBUG = false;
+ private static final String TAG = "UpdateLock";
+
+ private static IUpdateLock sService;
+ private static void checkService() {
+ if (sService == null) {
+ sService = IUpdateLock.Stub.asInterface(
+ ServiceManager.getService(Context.UPDATE_LOCK_SERVICE));
+ }
+ }
+
+ IBinder mToken;
+ int mCount = 0;
+ boolean mRefCounted = true;
+ boolean mHeld = false;
+ final String mTag;
+
+ /**
+ * Broadcast Intent action sent when the global update lock state changes,
+ * i.e. when the first locker acquires an update lock, or when the last
+ * locker releases theirs. The broadcast is sticky but is sent only to
+ * registered receivers.
+ */
+ public static final String UPDATE_LOCK_CHANGED = "android.os.UpdateLock.UPDATE_LOCK_CHANGED";
+
+ /**
+ * Boolean Intent extra on the UPDATE_LOCK_CHANGED sticky broadcast, indicating
+ * whether now is an appropriate time to interrupt device activity with an
+ * update operation. True means that updates are okay right now; false indicates
+ * that perhaps later would be a better time.
+ */
+ public static final String NOW_IS_CONVENIENT = "nowisconvenient";
+
+ /**
+ * Long Intent extra on the UPDATE_LOCK_CHANGED sticky broadcast, marking the
+ * wall-clock time [in UTC] at which the broadcast was sent. Note that this is
+ * in the System.currentTimeMillis() time base, which may be non-monotonic especially
+ * around reboots.
+ */
+ public static final String TIMESTAMP = "timestamp";
+
+ /**
+ * Construct an UpdateLock instance.
+ * @param tag An arbitrary string used to identify this lock instance in dump output.
+ */
+ public UpdateLock(String tag) {
+ mTag = tag;
+ mToken = new Binder();
+ }
+
+ /**
+ * Change the refcount behavior of this update lock.
+ */
+ public void setReferenceCounted(boolean isRefCounted) {
+ if (DEBUG) {
+ Log.v(TAG, "setting refcounted=" + isRefCounted + " : " + this);
+ }
+ mRefCounted = isRefCounted;
+ }
+
+ /**
+ * Is this lock currently held?
+ */
+ public boolean isHeld() {
+ synchronized (mToken) {
+ return mHeld;
+ }
+ }
+
+ /**
+ * Acquire an update lock.
+ */
+ public void acquire() {
+ if (DEBUG) {
+ Log.v(TAG, "acquire() : " + this, new RuntimeException("here"));
+ }
+ checkService();
+ synchronized (mToken) {
+ acquireLocked();
+ }
+ }
+
+ private void acquireLocked() {
+ if (!mRefCounted || mCount++ == 0) {
+ if (sService != null) {
+ try {
+ sService.acquireUpdateLock(mToken, mTag);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Unable to contact service to acquire");
+ }
+ }
+ mHeld = true;
+ }
+ }
+
+ /**
+ * Release this update lock.
+ */
+ public void release() {
+ if (DEBUG) Log.v(TAG, "release() : " + this, new RuntimeException("here"));
+ checkService();
+ synchronized (mToken) {
+ releaseLocked();
+ }
+ }
+
+ private void releaseLocked() {
+ if (!mRefCounted || --mCount == 0) {
+ if (sService != null) {
+ try {
+ sService.releaseUpdateLock(mToken);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Unable to contact service to release");
+ }
+ }
+ mHeld = false;
+ }
+ if (mCount < 0) {
+ throw new RuntimeException("UpdateLock under-locked");
+ }
+ }
+
+ @Override
+ protected void finalize() throws Throwable {
+ synchronized (mToken) {
+ // if mHeld is true, sService must be non-null
+ if (mHeld) {
+ Log.wtf(TAG, "UpdateLock finalized while still held");
+ try {
+ sService.releaseUpdateLock(mToken);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Unable to contact service to release");
+ }
+ }
+ }
+ }
+}
diff --git a/core/java/android/provider/CalendarContract.java b/core/java/android/provider/CalendarContract.java
index 413150b..fa59b32 100644
--- a/core/java/android/provider/CalendarContract.java
+++ b/core/java/android/provider/CalendarContract.java
@@ -402,8 +402,8 @@ public final class CalendarContract {
* A comma separated list of reminder methods supported for this
* calendar in the format "#,#,#". Valid types are
* {@link Reminders#METHOD_DEFAULT}, {@link Reminders#METHOD_ALERT},
- * {@link Reminders#METHOD_EMAIL}, {@link Reminders#METHOD_SMS}. Column
- * name.
+ * {@link Reminders#METHOD_EMAIL}, {@link Reminders#METHOD_SMS},
+ * {@link Reminders#METHOD_ALARM}. Column name.
* <P>Type: TEXT</P>
*/
public static final String ALLOWED_REMINDERS = "allowedReminders";
@@ -1930,11 +1930,11 @@ public final class CalendarContract {
/**
* The alarm method, as set on the server. {@link #METHOD_DEFAULT},
- * {@link #METHOD_ALERT}, {@link #METHOD_EMAIL}, and {@link #METHOD_SMS}
- * are possible values; the device will only process
- * {@link #METHOD_DEFAULT} and {@link #METHOD_ALERT} reminders (the
- * other types are simply stored so we can send the same reminder info
- * back to the server when we make changes).
+ * {@link #METHOD_ALERT}, {@link #METHOD_EMAIL}, {@link #METHOD_SMS} and
+ * {@link #METHOD_ALARM} are possible values; the device will only
+ * process {@link #METHOD_DEFAULT} and {@link #METHOD_ALERT} reminders
+ * (the other types are simply stored so we can send the same reminder
+ * info back to the server when we make changes).
*/
public static final String METHOD = "method";
@@ -1942,6 +1942,7 @@ public final class CalendarContract {
public static final int METHOD_ALERT = 1;
public static final int METHOD_EMAIL = 2;
public static final int METHOD_SMS = 3;
+ public static final int METHOD_ALARM = 4;
}
/**
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 0aad64a..b42417a 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -3125,15 +3125,8 @@ public final class Settings {
* ms delay before rechecking an 'online' wifi connection when it is thought to be unstable.
* @hide
*/
- public static final String WIFI_WATCHDOG_DNS_CHECK_SHORT_INTERVAL_MS =
- "wifi_watchdog_dns_check_short_interval_ms";
-
- /**
- * ms delay before rechecking an 'online' wifi connection when it is thought to be stable.
- * @hide
- */
- public static final String WIFI_WATCHDOG_DNS_CHECK_LONG_INTERVAL_MS =
- "wifi_watchdog_dns_check_long_interval_ms";
+ public static final String WIFI_WATCHDOG_ARP_CHECK_INTERVAL_MS =
+ "wifi_watchdog_arp_interval_ms";
/**
* ms delay before rechecking a connect SSID for walled garden with a http download.
@@ -3143,44 +3136,28 @@ public final class Settings {
"wifi_watchdog_walled_garden_interval_ms";
/**
- * max blacklist calls on an SSID before full dns check failures disable the network.
+ * Number of ARP pings per check.
* @hide
*/
- public static final String WIFI_WATCHDOG_MAX_SSID_BLACKLISTS =
- "wifi_watchdog_max_ssid_blacklists";
+ public static final String WIFI_WATCHDOG_NUM_ARP_PINGS = "wifi_watchdog_num_arp_pings";
/**
- * Number of dns pings per check.
+ * Minimum number of responses to the arp pings to consider the test 'successful'.
* @hide
*/
- public static final String WIFI_WATCHDOG_NUM_DNS_PINGS = "wifi_watchdog_num_dns_pings";
+ public static final String WIFI_WATCHDOG_MIN_ARP_RESPONSES =
+ "wifi_watchdog_min_arp_responses";
/**
- * Minimum number of responses to the dns pings to consider the test 'successful'.
+ * Timeout on ARP pings
* @hide
*/
- public static final String WIFI_WATCHDOG_MIN_DNS_RESPONSES =
- "wifi_watchdog_min_dns_responses";
+ public static final String WIFI_WATCHDOG_ARP_PING_TIMEOUT_MS =
+ "wifi_watchdog_arp_ping_timeout_ms";
/**
- * Timeout on dns pings
- * @hide
- */
- public static final String WIFI_WATCHDOG_DNS_PING_TIMEOUT_MS =
- "wifi_watchdog_dns_ping_timeout_ms";
-
- /**
- * We consider action from a 'blacklist' call to have finished by the end of
- * this interval. If we are connected to the same AP with no network connection,
- * we are likely stuck on an SSID with no external connectivity.
- * @hide
- */
- public static final String WIFI_WATCHDOG_BLACKLIST_FOLLOWUP_INTERVAL_MS =
- "wifi_watchdog_blacklist_followup_interval_ms";
-
- /**
- * Setting to turn off poor network avoidance on Wi-Fi. Feature is disabled by default and
- * the setting needs to be set to 1 to enable it.
+ * Setting to turn off poor network avoidance on Wi-Fi. Feature is enabled by default and
+ * the setting needs to be set to 0 to disable it.
* @hide
*/
public static final String WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED =
@@ -3204,14 +3181,6 @@ public final class Settings {
"wifi_watchdog_walled_garden_url";
/**
- * Boolean to determine whether to notify on disabling a network. Secure setting used
- * to notify user only once.
- * @hide
- */
- public static final String WIFI_WATCHDOG_SHOW_DISABLED_NETWORK_POPUP =
- "wifi_watchdog_show_disabled_network_popup";
-
- /**
* The maximum number of times we will retry a connection to an access
* point for which we have failed in acquiring an IP address from DHCP.
* A value of N means that we will make N+1 connection attempts in all.
diff --git a/core/java/android/text/Html.java b/core/java/android/text/Html.java
index ca7263c..8c97293 100644
--- a/core/java/android/text/Html.java
+++ b/core/java/android/text/Html.java
@@ -16,6 +16,7 @@
package android.text;
+import com.android.internal.util.ArrayUtils;
import org.ccil.cowan.tagsoup.HTMLSchema;
import org.ccil.cowan.tagsoup.Parser;
import org.xml.sax.Attributes;
@@ -45,13 +46,11 @@ import android.text.style.TextAppearanceSpan;
import android.text.style.TypefaceSpan;
import android.text.style.URLSpan;
import android.text.style.UnderlineSpan;
-import android.util.Log;
import com.android.internal.util.XmlUtils;
import java.io.IOException;
import java.io.StringReader;
-import java.nio.CharBuffer;
import java.util.HashMap;
/**
@@ -203,9 +202,26 @@ public class Html {
}
}
+ private static String getOpenParaTagWithDirection(Spanned text, int start, int end) {
+ final int len = end - start;
+ final byte[] levels = new byte[ArrayUtils.idealByteArraySize(len)];
+ final char[] buffer = TextUtils.obtain(len);
+ TextUtils.getChars(text, start, end, buffer, 0);
+
+ int paraDir = AndroidBidi.bidi(Layout.DIR_REQUEST_DEFAULT_LTR, buffer, levels, len,
+ false /* no info */);
+ switch(paraDir) {
+ case Layout.DIR_RIGHT_TO_LEFT:
+ return "<p dir=rtl>";
+ case Layout.DIR_LEFT_TO_RIGHT:
+ default:
+ return "<p dir=ltr>";
+ }
+ }
+
private static void withinBlockquote(StringBuilder out, Spanned text,
int start, int end) {
- out.append("<p>");
+ out.append(getOpenParaTagWithDirection(text, start, end));
int next;
for (int i = start; i < end; i = next) {
@@ -340,7 +356,7 @@ public class Html {
}
}
- String p = last ? "" : "</p>\n<p>";
+ String p = last ? "" : "</p>\n" + getOpenParaTagWithDirection(text, start, end);
if (nl == 1) {
out.append("<br>\n");
@@ -350,7 +366,6 @@ public class Html {
for (int i = 2; i < nl; i++) {
out.append("<br>");
}
-
out.append(p);
}
}
diff --git a/core/java/android/text/StaticLayout.java b/core/java/android/text/StaticLayout.java
index 1dd4c8a..299e115 100644
--- a/core/java/android/text/StaticLayout.java
+++ b/core/java/android/text/StaticLayout.java
@@ -716,7 +716,8 @@ public class StaticLayout extends Layout {
boolean currentLineIsTheLastVisibleOne = (j + 1 == mMaximumVisibleLineCount);
boolean forceEllipsis = moreChars && (mLineCount + 1 == mMaximumVisibleLineCount);
- boolean doEllipsis = (firstLine && !moreChars &&
+ boolean doEllipsis =
+ (((mMaximumVisibleLineCount == 1 && moreChars) || (firstLine && !moreChars)) &&
ellipsize != TextUtils.TruncateAt.MARQUEE) ||
(!firstLine && (currentLineIsTheLastVisibleOne || !moreChars) &&
ellipsize == TextUtils.TruncateAt.END);
diff --git a/core/java/android/text/TextDirectionHeuristics.java b/core/java/android/text/TextDirectionHeuristics.java
index ae41eab..6ca6161 100644
--- a/core/java/android/text/TextDirectionHeuristics.java
+++ b/core/java/android/text/TextDirectionHeuristics.java
@@ -18,6 +18,7 @@ package android.text;
import android.util.LocaleUtil;
+import android.view.View;
/**
* Some objects that implement TextDirectionHeuristic.
@@ -240,7 +241,7 @@ public class TextDirectionHeuristics {
@Override
protected boolean defaultIsRtl() {
final int dir = LocaleUtil.getLayoutDirectionFromLocale(java.util.Locale.getDefault());
- return (dir == LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE);
+ return (dir == View.LAYOUT_DIRECTION_RTL);
}
public static final TextDirectionHeuristicLocale INSTANCE =
diff --git a/core/java/android/util/LocaleUtil.java b/core/java/android/util/LocaleUtil.java
index 4d773f6..9953252 100644
--- a/core/java/android/util/LocaleUtil.java
+++ b/core/java/android/util/LocaleUtil.java
@@ -18,6 +18,7 @@ package android.util;
import java.util.Locale;
+import android.view.View;
import libcore.icu.ICU;
/**
@@ -29,16 +30,6 @@ public class LocaleUtil {
private LocaleUtil() { /* cannot be instantiated */ }
- /**
- * @hide Do not use. Implementation not finished.
- */
- public static final int TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE = 0;
-
- /**
- * @hide Do not use. Implementation not finished.
- */
- public static final int TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE = 1;
-
private static String ARAB_SCRIPT_SUBTAG = "Arab";
private static String HEBR_SCRIPT_SUBTAG = "Hebr";
@@ -47,8 +38,8 @@ public class LocaleUtil {
*
* @param locale the Locale for which we want the layout direction. Can be null.
* @return the layout direction. This may be one of:
- * {@link #TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE} or
- * {@link #TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE}.
+ * {@link View#LAYOUT_DIRECTION_LTR} or
+ * {@link View#LAYOUT_DIRECTION_RTL}.
*
* Be careful: this code will need to be changed when vertical scripts will be supported
*
@@ -61,11 +52,11 @@ public class LocaleUtil {
if (scriptSubtag.equalsIgnoreCase(ARAB_SCRIPT_SUBTAG) ||
scriptSubtag.equalsIgnoreCase(HEBR_SCRIPT_SUBTAG)) {
- return TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE;
+ return View.LAYOUT_DIRECTION_RTL;
}
}
- return TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE;
+ return View.LAYOUT_DIRECTION_LTR;
}
/**
@@ -75,8 +66,8 @@ public class LocaleUtil {
*
* @param locale
* @return the layout direction. This may be one of:
- * {@link #TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE} or
- * {@link #TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE}.
+ * {@link View#LAYOUT_DIRECTION_LTR} or
+ * {@link View#LAYOUT_DIRECTION_RTL}.
*
* Be careful: this code will need to be changed when vertical scripts will be supported
*
@@ -86,11 +77,11 @@ public class LocaleUtil {
switch(Character.getDirectionality(locale.getDisplayName(locale).charAt(0))) {
case Character.DIRECTIONALITY_RIGHT_TO_LEFT:
case Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC:
- return TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE;
+ return View.LAYOUT_DIRECTION_RTL;
case Character.DIRECTIONALITY_LEFT_TO_RIGHT:
default:
- return TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE;
+ return View.LAYOUT_DIRECTION_LTR;
}
}
}
diff --git a/core/java/android/util/TimeUtils.java b/core/java/android/util/TimeUtils.java
index 93299eb..2883eca 100644
--- a/core/java/android/util/TimeUtils.java
+++ b/core/java/android/util/TimeUtils.java
@@ -25,6 +25,8 @@ import org.xmlpull.v1.XmlPullParserException;
import java.io.IOException;
import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Collection;
import java.util.TimeZone;
import java.util.Date;
@@ -35,18 +37,26 @@ import com.android.internal.util.XmlUtils;
*/
public class TimeUtils {
/** @hide */ public TimeUtils() {}
+ private static final boolean DBG = false;
private static final String TAG = "TimeUtils";
+ /** Cached results of getTineZones */
+ private static final Object sLastLockObj = new Object();
+ private static ArrayList<TimeZone> sLastZones = null;
+ private static String sLastCountry = null;
+
+ /** Cached results of getTimeZonesWithUniqueOffsets */
+ private static final Object sLastUniqueLockObj = new Object();
+ private static ArrayList<TimeZone> sLastUniqueZoneOffsets = null;
+ private static String sLastUniqueCountry = null;
+
+
/**
* Tries to return a time zone that would have had the specified offset
* and DST value at the specified moment in the specified country.
* Returns null if no suitable zone could be found.
*/
public static TimeZone getTimeZone(int offset, boolean dst, long when, String country) {
- if (country == null) {
- return null;
- }
-
TimeZone best = null;
Resources r = Resources.getSystem();
@@ -58,6 +68,107 @@ public class TimeUtils {
int currentOffset = current.getOffset(when);
boolean currentDst = current.inDaylightTime(d);
+ for (TimeZone tz : getTimeZones(country)) {
+ // If the current time zone is from the right country
+ // and meets the other known properties, keep it
+ // instead of changing to another one.
+
+ if (tz.getID().equals(currentName)) {
+ if (currentOffset == offset && currentDst == dst) {
+ return current;
+ }
+ }
+
+ // Otherwise, take the first zone from the right
+ // country that has the correct current offset and DST.
+ // (Keep iterating instead of returning in case we
+ // haven't encountered the current time zone yet.)
+
+ if (best == null) {
+ if (tz.getOffset(when) == offset &&
+ tz.inDaylightTime(d) == dst) {
+ best = tz;
+ }
+ }
+ }
+
+ return best;
+ }
+
+ /**
+ * Return list of unique time zones for the country. Do not modify
+ *
+ * @param country to find
+ * @return list of unique time zones, maybe empty but never null. Do not modify.
+ * @hide
+ */
+ public static ArrayList<TimeZone> getTimeZonesWithUniqueOffsets(String country) {
+ synchronized(sLastUniqueLockObj) {
+ if ((country != null) && country.equals(sLastUniqueCountry)) {
+ if (DBG) {
+ Log.d(TAG, "getTimeZonesWithUniqueOffsets(" +
+ country + "): return cached version");
+ }
+ return sLastUniqueZoneOffsets;
+ }
+ }
+
+ Collection<TimeZone> zones = getTimeZones(country);
+ ArrayList<TimeZone> uniqueTimeZones = new ArrayList<TimeZone>();
+ for (TimeZone zone : zones) {
+ // See if we already have this offset,
+ // Using slow but space efficient and these are small.
+ boolean found = false;
+ for (int i = 0; i < uniqueTimeZones.size(); i++) {
+ if (uniqueTimeZones.get(i).getRawOffset() == zone.getRawOffset()) {
+ found = true;
+ break;
+ }
+ }
+ if (found == false) {
+ if (DBG) {
+ Log.d(TAG, "getTimeZonesWithUniqueOffsets: add unique offset=" +
+ zone.getRawOffset() + " zone.getID=" + zone.getID());
+ }
+ uniqueTimeZones.add(zone);
+ }
+ }
+
+ synchronized(sLastUniqueLockObj) {
+ // Cache the last result
+ sLastUniqueZoneOffsets = uniqueTimeZones;
+ sLastUniqueCountry = country;
+
+ return sLastUniqueZoneOffsets;
+ }
+ }
+
+ /**
+ * Returns the time zones for the country, which is the code
+ * attribute of the timezone element in time_zones_by_country.xml. Do not modify.
+ *
+ * @param country is a two character country code.
+ * @return TimeZone list, maybe empty but never null. Do not modify.
+ * @hide
+ */
+ public static ArrayList<TimeZone> getTimeZones(String country) {
+ synchronized (sLastLockObj) {
+ if ((country != null) && country.equals(sLastCountry)) {
+ if (DBG) Log.d(TAG, "getTimeZones(" + country + "): return cached version");
+ return sLastZones;
+ }
+ }
+
+ ArrayList<TimeZone> tzs = new ArrayList<TimeZone>();
+
+ if (country == null) {
+ if (DBG) Log.d(TAG, "getTimeZones(null): return empty list");
+ return tzs;
+ }
+
+ Resources r = Resources.getSystem();
+ XmlResourceParser parser = r.getXml(com.android.internal.R.xml.time_zones_by_country);
+
try {
XmlUtils.beginDocument(parser, "timezones");
@@ -73,43 +184,33 @@ public class TimeUtils {
if (country.equals(code)) {
if (parser.next() == XmlPullParser.TEXT) {
- String maybe = parser.getText();
-
- // If the current time zone is from the right country
- // and meets the other known properties, keep it
- // instead of changing to another one.
-
- if (maybe.equals(currentName)) {
- if (currentOffset == offset && currentDst == dst) {
- return current;
- }
- }
-
- // Otherwise, take the first zone from the right
- // country that has the correct current offset and DST.
- // (Keep iterating instead of returning in case we
- // haven't encountered the current time zone yet.)
-
- if (best == null) {
- TimeZone tz = TimeZone.getTimeZone(maybe);
-
- if (tz.getOffset(when) == offset &&
- tz.inDaylightTime(d) == dst) {
- best = tz;
+ String zoneIdString = parser.getText();
+ TimeZone tz = TimeZone.getTimeZone(zoneIdString);
+ if (tz.getID().startsWith("GMT") == false) {
+ // tz.getID doesn't start not "GMT" so its valid
+ tzs.add(tz);
+ if (DBG) {
+ Log.d(TAG, "getTimeZone('" + country + "'): found tz.getID=="
+ + ((tz != null) ? tz.getID() : "<no tz>"));
}
}
}
}
}
} catch (XmlPullParserException e) {
- Log.e(TAG, "Got exception while getting preferred time zone.", e);
+ Log.e(TAG, "Got xml parser exception getTimeZone('" + country + "'): e=", e);
} catch (IOException e) {
- Log.e(TAG, "Got exception while getting preferred time zone.", e);
+ Log.e(TAG, "Got IO exception getTimeZone('" + country + "'): e=", e);
} finally {
parser.close();
}
- return best;
+ synchronized(sLastLockObj) {
+ // Cache the last result;
+ sLastZones = tzs;
+ sLastCountry = country;
+ return sLastZones;
+ }
}
/**
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 0675a74..5cf0459 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -40,7 +40,6 @@ import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.os.IBinder;
-import android.os.Message;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
@@ -5048,16 +5047,17 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
* the View's internal state from a previously set "pressed" state.
*/
public void setPressed(boolean pressed) {
- if (pressed == ((mPrivateFlags & PRESSED) == PRESSED)) {
- return;
- }
+ final boolean needsRefresh = pressed != ((mPrivateFlags & PRESSED) == PRESSED);
if (pressed) {
mPrivateFlags |= PRESSED;
} else {
mPrivateFlags &= ~PRESSED;
}
- refreshDrawableState();
+
+ if (needsRefresh) {
+ refreshDrawableState();
+ }
dispatchSetPressed(pressed);
}
@@ -9710,8 +9710,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
* @hide
*/
protected static boolean isLayoutDirectionRtl(Locale locale) {
- return (LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE ==
- LocaleUtil.getLayoutDirectionFromLocale(locale));
+ return (LAYOUT_DIRECTION_RTL == LocaleUtil.getLayoutDirectionFromLocale(locale));
}
/**
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index 2848e88..05c2b57 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -2770,7 +2770,13 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
final View[] children = mChildren;
final int count = mChildrenCount;
for (int i = 0; i < count; i++) {
- children[i].setPressed(pressed);
+ final View child = children[i];
+ // Children that are clickable on their own should not
+ // show a pressed state when their parent view does.
+ // Clearing a pressed state always propagates.
+ if (!pressed || (!child.isClickable() && !child.isLongClickable())) {
+ child.setPressed(pressed);
+ }
}
}
diff --git a/core/java/android/view/animation/Animation.java b/core/java/android/view/animation/Animation.java
index e8c0239..dc8c71b 100644
--- a/core/java/android/view/animation/Animation.java
+++ b/core/java/android/view/animation/Animation.java
@@ -913,7 +913,7 @@ public abstract class Animation implements Cloneable {
*
* @param interpolatedTime The value of the normalized time (0.0 to 1.0)
* after it has been run through the interpolation function.
- * @param t The Transofrmation object to fill in with the current
+ * @param t The Transformation object to fill in with the current
* transforms.
*/
protected void applyTransformation(float interpolatedTime, Transformation t) {
diff --git a/core/java/android/view/inputmethod/BaseInputConnection.java b/core/java/android/view/inputmethod/BaseInputConnection.java
index 89aba3c..7ec5398 100644
--- a/core/java/android/view/inputmethod/BaseInputConnection.java
+++ b/core/java/android/view/inputmethod/BaseInputConnection.java
@@ -152,6 +152,15 @@ public class BaseInputConnection implements InputConnection {
}
/**
+ * Called when this InputConnection is no longer used by the InputMethodManager.
+ *
+ * @hide
+ */
+ protected void reportFinish() {
+ // Intentionaly empty
+ }
+
+ /**
* Default implementation uses
* {@link MetaKeyKeyListener#clearMetaKeyState(long, int)
* MetaKeyKeyListener.clearMetaKeyState(long, int)} to clear the state.
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index b6b27c1..3b6ebbe 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -708,6 +708,10 @@ public final class InputMethodManager {
public void reportFinishInputConnection(InputConnection ic) {
if (mServedInputConnection != ic) {
ic.finishComposingText();
+ // To avoid modifying the public InputConnection interface
+ if (ic instanceof BaseInputConnection) {
+ ((BaseInputConnection) ic).reportFinish();
+ }
}
}
diff --git a/core/java/android/view/textservice/SentenceSuggestionsInfo.java b/core/java/android/view/textservice/SentenceSuggestionsInfo.java
index 8d7c6cf..cb9e496 100644
--- a/core/java/android/view/textservice/SentenceSuggestionsInfo.java
+++ b/core/java/android/view/textservice/SentenceSuggestionsInfo.java
@@ -84,6 +84,13 @@ public final class SentenceSuggestionsInfo implements Parcelable {
/**
* @hide
*/
+ public int getSuggestionsCount() {
+ return mSuggestionsInfos.length;
+ }
+
+ /**
+ * @hide
+ */
public SuggestionsInfo getSuggestionsInfoAt(int i) {
if (i >= 0 && i < mSuggestionsInfos.length) {
return mSuggestionsInfos[i];
diff --git a/core/java/android/view/textservice/SpellCheckerSession.java b/core/java/android/view/textservice/SpellCheckerSession.java
index 3491a53..9105f19 100644
--- a/core/java/android/view/textservice/SpellCheckerSession.java
+++ b/core/java/android/view/textservice/SpellCheckerSession.java
@@ -180,9 +180,9 @@ public class SpellCheckerSession {
/**
* @hide
*/
- public void getSentenceSuggestions(TextInfo textInfo, int suggestionsLimit) {
+ public void getSentenceSuggestions(TextInfo[] textInfo, int suggestionsLimit) {
mSpellCheckerSessionListenerImpl.getSentenceSuggestionsMultiple(
- new TextInfo[] {textInfo}, suggestionsLimit);
+ textInfo, suggestionsLimit);
}
/**
diff --git a/core/java/android/webkit/HTML5VideoInline.java b/core/java/android/webkit/HTML5VideoInline.java
index 2d5b263..62e812e 100644
--- a/core/java/android/webkit/HTML5VideoInline.java
+++ b/core/java/android/webkit/HTML5VideoInline.java
@@ -92,6 +92,11 @@ public class HTML5VideoInline extends HTML5VideoView{
@Override
public void deleteSurfaceTexture() {
+ cleanupSurfaceTexture();
+ return;
+ }
+
+ public static void cleanupSurfaceTexture() {
mSurfaceTexture = null;
mVideoLayerUsingSurfaceTexture = -1;
return;
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index b9dfb2e..a850379 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -68,6 +68,7 @@ import android.text.InputType;
import android.text.Selection;
import android.text.TextUtils;
import android.util.AttributeSet;
+import android.util.DisplayMetrics;
import android.util.EventLog;
import android.util.Log;
import android.view.Display;
@@ -95,6 +96,7 @@ import android.view.inputmethod.BaseInputConnection;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.view.inputmethod.InputMethodManager;
+import android.webkit.HTML5VideoInline;
import android.webkit.WebTextView.AutoCompleteAdapter;
import android.webkit.WebViewCore.DrawData;
import android.webkit.WebViewCore.EventHub;
@@ -111,6 +113,8 @@ import android.widget.CheckedTextView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.OverScroller;
+import android.widget.PopupWindow;
+import android.widget.TextView;
import android.widget.Toast;
import junit.framework.Assert;
@@ -122,7 +126,6 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.HashMap;
@@ -376,6 +379,7 @@ public class WebView extends AbsoluteLayout
private int mInputType;
private int mImeOptions;
private String mHint;
+ private int mMaxLength;
public WebViewInputConnection() {
super(WebView.this, true);
@@ -410,19 +414,28 @@ public class WebView extends AbsoluteLayout
Editable editable = getEditable();
int selectionStart = Selection.getSelectionStart(editable);
int selectionEnd = Selection.getSelectionEnd(editable);
+ text = limitReplaceTextByMaxLength(text, editable.length());
editable.replace(0, editable.length(), text);
- InputMethodManager imm = InputMethodManager.peekInstance();
- if (imm != null) {
- // Since the text has changed, do not allow the IME to replace the
- // existing text as though it were a completion.
- imm.restartInput(WebView.this);
- }
+ restartInput();
// Keep the previous selection.
selectionStart = Math.min(selectionStart, editable.length());
selectionEnd = Math.min(selectionEnd, editable.length());
setSelection(selectionStart, selectionEnd);
}
+ public void replaceSelection(CharSequence text) {
+ Editable editable = getEditable();
+ int selectionStart = Selection.getSelectionStart(editable);
+ int selectionEnd = Selection.getSelectionEnd(editable);
+ text = limitReplaceTextByMaxLength(text, selectionEnd - selectionStart);
+ setNewText(selectionStart, selectionEnd, text);
+ editable.replace(selectionStart, selectionEnd, text);
+ restartInput();
+ // Move caret to the end of the new text
+ int newCaret = selectionStart + text.length();
+ setSelection(newCaret, newCaret);
+ }
+
@Override
public boolean setComposingText(CharSequence text, int newCursorPosition) {
Editable editable = getEditable();
@@ -437,8 +450,19 @@ public class WebView extends AbsoluteLayout
end = start;
start = temp;
}
- setNewText(start, end, text);
- return super.setComposingText(text, newCursorPosition);
+ CharSequence limitedText = limitReplaceTextByMaxLength(text, end - start);
+ setNewText(start, end, limitedText);
+ if (limitedText != text) {
+ newCursorPosition -= text.length() - limitedText.length();
+ }
+ super.setComposingText(limitedText, newCursorPosition);
+ if (limitedText != text) {
+ restartInput();
+ int lastCaret = start + limitedText.length();
+ finishComposingText();
+ setSelection(lastCaret, lastCaret);
+ }
+ return true;
}
@Override
@@ -460,6 +484,38 @@ public class WebView extends AbsoluteLayout
return super.deleteSurroundingText(leftLength, rightLength);
}
+ @Override
+ public boolean performEditorAction(int editorAction) {
+
+ boolean handled = true;
+ switch (editorAction) {
+ case EditorInfo.IME_ACTION_NEXT:
+ WebView.this.requestFocus(FOCUS_FORWARD);
+ break;
+ case EditorInfo.IME_ACTION_PREVIOUS:
+ WebView.this.requestFocus(FOCUS_BACKWARD);
+ break;
+ case EditorInfo.IME_ACTION_DONE:
+ WebView.this.hideSoftKeyboard();
+ break;
+ case EditorInfo.IME_ACTION_GO:
+ case EditorInfo.IME_ACTION_SEARCH:
+ WebView.this.hideSoftKeyboard();
+ String text = getEditable().toString();
+ passToJavaScript(text, new KeyEvent(KeyEvent.ACTION_DOWN,
+ KeyEvent.KEYCODE_ENTER));
+ passToJavaScript(text, new KeyEvent(KeyEvent.ACTION_UP,
+ KeyEvent.KEYCODE_ENTER));
+ break;
+
+ default:
+ handled = super.performEditorAction(editorAction);
+ break;
+ }
+
+ return handled;
+ }
+
public void initEditorInfo(WebViewCore.TextFieldInitData initData) {
int type = initData.mType;
int inputType = InputType.TYPE_CLASS_TEXT
@@ -522,6 +578,7 @@ public class WebView extends AbsoluteLayout
mHint = initData.mLabel;
mInputType = inputType;
mImeOptions = imeOptions;
+ mMaxLength = initData.mMaxLength;
}
public void setupEditorInfo(EditorInfo outAttrs) {
@@ -559,7 +616,7 @@ public class WebView extends AbsoluteLayout
if (isCharacterAdd) {
sendCharacter(text.charAt(textLength - 1));
} else if (isCharacterDelete) {
- sendDeleteKey();
+ sendKey(KeyEvent.KEYCODE_DEL);
} else if ((textLength != originalLength) ||
!TextUtils.regionMatches(text, 0, original, 0,
textLength)) {
@@ -594,21 +651,118 @@ public class WebView extends AbsoluteLayout
}
/**
- * Send the delete character as a key down and up event.
+ * Send a key event for a specific key code, not a standard
+ * unicode character.
+ * @param keyCode The key code to send.
*/
- private void sendDeleteKey() {
+ private void sendKey(int keyCode) {
long eventTime = SystemClock.uptimeMillis();
sendKeyEvent(new KeyEvent(eventTime, eventTime,
- KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL, 0, 0,
+ KeyEvent.ACTION_DOWN, keyCode, 0, 0,
KeyCharacterMap.VIRTUAL_KEYBOARD, 0,
KeyEvent.FLAG_SOFT_KEYBOARD));
sendKeyEvent(new KeyEvent(SystemClock.uptimeMillis(), eventTime,
- KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DEL, 0, 0,
+ KeyEvent.ACTION_UP, keyCode, 0, 0,
KeyCharacterMap.VIRTUAL_KEYBOARD, 0,
KeyEvent.FLAG_SOFT_KEYBOARD));
}
+
+ private CharSequence limitReplaceTextByMaxLength(CharSequence text,
+ int numReplaced) {
+ if (mMaxLength > 0) {
+ Editable editable = getEditable();
+ int maxReplace = mMaxLength - editable.length() + numReplaced;
+ if (maxReplace < text.length()) {
+ maxReplace = Math.max(maxReplace, 0);
+ // New length is greater than the maximum. trim it down.
+ text = text.subSequence(0, maxReplace);
+ }
+ }
+ return text;
+ }
+
+ private void restartInput() {
+ InputMethodManager imm = InputMethodManager.peekInstance();
+ if (imm != null) {
+ // Since the text has changed, do not allow the IME to replace the
+ // existing text as though it were a completion.
+ imm.restartInput(WebView.this);
+ }
+ }
}
+ private class PastePopupWindow extends PopupWindow implements OnClickListener {
+ private ViewGroup mContentView;
+ private TextView mPasteTextView;
+
+ public PastePopupWindow() {
+ super(WebView.this.mContext, null,
+ com.android.internal.R.attr.textSelectHandleWindowStyle);
+ setClippingEnabled(true);
+ LinearLayout linearLayout = new LinearLayout(WebView.this.getContext());
+ linearLayout.setOrientation(LinearLayout.HORIZONTAL);
+ mContentView = linearLayout;
+ mContentView.setBackgroundResource(
+ com.android.internal.R.drawable.text_edit_paste_window);
+
+ LayoutInflater inflater = (LayoutInflater)WebView.this.mContext.
+ getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+
+ ViewGroup.LayoutParams wrapContent = new ViewGroup.LayoutParams(
+ ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+
+ mPasteTextView = (TextView) inflater.inflate(
+ com.android.internal.R.layout.text_edit_action_popup_text, null);
+ mPasteTextView.setLayoutParams(wrapContent);
+ mContentView.addView(mPasteTextView);
+ mPasteTextView.setText(com.android.internal.R.string.paste);
+ mPasteTextView.setOnClickListener(this);
+ this.setContentView(mContentView);
+ }
+
+ public void show(Rect cursorRect, int windowLeft, int windowTop) {
+ measureContent();
+
+ int width = mContentView.getMeasuredWidth();
+ int height = mContentView.getMeasuredHeight();
+ int y = cursorRect.top - height;
+ if (y < windowTop) {
+ // There's not enough room vertically, move it below the
+ // handle.
+ // The selection handle is vertically offset by 1/4 of the
+ // line height.
+ y = cursorRect.bottom - (cursorRect.height() / 4) +
+ mSelectHandleCenter.getIntrinsicHeight();
+ }
+ int x = cursorRect.centerX() - (width / 2);
+ if (x < windowLeft) {
+ x = windowLeft;
+ }
+ if (!isShowing()) {
+ showAtLocation(WebView.this, Gravity.NO_GRAVITY, x, y);
+ }
+ update(x, y, width, height);
+ }
+
+ public void hide() {
+ dismiss();
+ }
+
+ @Override
+ public void onClick(View view) {
+ pasteFromClipboard();
+ selectionDone();
+ }
+
+ protected void measureContent() {
+ final DisplayMetrics displayMetrics = mContext.getResources().getDisplayMetrics();
+ mContentView.measure(
+ View.MeasureSpec.makeMeasureSpec(displayMetrics.widthPixels,
+ View.MeasureSpec.AT_MOST),
+ View.MeasureSpec.makeMeasureSpec(displayMetrics.heightPixels,
+ View.MeasureSpec.AT_MOST));
+ }
+ }
// The listener to capture global layout change event.
private InnerGlobalLayoutListener mGlobalLayoutListener = null;
@@ -636,6 +790,7 @@ public class WebView extends AbsoluteLayout
private boolean mGLViewportEmpty = false;
WebViewInputConnection mInputConnection = null;
private int mFieldPointer;
+ private PastePopupWindow mPasteWindow;
/**
* Transportation object for returning WebView across thread boundaries.
@@ -688,6 +843,11 @@ public class WebView extends AbsoluteLayout
if (DebugFlags.WEB_VIEW) {
Log.d("WebView", "onTrimMemory: " + level);
}
+ // When framework reset EGL context during high memory pressure, all
+ // the existing GL resources for the html5 video will be destroyed
+ // at native side.
+ // Here we just need to clean up the Surface Texture which is static.
+ HTML5VideoInline.cleanupSurfaceTexture();
WebView.nativeOnTrimMemory(level);
}
@@ -3018,7 +3178,7 @@ public class WebView extends AbsoluteLayout
return;
}
if (nativeHasCursorNode()) {
- Rect cursorBounds = nativeGetCursorRingBounds();
+ Rect cursorBounds = cursorRingBounds();
if (!cursorBounds.contains(contentX, contentY)) {
int slop = viewToContentDimension(mNavSlop);
cursorBounds.inset(-slop, -slop);
@@ -5219,7 +5379,11 @@ public class WebView extends AbsoluteLayout
}
}
+ // TODO: Remove this
WebViewCore.CursorData cursorData() {
+ if (sDisableNavcache) {
+ return new WebViewCore.CursorData(0, 0, 0, 0);
+ }
WebViewCore.CursorData result = cursorDataNoPosition();
Point position = nativeCursorPosition();
result.mX = position.x;
@@ -5910,6 +6074,27 @@ public class WebView extends AbsoluteLayout
return true;
}
+ private void showPasteWindow() {
+ ClipboardManager cm = (ClipboardManager)(mContext
+ .getSystemService(Context.CLIPBOARD_SERVICE));
+ if (cm.hasPrimaryClip()) {
+ Rect cursorRect = contentToViewRect(mSelectCursorBase);
+ int[] location = new int[2];
+ getLocationInWindow(location);
+ cursorRect.offset(location[0] - mScrollX, location[1] - mScrollY);
+ if (mPasteWindow == null) {
+ mPasteWindow = new PastePopupWindow();
+ }
+ mPasteWindow.show(cursorRect, location[0], location[1]);
+ }
+ }
+
+ private void hidePasteButton() {
+ if (mPasteWindow != null) {
+ mPasteWindow.hide();
+ }
+ }
+
private void syncSelectionCursors() {
mSelectCursorBaseLayerId =
nativeGetHandleLayerId(mNativeClass, HANDLE_ID_BASE, mSelectCursorBase);
@@ -5919,13 +6104,11 @@ public class WebView extends AbsoluteLayout
private boolean setupWebkitSelect() {
syncSelectionCursors();
- ClipboardManager cm = (ClipboardManager)(mContext
- .getSystemService(Context.CLIPBOARD_SERVICE));
- if (!mIsCaretSelection || cm.hasPrimaryClip()) {
- if (!startSelectActionMode()) {
- selectionDone();
- return false;
- }
+ if (mIsCaretSelection) {
+ showPasteWindow();
+ } else if (!startSelectActionMode()) {
+ selectionDone();
+ return false;
}
mSelectingText = true;
mTouchMode = TOUCH_DRAG_MODE;
@@ -5982,6 +6165,7 @@ public class WebView extends AbsoluteLayout
*/
void selectionDone() {
if (mSelectingText) {
+ hidePasteButton();
mSelectingText = false;
// finish is idempotent, so this is fine even if selectionDone was
// called by mSelectCallback.onDestroyActionMode
@@ -6051,12 +6235,8 @@ public class WebView extends AbsoluteLayout
if (clipData != null) {
ClipData.Item clipItem = clipData.getItemAt(0);
CharSequence pasteText = clipItem.getText();
- if (pasteText != null) {
- int[] handles = new int[4];
- getSelectionHandles(handles);
- mWebViewCore.sendMessage(EventHub.DELETE_TEXT, handles);
- mWebViewCore.sendMessage(EventHub.INSERT_TEXT,
- pasteText.toString());
+ if (mInputConnection != null) {
+ mInputConnection.replaceSelection(pasteText);
}
}
}
@@ -6614,6 +6794,7 @@ public class WebView extends AbsoluteLayout
mSelectionStarted = true;
mSelectDraggingCursor = mSelectCursorBase;
mPrivateHandler.removeMessages(CLEAR_CARET_HANDLE);
+ hidePasteButton();
} else if (mSelectHandleLeft != null
&& mSelectHandleLeft.getBounds()
.contains(shiftedX, shiftedY)) {
@@ -7276,10 +7457,11 @@ public class WebView extends AbsoluteLayout
if (mSelectingText) {
mSelectionStarted = false;
+ syncSelectionCursors();
if (mIsCaretSelection) {
resetCaretTimer();
+ showPasteWindow();
}
- syncSelectionCursors();
invalidate();
}
}
@@ -7397,7 +7579,7 @@ public class WebView extends AbsoluteLayout
return false;
}
if (time - mLastCursorTime <= TRACKBALL_TIMEOUT
- && !mLastCursorBounds.equals(nativeGetCursorRingBounds())) {
+ && !mLastCursorBounds.equals(cursorRingBounds())) {
nativeSelectBestAt(mLastCursorBounds);
}
if (DebugFlags.WEB_VIEW) {
@@ -9977,7 +10159,7 @@ public class WebView extends AbsoluteLayout
}
mInitialHitTestResult = null;
mLastCursorTime = time;
- mLastCursorBounds = nativeGetCursorRingBounds();
+ mLastCursorBounds = cursorRingBounds();
boolean keyHandled
= nativeMoveCursor(keyCode, count, noScroll) == false;
if (DebugFlags.WEB_VIEW) {
@@ -9988,7 +10170,7 @@ public class WebView extends AbsoluteLayout
if (keyHandled == false) {
return keyHandled;
}
- Rect contentCursorRingBounds = nativeGetCursorRingBounds();
+ Rect contentCursorRingBounds = cursorRingBounds();
if (contentCursorRingBounds.isEmpty()) return keyHandled;
Rect viewCursorRingBounds = contentToViewRect(contentCursorRingBounds);
// set last touch so that context menu related functions will work
@@ -10202,6 +10384,14 @@ public class WebView extends AbsoluteLayout
return isEditable;
}
+ // TODO: Remove this
+ Rect cursorRingBounds() {
+ if (sDisableNavcache) {
+ return new Rect();
+ }
+ return nativeGetCursorRingBounds();
+ }
+
private native int nativeCacheHitFramePointer();
private native boolean nativeCacheHitIsPlugin();
private native Rect nativeCacheHitNodeBounds();
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index e7da1a8..93fd92b 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -923,13 +923,14 @@ public final class WebViewCore {
static class TextFieldInitData {
public TextFieldInitData(int fieldPointer,
String text, int type, boolean isSpellCheckEnabled,
- boolean isTextFieldNext, String label) {
+ boolean isTextFieldNext, String label, int maxLength) {
mFieldPointer = fieldPointer;
mText = text;
mType = type;
mIsSpellCheckEnabled = isSpellCheckEnabled;
mIsTextFieldNext = isTextFieldNext;
mLabel = label;
+ mMaxLength = maxLength;
}
int mFieldPointer;
String mText;
@@ -937,6 +938,7 @@ public final class WebViewCore {
boolean mIsSpellCheckEnabled;
boolean mIsTextFieldNext;
String mLabel;
+ int mMaxLength;
}
// mAction of TouchEventData can be MotionEvent.getAction() which uses the
@@ -2826,12 +2828,13 @@ public final class WebViewCore {
// called by JNI
private void initEditField(int pointer, String text, int inputType,
boolean isSpellCheckEnabled, boolean nextFieldIsText,
- String label, int start, int end, int selectionPtr) {
+ String label, int start, int end, int selectionPtr, int maxLength) {
if (mWebView == null) {
return;
}
TextFieldInitData initData = new TextFieldInitData(pointer,
- text, inputType, isSpellCheckEnabled, nextFieldIsText, label);
+ text, inputType, isSpellCheckEnabled, nextFieldIsText, label,
+ maxLength);
Message.obtain(mWebView.mPrivateHandler,
WebView.INIT_EDIT_FIELD, initData).sendToTarget();
Message.obtain(mWebView.mPrivateHandler,
diff --git a/core/java/android/widget/NumberPicker.java b/core/java/android/widget/NumberPicker.java
index 84e86af..6405ee9 100644
--- a/core/java/android/widget/NumberPicker.java
+++ b/core/java/android/widget/NumberPicker.java
@@ -49,6 +49,7 @@ import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.animation.DecelerateInterpolator;
+import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import com.android.internal.R;
@@ -373,9 +374,9 @@ public class NumberPicker extends LinearLayout {
private float mLastMotionEventY;
/**
- * Flag if to begin edit on next up event.
+ * Flag if to check for double tap and potentially start edit.
*/
- private boolean mBeginEditOnUpEvent;
+ private boolean mCheckBeginEditOnUpEvent;
/**
* Flag if to adjust the selector wheel on next up event.
@@ -453,6 +454,11 @@ public class NumberPicker extends LinearLayout {
private boolean mScrollWheelAndFadingEdgesInitialized;
/**
+ * The time of the last up event.
+ */
+ private long mLastUpEventTimeMillis;
+
+ /**
* Interface to listen for changes of the current value.
*/
public interface OnValueChangeListener {
@@ -628,10 +634,6 @@ public class NumberPicker extends LinearLayout {
public void onFocusChange(View v, boolean hasFocus) {
if (hasFocus) {
mInputText.selectAll();
- InputMethodManager inputMethodManager = InputMethodManager.peekInstance();
- if (inputMethodManager != null) {
- inputMethodManager.showSoftInput(mInputText, 0);
- }
} else {
mInputText.setSelection(0, 0);
validateInputTextView(v);
@@ -643,6 +645,7 @@ public class NumberPicker extends LinearLayout {
});
mInputText.setRawInputType(InputType.TYPE_CLASS_NUMBER);
+ mInputText.setImeOptions(EditorInfo.IME_ACTION_DONE);
// initialize constants
mTouchSlop = ViewConfiguration.getTapTimeout();
@@ -777,7 +780,7 @@ public class NumberPicker extends LinearLayout {
removeAllCallbacks();
mShowInputControlsAnimator.cancel();
mDimSelectorWheelAnimator.cancel();
- mBeginEditOnUpEvent = false;
+ mCheckBeginEditOnUpEvent = false;
mAdjustScrollerOnUpEvent = true;
if (mSelectorWheelState == SELECTOR_WHEEL_STATE_LARGE) {
mSelectorWheelPaint.setAlpha(SELECTOR_WHEEL_BRIGHT_ALPHA);
@@ -788,7 +791,7 @@ public class NumberPicker extends LinearLayout {
mAdjustScroller.forceFinished(true);
onScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE);
}
- mBeginEditOnUpEvent = scrollersFinished;
+ mCheckBeginEditOnUpEvent = scrollersFinished;
mAdjustScrollerOnUpEvent = true;
hideSoftInput();
hideInputControls();
@@ -807,7 +810,7 @@ public class NumberPicker extends LinearLayout {
float currentMoveY = event.getY();
int deltaDownY = (int) Math.abs(currentMoveY - mLastDownEventY);
if (deltaDownY > mTouchSlop) {
- mBeginEditOnUpEvent = false;
+ mCheckBeginEditOnUpEvent = false;
onScrollStateChange(OnScrollListener.SCROLL_STATE_TOUCH_SCROLL);
setSelectorWheelState(SELECTOR_WHEEL_STATE_LARGE);
hideSoftInput();
@@ -832,11 +835,11 @@ public class NumberPicker extends LinearLayout {
switch (action) {
case MotionEvent.ACTION_MOVE:
float currentMoveY = ev.getY();
- if (mBeginEditOnUpEvent
+ if (mCheckBeginEditOnUpEvent
|| mScrollState != OnScrollListener.SCROLL_STATE_TOUCH_SCROLL) {
int deltaDownY = (int) Math.abs(currentMoveY - mLastDownEventY);
if (deltaDownY > mTouchSlop) {
- mBeginEditOnUpEvent = false;
+ mCheckBeginEditOnUpEvent = false;
onScrollStateChange(OnScrollListener.SCROLL_STATE_TOUCH_SCROLL);
}
}
@@ -846,11 +849,20 @@ public class NumberPicker extends LinearLayout {
mLastMotionEventY = currentMoveY;
break;
case MotionEvent.ACTION_UP:
- if (mBeginEditOnUpEvent) {
- setSelectorWheelState(SELECTOR_WHEEL_STATE_SMALL);
- showInputControls(mShowInputControlsAnimimationDuration);
- mInputText.requestFocus();
- return true;
+ if (mCheckBeginEditOnUpEvent) {
+ mCheckBeginEditOnUpEvent = false;
+ final long deltaTapTimeMillis = ev.getEventTime() - mLastUpEventTimeMillis;
+ if (deltaTapTimeMillis < ViewConfiguration.getDoubleTapTimeout()) {
+ setSelectorWheelState(SELECTOR_WHEEL_STATE_SMALL);
+ showInputControls(mShowInputControlsAnimimationDuration);
+ mInputText.requestFocus();
+ InputMethodManager inputMethodManager = InputMethodManager.peekInstance();
+ if (inputMethodManager != null) {
+ inputMethodManager.showSoftInput(mInputText, 0);
+ }
+ mLastUpEventTimeMillis = ev.getEventTime();
+ return true;
+ }
}
VelocityTracker velocityTracker = mVelocityTracker;
velocityTracker.computeCurrentVelocity(1000, mMaximumFlingVelocity);
@@ -869,6 +881,7 @@ public class NumberPicker extends LinearLayout {
}
mVelocityTracker.recycle();
mVelocityTracker = null;
+ mLastUpEventTimeMillis = ev.getEventTime();
break;
}
return true;
@@ -2017,4 +2030,22 @@ public class NumberPicker extends LinearLayout {
postDelayed(this, mLongPressUpdateInterval);
}
}
+
+ /**
+ * @hide
+ */
+ public static class CustomEditText extends EditText {
+
+ public CustomEditText(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ @Override
+ public void onEditorAction(int actionCode) {
+ super.onEditorAction(actionCode);
+ if (actionCode == EditorInfo.IME_ACTION_DONE) {
+ clearFocus();
+ }
+ }
+ }
}
diff --git a/core/java/android/widget/SpellChecker.java b/core/java/android/widget/SpellChecker.java
index a1cf205..df2996c 100644
--- a/core/java/android/widget/SpellChecker.java
+++ b/core/java/android/widget/SpellChecker.java
@@ -57,9 +57,14 @@ public class SpellChecker implements SpellCheckerSessionListener {
// Pause between each spell check to keep the UI smooth
private final static int SPELL_PAUSE_DURATION = 400; // milliseconds
+ private static final int USE_SPAN_RANGE = -1;
+
private final TextView mTextView;
SpellCheckerSession mSpellCheckerSession;
+ // We assume that the sentence level spell check will always provide better results than words.
+ // Although word SC has a sequential option.
+ private boolean mIsSentenceSpellCheckSupported;
final int mCookie;
// Paired arrays for the (id, spellCheckSpan) pair. A negative id means the associated
@@ -111,6 +116,7 @@ public class SpellChecker implements SpellCheckerSessionListener {
null /* Bundle not currently used by the textServicesManager */,
mCurrentLocale, this,
false /* means any available languages from current spell checker */);
+ mIsSentenceSpellCheckSupported = mSpellCheckerSession.isSentenceSpellCheckSupported();
}
// Restore SpellCheckSpans in pool
@@ -272,46 +278,80 @@ public class SpellChecker implements SpellCheckerSessionListener {
textInfos = textInfosCopy;
}
- mSpellCheckerSession.getSuggestions(textInfos, SuggestionSpan.SUGGESTIONS_MAX_SIZE,
- false /* TODO Set sequentialWords to true for initial spell check */);
+ if (mIsSentenceSpellCheckSupported) {
+ mSpellCheckerSession.getSentenceSuggestions(
+ textInfos, SuggestionSpan.SUGGESTIONS_MAX_SIZE);
+ } else {
+ mSpellCheckerSession.getSuggestions(textInfos, SuggestionSpan.SUGGESTIONS_MAX_SIZE,
+ false /* TODO Set sequentialWords to true for initial spell check */);
+ }
}
}
- @Override
- public void onGetSentenceSuggestions(SentenceSuggestionsInfo[] results) {
- // TODO: Handle the position and length for each suggestion
- // do nothing for now
+ private SpellCheckSpan onGetSuggestionsInternal(
+ SuggestionsInfo suggestionsInfo, int offset, int length) {
+ if (suggestionsInfo.getCookie() != mCookie) {
+ return null;
+ }
+ final Editable editable = (Editable) mTextView.getText();
+ final int sequenceNumber = suggestionsInfo.getSequence();
+ for (int k = 0; k < mLength; ++k) {
+ if (sequenceNumber == mIds[k]) {
+ final int attributes = suggestionsInfo.getSuggestionsAttributes();
+ final boolean isInDictionary =
+ ((attributes & SuggestionsInfo.RESULT_ATTR_IN_THE_DICTIONARY) > 0);
+ final boolean looksLikeTypo =
+ ((attributes & SuggestionsInfo.RESULT_ATTR_LOOKS_LIKE_TYPO) > 0);
+
+ final SpellCheckSpan spellCheckSpan = mSpellCheckSpans[k];
+ //TODO: we need to change that rule for results from a sentence-level spell
+ // checker that will probably be in dictionary.
+ if (!isInDictionary && looksLikeTypo) {
+ createMisspelledSuggestionSpan(
+ editable, suggestionsInfo, spellCheckSpan, offset, length);
+ }
+ return spellCheckSpan;
+ }
+ }
+ return null;
}
@Override
public void onGetSuggestions(SuggestionsInfo[] results) {
- Editable editable = (Editable) mTextView.getText();
-
- for (int i = 0; i < results.length; i++) {
- SuggestionsInfo suggestionsInfo = results[i];
- if (suggestionsInfo.getCookie() != mCookie) continue;
- final int sequenceNumber = suggestionsInfo.getSequence();
-
- for (int j = 0; j < mLength; j++) {
- if (sequenceNumber == mIds[j]) {
- final int attributes = suggestionsInfo.getSuggestionsAttributes();
- boolean isInDictionary =
- ((attributes & SuggestionsInfo.RESULT_ATTR_IN_THE_DICTIONARY) > 0);
- boolean looksLikeTypo =
- ((attributes & SuggestionsInfo.RESULT_ATTR_LOOKS_LIKE_TYPO) > 0);
-
- SpellCheckSpan spellCheckSpan = mSpellCheckSpans[j];
-
- if (!isInDictionary && looksLikeTypo) {
- createMisspelledSuggestionSpan(editable, suggestionsInfo, spellCheckSpan);
- }
+ final Editable editable = (Editable) mTextView.getText();
+ for (int i = 0; i < results.length; ++i) {
+ final SpellCheckSpan spellCheckSpan =
+ onGetSuggestionsInternal(results[i], USE_SPAN_RANGE, USE_SPAN_RANGE);
+ if (spellCheckSpan != null) {
+ editable.removeSpan(spellCheckSpan);
+ }
+ }
+ scheduleNewSpellCheck();
+ }
- editable.removeSpan(spellCheckSpan);
- break;
+ @Override
+ public void onGetSentenceSuggestions(SentenceSuggestionsInfo[] results) {
+ final Editable editable = (Editable) mTextView.getText();
+
+ for (int i = 0; i < results.length; ++i) {
+ final SentenceSuggestionsInfo ssi = results[i];
+ SpellCheckSpan spellCheckSpan = null;
+ for (int j = 0; j < ssi.getSuggestionsCount(); ++j) {
+ final SuggestionsInfo suggestionsInfo = ssi.getSuggestionsInfoAt(j);
+ final int offset = ssi.getOffsetAt(j);
+ final int length = ssi.getLengthAt(j);
+ final SpellCheckSpan scs = onGetSuggestionsInternal(
+ suggestionsInfo, offset, length);
+ if (spellCheckSpan == null && scs != null) {
+ // the spellCheckSpan is shared by all the "SuggestionsInfo"s in the same
+ // SentenceSuggestionsInfo
+ spellCheckSpan = scs;
}
}
+ if (spellCheckSpan != null) {
+ editable.removeSpan(spellCheckSpan);
+ }
}
-
scheduleNewSpellCheck();
}
@@ -338,10 +378,11 @@ public class SpellChecker implements SpellCheckerSessionListener {
}
private void createMisspelledSuggestionSpan(Editable editable, SuggestionsInfo suggestionsInfo,
- SpellCheckSpan spellCheckSpan) {
- final int start = editable.getSpanStart(spellCheckSpan);
- final int end = editable.getSpanEnd(spellCheckSpan);
- if (start < 0 || end <= start) return; // span was removed in the meantime
+ SpellCheckSpan spellCheckSpan, int offset, int length) {
+ final int spellCheckSpanStart = editable.getSpanStart(spellCheckSpan);
+ final int spellCheckSpanEnd = editable.getSpanEnd(spellCheckSpan);
+ if (spellCheckSpanStart < 0 || spellCheckSpanEnd <= spellCheckSpanStart)
+ return; // span was removed in the meantime
final int suggestionsCount = suggestionsInfo.getSuggestionsCount();
if (suggestionsCount <= 0) {
@@ -349,6 +390,16 @@ public class SpellChecker implements SpellCheckerSessionListener {
return;
}
+ final int start;
+ final int end;
+ if (offset != USE_SPAN_RANGE && length != USE_SPAN_RANGE) {
+ start = spellCheckSpanStart + offset;
+ end = start + length;
+ } else {
+ start = spellCheckSpanStart;
+ end = spellCheckSpanEnd;
+ }
+
String[] suggestions = new String[suggestionsCount];
for (int i = 0; i < suggestionsCount; i++) {
suggestions[i] = suggestionsInfo.getSuggestionAt(i);
@@ -419,67 +470,97 @@ public class SpellChecker implements SpellCheckerSessionListener {
int wordCount = 0;
boolean scheduleOtherSpellCheck = false;
- while (wordStart <= end) {
- if (wordEnd >= start && wordEnd > wordStart) {
- if (wordCount >= MAX_NUMBER_OF_WORDS) {
- scheduleOtherSpellCheck = true;
- break;
- }
-
- // A new word has been created across the interval boundaries with this edit.
- // The previous spans (that ended on start / started on end) are not valid
- // anymore and must be removed.
- if (wordStart < start && wordEnd > start) {
- removeSpansAt(editable, start, spellCheckSpans);
- removeSpansAt(editable, start, suggestionSpans);
- }
+ if (mIsSentenceSpellCheckSupported) {
+ int regionEnd;
+ if (wordIteratorWindowEnd < end) {
+ // Several batches needed on that region. Cut after last previous word
+ regionEnd = mWordIterator.preceding(wordIteratorWindowEnd);
+ scheduleOtherSpellCheck = true;
+ } else {
+ regionEnd = mWordIterator.preceding(end);
+ }
+ boolean correct = regionEnd != BreakIterator.DONE;
+ if (correct) {
+ regionEnd = mWordIterator.getEnd(regionEnd);
+ correct = regionEnd != BreakIterator.DONE;
+ }
+ if (!correct) {
+ editable.removeSpan(mRange);
+ return;
+ }
+ wordStart = regionEnd;
+ // TODO: Find the start position of the sentence.
+ // Set span with the context
+ final int spellCheckStart = Math.min(
+ start, Math.max(wordStart, regionEnd - WORD_ITERATOR_INTERVAL));
+ if (regionEnd <= spellCheckStart) {
+ return;
+ }
+ addSpellCheckSpan(editable, spellCheckStart, regionEnd);
+ } else {
+ while (wordStart <= end) {
+ if (wordEnd >= start && wordEnd > wordStart) {
+ if (wordCount >= MAX_NUMBER_OF_WORDS) {
+ scheduleOtherSpellCheck = true;
+ break;
+ }
+ // A new word has been created across the interval boundaries with this
+ // edit. The previous spans (that ended on start / started on end) are
+ // not valid anymore and must be removed.
+ if (wordStart < start && wordEnd > start) {
+ removeSpansAt(editable, start, spellCheckSpans);
+ removeSpansAt(editable, start, suggestionSpans);
+ }
- if (wordStart < end && wordEnd > end) {
- removeSpansAt(editable, end, spellCheckSpans);
- removeSpansAt(editable, end, suggestionSpans);
- }
+ if (wordStart < end && wordEnd > end) {
+ removeSpansAt(editable, end, spellCheckSpans);
+ removeSpansAt(editable, end, suggestionSpans);
+ }
- // Do not create new boundary spans if they already exist
- boolean createSpellCheckSpan = true;
- if (wordEnd == start) {
- for (int i = 0; i < spellCheckSpans.length; i++) {
- final int spanEnd = editable.getSpanEnd(spellCheckSpans[i]);
- if (spanEnd == start) {
- createSpellCheckSpan = false;
- break;
+ // Do not create new boundary spans if they already exist
+ boolean createSpellCheckSpan = true;
+ if (wordEnd == start) {
+ for (int i = 0; i < spellCheckSpans.length; i++) {
+ final int spanEnd = editable.getSpanEnd(spellCheckSpans[i]);
+ if (spanEnd == start) {
+ createSpellCheckSpan = false;
+ break;
+ }
}
}
- }
- if (wordStart == end) {
- for (int i = 0; i < spellCheckSpans.length; i++) {
- final int spanStart = editable.getSpanStart(spellCheckSpans[i]);
- if (spanStart == end) {
- createSpellCheckSpan = false;
- break;
+ if (wordStart == end) {
+ for (int i = 0; i < spellCheckSpans.length; i++) {
+ final int spanStart = editable.getSpanStart(spellCheckSpans[i]);
+ if (spanStart == end) {
+ createSpellCheckSpan = false;
+ break;
+ }
}
}
- }
- if (createSpellCheckSpan) {
- addSpellCheckSpan(editable, wordStart, wordEnd);
+ if (createSpellCheckSpan) {
+ addSpellCheckSpan(editable, wordStart, wordEnd);
+ }
+ wordCount++;
}
- wordCount++;
- }
- // iterate word by word
- int originalWordEnd = wordEnd;
- wordEnd = mWordIterator.following(wordEnd);
- if ((wordIteratorWindowEnd < end) &&
- (wordEnd == BreakIterator.DONE || wordEnd >= wordIteratorWindowEnd)) {
- wordIteratorWindowEnd = Math.min(end, originalWordEnd + WORD_ITERATOR_INTERVAL);
- mWordIterator.setCharSequence(editable, originalWordEnd, wordIteratorWindowEnd);
- wordEnd = mWordIterator.following(originalWordEnd);
- }
- if (wordEnd == BreakIterator.DONE) break;
- wordStart = mWordIterator.getBeginning(wordEnd);
- if (wordStart == BreakIterator.DONE) {
- break;
+ // iterate word by word
+ int originalWordEnd = wordEnd;
+ wordEnd = mWordIterator.following(wordEnd);
+ if ((wordIteratorWindowEnd < end) &&
+ (wordEnd == BreakIterator.DONE || wordEnd >= wordIteratorWindowEnd)) {
+ wordIteratorWindowEnd =
+ Math.min(end, originalWordEnd + WORD_ITERATOR_INTERVAL);
+ mWordIterator.setCharSequence(
+ editable, originalWordEnd, wordIteratorWindowEnd);
+ wordEnd = mWordIterator.following(originalWordEnd);
+ }
+ if (wordEnd == BreakIterator.DONE) break;
+ wordStart = mWordIterator.getBeginning(wordEnd);
+ if (wordStart == BreakIterator.DONE) {
+ break;
+ }
}
}
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index d6dd15e..385c7c7 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -243,10 +243,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
private static final int SIGNED = 2;
private static final int DECIMAL = 4;
- private static enum TEXT_ALIGN {
- INHERIT, GRAVITY, TEXT_START, TEXT_END, CENTER, VIEW_START, VIEW_END;
- }
-
/**
* Draw marquee text with fading edges as usual
*/
@@ -329,9 +325,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
// The alignment to pass to Layout, or null if not resolved.
private Layout.Alignment mLayoutAlignment;
- // The default value for mTextAlign.
- private TEXT_ALIGN mTextAlign = TEXT_ALIGN.INHERIT;
-
private boolean mResolvedDrawables;
/**
@@ -406,9 +399,15 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
private InputFilter[] mFilters = NO_FILTERS;
+ // It is possible to have a selection even when mEditor is null (programmatically set, like when
+ // a link is pressed). These highlight-related fields do not go in mEditor.
+ private int mHighlightColor = 0x6633B5E5;
+ private Path mHighlightPath;
+ private final Paint mHighlightPaint;
+ private boolean mHighlightPathBogus = true;
+
// Although these fields are specific to editable text, they are not added to Editor because
// they are defined by the TextView's style and are theme-dependent.
- private int mHighlightColor = 0x6633B5E5;
private int mCursorDrawableRes;
// These four fields, could be moved to Editor, since we know their default values and we
// could condition the creation of the Editor to a non standard value. This is however
@@ -477,6 +476,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
mTextPaint.density = res.getDisplayMetrics().density;
mTextPaint.setCompatibilityScaling(compat.applicationScale);
+ mHighlightPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
+ mHighlightPaint.setCompatibilityScaling(compat.applicationScale);
+
mMovement = getDefaultMovementMethod();
mTransformation = null;
@@ -4064,7 +4066,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
private void invalidateCursorPath() {
- if (getEditor().mHighlightPathBogus) {
+ if (mHighlightPathBogus) {
invalidateCursor();
} else {
final int horizontalPadding = getCompoundPaddingLeft();
@@ -4088,7 +4090,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
thick /= 2.0f;
- getEditor().mHighlightPath.computeBounds(TEMP_RECTF, false);
+ // mHighlightPath is guaranteed to be non null at that point.
+ mHighlightPath.computeBounds(TEMP_RECTF, false);
invalidate((int) FloatMath.floor(horizontalPadding + TEMP_RECTF.left - thick),
(int) FloatMath.floor(verticalPadding + TEMP_RECTF.top - thick),
@@ -4150,7 +4153,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
int bottom = mLayout.getLineBottom(lineEnd);
- if (invalidateCursor) {
+ // mEditor can be null in case selection is set programmatically.
+ if (invalidateCursor && mEditor != null) {
for (int i = 0; i < getEditor().mCursorCount; i++) {
Rect bounds = getEditor().mCursorDrawable[i].getBounds();
top = Math.min(top, bounds.top);
@@ -4515,6 +4519,55 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
return drawableState;
}
+ private Path getUpdatedHighlightPath() {
+ Path highlight = null;
+ Paint highlightPaint = mHighlightPaint;
+
+ final int selStart = getSelectionStart();
+ final int selEnd = getSelectionEnd();
+ if (mMovement != null && (isFocused() || isPressed()) && selStart >= 0) {
+ if (selStart == selEnd) {
+ if (mEditor != null && isCursorVisible() &&
+ (SystemClock.uptimeMillis() - getEditor().mShowCursor) % (2 * BLINK) < BLINK) {
+ if (mHighlightPathBogus) {
+ if (mHighlightPath == null) mHighlightPath = new Path();
+ mHighlightPath.reset();
+ mLayout.getCursorPath(selStart, mHighlightPath, mText);
+ getEditor().updateCursorsPositions();
+ mHighlightPathBogus = false;
+ }
+
+ // XXX should pass to skin instead of drawing directly
+ highlightPaint.setColor(mCurTextColor);
+ if (mCurrentAlpha != 255) {
+ highlightPaint.setAlpha(
+ (mCurrentAlpha * Color.alpha(mCurTextColor)) / 255);
+ }
+ highlightPaint.setStyle(Paint.Style.STROKE);
+ highlight = mHighlightPath;
+ }
+ } else {
+ if (mHighlightPathBogus) {
+ if (mHighlightPath == null) mHighlightPath = new Path();
+ mHighlightPath.reset();
+ mLayout.getSelectionPath(selStart, selEnd, mHighlightPath);
+ mHighlightPathBogus = false;
+ }
+
+ // XXX should pass to skin instead of drawing directly
+ highlightPaint.setColor(mHighlightColor);
+ if (mCurrentAlpha != 255) {
+ highlightPaint.setAlpha(
+ (mCurrentAlpha * Color.alpha(mHighlightColor)) / 255);
+ }
+ highlightPaint.setStyle(Paint.Style.FILL);
+
+ highlight = mHighlightPath;
+ }
+ }
+ return highlight;
+ }
+
@Override
protected void onDraw(Canvas canvas) {
if (mCurrentAlpha <= ViewConfiguration.ALPHA_THRESHOLD_INT) return;
@@ -4666,68 +4719,21 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
final int cursorOffsetVertical = voffsetCursor - voffsetText;
+ Path highlight = getUpdatedHighlightPath();
if (mEditor != null) {
- getEditor().onDraw(canvas, layout, cursorOffsetVertical);
+ getEditor().onDraw(canvas, layout, highlight, cursorOffsetVertical);
} else {
- layout.draw(canvas, null, null, cursorOffsetVertical);
+ layout.draw(canvas, highlight, mHighlightPaint, cursorOffsetVertical);
if (mMarquee != null && mMarquee.shouldDrawGhost()) {
canvas.translate((int) mMarquee.getGhostOffset(), 0.0f);
- layout.draw(canvas, null, null, cursorOffsetVertical);
+ layout.draw(canvas, highlight, mHighlightPaint, cursorOffsetVertical);
}
}
canvas.restore();
}
- private void updateCursorsPositions() {
- if (mCursorDrawableRes == 0) {
- getEditor().mCursorCount = 0;
- return;
- }
-
- final int offset = getSelectionStart();
- final int line = mLayout.getLineForOffset(offset);
- final int top = mLayout.getLineTop(line);
- final int bottom = mLayout.getLineTop(line + 1);
-
- getEditor().mCursorCount = mLayout.isLevelBoundary(offset) ? 2 : 1;
-
- int middle = bottom;
- if (getEditor().mCursorCount == 2) {
- // Similar to what is done in {@link Layout.#getCursorPath(int, Path, CharSequence)}
- middle = (top + bottom) >> 1;
- }
-
- updateCursorPosition(0, top, middle, mLayout.getPrimaryHorizontal(offset));
-
- if (getEditor().mCursorCount == 2) {
- updateCursorPosition(1, middle, bottom, mLayout.getSecondaryHorizontal(offset));
- }
- }
-
- private void updateCursorPosition(int cursorIndex, int top, int bottom, float horizontal) {
- if (getEditor().mCursorDrawable[cursorIndex] == null)
- getEditor().mCursorDrawable[cursorIndex] = mContext.getResources().getDrawable(mCursorDrawableRes);
-
- if (mTempRect == null) mTempRect = new Rect();
- getEditor().mCursorDrawable[cursorIndex].getPadding(mTempRect);
- final int width = getEditor().mCursorDrawable[cursorIndex].getIntrinsicWidth();
- horizontal = Math.max(0.5f, horizontal - 0.5f);
- final int left = (int) (horizontal) - mTempRect.left;
- getEditor().mCursorDrawable[cursorIndex].setBounds(left, top - mTempRect.top, left + width,
- bottom + mTempRect.bottom);
- }
-
- private void drawCursor(Canvas canvas, int cursorOffsetVertical) {
- final boolean translate = cursorOffsetVertical != 0;
- if (translate) canvas.translate(0, cursorOffsetVertical);
- for (int i = 0; i < getEditor().mCursorCount; i++) {
- getEditor().mCursorDrawable[i].draw(canvas);
- }
- if (translate) canvas.translate(0, -cursorOffsetVertical);
- }
-
@Override
public void getFocusedRect(Rect r) {
if (mLayout == null) {
@@ -4759,21 +4765,16 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
} else {
// Selection extends across multiple lines -- make the focused
// rect cover the entire width.
- if (mEditor != null) {
- if (getEditor().mHighlightPath == null) getEditor().mHighlightPath = new Path();
- if (getEditor().mHighlightPathBogus) {
- getEditor().mHighlightPath.reset();
- mLayout.getSelectionPath(selStart, selEnd, getEditor().mHighlightPath);
- getEditor().mHighlightPathBogus = false;
- }
- synchronized (TEMP_RECTF) {
- getEditor().mHighlightPath.computeBounds(TEMP_RECTF, true);
- r.left = (int)TEMP_RECTF.left-1;
- r.right = (int)TEMP_RECTF.right+1;
- }
- } else {
- r.left = 0;
- r.right = getMeasuredWidth();
+ if (mHighlightPathBogus) {
+ if (mHighlightPath == null) mHighlightPath = new Path();
+ mHighlightPath.reset();
+ mLayout.getSelectionPath(selStart, selEnd, mHighlightPath);
+ mHighlightPathBogus = false;
+ }
+ synchronized (TEMP_RECTF) {
+ mHighlightPath.computeBounds(TEMP_RECTF, true);
+ r.left = (int)TEMP_RECTF.left-1;
+ r.right = (int)TEMP_RECTF.right+1;
}
}
}
@@ -5584,7 +5585,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
if (curs >= 0) {
- getEditor().mHighlightPathBogus = true;
+ mHighlightPathBogus = true;
makeBlink();
bringPointIntoView(curs);
}
@@ -5659,69 +5660,28 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
physicalWidth, false);
}
- @Override
- protected void resetResolvedLayoutDirection() {
- super.resetResolvedLayoutDirection();
-
- if (mLayoutAlignment != null &&
- (mTextAlign == TEXT_ALIGN.VIEW_START ||
- mTextAlign == TEXT_ALIGN.VIEW_END)) {
- mLayoutAlignment = null;
- }
- }
-
private Layout.Alignment getLayoutAlignment() {
if (mLayoutAlignment == null) {
- Layout.Alignment alignment;
- TEXT_ALIGN textAlign = mTextAlign;
- switch (textAlign) {
- case INHERIT:
- // fall through to gravity temporarily
- // intention is to inherit value through view hierarchy.
- case GRAVITY:
- switch (mGravity & Gravity.RELATIVE_HORIZONTAL_GRAVITY_MASK) {
- case Gravity.START:
- alignment = Layout.Alignment.ALIGN_NORMAL;
- break;
- case Gravity.END:
- alignment = Layout.Alignment.ALIGN_OPPOSITE;
- break;
- case Gravity.LEFT:
- alignment = Layout.Alignment.ALIGN_LEFT;
- break;
- case Gravity.RIGHT:
- alignment = Layout.Alignment.ALIGN_RIGHT;
- break;
- case Gravity.CENTER_HORIZONTAL:
- alignment = Layout.Alignment.ALIGN_CENTER;
- break;
- default:
- alignment = Layout.Alignment.ALIGN_NORMAL;
- break;
- }
+ switch (mGravity & Gravity.RELATIVE_HORIZONTAL_GRAVITY_MASK) {
+ case Gravity.START:
+ mLayoutAlignment = Layout.Alignment.ALIGN_NORMAL;
break;
- case TEXT_START:
- alignment = Layout.Alignment.ALIGN_NORMAL;
+ case Gravity.END:
+ mLayoutAlignment = Layout.Alignment.ALIGN_OPPOSITE;
break;
- case TEXT_END:
- alignment = Layout.Alignment.ALIGN_OPPOSITE;
+ case Gravity.LEFT:
+ mLayoutAlignment = Layout.Alignment.ALIGN_LEFT;
break;
- case CENTER:
- alignment = Layout.Alignment.ALIGN_CENTER;
+ case Gravity.RIGHT:
+ mLayoutAlignment = Layout.Alignment.ALIGN_RIGHT;
break;
- case VIEW_START:
- alignment = (getResolvedLayoutDirection() == LAYOUT_DIRECTION_RTL) ?
- Layout.Alignment.ALIGN_RIGHT : Layout.Alignment.ALIGN_LEFT;
- break;
- case VIEW_END:
- alignment = (getResolvedLayoutDirection() == LAYOUT_DIRECTION_RTL) ?
- Layout.Alignment.ALIGN_LEFT : Layout.Alignment.ALIGN_RIGHT;
+ case Gravity.CENTER_HORIZONTAL:
+ mLayoutAlignment = Layout.Alignment.ALIGN_CENTER;
break;
default:
- alignment = Layout.Alignment.ALIGN_NORMAL;
+ mLayoutAlignment = Layout.Alignment.ALIGN_NORMAL;
break;
}
- mLayoutAlignment = alignment;
}
return mLayoutAlignment;
}
@@ -5741,7 +5701,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
mOldMaximum = mMaximum;
mOldMaxMode = mMaxMode;
- if (mEditor != null) getEditor().mHighlightPathBogus = true;
+ mHighlightPathBogus = true;
if (wantWidth < 0) {
wantWidth = 0;
@@ -6036,7 +5996,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
if (des < 0) {
des = (int) FloatMath.ceil(Layout.getDesiredWidth(mTransformed, mTextPaint));
}
-
width = des;
} else {
width = boring.width;
@@ -6057,7 +6016,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
if (hintDes < 0) {
- hintBoring = BoringLayout.isBoring(mHint, mTextPaint, mHintBoring);
+ hintBoring = BoringLayout.isBoring(mHint, mTextPaint, mTextDir, mHintBoring);
if (hintBoring != null) {
mHintBoring = hintBoring;
}
@@ -6065,10 +6024,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
if (hintBoring == null || hintBoring == UNKNOWN_BORING) {
if (hintDes < 0) {
- hintDes = (int) FloatMath.ceil(
- Layout.getDesiredWidth(mHint, mTextPaint));
+ hintDes = (int) FloatMath.ceil(Layout.getDesiredWidth(mHint, mTextPaint));
}
-
hintWidth = hintDes;
} else {
hintWidth = hintBoring.width;
@@ -6332,20 +6289,25 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
if (changed && mEditor != null) getEditor().mTextDisplayListIsValid = false;
}
+ private boolean isShowingHint() {
+ return TextUtils.isEmpty(mText) && !TextUtils.isEmpty(mHint);
+ }
+
/**
* Returns true if anything changed.
*/
private boolean bringTextIntoView() {
+ Layout layout = isShowingHint() ? mHintLayout : mLayout;
int line = 0;
if ((mGravity & Gravity.VERTICAL_GRAVITY_MASK) == Gravity.BOTTOM) {
- line = mLayout.getLineCount() - 1;
+ line = layout.getLineCount() - 1;
}
- Layout.Alignment a = mLayout.getParagraphAlignment(line);
- int dir = mLayout.getParagraphDirection(line);
+ Layout.Alignment a = layout.getParagraphAlignment(line);
+ int dir = layout.getParagraphDirection(line);
int hspace = mRight - mLeft - getCompoundPaddingLeft() - getCompoundPaddingRight();
int vspace = mBottom - mTop - getExtendedPaddingTop() - getExtendedPaddingBottom();
- int ht = mLayout.getHeight();
+ int ht = layout.getHeight();
int scrollx, scrolly;
@@ -6364,8 +6326,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* keep leading edge in view.
*/
- int left = (int) FloatMath.floor(mLayout.getLineLeft(line));
- int right = (int) FloatMath.ceil(mLayout.getLineRight(line));
+ int left = (int) FloatMath.floor(layout.getLineLeft(line));
+ int right = (int) FloatMath.ceil(layout.getLineRight(line));
if (right - left < hspace) {
scrollx = (right + left) / 2 - hspace / 2;
@@ -6377,10 +6339,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
}
} else if (a == Layout.Alignment.ALIGN_RIGHT) {
- int right = (int) FloatMath.ceil(mLayout.getLineRight(line));
+ int right = (int) FloatMath.ceil(layout.getLineRight(line));
scrollx = right - hspace;
} else { // a == Layout.Alignment.ALIGN_LEFT (will also be the default)
- scrollx = (int) FloatMath.floor(mLayout.getLineLeft(line));
+ scrollx = (int) FloatMath.floor(layout.getLineLeft(line));
}
if (ht < vspace) {
@@ -6408,22 +6370,24 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
public boolean bringPointIntoView(int offset) {
boolean changed = false;
- if (mLayout == null) return changed;
+ Layout layout = isShowingHint() ? mHintLayout: mLayout;
+
+ if (layout == null) return changed;
- int line = mLayout.getLineForOffset(offset);
+ int line = layout.getLineForOffset(offset);
// FIXME: Is it okay to truncate this, or should we round?
- final int x = (int)mLayout.getPrimaryHorizontal(offset);
- final int top = mLayout.getLineTop(line);
- final int bottom = mLayout.getLineTop(line + 1);
+ final int x = (int)layout.getPrimaryHorizontal(offset);
+ final int top = layout.getLineTop(line);
+ final int bottom = layout.getLineTop(line + 1);
- int left = (int) FloatMath.floor(mLayout.getLineLeft(line));
- int right = (int) FloatMath.ceil(mLayout.getLineRight(line));
- int ht = mLayout.getHeight();
+ int left = (int) FloatMath.floor(layout.getLineLeft(line));
+ int right = (int) FloatMath.ceil(layout.getLineRight(line));
+ int ht = layout.getHeight();
int grav;
- switch (mLayout.getParagraphAlignment(line)) {
+ switch (layout.getParagraphAlignment(line)) {
case ALIGN_LEFT:
grav = 1;
break;
@@ -6431,10 +6395,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
grav = -1;
break;
case ALIGN_NORMAL:
- grav = mLayout.getParagraphDirection(line);
+ grav = layout.getParagraphDirection(line);
break;
case ALIGN_OPPOSITE:
- grav = -mLayout.getParagraphDirection(line);
+ grav = -layout.getParagraphDirection(line);
break;
case ALIGN_CENTER:
default:
@@ -6982,10 +6946,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
*/
protected void onSelectionChanged(int selStart, int selEnd) {
sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_TEXT_SELECTION_CHANGED);
- // mEditor may be null if selection is created programatically.
- createEditorIfNeeded("onSelectionChanged");
- // Invalidate even when selection range is empty, to remove previous highlight
- getEditor().mTextDisplayListIsValid = false;
+ if (mEditor != null) getEditor().mTextDisplayListIsValid = false;
}
/**
@@ -7141,10 +7102,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
if (selChanged) {
- if (mEditor != null) {
- getEditor().mHighlightPathBogus = true;
- if (!isFocused()) getEditor().mSelectionMoved = true;
- }
+ mHighlightPathBogus = true;
+ if (mEditor != null && !isFocused()) getEditor().mSelectionMoved = true;
if ((buf.getSpanFlags(what)&Spanned.SPAN_INTERMEDIATE) == 0) {
if (newSelStart < 0) {
@@ -7161,7 +7120,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
what instanceof CharacterStyle) {
if (ims == null || ims.mBatchEditNesting == 0) {
invalidate();
- if (mEditor != null) getEditor().mHighlightPathBogus = true;
+ mHighlightPathBogus = true;
checkForResize();
} else {
ims.mContentChanged = true;
@@ -7170,7 +7129,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
if (MetaKeyKeyListener.isMetaTracker(buf, what)) {
- if (mEditor != null) getEditor().mHighlightPathBogus = true;
+ mHighlightPathBogus = true;
if (ims != null && MetaKeyKeyListener.isSelectingMetaTracker(buf, what)) {
ims.mSelectionModeChanged = true;
}
@@ -8186,24 +8145,26 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
@Override
public boolean performLongClick() {
boolean handled = false;
- boolean vibrate = true;
if (super.performLongClick()) {
handled = true;
}
+ if (mEditor == null) {
+ return handled;
+ }
+
// Long press in empty space moves cursor and shows the Paste affordance if available.
- if (!handled && mEditor != null && !isPositionOnText(getEditor().mLastDownPositionX, getEditor().mLastDownPositionY) &&
+ if (!handled && !isPositionOnText(getEditor().mLastDownPositionX, getEditor().mLastDownPositionY) &&
getEditor().mInsertionControllerEnabled) {
final int offset = getOffsetForPosition(getEditor().mLastDownPositionX, getEditor().mLastDownPositionY);
stopSelectionActionMode();
Selection.setSelection((Spannable) mText, offset);
getInsertionController().showWithActionPopup();
handled = true;
- vibrate = false;
}
- if (!handled && mEditor != null && getEditor().mSelectionActionMode != null) {
+ if (!handled && getEditor().mSelectionActionMode != null) {
if (touchPositionIsInSelection()) {
// Start a drag
final int start = getSelectionStart();
@@ -8223,14 +8184,11 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
// Start a new selection
if (!handled) {
- vibrate = handled = startSelectionActionMode();
+ handled = startSelectionActionMode();
}
- if (vibrate) {
+ if (handled) {
performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
- }
-
- if (handled && mEditor != null) {
getEditor().mDiscardNextActionUp = true;
}
@@ -8322,8 +8280,11 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
@Override
protected void onScrollChanged(int horiz, int vert, int oldHoriz, int oldVert) {
super.onScrollChanged(horiz, vert, oldHoriz, oldVert);
- if (mEditor != null && getEditor().mPositionListener != null) {
- getEditor().mPositionListener.onScrollChanged();
+ if (mEditor != null) {
+ if (getEditor().mPositionListener != null) {
+ getEditor().mPositionListener.onScrollChanged();
+ }
+ getEditor().mTextDisplayListIsValid = false;
}
}
@@ -8619,7 +8580,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
public boolean onDragEvent(DragEvent event) {
switch (event.getAction()) {
case DragEvent.ACTION_DRAG_STARTED:
- return hasInsertionController();
+ return mEditor != null && hasInsertionController();
case DragEvent.ACTION_DRAG_ENTERED:
TextView.this.requestFocus();
@@ -8756,6 +8717,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
@Override
public void onResolveTextDirection() {
if (hasPasswordTransformationMethod()) {
+ // TODO: take care of the content direction to show the password text and dots justified
+ // to the left or to the right
mTextDir = TextDirectionHeuristics.LOCALE;
return;
}
@@ -10730,9 +10693,12 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
return;
}
- if (offset != mPreviousOffset || parentScrolled) {
- updateSelection(offset);
- addPositionToTouchUpFilter(offset);
+ boolean offsetChanged = offset != mPreviousOffset;
+ if (offsetChanged || parentScrolled) {
+ if (offsetChanged) {
+ updateSelection(offset);
+ addPositionToTouchUpFilter(offset);
+ }
final int line = mLayout.getLineForOffset(offset);
mPositionX = (int) (mLayout.getPrimaryHorizontal(offset) - 0.5f - mHotspotX);
@@ -11330,12 +11296,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
private class Editor {
- Editor() {
- mHighlightPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
- final CompatibilityInfo compat = TextView.this.getResources().getCompatibilityInfo();
- mHighlightPaint.setCompatibilityScaling(compat.applicationScale);
- }
-
// Cursor Controllers.
InsertionPointCursorController mInsertionPointCursorController;
SelectionModifierCursorController mSelectionModifierCursorController;
@@ -11349,10 +11309,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
InputContentType mInputContentType;
InputMethodState mInputMethodState;
- Path mHighlightPath;
- boolean mHighlightPathBogus = true;
- final Paint mHighlightPaint;
-
DisplayList mTextDisplayList;
boolean mTextDisplayListIsValid;
@@ -11391,7 +11347,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
Runnable mShowSuggestionRunnable;
final Drawable[] mCursorDrawable = new Drawable[2];
- int mCursorCount; // Actual current number of used mCursorDrawable: 0, 1 or 2 (split)
+ int mCursorCount; // Current number of used mCursorDrawable: 0 (resource=0), 1 or 2 (split)
Drawable mSelectHandleLeft;
Drawable mSelectHandleRight;
@@ -11649,65 +11605,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
}
- void onDraw(Canvas canvas, Layout layout, int cursorOffsetVertical) {
- Path highlight = null;
- Paint highlightPaint = null;
-
- int selStart = -1, selEnd = -1;
- boolean drawCursor = false;
-
- highlightPaint = mHighlightPaint;
- // If there is no movement method, then there can be no selection.
- // Check that first and attempt to skip everything having to do with
- // the cursor.
- // XXX This is not strictly true -- a program could set the
- // selection manually if it really wanted to.
- if (mMovement != null && (isFocused() || isPressed())) {
- selStart = getSelectionStart();
- selEnd = getSelectionEnd();
-
- if (selStart >= 0) {
- if (mHighlightPath == null) mHighlightPath = new Path();
-
- if (selStart == selEnd) {
- if (isCursorVisible() &&
- (SystemClock.uptimeMillis() - mShowCursor) % (2 * BLINK) < BLINK) {
- if (mHighlightPathBogus) {
- mHighlightPath.reset();
- mLayout.getCursorPath(selStart, mHighlightPath, mText);
- updateCursorsPositions();
- mHighlightPathBogus = false;
- }
-
- // XXX should pass to skin instead of drawing directly
- highlightPaint.setColor(mCurTextColor);
- if (mCurrentAlpha != 255) {
- highlightPaint.setAlpha(
- (mCurrentAlpha * Color.alpha(mCurTextColor)) / 255);
- }
- highlightPaint.setStyle(Paint.Style.STROKE);
- highlight = mHighlightPath;
- drawCursor = mCursorCount > 0;
- }
- } else if (textCanBeSelected()) {
- if (mHighlightPathBogus) {
- mHighlightPath.reset();
- mLayout.getSelectionPath(selStart, selEnd, mHighlightPath);
- mHighlightPathBogus = false;
- }
-
- // XXX should pass to skin instead of drawing directly
- highlightPaint.setColor(mHighlightColor);
- if (mCurrentAlpha != 255) {
- highlightPaint.setAlpha(
- (mCurrentAlpha * Color.alpha(mHighlightColor)) / 255);
- }
- highlightPaint.setStyle(Paint.Style.FILL);
-
- highlight = mHighlightPath;
- }
- }
- }
+ void onDraw(Canvas canvas, Layout layout, Path highlight, int cursorOffsetVertical) {
+ final int selectionStart = getSelectionStart();
+ final int selectionEnd = getSelectionEnd();
final InputMethodState ims = mInputMethodState;
if (ims != null && ims.mBatchEditNesting == 0) {
@@ -11729,7 +11629,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
candStart = EditableInputConnection.getComposingSpanStart(sp);
candEnd = EditableInputConnection.getComposingSpanEnd(sp);
}
- imm.updateSelection(TextView.this, selStart, selEnd, candStart, candEnd);
+ imm.updateSelection(TextView.this,
+ selectionStart, selectionEnd, candStart, candEnd);
}
}
@@ -11758,7 +11659,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
mCorrectionHighlighter.draw(canvas, cursorOffsetVertical);
}
- if (drawCursor) {
+ if (highlight != null && selectionStart == selectionEnd && mCursorCount > 0) {
drawCursor(canvas, cursorOffsetVertical);
// Rely on the drawable entirely, do not draw the cursor line.
// Has to be done after the IMM related code above which relies on the highlight.
@@ -11781,7 +11682,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
// The dirty rect should always be null for a display list
hardwareCanvas.onPreDraw(null);
hardwareCanvas.translate(-mScrollX, -mScrollY);
- layout.draw(hardwareCanvas, highlight, highlightPaint, cursorOffsetVertical);
+ layout.draw(hardwareCanvas, highlight, mHighlightPaint, cursorOffsetVertical);
hardwareCanvas.translate(mScrollX, mScrollY);
} finally {
hardwareCanvas.onPostDraw();
@@ -11794,13 +11695,61 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
DisplayList.FLAG_CLIP_CHILDREN);
canvas.translate(-mScrollX, -mScrollY);
} else {
- layout.draw(canvas, highlight, highlightPaint, cursorOffsetVertical);
+ layout.draw(canvas, highlight, mHighlightPaint, cursorOffsetVertical);
}
if (mMarquee != null && mMarquee.shouldDrawGhost()) {
canvas.translate((int) mMarquee.getGhostOffset(), 0.0f);
- layout.draw(canvas, highlight, highlightPaint, cursorOffsetVertical);
+ layout.draw(canvas, highlight, mHighlightPaint, cursorOffsetVertical);
+ }
+ }
+
+ private void drawCursor(Canvas canvas, int cursorOffsetVertical) {
+ final boolean translate = cursorOffsetVertical != 0;
+ if (translate) canvas.translate(0, cursorOffsetVertical);
+ for (int i = 0; i < getEditor().mCursorCount; i++) {
+ mCursorDrawable[i].draw(canvas);
+ }
+ if (translate) canvas.translate(0, -cursorOffsetVertical);
+ }
+
+ private void updateCursorsPositions() {
+ if (mCursorDrawableRes == 0) {
+ mCursorCount = 0;
+ return;
+ }
+
+ final int offset = getSelectionStart();
+ final int line = mLayout.getLineForOffset(offset);
+ final int top = mLayout.getLineTop(line);
+ final int bottom = mLayout.getLineTop(line + 1);
+
+ mCursorCount = mLayout.isLevelBoundary(offset) ? 2 : 1;
+
+ int middle = bottom;
+ if (mCursorCount == 2) {
+ // Similar to what is done in {@link Layout.#getCursorPath(int, Path, CharSequence)}
+ middle = (top + bottom) >> 1;
}
+
+ updateCursorPosition(0, top, middle, mLayout.getPrimaryHorizontal(offset));
+
+ if (mCursorCount == 2) {
+ updateCursorPosition(1, middle, bottom, mLayout.getSecondaryHorizontal(offset));
+ }
+ }
+
+ private void updateCursorPosition(int cursorIndex, int top, int bottom, float horizontal) {
+ if (mCursorDrawable[cursorIndex] == null)
+ mCursorDrawable[cursorIndex] = mContext.getResources().getDrawable(mCursorDrawableRes);
+
+ if (mTempRect == null) mTempRect = new Rect();
+ mCursorDrawable[cursorIndex].getPadding(mTempRect);
+ final int width = mCursorDrawable[cursorIndex].getIntrinsicWidth();
+ horizontal = Math.max(0.5f, horizontal - 0.5f);
+ final int left = (int) (horizontal) - mTempRect.left;
+ mCursorDrawable[cursorIndex].setBounds(left, top - mTempRect.top, left + width,
+ bottom + mTempRect.bottom);
}
}
}
diff --git a/core/java/com/android/internal/net/NetworkStatsFactory.java b/core/java/com/android/internal/net/NetworkStatsFactory.java
index 41993c4..ccd2763 100644
--- a/core/java/com/android/internal/net/NetworkStatsFactory.java
+++ b/core/java/com/android/internal/net/NetworkStatsFactory.java
@@ -22,12 +22,12 @@ import static android.net.NetworkStats.UID_ALL;
import static com.android.server.NetworkManagementSocketTagger.kernelToTag;
import android.net.NetworkStats;
+import android.os.StrictMode;
import android.os.SystemClock;
import android.util.Slog;
import com.android.internal.util.ProcFileReader;
import com.google.android.collect.Lists;
-import com.google.android.collect.Maps;
import com.google.android.collect.Sets;
import java.io.BufferedReader;
@@ -36,7 +36,6 @@ import java.io.FileInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.HashSet;
import java.util.StringTokenizer;
@@ -62,22 +61,6 @@ public class NetworkStatsFactory {
/** Path to {@code /proc/net/xt_qtaguid/stats}. */
private final File mStatsXtUid;
- /** {@link #mStatsXtUid} and {@link #mStatsXtIfaceAll} headers. */
- private static final String KEY_IDX = "idx";
- private static final String KEY_IFACE = "iface";
- private static final String KEY_ACTIVE = "active";
- private static final String KEY_UID = "uid_tag_int";
- private static final String KEY_COUNTER_SET = "cnt_set";
- private static final String KEY_TAG_HEX = "acct_tag_hex";
- private static final String KEY_SNAP_RX_BYTES = "snap_rx_bytes";
- private static final String KEY_SNAP_RX_PACKETS = "snap_rx_packets";
- private static final String KEY_SNAP_TX_BYTES = "snap_tx_bytes";
- private static final String KEY_SNAP_TX_PACKETS = "snap_tx_packets";
- private static final String KEY_RX_BYTES = "rx_bytes";
- private static final String KEY_RX_PACKETS = "rx_packets";
- private static final String KEY_TX_BYTES = "tx_bytes";
- private static final String KEY_TX_PACKETS = "tx_packets";
-
public NetworkStatsFactory() {
this(new File("/proc/"));
}
@@ -106,47 +89,39 @@ public class NetworkStatsFactory {
}
private NetworkStats readNetworkStatsSummarySingleFile() {
+ final StrictMode.ThreadPolicy savedPolicy = StrictMode.allowThreadDiskReads();
+
final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 6);
final NetworkStats.Entry entry = new NetworkStats.Entry();
- // TODO: transition to ProcFileReader
- // TODO: read directly from proc once headers are added
- final ArrayList<String> keys = Lists.newArrayList(KEY_IFACE, KEY_ACTIVE, KEY_SNAP_RX_BYTES,
- KEY_SNAP_RX_PACKETS, KEY_SNAP_TX_BYTES, KEY_SNAP_TX_PACKETS, KEY_RX_BYTES,
- KEY_RX_PACKETS, KEY_TX_BYTES, KEY_TX_PACKETS);
- final ArrayList<String> values = Lists.newArrayList();
- final HashMap<String, String> parsed = Maps.newHashMap();
-
- BufferedReader reader = null;
+ ProcFileReader reader = null;
try {
- reader = new BufferedReader(new FileReader(mStatsXtIfaceAll));
+ reader = new ProcFileReader(new FileInputStream(mStatsXtIfaceAll));
- String line;
- while ((line = reader.readLine()) != null) {
- splitLine(line, values);
- parseLine(keys, values, parsed);
-
- entry.iface = parsed.get(KEY_IFACE);
+ while (reader.hasMoreData()) {
+ entry.iface = reader.nextString();
entry.uid = UID_ALL;
entry.set = SET_DEFAULT;
entry.tag = TAG_NONE;
+ final boolean active = reader.nextInt() != 0;
+
// always include snapshot values
- entry.rxBytes = getParsedLong(parsed, KEY_SNAP_RX_BYTES);
- entry.rxPackets = getParsedLong(parsed, KEY_SNAP_RX_PACKETS);
- entry.txBytes = getParsedLong(parsed, KEY_SNAP_TX_BYTES);
- entry.txPackets = getParsedLong(parsed, KEY_SNAP_TX_PACKETS);
+ entry.rxBytes = reader.nextLong();
+ entry.rxPackets = reader.nextLong();
+ entry.txBytes = reader.nextLong();
+ entry.txPackets = reader.nextLong();
// fold in active numbers, but only when active
- final boolean active = getParsedInt(parsed, KEY_ACTIVE) != 0;
if (active) {
- entry.rxBytes += getParsedLong(parsed, KEY_RX_BYTES);
- entry.rxPackets += getParsedLong(parsed, KEY_RX_PACKETS);
- entry.txBytes += getParsedLong(parsed, KEY_TX_BYTES);
- entry.txPackets += getParsedLong(parsed, KEY_TX_PACKETS);
+ entry.rxBytes += reader.nextLong();
+ entry.rxPackets += reader.nextLong();
+ entry.txBytes += reader.nextLong();
+ entry.txPackets += reader.nextLong();
}
stats.addValues(entry);
+ reader.finishLine();
}
} catch (NullPointerException e) {
throw new IllegalStateException("problem parsing stats: " + e);
@@ -156,6 +131,7 @@ public class NetworkStatsFactory {
throw new IllegalStateException("problem parsing stats: " + e);
} finally {
IoUtils.closeQuietly(reader);
+ StrictMode.setThreadPolicy(savedPolicy);
}
return stats;
}
@@ -165,6 +141,8 @@ public class NetworkStatsFactory {
*/
@Deprecated
private NetworkStats readNetworkStatsSummaryMultipleFiles() {
+ final StrictMode.ThreadPolicy savedPolicy = StrictMode.allowThreadDiskReads();
+
final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 6);
final NetworkStats.Entry entry = new NetworkStats.Entry();
@@ -241,6 +219,7 @@ public class NetworkStatsFactory {
throw new IllegalStateException("problem parsing stats: " + e);
} finally {
IoUtils.closeQuietly(reader);
+ StrictMode.setThreadPolicy(savedPolicy);
}
return stats;
@@ -257,6 +236,8 @@ public class NetworkStatsFactory {
* @throws IllegalStateException when problem parsing stats.
*/
public NetworkStats readNetworkStatsDetail(int limitUid) throws IllegalStateException {
+ final StrictMode.ThreadPolicy savedPolicy = StrictMode.allowThreadDiskReads();
+
final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 24);
final NetworkStats.Entry entry = new NetworkStats.Entry();
@@ -300,23 +281,12 @@ public class NetworkStatsFactory {
throw new IllegalStateException("problem parsing idx " + idx, e);
} finally {
IoUtils.closeQuietly(reader);
+ StrictMode.setThreadPolicy(savedPolicy);
}
return stats;
}
- @Deprecated
- private static int getParsedInt(HashMap<String, String> parsed, String key) {
- final String value = parsed.get(key);
- return value != null ? Integer.parseInt(value) : 0;
- }
-
- @Deprecated
- private static long getParsedLong(HashMap<String, String> parsed, String key) {
- final String value = parsed.get(key);
- return value != null ? Long.parseLong(value) : 0;
- }
-
/**
* Split given line into {@link ArrayList}.
*/
@@ -331,21 +301,6 @@ public class NetworkStatsFactory {
}
/**
- * Zip the two given {@link ArrayList} as key and value pairs into
- * {@link HashMap}.
- */
- @Deprecated
- private static void parseLine(
- ArrayList<String> keys, ArrayList<String> values, HashMap<String, String> outParsed) {
- outParsed.clear();
-
- final int size = Math.min(keys.size(), values.size());
- for (int i = 0; i < size; i++) {
- outParsed.put(keys.get(i), values.get(i));
- }
- }
-
- /**
* Utility method to read a single plain-text {@link Long} from the given
* {@link File}, usually from a {@code /proc/} filesystem.
*/
diff --git a/core/java/com/android/internal/util/FileRotator.java b/core/java/com/android/internal/util/FileRotator.java
index 8a8f315..6cfb97d 100644
--- a/core/java/com/android/internal/util/FileRotator.java
+++ b/core/java/com/android/internal/util/FileRotator.java
@@ -48,7 +48,7 @@ import libcore.io.IoUtils;
*/
public class FileRotator {
private static final String TAG = "FileRotator";
- private static final boolean LOGD = true;
+ private static final boolean LOGD = false;
private final File mBasePath;
private final String mPrefix;
diff --git a/core/java/com/android/internal/widget/EditableInputConnection.java b/core/java/com/android/internal/widget/EditableInputConnection.java
index 9579bce..4cbdf78 100644
--- a/core/java/com/android/internal/widget/EditableInputConnection.java
+++ b/core/java/com/android/internal/widget/EditableInputConnection.java
@@ -70,7 +70,7 @@ public class EditableInputConnection extends BaseInputConnection {
public boolean endBatchEdit() {
synchronized(this) {
if (mBatchEditNesting > 0) {
- // When the connection is reset by the InputMethodManager and finishComposingText
+ // When the connection is reset by the InputMethodManager and reportFinish
// is called, some endBatchEdit calls may still be asynchronously received from the
// IME. Do not take these into account, thus ensuring that this IC's final
// contribution to mTextView's nested batch edit count is zero.
@@ -83,6 +83,19 @@ public class EditableInputConnection extends BaseInputConnection {
}
@Override
+ protected void reportFinish() {
+ super.reportFinish();
+
+ synchronized(this) {
+ while (mBatchEditNesting > 0) {
+ endBatchEdit();
+ }
+ // Will prevent any further calls to begin or endBatchEdit
+ mBatchEditNesting = -1;
+ }
+ }
+
+ @Override
public boolean clearMetaKeyStates(int states) {
final Editable content = getEditable();
if (content == null) return false;
@@ -99,23 +112,6 @@ public class EditableInputConnection extends BaseInputConnection {
}
@Override
- public boolean finishComposingText() {
- final boolean superResult = super.finishComposingText();
- synchronized(this) {
- if (mBatchEditNesting < 0) {
- // The connection was already finished
- return false;
- }
- while (mBatchEditNesting > 0) {
- endBatchEdit();
- }
- // Will prevent any further calls to begin or endBatchEdit
- mBatchEditNesting = -1;
- }
- return superResult;
- }
-
- @Override
public boolean commitCompletion(CompletionInfo text) {
if (DEBUG) Log.v(TAG, "commitCompletion " + text);
mTextView.beginBatchEdit();
diff --git a/core/jni/android/graphics/TextLayoutCache.cpp b/core/jni/android/graphics/TextLayoutCache.cpp
index 7f5d54d..efeba5c 100644
--- a/core/jni/android/graphics/TextLayoutCache.cpp
+++ b/core/jni/android/graphics/TextLayoutCache.cpp
@@ -36,6 +36,8 @@ namespace android {
#define TYPE_FACE_HEBREW_REGULAR "/system/fonts/DroidSansHebrew-Regular.ttf"
#define TYPE_FACE_HEBREW_BOLD "/system/fonts/DroidSansHebrew-Bold.ttf"
#define TYPEFACE_BENGALI "/system/fonts/Lohit-Bengali.ttf"
+#define TYPEFACE_DEVANAGARI "/system/fonts/Lohit-Devanagari.ttf"
+#define TYPEFACE_TAMIL "/system/fonts/Lohit-Tamil.ttf"
#define TYPEFACE_THAI "/system/fonts/DroidSansThai.ttf"
ANDROID_SINGLETON_STATIC_INSTANCE(TextLayoutEngine);
@@ -828,6 +830,20 @@ size_t TextLayoutShaper::shapeFontRun(const SkPaint* paint, bool isRTL) {
#endif
break;
+ case HB_Script_Devanagari:
+ typeface = getCachedTypeface(&mDevanagariTypeface, TYPEFACE_DEVANAGARI);
+#if DEBUG_GLYPHS
+ ALOGD("Using Devanagari Typeface");
+#endif
+ break;
+
+ case HB_Script_Tamil:
+ typeface = getCachedTypeface(&mTamilTypeface, TYPEFACE_TAMIL);
+#if DEBUG_GLYPHS
+ ALOGD("Using Tamil Typeface");
+#endif
+ break;
+
default:
if (!typeface) {
typeface = mDefaultTypeface;
@@ -859,6 +875,8 @@ size_t TextLayoutShaper::shapeFontRun(const SkPaint* paint, bool isRTL) {
case HB_Script_Arabic:
case HB_Script_Hebrew:
case HB_Script_Bengali:
+ case HB_Script_Devanagari:
+ case HB_Script_Tamil:
case HB_Script_Thai:{
const uint16_t* text16 = (const uint16_t*)(mShaperItem.string + mShaperItem.item.pos);
SkUnichar firstUnichar = SkUTF16_NextUnichar(&text16);
diff --git a/core/jni/android/graphics/TextLayoutCache.h b/core/jni/android/graphics/TextLayoutCache.h
index 7ac2f18..3c834a4 100644
--- a/core/jni/android/graphics/TextLayoutCache.h
+++ b/core/jni/android/graphics/TextLayoutCache.h
@@ -194,6 +194,8 @@ private:
SkTypeface* mHebrewBoldTypeface;
SkTypeface* mBengaliTypeface;
SkTypeface* mThaiTypeface;
+ SkTypeface* mDevanagariTypeface;
+ SkTypeface* mTamilTypeface;
/**
* Cache of Harfbuzz faces
diff --git a/core/jni/android_app_NativeActivity.cpp b/core/jni/android_app_NativeActivity.cpp
index 7c88dfc..088062a 100644
--- a/core/jni/android_app_NativeActivity.cpp
+++ b/core/jni/android_app_NativeActivity.cpp
@@ -21,13 +21,16 @@
#include <dlfcn.h>
#include <fcntl.h>
-#include <android_runtime/AndroidRuntime.h>
-#include <android_runtime/android_view_Surface.h>
#include <android_runtime/android_app_NativeActivity.h>
#include <android_runtime/android_util_AssetManager.h>
-#include <surfaceflinger/Surface.h>
-#include <system/window.h>
+#include <android_runtime/android_view_Surface.h>
+#include <android_runtime/AndroidRuntime.h>
#include <androidfw/InputTransport.h>
+
+#include <gui/Surface.h>
+
+#include <system/window.h>
+
#include <utils/Looper.h>
#include "JNIHelp.h"
diff --git a/core/jni/android_database_CursorWindow.cpp b/core/jni/android_database_CursorWindow.cpp
index d53644d..579d6ad 100644
--- a/core/jni/android_database_CursorWindow.cpp
+++ b/core/jni/android_database_CursorWindow.cpp
@@ -30,7 +30,7 @@
#include <string.h>
#include <unistd.h>
-#include "binder/CursorWindow.h"
+#include <androidfw/CursorWindow.h>
#include "android_util_Binder.h"
#include "android_database_SQLiteCommon.h"
diff --git a/core/jni/android_database_SQLiteConnection.cpp b/core/jni/android_database_SQLiteConnection.cpp
index e061ac3..c8f911f 100644
--- a/core/jni/android_database_SQLiteConnection.cpp
+++ b/core/jni/android_database_SQLiteConnection.cpp
@@ -29,7 +29,7 @@
#include <string.h>
#include <unistd.h>
-#include "binder/CursorWindow.h"
+#include <androidfw/CursorWindow.h>
#include <sqlite3.h>
#include <sqlite3_android.h>
@@ -128,15 +128,6 @@ static jint nativeOpen(JNIEnv* env, jclass clazz, jstring pathStr, jint openFlag
return 0;
}
- // Enable WAL auto-checkpointing after a commit whenever at least one frame is in the log.
- // This ensures that a checkpoint will occur after each transaction if needed.
- err = sqlite3_wal_autocheckpoint(db, 1);
- if (err) {
- throw_sqlite3_exception(env, db, "Could not enable auto-checkpointing.");
- sqlite3_close(db);
- return 0;
- }
-
// Register custom Android functions.
err = register_android_functions(db, UTF16_STORAGE);
if (err) {
@@ -426,11 +417,11 @@ static void nativeFinalizeStatement(JNIEnv* env, jclass clazz, jint connectionPt
SQLiteConnection* connection = reinterpret_cast<SQLiteConnection*>(connectionPtr);
sqlite3_stmt* statement = reinterpret_cast<sqlite3_stmt*>(statementPtr);
+ // We ignore the result of sqlite3_finalize because it is really telling us about
+ // whether any errors occurred while executing the statement. The statement itself
+ // is always finalized regardless.
ALOGV("Finalized statement %p on connection %p", statement, connection->db);
- int err = sqlite3_finalize(statement);
- if (err != SQLITE_OK) {
- throw_sqlite3_exception(env, connection->db, NULL);
- }
+ sqlite3_finalize(statement);
}
static jint nativeGetParameterCount(JNIEnv* env, jclass clazz, jint connectionPtr,
diff --git a/core/jni/android_hardware_Camera.cpp b/core/jni/android_hardware_Camera.cpp
index b89273b..599211e 100644
--- a/core/jni/android_hardware_Camera.cpp
+++ b/core/jni/android_hardware_Camera.cpp
@@ -26,7 +26,7 @@
#include <utils/Vector.h>
#include <gui/SurfaceTexture.h>
-#include <surfaceflinger/Surface.h>
+#include <gui/Surface.h>
#include <camera/Camera.h>
#include <binder/IMemory.h>
diff --git a/core/jni/android_view_Display.cpp b/core/jni/android_view_Display.cpp
index f076cc8..aedf1e4 100644
--- a/core/jni/android_view_Display.cpp
+++ b/core/jni/android_view_Display.cpp
@@ -19,7 +19,7 @@
#include <cutils/properties.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
+#include <gui/SurfaceComposerClient.h>
#include <ui/PixelFormat.h>
#include <ui/DisplayInfo.h>
diff --git a/core/jni/android_view_Surface.cpp b/core/jni/android_view_Surface.cpp
index 18bcea1..c387752 100644
--- a/core/jni/android_view_Surface.cpp
+++ b/core/jni/android_view_Surface.cpp
@@ -22,11 +22,13 @@
#include "android/graphics/GraphicsJNI.h"
#include <binder/IMemory.h>
+
+#include <gui/Surface.h>
+#include <gui/SurfaceComposerClient.h>
#include <gui/SurfaceTexture.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
-#include <surfaceflinger/Surface.h>
-#include <ui/Region.h>
+
#include <ui/Rect.h>
+#include <ui/Region.h>
#include <EGL/egl.h>
diff --git a/core/jni/com_google_android_gles_jni_EGLImpl.cpp b/core/jni/com_google_android_gles_jni_EGLImpl.cpp
index 0f334c3..5483867 100644
--- a/core/jni/com_google_android_gles_jni_EGLImpl.cpp
+++ b/core/jni/com_google_android_gles_jni_EGLImpl.cpp
@@ -21,20 +21,20 @@
#include <android_runtime/android_graphics_SurfaceTexture.h>
#include <utils/misc.h>
+
+#include <EGL/egl_display.h>
#include <EGL/egl.h>
#include <GLES/gl.h>
-#include <EGL/egl_display.h>
+#include <gui/Surface.h>
+#include <gui/SurfaceTexture.h>
+#include <gui/SurfaceTextureClient.h>
-#include <surfaceflinger/Surface.h>
#include <SkBitmap.h>
#include <SkPixelRef.h>
#include <ui/ANativeObjectBase.h>
-#include <gui/SurfaceTexture.h>
-#include <gui/SurfaceTextureClient.h>
-
namespace android {
static jclass gConfig_class;
@@ -46,7 +46,6 @@ static jfieldID gContext_EGLContextFieldID;
static jfieldID gSurface_EGLSurfaceFieldID;
static jfieldID gSurface_NativePixelRefFieldID;
static jfieldID gConfig_EGLConfigFieldID;
-static jfieldID gSurface_SurfaceFieldID;
static jfieldID gBitmap_NativeBitmapFieldID;
static inline EGLDisplay getDisplay(JNIEnv* env, jobject o) {
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index d4d29ae..17d2212 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -121,6 +121,7 @@
<protected-broadcast android:name="android.intent.action.CLEAR_DNS_CACHE" />
<protected-broadcast android:name="android.intent.action.PROXY_CHANGE" />
+ <protected-broadcast android:name="android.os.UpdateLock.UPDATE_LOCK_CHANGED" />
<!-- ====================================== -->
<!-- Permissions for things that cost money -->
@@ -1538,6 +1539,13 @@
android:label="@string/permlab_accessContentProvidersExternally"
android:description="@string/permdesc_accessContentProvidersExternally"
android:protectionLevel="signature" />
+ <!-- Allows an application to hold an UpdateLock, recommending that a headless
+ OTA reboot *not* occur while the lock is held.
+ @hide -->
+ <permission android:name="android.permission.UPDATE_LOCK"
+ android:label="@string/permlab_updateLock"
+ android:description="@string/permdesc_updateLock"
+ android:protectionLevel="signatureOrSystem" />
<!-- The system process is explicitly the only one allowed to launch the
confirmation UI for full backup/restore -->
diff --git a/core/res/res/layout/number_picker.xml b/core/res/res/layout/number_picker.xml
index 807daf2..2967696 100644
--- a/core/res/res/layout/number_picker.xml
+++ b/core/res/res/layout/number_picker.xml
@@ -25,7 +25,8 @@
style="?android:attr/numberPickerUpButtonStyle"
android:contentDescription="@string/number_picker_increment_button" />
- <EditText android:id="@+id/numberpicker_input"
+ <view class="android.widget.NumberPicker$CustomEditText"
+ android:id="@+id/numberpicker_input"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="?android:attr/numberPickerInputTextStyle" />
diff --git a/core/res/res/layout/simple_list_item_multiple_choice.xml b/core/res/res/layout/simple_list_item_multiple_choice.xml
index 0305427..cb23dfd 100644
--- a/core/res/res/layout/simple_list_item_multiple_choice.xml
+++ b/core/res/res/layout/simple_list_item_multiple_choice.xml
@@ -17,10 +17,10 @@
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
android:layout_width="match_parent"
- android:layout_height="?android:attr/listPreferredItemHeight"
- android:textAppearance="?android:attr/textAppearanceListItem"
+ android:layout_height="?android:attr/listPreferredItemHeightSmall"
+ android:textAppearance="?android:attr/textAppearanceListItemSmall"
android:gravity="center_vertical"
android:checkMark="?android:attr/listChoiceIndicatorMultiple"
- android:paddingLeft="8dip"
- android:paddingRight="8dip"
+ android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
+ android:paddingRight="?android:attr/listPreferredItemPaddingRight"
/>
diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml
index abf6676..1de0390 100644
--- a/core/res/res/values-af/strings.xml
+++ b/core/res/res/values-af/strings.xml
@@ -315,6 +315,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"aktiveer of deaktiveer programkomponente"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Laat die program toe om te verander of \'n komponent van ander program geaktiveer is of nie. Kwaadwillige programme kan dit dalk gebruik om belangrike tabletvermoëns te deaktiveer. Wees versigtig met hierdie toestemming, want dit kan programkomponente tot \'n onbruikbare, inkonsekwente of onstabiele toestand bring."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Laat die program toe om te verander of \'n komponent van ander program geaktiveer is of nie. Kwaadwillige programme kan dit gebruik om belangrike foonvermoëns te deaktiveer. Wees versigtig met hierdie toestemming, want dit kan programkomponente tot \'n onbruikbare, inkonsekwente of onstabiele toestand bring."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"toestemmings te verleen of te herroep"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Laat \'n program toe om spesifieke toestemmings te verleen of te herroep vir die betrokke program of ander programme. Skadelike programme kan dit gebruik om toegang te verkry tot kenmerke waarvoor jy nie toestemming verleen het nie."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"stel voorkeurprogramme"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Laat die program toe om jou voorkeur-programme te verander. Kwaadwillige programme kan stilweg die programme wat loop, verander, wat jou bestaande programme bedrieg om private data oor jou in te samel."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"verander globale stelselinstellings"</string>
@@ -1006,6 +1008,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Stel datum"</string>
<string name="date_time_set" msgid="5777075614321087758">"Stel"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Verstek"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NUUT: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Geen toestemmings benodig nie"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Versteek"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Wys alle"</b></string>
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index bb175e7..262a102 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"የመተግበሪያ ምንዝሮችን አንቃ ወይም አቦዝን"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"የሌላ መተግበሪያ ክፍለ አካል እንደነቃ ወይም እንዳልነቃ መተግበሪያው እንዲለውጥ ይፈቅዳል፡፡ አስፈላጊ የጡባዊ ተኮ አቅሞችን ለማስወገድ ጎጂ መተግበሪያዎች ይሄንን ሊጠቀሙበት ይችላሉ፡፡ ከፍቃድ ጋር ጥንቃቄ መወሰድ ይገባል፤ ልክ የማያገለግል፣ ወጥ ያልሆነ፣ ወይም ያልተረጋጋ ሁኔታ ወደ የመተግበሪያ ክፍለ አካል ማግኘት እንደሚቻል ሁሉ፡፡"</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"የሌላ መተግበሪያ ክፍለ አካል እንደነቃ ወይም እንዳልነቃ መተግበሪያው እንዲለውጥ ይፈቅዳል፡፡ አስፈላጊ የስልክ አቅሞችን ለማስወገድ ተንኮል አዘል መተግበሪያዎች ይሄንን ሊጠቀሙበት ይችላሉ፡፡ ከፍቃድ ጋር ጥንቃቄ መወሰድ ይገባል፤ ልክ የማያገለግል፣ ወጥ ያልሆነ፣ ወይም ያልተረጋጋ ሁኔታ ወደ የመተግበሪያ ክፍለ አካል ማግኘት እንደሚቻል ሁሉ፡፡"</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"ፍቃዶች ስጥ ወይም ከልክል"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"የተወሰነ ፍቃዶች እንዲሰጥ ወይም እንዲከለክል ለመተግበሪያ ይፈቅዳል ወይም ሌላ መተግበሪያዎች፡፡ ተንኮል አዘል መተግበሪያዎች ያልፈቀድክላቸውን ባህሪያት ላይ ለመድረስ ይሄንን ሊጠቀሙት ይችላሉ፡፡"</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"ተመራጭ መተግበሪያዎች አዘጋጅ"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"ተመራጭ መተግበሪያዎችህን ለመቀየር ለመተግበሪያው ይፈቅዳሉ፡፡ ካንተ የግል ውሂብ ለመሰብሰብ ያሉትን መተግበሪያዎች በመላክ፤ በመሄድ ላይ ያሉ መተግበሪያዎችን ተንኮል አዘል መተግበሪያዎች በዝምታ ሊለውጡ ይችላሉ፡፡"</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"የሁሉንም ስርዓት ቅንብሮች ቀይር"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"ውሂብ አዘጋጅ"</string>
<string name="date_time_set" msgid="5777075614321087758">"አዘጋጅ"</string>
<string name="default_permission_group" msgid="2690160991405646128">"ነባሪ"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"አዲስ፦ "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"ምንም ፍቃዶች አይጠየቁም"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"ደብቅ "</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"ሁሉንም አሳይ"</b></string>
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index a98a7d4..abdda71 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"تمكين مكونات التطبيق أو تعطيلها"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"للسماح للتطبيق بتغيير ما إذا كان سيتم تمكين مكون لتطبيق آخر أم لا. يمكن أن تستخدم التطبيقات الضارة ذلك لتعطيل قدرات الجهاز اللوحي المهمة. يجب توخي الحذر عند استخدام هذا الإذن، وذلك لأنه من الممكن أن يؤدي ذلك إلى جعل حالة مكونات التطبيق غير قابلة للاستخدام أو غير متناسقة أو غير مستقرة."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"للسماح للتطبيق بتغيير ما إذا كان سيتم تمكين مكون لتطبيق آخر أم لا. يمكن أن تستخدم التطبيقات الضارة ذلك لتعطيل قدرات الهاتف المهمة. يجب توخي الحذر عند استخدام هذا الإذن، وذلك لأنه من الممكن أن يؤدي ذلك إلى جعل حالة مكونات التطبيق غير قابلة للاستخدام أو غير متناسقة أو غير مستقرة."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"منح الأذونات أو إلغائها"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"للسماح لأحد التطبيقات بمنح أذونات محددة أو إلغائها لنفسه أو لتطبيقات أخرى. قد تستخدم التطبيقات الضارة هذا للدخول إلى ميزات لم تمنحها إذنًا لدخولها."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"تعيين التطبيقات المفضلة"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"للسماح للتطبيق بتعديل التطبيقات المفضلة. يمكن أن تغيّر التطبيقات الضارة التطبيقات قيد التشغيل بشكل غير ملحوظ، وانتحال صفة التطبيقات الحالية لجمع بيانات خاصة منك."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"تعديل إعدادات النظام العمومية"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"تعيين التاريخ"</string>
<string name="date_time_set" msgid="5777075614321087758">"تعيين"</string>
<string name="default_permission_group" msgid="2690160991405646128">"افتراضي"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"جديد: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"لا أذونات مطلوبة"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"إخفاء"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"عرض الكل"</b></string>
diff --git a/core/res/res/values-be/strings.xml b/core/res/res/values-be/strings.xml
index 233d5a9..5cfa349 100644
--- a/core/res/res/values-be/strings.xml
+++ b/core/res/res/values-be/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"уключыць або адключыць кампаненты прыкладання"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Дазваляе прыкладанням змяняць вызначэнне таго, будзе ўключаны кампанент іншага прыкладання ці не. Шкоднасныя прыкладанні могуць выкарыстоўваць гэта для адключэння важных магчымасцяў планшэта. З гэтым дазволам трэба быць уважлівым, бо можна прывесці кампаненты прыкладання ў непрыдатны, супярэчлівы або няўстойлівы стан."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Дазваляе прыкладанням змяняць вызначэнне таго, будзе ўключаны кампанент іншага прыкладання ці не. Шкоднасныя прыкладанні могуць выкарыстоўваць гэта для адключэння важных магчымасцяў тэлефона. З гэтым дазволам трэба быць уважлівым, бо можна прывесці кампаненты прыкладання ў непрыдатны, супярэчлівы або няўстойлівы стан."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"прадаставiць або адмяніць дазвол"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Дазваляе прыкладанню прадастаўляць або адмяняць пэўныя дазволы для гэтага або іншых прыкладанняў. Шкоднасныя прыкладаннi могуць выкарыстоўваць гэта, каб атрымаць доступ да функцый, якiя вы iм не прадаставiлi."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"усталяваць пажаданыя прыкладанні"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Дазваляе прыкладанням змяняць вашы пажаданыя прыкладанні. Шкоднасныя прыкладанні могуць непрыкметна змяняць запушчаныя прыкладанні, падмяняючы існуючыя прыкладанні, каб збiраць вашы асабістыя дадзеныя."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"змена глабальных параметраў сістэмы"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Усталяваць дату"</string>
<string name="date_time_set" msgid="5777075614321087758">"Задаць"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Па змаўчанні"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"НОВАЕ: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Дазволу не патрабуецца"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Не паказваць"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Паказаць усе"</b></string>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index 66516b9..06a2577 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -313,6 +313,10 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"активиране или деактивиране на компоненти на приложенията"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Разрешава на приложението да активира или деактивира компонент на друго приложение. Злонамерените приложения могат да използват това, за да деактивират важни възможности на таблета. С това разрешение трябва да се внимава, тъй като компонентите на приложенията може да бъдат приведени в неизползваемо, несъгласувано или нестабилно състояние."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Разрешава на приложението да активира или деактивира компонент на друго приложение. Злонамерените приложения могат да използват това, за да деактивират важни възможности на телефона. С това разрешение трябва да се внимава, тъй като компонентите на приложенията може да бъдат приведени в неизползваемо, несъгласувано или нестабилно състояние."</string>
+ <!-- no translation found for permlab_grantRevokePermissions (4627315351093508795) -->
+ <skip />
+ <!-- no translation found for permdesc_grantRevokePermissions (4088642654085850662) -->
+ <skip />
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"задаване на предпочитани приложения"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Разрешава на приложението да променя предпочитаните ви приложения. Злонамерените приложения могат скрито да променят приложенията, които се изпълняват, като ги фалшифицират, за да се сдобият с ваши лични данни."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"промяна на глобалните системни настройки"</string>
@@ -1004,6 +1008,8 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Задаване на дата"</string>
<string name="date_time_set" msgid="5777075614321087758">"Задаване"</string>
<string name="default_permission_group" msgid="2690160991405646128">"По подразбиране"</string>
+ <!-- no translation found for perms_new_perm_prefix (8257740710754301407) -->
+ <skip />
<string name="no_permissions" msgid="7283357728219338112">"Не се изискват разрешения"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Скриване"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Показване на всички"</b></string>
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index b848c2c..c66451a 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"activa o desactiva els components de l\'aplicació"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Permet que l\'aplicació canviï si un component d\'una altra aplicació està activat o no. Les aplicacions malicioses poden utilitzar aquesta funció per desactivar funcions importants de la tauleta. Cal anar amb compte amb aquest permís, ja que és possible que els components de l\'aplicació esdevinguin inutilitzables, incoherents o inestables."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Permet que l\'aplicació canviï si un component d\'una altra aplicació està activat o no. Les aplicacions malicioses poden utilitzar aquesta funció per desactivar funcions importants del telèfon. Cal anar amb compte amb aquest permís, perquè és possible que els components de l\'aplicació esdevinguin inutilitzables, incoherents o inestables."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"concedeix o denega permisos"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Permet que una aplicació concedeixi o denegui permisos específics per a aquesta o per a altres aplicacions. És possible que les aplicacions malicioses ho facin servir per accedir a funcions a les quals no heu concedit accés."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"defineix les aplicacions preferides"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Permet que l\'aplicació modifiqui les aplicacions preferides. Les aplicacions malicioses poden canviar silenciosament les aplicacions que s\'executen, falsejar les aplicacions existents o recollir dades privades de l\'usuari."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"modificar la configuració global del sistema"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Establiment de data"</string>
<string name="date_time_set" msgid="5777075614321087758">"Defineix"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Predeterminat"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NOU: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"No cal cap permís"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Amaga"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Mostra\'ls tots"</b></string>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 544395f..89ff9cf 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"aktivace či deaktivace komponent aplikací"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Umožňuje aplikaci změnit, zda je komponenta jiné aplikace povolena nebo ne. Škodlivé aplikace mohou toto oprávnění použít k vypnutí důležitých funkcí tabletu. Toto oprávnění je třeba používat opatrně, protože může dojít k nepoužitelnosti, nekonzistenci nebo nestabilitě komponent aplikací."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Umožňuje aplikaci změnit, zda je komponenta jiné aplikace povolena nebo ne. Škodlivé aplikace mohou toto oprávnění použít k vypnutí důležitých funkcí telefonu. Toto oprávnění je třeba používat opatrně, protože může dojít k nepoužitelnosti, nekonzistenci nebo nestabilitě komponent aplikací."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"udělení nebo odebrání oprávnění"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Umožňuje aplikaci udělit nebo odebrat sobě samotné nebo jiným aplikacím určitá oprávnění. Škodlivé aplikace pomocí tohoto oprávnění mohou získat přístup k funkcím, které jste jim nepovolili."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"nastavení upřednostňovaných aplikací"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Umožňuje aplikaci upravit preferované aplikace. Škodlivé aplikace mohou tajně měnit běžící aplikace a přinutit stávající aplikace, aby shromažďovaly vaše soukromé údaje."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"změna globálních nastavení systému"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Nastavení data"</string>
<string name="date_time_set" msgid="5777075614321087758">"Nastavit"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Výchozí"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NOVÉ: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Nejsou vyžadována žádná oprávnění"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Skrýt"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Zobrazit vše"</b></string>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index ceefe1d..114cac2 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"aktivere eller deaktivere appkomponenter"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Tillader, at appen kan ændre, om en komponent i en anden app er aktiveret eller ej. Ondsindede apps kan bruge dette til at deaktivere vigtige tabletfunktioner. Man skal være forsigtig med denne tilladelse, da det er muligt at bringe appkomponenter ind i en ubrugelig, inkonsekvent eller ustabil tilstand."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Tillader, at appen kan ændre, om en komponent i en anden app er aktiveret eller ej. Ondsindede apps kan bruge dette til at deaktivere vigtige funktioner på telefonen. Denne tilladelse skal anvendes med forsigtighed, da det kan forårsage ubrugelige eller ustabile appkomponenter."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"udsted eller tilbagekald tilladelser"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Tillader, at en applikation udsteder eller tilbagekalder særlige tilladelser til den selv eller andre applikationer. Ondsindede applikationer kan bruge dette til at få adgang til funktioner uden din tilladelse."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"angive foretrukne apps"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Tillader, at appen kan ændre dine foretrukne apps. Ondsindede apps kan ubemærket ændre kørende apps derved udgive sig for at være dine eksisterende apps og på den måde indsamle private data fra dig."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"rediger globale systemindstillinger"</string>
@@ -364,7 +366,7 @@
<string name="permdesc_readFrameBuffer" msgid="4937405521809454680">"Tillader, at appen kan læse indholdet fra rammebufferen."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"skift dine lydindstillinger"</string>
<string name="permdesc_modifyAudioSettings" msgid="7343951185408396919">"Tillader, at appen kan ændre globale lydindstillinger, f.eks. lydstyrke og kanalisering."</string>
- <string name="permlab_recordAudio" msgid="3876049771427466323">"optag lyd"</string>
+ <string name="permlab_recordAudio" msgid="3876049771427466323">"optage lyd"</string>
<string name="permdesc_recordAudio" msgid="2387462233976248635">"Tillader, at appen får adgang til stien til lydoptagelse."</string>
<string name="permlab_camera" msgid="3616391919559751192">"tag billeder og optag video"</string>
<string name="permdesc_camera" msgid="1507407407002492176">"Tillader, at appen kan tage billeder og optage video med kameraet. Dette tillader, at appen når som helst kan indsamle billeder, som kameraet kan se."</string>
@@ -390,7 +392,7 @@
<string name="permdesc_asec_mount_unmount" msgid="3451360114902490929">"Tillader, at appen kan montere/demontere det interne lager."</string>
<string name="permlab_asec_rename" msgid="7496633954080472417">"omdøbe internt lager"</string>
<string name="permdesc_asec_rename" msgid="1794757588472127675">"Tillader, at appen kan omdøbe det interne lager."</string>
- <string name="permlab_vibrate" msgid="7768356019980849603">"kontroller vibrator"</string>
+ <string name="permlab_vibrate" msgid="7768356019980849603">"kontrollere vibrator"</string>
<string name="permdesc_vibrate" msgid="6284989245902300945">"Tillader, at appen kan kontrollere vibratoren."</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"kontroller lommelygte"</string>
<string name="permdesc_flashlight" msgid="6522284794568368310">"Tillader, at appen kan kontrollere lommelygten."</string>
@@ -418,7 +420,7 @@
<string name="permlab_readPhoneState" msgid="2326172951448691631">"læs telefontilstand og identitet"</string>
<string name="permdesc_readPhoneState" msgid="5127767618743602782">"Tillader, at appen kan få adgang til enhedens telefonfunktioner. En app med denne tilladelse kan fastlægge telefonens telefon- og serienummer, om et opkald er aktivt, det nummer, som opkaldet er tilknyttet osv."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"afhold tabletcomputeren fra at gå i dvale"</string>
- <string name="permlab_wakeLock" product="default" msgid="573480187941496130">"afhold telefonen fra at gå i dvale"</string>
+ <string name="permlab_wakeLock" product="default" msgid="573480187941496130">"afholde telefonen fra at gå i dvale"</string>
<string name="permdesc_wakeLock" product="tablet" msgid="7311319824400447868">"Tillader, at appen kan forhindre tabletten i at gå i dvale."</string>
<string name="permdesc_wakeLock" product="default" msgid="8559100677372928754">"Tillader, at appen kan forhindre, at telefonen går i dvale."</string>
<string name="permlab_devicePower" product="tablet" msgid="2787034722616350417">"tænd eller sluk for tabletcomputeren"</string>
@@ -447,11 +449,11 @@
<string name="permdesc_getAccounts" product="default" msgid="2735689364629830348">"Tillader, at appen kan hente listen over konti, der er kendt af telefonen."</string>
<string name="permlab_authenticateAccounts" msgid="3940505577982882450">"fungerer som en kontogodkender"</string>
<string name="permdesc_authenticateAccounts" msgid="5472124296908977260">"Tillader, at en app kan bruge kontoadministratorens kontogodkendelsesegenskaber, bl.a. oprettelse af konti samt hentning og angivelse af deres adgangskoder."</string>
- <string name="permlab_manageAccounts" msgid="4440380488312204365">"administrer kontolisten"</string>
+ <string name="permlab_manageAccounts" msgid="4440380488312204365">"administrere kontolisten"</string>
<string name="permdesc_manageAccounts" msgid="8698295625488292506">"Tillader, at appen kan foretage handlinger såsom at tilføje og fjerne konti og slette adgangskoden."</string>
- <string name="permlab_useCredentials" msgid="6401886092818819856">"brug en kontos godkendelsesoplysninger"</string>
+ <string name="permlab_useCredentials" msgid="6401886092818819856">"bruge en kontos godkendelsesoplysninger"</string>
<string name="permdesc_useCredentials" msgid="7984227147403346422">"Tillader, at appen kan anmode om godkendelsestokens."</string>
- <string name="permlab_accessNetworkState" msgid="6865575199464405769">"vis netværkstilstand"</string>
+ <string name="permlab_accessNetworkState" msgid="6865575199464405769">"vise netværkstilstand"</string>
<string name="permdesc_accessNetworkState" msgid="479772796952547198">"Tillader, at appen kan vise tilstanden for alle netværk."</string>
<string name="permlab_createNetworkSockets" msgid="9121633680349549585">"fuld internetadgang"</string>
<string name="permdesc_createNetworkSockets" msgid="5963922297444265950">"Tillader, at appen kan skabe netværkssockets."</string>
@@ -483,11 +485,11 @@
<string name="permdesc_nfc" msgid="7120611819401789907">"Tillader, at appen kan kommunikere med NFC-tags (Near Field Communication), -kort og -læsere."</string>
<string name="permlab_disableKeyguard" msgid="4977406164311535092">"deaktiver tastaturlås"</string>
<string name="permdesc_disableKeyguard" msgid="6231611286892232626">"Tillader, at appen kan deaktivere tastaturlåsen og al associeret adgangskodesikkerhed. Et legitimt eksempel på dette er, at telefonen deaktiverer tastaturlåsen ved indgående telefonopkald, og aktiverer tastaturlåsen igen, når opkaldet er afsluttet."</string>
- <string name="permlab_readSyncSettings" msgid="6201810008230503052">"læs indstillinger for synkronisering"</string>
+ <string name="permlab_readSyncSettings" msgid="6201810008230503052">"læse indstillinger for synkronisering"</string>
<string name="permdesc_readSyncSettings" msgid="5464056785274229278">"Tillader, at appen kan læse synkroniseringsindstillingerne, f.eks. om synkronisering er aktiveret for appen Personer."</string>
- <string name="permlab_writeSyncSettings" msgid="6297138566442486462">"skriv indstillinger for synkronisering"</string>
+ <string name="permlab_writeSyncSettings" msgid="6297138566442486462">"skrive indstillinger for synkronisering"</string>
<string name="permdesc_writeSyncSettings" msgid="1466056564502117130">"Tillader, at appen kan ændre indstillingerne for synkronisering, f.eks. om appen Personer skal synkroniseres."</string>
- <string name="permlab_readSyncStats" msgid="7396577451360202448">"læs synkroniseringsstatistikker"</string>
+ <string name="permlab_readSyncStats" msgid="7396577451360202448">"læse synkroniseringsstatistikker"</string>
<string name="permdesc_readSyncStats" msgid="3801971839939951678">"Tillader, at appen kan læse synkroniseringsstatistikker, f.eks. synkroniseringshistorikken."</string>
<string name="permlab_subscribedFeedsRead" msgid="4756609637053353318">"læs abonnerede feeds"</string>
<string name="permdesc_subscribedFeedsRead" msgid="5557058907906144505">"Tillader, at appen kan hente oplysninger om de feeds, der synkroniseres."</string>
@@ -747,9 +749,9 @@
<string name="autofill_parish" msgid="8202206105468820057">"Sogn"</string>
<string name="autofill_area" msgid="3547409050889952423">"Område"</string>
<string name="autofill_emirate" msgid="2893880978835698818">"Emirat"</string>
- <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"læs browserens oversigt og bogmærker"</string>
+ <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"læse browserens oversigt og bogmærker"</string>
<string name="permdesc_readHistoryBookmarks" msgid="4577476392604595921">"Tillader, at appen kan læse alle de webadresser, som Browser har besøgt, og alle bogmærker i Browser."</string>
- <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"skriv browserens oversigt og bogmærker"</string>
+ <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"skrive i browserens oversigt og bogmærker"</string>
<string name="permdesc_writeHistoryBookmarks" product="tablet" msgid="1757103804824209530">"Tillader, at appen kan ændre historik eller bogmærker i Browser, som er gemt på din tablet. Ondsindede apps kan bruge dette til at slette eller ændre dine browserdata."</string>
<string name="permdesc_writeHistoryBookmarks" product="default" msgid="6693764355720719197">"Tillader, at appen kan ændre browserhistorikken eller bogmærker, der er gemt på din telefon. Ondsindede apps kan bruge dette til at slette eller ændre dine browserdata."</string>
<string name="permlab_setAlarm" msgid="5924401328803615165">"angiv alarm i alarmprogram"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Angiv dato"</string>
<string name="date_time_set" msgid="5777075614321087758">"Angiv"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Standard"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NYHED! "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Der kræves ingen tilladelser"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Skjul"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Vis alle"</b></string>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index 3b3d08d..426a8c8 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"App-Komponenten aktivieren oder deaktivieren"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Ermöglicht der App, Komponenten einer anderen App zu aktivieren oder zu deaktivieren. Schädliche Apps können so wichtige Tabletfunktionen deaktivieren. Bei der Erteilung dieser Berechtigung ist Vorsicht geboten, da die App-Komponenten unbrauchbar, inkonsistent oder instabil werden können."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Ermöglicht der App, Komponenten einer anderen App zu aktivieren oder zu deaktivieren. Schädliche Apps können so wichtige Telefonfunktionen deaktivieren. Bei der Erteilung dieser Berechtigung ist Vorsicht geboten, da die App-Komponenten unbrauchbar, inkonsistent oder instabil werden können."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"Berechtigungen erteilen oder entziehen"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Hiermit kann eine App sich selbst oder anderen Apps bestimmte Berechtigungen erteilen oder entziehen. Schädliche Apps können hierdurch Zugriff auf Funktionen erlangen, den Sie nicht gewährt haben."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"Bevorzugte Apps festlegen"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Ermöglicht der App, Änderungen an Ihren bevorzugten Apps vorzunehmen. Schädliche Apps können so aktive Apps ohne Ihr Wissen ändern, damit die vorhandenen Apps private Daten von Ihnen erfassen."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"allgemeine Systemeinstellungen ändern"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Datum festlegen"</string>
<string name="date_time_set" msgid="5777075614321087758">"Speichern"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Standard"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"Neu: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Keine Berechtigungen erforderlich"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Ausblenden"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Alle anzeigen"</b></string>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index e2bc244..91da279 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"ενεργοποίηση ή απενεργοποίηση στοιχείων εφαρμογής"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Επιτρέπει στην εφαρμογή την αλλαγή της κατάστασης ενεργοποίησης κάποιου στοιχείου. Τυχόν κακόβουλες εφαρμογές μπορούν να χρησιμοποιήσουν αυτήν τη δυνατότητα για την απενεργοποίηση σημαντικών δυνατοτήτων του tablet. Αυτή η άδεια θα πρέπει να χρησιμοποιείται προσεκτικά, καθώς είναι πιθανό να θέσει τα στοιχεία εφαρμογών σε κατάσταση αχρηστίας, μη συνοχής και αστάθειας."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Επιτρέπει στην εφαρμογή την αλλαγή της κατάστασης ενεργοποίησης κάποιου στοιχείου. Τυχόν κακόβουλες εφαρμογές μπορούν να χρησιμοποιήσουν αυτήν τη δυνατότητα για την απενεργοποίηση σημαντικών δυνατοτήτων του τηλεφώνου. Αυτή η άδεια θα πρέπει να χρησιμοποιείται προσεκτικά, καθώς είναι πιθανό να θέσει τα στοιχεία εφαρμογών σε κατάσταση αχρηστίας, μη συνοχής και αστάθειας."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"εκχώρηση ή ανάκληση δικαιωμάτων"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Επιτρέπει σε μια εφαρμογή να εκχωρήσει ή να ανακαλέσει ειδικά δικαιώματα για αυτήν ή για άλλες εφαρμογές. Οι κακόβουλες εφαρμογές μπορεί να το χρησιμοποιήσουν αυτό ώστε να αποκτήσουν πρόσβαση σε λειτουργίες για τις οποίες δεν τους έχει εκχωρηθεί δικαίωμα."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"ορισμός προτιμώμενων εφαρμογών"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Επιτρέπει στην εφαρμογή την τροποποίηση των εφαρμογών της προτίμησής σας. Τυχόν κακόβουλες εφαρμογές ενδέχεται να να αλλάξουν χωρίς ειδοποίηση τις εφαρμογές που εκτελούνται, \"ξεγελώντας\" τις υπάρχουσες εφαρμογές ώστε να συλλέξουν ιδιωτικά δεδομένα από εσάς."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"τροποποίηση καθολικών ρυθμίσεων συστήματος"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Ορισμός ημερομηνίας"</string>
<string name="date_time_set" msgid="5777075614321087758">"Ορισμός"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Προεπιλεγμένο"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"ΝΕΟ: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Δεν απαιτούνται άδειες"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Απόκρυψη"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Εμφάνιση όλων"</b></string>
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index bed4de2..cfd9965 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"enable or disable app components"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Allows the app to change whether a component of another app is enabled or not. Malicious apps may use this to disable important tablet capabilities. Care must be taken with this permission, as it is possible to get app components into an unusable, inconsistent or unstable state."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Allows the app to change whether a component of another app is enabled or not. Malicious apps may use this to disable important phone capabilities. Care must be taken with this permission, as it is possible to get app components into an unusable, inconsistent or unstable state."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"grant or revoke permissions"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Allows an application to grant or revoke specific permissions for it or other applications. Malicious applications may use this to access features for which you have not granted them permission."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"set preferred apps"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Allows the app to modify your preferred apps. Malicious apps may silently change the apps that are run, spoofing your existing apps to collect private data from you."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"modify global system settings"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Set date"</string>
<string name="date_time_set" msgid="5777075614321087758">"Set"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Default"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NEW: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"No permission required"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Hide"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Show all"</b></string>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 58df147..fe292e6 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"activar o desactivar componentes de la aplicación"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Permite que la aplicación determine si un componente de otra aplicación está habilitado o no. Las aplicaciones maliciosas pueden utilizar este permiso para desactivar funciones importantes de la tableta. Es necesario ser precavido con este permiso, ya que es posible que los componentes de la aplicación queden inservibles, incoherentes o inestables."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Permite que la aplicación determine si un componente de otra aplicación está habilitado o no. Las aplicaciones maliciosas pueden utilizar este permiso para desactivar funciones importantes del dispositivo. Es necesario ser precavido con este permiso, ya que es posible que los componentes de la aplicación queden inservibles, incoherentes o inestables."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"Otorgar o revocar permisos"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Permite a una aplicación otorgar permisos específicos a otras aplicaciones, autoconcedérselos o revocarlos. Las aplicaciones maliciosas pueden así acceder a funciones para las que no les otorgaste permiso."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"establecer aplicaciones preferidas"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Permite que la aplicación modifique tus aplicaciones preferidas. Las aplicaciones maliciosas pueden modificar sin aviso las aplicaciones que se ejecutan y así engañar a tus aplicaciones existentes para que recopilen tu información privada."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"modificar la configuración global del sistema"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Configurar fecha"</string>
<string name="date_time_set" msgid="5777075614321087758">"Establecer"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Predeterminado"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NUEVO: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"No se requieren permisos"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Ocultar"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Mostrar todos"</b></string>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index 9499214..d0c0cb9 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"habilitar o inhabilitar componentes de la aplicación"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Permite que la aplicación determine si un componente de otra aplicación está habilitado o inhabilitado. Las aplicaciones malintencionadas pueden usar este permiso para inhabilitar funciones importantes del tablet. Este permiso se debe usar con precaución, ya que los componentes de las aplicaciones se pueden volver inestables, incoherentes o inservibles."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Permite que la aplicación determine si un componente de otra aplicación está habilitado o inhabilitado. Las aplicaciones malintencionadas pueden usar este permiso para inhabilitar funciones importantes del teléfono. Este permiso se debe usar con precaución, ya que los componentes de las aplicaciones se pueden volver inestables, incoherentes o inservibles."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"conceder o revocar permisos"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Permite que una aplicación conceda o revoque permisos específicos para sí misma o para otras aplicaciones. Las aplicaciones malintencionadas pueden aprovechar este permiso para acceder a funciones sin tu autorización."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"establecer aplicaciones preferidas"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Permite que la aplicación modifique las aplicaciones preferidas del usuario. De esta forma, las aplicaciones malintencionadas pueden cambiar sin aviso las aplicaciones que se están ejecutando y falsificarlas para obtener datos privados del usuario."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"modificar la configuración global del sistema"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Establecer fecha"</string>
<string name="date_time_set" msgid="5777075614321087758">"Establecer"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Predeterminado"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NUEVO:"</font></string>
<string name="no_permissions" msgid="7283357728219338112">"No es necesario ningún permiso"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Ocultar"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Mostrar todos"</b></string>
diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml
index da06538..2a4352d 100644
--- a/core/res/res/values-et/strings.xml
+++ b/core/res/res/values-et/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"Rakenduse komponentide lubamine või keelamine"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Võimaldab rakendusel määrata, kas teise rakenduse komponent on lubatud või mitte. Pahatahtlikud rakendused võivad kasutada seda oluliste tahvelarvutirakenduste keelamiseks. Nende õiguste puhul peab olema ettevaatlik, kuna need võimaldavad muuta rakenduse komponente kasutuks, ebaühtlaseks või ebastabiilseks."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Võimaldab rakendusel määrata, kas teise rakenduse komponent on lubatud või mitte. Pahatahtlikud rakendused võivad kasutada seda oluliste telefonirakenduste keelamiseks. Nende õiguste puhul peab olema ettevaatlik, kuna need võimaldavad muuta rakenduse komponente kasutuks, ebaühtlaseks või ebastabiilseks."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"lubade andmine või tühistamine"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Võimaldab rakendusel anda või tühistada teatud lubasid endale või teistele rakendustele. Pahatahtlikud rakendused võivad kasutada seda juurdepääsu hankimiseks sellistele funktsioonidele, mille jaoks te pole luba andnud."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"Eelistatud rakenduste määramine"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Võimaldab rakendusel muuta teie eelistatud rakendusi. Pahatahtlikud rakendused võivad salaja muuta töötavaid rakendusi, pettes teie olemasolevad rakendused koguma teilt privaatseid andmeid."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"muuda üldisi süsteemiseadeid"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Kuupäeva määramine"</string>
<string name="date_time_set" msgid="5777075614321087758">"Määra"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Vaikimisi"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"UUS: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Lube pole vaja"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Peida"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Näita kõiki"</b></string>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index 68988f2..084e16d 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -313,6 +313,10 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"فعال یا غیر فعال کردن اجزای برنامه"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"به برنامه اجازه می‎دهد تا فعال بودن یا نبودن اجزای برنامه دیگر را تغییر دهد. برنامه‎های مخرب می‎توانند از آن استفاده کنند تا قابلیتهای مهم رایانه لوحی را غیرفعال کنند. باید دقت کرد که با این مجوز ممکن است وضعیت اجزای برنامه ناپایدار، ناهماهنگ یا غیرقابل استفاده شود."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"به برنامه اجازه می‎دهد تا فعال بودن یا غیرفعال بودن جزئیات برنامه دیگر را تغییر دهد. برنامه‎های مخرب می‎توانند از آن استفاده کنند تا ویژگیهای مهم را غیرفعال کنند. برای این مجوز باید دقت کنید چون ممکن است وضعیت جزئیات برنامه ناپایدار، بی‎ثبات یا غیرقابل استفاده شود."</string>
+ <!-- no translation found for permlab_grantRevokePermissions (4627315351093508795) -->
+ <skip />
+ <!-- no translation found for permdesc_grantRevokePermissions (4088642654085850662) -->
+ <skip />
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"تنظیم برنامه‎های ترجیحی"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"به برنامه اجازه می‎دهد تا برنامه‎های ترجیحی شما را تغییر دهد. برنامه‎های مخرب می‎توانند بدون اعلان برنامه‎هایی را که اجرا می‎شوند، تغییر دهند خود را به جای برنامه‎های کنونی قلمداد کنند تا داده‎های شخصی را از شما جمع آوری کنند."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"اصلاح کردن تنظیمات سیستم کلی"</string>
@@ -1004,6 +1008,8 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"تاریخ تنظیم"</string>
<string name="date_time_set" msgid="5777075614321087758">"تنظیم"</string>
<string name="default_permission_group" msgid="2690160991405646128">"پیش فرض"</string>
+ <!-- no translation found for perms_new_perm_prefix (8257740710754301407) -->
+ <skip />
<string name="no_permissions" msgid="7283357728219338112">"مجوزی لازم نیست"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"پنهان کردن"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"نمایش همه"</b></string>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index 2fe9b4e..ee7efc8 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"sovelluskomponenttien ottaminen käyttöön tai pois käytöstä"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Antaa sovelluksen muuttaa, onko toisen sovelluksen komponentti käytössä vai ei. Haitalliset sovellukset voivat käyttää tätä tablet-laitteen tärkeiden ominaisuuksien poistamiseen käytöstä. Tämän luvan käyttöönotto edellyttää varovaisuutta, sillä sen avulla sovelluskomponentit on mahdollista saada epäkäytettävään, epäyhtenäiseen tai epävakaaseen tilaan."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Antaa sovelluksen muuttaa sitä, onko toisen sovelluksen komponentti käytössä vai ei. Haitalliset sovellukset voivat käyttää tätä puhelimen tärkeiden ominaisuuksien poistamiseen käytöstä. Tämän luvan käyttöönotto edellyttää varovaisuutta, sillä sen avulla sovelluskomponentit on mahdollista saada epäkäytettävään, epäyhtenäiseen tai epävakaaseen tilaan."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"myönnä tai kiellä käyttöluvat"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Antaa sovelluksen myöntää tai kieltää tiettyjä käyttööoikeuksia itselleen tai muille sovelluksille. Haittaohjelmat voivat käyttää tämän ominaisuuden avulla toimintoja, joiden käyttöön et ole antanut lupaa."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"ensisijaisten sovellusten asettaminen"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Antaa sovelluksen muokata ensisijaisia sovelluksia. Haitalliset sovellukset voivat muuttaa käynnistettäviä sovelluksia huomaamattomasti ja kerätä henkilökohtaisia tietoja matkimalla nykyisiä sovelluksia."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"muokkaa yleisiä järjestelmän asetuksia"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Aseta päivämäärä"</string>
<string name="date_time_set" msgid="5777075614321087758">"Aseta"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Oletus"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"UUTTA: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Lupia ei tarvita"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Piilota"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Näytä kaikki"</b></string>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index d6e8f30..bca5701 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"activer ou désactiver les composants de l\'application"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Permet à l\'application d\'activer ou de désactiver un composant d\'une autre application. Des applications malveillantes peuvent exploiter cette fonctionnalité pour désactiver les fonctionnalités principales de votre tablette. Cette autorisation doit être utilisée avec prudence, car elle peut rendre les composants d\'une application instables, voire inutilisables."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Permet à l\'application d\'activer ou de désactiver un composant d\'une autre application. Des applications malveillantes peuvent exploiter cette fonctionnalité pour désactiver les fonctionnalités principales de votre téléphone. Cette autorisation doit être utilisée avec prudence, car elle peut rendre les composants d\'une application instables, voire inutilisables."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"accorder ou révoquer des autorisations"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Permet à une application d\'accorder ou de révoquer des autorisations spécifiques pour celle-ci ou pour d\'autres applications. Des applications malveillantes peuvent exploiter cette autorisation pour accéder à des fonctionnalités auxquelles vous ne leur avez pas donné l\'accès."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"définir les applications préférées"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Permet à l\'application de modifier vos applications préférées. Des applications malveillantes peuvent exploiter cette fonctionnalité pour modifier les applications exécutées en usurpant l\'identité de vos applications existantes dans le but de recueillir des données privées."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"Modification des paramètres généraux du système"</string>
@@ -765,7 +767,7 @@
<string name="permlab_serialPort" msgid="546083327654631076">"accéder aux ports série"</string>
<string name="permdesc_serialPort" msgid="2991639985224598193">"Permet à l\'application autorisée d\'accéder aux ports série avec l\'API SerialManager."</string>
<string name="permlab_accessContentProvidersExternally" msgid="5077774297943409285">"accès externe fournisseurs de contenu"</string>
- <string name="permdesc_accessContentProvidersExternally" msgid="4544346486697853685">"Permettre à l\'application titulaire d\'accéder à des fournisseurs de contenu depuis l\'interface. Les applications standards ne devraient jamais avoir recours à cette autorisation."</string>
+ <string name="permdesc_accessContentProvidersExternally" msgid="4544346486697853685">"Permettre à l\'application titulaire d\'accéder à des fournisseurs de contenu depuis la commande shell. Les applications standards ne devraient jamais avoir recours à cette autorisation."</string>
<string name="save_password_message" msgid="767344687139195790">"Voulez-vous que le navigateur se souvienne de ce mot de passe ?"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"Pas maintenant"</string>
<string name="save_password_remember" msgid="6491879678996749466">"Mémoriser"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Définir la date"</string>
<string name="date_time_set" msgid="5777075614321087758">"Définir"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Par défaut"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NOUVEAU"</font>" :"</string>
<string name="no_permissions" msgid="7283357728219338112">"Aucune autorisation requise"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Masquer"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Tout afficher"</b></string>
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index f5a3cb7..1454253 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"एप्‍लिकेशन घटकों को सक्षम या अक्षम करें"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"एप्‍लिकेशन को यह बदलने देता है कि किसी अन्‍य एप्‍लिकेशन का घटक सक्षम है या नहीं. दुर्भावनापूर्ण एप्‍लिकेशन महत्‍वपूर्ण फ़ोन क्षमताओं को अक्षम करने में इसका उपयोग कर सकते हैं. इस अनुमति का उपयोग सावधानी के साथ करना चाहिए, क्योंकि इससे एप्‍लिकेशन घटकों के अनुपयोगी, असंगत, या अस्‍थिर स्‍थिति में जाने की संभावना है."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"एप्‍लिकेशन को यह बदलने देता है कि किसी अन्‍य एप्‍लिकेशन का घटक सक्षम है या नहीं. दुर्भावनापूर्ण एप्‍लिकेशन महत्‍वपूर्ण फ़ोन क्षमताओं को अक्षम करने में इसका उपयोग कर सकते हैं. इस अनुमति का उपयोग सावधानी के साथ करना चाहिए, क्योंकि इससे एप्‍लिकेशन घटकों के अनुपयोगी, असंगत, या अस्‍थिर स्‍थिति में जाने की संभावना है."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"अनुमति दें या रद्द करें"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"एप्लिकेशन को उसके या अन्य एप्लिकेशन के लिए विशेष अनुमतियां देने या रद्द करने देता है. दुर्भावनापूर्ण एप्लिकेशन इसका उपयोग उन विशेषताओं तक पहुंचने के लिए कर सकते हैं जो आपने उन्हें नहीं दी हैं."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"पसंदीदा एप्‍लिकेशन सेट करें"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"एप्लिकेशन को आपके पसंदीदा एप्लिकेशन को संशोधित करने देता है. दुर्भावनापूर्ण एप्लिकेशन आपसे निजी डेटा एकत्रित करने के लिए आपके मौजूदा एप्लिकेशन को स्पूफ़ करके, चलाए जाने वाले एप्लिकेशन को चुपचाप बदल सकते हैं."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"वैश्विक सिस्‍टम सेटिंग संशोधित करें"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"दिनांक सेट करें"</string>
<string name="date_time_set" msgid="5777075614321087758">"सेट करें"</string>
<string name="default_permission_group" msgid="2690160991405646128">"डिफ़ॉल्ट"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"नया: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"किसी अनुमति की आवश्‍यकता नहीं है"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"छुपाएं"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"सभी दिखाएं"</b></string>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index 0137866..1908840 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"omogućavanje ili onemogućavanje komponenti aplikacije"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Omogućuje aplikaciji da promijeni hoće li komponenta neke druge aplikacije biti omogućena ili neće. Zlonamjerne aplikacije mogu to upotrijebiti da bi onemogućile važne mogućnosti tabletnog računala. Treba biti oprezan s tom dozvolom jer je moguće dovesti komponente aplikacija u neupotrebljivo, nedosljedno ili nestabilno stanje."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Omogućuje aplikaciji da promijeni hoće li komponenta neke druge aplikacije biti omogućena. Zlonamjerne aplikacije mogu to upotrijebiti da bi onemogućile važne mogućnosti telefona. Treba biti oprezan s tom dozvolom jer je moguće dovesti komponente aplikacija u neupotrebljivo, nedosljedno ili nestabilno stanje."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"dati ili oduzeti dopuštenja"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Aplikaciji omogućuje da odobri ili odbije određena dopuštenja za sebe ili druge aplikacije. Zlonamjerne aplikacije to mogu upotrijebiti za pristup značajkama za koje im niste odobrili pristup."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"postavljanje željenih aplikacija"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Omogućuje aplikaciji promjenu vaših željenih aplikacija. Zlonamjerne aplikacije mogu potajno promijeniti aplikacije koje su pokrenute, zavaravajući vaše postojeće aplikacije kako bi prikupljale privatne podatke od vas."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"izmjena postavki globalnog sustava"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Postavi datum"</string>
<string name="date_time_set" msgid="5777075614321087758">"Postavi"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Zadano"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NOVO: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Nije potrebno dopuštenje"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Sakrij"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Pokaži sve"</b></string>
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index 54e8b06..81f697b 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"alkalmazáskomponensek be- és kikapcsolása"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Lehetővé teszi az alkalmazás számára annak módosítását, hogy más alkalmazások komponensei engedélyezve vannak-e vagy sem. A rosszindulatú alkalmazások ezt a táblagép fontos funkcióinak kikapcsolására használhatják. Óvatosan kell eljárni az engedély megadásával, mert lehetséges, hogy a komponensek használhatatlanok, inkonzisztensek vagy instabilak lesznek."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Lehetővé teszi az alkalmazás számára annak módosítását, hogy más alkalmazások komponensei engedélyezve vannak-e vagy sem. A rosszindulatú alkalmazások ezt a telefon fontos funkcióinak kikapcsolására használhatják. Óvatosan kell eljárni az engedély megadásával, mert lehetséges, hogy a komponensek használhatatlanok, inkonzisztensek vagy instabilak lesznek."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"engedélyek megadása vagy visszavonása"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Lehetővé teszi, hogy egy alkalmazás engedélyeket adjon vagy vonjon vissza saját maga vagy más alkalmazás számára. A rosszindulatú alkalmazások olyan funkciókhoz való hozzáféréshez használhatják ezt, amelyeket nem engedélyezett számukra."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"előnyben részesített alkalmazások beállítása"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Lehetővé teszi az alkalmazás számára a preferált alkalmazások módosítását. A rosszindulatú alkalmazások ezáltal észrevétlenül megváltoztathatják a futó alkalmazásokat, személyes adatokat gyűjtve Öntől."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"rendszer globális beállításainak módosítása"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Dátum beállítása"</string>
<string name="date_time_set" msgid="5777075614321087758">"Beállítás"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Alapértelmezett"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"ÚJ: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Nincs szükség engedélyre"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Elrejtés"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Az összes megjelenítése"</b></string>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index ac5d463..08b0f60 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"mengaktifkan atau menonaktifkan komponen apl"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Mengizinkan apl mengubah apakah komponen apl lain diaktifkan atau tidak. Apl berbahaya dapat menggunakan ini untuk menonaktifkan kemampuan tablet yang penting. Izin ini harus digunakan dengan hati-hati karena dapat menjadikan komponen apl tidak dapat digunakan, tidak konsisten, atau tidak stabil."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Mengizinkan apl mengubah apakah komponen apl lain diaktifkan atau tidak. Apl berbahaya dapat menggunakan izin ini untuk menonaktifkan kemampuan ponsel yang penting. Izin ini harus digunakan dengan hati-hati, karena mungkin saja menjadikan komponen apl tidak dapat digunakan, tidak konsisten, atau tidak stabil."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"memberi atau mencabut izin"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Memungkinkan aplikasi memberikan atau mencabut izin khusus untuk aplikasi tersebut atau aplikasi lainnya. Aplikasi berbahaya dapat menggunakannya untuk mengakses fitur yang tidak Anda beri izin."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"menyetel apl yang disukai"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Mengizinkan apl memodifikasi apl pilihan Anda. Apl berbahaya dapat diam-diam mengubah apl yang berjalan, menipu apl yang ada untuk mengumpulkan data pribadi dari Anda."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"ubah setelan sistem global"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Setel tanggal"</string>
<string name="date_time_set" msgid="5777075614321087758">"Setel"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Bawaan"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"BARU: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Tidak perlu izin"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Sembunyikan"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Tampilkan semua"</b></string>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 77733b3..21855eb 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"attivazione/disattivazione componenti applicazioni"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Consente all\'applicazione di cambiare lo stato di attivazione o disattivazione del componente di un\'altra applicazione. Le applicazioni dannose potrebbero farne uso per disattivare importanti funzionalità del tablet. È necessario prestare attenzione con questa autorizzazione perché è possibile rendere inutilizzabili, incoerenti o instabili i componenti delle applicazioni."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Consente all\'applicazione di cambiare lo stato di attivazione o disattivazione del componente di un\'altra applicazione. Le applicazioni dannose potrebbero farne uso per disattivare importanti funzionalità del telefono. È necessario prestare attenzione con questa autorizzazione perché è possibile rendere inutilizzabili, incoerenti o instabili i componenti delle applicazioni."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"concessione o revoca di autorizzazioni"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Consente a un\'applicazione di concedere o revocare autorizzazioni specifiche per essa o per altre applicazioni. Le applicazioni dannose potrebbero utilizzare questa autorizzazione per accedere a funzioni che non hai concesso loro."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"impostazione applicazioni preferite"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Consente all\'applicazione di modificare le tue applicazioni preferite. Le applicazioni dannose potrebbero cambiare di nascosto le applicazioni che vengono eseguite, facendo in modo che le applicazioni esistenti raccolgano dati riservati su di te."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"modifica impostazioni di sistema globali"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Imposta data"</string>
<string name="date_time_set" msgid="5777075614321087758">"Imposta"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Predefinito"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NUOVA: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Nessuna autorizzazione richiesta"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Nascondi"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Mostra tutto"</b></string>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index a232c69..b009ea1 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"הפעלה או השבתה של רכיבי יישומים"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"מאפשר ליישום לשנות את מצב ההפעלה של רכיב ביישום אחר. יישומים זדוניים עלולים להשתמש בכך כדי להשבית יכולות חשובות של הטבלט. יש לנהוג בהרשאה זו בזהירות, מכיוון שהיא יכולה להביא רכיבי יישומים למצב לא שמיש, לא עקבי או לא יציב."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"מאפשר ליישום לשנות את מצב ההפעלה של רכיב ביישום אחר. יישומים זדוניים עלולים להשתמש בכך כדי להשבית יכולות חשובות של הטלפון. יש לנהוג בהרשאה זו בזהירות, מכיוון שהיא יכולה להביא רכיבי יישומים למצב לא שמיש, לא עקבי או לא יציב."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"הענק או בטל הרשאות"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"מאפשר ליישום להעניק או לבטל הרשאות ספציפיות ביחס לעצמו או ליישומים אחרים. יישומים זדוניים עלולים להשתמש באפשרות זו על מנת לקבל גישה לתכונות שלא אישרת להם."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"הגדרת יישומים מועדפים"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"מאפשר ליישום לשנות את היישומים המועדפים עליך. יישומים זדוניים עלולים לשנות בחשאי את היישומים שמופעלים, תוך שידול במרמה של היישומים הקיימים שלך לאסוף ממך נתונים פרטיים."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"שנה את הגדרות המערכת הכלליות"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"הגדר תאריך"</string>
<string name="date_time_set" msgid="5777075614321087758">"הגדר"</string>
<string name="default_permission_group" msgid="2690160991405646128">"ברירת מחדל"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"חדש: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"לא דרושים אישורים"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"הסתר"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"הצג הכל"</b></string>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index 66e847a..9898734 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"アプリのコンポーネントの有効/無効化"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"別のアプリのコンポーネントの有効/無効を変更することをアプリに許可します。この許可を悪意のあるアプリに利用されると、タブレットの重要な機能が無効にされる恐れがあります。アプリのコンポーネントが利用できなくなったり、整合性が取れなくなったり、不安定な状態になったりする恐れがあるので許可には注意が必要です。"</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"別のアプリのコンポーネントの有効/無効を変更することをアプリに許可します。この許可を悪意のあるアプリに利用されると、携帯端末の重要な機能が無効にされる恐れがあります。アプリのコンポーネントが利用できなくなったり、整合性が取れなくなったり、不安定な状態になったりする恐れがあるので許可には注意が必要です。"</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"権限の許可または取り消し"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"このアプリケーションや他のアプリケーションに対して特定の権限を許可したり取り消したりすることをアプリケーションに許可します。悪意のあるアプリケーションがユーザーの許可なく複数の機能にアクセスする恐れがあります。"</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"優先アプリの設定"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"優先アプリを変更することをアプリに許可します。この許可を悪意のあるアプリに利用されると、実行中のアプリが密かに変更され、既存のアプリへのなりすましにより非公開データがだまし取られる恐れがあります。"</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"システムの全般設定の変更"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"日付設定"</string>
<string name="date_time_set" msgid="5777075614321087758">"設定"</string>
<string name="default_permission_group" msgid="2690160991405646128">"端末既定"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NEW: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"権限の許可は必要ありません"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"隠す"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"すべて表示"</b></string>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 754f791..5eea0ba 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"앱 구성요소 사용 또는 사용 안함"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"앱이 다른 앱 구성요소 사용 여부를 변경할 수 있도록 허용합니다. 이 경우 악성 앱이 이 기능을 이용하여 중요한 태블릿 기능을 중지시킬 수 있습니다. 이 권한을 허용할 경우 앱 구성요소가 사용 불가능하게 되거나 일관성이 맞지 않거나 불안정해질 수 있으므로 주의해야 합니다."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"앱이 다른 앱 구성요소 사용 여부를 변경할 수 있도록 허용합니다. 이 경우 악성 앱이 이 기능을 이용하여 중요한 휴대전화 기능을 중지시킬 수 있습니다. 이 권한을 허용할 경우 앱 구성요소가 사용 불가능하게 되거나 일관성이 맞지 않거나 불안정해질 수 있으므로 주의해야 합니다."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"권한 승인 또는 취소"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"애플리케이션이 해당 애플리케이션 및 기타 애플리케이션에 대한 특정 권한을 승인 또는 취소하도록 허용합니다. 이 경우 악성 애플리케이션이 승인되지 않은 기능에 액세스할 수 있습니다."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"기본 앱 설정"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"앱이 기본 앱을 수정할 수 있도록 허용합니다. 이 경우 악성 앱이 실행되는 앱을 몰래 변경하고 기존 앱으로 위장하여 사용자의 개인 정보를 수집할 수 있습니다."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"전체 시스템 설정 수정"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"날짜 설정"</string>
<string name="date_time_set" msgid="5777075614321087758">"설정"</string>
<string name="default_permission_group" msgid="2690160991405646128">"기본값"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"신규: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"권한 필요 없음"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"숨기기"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"모두 표시"</b></string>
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index 43aa1d3..7ea172f 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"įgalinti programos komponentus arba jų neleisti"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Leidžiama programai pakeisti, ar įgalintas kitos programos komponentas, ar ne. Kenkėjiškos programos gali tai naudoti, kad neleistų svarbių planšetinio kompiuterio funkcijų. Šį leidimą reikia naudoti atsargiai, nes programos komponentai gali tapti nenaudojami, nenuoseklūs ar nestabilūs."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Leidžiama programai pakeisti nustatymą, ar įgalintas kitos programos komponentas, ar ne. Kenkėjiškos programos gali tai naudoti, kad neleistų svarbių telefono funkcijų. Šį leidimą reikia naudoti atsargiai, nes programos komponentai gali tapti nenaudojami, nenuoseklūs ar nestabilūs."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"suteikti arba panaikinti leidimus"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Programai leidžiama suteikti arba panaikinti konkrečius savo arba kitų programų leidimus. Tuo pasinaudoję kenkėjiškos programos gali pasiekti funkcijas, kurių pasiekti joms neleidote."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"nustatyti pageidaujamas programas"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Leidžiama programai keisti jūsų pageidaujamas programas. Kenkėjiškos programos gali nepastebimai pakeisti vykdomas programas, klastodama esamas programas, kad rinktų jūsų privačius duomenis."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"keisti visuotinius sistemos nustatymus"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Nustatyti datą"</string>
<string name="date_time_set" msgid="5777075614321087758">"Nustatyti"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Numatytasis"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NAUJAS: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Nereikia leidimų"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Slėpti"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Rodyti viską"</b></string>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index 5f84a48..1581341 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"iespējot vai atspējot lietotnes komponentus"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Ļauj lietotnei mainīt to, vai tiek iespējots citas lietotnes komponents. Ļaunprātīgas lietotnes to var izmantot, lai atspējotu svarīgas planšetdatora iespējas. Izmantojiet šo atļauju uzmanīgi, jo pastāv iespēja, ka lietotnes komponenti var kļūt neizmantojami, neatbilstīgi vai nestabili."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Ļauj lietotnei mainīt to, vai tiek iespējots citas lietotnes komponents. Ļaunprātīgas lietotnes to var izmantot, lai atspējotu svarīgas tālruņa iespējas. Izmantojiet šo atļauju uzmanīgi, jo pastāv iespēja, ka lietotnes komponenti var kļūt neizmantojami, neatbilstīgi vai nestabili."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"atļauju piešķiršana vai atsaukšana"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Ļauj lietojumprogrammai piešķirt sev vai citām lietojumprogrammām noteiktas atļaujas un atsaukt tās. Ļaunprātīgas lietojumprogrammas var izmantot šo iespēju, lai piekļūtu funkcijām, kuras neesat atļāvis."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"iestatīt vēlamās lietotnes"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Ļauj lietotnei modificēt jūsu vēlamās lietotnes. Ļaunprātīgas lietotnes var nemanāmi mainīt izmantotās lietotnes, atveidojot esošās lietotnes, lai no jums iegūtu privātus datus."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"pārveidot globālos sistēmas iestatījumus"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Datuma iestatīšana"</string>
<string name="date_time_set" msgid="5777075614321087758">"Iestatīt"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Noklusējums"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"JAUNA: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Atļaujas nav nepieciešamas."</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Slēpt"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Rādīt visu"</b></string>
diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml
index 3f240ab..d3c4885 100644
--- a/core/res/res/values-ms/strings.xml
+++ b/core/res/res/values-ms/strings.xml
@@ -313,6 +313,10 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"dayakan atau lumpuhkan komponen apl"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Membenarkan apl untuk menukar sama ada komponen apl lain didayakan atau tidak. Apl hasad boleh menggunakannya untuk melumpuhkan keupayaan telefon yang penting. Berhati-hati semasa menggunakan kebenaran ini, kerana hal ini boleh menjadikan komponen apl berada dalam keadaan tidak boleh digunakan, tidak konsisten, atau tidak stabil."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Membenarkan apl untuk menukar sama ada komponen apl lain didayakan atau tidak. Apl hasad boleh menggunakannya untuk melumpuhkan keupayaan telefon yang penting. Berhati-hati semasa menggunakan kebenaran ini, kerana hal ini boleh menjadikan komponen apl berada dalam keadaan tidak boleh digunakan, tidak konsisten, atau tidak stabil."</string>
+ <!-- no translation found for permlab_grantRevokePermissions (4627315351093508795) -->
+ <skip />
+ <!-- no translation found for permdesc_grantRevokePermissions (4088642654085850662) -->
+ <skip />
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"tetapkan keutamaan apl"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Membenarkan apl untuk mengubah suai apl pilihan anda. Apl hasad secara diam-diam boleh menukar apl yang dijalankan, menipu apl anda yang sedia ada untuk mengumpul data peribadi daripada anda."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"mengubah suai tetapan sistem global"</string>
@@ -1004,6 +1008,8 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Tetapkan tarikh"</string>
<string name="date_time_set" msgid="5777075614321087758">"Tetapkan"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Lalai"</string>
+ <!-- no translation found for perms_new_perm_prefix (8257740710754301407) -->
+ <skip />
<string name="no_permissions" msgid="7283357728219338112">"Tiada kebenaran diperlukan"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Sembunyikan"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Tunjukkan semua"</b></string>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index 63df5f4..ee58558 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"aktivere eller deaktivere appkomponenter"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Lar appen endre hvorvidt en komponent i en annen app er aktivert eller ikke. Ondsinnede apper kan bruke dette til å deaktivere viktige nettbrettfunksjoner. Denne tillatelsen må brukes med forsiktighet, ettersom det er mulig å få appkomponenter inn i en ubrukelig, inkonsistent eller ustabil tilstand."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Lar appen endre hvorvidt en komponent i en annen app er aktivert eller ikke. Ondsinnede apper kan bruke dette til å deaktivere viktige telefonfunksjoner. Denne tillatelsen må brukes med forsiktighet, ettersom det er mulig å få appkomponenter inn i en ubrukelig, inkonsistent eller ustabil tilstand."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"gi eller trekke tilbake tillatelser"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Lar et program gi eller trekke tilbake spesielle tillatelser for eget bruk eller for andre programmer. Skadelige programmer kan bruke dette for å få tilgang til funksjoner de ikke skal ha tilgang til."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"angi foretrukne apper"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Lar appen endre de foretrukne appene dine. Ondsinnede apper kan ubemerket endre apper som kjøres, og forfalske eksisterende apper til å samle private data fra deg."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"endre globale systeminnstillinger"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Angi dato"</string>
<string name="date_time_set" msgid="5777075614321087758">"Lagre"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Standard"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NY: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Trenger ingen rettigheter"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Skjul"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Vis alle"</b></string>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 8e5e8bc..584a7d1 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"componenten van apps in- of uitschakelen"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Hiermee kan de app wijzigen of een component van een andere app wel of niet is ingeschakeld. Schadelijke apps kunnen dit gebruiken om belangrijke tabletfuncties uit te schakelen. U moet voorzichtig omgaan met deze rechten, aangezien het mogelijk is dat onderdelen van apps onbruikbaar, inconsistent of instabiel worden."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Hiermee kan de app wijzigen of een component van een andere app wel of niet is ingeschakeld. Schadelijke apps kunnen dit gebruiken om belangrijke telefoonfuncties uit te schakelen. U moet voorzichtig omgaan met deze rechten, aangezien het mogelijk is dat onderdelen van apps onbruikbaar, inconsistent of instabiel worden."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"rechten verlenen of intrekken"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Toestaan dat een app specifieke rechten aan zichzelf of andere apps verleent of intrekt. Schadelijke apps kunnen dit gebruiken om toegang te krijgen tot functies waartoe u de apps geen toegang heeft gegeven."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"voorkeursapps instellen"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Hiermee kan de app uw voorkeursapps aanpassen. Schadelijke apps kunnen de apps die worden uitgevoerd zonder uw medeweten wijzigen om uw bestaande apps te imiteren en privégegevens van u te verzamelen."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"algemene systeeminstellingen wijzigen"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Datum instellen"</string>
<string name="date_time_set" msgid="5777075614321087758">"Instellen"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Standaard"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NIEUW: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Geen machtigingen vereist"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Verbergen"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Alles weergeven"</b></string>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index c17da8f..4d0e0fa 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"włączanie lub wyłączanie składników aplikacji"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Pozwala aplikacji na włączenie lub wyłączenie składnika innej aplikacji. Złośliwe aplikacje mogą wykorzystać to uprawnienie do wyłączenia ważnych funkcji tabletu. W przypadku tego uprawnienia należy zachować ostrożność, ponieważ istnieje możliwość wprowadzenia składników aplikacji w stan nieużywalności, niespójności lub niestabilności."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Pozwala aplikacji na włączenie lub wyłączenie składnika innej aplikacji. Złośliwe aplikacje mogą wykorzystać to uprawnienie do wyłączenia ważnych funkcji telefonu. W przypadku tego uprawnienia należy zachować ostrożność, ponieważ istnieje możliwość wprowadzenia składników aplikacji w stan nieużywalności, niespójności lub niestabilności."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"przyznaj lub cofnij uprawnienia"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Pozwala aplikacji na przyznanie lub cofnięcie określonych uprawnień do niej lub do innych aplikacji. Złośliwe aplikacje mogą to wykorzystać, by uzyskać dostęp do nieprzyznanych im funkcji."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"ustawianie preferowanych aplikacji"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Pozwala aplikacji na zmianę Twoich preferowanych aplikacji. Złośliwe aplikacje mogą dyskretnie zmienić uruchamiane aplikacje, podszywając się pod dotychczasowe aplikacje w celu zebrania od Ciebie prywatnych danych."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"modyfikowanie ogólnych ustawień systemu"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Ustaw datę"</string>
<string name="date_time_set" msgid="5777075614321087758">"Ustaw"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Domyślne"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NOWE: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Nie są wymagane żadne uprawnienia"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Ukryj"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Pokaż wszystko"</b></string>
@@ -1234,7 +1237,7 @@
<string name="sha1_fingerprint" msgid="7930330235269404581">"Odcisk cyfrowy SHA-1:"</string>
<string name="activity_chooser_view_see_all" msgid="4292569383976636200">"Zobacz wszystkie"</string>
<string name="activity_chooser_view_dialog_title_default" msgid="4710013864974040615">"Wybierz działanie"</string>
- <string name="share_action_provider_share_with" msgid="5247684435979149216">"Udostępnij"</string>
+ <string name="share_action_provider_share_with" msgid="5247684435979149216">"Udostępnij przez"</string>
<string name="status_bar_device_locked" msgid="3092703448690669768">"Urządzenie zablokowane."</string>
<string name="list_delimeter" msgid="3975117572185494152">", "</string>
<string name="sending" msgid="3245653681008218030">"Wysyłanie..."</string>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index 74870ff..9f1e053 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"ativar ou desativar componentes da aplicação"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Permite que a aplicação mude a opção de ativar ou não um componente de outra aplicação. As aplicações maliciosas podem utilizar isto para desativar funcionalidades importantes do tablet. É necessário ter cuidado com esta autorização, uma vez que é possível colocar alguns componentes de aplicações num estado inutilizável, inconsistente ou instável."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Permite que a aplicação mude a opção de ativar ou não um componente de outra aplicação. As aplicações maliciosas podem utilizar isto para desativar funcionalidades importantes do telemóvel. É necessário ter cuidado com esta autorização, uma vez que é possível colocar alguns componentes de aplicações num estado inutilizável, inconsistente ou instável."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"conceder ou revogar permissões"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Permite que uma aplicação conceda ou revogue permissões específicas para si própria ou para outras aplicações. As aplicações maliciosas podem utilizar isto para aceder a funcionalidades para as quais não têm permissão."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"definir aplicações preferidas"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Permite ao aplicativo modificar as suas aplicações preferidas. As aplicações maliciosas podem alterar sem aviso as aplicações que são executadas, espiando as aplicações existentes para recolher os seus dados privados."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"modificar definições globais do sistema"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Definir data"</string>
<string name="date_time_set" msgid="5777075614321087758">"Definir"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Predefinido"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NOVA: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Não são necessárias permissões"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Ocultar"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Mostrar tudo"</b></string>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index efe6833..4826ddf 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"ativar ou desativar os componentes do aplicativo"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Permite que o aplicativo ative ou desative um componente de outro aplicativo. Aplicativos maliciosos podem usar esse recurso para desativar recursos importantes do tablet. Tenha cuidado com essa permissão, pois é possível fazer com que os componentes do aplicativo fiquem inutilizáveis, inconsistentes ou instáveis."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Permite que o aplicativo altere se um componente de outro aplicativo está ativado ou não. Aplicativos maliciosos podem usar esse recurso para desativar recursos importantes do telefone. Deve-se tomar cuidado com essa permissão, uma vez que isso pode deixar os componentes do aplicativo inutilizáveis, inconsistentes ou instáveis."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"conceder ou revogar permissões"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Permite que um aplicativo conceda ou revogue permissões específicas para ele ou outros aplicativos. Aplicativos maliciosos podem usar isso para acessar recursos aos quais você não concedeu permissão."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"definir aplicativos preferidos"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Permite que o aplicativo modifique seus aplicativos preferidos. Aplicativos maliciosos podem alterar os aplicativos que são executados, falsificando seus aplicativos existentes para coletar seus dados particulares."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"modificar configurações globais do sistema"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Definir data"</string>
<string name="date_time_set" msgid="5777075614321087758">"Definir"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Padrão"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NOVO: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Nenhuma permissão necessária"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Ocultar"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Mostrar todas"</b></string>
diff --git a/core/res/res/values-rm/strings.xml b/core/res/res/values-rm/strings.xml
index 5b8efa6..c7579de 100644
--- a/core/res/res/values-rm/strings.xml
+++ b/core/res/res/values-rm/strings.xml
@@ -451,6 +451,10 @@
<skip />
<!-- no translation found for permdesc_changeComponentState (1827232484416505615) -->
<skip />
+ <!-- no translation found for permlab_grantRevokePermissions (4627315351093508795) -->
+ <skip />
+ <!-- no translation found for permdesc_grantRevokePermissions (4088642654085850662) -->
+ <skip />
<!-- no translation found for permlab_setPreferredApplications (8463181628695396391) -->
<skip />
<!-- no translation found for permdesc_setPreferredApplications (4973986762241783712) -->
@@ -1474,6 +1478,8 @@
<skip />
<string name="date_time_set" msgid="5777075614321087758">"Definir"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Standard"</string>
+ <!-- no translation found for perms_new_perm_prefix (8257740710754301407) -->
+ <skip />
<string name="no_permissions" msgid="7283357728219338112">"Naginas permissiuns obligatoricas"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Zuppentar"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Mussar tut"</b></string>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 8ffa16e..0890cc0 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -313,6 +313,10 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"activare sau dezactivare a componentelor aplicaţiei"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Permite aplicaţiei să modifice starea activată sau dezactivată a unei componente a altei aplicaţii. Aplicaţiile rău intenţionate pot să utilizeze această permisiune pentru a dezactiva funcţii importante ale tabletei. Este necesar să utilizaţi cu atenţie această permisiune, deoarece este posibil să aduceţi componentele aplicaţiei într-o stare inutilizabilă, inconsecventă sau instabilă."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Permite aplicaţiei să modifice starea activată sau dezactivată a unei componente a altei aplicaţii. Aplicaţiile rău intenţionate pot să utilizeze această permisiune pentru a dezactiva funcţii importante ale telefonului. Este necesar să utilizaţi cu atenţie această permisiune, deoarece este posibil să aduceţi componentele aplicaţiei într-o stare inutilizabilă, inconsecventă sau instabilă."</string>
+ <!-- no translation found for permlab_grantRevokePermissions (4627315351093508795) -->
+ <skip />
+ <!-- no translation found for permdesc_grantRevokePermissions (4088642654085850662) -->
+ <skip />
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"setare aplicaţii preferate"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Permite aplicaţiei să modifice aplicaţiile dvs. preferate. Aplicaţiile rău intenţionate pot să modifice fără a vă înştiinţa aplicaţiile care rulează, păcălind aplicaţiile existente să colecteze date private de la dvs."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"modificare setări sistem globale"</string>
@@ -1004,6 +1008,8 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Setaţi data"</string>
<string name="date_time_set" msgid="5777075614321087758">"Setaţi"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Prestabilit"</string>
+ <!-- no translation found for perms_new_perm_prefix (8257740710754301407) -->
+ <skip />
<string name="no_permissions" msgid="7283357728219338112">"Nu se solicită nicio permisiune"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Ascundeţi"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Afişaţi-le pe toate"</b></string>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index a6644e5..662a54e 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"включение и отключение компонентов приложения"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Приложение сможет включать и отключать компоненты других программ. Вредоносные программы смогут таким образом отключать важные функции планшетного ПК. Используйте это разрешение с особой осторожностью, чтобы случайно не нарушить работу компонентов приложения."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Приложение сможет включать и отключать компоненты других программ. Вредоносные программы смогут таким образом отключать важные функции телефона. Используйте это разрешение с особой осторожностью, чтобы случайно не нарушить работу компонентов приложения."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"предоставление и отзыв разрешений"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Позволяет приложению предоставлять и отзывать разрешения самому себе и другим программам. Вредоносные приложения могут использовать эту функцию для получения прав, которых вы им не предоставляли."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"настройка предпочтительных приложений"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Приложение сможет изменять предпочтительные приложения. Вредоносные программы смогут незаметно изменять запускаемые вами программы и собирать ваши личные данные от имени существующих приложений."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"изменять общие настройки системы"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Настройка даты"</string>
<string name="date_time_set" msgid="5777075614321087758">"Установить"</string>
<string name="default_permission_group" msgid="2690160991405646128">"По умолчанию"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"НОВОЕ: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Не требуется разрешений"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Скрыть"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Показать все"</b></string>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index df25ac7..98b829f 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"povoliť alebo zakázať súčasti aplikácie"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Umožňuje aplikácii zmeniť to, či je súčasť inej aplikácie povolená alebo zakázaná. Škodlivé aplikácie môžu pomocou tohto nastavenia zakázať dôležité funkcie tabletu. S týmto povolením musíte zaobchádzať opatrne, pretože súčasti aplikácie môžete dostať do nepoužiteľného, nekonzistentného alebo nestabilného stavu."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Umožňuje aplikácii zmeniť to, či je súčasť inej aplikácie povolená alebo zakázaná. Škodlivé aplikácie môžu pomocou tohto nastavenia zakázať dôležité funkcie telefónu. S týmto povolením musíte zaobchádzať opatrne, pretože súčasti aplikácie môžete dostať do nepoužiteľného, nekonzistentného alebo nestabilného stavu."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"povoliť alebo zakázať povolenia"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Umožňuje aplikácii povoliť alebo zakázať konkrétne povolenia pre seba alebo iné aplikácie. Škodlivé aplikácie môžu použiť túto možnosť na pristupovanie k funkciám, ktoré ste im nepovolili."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"nastaviť preferované aplikácie"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Umožňuje aplikácii zmeniť vaše preferované aplikácie. Škodlivé aplikácie môžu v tichosti zmeniť spustené aplikácie a oklamať existujúce aplikácie, aby zhromažďovali vaše súkromné údaje."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"zmeny globálnych nastavení systému"</string>
@@ -1006,6 +1008,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Nastaviť dátum"</string>
<string name="date_time_set" msgid="5777075614321087758">"Nastaviť"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Predvolené"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NOVINKA: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Nevyžadujú sa žiadne oprávnenia."</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Skryť"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Zobraziť všetky"</b></string>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index 159d504..9d99013 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"omogočanje ali onemogočanje komponent programa"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Programu omogoča, da spremeni, ali je komponenta drugega programa omogočena ali ne. Zlonamerni programi lahko to uporabijo za onemogočanje pomembnih zmožnosti tabličnega računalnika. Pri dodeljevanju dovoljenja je treba biti previden, saj lahko komponente programa nastavite tako, da jih ni mogoče uporabiti, da niso dosledne ali da niso stabilne."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Programu omogoča, da spremeni, ali je komponenta drugega programa omogočena ali ne. Zlonamerni programi lahko to uporabijo za onemogočanje pomembnih zmožnosti telefona. Pri dodeljevanju dovoljenja je treba biti previden, saj lahko komponente programa nastavite tako, da jih ni mogoče uporabiti, da niso dosledne ali da niso stabilne."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"dodeljevanje ali preklic dovoljenj"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Programu omogoča dodeljevanje ali preklic posebnih dovoljenj zanj ali za druge programe. Zlonamerni programi lahko to uporabijo za dostop do funkcij, za katere jim niste dodelili pravic."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"nastavitev prednostnih programov"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Programu omogoča spreminjanje priljubljenih programov. Zlonamerni programi lahko s tem neopazno spremenijo programe, ki se izvajajo, tako da se izdajajo za obstoječe programe in zbirajo osebne podatke."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"spreminjanje splošnih nastavitev sistema"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Nastavi datum"</string>
<string name="date_time_set" msgid="5777075614321087758">"Nastavi"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Privzeto"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NOVO: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Ni zahtevanih dovoljenj"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Skrij"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Pokaži vse"</b></string>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 199d318..a9e7b9b 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"омогућавање или онемогућавање компоненти апликације"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Дозвољава апликацији да промени да ли је компонента друге апликације омогућена или онемогућена. Злонамерне апликације могу то да искористе да онемогуће важне функције таблета. Треба бити опрезан при додељивању ове дозволе, јер компоненте апликација могу постати неупотребљиве, непоуздане или нестабилне."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Дозвољава апликацији да промени да ли је компонента друге апликације омогућена или онемогућена. Злонамерне апликације могу то да искористе да онемогуће важне функције телефона. Треба бити опрезан при додељивању ове дозволе, јер компоненте апликација могу да постану неупотребљиве, непоуздане или нестабилне."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"додела или опозив дозвола"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Омогућава апликацији да додели или опозове посебне дозволе за њу или друге апликације. Злонамерне апликације могу то да користе да би приступале функцијама које им нисте одобрили."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"подешавање жељених апликација"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Дозвољава апликацији да мења омиљене апликације. Злонамерне апликације могу без обавештења да промене апликације које су покренуте и да преко њих прикупљају ваше приватне податке."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"измена глобалних подешавања система"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Подешавање датума"</string>
<string name="date_time_set" msgid="5777075614321087758">"Подеси"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Подразумевано"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"НОВО: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Није потребна ниједна дозвола"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Сакриј"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Прикажи све"</b></string>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index be397b0..f780ca4 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -313,6 +313,10 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"aktivera eller inaktivera appkomponenter"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Tillåter att appen ändrar inställningen för om en komponent i en annan app ska aktiveras eller inte. Skadliga appar kan använda detta för att inaktivera viktiga funktioner i pekdatorn. Var försiktig med behörigheten, eftersom appkomponenter kan bli oanvändbara, inkonsekventa eller instabila."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Tillåter att appen ändrar inställningen för om en komponent i en annan app ska aktiveras eller inte. Skadliga appar kan använda detta för att inaktivera viktiga funktioner i pekdatorn. Var försiktig med behörigheten, eftersom programkomponenter kan bli oanvändbara, inkonsekventa eller instabila."</string>
+ <!-- no translation found for permlab_grantRevokePermissions (4627315351093508795) -->
+ <skip />
+ <!-- no translation found for permdesc_grantRevokePermissions (4088642654085850662) -->
+ <skip />
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"ange önskade appar"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Tillåter att appen ändrar dina önskade appar. Skadliga appar kan utan förvarning ändra de appar som körs och kapa dina befintliga appar så att de börjar samla privata uppgifter från dig."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"ändra globala systeminställningar"</string>
@@ -1004,6 +1008,8 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Ange datum"</string>
<string name="date_time_set" msgid="5777075614321087758">"Ställ in"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Standardinställning"</string>
+ <!-- no translation found for perms_new_perm_prefix (8257740710754301407) -->
+ <skip />
<string name="no_permissions" msgid="7283357728219338112">"Inga behörigheter krävs"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Dölj"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Visa alla"</b></string>
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index 4cb3a3a..c9e4692 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -313,6 +313,10 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"wezesha au lemeza vijenzi vya programu"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Inaruhusu programu kubadilisha kama kijenzi cha programu nyingine kimewezeshwa au la. Programu hasidi zinaweza kutumia hii kulemeza uwezo muhimu wa kompyuta kibao. Lazina uangalifu utumike kwa ruhusa hii, kwani kuna uwezekano kupata vijenzi vya programu katika hali isiyotumika, isiyowiana, au hali isiyo thabiti."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Inaruhusu programu kubadilisha kama kijenzi cha programu nyingine kimewezeshwa au la. Programu hasidi zinaweza kutumia hii kulemeza mambo muhimu ambayo simu inaweza kufanya. Lazima uangalifu utumike kwa ruhusa hii, kwani kuna uwezekano kufanya vijenzi vya programu kuwa katika hali ya kutotumika, kutokuwa na uwiano, au kutokuwa thabiti."</string>
+ <!-- no translation found for permlab_grantRevokePermissions (4627315351093508795) -->
+ <skip />
+ <!-- no translation found for permdesc_grantRevokePermissions (4088642654085850662) -->
+ <skip />
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"kuweka programu zinazopendelewa"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Inaruhusu programu kurekebisha programu unazopendelea. Programu hasidi zinaweza, polepole, kubadilisha programu zinazoendeshwa, na kuzifanya programu ulizo nazo kukusanya data ya kibinafsi kutoka kwako."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"rekebisha mipangilio ya mfumo jumla"</string>
@@ -1004,6 +1008,8 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Weka tarehe"</string>
<string name="date_time_set" msgid="5777075614321087758">"Weka"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Chaguo-msingi"</string>
+ <!-- no translation found for perms_new_perm_prefix (8257740710754301407) -->
+ <skip />
<string name="no_permissions" msgid="7283357728219338112">"Hakuna vibali vinavyohitajika"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Ficha"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Onyesha zote"</b></string>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index 41c56f4..a787a2a 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"เปิดหรือปิดใช้งานคอมโพเนนต์ของแอปพลิเคชัน"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"อนุญาตให้แอปพลิเคชันเปลี่ยนแปลงการเปิดใช้งานส่วนประกอบของแอปพลิเคชันอื่น แอปพลิเคชันที่เป็นอันตรายอาจใช้การอนุญาตนี้ปิดใช้งานความสามารถของแท็บเล็ตที่สำคัญ ต้องใช้ความระมัดระวังสำหรับการอนุญาตนี้ เนื่องจากอาจทำให้ส่วนประกอบต่างๆ ของแอปพลิเคชันไม่สามารถใช้งาน ไม่สอดคล้อง หรือมีสถานะที่ไม่เสถียร"</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"อนุญาตให้แอปพลิเคชันเปลี่ยนแปลงการเปิดใช้งานส่วนประกอบของแอปพลิเคชันอื่น แอปพลิเคชันที่เป็นอันตรายอาจใช้การอนุญาตนี้ปิดใช้งานความสามารถที่สำคัญของโทรศัพท์ ต้องใช้ความระมัดระวังสำหรับการอนุญาตนี้เนื่องจากอาจทำให้ส่วนประกอบต่างๆ ของแอปพลิเคชันไม่สามารถใช้งาน ไม่สอดคล้อง หรือมีสถานะที่ไม่เสถียร"</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"อนุญาตหรือยกเลิกการอนุญาต"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"อนุญาตให้แอปพลิเคชันให้หรือยกเลิกการอนุญาตบางอย่างของตัวเองหรือแอปพลิเคชันอื่น แอปพลิเคชันที่เป็นอันตรายอาจใช้การทำงานนี้ในการเข้าถึงคุณลักษณะที่คุณไม่อนุญาต"</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"ตั้งค่าแอปพลิเคชันที่ต้องการ"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"อนุญาตให้แอปพลิเคชันแก้ไขแอปพลิเคชันต่างๆ ที่คุณชอบใช้ แอปพลิเคชันที่เป็นอันตรายอาจจะแอบเปลี่ยนแอปพลิเคชันที่กำลังทำงาน ปลอมแปลงเป็นแอปพลิเคชันที่มีอยู่ของคุณเพื่อรวบรวมข้อมูลส่วนบุคคลจากคุณ"</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"แก้ไขการตั้งค่าระบบสากล"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"ตั้งวันที่"</string>
<string name="date_time_set" msgid="5777075614321087758">"ตั้งค่า"</string>
<string name="default_permission_group" msgid="2690160991405646128">"เริ่มต้น"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"ใหม่: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"ไม่ต้องการการอนุญาต"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"ซ่อน"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"แสดงทั้งหมด"</b></string>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index 9548fe9..99731af 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"paganahin o huwag paganahin ang mga bahagi ng app"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Pinapayagan ang app na baguhin kung ang bahagi ng isa pang app ay pinagana o hindi. Maaari itong gamitin ng nakakahamak na apps upang huwag paganahin ang mahahalagang kakayahan ng tablet. Dapat na mayroong pag-iingat sa pahintulot na ito, dahil posibleng mailagay ng mga bahagi ng app sa isang hindi nagagamit, pabagu-bago, o hindi matatag na katayuan."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Pinapayagan ang app na baguhin kung ang isang bahagi ng isa pang app ay pinapagana o hindi. Maaari itong gamitin ng nakakahamak na apps upang huwag paganahin ang mga mahalagang kakayahan ng telepono. Dapat na mayroong pag-iingat sa pahintulot na ito, dahil posibleng mailagay ang mga bahagi ng app sa isang hindi nagagamit, pabagu-bago, o hindi matatag na katayuan."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"ibigay o bawiin ang mga pahintulot"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Binibigyang-daan ang isang application na ibigay o bawiin ang mga tukoy na pahintulot para dito o sa iba pang mga application. Maaari itong gamitin ng mga nakakapahamak na application upang i-access ang mga tampok na hindi mo ibinigay sa mga ito."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"itakda ang gustong apps"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Pinapayagan ang app na baguhin ang iyong gustong apps. Maaaring tahimik na baguhin ng nakakahamak na apps ang apps na tumatakbo, na dinadaya ang iyong umiiral nang apps upang mangolekta ng pribadong data mula sa iyo."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"baguhin ang mga setting ng global system"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Itakda ang petsa"</string>
<string name="date_time_set" msgid="5777075614321087758">"Itakda"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Default"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"BAGO: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Walang mga kinakailangang pahintulot"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Itago"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Ipakita lahat"</b></string>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index 6da7fcd..730c69f 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -313,6 +313,10 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"uygulama bileşenlerini etkinleştir veya devre dışı bırak"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Uygulamaya, başka bir uygulamanın bir bileşeninin etkin veya devre dışı olma durumunu değiştirme izni verir. Kötü amaçlı uygulamalar tabletin önemli özelliklerini devre dışı bırakmak için bunu kullanabilir. Uygulama bileşenlerini kullanılamaz, tutarsız ya da kararsız hale getirebileceğinden bu izin ayarlanırken dikkat edilmelidir."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Uygulamaya, başka bir uygulamanın bir bileşeninin etkin veya devre dışı olma durumunu değiştirme izni verir. Kötü amaçlı uygulamalar telefonun önemli özelliklerini devre dışı bırakmak için bunu kullanabilir. Uygulama bileşenlerini kullanılamaz, tutarsız ya da kararsız getirebileceğinden bu izin ayarlanırken dikkat edilmelidir."</string>
+ <!-- no translation found for permlab_grantRevokePermissions (4627315351093508795) -->
+ <skip />
+ <!-- no translation found for permdesc_grantRevokePermissions (4088642654085850662) -->
+ <skip />
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"tercih edilen uygulamaları ayarla"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Uygulamaya, tercih edilen uygulamalarınızı değiştirme izni verir. Kötü amaçlı uygulamalar çalışmakta olan uygulamaları sessizce değiştirip gizli verilerinizi toplamak için mevcut uygulamalarınızı yanlış yönlendirebilir."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"genel sistem ayarlarını değiştir"</string>
@@ -1004,6 +1008,8 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Tarihi ayarla"</string>
<string name="date_time_set" msgid="5777075614321087758">"Ayarla"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Varsayılan"</string>
+ <!-- no translation found for perms_new_perm_prefix (8257740710754301407) -->
+ <skip />
<string name="no_permissions" msgid="7283357728219338112">"İzin gerektirmez"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Gizle"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Tümünü göster"</b></string>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index 3fd6264..4d3c853 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"вмикати чи вимикати компоненти програми"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Дозволяє програмі змінювати статус ввімкнення чи вимкнення компонента іншої програми. Шкідливі програми можуть використовувати це для вимкнення важливих характеристик планшетного ПК. З цим типом дозволу треба поводитися обережно, оскільки компоненти програми можуть стати непридатними, невідповідними чи нестабільними."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Дозволяє програмі змінювати статус ввімкнення чи вимкнення компонента іншої програми. Шкідливі програми можуть використовувати це для вимкнення важливих характеристик телефону. З цим типом дозволу треба поводитися обережно, оскільки компоненти програми можуть стати непридатними, невідповідними чи нестабільними."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"надавати або скасовувати дозволи"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Дозволяє програмі надавати або скасовувати певні дозволи для себе чи інших програм. Шкідливі програми можуть використовувати це для доступу до функцій, якого ви їм не надавали."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"установлювати потрібні програми"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Дозволяє програмі змінювати ваші вибрані програми. Шкідливі програми можуть непомітно змінювати запущені програми, примушуючи існуючі програми оманливим шляхом збирати ваші особисті дані."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"змін. загальні налашт-ня сист."</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Установити дату"</string>
<string name="date_time_set" msgid="5777075614321087758">"Застосувати"</string>
<string name="default_permission_group" msgid="2690160991405646128">"За умовч."</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"НОВИЙ: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Дозвіл не потрібний"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Сховати"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Показ. всі"</b></string>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index 8503dc5..c9b200d 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"bật hoặc tắt cấu phần ứng dụng"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Cho phép ứng dụng thay đổi việc có bật cấu phần của ứng dụng khác hay không. Ứng dụng độc hại có thể sử dụng quyền này để vô hiệu hóa những tính năng quan trọng của máy tính bảng. Phải cẩn trọng khi sử dụng quyền này vì quyền này có thể khiến các cấu phần rơi vào trạng thái không sử dụng được, không đồng nhất hoặc không ổn định."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Cho phép ứng dụng thay đổi việc có bật cấu phần của một ứng dụng khác hay không. Ứng dụng độc hại có thể sử dụng quyền này để tắt những tính năng quan trọng của điện thoại. Phải sử dụng quyền này thận trọng vì có thể khiến các cấu phần của ứng dụng rơi vào trạng thái không thể sử dụng được, không đồng nhất hoặc không ổn định."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"cấp hoặc thu hồi quyền"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Cho phép ứng dụng cấp hoặc thu hồi quyền cụ thể đối với ứng dụng đó hoặc các ứng dụng khác. Các ứng dụng độc hại có thể lợi dụng điều này để truy cập các tính năng mà bạn không cấp."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"đặt ứng dụng ưa thích"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Cho phép ứng dụng sửa đổi ứng dụng ưa thích của bạn. Ứng dụng độc hại có thể ngầm thay đổi các ứng dụng đã được chạy, giả mạo các ứng dụng hiện có để thu thập dữ liệu cá nhân của bạn."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"sửa đổi cài đặt hệ thống chung"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Đặt ngày"</string>
<string name="date_time_set" msgid="5777075614321087758">"Đặt"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Mặc định"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"MỚI: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Không yêu cầu quyền"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Ẩn"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Hiển thị tất cả"</b></string>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index bc74518..c2d59e9 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -313,6 +313,10 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"启用或停用应用程序组件"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"允许应用程序启用或停用其他应用程序的组件。恶意应用程序可能借此停用重要的平板电脑功能。请务必谨慎使用此权限,因为这可能导致某些应用程序组件处于无法使用、不一致或不稳定的状态。"</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"允许应用程序启用或停用其他应用程序的组件。恶意应用程序可能借此停用重要的手机功能。请务必谨慎使用此权限,因为这可能导致某些应用程序组件进入无法使用、不一致或不稳定的状态。"</string>
+ <!-- no translation found for permlab_grantRevokePermissions (4627315351093508795) -->
+ <skip />
+ <!-- no translation found for permdesc_grantRevokePermissions (4088642654085850662) -->
+ <skip />
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"设置首选应用程序"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"允许应用程序修改您的首选应用程序。恶意应用程序可能会在后台更改运行的应用程序,欺骗您现有的应用程序,以收集您的私人数据。"</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"修改全局系统设置"</string>
@@ -765,7 +769,7 @@
<string name="permlab_serialPort" msgid="546083327654631076">"访问串行端口"</string>
<string name="permdesc_serialPort" msgid="2991639985224598193">"允许持有人使用 SerialManager API 访问串行端口。"</string>
<string name="permlab_accessContentProvidersExternally" msgid="5077774297943409285">"从外部访问内容提供程序"</string>
- <string name="permdesc_accessContentProvidersExternally" msgid="4544346486697853685">"允许持有者通过界面访问内容提供程序。普通应用程序绝不需要此权限。"</string>
+ <string name="permdesc_accessContentProvidersExternally" msgid="4544346486697853685">"允许持有者通过界面访问内容提供程序。普通应用绝不需要此权限。"</string>
<string name="save_password_message" msgid="767344687139195790">"是否希望浏览器记住此密码?"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"暂不保存"</string>
<string name="save_password_remember" msgid="6491879678996749466">"记住"</string>
@@ -1004,6 +1008,8 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"设置日期"</string>
<string name="date_time_set" msgid="5777075614321087758">"设置"</string>
<string name="default_permission_group" msgid="2690160991405646128">"默认"</string>
+ <!-- no translation found for perms_new_perm_prefix (8257740710754301407) -->
+ <skip />
<string name="no_permissions" msgid="7283357728219338112">"不需要任何权限"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"隐藏"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"全部显示"</b></string>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index 5c89004..18d0836 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -313,6 +313,10 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"啟用或停用應用程式元件"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"允許應用程式啟用或停用其他應用程式的元件。請注意,惡意應用程式可能利用此功能停用重要的平板電腦功能。這項權限可能導致應用程式元件無法使用、不一致或不穩定,請務必謹慎使用。"</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"允許應用程式啟用或停用其他應用程式的元件。請注意,惡意應用程式可能利用此功能停用重要的手機功能。這項權限可能導致應用程式元件無法使用、不一致或不穩定,請務必謹慎使用。"</string>
+ <!-- no translation found for permlab_grantRevokePermissions (4627315351093508795) -->
+ <skip />
+ <!-- no translation found for permdesc_grantRevokePermissions (4088642654085850662) -->
+ <skip />
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"設定偏好的應用程式"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"允許應用程式修改您偏好的應用程式。請注意,惡意應用程式可能利用此功能擅自竄改執行的應用程式,並冒充現有的程式收集您的私人資料。"</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"編輯全域系統設定"</string>
@@ -1004,6 +1008,8 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"日期設定"</string>
<string name="date_time_set" msgid="5777075614321087758">"設定"</string>
<string name="default_permission_group" msgid="2690160991405646128">"預設值"</string>
+ <!-- no translation found for perms_new_perm_prefix (8257740710754301407) -->
+ <skip />
<string name="no_permissions" msgid="7283357728219338112">"無須許可"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>" 隱藏"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"顯示全部"</b></string>
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index 282fb91..6d61260 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -70,11 +70,11 @@
<string name="serviceNotProvisioned" msgid="8614830180508686666">"Isevisi ayilungiselelwe."</string>
<string name="CLIRPermanent" msgid="3377371145926835671">"Ngeke ukwazi ukuguqul izilungiselelo zemininingwane yoshayayo."</string>
<string name="RestrictedChangedTitle" msgid="5592189398956187498">"Ukufinyelela okuvinjelwe kushintshiwe"</string>
- <string name="RestrictedOnData" msgid="8653794784690065540">"Insizakalo yedatha ivaliwe."</string>
- <string name="RestrictedOnEmergency" msgid="6581163779072833665">"Insizakalo ephuthumayo ivimbelwe."</string>
- <string name="RestrictedOnNormal" msgid="4953867011389750673">"Insizakalo yezwi ivimbelwe."</string>
+ <string name="RestrictedOnData" msgid="8653794784690065540">"Isevisi yedatha ivaliwe."</string>
+ <string name="RestrictedOnEmergency" msgid="6581163779072833665">"Isevisi ephuthumayo ivimbelwe."</string>
+ <string name="RestrictedOnNormal" msgid="4953867011389750673">"Isevisi yezwi ivimbelwe."</string>
<string name="RestrictedOnAllVoice" msgid="3396963652108151260">"Wonke amasevisi Wezwi avimbelwe."</string>
- <string name="RestrictedOnSms" msgid="8314352327461638897">"Insizakalo ye-SMS ivaliwe."</string>
+ <string name="RestrictedOnSms" msgid="8314352327461638897">"Isevisi ye-SMS ivaliwe."</string>
<string name="RestrictedOnVoiceData" msgid="996636487106171320">"Amasevisi Wezwi/Idatha avimbelwe."</string>
<string name="RestrictedOnVoiceSms" msgid="1888588152792023873">"Amasevisi Wezwi/SMS avimbelwe."</string>
<string name="RestrictedOnAll" msgid="5643028264466092821">"Wonke amasevisi Wezwi/Idatha/SMS avimbelwe."</string>
@@ -276,7 +276,7 @@
<string name="permdesc_bindVpnService" msgid="2067845564581693905">"Ivumela umnini ukuthi abophele kwissekelo esingaphezulu sesevisi ye-Vpm. Ayidingakeli izinsiza ezejwayelekile."</string>
<string name="permlab_bindWallpaper" msgid="8716400279937856462">"hlanganisa kwiphephadonga"</string>
<string name="permdesc_bindWallpaper" msgid="7108428692595491668">"Ivumela umbambi ukuhlanganisa uxhumano nomsebenzisi kwezinga eliphezulu lwephephadonga. Akusoze kwadingeka kwezinhlelo zokusebenza ezivamile."</string>
- <string name="permlab_bindRemoteViews" msgid="5697987759897367099">"bophezela kube insizakalo yesinqunjana"</string>
+ <string name="permlab_bindRemoteViews" msgid="5697987759897367099">"bophezela kube isevisi yesinqunjana"</string>
<string name="permdesc_bindRemoteViews" msgid="4717987810137692572">"Ivumela umbambi ukuhlanganisa uxhumano nomsebenzisi kwezinga eliphezulu lensizakalo yesinqunjwana. Akusoze kwadingeka kwezinhlelo zokusebenza ezivamile."</string>
<string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"xhumana nomphathi wedivaysi"</string>
<string name="permdesc_bindDeviceAdmin" msgid="569715419543907930">"Ivumela ummeli ukuthumela okuqukethwe kumphathi wedivaysi. Akusoze kwadingeka kwizinhlelo zokusebenza ezivamile."</string>
@@ -313,6 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"vumela noma vimbela izingxenye zensiza"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Ivumela ukuthi insiza iguqule ukuthi okuqukethwe kwenye insiza kuyasebenza noma cha. Izinsiza ezinobungozi zingasebenzisa lokhu ukwenza ukuthi izinto ezisemqoka ekhompyutheni yepeni zingasebenzi. Kufanele kuqashelwe uma kukhishwa lemvume njengoba kungenzeka kwenze izinto zensiza zibe sesimweni esingazinzile, nesiguquguqukayo."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Ivumela ukuthi insiza iguqule ukuthi okuqukethwe kwenye insiza kuyasebenza noma cha. Izinsiza ezinobungozi zingasebenzisa lokhu ukwenza ukuthi izinto ezisemqoka ocingweni zingasebenzi. Kufanele kuqashelwe uma kukhishwa lemvume njengoba kungenzeka kwenze izinto zensiza zibe sesmweni esingazinzile, nesiguquguqukayo."</string>
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"nika noma buyisa izimvume"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Ivumela izinhlelo zokusebenza ukunika noma ukubuyisa izimvume ezithile zayo noma ezinye izinhlelo lokusebenza. Izinhlelo zokusebenza ezingalungile zingasebenzisa lokhu ukufinyelela izici ongazinikanga zona."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"setha izinsiza ezincamelwayo"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Ivuela insiza ukuthi iguqule izinsiza ezincanyelwayo. Izinsiza ezinobungozi zingashintsha izinsiz buthule ezisebenzyo okwenza ukuthi izinsiza zakho ezikhona zingasebenzi ukuthola ze zithole imininingwane yakho eyimfihlo."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"guqula izilungiselelo zohlelo jikelele"</string>
@@ -1004,6 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Setha idethi"</string>
<string name="date_time_set" msgid="5777075614321087758">"Hlela"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Okuzenzakalelayo"</string>
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"Okusha: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Ayikho imvume edingekayo"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Fihla "</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Bonisa konke"</b></string>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 1eab01a..8e5b509 100755
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -505,6 +505,7 @@
0 - Nothing
1 - Recent apps dialog
2 - Recent apps view in SystemUI
+ 3 - Voice search
This needs to match the constants in
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
-->
@@ -645,9 +646,29 @@
<bool translatable="false" name="skip_restoring_network_selection">false</bool>
<!-- Maximum number of database connections opened and managed by framework layer
- to handle queries on each database. -->
+ to handle queries on each database when using Write-Ahead Logging. -->
<integer name="db_connection_pool_size">4</integer>
+ <!-- The default journal mode to use use when Write-Ahead Logging is not active.
+ Choices are: OFF, DELETE, TRUNCATE, PERSIST and MEMORY.
+ PERSIST may improve performance by reducing how often journal blocks are
+ reallocated (compared to truncation) resulting in better data block locality
+ and less churn of the storage media. -->
+ <string name="db_default_journal_mode">TRUNCATE</string>
+
+ <!-- Maximum size of the persistent journal file in bytes.
+ If the journal file grows to be larger than this amount then SQLite will
+ truncate it after committing the transaction. -->
+ <integer name="db_journal_size_limit">524288</integer>
+
+ <!-- The database synchronization mode.
+ Choices are: FULL, NORMAL, OFF. -->
+ <string name="db_sync_mode">FULL</string>
+
+ <!-- The Write-Ahead Log auto-checkpoint interval in database pages.
+ The log is checkpointed automatically whenever it exceeds this many pages. -->
+ <integer name="db_wal_autocheckpoint">1</integer>
+
<!-- Max space (in MB) allocated to DownloadManager to store the downloaded
files if they are to be stored in DownloadManager's data dir,
which typically is /data/data/com.android.providers.downloads/files -->
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 94a671d..15499fe 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -250,6 +250,8 @@
<java-symbol type="integer" name="config_wifi_framework_scan_interval" />
<java-symbol type="integer" name="config_wifi_supplicant_scan_interval" />
<java-symbol type="integer" name="db_connection_pool_size" />
+ <java-symbol type="integer" name="db_journal_size_limit" />
+ <java-symbol type="integer" name="db_wal_autocheckpoint" />
<java-symbol type="integer" name="max_action_buttons" />
<java-symbol type="color" name="tab_indicator_text_v4" />
@@ -438,6 +440,8 @@
<java-symbol type="string" name="day_of_week_shortest_thursday" />
<java-symbol type="string" name="day_of_week_shortest_tuesday" />
<java-symbol type="string" name="day_of_week_shortest_wednesday" />
+ <java-symbol type="string" name="db_default_journal_mode" />
+ <java-symbol type="string" name="db_sync_mode" />
<java-symbol type="string" name="decline" />
<java-symbol type="string" name="default_permission_group" />
<java-symbol type="string" name="default_text_encoding" />
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index f548165..c8df649 100755
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -2263,6 +2263,10 @@
content providers from outside an ApplicationThread. [CHAR LIMIT=NONE] -->
<string name="permdesc_accessContentProvidersExternally">Allows the holder to access content
providers from the shell. Should never be needed for normal apps.</string>
+ <!-- Title of an application permission which allows the application to suggest that now is a bad time to reboot the device in order to apply an OTA. [CHAR LIMIT=40] -->
+ <string name="permlab_updateLock">discourage automatic device updates</string>
+ <!-- Description of an application permission which allows the application to suggest that now is a bad time to reboot the device in order to apply an OTA. [CHAR LIMIT=NONE] -->
+ <string name="permdesc_updateLock">Allows the holder to offer information to the system about when would be a good time for a noninteractive reboot to upgrade the device.</string>
<!-- If the user enters a password in a form on a website, a dialog will come up asking if they want to save the password. Text in the save password dialog, asking if the browser should remember a password. -->
<string name="save_password_message">Do you want the browser to remember this password?</string>
diff --git a/core/tests/coretests/src/android/util/LocaleUtilTest.java b/core/tests/coretests/src/android/util/LocaleUtilTest.java
index ff3d539..0ca6043 100644
--- a/core/tests/coretests/src/android/util/LocaleUtilTest.java
+++ b/core/tests/coretests/src/android/util/LocaleUtilTest.java
@@ -22,7 +22,8 @@ import android.test.AndroidTestCase;
import dalvik.annotation.TestLevel;
import dalvik.annotation.TestTargetNew;
-import static android.util.LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE;
+import static android.view.View.LAYOUT_DIRECTION_LTR;
+import static android.view.View.LAYOUT_DIRECTION_RTL;
public class LocaleUtilTest extends AndroidTestCase {
@@ -32,168 +33,168 @@ public class LocaleUtilTest extends AndroidTestCase {
args = {Locale.class}
)
public void testGetLayoutDirectionFromLocale() {
- assertEquals(TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(null));
- assertEquals(TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(Locale.ENGLISH));
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(Locale.CANADA));
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(Locale.CANADA_FRENCH));
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(Locale.FRANCE));
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(Locale.FRENCH));
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(Locale.GERMAN));
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(Locale.GERMANY));
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(Locale.ITALIAN));
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(Locale.ITALY));
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(Locale.UK));
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(Locale.US));
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(Locale.ROOT));
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(Locale.CHINA));
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(Locale.CHINESE));
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(Locale.JAPAN));
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(Locale.JAPANESE));
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(Locale.KOREA));
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(Locale.KOREAN));
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(Locale.PRC));
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(Locale.SIMPLIFIED_CHINESE));
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(Locale.TAIWAN));
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(Locale.TRADITIONAL_CHINESE));
Locale locale = new Locale("ar");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("ar", "AE");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("ar", "BH");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("ar", "DZ");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("ar", "EG");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("ar", "IQ");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("ar", "JO");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("ar", "KW");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("ar", "LB");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("ar", "LY");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("ar", "MA");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("ar", "OM");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("ar", "QA");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("ar", "SA");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("ar", "SD");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("ar", "SY");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("ar", "TN");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("ar", "YE");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("fa");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("fa", "AF");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("fa", "IR");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("iw");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("iw", "IL");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("he");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("he", "IL");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("pa_Arab");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("pa_Arab", "PK");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("ps");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("ps", "AF");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("ur");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("ur", "IN");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("ur", "PK");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("uz_Arab");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
locale = new Locale("uz_Arab", "AF");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_RTL,
LocaleUtil.getLayoutDirectionFromLocale(locale));
// Locale without a real language
locale = new Locale("zz");
- assertEquals(LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE,
+ assertEquals(LAYOUT_DIRECTION_LTR,
LocaleUtil.getLayoutDirectionFromLocale(locale));
}
}
diff --git a/data/fonts/AndroidEmoji.ttf b/data/fonts/AndroidEmoji.ttf
index d543f75..4c017d5 100644
--- a/data/fonts/AndroidEmoji.ttf
+++ b/data/fonts/AndroidEmoji.ttf
Binary files differ
diff --git a/docs/html/design/building-blocks/buttons.html b/docs/html/design/building-blocks/buttons.html
index cc43fcb..9f9652f9 100644
--- a/docs/html/design/building-blocks/buttons.html
+++ b/docs/html/design/building-blocks/buttons.html
@@ -80,6 +80,10 @@ Android Design - Buttons
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -110,7 +114,8 @@ buttons</em>. Both can contain text labels and/or images.</p>
<img src="../static/content/buttons_basic.png">
</div>
-<h2>Basic Buttons</h2>
+<h2 id="basic">Basic Buttons</h2>
+
<p>Basic buttons are traditional buttons with borders and background. Android supports two styles for
basic buttons: default and small. Default buttons have slightly larger font size and are optimized
for display outside of form content. Small buttons are intended for display alongside other content.
@@ -131,7 +136,8 @@ align with other UI elements.</p>
</div>
</div>
-<h2>Borderless Buttons</h2>
+<h2 id="borderless">Borderless Buttons</h2>
+
<p>Borderless buttons resemble basic buttons except that they have no borders or background. You can
use borderless buttons with both icons and text. Borderless buttons are visually more lightweight
than basic buttons and integrate nicely with other content.</p>
diff --git a/docs/html/design/building-blocks/dialogs.html b/docs/html/design/building-blocks/dialogs.html
index fc00780..f03a57a 100644
--- a/docs/html/design/building-blocks/dialogs.html
+++ b/docs/html/design/building-blocks/dialogs.html
@@ -80,6 +80,10 @@ Android Design - Dialogs
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/building-blocks/grid-lists.html b/docs/html/design/building-blocks/grid-lists.html
index b4cfdcb..3f60216 100644
--- a/docs/html/design/building-blocks/grid-lists.html
+++ b/docs/html/design/building-blocks/grid-lists.html
@@ -80,6 +80,10 @@ Android Design - Grid Lists
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -159,7 +163,7 @@ navigation.</p>
</div>
-<h2 id="with_labels">Grid List with Labels</h2>
+<h2 id="with-labels">Grid List with Labels</h2>
<p>Use labels to display additional contextual information for your grid list items.</p>
diff --git a/docs/html/design/building-blocks/index.html b/docs/html/design/building-blocks/index.html
index c99d85c..029cabf 100644
--- a/docs/html/design/building-blocks/index.html
+++ b/docs/html/design/building-blocks/index.html
@@ -93,6 +93,10 @@ Android Design - Building Blocks
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/building-blocks/lists.html b/docs/html/design/building-blocks/lists.html
index 914ae9e..dfd13d9 100644
--- a/docs/html/design/building-blocks/lists.html
+++ b/docs/html/design/building-blocks/lists.html
@@ -80,6 +80,10 @@ Android Design - Lists
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/building-blocks/pickers.html b/docs/html/design/building-blocks/pickers.html
index 4c95a9f..fc9989c 100644
--- a/docs/html/design/building-blocks/pickers.html
+++ b/docs/html/design/building-blocks/pickers.html
@@ -80,6 +80,10 @@ Android Design - Pickers
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -123,7 +127,7 @@ spinners.</p>
</div>
</div>
-<h2>Date and time pickers</h2>
+<h2 id="date-time">Date and time pickers</h2>
<p>Android provides these as ready-to-use dialogs. Each picker is a dialog with a set of controls for
entering the parts of the date (month, day, year) or time (hour, minute, AM/PM). Using these in your
diff --git a/docs/html/design/building-blocks/progress.html b/docs/html/design/building-blocks/progress.html
index 7aae913..32183bc 100644
--- a/docs/html/design/building-blocks/progress.html
+++ b/docs/html/design/building-blocks/progress.html
@@ -80,6 +80,10 @@ Android Design - Progress and Activity
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -105,7 +109,8 @@ Android Design - Progress and Activity
<p>When an operation of interest to the user is taking place over a relatively long period of time,
provide visual feedback that it's still happening and in the process of being completed.</p>
-<h2>Progress</h2>
+<h2 id="progress">Progress</h2>
+
<p>If you know the percentage of the operation that has been completed, use a determinate progress bar
to give the user a sense of how much longer it will take.</p>
diff --git a/docs/html/design/building-blocks/scrolling.html b/docs/html/design/building-blocks/scrolling.html
index 3f1167c..3599a97 100644
--- a/docs/html/design/building-blocks/scrolling.html
+++ b/docs/html/design/building-blocks/scrolling.html
@@ -80,6 +80,10 @@ Android Design - Scrolling
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -104,7 +108,8 @@ Android Design - Scrolling
<p>Scrolling allows the user to navigate to content in the overflow using a swipe gesture. The
scrolling speed is proportional to the speed of the gesture.</p>
-<h2>Scroll Indicator</h2>
+<h2 id="indicator">Scroll Indicator</h2>
+
<p>Appears during scrolling to indicate what portion of the content is currently in view.</p>
<div class="framed-galaxynexus-land-span-13">
@@ -118,7 +123,8 @@ scrolling speed is proportional to the speed of the gesture.</p>
<div class="video-instructions">&nbsp;</div>
</div>
-<h2>Index Scrolling</h2>
+<h2 id="index-scrolling">Index Scrolling</h2>
+
<p>In addition to traditional scrolling, a long alphabetical list can also offer index scrolling: a way
to quickly navigate to the items that begin with a particular letter. With index scrolling, a scroll
indicator appears even when the user isn't scrolling. Touching or dragging it causes the current
diff --git a/docs/html/design/building-blocks/seek-bars.html b/docs/html/design/building-blocks/seek-bars.html
index 84cf5d2..aef1823 100644
--- a/docs/html/design/building-blocks/seek-bars.html
+++ b/docs/html/design/building-blocks/seek-bars.html
@@ -80,6 +80,10 @@ Android Design - Seek Bars and Sliders
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/building-blocks/spinners.html b/docs/html/design/building-blocks/spinners.html
index bf21fe8..5ef9d04 100644
--- a/docs/html/design/building-blocks/spinners.html
+++ b/docs/html/design/building-blocks/spinners.html
@@ -80,6 +80,10 @@ Android Design - Spinners
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/building-blocks/switches.html b/docs/html/design/building-blocks/switches.html
index 3d7bc9c..09af540 100644
--- a/docs/html/design/building-blocks/switches.html
+++ b/docs/html/design/building-blocks/switches.html
@@ -80,6 +80,10 @@ Android Design - Switches
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -104,7 +108,8 @@ Android Design - Switches
<p>Switches allow the user to select options. There are three kinds of switches: checkboxes, radio
buttons, and on/off switches.</p>
-<h2>Checkboxes</h2>
+<h2 id="checkboxes">Checkboxes</h2>
+
<p>Checkboxes allow the user to select multiple options from a set. Avoid using a single checkbox to
turn an option off or on. Instead, use an on/off switch.</p>
@@ -112,7 +117,8 @@ turn an option off or on. Instead, use an on/off switch.</p>
<img src="../static/content/switches_checkboxes.png">
</div>
-<h2>Radio Buttons</h2>
+<h2 id="radio-buttons">Radio Buttons</h2>
+
<p>Radio buttons allow the user to select one option from a set. Use radio buttons for exclusive
selection if you think that the user needs to see all available options side-by-side. Otherwise,
consider a spinner, which uses less space.</p>
@@ -121,7 +127,8 @@ consider a spinner, which uses less space.</p>
<img src="../static/content/switches_radios.png">
</div>
-<h2>On/off Switches</h2>
+<h2 id="switches">On/off Switches</h2>
+
<p>On/off switches toggle the state of a single settings option.</p>
<div style="text-align: center">
diff --git a/docs/html/design/building-blocks/tabs.html b/docs/html/design/building-blocks/tabs.html
index c094cce..d4b0e52 100644
--- a/docs/html/design/building-blocks/tabs.html
+++ b/docs/html/design/building-blocks/tabs.html
@@ -80,6 +80,10 @@ Android Design - Tabs
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/building-blocks/text-fields.html b/docs/html/design/building-blocks/text-fields.html
index 6496fa5..b9ec42d 100644
--- a/docs/html/design/building-blocks/text-fields.html
+++ b/docs/html/design/building-blocks/text-fields.html
@@ -80,6 +80,10 @@ Android Design - Text Fields
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -141,7 +145,7 @@ can enter information more accurately and efficiently.</p>
</div>
</div>
-<h2>Text Selection</h2>
+<h2 id="text-selection">Text Selection</h2>
<p>Users can select any word in a text field with a long press. This action triggers a text selection
mode that facilitates extending the selection or choosing an action to perform on the selected text.
diff --git a/docs/html/design/downloads/index.html b/docs/html/design/downloads/index.html
new file mode 100644
index 0000000..f910b29
--- /dev/null
+++ b/docs/html/design/downloads/index.html
@@ -0,0 +1,278 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>
+
+Android Design - Downloads
+ </title>
+ <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
+ <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic">
+ <link rel="stylesheet" href="../static/yui-3.3.0-reset-min.css">
+ <link rel="stylesheet" href="../static/default.css">
+
+ </head>
+ <body>
+
+ <div id="page-container">
+
+ <div id="page-header"><a href="../index.html">Android Design</a></div>
+
+ <div id="main-row">
+
+ <ul id="nav">
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="../index.html">Get Started</a></div>
+ <ul>
+ <li><a href="../get-started/creative-vision.html">Creative Vision</a></li>
+ <li><a href="../get-started/principles.html">Design Principles</a></li>
+ <li><a href="../get-started/ui-overview.html">UI Overview</a></li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="../style/index.html">Style</a></div>
+ <ul>
+ <li><a href="../style/devices-displays.html">Devices and Displays</a></li>
+ <li><a href="../style/themes.html">Themes</a></li>
+ <li><a href="../style/touch-feedback.html">Touch Feedback</a></li>
+ <li><a href="../style/metrics-grids.html">Metrics and Grids</a></li>
+ <li><a href="../style/typography.html">Typography</a></li>
+ <li><a href="../style/color.html">Color</a></li>
+ <li><a href="../style/iconography.html">Iconography</a></li>
+ <li><a href="../style/writing.html">Writing Style</a></li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="../patterns/index.html">Patterns</a></div>
+ <ul>
+ <li><a href="../patterns/new-4-0.html">New in Android 4.0</a></li>
+ <li><a href="../patterns/gestures.html">Gestures</a></li>
+ <li><a href="../patterns/app-structure.html">App Structure</a></li>
+ <li><a href="../patterns/navigation.html">Navigation</a></li>
+ <li><a href="../patterns/actionbar.html">Action Bar</a></li>
+ <li><a href="../patterns/multi-pane-layouts.html">Multi-pane Layouts</a></li>
+ <li><a href="../patterns/swipe-views.html">Swipe Views</a></li>
+ <li><a href="../patterns/selection.html">Selection</a></li>
+ <li><a href="../patterns/notifications.html">Notifications</a></li>
+ <li><a href="../patterns/compatibility.html">Compatibility</a></li>
+ <li><a href="../patterns/pure-android.html">Pure Android</a></li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="../building-blocks/index.html">Building Blocks</a></div>
+ <ul>
+ <li><a href="../building-blocks/tabs.html">Tabs</a></li>
+ <li><a href="../building-blocks/lists.html">Lists</a></li>
+ <li><a href="../building-blocks/grid-lists.html">Grid Lists</a></li>
+ <li><a href="../building-blocks/scrolling.html">Scrolling</a></li>
+ <li><a href="../building-blocks/spinners.html">Spinners</a></li>
+ <li><a href="../building-blocks/buttons.html">Buttons</a></li>
+ <li><a href="../building-blocks/text-fields.html">Text Fields</a></li>
+ <li><a href="../building-blocks/seek-bars.html">Seek Bars</a></li>
+ <li><a href="../building-blocks/progress.html">Progress &amp; Activity</a></li>
+ <li><a href="../building-blocks/switches.html">Switches</a></li>
+ <li><a href="../building-blocks/dialogs.html">Dialogs</a></li>
+ <li><a href="../building-blocks/pickers.html">Pickers</a></li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
+ <li>
+ <div id="back-dac-section"><a href="../../index.html">Developers</a></div>
+ </li>
+
+ </ul>
+
+ <div id="content">
+
+
+ <div class="layout-content-row content-header">
+ <div class="layout-content-col span-9">
+ <h2>Downloads</h2>
+ </div>
+ <div class="paging-links layout-content-col span-4">
+ <a href="#" class="prev-page-link">Previous</a>
+ <a href="#" class="next-page-link">Next</a>
+ </div>
+ </div>
+
+
+
+
+<div class="layout-content-row">
+ <div class="layout-content-col span-9">
+
+<p>Want everything? We've bundled all the downloads available on Android Design into a single ZIP file.
+You can also download individual files listed below.</p>
+<p>You may use these materials without restriction in your apps and to develop your apps.</p>
+
+ </div>
+ <div class="layout-content-col span-4">
+
+<p>
+ <a class="download-button" href="https://dl-ssl.google.com/android/design/Android_Design_Downloads_20120229.zip">Download All</a>
+</p>
+
+ </div>
+</div>
+
+<h2 id="stencils">Stencils and Sources</h2>
+
+<div class="layout-content-row">
+ <div class="layout-content-col span-5">
+
+<p>Drag and drop your way to beautifully designed Ice Cream Sandwich apps. The stencils feature the
+rich typography, colors, interactive controls, and icons found throughout Android 4.0, along with
+phone and tablet outlines to frame your creations. Source files for icons and controls are also
+available.</p>
+
+ </div>
+ <div class="layout-content-col span-4">
+
+ <img src="../static/content/downloads_stencils.png">
+
+ </div>
+ <div class="layout-content-col span-4">
+
+<p>
+ <a class="download-button" href="https://dl-ssl.google.com/android/design/Android_Design_Fireworks_Stencil_20120229.png">Adobe&reg; Fireworks&reg; PNG Stencil</a>
+ <a class="download-button" href="https://dl-ssl.google.com/android/design/Android_Design_OmniGraffle_Stencil_20120229.graffle">Omni&reg; OmniGraffle&reg; Stencil</a>
+ <a class="download-button" href="https://dl-ssl.google.com/android/design/Android_Design_Holo_Widgets_20120229.zip">Adobe&reg; Photoshop&reg; Sources</a>
+</p>
+
+ </div>
+</div>
+
+<h2 id="action-bar-icon-pack">Action Bar Icon Pack</h2>
+
+<div class="layout-content-row">
+ <div class="layout-content-col span-5">
+
+<p>Action bar icons are graphic buttons that represent the most important actions people can take
+within your app. <a href="../style/iconography.html">More on Action Bar Iconography</a></p>
+<p>The download package includes icons that are scaled for various screen densities and suitable for
+use with the Holo Light and Holo Dark themes. The package also includes unstyled icons that you can
+modify to match your theme, plus source files.</p>
+
+ </div>
+ <div class="layout-content-col span-4">
+
+ <img src="../static/content/iconography_actionbar_style.png">
+
+ </div>
+ <div class="layout-content-col span-4">
+
+<p>
+ <a class="download-button" href="https://dl-ssl.google.com/android/design/Android_Design_Icons_20120229.zip">Action Bar Icon Pack</a>
+</p>
+
+ </div>
+</div>
+
+<h2 id="style">Style</h2>
+
+<div class="layout-content-row">
+ <div class="layout-content-col span-5">
+
+<h4>Roboto</h4>
+<p>Ice Cream Sandwich introduced a new type family named Roboto, created specifically for the
+requirements of UI and high-resolution screens.</p>
+<p><a href="../style/typography.html#actionbar">More on Roboto</a></p>
+
+ </div>
+ <div class="layout-content-col span-4">
+
+ <img src="../static/content/downloads_roboto_specimen_preview.png">
+
+ </div>
+ <div class="layout-content-col span-4">
+
+<p>
+ <a class="download-button" href="https://dl-ssl.google.com/android/design/Roboto_Hinted_20111129.zip">Roboto</a>
+ <a class="download-button" href="https://dl-ssl.google.com/android/design/Roboto_Specimen_Book_20111129.pdf">Specimen Book</a>
+</p>
+
+ </div>
+</div>
+
+<div class="layout-content-row">
+ <div class="layout-content-col span-5">
+
+<h4>Color</h4>
+<p>Blue is the standard accent color in Android's color palette. Each color has a corresponding darker
+shade that can be used as a complement when needed.</p>
+<p><a href="../style/color.html">More on Color</a></p>
+
+ </div>
+ <div class="layout-content-col span-4">
+
+ <img src="../static/content/downloads_color_swatches.png">
+
+ </div>
+ <div class="layout-content-col span-4">
+
+<p>
+ <a class="download-button" href="https://dl-ssl.google.com/android/design/Android_Design_Color_Swatches_20120229.zip">Color Swatches</a>
+</p>
+
+ </div>
+</div>
+
+
+
+
+ <div class="layout-content-row content-footer">
+ <div class="paging-links layout-content-col span-9">&nbsp;</div>
+ <div class="paging-links layout-content-col span-4">
+ <a href="#" class="prev-page-link">Previous</a>
+ <a href="#" class="next-page-link">Next</a>
+ </div>
+ </div>
+
+ </div>
+
+ </div>
+
+ <div id="page-footer">
+
+ <p id="copyright">
+ Except as noted, this content is licensed under
+ <a href="http://creativecommons.org/licenses/by/2.5/">
+ Creative Commons Attribution 2.5</a>.<br>
+ For details and restrictions, see the
+ <a href="http://developer.android.com/license.html">Content License</a>.
+ </p>
+
+ <p>
+ <a href="http://www.android.com/terms.html">Site Terms of Service</a> &ndash;
+ <a href="http://www.android.com/privacy.html">Privacy Policy</a> &ndash;
+ <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+ </p>
+
+ </div>
+ </div>
+
+ <script src="../static/jquery-1.6.2.min.js"></script>
+ <script>
+ var SITE_ROOT = '../';
+ </script>
+ <script src="../static/default.js"></script>
+
+
+ <script type="text/javascript">
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+ </script>
+ <script type="text/javascript">
+ var pageTracker = _gat._getTracker("UA-5831155-1");
+ pageTracker._trackPageview();
+ </script>
+ </body>
+</html>
diff --git a/docs/html/design/get-started/creative-vision.html b/docs/html/design/get-started/creative-vision.html
index 11783c4..154f8d0 100644
--- a/docs/html/design/get-started/creative-vision.html
+++ b/docs/html/design/get-started/creative-vision.html
@@ -80,6 +80,10 @@ Android Design - Creative Vision
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/get-started/principles.html b/docs/html/design/get-started/principles.html
index 0d9ef20..f10a90d 100644
--- a/docs/html/design/get-started/principles.html
+++ b/docs/html/design/get-started/principles.html
@@ -80,6 +80,10 @@ Android Design - Design Principles
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -106,7 +110,7 @@ Android Design - Design Principles
best interests in mind. Consider them as you apply your own creativity and design thinking. Deviate
with purpose.</p>
-<h2>Enchant Me</h2>
+<h2 id="enchant-me">Enchant Me</h2>
<div class="layout-content-row">
<div class="layout-content-col span-7">
@@ -176,7 +180,7 @@ over, place previous choices within easy reach.</p>
</div>
</div>
-<h2>Simplify My Life</h2>
+<h2 id="simplify-my-life">Simplify My Life</h2>
<div class="layout-content-row">
<div class="layout-content-col span-7">
@@ -312,7 +316,7 @@ focused, and unless it's critical and time-sensitive, an interruption can be tax
</div>
</div>
-<h2>Make Me Amazing</h2>
+<h2 id="make-me-amazing">Make Me Amazing</h2>
<div class="layout-content-row">
<div class="layout-content-col span-7">
diff --git a/docs/html/design/get-started/ui-overview.html b/docs/html/design/get-started/ui-overview.html
index bd5ff9c..a4881d5 100644
--- a/docs/html/design/get-started/ui-overview.html
+++ b/docs/html/design/get-started/ui-overview.html
@@ -80,6 +80,10 @@ Android Design - UI Overview
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -109,7 +113,7 @@ enjoyable to use. At the end of this chapter we introduce the main elements for
in your app.</p>
<p>Read on for a quick overview of the most important aspects of the Android user interface.</p>
-<h2>Home, All Apps, and Recents</h2>
+<h2 id="home-all-apps-recents">Home, All Apps, and Recents</h2>
<div class="vspace size-1">&nbsp;</div>
@@ -153,7 +157,7 @@ recently used app at the bottom.</p>
</div>
</div>
-<h2>System Bars</h2>
+<h2 id="system-bars">System Bars</h2>
<p>The system bars are screen areas dedicated to the display of notifications, communication of device
status, and device navigation. Typically the system bars are displayed concurrently with your app.
@@ -185,7 +189,7 @@ to allow the user to enjoy full screen content without distraction.</p>
</div>
-<h2>Notifications</h2>
+<h2 id="notifications">Notifications</h2>
<p>Notifications are brief messages that users can access at any time from the status bar. They
provide updates, reminders, or information that's important, but not critical enough to warrant
diff --git a/docs/html/design/index.html b/docs/html/design/index.html
index 14d7b63..8583aa4 100644
--- a/docs/html/design/index.html
+++ b/docs/html/design/index.html
@@ -93,6 +93,10 @@ Android Design - Welcome
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/patterns/actionbar.html b/docs/html/design/patterns/actionbar.html
index 911c549..1566d04 100644
--- a/docs/html/design/patterns/actionbar.html
+++ b/docs/html/design/patterns/actionbar.html
@@ -80,6 +80,10 @@ Android Design - Action Bar
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -118,7 +122,8 @@ app.</p>
<p>If you're new to writing Android apps, note that the action bar is one of the most important design
elements you can implement. Following the guidelines described here will go a long way toward making
your app's interface consistent with the core Android apps.</p>
-<h2>General Organization</h2>
+<h2 id="organization">General Organization</h2>
+
<p>The action bar is split into four different functional areas that apply to most apps.</p>
<img src="../static/content/action_bar_basics.png">
@@ -129,8 +134,8 @@ your app's interface consistent with the core Android apps.</p>
<li class="value-1"><h4>App icon</h4>
<p>
-The app icon establishes your app's identity. It can be replaced with a different logo or branding if
-you wish.
+The app icon establishes your app's identity. It can be replaced with a different logo or branding
+if you wish.
Important: If the app is currently not displaying the top-level screen, be sure to display the Up
caret to the left of the app icon, so the user can navigate up the hierarchy. For more discussion of
Up navigation, see the <a href="../patterns/navigation.html">Navigation</a> pattern.
@@ -180,12 +185,11 @@ Move less often used actions to the action overflow.
</p>
</li>
</ol>
-
</div>
</div>
+<h2 id="adapting-rotation">Adapting to Rotation and Different Screen Sizes</h2>
-<h2>Adapting to Rotation and Different Screen Sizes</h2>
<p>One of the most important UI issues to consider when creating an app is how to adjust to screen
rotation on different screen sizes.</p>
<p>You can adapt to such changes by using <em>split action bars</em>, which allow you to distribute action bar
@@ -196,7 +200,7 @@ content across multiple bars located below the main action bar or at the bottom
Split action bar showing action buttons at the bottom of the screen in vertical orientation.
</div>
-<h2>Layout Considerations for Split Action Bars</h2>
+<h2 id="considerations-split-action-bars">Layout Considerations for Split Action Bars</h2>
<div class="layout-content-row">
<div class="layout-content-col span-8 with-callouts">
@@ -222,7 +226,8 @@ the top bar.</p>
</div>
</div>
-<h2>Contextual Action Bars</h2>
+<h2 id="contextual">Contextual Action Bars</h2>
+
<p>A <em>contextual action bar (CAB)</em> is a temporary action bar that overlays the app's action bar for the
duration of a particular sub-task. CABs are most typically used for tasks that involve acting on
selected data or text.</p>
@@ -244,7 +249,8 @@ selected data or text.</p>
<p>Use CABs whenever you allow the user to select data via long press. You can control the action
content of a CAB in order to insert the actions you would like the user to be able to perform.</p>
<p>For more information, refer to the "Selection" pattern.</p>
-<h2>Action Bar Elements</h2>
+<h2 id="elements">Action Bar Elements</h2>
+
<h4>Tabs</h4>
<p><em>Tabs</em> display app views concurrently and make it easy to explore and switch between them. Use tabs
if you expect your users to switch views frequently.</p>
@@ -326,7 +332,9 @@ tabs. Fixed tabs in the main action bar can move to the top bar when the screen
<p><em>Action buttons</em> on the action bar surface your app's most important activities. Think about which
buttons will get used most often, and order them accordingly. Depending on available screen real
estate, the system shows your most important actions as action buttons and moves the rest to the
-action overflow.</p>
+action overflow. The action bar and the action overflow should only present actions to the user that
+are available. If an action is unavailable in the current context, hide it. Do not show it as
+disabled.</p>
<img src="../static/content/action_bar_pattern_action_icons.png">
<div class="figure-caption">
@@ -380,8 +388,7 @@ files for further customization.
</p>
<p>
-<a href="../static/download/action_bar_icons-v4.0.zip">Download the Action Bar Icon
-Pack</a>
+<a href="https://dl-ssl.google.com/android/design/Android_Design_Icons_20120229.zip">Download the Action Bar Icon Pack</a>
</p>
@@ -436,7 +443,8 @@ sharing options.</p>
The Gallery app's share action provider with extended spinner for additional sharing options.
</div>
-<h2>Action Bar Checklist</h2>
+<h2 id="checklist">Action Bar Checklist</h2>
+
<p>When planning your split action bars, ask yourself questions like these:</p>
<h4>How important is view navigation to the task?</h4>
<p>If view navigation is very important to your app, use tabs (for fastest view-switching) or spinners.</p>
diff --git a/docs/html/design/patterns/app-structure.html b/docs/html/design/patterns/app-structure.html
index fb9205b..1b48280 100644
--- a/docs/html/design/patterns/app-structure.html
+++ b/docs/html/design/patterns/app-structure.html
@@ -80,6 +80,10 @@ Android Design - Application Structure
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -111,7 +115,8 @@ Android Design - Application Structure
<li>Apps such as Gmail or Market that combine a broad set of data views with deep navigation</li>
</ul>
<p>Your app's structure depends largely on the content and tasks you want to surface for your users.</p>
-<h2>General Structure</h2>
+<h2 id="general-structure">General Structure</h2>
+
<p>A typical Android app consists of top level and detail/edit views. If the navigation hierarchy is
deep and complex, category views connect top level and detail views.</p>
@@ -139,7 +144,8 @@ facet of your app.</p>
</div>
</div>
-<h2>Top Level</h2>
+<h2 id="top-level">Top Level</h2>
+
<p>The layout of your start screen requires special attention. This is the first screen people see
after launching your app, so it should be an equally rewarding experience for new and frequent
visitors alike.</p>
@@ -219,7 +225,8 @@ monotony of simple list views.</p>
</div>
</div>
-<h2>Categories</h2>
+<h2 id="categories">Categories</h2>
+
<p>Generally, the purpose of a deep, data-driven app is to navigate through organizational categories
to the detail level, where data can be viewed and managed. Minimize perceived navigation effort by
keeping your apps shallow.</p>
@@ -281,7 +288,8 @@ are often good reasons to act on collections of data as well.</p>
delete multiple items in the category view. Analyze which detail view actions are applicable to
collections of items. Then use multi-select to allow application of those actions to multiple items
in a category view.</p>
-<h2>Details</h2>
+<h2 id="details">Details</h2>
+
<p>The detail view allows you to view and act on your data. The layout of the detail view depends on
the data type being displayed, and therefore differs widely among apps.</p>
@@ -330,7 +338,8 @@ to achieve this.</p>
filmstrip control that lets people quickly jump to specific images.
</div>
-<h2>Checklist</h2>
+<h2 id="checklist">Checklist</h2>
+
<ul>
<li>
<p>Find ways to display useful content on your start screen.</p>
diff --git a/docs/html/design/patterns/compatibility.html b/docs/html/design/patterns/compatibility.html
index f18c62d..d6e59f5 100644
--- a/docs/html/design/patterns/compatibility.html
+++ b/docs/html/design/patterns/compatibility.html
@@ -80,6 +80,10 @@ Android Design - Backwards Compatibility
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -110,7 +114,7 @@ Android Design - Backwards Compatibility
</ul>
<p>Android 4.0 brings these changes for tablets to the phone platform.</p>
-<h2>Adapting Android 4.0 to Older Hardware and Apps</h2>
+<h2 id="older-hardware">Adapting Android 4.0 to Older Hardware and Apps</h2>
<div class="layout-content-row">
<div class="layout-content-col span-6">
diff --git a/docs/html/design/patterns/gestures.html b/docs/html/design/patterns/gestures.html
index f8585e4..c88817f 100644
--- a/docs/html/design/patterns/gestures.html
+++ b/docs/html/design/patterns/gestures.html
@@ -80,6 +80,10 @@ Android Design - Gestures
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/patterns/index.html b/docs/html/design/patterns/index.html
index ff797db..863baa9 100644
--- a/docs/html/design/patterns/index.html
+++ b/docs/html/design/patterns/index.html
@@ -93,6 +93,10 @@ Android Design - Design Patterns
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/patterns/multi-pane-layouts.html b/docs/html/design/patterns/multi-pane-layouts.html
index af05e31..7925c98 100644
--- a/docs/html/design/patterns/multi-pane-layouts.html
+++ b/docs/html/design/patterns/multi-pane-layouts.html
@@ -80,6 +80,10 @@ Android Design - Multi-pane Layouts
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -108,7 +112,8 @@ layout by adjusting its content to varying screen sizes and orientations.</p>
<p><em>Panels</em> are a great way for your app to achieve this. They allow you to combine multiple views into
one compound view when a lot of horizontal screen real estate is available and by splitting them up
when less space is available.</p>
-<h2>Combining Multiple Views Into One</h2>
+<h2 id="combining-views">Combining Multiple Views Into One</h2>
+
<p>On smaller devices your content is typically divided into a master grid or list view and a detail
view. Touching an item in the master view opens a different screen showing that item's detail
information.</p>
@@ -124,7 +129,8 @@ and makes navigating the app easier. </p>
<p>In general, use the pane on the right to present more information about the item you selected in the
left pane. Make sure to keep the item in the left pane selected in order to establish the
relationship between the panels.</p>
-<h2>Compound Views and Orientation Changes</h2>
+<h2 id="orientation">Compound Views and Orientation Changes</h2>
+
<p>Screens should have the same functionality regardless of orientation. If you use a compound view in
one orientation, don't split it up when the user rotates the screen. There are several techniques
you can use to adjust the layout after orientation change while keeping functional parity intact.</p>
@@ -189,7 +195,8 @@ the content in the detail panel.</p>
</div>
</div>
-<h2>Checklist</h2>
+<h2 id="checklist">Checklist</h2>
+
<ul>
<li>
<p>Plan in advance on how your app scales to different screen sizes and screen orientations.</p>
diff --git a/docs/html/design/patterns/navigation.html b/docs/html/design/patterns/navigation.html
index cad3682..6287b5e 100644
--- a/docs/html/design/patterns/navigation.html
+++ b/docs/html/design/patterns/navigation.html
@@ -80,6 +80,10 @@ Android Design - Navigation with Back and Up
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -112,7 +116,8 @@ the <em>Up</em> button, consisting of the app icon and a left-point caret.</p>
<img src="../static/content/navigation_with_back_and_up.png">
-<h2>Up vs. Back</h2>
+<h2 id="up-vs-back">Up vs. Back</h2>
+
<p>The Up button is used to navigate within an application based on the hierarchical relationships
between screens. For instance, if screen A displays a list of items, and selecting an item leads to
screen B (which presents that item in more detail), then screen B should offer an Up button that
@@ -134,7 +139,8 @@ return the user to the Home screen, or even to a different application.</p>
<li>Back dismisses contextual action bars, and removes the highlight from the selected items</li>
<li>Back hides the onscreen keyboard (IME)</li>
</ul>
-<h2>Navigation Within Your App</h2>
+<h2 id="within-app">Navigation Within Your App</h2>
+
<h4>Navigating to screens with multiple entry points</h4>
<p>Sometimes a screen doesn't have a strict position within the app's hierarchy, and can be reached
from multiple entry points&mdash;e.g., a settings screen which can be navigated to from any screen
@@ -176,7 +182,8 @@ which the user had not previously navigated through.</p>
<img src="../static/content/navigation_between_siblings_market2.png">
-<h2>Navigation From Outside Your App</h2>
+<h2 id="from-outside">Navigation From Outside Your App</h2>
+
<p>There are two categories of navigation from outside your app to screens deep within the app's
hierarchy:</p>
<ul>
diff --git a/docs/html/design/patterns/new-4-0.html b/docs/html/design/patterns/new-4-0.html
index 272b079..2e2cbc2 100644
--- a/docs/html/design/patterns/new-4-0.html
+++ b/docs/html/design/patterns/new-4-0.html
@@ -80,6 +80,10 @@ Android Design - New in Android 4.0
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/patterns/notifications.html b/docs/html/design/patterns/notifications.html
index c5045ae..99af418 100644
--- a/docs/html/design/patterns/notifications.html
+++ b/docs/html/design/patterns/notifications.html
@@ -80,6 +80,10 @@ Android Design - Notifications
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -173,7 +177,7 @@ develop a widget that they can choose to place on their home screen.</p>
</div>
</div>
-<h2>Design Guidelines</h2>
+<h2 id="design-guidelines">Design Guidelines</h2>
<div class="layout-content-row">
<div class="layout-content-col span-6">
@@ -269,7 +273,7 @@ currently pending.</p>
<li>Use color to distinguish your app from others. Notification icons should generally be monochrome.</li>
</ul>
-<h2>Interacting With Notifications</h2>
+<h2 id="interacting-with-notifications">Interacting With Notifications</h2>
<div class="layout-content-row">
<div class="layout-content-col span-6">
diff --git a/docs/html/design/patterns/pure-android.html b/docs/html/design/patterns/pure-android.html
index 507558a..f5a8042 100644
--- a/docs/html/design/patterns/pure-android.html
+++ b/docs/html/design/patterns/pure-android.html
@@ -80,6 +80,10 @@ Android Design - Pure Android
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -227,7 +231,7 @@ the platform and in order to not have the user guess as to what the meaning of t
</div>
</div>
-<h2>Device Independence</h2>
+<h2 id="device-independence">Device Independence</h2>
<p>Remember that your app will run on a wide variety of different screen sizes. Create visual assets
for different screen sizes and densities and make use of concepts such as multi-pane layouts to
diff --git a/docs/html/design/patterns/selection.html b/docs/html/design/patterns/selection.html
index 37dcab5..44c6a84 100644
--- a/docs/html/design/patterns/selection.html
+++ b/docs/html/design/patterns/selection.html
@@ -80,6 +80,10 @@ Android Design - Selection
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -180,7 +184,8 @@ selected data items of the same kind.</p>
</div>
</div>
-<h2>Checklist</h2>
+<h2 id="checklist">Checklist</h2>
+
<ul>
<li>
<p>Whenever your app supports the selection of multiple data items, make use of the contextual action
diff --git a/docs/html/design/patterns/swipe-views.html b/docs/html/design/patterns/swipe-views.html
index 4e8cd03..acc9f39 100644
--- a/docs/html/design/patterns/swipe-views.html
+++ b/docs/html/design/patterns/swipe-views.html
@@ -80,6 +80,10 @@ Android Design - Swipe Views
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -107,7 +111,8 @@ built in a hierarchical fashion, there are instances where horizontal navigation
vertical hierarchies and make access to related data items faster and more enjoyable. Swipe views
allow the user to efficiently move from item to item using a simple gesture and thereby make
browsing and consuming data a more fluent experience.</p>
-<h2>Swiping Between Detail Views</h2>
+<h2 id="detail-views">Swiping Between Detail Views</h2>
+
<p>An app's data is often organized in a master/detail relationship: The user can view a list of
related data items, such as images, chats, or emails, and then pick one of the items to see the
detail contents in a separate screen.</p>
@@ -127,7 +132,7 @@ using the swipe gesture to navigate to the next/previous detail view.</p>
Navigating between consecutive Email messages using the swipe gesture.
</div>
-<h2>Swiping Between Tabs</h2>
+<h2 id="between-tabs">Swiping Between Tabs</h2>
<div class="layout-content-row">
<div class="layout-content-col span-5">
@@ -150,7 +155,8 @@ using the swipe gesture to navigate to the next/previous detail view.</p>
<p>If your app uses action bar tabs, use swipe to navigate between the different views.</p>
<div class="vspace size-2">&nbsp;</div>
-<h2>Checklist</h2>
+<h2 id="checklist">Checklist</h2>
+
<ul>
<li>
<p>Use swipe to quickly navigate between detail views or tabs.</p>
diff --git a/docs/html/design/static/content/downloads_color_swatches.png b/docs/html/design/static/content/downloads_color_swatches.png
new file mode 100644
index 0000000..af2b24f
--- /dev/null
+++ b/docs/html/design/static/content/downloads_color_swatches.png
Binary files differ
diff --git a/docs/html/design/static/content/downloads_roboto_specimen_preview.png b/docs/html/design/static/content/downloads_roboto_specimen_preview.png
new file mode 100644
index 0000000..2954cbf
--- /dev/null
+++ b/docs/html/design/static/content/downloads_roboto_specimen_preview.png
Binary files differ
diff --git a/docs/html/design/static/content/downloads_stencils.png b/docs/html/design/static/content/downloads_stencils.png
new file mode 100644
index 0000000..9e09319
--- /dev/null
+++ b/docs/html/design/static/content/downloads_stencils.png
Binary files differ
diff --git a/docs/html/design/static/default.css b/docs/html/design/static/default.css
index 42ab527..3aa1db3 100644
--- a/docs/html/design/static/default.css
+++ b/docs/html/design/static/default.css
@@ -3,8 +3,8 @@
/* clearfix idiom */
/* common mixins */
/* page layout + top-level styles */
-::-moz-selection,
::-webkit-selection,
+::-moz-selection,
::selection {
background-color: #0099cc;
color: #fff; }
@@ -256,6 +256,8 @@ video.with-shadow {
position: absolute;
top: 10px;
right: 10px; }
+ #nav .nav-section-header.empty:after {
+ display: none; }
#nav li.expanded .nav-section-header {
background: rgba(0, 0, 0, 0.05); }
#nav li.expanded .nav-section-header:after {
@@ -268,9 +270,9 @@ video.with-shadow {
overflow: hidden;
margin-bottom: 0; }
#nav > li > ul.animate-height {
- transition: height 0.25s ease-in;
-webkit-transition: height 0.25s ease-in;
- -moz-transition: height 0.25s ease-in; }
+ -moz-transition: height 0.25s ease-in;
+ transition: height 0.25s ease-in; }
#nav > li > ul li {
padding: 10px 10px 11px 10px; }
#nav > li.expanded > ul {
@@ -330,6 +332,39 @@ video.with-shadow {
margin-left: 5px; }
/* content body */
+@-webkit-keyframes glowheader {
+ from {
+ background-color: #33b5e5;
+ color: #000;
+ border-bottom-color: #000; }
+
+ to {
+ background-color: transparent;
+ color: #33b5e5;
+ border-bottom-color: #33b5e5; } }
+
+@-moz-keyframes glowheader {
+ from {
+ background-color: #33b5e5;
+ color: #000;
+ border-bottom-color: #000; }
+
+ to {
+ background-color: transparent;
+ color: #33b5e5;
+ border-bottom-color: #33b5e5; } }
+
+@keyframes glowheader {
+ from {
+ background-color: #33b5e5;
+ color: #000;
+ border-bottom-color: #000; }
+
+ to {
+ background-color: transparent;
+ color: #33b5e5;
+ border-bottom-color: #33b5e5; } }
+
#content p,
#content ul,
#content ol,
@@ -345,6 +380,16 @@ video.with-shadow {
color: #33b5e5;
border-bottom: 1px solid #33b5e5;
height: 30px; }
+ #content h2:target {
+ -webkit-animation-name: glowheader;
+ -moz-animation-name: glowheader;
+ animation-name: glowheader;
+ -webkit-animation-duration: 0.7s;
+ -moz-animation-duration: 0.7s;
+ animation-duration: 0.7s;
+ -webkit-animation-timing-function: ease-out;
+ -moz-animation-timing-function: ease-out;
+ animation-timing-function: ease-out; }
#content hr {
border: 0;
border-bottom: 1px solid #33b5e5;
@@ -569,3 +614,20 @@ li.no-bullet {
margin-right: 8px; }
.video-instructions:after {
content: 'Click to replay movie.'; }
+
+/* download buttons */
+.download-button {
+ display: block;
+ margin-bottom: 5px;
+ text-decoration: none;
+ background-color: #33b5e5;
+ color: #fff !important;
+ font-weight: 500;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
+ padding: 6px 12px;
+ border-radius: 2px; }
+ .download-button:hover, .download-button:focus {
+ background-color: #0099cc;
+ color: #fff !important; }
+ .download-button:active {
+ background-color: #006699; }
diff --git a/docs/html/design/static/default.js b/docs/html/design/static/default.js
index 6721ab8..b213dd9 100644
--- a/docs/html/design/static/default.js
+++ b/docs/html/design/static/default.js
@@ -158,4 +158,12 @@ $(document).ready(function() {
$tooltip.hide();
});
});
+
+ // Set up <h2> deeplinks
+ $('h2').click(function() {
+ var id = $(this).attr('id');
+ if (id) {
+ document.location.hash = id;
+ }
+ });
}); \ No newline at end of file
diff --git a/docs/html/design/static/download/RobotoSpecimenBook.pdf b/docs/html/design/static/download/RobotoSpecimenBook.pdf
deleted file mode 100644
index 594a366..0000000
--- a/docs/html/design/static/download/RobotoSpecimenBook.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/static/download/Roboto_Hinted_20111129.zip b/docs/html/design/static/download/Roboto_Hinted_20111129.zip
deleted file mode 100644
index 3d3ab77..0000000
--- a/docs/html/design/static/download/Roboto_Hinted_20111129.zip
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/static/download/action_bar_icons-v4.0.zip b/docs/html/design/static/download/action_bar_icons-v4.0.zip
deleted file mode 100644
index 4568894..0000000
--- a/docs/html/design/static/download/action_bar_icons-v4.0.zip
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/static/download/color_swatches.zip b/docs/html/design/static/download/color_swatches.zip
deleted file mode 100644
index 0221d7b..0000000
--- a/docs/html/design/static/download/color_swatches.zip
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/static/ico_styleguide.png b/docs/html/design/static/ico_styleguide.png
deleted file mode 100644
index c12907c..0000000
--- a/docs/html/design/static/ico_styleguide.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/style/color.html b/docs/html/design/style/color.html
index 893e09e..bca3c45 100644
--- a/docs/html/design/style/color.html
+++ b/docs/html/design/style/color.html
@@ -173,6 +173,10 @@ Android Design - Color
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -218,10 +222,11 @@ between visual components. Note that red and green may be indistinguishable to c
</ul>
</div>
-<h2>Palette</h2>
+<h2 id="palette">Palette</h2>
+
<p>Blue is the standard accent color in Android's color palette. Each color has a corresponding darker
shade that can be used as a complement when needed.</p>
-<p><a href="../static/download/color_swatches.zip">Download the swatches</a></p>
+<p><a href="https://dl-ssl.google.com/android/design/Android_Design_Color_Swatches_20120229.zip">Download the swatches</a></p>
<img src="../static/content/color_spectrum.png">
diff --git a/docs/html/design/style/devices-displays.html b/docs/html/design/style/devices-displays.html
index 9fba719..89e0876 100644
--- a/docs/html/design/style/devices-displays.html
+++ b/docs/html/design/style/devices-displays.html
@@ -80,6 +80,10 @@ Android Design - Devices and Displays
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/style/iconography.html b/docs/html/design/style/iconography.html
index 5d5d200..96954de 100644
--- a/docs/html/design/style/iconography.html
+++ b/docs/html/design/style/iconography.html
@@ -80,6 +80,10 @@ Android Design - Iconography
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -191,7 +195,7 @@ from above, so that users perceive some depth.</p>
</div>
-<h2 id="actionbar">Action Bar</h2>
+<h2 id="action-bar">Action Bar</h2>
<p>
@@ -211,8 +215,7 @@ files for further customization.
</p>
<p>
-<a href="../static/download/action_bar_icons-v4.0.zip">Download the Action Bar Icon
-Pack</a>
+<a href="https://dl-ssl.google.com/android/design/Android_Design_Icons_20120229.zip">Download the Action Bar Icon Pack</a>
</p>
@@ -290,7 +293,7 @@ Disabled: <strong>30%</strong> opacity</p>
</div>
-<h2 id="small_contextual">Small / Contextual Icons</h2>
+<h2 id="small-contextual">Small / Contextual Icons</h2>
<p>Within the body of your app, use small icons to surface actions and/or provide status for specific
items. For example, in the Gmail app, each message has a star icon that marks the message as
diff --git a/docs/html/design/style/index.html b/docs/html/design/style/index.html
index 5ecbafa..c7ac58f 100644
--- a/docs/html/design/style/index.html
+++ b/docs/html/design/style/index.html
@@ -93,6 +93,10 @@ Android Design - Design Elements
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/style/metrics-grids.html b/docs/html/design/style/metrics-grids.html
index 17d4937..7bb9dd0 100644
--- a/docs/html/design/style/metrics-grids.html
+++ b/docs/html/design/style/metrics-grids.html
@@ -80,6 +80,10 @@ Android Design - Metrics and Grids
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -130,7 +134,7 @@ Screen Sizes and Densities Device Dashboard</a>.</p>
</div>
</div>
-<h2>48dp Rhythm</h2>
+<h2 id="48dp-rhythm">48dp Rhythm</h2>
<p>Touchable UI components are generally laid out along 48dp units.</p>
@@ -157,7 +161,7 @@ will be able to reliably and accurately target them with their fingers.</p>
<h4>Mind the gaps</h4>
<p>Spacing between each UI element is 8dp.</p>
-<h2>Examples</h2>
+<h2 id="examples">Examples</h2>
<img src="../static/content/metrics_forms.png">
diff --git a/docs/html/design/style/themes.html b/docs/html/design/style/themes.html
index ada974d..a629978 100644
--- a/docs/html/design/style/themes.html
+++ b/docs/html/design/style/themes.html
@@ -80,6 +80,10 @@ Android Design - Themes
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/style/touch-feedback.html b/docs/html/design/style/touch-feedback.html
index 0d49832..d1c08f8 100644
--- a/docs/html/design/style/touch-feedback.html
+++ b/docs/html/design/style/touch-feedback.html
@@ -80,6 +80,10 @@ Android Design - Touch Feedback
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/style/typography.html b/docs/html/design/style/typography.html
index d3cc769..d9b6d4b 100644
--- a/docs/html/design/style/typography.html
+++ b/docs/html/design/style/typography.html
@@ -80,6 +80,10 @@ Android Design - Typography
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -119,8 +123,8 @@ italic weights by default.</p>
<img src="../static/content/typography_alphas.png">
-<p><a href="../static/download/Roboto_Hinted_20111129.zip">Download Roboto</a></p>
-<p><a href="../static/download/RobotoSpecimenBook.pdf">Specimen Book</a></p>
+<p><a href="https://dl-ssl.google.com/android/design/Roboto_Hinted_20111129.zip">Download Roboto</a></p>
+<p><a href="https://dl-ssl.google.com/android/design/Roboto_Specimen_Book_20111129.pdf">Specimen Book</a></p>
</div>
</div>
diff --git a/docs/html/design/style/writing.html b/docs/html/design/style/writing.html
index e5f1ea8..146ce88 100644
--- a/docs/html/design/style/writing.html
+++ b/docs/html/design/style/writing.html
@@ -132,6 +132,10 @@ Android Design - Writing Style
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -186,7 +190,7 @@ Android Design - Writing Style
</li>
</ol>
-<h2>Examples</h2>
+<h2 id="examples">Examples</h2>
<ol><li class="value-1"><strong>Keep it brief.</strong> From the setup wizard:</ol>
diff --git a/docs/html/guide/topics/fundamentals/fragments.jd b/docs/html/guide/topics/fundamentals/fragments.jd
index d4f9342..281cb9d 100644
--- a/docs/html/guide/topics/fundamentals/fragments.jd
+++ b/docs/html/guide/topics/fundamentals/fragments.jd
@@ -659,7 +659,7 @@ href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a> developer guides.
<div class="figure" style="width:350px">
<img src="{@docRoot}images/activity_fragment_lifecycle.png" alt=""/>
-<p class="img-caption"><strong>Figure 3.</strong> The activity lifecycle's affect on the fragment
+<p class="img-caption"><strong>Figure 3.</strong> The effect of the activity lifecycle on the fragment
lifecycle.</p>
</div>
diff --git a/drm/drmserver/DrmManagerService.cpp b/drm/drmserver/DrmManagerService.cpp
index caeb026..8ba0203 100644
--- a/drm/drmserver/DrmManagerService.cpp
+++ b/drm/drmserver/DrmManagerService.cpp
@@ -159,12 +159,18 @@ int DrmManagerService::checkRightsStatus(
status_t DrmManagerService::consumeRights(
int uniqueId, DecryptHandle* decryptHandle, int action, bool reserve) {
ALOGV("Entering consumeRights");
+ if (!isProtectedCallAllowed()) {
+ return DRM_ERROR_NO_PERMISSION;
+ }
return mDrmManager->consumeRights(uniqueId, decryptHandle, action, reserve);
}
status_t DrmManagerService::setPlaybackStatus(
int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int64_t position) {
ALOGV("Entering setPlaybackStatus");
+ if (!isProtectedCallAllowed()) {
+ return DRM_ERROR_NO_PERMISSION;
+ }
return mDrmManager->setPlaybackStatus(uniqueId, decryptHandle, playbackStatus, position);
}
@@ -229,12 +235,18 @@ DecryptHandle* DrmManagerService::openDecryptSession(
status_t DrmManagerService::closeDecryptSession(int uniqueId, DecryptHandle* decryptHandle) {
ALOGV("Entering closeDecryptSession");
+ if (!isProtectedCallAllowed()) {
+ return DRM_ERROR_NO_PERMISSION;
+ }
return mDrmManager->closeDecryptSession(uniqueId, decryptHandle);
}
status_t DrmManagerService::initializeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle,
int decryptUnitId, const DrmBuffer* headerInfo) {
ALOGV("Entering initializeDecryptUnit");
+ if (!isProtectedCallAllowed()) {
+ return DRM_ERROR_NO_PERMISSION;
+ }
return mDrmManager->initializeDecryptUnit(uniqueId,decryptHandle, decryptUnitId, headerInfo);
}
@@ -242,18 +254,27 @@ status_t DrmManagerService::decrypt(
int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId,
const DrmBuffer* encBuffer, DrmBuffer** decBuffer, DrmBuffer* IV) {
ALOGV("Entering decrypt");
+ if (!isProtectedCallAllowed()) {
+ return DRM_ERROR_NO_PERMISSION;
+ }
return mDrmManager->decrypt(uniqueId, decryptHandle, decryptUnitId, encBuffer, decBuffer, IV);
}
status_t DrmManagerService::finalizeDecryptUnit(
int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId) {
ALOGV("Entering finalizeDecryptUnit");
+ if (!isProtectedCallAllowed()) {
+ return DRM_ERROR_NO_PERMISSION;
+ }
return mDrmManager->finalizeDecryptUnit(uniqueId, decryptHandle, decryptUnitId);
}
ssize_t DrmManagerService::pread(int uniqueId, DecryptHandle* decryptHandle,
void* buffer, ssize_t numBytes, off64_t offset) {
ALOGV("Entering pread");
+ if (!isProtectedCallAllowed()) {
+ return DRM_ERROR_NO_PERMISSION;
+ }
return mDrmManager->pread(uniqueId, decryptHandle, buffer, numBytes, offset);
}
diff --git a/drm/drmserver/main_drmserver.cpp b/drm/drmserver/main_drmserver.cpp
index e61b269..434d561 100644
--- a/drm/drmserver/main_drmserver.cpp
+++ b/drm/drmserver/main_drmserver.cpp
@@ -17,15 +17,10 @@
#define LOG_TAG "drmserver"
//#define LOG_NDEBUG 0
-#include <sys/types.h>
-#include <unistd.h>
-#include <grp.h>
-
#include <binder/IPCThreadState.h>
#include <binder/ProcessState.h>
#include <binder/IServiceManager.h>
#include <utils/Log.h>
-#include <private/android_filesystem_config.h>
#include <DrmManagerService.h>
diff --git a/drm/java/android/drm/DrmRights.java b/drm/java/android/drm/DrmRights.java
index d4afed1..a9b4f05 100755
--- a/drm/java/android/drm/DrmRights.java
+++ b/drm/java/android/drm/DrmRights.java
@@ -30,19 +30,24 @@ import java.io.IOException;
* A caller can also instantiate a {@link DrmRights} object by using the
* {@link DrmRights#DrmRights(String, String)} constructor, which takes a path to a file
* containing rights information instead of a <code>ProcessedData</code>.
+ *<p>
+ * Please note that the account id and subscription id is not mandatory by all DRM agents
+ * or plugins. When account id or subscription id is not required by the specific DRM
+ * agent or plugin, they can be either null, or an empty string, or any other don't-care
+ * string value.
*
*/
public class DrmRights {
private byte[] mData;
private String mMimeType;
- private String mAccountId = "_NO_USER";
- private String mSubscriptionId = "";
+ private String mAccountId;
+ private String mSubscriptionId;
/**
* Creates a <code>DrmRights</code> object with the given parameters.
*
* @param rightsFilePath Path to the file containing rights information.
- * @param mimeType MIME type.
+ * @param mimeType MIME type. Must not be null or an empty string.
*/
public DrmRights(String rightsFilePath, String mimeType) {
File file = new File(rightsFilePath);
@@ -53,22 +58,20 @@ public class DrmRights {
* Creates a <code>DrmRights</code> object with the given parameters.
*
* @param rightsFilePath Path to the file containing rights information.
- * @param mimeType MIME type.
+ * @param mimeType MIME type. Must not be null or an empty string.
* @param accountId Account ID of the user.
*/
public DrmRights(String rightsFilePath, String mimeType, String accountId) {
this(rightsFilePath, mimeType);
- if (null != accountId && !accountId.equals("")) {
- mAccountId = accountId;
- }
+ mAccountId = accountId;
}
/**
* Creates a <code>DrmRights</code> object with the given parameters.
*
* @param rightsFilePath Path to the file containing rights information.
- * @param mimeType MIME type.
+ * @param mimeType MIME type. Must not be null or an empty string.
* @param accountId Account ID of the user.
* @param subscriptionId Subscription ID of the user.
*/
@@ -76,20 +79,15 @@ public class DrmRights {
String rightsFilePath, String mimeType, String accountId, String subscriptionId) {
this(rightsFilePath, mimeType);
- if (null != accountId && !accountId.equals("")) {
- mAccountId = accountId;
- }
-
- if (null != subscriptionId && !subscriptionId.equals("")) {
- mSubscriptionId = subscriptionId;
- }
+ mAccountId = accountId;
+ mSubscriptionId = subscriptionId;
}
/**
* Creates a <code>DrmRights</code> object with the given parameters.
*
* @param rightsFile File containing rights information.
- * @param mimeType MIME type.
+ * @param mimeType MIME type. Must not be null or an empty string.
*/
public DrmRights(File rightsFile, String mimeType) {
instantiate(rightsFile, mimeType);
@@ -114,28 +112,19 @@ public class DrmRights {
* Creates a <code>DrmRights</code> object with the given parameters.
*
* @param data A {@link ProcessedData} object containing rights information.
- * data could be null because it's optional for some DRM schemes.
- * @param mimeType The MIME type.
+ * Must not be null.
+ * @param mimeType The MIME type. It must not be null or an empty string.
*/
public DrmRights(ProcessedData data, String mimeType) {
- if (data != null) {
- mData = data.getData();
-
- String accountId = data.getAccountId();
- if (null == accountId || !accountId.equals("")) {
- throw new IllegalArgumentException("accountId: " + accountId);
- }
- mAccountId = accountId;
-
- String subscriptionId = data.getSubscriptionId();
- if (null == subscriptionId || !subscriptionId.equals("")) {
- throw new IllegalArgumentException(
- "subscriptionId: " + subscriptionId);
- }
- mSubscriptionId = subscriptionId;
+ if (data == null) {
+ throw new IllegalArgumentException("data is null");
}
+ mData = data.getData();
+ mAccountId = data.getAccountId();
+ mSubscriptionId = data.getSubscriptionId();
mMimeType = mimeType;
+
if (!isValid()) {
final String msg = "mimeType: " + mMimeType + "," +
"data: " + mData;
diff --git a/drm/java/android/drm/DrmStore.java b/drm/java/android/drm/DrmStore.java
index 2f004cf..3a77ea1 100755
--- a/drm/java/android/drm/DrmStore.java
+++ b/drm/java/android/drm/DrmStore.java
@@ -108,6 +108,12 @@ public class DrmStore {
* A trigger information object type.
*/
public static final int TRIGGER_OBJECT = 0x03;
+
+ /**
+ * @deprecated This class should have been an interface instead.
+ * The default constuctor should have not been exposed.
+ */
+ public DrmObjectType() {}
}
/**
@@ -143,6 +149,12 @@ public class DrmStore {
}
return isValid;
}
+
+ /**
+ * @deprecated This class should have been an interface instead.
+ * The default constuctor should have not been exposed.
+ */
+ public Playback() {}
}
/**
@@ -198,6 +210,12 @@ public class DrmStore {
}
return isValid;
}
+
+ /**
+ * @deprecated This class should have been an interface instead.
+ * The default constuctor should have not been exposed.
+ */
+ public Action() {}
}
/**
@@ -220,6 +238,18 @@ public class DrmStore {
* The digital rights have not been acquired for the rights-protected content.
*/
public static final int RIGHTS_NOT_ACQUIRED = 0x03;
+
+ /**
+ * @deprecated This class should have been an interface instead.
+ * The default constuctor should have not been exposed.
+ */
+ public RightsStatus() {}
}
+
+ /**
+ * @deprecated This class should have been an interface instead.
+ * The default constuctor should have not been exposed.
+ */
+ public DrmStore() {}
}
diff --git a/drm/java/android/drm/DrmSupportInfo.java b/drm/java/android/drm/DrmSupportInfo.java
index 720c545..6484fa7 100755
--- a/drm/java/android/drm/DrmSupportInfo.java
+++ b/drm/java/android/drm/DrmSupportInfo.java
@@ -85,12 +85,23 @@ public class DrmSupportInfo {
* Retrieves the DRM plug-in (agent) description.
*
* @return The plug-in description.
+ * @deprecated The method name is mis-spelled, and it is replaced by
+ * {@link #getDescription()}.
*/
public String getDescriprition() {
return mDescription;
}
/**
+ * Retrieves the DRM plug-in (agent) description.
+ *
+ * @return The plug-in description.
+ */
+ public String getDescription() {
+ return mDescription;
+ }
+
+ /**
* Overridden hash code implementation.
*
* @return The hash code value.
diff --git a/drm/java/android/drm/DrmUtils.java b/drm/java/android/drm/DrmUtils.java
index dc5f1fa..4f7cb22 100755
--- a/drm/java/android/drm/DrmUtils.java
+++ b/drm/java/android/drm/DrmUtils.java
@@ -55,8 +55,8 @@ public class DrmUtils {
bufferedStream.read(data);
}
} finally {
- quiteDispose(bufferedStream);
- quiteDispose(inputStream);
+ quietlyDispose(bufferedStream);
+ quietlyDispose(inputStream);
}
return data;
}
@@ -70,7 +70,7 @@ public class DrmUtils {
outputStream = new FileOutputStream(path);
outputStream.write(data);
} finally {
- quiteDispose(outputStream);
+ quietlyDispose(outputStream);
}
}
}
@@ -80,7 +80,7 @@ public class DrmUtils {
file.delete();
}
- private static void quiteDispose(InputStream stream) {
+ private static void quietlyDispose(InputStream stream) {
try {
if (null != stream) {
stream.close();
@@ -90,7 +90,7 @@ public class DrmUtils {
}
}
- private static void quiteDispose(OutputStream stream) {
+ private static void quietlyDispose(OutputStream stream) {
try {
if (null != stream) {
stream.close();
@@ -175,14 +175,34 @@ public class DrmUtils {
}
}
+ /**
+ * This method returns an iterator object that can be used to iterate over
+ * all values of the metadata.
+ *
+ * @return The iterator object.
+ */
public Iterator<String> iterator() {
return mMap.values().iterator();
}
+ /**
+ * This method returns an iterator object that can be used to iterate over
+ * all keys of the metadata.
+ *
+ * @return The iterator object.
+ */
public Iterator<String> keyIterator() {
return mMap.keySet().iterator();
}
+ /**
+ * This method retrieves the metadata value associated with a given key.
+ *
+ * @param key The key whose value is being retrieved.
+ *
+ * @return The metadata value associated with the given key. Returns null
+ * if the key is not found.
+ */
public String get(String key) {
return mMap.get(key);
}
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp
index 27ea8f6..9fc4fd4 100644
--- a/graphics/jni/android_renderscript_RenderScript.cpp
+++ b/graphics/jni/android_renderscript_RenderScript.cpp
@@ -23,8 +23,6 @@
#include <math.h>
#include <utils/misc.h>
-#include <surfaceflinger/Surface.h>
-
#include <core/SkBitmap.h>
#include <core/SkPixelRef.h>
#include <core/SkStream.h>
diff --git a/include/binder/CursorWindow.h b/include/androidfw/CursorWindow.h
index 8a2979a..8a2979a 100644
--- a/include/binder/CursorWindow.h
+++ b/include/androidfw/CursorWindow.h
diff --git a/include/binder/MemoryHeapPmem.h b/include/binder/MemoryHeapPmem.h
deleted file mode 100644
index e1660c4..0000000
--- a/include/binder/MemoryHeapPmem.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_MEMORY_HEAP_PMEM_H
-#define ANDROID_MEMORY_HEAP_PMEM_H
-
-#include <stdlib.h>
-#include <stdint.h>
-
-#include <binder/MemoryHeapBase.h>
-#include <binder/IMemory.h>
-#include <utils/SortedVector.h>
-#include <utils/threads.h>
-
-namespace android {
-
-class MemoryHeapBase;
-
-// ---------------------------------------------------------------------------
-
-class MemoryHeapPmem : public MemoryHeapBase
-{
-public:
- class MemoryPmem : public BnMemory {
- public:
- MemoryPmem(const sp<MemoryHeapPmem>& heap);
- ~MemoryPmem();
- protected:
- const sp<MemoryHeapPmem>& getHeap() const { return mClientHeap; }
- private:
- friend class MemoryHeapPmem;
- virtual void revoke() = 0;
- sp<MemoryHeapPmem> mClientHeap;
- };
-
- MemoryHeapPmem(const sp<MemoryHeapBase>& pmemHeap, uint32_t flags = 0);
- ~MemoryHeapPmem();
-
- /* HeapInterface additions */
- virtual sp<IMemory> mapMemory(size_t offset, size_t size);
-
- /* make the whole heap visible (you know who you are) */
- virtual status_t slap();
-
- /* hide (revoke) the whole heap (the client will see the garbage page) */
- virtual status_t unslap();
-
- /* revoke all allocations made by this heap */
- virtual void revoke();
-
-private:
- /* use this to create your own IMemory for mapMemory */
- virtual sp<MemoryPmem> createMemory(size_t offset, size_t size);
- void remove(const wp<MemoryPmem>& memory);
-
-private:
- sp<MemoryHeapBase> mParentHeap;
- mutable Mutex mLock;
- SortedVector< wp<MemoryPmem> > mAllocations;
-};
-
-
-// ---------------------------------------------------------------------------
-}; // namespace android
-
-#endif // ANDROID_MEMORY_HEAP_PMEM_H
diff --git a/include/camera/ICamera.h b/include/camera/ICamera.h
index 400d7f4..3d18837 100644
--- a/include/camera/ICamera.h
+++ b/include/camera/ICamera.h
@@ -20,15 +20,15 @@
#include <utils/RefBase.h>
#include <binder/IInterface.h>
#include <binder/Parcel.h>
-#include <surfaceflinger/Surface.h>
#include <binder/IMemory.h>
#include <utils/String8.h>
#include <camera/Camera.h>
-#include <gui/ISurfaceTexture.h>
namespace android {
class ICameraClient;
+class ISurfaceTexture;
+class Surface;
class ICamera: public IInterface
{
diff --git a/include/drm/drm_framework_common.h b/include/drm/drm_framework_common.h
index 2632cbd..637409c 100644
--- a/include/drm/drm_framework_common.h
+++ b/include/drm/drm_framework_common.h
@@ -43,6 +43,7 @@ enum {
DRM_ERROR_DECRYPT = ERROR_BASE - 5,
DRM_ERROR_CANNOT_HANDLE = ERROR_BASE - 6,
DRM_ERROR_TAMPER_DETECTED = ERROR_BASE - 7,
+ DRM_ERROR_NO_PERMISSION = ERROR_BASE - 8,
DRM_NO_ERROR = NO_ERROR
};
diff --git a/include/gui/BufferQueue.h b/include/gui/BufferQueue.h
index 039e7b0..8c21a28 100644
--- a/include/gui/BufferQueue.h
+++ b/include/gui/BufferQueue.h
@@ -19,9 +19,9 @@
#include <EGL/egl.h>
+#include <gui/IGraphicBufferAlloc.h>
#include <gui/ISurfaceTexture.h>
-#include <surfaceflinger/IGraphicBufferAlloc.h>
#include <ui/GraphicBuffer.h>
#include <utils/String8.h>
diff --git a/include/surfaceflinger/IGraphicBufferAlloc.h b/include/gui/IGraphicBufferAlloc.h
index d3b2062..cee41d9 100644
--- a/include/surfaceflinger/IGraphicBufferAlloc.h
+++ b/include/gui/IGraphicBufferAlloc.h
@@ -14,15 +14,15 @@
* limitations under the License.
*/
-#ifndef ANDROID_SF_IGRAPHIC_BUFFER_ALLOC_H
-#define ANDROID_SF_IGRAPHIC_BUFFER_ALLOC_H
+#ifndef ANDROID_GUI_IGRAPHIC_BUFFER_ALLOC_H
+#define ANDROID_GUI_IGRAPHIC_BUFFER_ALLOC_H
#include <stdint.h>
#include <sys/types.h>
-#include <utils/RefBase.h>
-
#include <binder/IInterface.h>
+#include <ui/PixelFormat.h>
+#include <utils/RefBase.h>
namespace android {
// ----------------------------------------------------------------------------
@@ -55,4 +55,4 @@ public:
}; // namespace android
-#endif // ANDROID_SF_IGRAPHIC_BUFFER_ALLOC_H
+#endif // ANDROID_GUI_IGRAPHIC_BUFFER_ALLOC_H
diff --git a/include/surfaceflinger/ISurface.h b/include/gui/ISurface.h
index 5fdf234..c0ff9fc 100644
--- a/include/surfaceflinger/ISurface.h
+++ b/include/gui/ISurface.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ANDROID_SF_ISURFACE_H
-#define ANDROID_SF_ISURFACE_H
+#ifndef ANDROID_GUI_ISURFACE_H
+#define ANDROID_GUI_ISURFACE_H
#include <stdint.h>
#include <sys/types.h>
@@ -61,4 +61,4 @@ public:
}; // namespace android
-#endif // ANDROID_SF_ISURFACE_H
+#endif // ANDROID_GUI_ISURFACE_H
diff --git a/include/surfaceflinger/ISurfaceComposer.h b/include/gui/ISurfaceComposer.h
index 58fd89d..f3c0ecb 100644
--- a/include/surfaceflinger/ISurfaceComposer.h
+++ b/include/gui/ISurfaceComposer.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ANDROID_SF_ISURFACE_COMPOSER_H
-#define ANDROID_SF_ISURFACE_COMPOSER_H
+#ifndef ANDROID_GUI_ISURFACE_COMPOSER_H
+#define ANDROID_GUI_ISURFACE_COMPOSER_H
#include <stdint.h>
#include <sys/types.h>
@@ -27,8 +27,8 @@
#include <ui/PixelFormat.h>
-#include <surfaceflinger/ISurfaceComposerClient.h>
-#include <surfaceflinger/IGraphicBufferAlloc.h>
+#include <gui/IGraphicBufferAlloc.h>
+#include <gui/ISurfaceComposerClient.h>
namespace android {
// ----------------------------------------------------------------------------
@@ -171,4 +171,4 @@ public:
}; // namespace android
-#endif // ANDROID_SF_ISURFACE_COMPOSER_H
+#endif // ANDROID_GUI_ISURFACE_COMPOSER_H
diff --git a/include/surfaceflinger/ISurfaceComposerClient.h b/include/gui/ISurfaceComposerClient.h
index 02cabc1..c793933 100644
--- a/include/surfaceflinger/ISurfaceComposerClient.h
+++ b/include/gui/ISurfaceComposerClient.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ANDROID_SF_ISURFACE_COMPOSER_CLIENT_H
-#define ANDROID_SF_ISURFACE_COMPOSER_CLIENT_H
+#ifndef ANDROID_GUI_ISURFACE_COMPOSER_CLIENT_H
+#define ANDROID_GUI_ISURFACE_COMPOSER_CLIENT_H
#include <stdint.h>
#include <sys/types.h>
@@ -27,7 +27,7 @@
#include <ui/PixelFormat.h>
-#include <surfaceflinger/ISurface.h>
+#include <gui/ISurface.h>
namespace android {
@@ -81,4 +81,4 @@ public:
}; // namespace android
-#endif // ANDROID_SF_ISURFACE_COMPOSER_CLIENT_H
+#endif // ANDROID_GUI_ISURFACE_COMPOSER_CLIENT_H
diff --git a/include/surfaceflinger/Surface.h b/include/gui/Surface.h
index 06eff8a..1f90c59 100644
--- a/include/surfaceflinger/Surface.h
+++ b/include/gui/Surface.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ANDROID_SF_SURFACE_H
-#define ANDROID_SF_SURFACE_H
+#ifndef ANDROID_GUI_SURFACE_H
+#define ANDROID_GUI_SURFACE_H
#include <stdint.h>
#include <sys/types.h>
@@ -28,9 +28,8 @@
#include <ui/Region.h>
#include <gui/SurfaceTextureClient.h>
-
-#include <surfaceflinger/ISurface.h>
-#include <surfaceflinger/ISurfaceComposerClient.h>
+#include <gui/ISurface.h>
+#include <gui/ISurfaceComposerClient.h>
#define ANDROID_VIEW_SURFACE_JNI_ID "mNativeSurface"
@@ -173,4 +172,4 @@ private:
}; // namespace android
-#endif // ANDROID_SF_SURFACE_H
+#endif // ANDROID_GUI_SURFACE_H
diff --git a/include/surfaceflinger/SurfaceComposerClient.h b/include/gui/SurfaceComposerClient.h
index 99affda..d971031 100644
--- a/include/surfaceflinger/SurfaceComposerClient.h
+++ b/include/gui/SurfaceComposerClient.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ANDROID_SF_SURFACE_COMPOSER_CLIENT_H
-#define ANDROID_SF_SURFACE_COMPOSER_CLIENT_H
+#ifndef ANDROID_GUI_SURFACE_COMPOSER_CLIENT_H
+#define ANDROID_GUI_SURFACE_COMPOSER_CLIENT_H
#include <stdint.h>
#include <sys/types.h>
@@ -29,7 +29,7 @@
#include <ui/PixelFormat.h>
-#include <surfaceflinger/Surface.h>
+#include <gui/Surface.h>
namespace android {
@@ -174,4 +174,4 @@ public:
// ---------------------------------------------------------------------------
}; // namespace android
-#endif // ANDROID_SF_SURFACE_COMPOSER_CLIENT_H
+#endif // ANDROID_GUI_SURFACE_COMPOSER_CLIENT_H
diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h
index 437a89c..b0c581a 100644
--- a/include/media/AudioRecord.h
+++ b/include/media/AudioRecord.h
@@ -225,7 +225,7 @@ public:
/* get sample rate for this record track
*/
- uint32_t getSampleRate();
+ uint32_t getSampleRate() const;
/* Sets marker position. When record reaches the number of frames specified,
* a callback with event type EVENT_MARKER is called. Calling setMarkerPosition
@@ -242,7 +242,7 @@ public:
* - INVALID_OPERATION: the AudioRecord has no callback installed.
*/
status_t setMarkerPosition(uint32_t marker);
- status_t getMarkerPosition(uint32_t *marker);
+ status_t getMarkerPosition(uint32_t *marker) const;
/* Sets position update period. Every time the number of frames specified has been recorded,
@@ -261,7 +261,7 @@ public:
* - INVALID_OPERATION: the AudioRecord has no callback installed.
*/
status_t setPositionUpdatePeriod(uint32_t updatePeriod);
- status_t getPositionUpdatePeriod(uint32_t *updatePeriod);
+ status_t getPositionUpdatePeriod(uint32_t *updatePeriod) const;
/* Gets record head position. The position is the total number of frames
@@ -275,7 +275,7 @@ public:
* - NO_ERROR: successful operation
* - BAD_VALUE: position is NULL
*/
- status_t getPosition(uint32_t *position);
+ status_t getPosition(uint32_t *position) const;
/* returns a handle on the audio input used by this AudioRecord.
*
@@ -285,7 +285,7 @@ public:
* Returned value:
* handle on audio hardware input
*/
- audio_io_handle_t getInput();
+ audio_io_handle_t getInput() const;
/* returns the audio session ID associated to this AudioRecord.
*
@@ -295,7 +295,7 @@ public:
* Returned value:
* AudioRecord session ID.
*/
- int getSessionId();
+ int getSessionId() const;
/* obtains a buffer of "frameCount" frames. The buffer must be
* filled entirely. If the track is stopped, obtainBuffer() returns
@@ -326,7 +326,7 @@ public:
* Such loss typically occurs when the user space process is blocked longer than the capacity of audio driver buffers.
* Unit: the number of input audio frames
*/
- unsigned int getInputFramesLost();
+ unsigned int getInputFramesLost() const;
private:
/* copying audio tracks is not allowed */
@@ -360,7 +360,7 @@ private:
sp<IMemory> mCblkMemory;
sp<ClientRecordThread> mClientRecordThread;
status_t mReadyToRun;
- Mutex mLock;
+ mutable Mutex mLock;
Condition mCondition;
uint32_t mFrameCount;
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h
index 1916ac5..89bc95d 100644
--- a/include/media/AudioSystem.h
+++ b/include/media/AudioSystem.h
@@ -157,7 +157,7 @@ public:
uint32_t samplingRate = 0,
audio_format_t format = AUDIO_FORMAT_DEFAULT,
uint32_t channels = AUDIO_CHANNEL_OUT_STEREO,
- audio_policy_output_flags_t flags = AUDIO_POLICY_OUTPUT_FLAG_INDIRECT);
+ audio_policy_output_flags_t flags = AUDIO_POLICY_OUTPUT_FLAG_NONE);
static status_t startOutput(audio_io_handle_t output,
audio_stream_type_t stream,
int session = 0);
diff --git a/include/media/IAudioPolicyService.h b/include/media/IAudioPolicyService.h
index 4d88297..bdd7747 100644
--- a/include/media/IAudioPolicyService.h
+++ b/include/media/IAudioPolicyService.h
@@ -52,7 +52,7 @@ public:
uint32_t samplingRate = 0,
audio_format_t format = AUDIO_FORMAT_DEFAULT,
uint32_t channels = 0,
- audio_policy_output_flags_t flags = AUDIO_POLICY_OUTPUT_FLAG_INDIRECT) = 0;
+ audio_policy_output_flags_t flags = AUDIO_POLICY_OUTPUT_FLAG_NONE) = 0;
virtual status_t startOutput(audio_io_handle_t output,
audio_stream_type_t stream,
int session = 0) = 0;
diff --git a/include/media/stagefright/ACodec.h b/include/media/stagefright/ACodec.h
index 70799a6..6735aff 100644
--- a/include/media/stagefright/ACodec.h
+++ b/include/media/stagefright/ACodec.h
@@ -49,7 +49,7 @@ struct ACodec : public AHierarchicalStateMachine {
void initiateSetup(const sp<AMessage> &msg);
void signalFlush();
void signalResume();
- void initiateShutdown();
+ void initiateShutdown(bool keepComponentAllocated = false);
void initiateAllocateComponent(const sp<AMessage> &msg);
void initiateConfigureComponent(const sp<AMessage> &msg);
@@ -61,6 +61,7 @@ protected:
private:
struct BaseState;
struct UninitializedState;
+ struct LoadedState;
struct LoadedToIdleState;
struct IdleToExecutingState;
struct ExecutingState;
@@ -107,6 +108,7 @@ private:
sp<AMessage> mNotify;
sp<UninitializedState> mUninitializedState;
+ sp<LoadedState> mLoadedState;
sp<LoadedToIdleState> mLoadedToIdleState;
sp<IdleToExecutingState> mIdleToExecutingState;
sp<ExecutingState> mExecutingState;
@@ -131,6 +133,12 @@ private:
bool mSentFormat;
bool mIsEncoder;
+ bool mShutdownInProgress;
+
+ // If "mKeepComponentAllocated" we only transition back to Loaded state
+ // and do not release the component instance.
+ bool mKeepComponentAllocated;
+
status_t allocateBuffersOnPort(OMX_U32 portIndex);
status_t freeBuffersOnPort(OMX_U32 portIndex);
status_t freeBuffer(OMX_U32 portIndex, size_t i);
diff --git a/include/media/stagefright/MediaCodec.h b/include/media/stagefright/MediaCodec.h
index 8c11c9c..72ac56a 100644
--- a/include/media/stagefright/MediaCodec.h
+++ b/include/media/stagefright/MediaCodec.h
@@ -53,8 +53,15 @@ struct MediaCodec : public AHandler {
uint32_t flags);
status_t start();
+
+ // Returns to a state in which the component remains allocated but
+ // unconfigured.
status_t stop();
+ // Client MUST call release before releasing final reference to this
+ // object.
+ status_t release();
+
status_t flush();
status_t queueInputBuffer(
@@ -97,6 +104,7 @@ private:
STARTED,
FLUSHING,
STOPPING,
+ RELEASING,
};
enum {
@@ -109,6 +117,7 @@ private:
kWhatConfigure = 'conf',
kWhatStart = 'strt',
kWhatStop = 'stop',
+ kWhatRelease = 'rele',
kWhatDequeueInputBuffer = 'deqI',
kWhatQueueInputBuffer = 'queI',
kWhatDequeueOutputBuffer = 'deqO',
diff --git a/media/libstagefright/timedtext/TimedTextDriver.h b/include/media/stagefright/timedtext/TimedTextDriver.h
index efedb6e..efedb6e 100644
--- a/media/libstagefright/timedtext/TimedTextDriver.h
+++ b/include/media/stagefright/timedtext/TimedTextDriver.h
diff --git a/include/private/surfaceflinger/LayerState.h b/include/private/gui/LayerState.h
index 3eb5c99..ca277e0 100644
--- a/include/private/surfaceflinger/LayerState.h
+++ b/include/private/gui/LayerState.h
@@ -23,8 +23,7 @@
#include <utils/Errors.h>
#include <ui/Region.h>
-
-#include <surfaceflinger/ISurface.h>
+#include <gui/ISurface.h>
namespace android {
diff --git a/include/private/surfaceflinger/SharedBufferStack.h b/include/private/gui/SharedBufferStack.h
index 0da03d1..0da03d1 100644
--- a/include/private/surfaceflinger/SharedBufferStack.h
+++ b/include/private/gui/SharedBufferStack.h
diff --git a/include/private/opengles/gl_context.h b/include/private/opengles/gl_context.h
deleted file mode 100644
index 6b1fa77..0000000
--- a/include/private/opengles/gl_context.h
+++ /dev/null
@@ -1,640 +0,0 @@
-/*
- * Copyright (C) 2006 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_OPENGLES_CONTEXT_H
-#define ANDROID_OPENGLES_CONTEXT_H
-
-#include <stdint.h>
-#include <stddef.h>
-#include <sys/types.h>
-#include <pthread.h>
-#ifdef HAVE_ANDROID_OS
-#include <bionic_tls.h>
-#endif
-
-#include <private/pixelflinger/ggl_context.h>
-#include <hardware/gralloc.h>
-
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-namespace android {
-
-
-const unsigned int OGLES_NUM_COMPRESSED_TEXTURE_FORMATS = 10
-#ifdef GL_OES_compressed_ETC1_RGB8_texture
- + 1
-#endif
- ;
-
-class EGLTextureObject;
-class EGLSurfaceManager;
-class EGLBufferObjectManager;
-
-namespace gl {
-
-struct ogles_context_t;
-struct matrixx_t;
-struct transform_t;
-struct buffer_t;
-
-ogles_context_t* getGlContext();
-
-template<typename T>
-static inline void swap(T& a, T& b) {
- T t(a); a = b; b = t;
-}
-template<typename T>
-inline T max(T a, T b) {
- return a<b ? b : a;
-}
-template<typename T>
-inline T max(T a, T b, T c) {
- return max(a, max(b, c));
-}
-template<typename T>
-inline T min(T a, T b) {
- return a<b ? a : b;
-}
-template<typename T>
-inline T min(T a, T b, T c) {
- return min(a, min(b, c));
-}
-template<typename T>
-inline T min(T a, T b, T c, T d) {
- return min(min(a,b), min(c,d));
-}
-
-// ----------------------------------------------------------------------------
-// vertices
-// ----------------------------------------------------------------------------
-
-struct vec3_t {
- union {
- struct { GLfixed x, y, z; };
- struct { GLfixed r, g, b; };
- struct { GLfixed S, T, R; };
- GLfixed v[3];
- };
-};
-
-struct vec4_t {
- union {
- struct { GLfixed x, y, z, w; };
- struct { GLfixed r, g, b, a; };
- struct { GLfixed S, T, R, Q; };
- GLfixed v[4];
- };
-};
-
-struct vertex_t {
- enum {
- // these constant matter for our clipping
- CLIP_L = 0x0001, // clipping flags
- CLIP_R = 0x0002,
- CLIP_B = 0x0004,
- CLIP_T = 0x0008,
- CLIP_N = 0x0010,
- CLIP_F = 0x0020,
-
- EYE = 0x0040,
- RESERVED = 0x0080,
-
- USER_CLIP_0 = 0x0100, // user clipping flags
- USER_CLIP_1 = 0x0200,
- USER_CLIP_2 = 0x0400,
- USER_CLIP_3 = 0x0800,
- USER_CLIP_4 = 0x1000,
- USER_CLIP_5 = 0x2000,
-
- LIT = 0x4000, // lighting has been applied
- TT = 0x8000, // texture coords transformed
-
- FRUSTUM_CLIP_ALL= 0x003F,
- USER_CLIP_ALL = 0x3F00,
- CLIP_ALL = 0x3F3F,
- };
-
- // the fields below are arranged to minimize d-cache usage
- // we group together, by cache-line, the fields most likely to be used
-
- union {
- vec4_t obj;
- vec4_t eye;
- };
- vec4_t clip;
-
- uint32_t flags;
- size_t index; // cache tag, and vertex index
- GLfixed fog;
- uint8_t locked;
- uint8_t mru;
- uint8_t reserved[2];
- vec4_t window;
-
- vec4_t color;
- vec4_t texture[GGL_TEXTURE_UNIT_COUNT];
- uint32_t reserved1[4];
-
- inline void clear() {
- flags = index = locked = mru = 0;
- }
-};
-
-struct point_size_t {
- GGLcoord size;
- GLboolean smooth;
-};
-
-struct line_width_t {
- GGLcoord width;
- GLboolean smooth;
-};
-
-struct polygon_offset_t {
- GLfixed factor;
- GLfixed units;
- GLboolean enable;
-};
-
-// ----------------------------------------------------------------------------
-// arrays
-// ----------------------------------------------------------------------------
-
-struct array_t {
- typedef void (*fetcher_t)(ogles_context_t*, GLfixed*, const GLvoid*);
- fetcher_t fetch;
- GLvoid const* physical_pointer;
- GLint size;
- GLsizei stride;
- GLvoid const* pointer;
- buffer_t const* bo;
- uint16_t type;
- GLboolean enable;
- GLboolean pad;
- GLsizei bounds;
- void init(GLint, GLenum, GLsizei, const GLvoid *, const buffer_t*, GLsizei);
- inline void resolve();
- inline const GLubyte* element(GLint i) const {
- return (const GLubyte*)physical_pointer + i * stride;
- }
-};
-
-struct array_machine_t {
- array_t vertex;
- array_t normal;
- array_t color;
- array_t texture[GGL_TEXTURE_UNIT_COUNT];
- uint8_t activeTexture;
- uint8_t tmu;
- uint16_t cull;
- uint32_t flags;
- GLenum indicesType;
- buffer_t const* array_buffer;
- buffer_t const* element_array_buffer;
-
- void (*compileElements)(ogles_context_t*, vertex_t*, GLint, GLsizei);
- void (*compileElement)(ogles_context_t*, vertex_t*, GLint);
-
- void (*mvp_transform)(transform_t const*, vec4_t*, vec4_t const*);
- void (*mv_transform)(transform_t const*, vec4_t*, vec4_t const*);
- void (*tex_transform[2])(transform_t const*, vec4_t*, vec4_t const*);
- void (*perspective)(ogles_context_t*c, vertex_t* v);
- void (*clipVertex)(ogles_context_t* c, vertex_t* nv,
- GGLfixed t, const vertex_t* s, const vertex_t* p);
- void (*clipEye)(ogles_context_t* c, vertex_t* nv,
- GGLfixed t, const vertex_t* s, const vertex_t* p);
-};
-
-struct vertex_cache_t {
- enum {
- // must be at least 4
- // 3 vertice for triangles
- // or 2 + 2 for indexed triangles w/ cache contention
- VERTEX_BUFFER_SIZE = 8,
- // must be a power of two and at least 3
- VERTEX_CACHE_SIZE = 64, // 8 KB
-
- INDEX_BITS = 16,
- INDEX_MASK = ((1LU<<INDEX_BITS)-1),
- INDEX_SEQ = 1LU<<INDEX_BITS,
- };
- vertex_t* vBuffer;
- vertex_t* vCache;
- uint32_t sequence;
- void* base;
- uint32_t total;
- uint32_t misses;
- int64_t startTime;
- void init();
- void uninit();
- void clear();
- void dump_stats(GLenum mode);
-};
-
-// ----------------------------------------------------------------------------
-// fog
-// ----------------------------------------------------------------------------
-
-struct fog_t {
- GLfixed density;
- GLfixed start;
- GLfixed end;
- GLfixed invEndMinusStart;
- GLenum mode;
- GLfixed (*fog)(ogles_context_t* c, GLfixed z);
-};
-
-// ----------------------------------------------------------------------------
-// user clip planes
-// ----------------------------------------------------------------------------
-
-const unsigned int OGLES_MAX_CLIP_PLANES = 6;
-
-struct clip_plane_t {
- vec4_t equation;
-};
-
-struct user_clip_planes_t {
- clip_plane_t plane[OGLES_MAX_CLIP_PLANES];
- uint32_t enable;
-};
-
-// ----------------------------------------------------------------------------
-// lighting
-// ----------------------------------------------------------------------------
-
-const unsigned int OGLES_MAX_LIGHTS = 8;
-
-struct light_t {
- vec4_t ambient;
- vec4_t diffuse;
- vec4_t specular;
- vec4_t implicitAmbient;
- vec4_t implicitDiffuse;
- vec4_t implicitSpecular;
- vec4_t position; // position in eye space
- vec4_t objPosition;
- vec4_t normalizedObjPosition;
- vec4_t spotDir;
- vec4_t normalizedSpotDir;
- GLfixed spotExp;
- GLfixed spotCutoff;
- GLfixed spotCutoffCosine;
- GLfixed attenuation[3];
- GLfixed rConstAttenuation;
- GLboolean enable;
-};
-
-struct material_t {
- vec4_t ambient;
- vec4_t diffuse;
- vec4_t specular;
- vec4_t emission;
- GLfixed shininess;
-};
-
-struct light_model_t {
- vec4_t ambient;
- GLboolean twoSide;
-};
-
-struct color_material_t {
- GLenum face;
- GLenum mode;
- GLboolean enable;
-};
-
-struct lighting_t {
- light_t lights[OGLES_MAX_LIGHTS];
- material_t front;
- light_model_t lightModel;
- color_material_t colorMaterial;
- vec4_t implicitSceneEmissionAndAmbient;
- vec4_t objViewer;
- uint32_t enabledLights;
- GLboolean enable;
- GLenum shadeModel;
- typedef void (*light_fct_t)(ogles_context_t*, vertex_t*);
- void (*lightVertex)(ogles_context_t* c, vertex_t* v);
- void (*lightTriangle)(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2);
-};
-
-struct culling_t {
- GLenum cullFace;
- GLenum frontFace;
- GLboolean enable;
-};
-
-// ----------------------------------------------------------------------------
-// textures
-// ----------------------------------------------------------------------------
-
-struct texture_unit_t {
- GLuint name;
- EGLTextureObject* texture;
- uint8_t dirty;
-};
-
-struct texture_state_t
-{
- texture_unit_t tmu[GGL_TEXTURE_UNIT_COUNT];
- int active; // active tmu
- EGLTextureObject* defaultTexture;
- GGLContext* ggl;
- uint8_t packAlignment;
- uint8_t unpackAlignment;
-};
-
-// ----------------------------------------------------------------------------
-// transformation and matrices
-// ----------------------------------------------------------------------------
-
-struct matrixf_t;
-
-struct matrixx_t {
- GLfixed m[16];
- void load(const matrixf_t& rhs);
-};
-
-struct matrix_stack_t;
-
-
-struct matrixf_t {
- void loadIdentity();
- void load(const matrixf_t& rhs);
-
- inline GLfloat* editElements() { return m; }
- inline GLfloat const* elements() const { return m; }
-
- void set(const GLfixed* rhs);
- void set(const GLfloat* rhs);
-
- static void multiply(matrixf_t& r,
- const matrixf_t& lhs, const matrixf_t& rhs);
-
- void dump(const char* what);
-
-private:
- friend struct matrix_stack_t;
- GLfloat m[16];
- void load(const GLfixed* rhs);
- void load(const GLfloat* rhs);
- void multiply(const matrixf_t& rhs);
- void translate(GLfloat x, GLfloat y, GLfloat z);
- void scale(GLfloat x, GLfloat y, GLfloat z);
- void rotate(GLfloat a, GLfloat x, GLfloat y, GLfloat z);
-};
-
-enum {
- OP_IDENTITY = 0x00,
- OP_TRANSLATE = 0x01,
- OP_UNIFORM_SCALE = 0x02,
- OP_SCALE = 0x05,
- OP_ROTATE = 0x08,
- OP_SKEW = 0x10,
- OP_ALL = 0x1F
-};
-
-struct transform_t {
- enum {
- FLAGS_2D_PROJECTION = 0x1
- };
- matrixx_t matrix;
- uint32_t flags;
- uint32_t ops;
-
- union {
- struct {
- void (*point2)(transform_t const* t, vec4_t*, vec4_t const*);
- void (*point3)(transform_t const* t, vec4_t*, vec4_t const*);
- void (*point4)(transform_t const* t, vec4_t*, vec4_t const*);
- };
- void (*pointv[3])(transform_t const* t, vec4_t*, vec4_t const*);
- };
-
- void loadIdentity();
- void picker();
- void dump(const char* what);
-};
-
-struct mvui_transform_t : public transform_t
-{
- void picker();
-};
-
-struct matrix_stack_t {
- enum {
- DO_PICKER = 0x1,
- DO_FLOAT_TO_FIXED = 0x2
- };
- transform_t transform;
- uint8_t maxDepth;
- uint8_t depth;
- uint8_t dirty;
- uint8_t reserved;
- matrixf_t *stack;
- uint8_t *ops;
- void init(int depth);
- void uninit();
- void loadIdentity();
- void load(const GLfixed* rhs);
- void load(const GLfloat* rhs);
- void multiply(const matrixf_t& rhs);
- void translate(GLfloat x, GLfloat y, GLfloat z);
- void scale(GLfloat x, GLfloat y, GLfloat z);
- void rotate(GLfloat a, GLfloat x, GLfloat y, GLfloat z);
- GLint push();
- GLint pop();
- void validate();
- matrixf_t& top() { return stack[depth]; }
- const matrixf_t& top() const { return stack[depth]; }
- uint32_t top_ops() const { return ops[depth]; }
- inline bool isRigidBody() const {
- return !(ops[depth] & ~(OP_TRANSLATE|OP_UNIFORM_SCALE|OP_ROTATE));
- }
-};
-
-struct vp_transform_t {
- transform_t transform;
- matrixf_t matrix;
- GLfloat zNear;
- GLfloat zFar;
- void loadIdentity();
-};
-
-struct transform_state_t {
- enum {
- MODELVIEW = 0x01,
- PROJECTION = 0x02,
- VIEWPORT = 0x04,
- TEXTURE = 0x08,
- MVUI = 0x10,
- MVIT = 0x20,
- MVP = 0x40,
- };
- matrix_stack_t *current;
- matrix_stack_t modelview;
- matrix_stack_t projection;
- matrix_stack_t texture[GGL_TEXTURE_UNIT_COUNT];
-
- // modelview * projection
- transform_t mvp __attribute__((aligned(32)));
- // viewport transformation
- vp_transform_t vpt __attribute__((aligned(32)));
- // same for 4-D vertices
- transform_t mvp4;
- // full modelview inverse transpose
- transform_t mvit4;
- // upper 3x3 of mv-inverse-transpose (for normals)
- mvui_transform_t mvui;
-
- GLenum matrixMode;
- GLenum rescaleNormals;
- uint32_t dirty;
- void invalidate();
- void update_mvp();
- void update_mvit();
- void update_mvui();
-};
-
-struct viewport_t {
- GLint x;
- GLint y;
- GLsizei w;
- GLsizei h;
- struct {
- GLint x;
- GLint y;
- } surfaceport;
- struct {
- GLint x;
- GLint y;
- GLsizei w;
- GLsizei h;
- } scissor;
-};
-
-// ----------------------------------------------------------------------------
-// Lerping
-// ----------------------------------------------------------------------------
-
-struct compute_iterators_t
-{
- void initTriangle(
- vertex_t const* v0,
- vertex_t const* v1,
- vertex_t const* v2);
-
- void initLine(
- vertex_t const* v0,
- vertex_t const* v1);
-
- inline void initLerp(vertex_t const* v0, uint32_t enables);
-
- int iteratorsScale(int32_t it[3],
- int32_t c0, int32_t c1, int32_t c2) const;
-
- void iterators1616(GGLfixed it[3],
- GGLfixed c0, GGLfixed c1, GGLfixed c2) const;
-
- void iterators0032(int32_t it[3],
- int32_t c0, int32_t c1, int32_t c2) const;
-
- void iterators0032(int64_t it[3],
- int32_t c0, int32_t c1, int32_t c2) const;
-
- GGLcoord area() const { return m_area; }
-
-private:
- // don't change order of members here -- used by iterators.S
- GGLcoord m_dx01, m_dy10, m_dx20, m_dy02;
- GGLcoord m_x0, m_y0;
- GGLcoord m_area;
- uint8_t m_scale;
- uint8_t m_area_scale;
- uint8_t m_reserved[2];
-
-};
-
-// ----------------------------------------------------------------------------
-// state
-// ----------------------------------------------------------------------------
-
-#ifdef HAVE_ANDROID_OS
- // We have a dedicated TLS slot in bionic
- inline void setGlThreadSpecific(ogles_context_t *value) {
- ((uint32_t *)__get_tls())[TLS_SLOT_OPENGL] = (uint32_t)value;
- }
- inline ogles_context_t* getGlThreadSpecific() {
- return (ogles_context_t *)(((unsigned *)__get_tls())[TLS_SLOT_OPENGL]);
- }
-#else
- extern pthread_key_t gGLKey;
- inline void setGlThreadSpecific(ogles_context_t *value) {
- pthread_setspecific(gGLKey, value);
- }
- inline ogles_context_t* getGlThreadSpecific() {
- return static_cast<ogles_context_t*>(pthread_getspecific(gGLKey));
- }
-#endif
-
-
-struct prims_t {
- typedef ogles_context_t* GL;
- void (*renderPoint)(GL, vertex_t*);
- void (*renderLine)(GL, vertex_t*, vertex_t*);
- void (*renderTriangle)(GL, vertex_t*, vertex_t*, vertex_t*);
-};
-
-struct ogles_context_t {
- context_t rasterizer;
- array_machine_t arrays __attribute__((aligned(32)));
- texture_state_t textures;
- transform_state_t transforms;
- vertex_cache_t vc;
- prims_t prims;
- culling_t cull;
- lighting_t lighting;
- user_clip_planes_t clipPlanes;
- compute_iterators_t lerp; __attribute__((aligned(32)));
- vertex_t current;
- vec4_t currentColorClamped;
- vec3_t currentNormal;
- viewport_t viewport;
- point_size_t point;
- line_width_t line;
- polygon_offset_t polygonOffset;
- fog_t fog;
- uint32_t perspective : 1;
- uint32_t transformTextures : 1;
- EGLSurfaceManager* surfaceManager;
- EGLBufferObjectManager* bufferObjectManager;
-
- GLenum error;
-
- static inline ogles_context_t* get() {
- return getGlThreadSpecific();
- }
-
-};
-
-}; // namespace gl
-}; // namespace android
-
-#endif // ANDROID_OPENGLES_CONTEXT_H
-
diff --git a/include/utils/AndroidThreads.h b/include/utils/AndroidThreads.h
new file mode 100644
index 0000000..f9f7aa4
--- /dev/null
+++ b/include/utils/AndroidThreads.h
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LIBS_UTILS_ANDROID_THREADS_H
+#define _LIBS_UTILS_ANDROID_THREADS_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#if defined(HAVE_PTHREADS)
+# include <pthread.h>
+#endif
+
+#include <utils/ThreadDefs.h>
+
+// ---------------------------------------------------------------------------
+// C API
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Create and run a new thread.
+extern int androidCreateThread(android_thread_func_t, void *);
+
+// Create thread with lots of parameters
+extern int androidCreateThreadEtc(android_thread_func_t entryFunction,
+ void *userData,
+ const char* threadName,
+ int32_t threadPriority,
+ size_t threadStackSize,
+ android_thread_id_t *threadId);
+
+// Get some sort of unique identifier for the current thread.
+extern android_thread_id_t androidGetThreadId();
+
+// Low-level thread creation -- never creates threads that can
+// interact with the Java VM.
+extern int androidCreateRawThreadEtc(android_thread_func_t entryFunction,
+ void *userData,
+ const char* threadName,
+ int32_t threadPriority,
+ size_t threadStackSize,
+ android_thread_id_t *threadId);
+
+// Used by the Java Runtime to control how threads are created, so that
+// they can be proper and lovely Java threads.
+typedef int (*android_create_thread_fn)(android_thread_func_t entryFunction,
+ void *userData,
+ const char* threadName,
+ int32_t threadPriority,
+ size_t threadStackSize,
+ android_thread_id_t *threadId);
+
+extern void androidSetCreateThreadFunc(android_create_thread_fn func);
+
+// ------------------------------------------------------------------
+// Extra functions working with raw pids.
+
+// Get pid for the current thread.
+extern pid_t androidGetTid();
+
+// Change the scheduling group of a particular thread. The group
+// should be one of the ANDROID_TGROUP constants. Returns BAD_VALUE if
+// grp is out of range, else another non-zero value with errno set if
+// the operation failed. Thread ID zero means current thread.
+extern int androidSetThreadSchedulingGroup(pid_t tid, int grp);
+
+// Change the priority AND scheduling group of a particular thread. The priority
+// should be one of the ANDROID_PRIORITY constants. Returns INVALID_OPERATION
+// if the priority set failed, else another value if just the group set failed;
+// in either case errno is set. Thread ID zero means current thread.
+extern int androidSetThreadPriority(pid_t tid, int prio);
+
+// Get the current priority of a particular thread. Returns one of the
+// ANDROID_PRIORITY constants or a negative result in case of error.
+extern int androidGetThreadPriority(pid_t tid);
+
+// Get the current scheduling group of a particular thread. Normally returns
+// one of the ANDROID_TGROUP constants other than ANDROID_TGROUP_DEFAULT.
+// Returns ANDROID_TGROUP_DEFAULT if no pthread support (e.g. on host) or if
+// scheduling groups are disabled. Returns INVALID_OPERATION if unexpected error.
+// Thread ID zero means current thread.
+extern int androidGetThreadSchedulingGroup(pid_t tid);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+// ----------------------------------------------------------------------------
+// C++ API
+#ifdef __cplusplus
+namespace android {
+// ----------------------------------------------------------------------------
+
+// Create and run a new thread.
+inline bool createThread(thread_func_t f, void *a) {
+ return androidCreateThread(f, a) ? true : false;
+}
+
+// Create thread with lots of parameters
+inline bool createThreadEtc(thread_func_t entryFunction,
+ void *userData,
+ const char* threadName = "android:unnamed_thread",
+ int32_t threadPriority = PRIORITY_DEFAULT,
+ size_t threadStackSize = 0,
+ thread_id_t *threadId = 0)
+{
+ return androidCreateThreadEtc(entryFunction, userData, threadName,
+ threadPriority, threadStackSize, threadId) ? true : false;
+}
+
+// Get some sort of unique identifier for the current thread.
+inline thread_id_t getThreadId() {
+ return androidGetThreadId();
+}
+
+// ----------------------------------------------------------------------------
+}; // namespace android
+#endif // __cplusplus
+// ----------------------------------------------------------------------------
+
+#endif // _LIBS_UTILS_ANDROID_THREADS_H
diff --git a/include/utils/Condition.h b/include/utils/Condition.h
new file mode 100644
index 0000000..8852d53
--- /dev/null
+++ b/include/utils/Condition.h
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LIBS_UTILS_CONDITION_H
+#define _LIBS_UTILS_CONDITION_H
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <time.h>
+
+#if defined(HAVE_PTHREADS)
+# include <pthread.h>
+#endif
+
+#include <utils/Errors.h>
+#include <utils/Mutex.h>
+#include <utils/Timers.h>
+
+// ---------------------------------------------------------------------------
+namespace android {
+// ---------------------------------------------------------------------------
+
+/*
+ * Condition variable class. The implementation is system-dependent.
+ *
+ * Condition variables are paired up with mutexes. Lock the mutex,
+ * call wait(), then either re-wait() if things aren't quite what you want,
+ * or unlock the mutex and continue. All threads calling wait() must
+ * use the same mutex for a given Condition.
+ */
+class Condition {
+public:
+ enum {
+ PRIVATE = 0,
+ SHARED = 1
+ };
+
+ Condition();
+ Condition(int type);
+ ~Condition();
+ // Wait on the condition variable. Lock the mutex before calling.
+ status_t wait(Mutex& mutex);
+ // same with relative timeout
+ status_t waitRelative(Mutex& mutex, nsecs_t reltime);
+ // Signal the condition variable, allowing one thread to continue.
+ void signal();
+ // Signal the condition variable, allowing all threads to continue.
+ void broadcast();
+
+private:
+#if defined(HAVE_PTHREADS)
+ pthread_cond_t mCond;
+#else
+ void* mState;
+#endif
+};
+
+// ---------------------------------------------------------------------------
+
+#if defined(HAVE_PTHREADS)
+
+inline Condition::Condition() {
+ pthread_cond_init(&mCond, NULL);
+}
+inline Condition::Condition(int type) {
+ if (type == SHARED) {
+ pthread_condattr_t attr;
+ pthread_condattr_init(&attr);
+ pthread_condattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
+ pthread_cond_init(&mCond, &attr);
+ pthread_condattr_destroy(&attr);
+ } else {
+ pthread_cond_init(&mCond, NULL);
+ }
+}
+inline Condition::~Condition() {
+ pthread_cond_destroy(&mCond);
+}
+inline status_t Condition::wait(Mutex& mutex) {
+ return -pthread_cond_wait(&mCond, &mutex.mMutex);
+}
+inline status_t Condition::waitRelative(Mutex& mutex, nsecs_t reltime) {
+#if defined(HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE)
+ struct timespec ts;
+ ts.tv_sec = reltime/1000000000;
+ ts.tv_nsec = reltime%1000000000;
+ return -pthread_cond_timedwait_relative_np(&mCond, &mutex.mMutex, &ts);
+#else // HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE
+ struct timespec ts;
+#if defined(HAVE_POSIX_CLOCKS)
+ clock_gettime(CLOCK_REALTIME, &ts);
+#else // HAVE_POSIX_CLOCKS
+ // we don't support the clocks here.
+ struct timeval t;
+ gettimeofday(&t, NULL);
+ ts.tv_sec = t.tv_sec;
+ ts.tv_nsec= t.tv_usec*1000;
+#endif // HAVE_POSIX_CLOCKS
+ ts.tv_sec += reltime/1000000000;
+ ts.tv_nsec+= reltime%1000000000;
+ if (ts.tv_nsec >= 1000000000) {
+ ts.tv_nsec -= 1000000000;
+ ts.tv_sec += 1;
+ }
+ return -pthread_cond_timedwait(&mCond, &mutex.mMutex, &ts);
+#endif // HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE
+}
+inline void Condition::signal() {
+ pthread_cond_signal(&mCond);
+}
+inline void Condition::broadcast() {
+ pthread_cond_broadcast(&mCond);
+}
+
+#endif // HAVE_PTHREADS
+
+// ---------------------------------------------------------------------------
+}; // namespace android
+// ---------------------------------------------------------------------------
+
+#endif // _LIBS_UTILS_CONDITON_H
diff --git a/include/utils/Mutex.h b/include/utils/Mutex.h
new file mode 100644
index 0000000..de6fb39
--- /dev/null
+++ b/include/utils/Mutex.h
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LIBS_UTILS_MUTEX_H
+#define _LIBS_UTILS_MUTEX_H
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <time.h>
+
+#if defined(HAVE_PTHREADS)
+# include <pthread.h>
+#endif
+
+#include <utils/Errors.h>
+
+// ---------------------------------------------------------------------------
+namespace android {
+// ---------------------------------------------------------------------------
+
+class Condition;
+
+/*
+ * Simple mutex class. The implementation is system-dependent.
+ *
+ * The mutex must be unlocked by the thread that locked it. They are not
+ * recursive, i.e. the same thread can't lock it multiple times.
+ */
+class Mutex {
+public:
+ enum {
+ PRIVATE = 0,
+ SHARED = 1
+ };
+
+ Mutex();
+ Mutex(const char* name);
+ Mutex(int type, const char* name = NULL);
+ ~Mutex();
+
+ // lock or unlock the mutex
+ status_t lock();
+ void unlock();
+
+ // lock if possible; returns 0 on success, error otherwise
+ status_t tryLock();
+
+ // Manages the mutex automatically. It'll be locked when Autolock is
+ // constructed and released when Autolock goes out of scope.
+ class Autolock {
+ public:
+ inline Autolock(Mutex& mutex) : mLock(mutex) { mLock.lock(); }
+ inline Autolock(Mutex* mutex) : mLock(*mutex) { mLock.lock(); }
+ inline ~Autolock() { mLock.unlock(); }
+ private:
+ Mutex& mLock;
+ };
+
+private:
+ friend class Condition;
+
+ // A mutex cannot be copied
+ Mutex(const Mutex&);
+ Mutex& operator = (const Mutex&);
+
+#if defined(HAVE_PTHREADS)
+ pthread_mutex_t mMutex;
+#else
+ void _init();
+ void* mState;
+#endif
+};
+
+// ---------------------------------------------------------------------------
+
+#if defined(HAVE_PTHREADS)
+
+inline Mutex::Mutex() {
+ pthread_mutex_init(&mMutex, NULL);
+}
+inline Mutex::Mutex(const char* name) {
+ pthread_mutex_init(&mMutex, NULL);
+}
+inline Mutex::Mutex(int type, const char* name) {
+ if (type == SHARED) {
+ pthread_mutexattr_t attr;
+ pthread_mutexattr_init(&attr);
+ pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
+ pthread_mutex_init(&mMutex, &attr);
+ pthread_mutexattr_destroy(&attr);
+ } else {
+ pthread_mutex_init(&mMutex, NULL);
+ }
+}
+inline Mutex::~Mutex() {
+ pthread_mutex_destroy(&mMutex);
+}
+inline status_t Mutex::lock() {
+ return -pthread_mutex_lock(&mMutex);
+}
+inline void Mutex::unlock() {
+ pthread_mutex_unlock(&mMutex);
+}
+inline status_t Mutex::tryLock() {
+ return -pthread_mutex_trylock(&mMutex);
+}
+
+#endif // HAVE_PTHREADS
+
+// ---------------------------------------------------------------------------
+
+/*
+ * Automatic mutex. Declare one of these at the top of a function.
+ * When the function returns, it will go out of scope, and release the
+ * mutex.
+ */
+
+typedef Mutex::Autolock AutoMutex;
+
+// ---------------------------------------------------------------------------
+}; // namespace android
+// ---------------------------------------------------------------------------
+
+#endif // _LIBS_UTILS_MUTEX_H
diff --git a/include/utils/RWLock.h b/include/utils/RWLock.h
new file mode 100644
index 0000000..a5abea2
--- /dev/null
+++ b/include/utils/RWLock.h
@@ -0,0 +1,126 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LIBS_UTILS_RWLOCK_H
+#define _LIBS_UTILS_RWLOCK_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#if defined(HAVE_PTHREADS)
+# include <pthread.h>
+#endif
+
+#include <utils/Errors.h>
+#include <utils/ThreadDefs.h>
+
+// ---------------------------------------------------------------------------
+namespace android {
+// ---------------------------------------------------------------------------
+
+#if defined(HAVE_PTHREADS)
+
+/*
+ * Simple mutex class. The implementation is system-dependent.
+ *
+ * The mutex must be unlocked by the thread that locked it. They are not
+ * recursive, i.e. the same thread can't lock it multiple times.
+ */
+class RWLock {
+public:
+ enum {
+ PRIVATE = 0,
+ SHARED = 1
+ };
+
+ RWLock();
+ RWLock(const char* name);
+ RWLock(int type, const char* name = NULL);
+ ~RWLock();
+
+ status_t readLock();
+ status_t tryReadLock();
+ status_t writeLock();
+ status_t tryWriteLock();
+ void unlock();
+
+ class AutoRLock {
+ public:
+ inline AutoRLock(RWLock& rwlock) : mLock(rwlock) { mLock.readLock(); }
+ inline ~AutoRLock() { mLock.unlock(); }
+ private:
+ RWLock& mLock;
+ };
+
+ class AutoWLock {
+ public:
+ inline AutoWLock(RWLock& rwlock) : mLock(rwlock) { mLock.writeLock(); }
+ inline ~AutoWLock() { mLock.unlock(); }
+ private:
+ RWLock& mLock;
+ };
+
+private:
+ // A RWLock cannot be copied
+ RWLock(const RWLock&);
+ RWLock& operator = (const RWLock&);
+
+ pthread_rwlock_t mRWLock;
+};
+
+inline RWLock::RWLock() {
+ pthread_rwlock_init(&mRWLock, NULL);
+}
+inline RWLock::RWLock(const char* name) {
+ pthread_rwlock_init(&mRWLock, NULL);
+}
+inline RWLock::RWLock(int type, const char* name) {
+ if (type == SHARED) {
+ pthread_rwlockattr_t attr;
+ pthread_rwlockattr_init(&attr);
+ pthread_rwlockattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
+ pthread_rwlock_init(&mRWLock, &attr);
+ pthread_rwlockattr_destroy(&attr);
+ } else {
+ pthread_rwlock_init(&mRWLock, NULL);
+ }
+}
+inline RWLock::~RWLock() {
+ pthread_rwlock_destroy(&mRWLock);
+}
+inline status_t RWLock::readLock() {
+ return -pthread_rwlock_rdlock(&mRWLock);
+}
+inline status_t RWLock::tryReadLock() {
+ return -pthread_rwlock_tryrdlock(&mRWLock);
+}
+inline status_t RWLock::writeLock() {
+ return -pthread_rwlock_wrlock(&mRWLock);
+}
+inline status_t RWLock::tryWriteLock() {
+ return -pthread_rwlock_trywrlock(&mRWLock);
+}
+inline void RWLock::unlock() {
+ pthread_rwlock_unlock(&mRWLock);
+}
+
+#endif // HAVE_PTHREADS
+
+// ---------------------------------------------------------------------------
+}; // namespace android
+// ---------------------------------------------------------------------------
+
+#endif // _LIBS_UTILS_RWLOCK_H
diff --git a/include/utils/Thread.h b/include/utils/Thread.h
new file mode 100644
index 0000000..4a34abd
--- /dev/null
+++ b/include/utils/Thread.h
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LIBS_UTILS_THREAD_H
+#define _LIBS_UTILS_THREAD_H
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <time.h>
+
+#if defined(HAVE_PTHREADS)
+# include <pthread.h>
+#endif
+
+#include <utils/Condition.h>
+#include <utils/Errors.h>
+#include <utils/Mutex.h>
+#include <utils/RefBase.h>
+#include <utils/Timers.h>
+#include <utils/ThreadDefs.h>
+
+// ---------------------------------------------------------------------------
+namespace android {
+// ---------------------------------------------------------------------------
+
+class Thread : virtual public RefBase
+{
+public:
+ // Create a Thread object, but doesn't create or start the associated
+ // thread. See the run() method.
+ Thread(bool canCallJava = true);
+ virtual ~Thread();
+
+ // Start the thread in threadLoop() which needs to be implemented.
+ virtual status_t run( const char* name = 0,
+ int32_t priority = PRIORITY_DEFAULT,
+ size_t stack = 0);
+
+ // Ask this object's thread to exit. This function is asynchronous, when the
+ // function returns the thread might still be running. Of course, this
+ // function can be called from a different thread.
+ virtual void requestExit();
+
+ // Good place to do one-time initializations
+ virtual status_t readyToRun();
+
+ // Call requestExit() and wait until this object's thread exits.
+ // BE VERY CAREFUL of deadlocks. In particular, it would be silly to call
+ // this function from this object's thread. Will return WOULD_BLOCK in
+ // that case.
+ status_t requestExitAndWait();
+
+ // Wait until this object's thread exits. Returns immediately if not yet running.
+ // Do not call from this object's thread; will return WOULD_BLOCK in that case.
+ status_t join();
+
+#ifdef HAVE_ANDROID_OS
+ // Return the thread's kernel ID, same as the thread itself calling gettid() or
+ // androidGetTid(), or -1 if the thread is not running.
+ pid_t getTid() const;
+#endif
+
+protected:
+ // exitPending() returns true if requestExit() has been called.
+ bool exitPending() const;
+
+private:
+ // Derived class must implement threadLoop(). The thread starts its life
+ // here. There are two ways of using the Thread object:
+ // 1) loop: if threadLoop() returns true, it will be called again if
+ // requestExit() wasn't called.
+ // 2) once: if threadLoop() returns false, the thread will exit upon return.
+ virtual bool threadLoop() = 0;
+
+private:
+ Thread& operator=(const Thread&);
+ static int _threadLoop(void* user);
+ const bool mCanCallJava;
+ // always hold mLock when reading or writing
+ thread_id_t mThread;
+ mutable Mutex mLock;
+ Condition mThreadExitedCondition;
+ status_t mStatus;
+ // note that all accesses of mExitPending and mRunning need to hold mLock
+ volatile bool mExitPending;
+ volatile bool mRunning;
+ sp<Thread> mHoldSelf;
+#ifdef HAVE_ANDROID_OS
+ // legacy for debugging, not used by getTid() as it is set by the child thread
+ // and so is not initialized until the child reaches that point
+ pid_t mTid;
+#endif
+};
+
+
+}; // namespace android
+
+// ---------------------------------------------------------------------------
+#endif // _LIBS_UTILS_THREAD_H
+// ---------------------------------------------------------------------------
diff --git a/include/utils/ThreadDefs.h b/include/utils/ThreadDefs.h
new file mode 100644
index 0000000..3e56373
--- /dev/null
+++ b/include/utils/ThreadDefs.h
@@ -0,0 +1,123 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LIBS_UTILS_THREAD_DEFS_H
+#define _LIBS_UTILS_THREAD_DEFS_H
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <system/graphics.h>
+
+// ---------------------------------------------------------------------------
+// C API
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void* android_thread_id_t;
+
+typedef int (*android_thread_func_t)(void*);
+
+enum {
+ /*
+ * ***********************************************
+ * ** Keep in sync with android.os.Process.java **
+ * ***********************************************
+ *
+ * This maps directly to the "nice" priorities we use in Android.
+ * A thread priority should be chosen inverse-proportionally to
+ * the amount of work the thread is expected to do. The more work
+ * a thread will do, the less favorable priority it should get so that
+ * it doesn't starve the system. Threads not behaving properly might
+ * be "punished" by the kernel.
+ * Use the levels below when appropriate. Intermediate values are
+ * acceptable, preferably use the {MORE|LESS}_FAVORABLE constants below.
+ */
+ ANDROID_PRIORITY_LOWEST = 19,
+
+ /* use for background tasks */
+ ANDROID_PRIORITY_BACKGROUND = 10,
+
+ /* most threads run at normal priority */
+ ANDROID_PRIORITY_NORMAL = 0,
+
+ /* threads currently running a UI that the user is interacting with */
+ ANDROID_PRIORITY_FOREGROUND = -2,
+
+ /* the main UI thread has a slightly more favorable priority */
+ ANDROID_PRIORITY_DISPLAY = -4,
+
+ /* ui service treads might want to run at a urgent display (uncommon) */
+ ANDROID_PRIORITY_URGENT_DISPLAY = HAL_PRIORITY_URGENT_DISPLAY,
+
+ /* all normal audio threads */
+ ANDROID_PRIORITY_AUDIO = -16,
+
+ /* service audio threads (uncommon) */
+ ANDROID_PRIORITY_URGENT_AUDIO = -19,
+
+ /* should never be used in practice. regular process might not
+ * be allowed to use this level */
+ ANDROID_PRIORITY_HIGHEST = -20,
+
+ ANDROID_PRIORITY_DEFAULT = ANDROID_PRIORITY_NORMAL,
+ ANDROID_PRIORITY_MORE_FAVORABLE = -1,
+ ANDROID_PRIORITY_LESS_FAVORABLE = +1,
+};
+
+enum {
+ ANDROID_TGROUP_DEFAULT = 0,
+ ANDROID_TGROUP_BG_NONINTERACT = 1,
+ ANDROID_TGROUP_FG_BOOST = 2,
+ ANDROID_TGROUP_MAX = ANDROID_TGROUP_FG_BOOST,
+};
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+// ---------------------------------------------------------------------------
+// C++ API
+#ifdef __cplusplus
+namespace android {
+// ---------------------------------------------------------------------------
+
+typedef android_thread_id_t thread_id_t;
+typedef android_thread_func_t thread_func_t;
+
+enum {
+ PRIORITY_LOWEST = ANDROID_PRIORITY_LOWEST,
+ PRIORITY_BACKGROUND = ANDROID_PRIORITY_BACKGROUND,
+ PRIORITY_NORMAL = ANDROID_PRIORITY_NORMAL,
+ PRIORITY_FOREGROUND = ANDROID_PRIORITY_FOREGROUND,
+ PRIORITY_DISPLAY = ANDROID_PRIORITY_DISPLAY,
+ PRIORITY_URGENT_DISPLAY = ANDROID_PRIORITY_URGENT_DISPLAY,
+ PRIORITY_AUDIO = ANDROID_PRIORITY_AUDIO,
+ PRIORITY_URGENT_AUDIO = ANDROID_PRIORITY_URGENT_AUDIO,
+ PRIORITY_HIGHEST = ANDROID_PRIORITY_HIGHEST,
+ PRIORITY_DEFAULT = ANDROID_PRIORITY_DEFAULT,
+ PRIORITY_MORE_FAVORABLE = ANDROID_PRIORITY_MORE_FAVORABLE,
+ PRIORITY_LESS_FAVORABLE = ANDROID_PRIORITY_LESS_FAVORABLE,
+};
+
+// ---------------------------------------------------------------------------
+}; // namespace android
+#endif // __cplusplus
+// ---------------------------------------------------------------------------
+
+
+#endif // _LIBS_UTILS_THREAD_DEFS_H
diff --git a/include/utils/Trace.h b/include/utils/Trace.h
new file mode 100644
index 0000000..f33ddf6
--- /dev/null
+++ b/include/utils/Trace.h
@@ -0,0 +1,166 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_TRACE_H
+#define ANDROID_TRACE_H
+
+#include <fcntl.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <cutils/compiler.h>
+#include <utils/threads.h>
+
+// The ATRACE_TAG macro can be defined before including this header to trace
+// using one of the tags defined below. It must be defined to one of the
+// following ATRACE_TAG_* macros. The trace tag is used to filter tracing in
+// userland to avoid some of the runtime cost of tracing when it is not desired.
+//
+// Defining ATRACE_TAG to be ATRACE_TAG_ALWAYS will result in the tracing always
+// being enabled - this should ONLY be done for debug code, as userland tracing
+// has a performance cost even when the trace is not being recorded. Defining
+// ATRACE_TAG to be ATRACE_TAG_NEVER or leaving ATRACE_TAG undefined will result
+// in the tracing always being disabled.
+#define ATRACE_TAG_NEVER 0 // The "never" tag is never enabled.
+#define ATRACE_TAG_ALWAYS (1<<0) // The "always" tag is always enabled.
+#define ATRACE_TAG_GRAPHICS (1<<1)
+#define ATRACE_TAG_LAST (1<<1)
+
+#define ATRACE_TAG_INVALID (~((ATRACE_TAG_LAST - 1) | ATRACE_TAG_LAST))
+
+#ifndef ATRACE_TAG
+#define ATRACE_TAG ATRACE_TAG_NEVER
+#elif ATRACE_TAG > ATRACE_TAG_LAST
+#error ATRACE_TAG must be defined to be one of the tags defined in utils/Trace.h
+#endif
+
+// ATRACE_CALL traces the beginning and end of the current function. To trace
+// the correct start and end times this macro should be the first line of the
+// function body.
+#define ATRACE_CALL() android::ScopedTrace ___tracer(ATRACE_TAG, __FUNCTION__)
+
+// ATRACE_INT traces a named integer value. This can be used to track how the
+// value changes over time in a trace.
+#define ATRACE_INT(name, value) android::Tracer::traceCounter(ATRACE_TAG, name, value)
+
+namespace android {
+
+class Tracer {
+
+public:
+
+ static inline void traceCounter(uint64_t tag, const char* name,
+ int32_t value) {
+ if (!android_atomic_acquire_load(&sIsReady)) {
+ init();
+ }
+ int traceFD = sTraceFD;
+ if (CC_UNLIKELY(tagEnabled(tag) && traceFD != -1)) {
+ char buf[1024];
+ snprintf(buf, 1024, "C|%d|%s|%d", getpid(), name, value);
+ write(traceFD, buf, strlen(buf));
+ }
+ }
+
+ static inline void traceBegin(uint64_t tag, const char* name) {
+ if (CC_UNLIKELY(!android_atomic_acquire_load(&sIsReady))) {
+ init();
+ }
+ int traceFD = sTraceFD;
+ if (CC_UNLIKELY(tagEnabled(tag) && (traceFD != -1))) {
+ char buf[1024];
+ size_t len = snprintf(buf, 1024, "B|%d|%s", getpid(), name);
+ write(traceFD, buf, len);
+ }
+ }
+
+ static inline void traceEnd(uint64_t tag) {
+ if (CC_UNLIKELY(!android_atomic_acquire_load(&sIsReady))) {
+ init();
+ }
+ int traceFD = sTraceFD;
+ if (CC_UNLIKELY(tagEnabled(tag) && (traceFD != -1))) {
+ char buf = 'E';
+ write(traceFD, &buf, 1);
+ }
+ }
+
+private:
+
+ static inline bool tagEnabled(uint64_t tag) {
+ return !(tag & ATRACE_TAG_INVALID) && (tag & sEnabledTags);
+ }
+
+ // init opens the trace marker file for writing and reads the
+ // atrace.tags.enableflags system property. It does this only the first
+ // time it is run, using sMutex for synchronization.
+ static void init();
+
+ // sIsReady is a boolean value indicating whether a call to init() has
+ // completed in this process. It is initialized to 0 and set to 1 when the
+ // first init() call completes. It is set to 1 even if a failure occurred
+ // in init (e.g. the trace marker file couldn't be opened).
+ //
+ // This should be checked by all tracing functions using an atomic acquire
+ // load operation before calling init(). This check avoids the need to lock
+ // a mutex each time a trace function gets called.
+ static volatile int32_t sIsReady;
+
+ // sTraceFD is the file descriptor used to write to the kernel's trace
+ // buffer. It is initialized to -1 and set to an open file descriptor in
+ // init() while a lock on sMutex is held.
+ //
+ // This should only be used by a trace function after init() has
+ // successfully completed.
+ static int sTraceFD;
+
+ // sEnabledTags is the set of tag bits for which tracing is currently
+ // enabled. It is initialized to 0 and set based on the
+ // atrace.tags.enableflags system property in init() while a lock on sMutex
+ // is held.
+ //
+ // This should only be used by a trace function after init() has
+ // successfully completed.
+ static uint64_t sEnabledTags;
+
+ // sMutex is used to protect the execution of init().
+ static Mutex sMutex;
+};
+
+class ScopedTrace {
+
+public:
+ inline ScopedTrace(uint64_t tag, const char* name) :
+ mTag(tag) {
+ Tracer::traceBegin(mTag, name);
+ }
+
+ inline ~ScopedTrace() {
+ Tracer::traceEnd(mTag);
+ }
+
+private:
+
+ uint64_t mTag;
+};
+
+}; // namespace android
+
+#endif // ANDROID_TRACE_H
diff --git a/include/utils/threads.h b/include/utils/threads.h
index b4a8b7c..9de3382 100644
--- a/include/utils/threads.h
+++ b/include/utils/threads.h
@@ -17,556 +17,22 @@
#ifndef _LIBS_UTILS_THREADS_H
#define _LIBS_UTILS_THREADS_H
-#include <stdint.h>
-#include <sys/types.h>
-#include <time.h>
-#include <system/graphics.h>
-
-#if defined(HAVE_PTHREADS)
-# include <pthread.h>
-#endif
-
-// ------------------------------------------------------------------
-// C API
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void* android_thread_id_t;
-
-typedef int (*android_thread_func_t)(void*);
-
-enum {
- /*
- * ***********************************************
- * ** Keep in sync with android.os.Process.java **
- * ***********************************************
- *
- * This maps directly to the "nice" priorities we use in Android.
- * A thread priority should be chosen inverse-proportionally to
- * the amount of work the thread is expected to do. The more work
- * a thread will do, the less favorable priority it should get so that
- * it doesn't starve the system. Threads not behaving properly might
- * be "punished" by the kernel.
- * Use the levels below when appropriate. Intermediate values are
- * acceptable, preferably use the {MORE|LESS}_FAVORABLE constants below.
- */
- ANDROID_PRIORITY_LOWEST = 19,
-
- /* use for background tasks */
- ANDROID_PRIORITY_BACKGROUND = 10,
-
- /* most threads run at normal priority */
- ANDROID_PRIORITY_NORMAL = 0,
-
- /* threads currently running a UI that the user is interacting with */
- ANDROID_PRIORITY_FOREGROUND = -2,
-
- /* the main UI thread has a slightly more favorable priority */
- ANDROID_PRIORITY_DISPLAY = -4,
-
- /* ui service treads might want to run at a urgent display (uncommon) */
- ANDROID_PRIORITY_URGENT_DISPLAY = HAL_PRIORITY_URGENT_DISPLAY,
-
- /* all normal audio threads */
- ANDROID_PRIORITY_AUDIO = -16,
-
- /* service audio threads (uncommon) */
- ANDROID_PRIORITY_URGENT_AUDIO = -19,
-
- /* should never be used in practice. regular process might not
- * be allowed to use this level */
- ANDROID_PRIORITY_HIGHEST = -20,
-
- ANDROID_PRIORITY_DEFAULT = ANDROID_PRIORITY_NORMAL,
- ANDROID_PRIORITY_MORE_FAVORABLE = -1,
- ANDROID_PRIORITY_LESS_FAVORABLE = +1,
-};
-
-enum {
- ANDROID_TGROUP_DEFAULT = 0,
- ANDROID_TGROUP_BG_NONINTERACT = 1,
- ANDROID_TGROUP_FG_BOOST = 2,
- ANDROID_TGROUP_MAX = ANDROID_TGROUP_FG_BOOST,
-};
-
-// Create and run a new thread.
-extern int androidCreateThread(android_thread_func_t, void *);
-
-// Create thread with lots of parameters
-extern int androidCreateThreadEtc(android_thread_func_t entryFunction,
- void *userData,
- const char* threadName,
- int32_t threadPriority,
- size_t threadStackSize,
- android_thread_id_t *threadId);
-
-// Get some sort of unique identifier for the current thread.
-extern android_thread_id_t androidGetThreadId();
-
-// Low-level thread creation -- never creates threads that can
-// interact with the Java VM.
-extern int androidCreateRawThreadEtc(android_thread_func_t entryFunction,
- void *userData,
- const char* threadName,
- int32_t threadPriority,
- size_t threadStackSize,
- android_thread_id_t *threadId);
-
-// Used by the Java Runtime to control how threads are created, so that
-// they can be proper and lovely Java threads.
-typedef int (*android_create_thread_fn)(android_thread_func_t entryFunction,
- void *userData,
- const char* threadName,
- int32_t threadPriority,
- size_t threadStackSize,
- android_thread_id_t *threadId);
-
-extern void androidSetCreateThreadFunc(android_create_thread_fn func);
-
-// ------------------------------------------------------------------
-// Extra functions working with raw pids.
-
-// Get pid for the current thread.
-extern pid_t androidGetTid();
-
-// Change the scheduling group of a particular thread. The group
-// should be one of the ANDROID_TGROUP constants. Returns BAD_VALUE if
-// grp is out of range, else another non-zero value with errno set if
-// the operation failed. Thread ID zero means current thread.
-extern int androidSetThreadSchedulingGroup(pid_t tid, int grp);
-
-// Change the priority AND scheduling group of a particular thread. The priority
-// should be one of the ANDROID_PRIORITY constants. Returns INVALID_OPERATION
-// if the priority set failed, else another value if just the group set failed;
-// in either case errno is set. Thread ID zero means current thread.
-extern int androidSetThreadPriority(pid_t tid, int prio);
-
-// Get the current priority of a particular thread. Returns one of the
-// ANDROID_PRIORITY constants or a negative result in case of error.
-extern int androidGetThreadPriority(pid_t tid);
-
-// Get the current scheduling group of a particular thread. Normally returns
-// one of the ANDROID_TGROUP constants other than ANDROID_TGROUP_DEFAULT.
-// Returns ANDROID_TGROUP_DEFAULT if no pthread support (e.g. on host) or if
-// scheduling groups are disabled. Returns INVALID_OPERATION if unexpected error.
-// Thread ID zero means current thread.
-extern int androidGetThreadSchedulingGroup(pid_t tid);
-
-#ifdef __cplusplus
-}
-#endif
-
-// ------------------------------------------------------------------
-// C++ API
-
-#ifdef __cplusplus
-
-#include <utils/Errors.h>
-#include <utils/RefBase.h>
-#include <utils/Timers.h>
-
-namespace android {
-
-typedef android_thread_id_t thread_id_t;
-
-typedef android_thread_func_t thread_func_t;
-
-enum {
- PRIORITY_LOWEST = ANDROID_PRIORITY_LOWEST,
- PRIORITY_BACKGROUND = ANDROID_PRIORITY_BACKGROUND,
- PRIORITY_NORMAL = ANDROID_PRIORITY_NORMAL,
- PRIORITY_FOREGROUND = ANDROID_PRIORITY_FOREGROUND,
- PRIORITY_DISPLAY = ANDROID_PRIORITY_DISPLAY,
- PRIORITY_URGENT_DISPLAY = ANDROID_PRIORITY_URGENT_DISPLAY,
- PRIORITY_AUDIO = ANDROID_PRIORITY_AUDIO,
- PRIORITY_URGENT_AUDIO = ANDROID_PRIORITY_URGENT_AUDIO,
- PRIORITY_HIGHEST = ANDROID_PRIORITY_HIGHEST,
- PRIORITY_DEFAULT = ANDROID_PRIORITY_DEFAULT,
- PRIORITY_MORE_FAVORABLE = ANDROID_PRIORITY_MORE_FAVORABLE,
- PRIORITY_LESS_FAVORABLE = ANDROID_PRIORITY_LESS_FAVORABLE,
-};
-
-// Create and run a new thread.
-inline bool createThread(thread_func_t f, void *a) {
- return androidCreateThread(f, a) ? true : false;
-}
-
-// Create thread with lots of parameters
-inline bool createThreadEtc(thread_func_t entryFunction,
- void *userData,
- const char* threadName = "android:unnamed_thread",
- int32_t threadPriority = PRIORITY_DEFAULT,
- size_t threadStackSize = 0,
- thread_id_t *threadId = 0)
-{
- return androidCreateThreadEtc(entryFunction, userData, threadName,
- threadPriority, threadStackSize, threadId) ? true : false;
-}
-
-// Get some sort of unique identifier for the current thread.
-inline thread_id_t getThreadId() {
- return androidGetThreadId();
-}
-
-/*****************************************************************************/
-
/*
- * Simple mutex class. The implementation is system-dependent.
+ * Please, DO NOT USE!
*
- * The mutex must be unlocked by the thread that locked it. They are not
- * recursive, i.e. the same thread can't lock it multiple times.
- */
-class Mutex {
-public:
- enum {
- PRIVATE = 0,
- SHARED = 1
- };
-
- Mutex();
- Mutex(const char* name);
- Mutex(int type, const char* name = NULL);
- ~Mutex();
-
- // lock or unlock the mutex
- status_t lock();
- void unlock();
-
- // lock if possible; returns 0 on success, error otherwise
- status_t tryLock();
-
- // Manages the mutex automatically. It'll be locked when Autolock is
- // constructed and released when Autolock goes out of scope.
- class Autolock {
- public:
- inline Autolock(Mutex& mutex) : mLock(mutex) { mLock.lock(); }
- inline Autolock(Mutex* mutex) : mLock(*mutex) { mLock.lock(); }
- inline ~Autolock() { mLock.unlock(); }
- private:
- Mutex& mLock;
- };
-
-private:
- friend class Condition;
-
- // A mutex cannot be copied
- Mutex(const Mutex&);
- Mutex& operator = (const Mutex&);
-
-#if defined(HAVE_PTHREADS)
- pthread_mutex_t mMutex;
-#else
- void _init();
- void* mState;
-#endif
-};
-
-#if defined(HAVE_PTHREADS)
-
-inline Mutex::Mutex() {
- pthread_mutex_init(&mMutex, NULL);
-}
-inline Mutex::Mutex(const char* name) {
- pthread_mutex_init(&mMutex, NULL);
-}
-inline Mutex::Mutex(int type, const char* name) {
- if (type == SHARED) {
- pthread_mutexattr_t attr;
- pthread_mutexattr_init(&attr);
- pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
- pthread_mutex_init(&mMutex, &attr);
- pthread_mutexattr_destroy(&attr);
- } else {
- pthread_mutex_init(&mMutex, NULL);
- }
-}
-inline Mutex::~Mutex() {
- pthread_mutex_destroy(&mMutex);
-}
-inline status_t Mutex::lock() {
- return -pthread_mutex_lock(&mMutex);
-}
-inline void Mutex::unlock() {
- pthread_mutex_unlock(&mMutex);
-}
-inline status_t Mutex::tryLock() {
- return -pthread_mutex_trylock(&mMutex);
-}
-
-#endif // HAVE_PTHREADS
-
-/*
- * Automatic mutex. Declare one of these at the top of a function.
- * When the function returns, it will go out of scope, and release the
- * mutex.
- */
-
-typedef Mutex::Autolock AutoMutex;
-
-/*****************************************************************************/
-
-#if defined(HAVE_PTHREADS)
-
-/*
- * Simple mutex class. The implementation is system-dependent.
- *
- * The mutex must be unlocked by the thread that locked it. They are not
- * recursive, i.e. the same thread can't lock it multiple times.
- */
-class RWLock {
-public:
- enum {
- PRIVATE = 0,
- SHARED = 1
- };
-
- RWLock();
- RWLock(const char* name);
- RWLock(int type, const char* name = NULL);
- ~RWLock();
-
- status_t readLock();
- status_t tryReadLock();
- status_t writeLock();
- status_t tryWriteLock();
- void unlock();
-
- class AutoRLock {
- public:
- inline AutoRLock(RWLock& rwlock) : mLock(rwlock) { mLock.readLock(); }
- inline ~AutoRLock() { mLock.unlock(); }
- private:
- RWLock& mLock;
- };
-
- class AutoWLock {
- public:
- inline AutoWLock(RWLock& rwlock) : mLock(rwlock) { mLock.writeLock(); }
- inline ~AutoWLock() { mLock.unlock(); }
- private:
- RWLock& mLock;
- };
-
-private:
- // A RWLock cannot be copied
- RWLock(const RWLock&);
- RWLock& operator = (const RWLock&);
-
- pthread_rwlock_t mRWLock;
-};
-
-inline RWLock::RWLock() {
- pthread_rwlock_init(&mRWLock, NULL);
-}
-inline RWLock::RWLock(const char* name) {
- pthread_rwlock_init(&mRWLock, NULL);
-}
-inline RWLock::RWLock(int type, const char* name) {
- if (type == SHARED) {
- pthread_rwlockattr_t attr;
- pthread_rwlockattr_init(&attr);
- pthread_rwlockattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
- pthread_rwlock_init(&mRWLock, &attr);
- pthread_rwlockattr_destroy(&attr);
- } else {
- pthread_rwlock_init(&mRWLock, NULL);
- }
-}
-inline RWLock::~RWLock() {
- pthread_rwlock_destroy(&mRWLock);
-}
-inline status_t RWLock::readLock() {
- return -pthread_rwlock_rdlock(&mRWLock);
-}
-inline status_t RWLock::tryReadLock() {
- return -pthread_rwlock_tryrdlock(&mRWLock);
-}
-inline status_t RWLock::writeLock() {
- return -pthread_rwlock_wrlock(&mRWLock);
-}
-inline status_t RWLock::tryWriteLock() {
- return -pthread_rwlock_trywrlock(&mRWLock);
-}
-inline void RWLock::unlock() {
- pthread_rwlock_unlock(&mRWLock);
-}
-
-#endif // HAVE_PTHREADS
-
-/*****************************************************************************/
-
-/*
- * Condition variable class. The implementation is system-dependent.
+ * This file is here only for legacy reasons. Instead, include directly
+ * the headers you need below.
*
- * Condition variables are paired up with mutexes. Lock the mutex,
- * call wait(), then either re-wait() if things aren't quite what you want,
- * or unlock the mutex and continue. All threads calling wait() must
- * use the same mutex for a given Condition.
- */
-class Condition {
-public:
- enum {
- PRIVATE = 0,
- SHARED = 1
- };
-
- Condition();
- Condition(int type);
- ~Condition();
- // Wait on the condition variable. Lock the mutex before calling.
- status_t wait(Mutex& mutex);
- // same with relative timeout
- status_t waitRelative(Mutex& mutex, nsecs_t reltime);
- // Signal the condition variable, allowing one thread to continue.
- void signal();
- // Signal the condition variable, allowing all threads to continue.
- void broadcast();
-
-private:
-#if defined(HAVE_PTHREADS)
- pthread_cond_t mCond;
-#else
- void* mState;
-#endif
-};
-
-#if defined(HAVE_PTHREADS)
-
-inline Condition::Condition() {
- pthread_cond_init(&mCond, NULL);
-}
-inline Condition::Condition(int type) {
- if (type == SHARED) {
- pthread_condattr_t attr;
- pthread_condattr_init(&attr);
- pthread_condattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
- pthread_cond_init(&mCond, &attr);
- pthread_condattr_destroy(&attr);
- } else {
- pthread_cond_init(&mCond, NULL);
- }
-}
-inline Condition::~Condition() {
- pthread_cond_destroy(&mCond);
-}
-inline status_t Condition::wait(Mutex& mutex) {
- return -pthread_cond_wait(&mCond, &mutex.mMutex);
-}
-inline status_t Condition::waitRelative(Mutex& mutex, nsecs_t reltime) {
-#if defined(HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE)
- struct timespec ts;
- ts.tv_sec = reltime/1000000000;
- ts.tv_nsec = reltime%1000000000;
- return -pthread_cond_timedwait_relative_np(&mCond, &mutex.mMutex, &ts);
-#else // HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE
- struct timespec ts;
-#if defined(HAVE_POSIX_CLOCKS)
- clock_gettime(CLOCK_REALTIME, &ts);
-#else // HAVE_POSIX_CLOCKS
- // we don't support the clocks here.
- struct timeval t;
- gettimeofday(&t, NULL);
- ts.tv_sec = t.tv_sec;
- ts.tv_nsec= t.tv_usec*1000;
-#endif // HAVE_POSIX_CLOCKS
- ts.tv_sec += reltime/1000000000;
- ts.tv_nsec+= reltime%1000000000;
- if (ts.tv_nsec >= 1000000000) {
- ts.tv_nsec -= 1000000000;
- ts.tv_sec += 1;
- }
- return -pthread_cond_timedwait(&mCond, &mutex.mMutex, &ts);
-#endif // HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE
-}
-inline void Condition::signal() {
- pthread_cond_signal(&mCond);
-}
-inline void Condition::broadcast() {
- pthread_cond_broadcast(&mCond);
-}
-
-#endif // HAVE_PTHREADS
-
-/*****************************************************************************/
-
-/*
- * This is our spiffy thread object!
*/
-class Thread : virtual public RefBase
-{
-public:
- // Create a Thread object, but doesn't create or start the associated
- // thread. See the run() method.
- Thread(bool canCallJava = true);
- virtual ~Thread();
+#include <utils/AndroidThreads.h>
- // Start the thread in threadLoop() which needs to be implemented.
- virtual status_t run( const char* name = 0,
- int32_t priority = PRIORITY_DEFAULT,
- size_t stack = 0);
-
- // Ask this object's thread to exit. This function is asynchronous, when the
- // function returns the thread might still be running. Of course, this
- // function can be called from a different thread.
- virtual void requestExit();
-
- // Good place to do one-time initializations
- virtual status_t readyToRun();
-
- // Call requestExit() and wait until this object's thread exits.
- // BE VERY CAREFUL of deadlocks. In particular, it would be silly to call
- // this function from this object's thread. Will return WOULD_BLOCK in
- // that case.
- status_t requestExitAndWait();
-
- // Wait until this object's thread exits. Returns immediately if not yet running.
- // Do not call from this object's thread; will return WOULD_BLOCK in that case.
- status_t join();
-
-#ifdef HAVE_ANDROID_OS
- // Return the thread's kernel ID, same as the thread itself calling gettid() or
- // androidGetTid(), or -1 if the thread is not running.
- pid_t getTid() const;
-#endif
-
-protected:
- // exitPending() returns true if requestExit() has been called.
- bool exitPending() const;
-
-private:
- // Derived class must implement threadLoop(). The thread starts its life
- // here. There are two ways of using the Thread object:
- // 1) loop: if threadLoop() returns true, it will be called again if
- // requestExit() wasn't called.
- // 2) once: if threadLoop() returns false, the thread will exit upon return.
- virtual bool threadLoop() = 0;
-
-private:
- Thread& operator=(const Thread&);
- static int _threadLoop(void* user);
- const bool mCanCallJava;
- // always hold mLock when reading or writing
- thread_id_t mThread;
- mutable Mutex mLock;
- Condition mThreadExitedCondition;
- status_t mStatus;
- // note that all accesses of mExitPending and mRunning need to hold mLock
- volatile bool mExitPending;
- volatile bool mRunning;
- sp<Thread> mHoldSelf;
-#ifdef HAVE_ANDROID_OS
- // legacy for debugging, not used by getTid() as it is set by the child thread
- // and so is not initialized until the child reaches that point
- pid_t mTid;
+#ifdef __cplusplus
+#include <utils/Condition.h>
+#include <utils/Errors.h>
+#include <utils/Mutex.h>
+#include <utils/RWLock.h>
+#include <utils/Thread.h>
#endif
-};
-
-
-}; // namespace android
-
-#endif // __cplusplus
#endif // _LIBS_UTILS_THREADS_H
diff --git a/libs/androidfw/Android.mk b/libs/androidfw/Android.mk
index c5f8a87..4e89d87 100644
--- a/libs/androidfw/Android.mk
+++ b/libs/androidfw/Android.mk
@@ -67,6 +67,7 @@ LOCAL_SRC_FILES:= \
$(commonSources) \
BackupData.cpp \
BackupHelpers.cpp \
+ CursorWindow.cpp \
InputTransport.cpp
LOCAL_SHARED_LIBRARIES := \
diff --git a/libs/binder/CursorWindow.cpp b/libs/androidfw/CursorWindow.cpp
index a6e5f71..047a4c8 100644
--- a/libs/binder/CursorWindow.cpp
+++ b/libs/androidfw/CursorWindow.cpp
@@ -18,7 +18,7 @@
#define LOG_TAG "CursorWindow"
#include <utils/Log.h>
-#include <binder/CursorWindow.h>
+#include <androidfw/CursorWindow.h>
#include <cutils/ashmem.h>
#include <sys/mman.h>
diff --git a/libs/binder/Android.mk b/libs/binder/Android.mk
index 3a12e96..d449298 100644
--- a/libs/binder/Android.mk
+++ b/libs/binder/Android.mk
@@ -16,7 +16,6 @@
sources := \
Binder.cpp \
BpBinder.cpp \
- CursorWindow.cpp \
IInterface.cpp \
IMemory.cpp \
IPCThreadState.cpp \
@@ -25,7 +24,6 @@ sources := \
MemoryDealer.cpp \
MemoryBase.cpp \
MemoryHeapBase.cpp \
- MemoryHeapPmem.cpp \
Parcel.cpp \
PermissionCache.cpp \
ProcessState.cpp \
diff --git a/libs/binder/MemoryHeapPmem.cpp b/libs/binder/MemoryHeapPmem.cpp
deleted file mode 100644
index 66bcf4d..0000000
--- a/libs/binder/MemoryHeapPmem.cpp
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "MemoryHeapPmem"
-
-#include <stdlib.h>
-#include <stdint.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-
-#include <cutils/log.h>
-
-#include <binder/MemoryHeapPmem.h>
-#include <binder/MemoryHeapBase.h>
-
-#ifdef HAVE_ANDROID_OS
-#include <linux/android_pmem.h>
-#endif
-
-namespace android {
-
-// ---------------------------------------------------------------------------
-
-MemoryHeapPmem::MemoryPmem::MemoryPmem(const sp<MemoryHeapPmem>& heap)
- : BnMemory(), mClientHeap(heap)
-{
-}
-
-MemoryHeapPmem::MemoryPmem::~MemoryPmem() {
- if (mClientHeap != NULL) {
- mClientHeap->remove(this);
- }
-}
-
-// ---------------------------------------------------------------------------
-
-class SubRegionMemory : public MemoryHeapPmem::MemoryPmem {
-public:
- SubRegionMemory(const sp<MemoryHeapPmem>& heap, ssize_t offset, size_t size);
- virtual ~SubRegionMemory();
- virtual sp<IMemoryHeap> getMemory(ssize_t* offset, size_t* size) const;
-private:
- friend class MemoryHeapPmem;
- void revoke();
- size_t mSize;
- ssize_t mOffset;
-};
-
-SubRegionMemory::SubRegionMemory(const sp<MemoryHeapPmem>& heap,
- ssize_t offset, size_t size)
- : MemoryHeapPmem::MemoryPmem(heap), mSize(size), mOffset(offset)
-{
-#ifndef NDEBUG
- void* const start_ptr = (void*)(intptr_t(getHeap()->base()) + offset);
- memset(start_ptr, 0xda, size);
-#endif
-
-#ifdef HAVE_ANDROID_OS
- if (size > 0) {
- const size_t pagesize = getpagesize();
- size = (size + pagesize-1) & ~(pagesize-1);
- int our_fd = heap->heapID();
- struct pmem_region sub = { offset, size };
- int err = ioctl(our_fd, PMEM_MAP, &sub);
- ALOGE_IF(err<0, "PMEM_MAP failed (%s), "
- "mFD=%d, sub.offset=%lu, sub.size=%lu",
- strerror(errno), our_fd, sub.offset, sub.len);
-}
-#endif
-}
-
-sp<IMemoryHeap> SubRegionMemory::getMemory(ssize_t* offset, size_t* size) const
-{
- if (offset) *offset = mOffset;
- if (size) *size = mSize;
- return getHeap();
-}
-
-SubRegionMemory::~SubRegionMemory()
-{
- revoke();
-}
-
-
-void SubRegionMemory::revoke()
-{
- // NOTE: revoke() doesn't need to be protected by a lock because it
- // can only be called from MemoryHeapPmem::revoke(), which means
- // that we can't be in ~SubRegionMemory(), or in ~SubRegionMemory(),
- // which means MemoryHeapPmem::revoke() wouldn't have been able to
- // promote() it.
-
-#ifdef HAVE_ANDROID_OS
- if (mSize != 0) {
- const sp<MemoryHeapPmem>& heap(getHeap());
- int our_fd = heap->heapID();
- struct pmem_region sub;
- sub.offset = mOffset;
- sub.len = mSize;
- int err = ioctl(our_fd, PMEM_UNMAP, &sub);
- ALOGE_IF(err<0, "PMEM_UNMAP failed (%s), "
- "mFD=%d, sub.offset=%lu, sub.size=%lu",
- strerror(errno), our_fd, sub.offset, sub.len);
- mSize = 0;
- }
-#endif
-}
-
-// ---------------------------------------------------------------------------
-
-MemoryHeapPmem::MemoryHeapPmem(const sp<MemoryHeapBase>& pmemHeap,
- uint32_t flags)
- : MemoryHeapBase()
-{
- char const * const device = pmemHeap->getDevice();
-#ifdef HAVE_ANDROID_OS
- if (device) {
- int fd = open(device, O_RDWR | (flags & NO_CACHING ? O_SYNC : 0));
- ALOGE_IF(fd<0, "couldn't open %s (%s)", device, strerror(errno));
- if (fd >= 0) {
- int err = ioctl(fd, PMEM_CONNECT, pmemHeap->heapID());
- if (err < 0) {
- ALOGE("PMEM_CONNECT failed (%s), mFD=%d, sub-fd=%d",
- strerror(errno), fd, pmemHeap->heapID());
- close(fd);
- } else {
- // everything went well...
- mParentHeap = pmemHeap;
- MemoryHeapBase::init(fd,
- pmemHeap->getBase(),
- pmemHeap->getSize(),
- pmemHeap->getFlags() | flags,
- device);
- }
- }
- }
-#else
- mParentHeap = pmemHeap;
- MemoryHeapBase::init(
- dup(pmemHeap->heapID()),
- pmemHeap->getBase(),
- pmemHeap->getSize(),
- pmemHeap->getFlags() | flags,
- device);
-#endif
-}
-
-MemoryHeapPmem::~MemoryHeapPmem()
-{
-}
-
-sp<IMemory> MemoryHeapPmem::mapMemory(size_t offset, size_t size)
-{
- sp<MemoryPmem> memory = createMemory(offset, size);
- if (memory != 0) {
- Mutex::Autolock _l(mLock);
- mAllocations.add(memory);
- }
- return memory;
-}
-
-sp<MemoryHeapPmem::MemoryPmem> MemoryHeapPmem::createMemory(
- size_t offset, size_t size)
-{
- sp<SubRegionMemory> memory;
- if (heapID() > 0)
- memory = new SubRegionMemory(this, offset, size);
- return memory;
-}
-
-status_t MemoryHeapPmem::slap()
-{
-#ifdef HAVE_ANDROID_OS
- size_t size = getSize();
- const size_t pagesize = getpagesize();
- size = (size + pagesize-1) & ~(pagesize-1);
- int our_fd = getHeapID();
- struct pmem_region sub = { 0, size };
- int err = ioctl(our_fd, PMEM_MAP, &sub);
- ALOGE_IF(err<0, "PMEM_MAP failed (%s), "
- "mFD=%d, sub.offset=%lu, sub.size=%lu",
- strerror(errno), our_fd, sub.offset, sub.len);
- return -errno;
-#else
- return NO_ERROR;
-#endif
-}
-
-status_t MemoryHeapPmem::unslap()
-{
-#ifdef HAVE_ANDROID_OS
- size_t size = getSize();
- const size_t pagesize = getpagesize();
- size = (size + pagesize-1) & ~(pagesize-1);
- int our_fd = getHeapID();
- struct pmem_region sub = { 0, size };
- int err = ioctl(our_fd, PMEM_UNMAP, &sub);
- ALOGE_IF(err<0, "PMEM_UNMAP failed (%s), "
- "mFD=%d, sub.offset=%lu, sub.size=%lu",
- strerror(errno), our_fd, sub.offset, sub.len);
- return -errno;
-#else
- return NO_ERROR;
-#endif
-}
-
-void MemoryHeapPmem::revoke()
-{
- SortedVector< wp<MemoryPmem> > allocations;
-
- { // scope for lock
- Mutex::Autolock _l(mLock);
- allocations = mAllocations;
- }
-
- ssize_t count = allocations.size();
- for (ssize_t i=0 ; i<count ; i++) {
- sp<MemoryPmem> memory(allocations[i].promote());
- if (memory != 0)
- memory->revoke();
- }
-}
-
-void MemoryHeapPmem::remove(const wp<MemoryPmem>& memory)
-{
- Mutex::Autolock _l(mLock);
- mAllocations.remove(memory);
-}
-
-// ---------------------------------------------------------------------------
-}; // namespace android
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index f96fe50..9fa412c 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -286,8 +286,8 @@ void ProcessState::spawnPooledThread(bool isMain)
{
if (mThreadPoolStarted) {
int32_t s = android_atomic_add(1, &mThreadPoolSeq);
- char buf[32];
- sprintf(buf, "Binder Thread #%d", s);
+ char buf[16];
+ snprintf(buf, sizeof(buf), "Binder_%X", s);
ALOGV("Spawning new pooled thread, name=%s\n", buf);
sp<Thread> t = new PoolThread(isMain);
t->run(buf);
diff --git a/libs/camera/Camera.cpp b/libs/camera/Camera.cpp
index ee458f1..d43cb0b 100644
--- a/libs/camera/Camera.cpp
+++ b/libs/camera/Camera.cpp
@@ -27,7 +27,8 @@
#include <camera/ICameraRecordingProxyListener.h>
#include <camera/ICameraService.h>
-#include <surfaceflinger/Surface.h>
+#include <gui/ISurfaceTexture.h>
+#include <gui/Surface.h>
namespace android {
diff --git a/libs/camera/ICamera.cpp b/libs/camera/ICamera.cpp
index 70f5dbc..8d8408c 100644
--- a/libs/camera/ICamera.cpp
+++ b/libs/camera/ICamera.cpp
@@ -22,6 +22,8 @@
#include <sys/types.h>
#include <binder/Parcel.h>
#include <camera/ICamera.h>
+#include <gui/ISurfaceTexture.h>
+#include <gui/Surface.h>
namespace android {
diff --git a/libs/gui/BufferQueue.cpp b/libs/gui/BufferQueue.cpp
index f4214c7..d761680 100644
--- a/libs/gui/BufferQueue.cpp
+++ b/libs/gui/BufferQueue.cpp
@@ -16,6 +16,7 @@
#define LOG_TAG "BufferQueue"
//#define LOG_NDEBUG 0
+#define ATRACE_TAG ATRACE_TAG_GRAPHICS
#define GL_GLEXT_PROTOTYPES
#define EGL_EGLEXT_PROTOTYPES
@@ -24,11 +25,12 @@
#include <EGL/eglext.h>
#include <gui/BufferQueue.h>
+#include <gui/ISurfaceComposer.h>
#include <private/gui/ComposerService.h>
-#include <surfaceflinger/ISurfaceComposer.h>
#include <utils/Log.h>
#include <gui/SurfaceTexture.h>
+#include <utils/Trace.h>
// This compile option causes SurfaceTexture to return the buffer that is currently
// attached to the GL texture from dequeueBuffer when no other buffers are
@@ -36,6 +38,10 @@
// implicit cross-process synchronization to prevent the buffer from being
// written to before the buffer has (a) been detached from the GL texture and
// (b) all GL reads from the buffer have completed.
+
+// During refactoring, do not support dequeuing the current buffer
+#undef ALLOW_DEQUEUE_CURRENT_BUFFER
+
#ifdef ALLOW_DEQUEUE_CURRENT_BUFFER
#define FLAG_ALLOW_DEQUEUE_CURRENT_BUFFER true
#warning "ALLOW_DEQUEUE_CURRENT_BUFFER enabled"
@@ -187,6 +193,7 @@ status_t BufferQueue::setBufferCount(int bufferCount) {
int BufferQueue::query(int what, int* outValue)
{
+ ATRACE_CALL();
Mutex::Autolock lock(mMutex);
if (mAbandoned) {
@@ -217,6 +224,7 @@ int BufferQueue::query(int what, int* outValue)
}
status_t BufferQueue::requestBuffer(int slot, sp<GraphicBuffer>* buf) {
+ ATRACE_CALL();
ST_LOGV("requestBuffer: slot=%d", slot);
Mutex::Autolock lock(mMutex);
if (mAbandoned) {
@@ -235,6 +243,7 @@ status_t BufferQueue::requestBuffer(int slot, sp<GraphicBuffer>* buf) {
status_t BufferQueue::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
uint32_t format, uint32_t usage) {
+ ATRACE_CALL();
ST_LOGV("dequeueBuffer: w=%d h=%d fmt=%#x usage=%#x", w, h, format, usage);
if ((w && !h) || (!w && h)) {
@@ -309,7 +318,9 @@ status_t BufferQueue::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
dequeuedCount++;
}
- if (FLAG_ALLOW_DEQUEUE_CURRENT_BUFFER) {
+ // this logic used to be if (FLAG_ALLOW_DEQUEUE_CURRENT_BUFFER)
+ // but dequeuing the current buffer is disabled.
+ if (false) {
// This functionality has been temporarily removed so
// BufferQueue and SurfaceTexture can be refactored into
// separate objects
@@ -452,6 +463,7 @@ status_t BufferQueue::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
}
status_t BufferQueue::setSynchronousMode(bool enabled) {
+ ATRACE_CALL();
ST_LOGV("setSynchronousMode: enabled=%d", enabled);
Mutex::Autolock lock(mMutex);
@@ -484,6 +496,7 @@ status_t BufferQueue::setSynchronousMode(bool enabled) {
status_t BufferQueue::queueBuffer(int buf, int64_t timestamp,
uint32_t* outWidth, uint32_t* outHeight, uint32_t* outTransform) {
+ ATRACE_CALL();
ST_LOGV("queueBuffer: slot=%d time=%lld", buf, timestamp);
sp<FrameAvailableListener> listener;
@@ -547,6 +560,8 @@ status_t BufferQueue::queueBuffer(int buf, int64_t timestamp,
*outWidth = mDefaultWidth;
*outHeight = mDefaultHeight;
*outTransform = 0;
+
+ ATRACE_INT(mConsumerName.string(), mQueue.size());
} // scope for the lock
// call back without lock held
@@ -557,6 +572,7 @@ status_t BufferQueue::queueBuffer(int buf, int64_t timestamp,
}
void BufferQueue::cancelBuffer(int buf) {
+ ATRACE_CALL();
ST_LOGV("cancelBuffer: slot=%d", buf);
Mutex::Autolock lock(mMutex);
@@ -580,6 +596,7 @@ void BufferQueue::cancelBuffer(int buf) {
}
status_t BufferQueue::setCrop(const Rect& crop) {
+ ATRACE_CALL();
ST_LOGV("setCrop: crop=[%d,%d,%d,%d]", crop.left, crop.top, crop.right,
crop.bottom);
@@ -593,6 +610,7 @@ status_t BufferQueue::setCrop(const Rect& crop) {
}
status_t BufferQueue::setTransform(uint32_t transform) {
+ ATRACE_CALL();
ST_LOGV("setTransform: xform=%#x", transform);
Mutex::Autolock lock(mMutex);
if (mAbandoned) {
@@ -604,6 +622,7 @@ status_t BufferQueue::setTransform(uint32_t transform) {
}
status_t BufferQueue::setScalingMode(int mode) {
+ ATRACE_CALL();
ST_LOGV("setScalingMode: mode=%d", mode);
switch (mode) {
@@ -622,6 +641,7 @@ status_t BufferQueue::setScalingMode(int mode) {
status_t BufferQueue::connect(int api,
uint32_t* outWidth, uint32_t* outHeight, uint32_t* outTransform) {
+ ATRACE_CALL();
ST_LOGV("connect: api=%d", api);
Mutex::Autolock lock(mMutex);
@@ -658,6 +678,7 @@ status_t BufferQueue::connect(int api,
}
status_t BufferQueue::disconnect(int api) {
+ ATRACE_CALL();
ST_LOGV("disconnect: api=%d", api);
Mutex::Autolock lock(mMutex);
@@ -812,6 +833,8 @@ status_t BufferQueue::acquire(BufferItem *buffer) {
mSlots[buf].mBufferState = BufferSlot::ACQUIRED;
mQueue.erase(front);
+
+ ATRACE_INT(mConsumerName.string(), mQueue.size());
}
else {
return -EINVAL; //should be a better return code
@@ -869,6 +892,7 @@ status_t BufferQueue::setDefaultBufferSize(uint32_t w, uint32_t h)
}
status_t BufferQueue::setBufferCountServer(int bufferCount) {
+ ATRACE_CALL();
Mutex::Autolock lock(mMutex);
return setBufferCountServerLocked(bufferCount);
}
diff --git a/libs/gui/DisplayEventReceiver.cpp b/libs/gui/DisplayEventReceiver.cpp
index 6a4763d..a6790ad 100644
--- a/libs/gui/DisplayEventReceiver.cpp
+++ b/libs/gui/DisplayEventReceiver.cpp
@@ -21,11 +21,10 @@
#include <gui/BitTube.h>
#include <gui/DisplayEventReceiver.h>
#include <gui/IDisplayEventConnection.h>
+#include <gui/ISurfaceComposer.h>
#include <private/gui/ComposerService.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-
// ---------------------------------------------------------------------------
namespace android {
diff --git a/libs/gui/IGraphicBufferAlloc.cpp b/libs/gui/IGraphicBufferAlloc.cpp
index 30f8d00..a70a5e8 100644
--- a/libs/gui/IGraphicBufferAlloc.cpp
+++ b/libs/gui/IGraphicBufferAlloc.cpp
@@ -24,7 +24,7 @@
#include <ui/GraphicBuffer.h>
-#include <surfaceflinger/IGraphicBufferAlloc.h>
+#include <gui/IGraphicBufferAlloc.h>
// ---------------------------------------------------------------------------
diff --git a/libs/gui/ISurface.cpp b/libs/gui/ISurface.cpp
index 96155d7..c2ea183 100644
--- a/libs/gui/ISurface.cpp
+++ b/libs/gui/ISurface.cpp
@@ -22,8 +22,8 @@
#include <binder/Parcel.h>
+#include <gui/ISurface.h>
#include <gui/ISurfaceTexture.h>
-#include <surfaceflinger/ISurface.h>
namespace android {
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp
index 95b2379..1f1794c 100644
--- a/libs/gui/ISurfaceComposer.cpp
+++ b/libs/gui/ISurfaceComposer.cpp
@@ -25,16 +25,14 @@
#include <binder/IPCThreadState.h>
#include <binder/IServiceManager.h>
-#include <private/surfaceflinger/LayerState.h>
-
-#include <surfaceflinger/ISurfaceComposer.h>
-
#include <gui/BitTube.h>
#include <gui/IDisplayEventConnection.h>
+#include <gui/ISurfaceComposer.h>
+#include <gui/ISurfaceTexture.h>
-#include <ui/DisplayInfo.h>
+#include <private/gui/LayerState.h>
-#include <gui/ISurfaceTexture.h>
+#include <ui/DisplayInfo.h>
#include <utils/Log.h>
diff --git a/libs/gui/ISurfaceComposerClient.cpp b/libs/gui/ISurfaceComposerClient.cpp
index 8fe96b1..ca9ed5b 100644
--- a/libs/gui/ISurfaceComposerClient.cpp
+++ b/libs/gui/ISurfaceComposerClient.cpp
@@ -29,9 +29,9 @@
#include <ui/Point.h>
#include <ui/Rect.h>
-#include <surfaceflinger/ISurface.h>
-#include <surfaceflinger/ISurfaceComposerClient.h>
-#include <private/surfaceflinger/LayerState.h>
+#include <gui/ISurface.h>
+#include <gui/ISurfaceComposerClient.h>
+#include <private/gui/LayerState.h>
// ---------------------------------------------------------------------------
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index 87901e8..224c305 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -16,8 +16,8 @@
#include <utils/Errors.h>
#include <binder/Parcel.h>
-#include <private/surfaceflinger/LayerState.h>
-#include <surfaceflinger/ISurfaceComposerClient.h>
+#include <gui/ISurfaceComposerClient.h>
+#include <private/gui/LayerState.h>
namespace android {
diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp
index 337950c..72b27ed 100644
--- a/libs/gui/Surface.cpp
+++ b/libs/gui/Surface.cpp
@@ -28,16 +28,15 @@
#include <binder/IPCThreadState.h>
-#include <gui/SurfaceTextureClient.h>
-
#include <ui/DisplayInfo.h>
#include <ui/GraphicBuffer.h>
#include <ui/Rect.h>
-#include <surfaceflinger/ISurface.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/Surface.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
+#include <gui/ISurface.h>
+#include <gui/ISurfaceComposer.h>
+#include <gui/Surface.h>
+#include <gui/SurfaceComposerClient.h>
+#include <gui/SurfaceTextureClient.h>
namespace android {
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 699438c..ceb1ba6 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -31,15 +31,14 @@
#include <ui/DisplayInfo.h>
-#include <surfaceflinger/ISurface.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/ISurfaceComposerClient.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
-
-#include <private/surfaceflinger/LayerState.h>
-#include <private/surfaceflinger/SharedBufferStack.h>
+#include <gui/ISurface.h>
+#include <gui/ISurfaceComposer.h>
+#include <gui/ISurfaceComposerClient.h>
+#include <gui/SurfaceComposerClient.h>
#include <private/gui/ComposerService.h>
+#include <private/gui/LayerState.h>
+#include <private/gui/SharedBufferStack.h>
namespace android {
// ---------------------------------------------------------------------------
diff --git a/libs/gui/SurfaceTexture.cpp b/libs/gui/SurfaceTexture.cpp
index ee5deb3..b42aa34 100644
--- a/libs/gui/SurfaceTexture.cpp
+++ b/libs/gui/SurfaceTexture.cpp
@@ -15,6 +15,7 @@
*/
#define LOG_TAG "SurfaceTexture"
+#define ATRACE_TAG ATRACE_TAG_GRAPHICS
//#define LOG_NDEBUG 0
#define GL_GLEXT_PROTOTYPES
@@ -25,18 +26,18 @@
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
-#include <gui/SurfaceTexture.h>
-
#include <hardware/hardware.h>
-#include <private/gui/ComposerService.h>
+#include <gui/IGraphicBufferAlloc.h>
+#include <gui/ISurfaceComposer.h>
+#include <gui/SurfaceComposerClient.h>
+#include <gui/SurfaceTexture.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
-#include <surfaceflinger/IGraphicBufferAlloc.h>
+#include <private/gui/ComposerService.h>
#include <utils/Log.h>
#include <utils/String8.h>
+#include <utils/Trace.h>
// This compile option makes SurfaceTexture use the EGL_KHR_fence_sync extension
// to synchronize access to the buffers. It will cause dequeueBuffer to stall,
@@ -144,6 +145,7 @@ status_t SurfaceTexture::setDefaultBufferSize(uint32_t w, uint32_t h)
}
status_t SurfaceTexture::updateTexImage() {
+ ATRACE_CALL();
ST_LOGV("updateTexImage");
Mutex::Autolock lock(mMutex);
@@ -227,7 +229,7 @@ status_t SurfaceTexture::updateTexImage() {
ST_LOGV("updateTexImage: (slot=%d buf=%p) -> (slot=%d buf=%p)",
mCurrentTexture,
mCurrentTextureBuf != NULL ? mCurrentTextureBuf->handle : 0,
- buf, item.mGraphicBuffer->handle);
+ buf, item.mGraphicBuffer != NULL ? item.mGraphicBuffer->handle : 0);
// release old buffer
releaseBuffer(mCurrentTexture,
diff --git a/libs/gui/SurfaceTextureClient.cpp b/libs/gui/SurfaceTextureClient.cpp
index d0934ba..f88dcaf 100644
--- a/libs/gui/SurfaceTextureClient.cpp
+++ b/libs/gui/SurfaceTextureClient.cpp
@@ -15,13 +15,15 @@
*/
#define LOG_TAG "SurfaceTextureClient"
+#define ATRACE_TAG ATRACE_TAG_GRAPHICS
//#define LOG_NDEBUG 0
-#include <gui/SurfaceTextureClient.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
-
#include <utils/Log.h>
+#include <utils/Trace.h>
+
+#include <gui/ISurfaceComposer.h>
+#include <gui/SurfaceComposerClient.h>
+#include <gui/SurfaceTextureClient.h>
#include <private/gui/ComposerService.h>
@@ -121,6 +123,7 @@ int SurfaceTextureClient::hook_perform(ANativeWindow* window, int operation, ...
}
int SurfaceTextureClient::setSwapInterval(int interval) {
+ ATRACE_CALL();
// EGL specification states:
// interval is silently clamped to minimum and maximum implementation
// dependent values before being stored.
@@ -138,6 +141,7 @@ int SurfaceTextureClient::setSwapInterval(int interval) {
}
int SurfaceTextureClient::dequeueBuffer(android_native_buffer_t** buffer) {
+ ATRACE_CALL();
ALOGV("SurfaceTextureClient::dequeueBuffer");
Mutex::Autolock lock(mMutex);
int buf = -1;
@@ -167,6 +171,7 @@ int SurfaceTextureClient::dequeueBuffer(android_native_buffer_t** buffer) {
}
int SurfaceTextureClient::cancelBuffer(android_native_buffer_t* buffer) {
+ ATRACE_CALL();
ALOGV("SurfaceTextureClient::cancelBuffer");
Mutex::Autolock lock(mMutex);
int i = getSlotFromBufferLocked(buffer);
@@ -213,6 +218,7 @@ int SurfaceTextureClient::lockBuffer(android_native_buffer_t* buffer) {
}
int SurfaceTextureClient::queueBuffer(android_native_buffer_t* buffer) {
+ ATRACE_CALL();
ALOGV("SurfaceTextureClient::queueBuffer");
Mutex::Autolock lock(mMutex);
int64_t timestamp;
@@ -236,6 +242,7 @@ int SurfaceTextureClient::queueBuffer(android_native_buffer_t* buffer) {
}
int SurfaceTextureClient::query(int what, int* value) const {
+ ATRACE_CALL();
ALOGV("SurfaceTextureClient::query");
{ // scope for the lock
Mutex::Autolock lock(mMutex);
@@ -404,6 +411,7 @@ int SurfaceTextureClient::dispatchUnlockAndPost(va_list args) {
int SurfaceTextureClient::connect(int api) {
+ ATRACE_CALL();
ALOGV("SurfaceTextureClient::connect");
Mutex::Autolock lock(mMutex);
int err = mSurfaceTexture->connect(api,
@@ -415,6 +423,7 @@ int SurfaceTextureClient::connect(int api) {
}
int SurfaceTextureClient::disconnect(int api) {
+ ATRACE_CALL();
ALOGV("SurfaceTextureClient::disconnect");
Mutex::Autolock lock(mMutex);
freeAllBuffers();
@@ -441,6 +450,7 @@ int SurfaceTextureClient::setUsage(uint32_t reqUsage)
int SurfaceTextureClient::setCrop(Rect const* rect)
{
+ ATRACE_CALL();
ALOGV("SurfaceTextureClient::setCrop");
Mutex::Autolock lock(mMutex);
@@ -459,6 +469,7 @@ int SurfaceTextureClient::setCrop(Rect const* rect)
int SurfaceTextureClient::setBufferCount(int bufferCount)
{
+ ATRACE_CALL();
ALOGV("SurfaceTextureClient::setBufferCount");
Mutex::Autolock lock(mMutex);
@@ -475,6 +486,7 @@ int SurfaceTextureClient::setBufferCount(int bufferCount)
int SurfaceTextureClient::setBuffersDimensions(int w, int h)
{
+ ATRACE_CALL();
ALOGV("SurfaceTextureClient::setBuffersDimensions");
Mutex::Autolock lock(mMutex);
@@ -508,6 +520,7 @@ int SurfaceTextureClient::setBuffersFormat(int format)
int SurfaceTextureClient::setScalingMode(int mode)
{
+ ATRACE_CALL();
ALOGV("SurfaceTextureClient::setScalingMode(%d)", mode);
Mutex::Autolock lock(mMutex);
// mode is validated on the server
@@ -520,6 +533,7 @@ int SurfaceTextureClient::setScalingMode(int mode)
int SurfaceTextureClient::setBuffersTransform(int transform)
{
+ ATRACE_CALL();
ALOGV("SurfaceTextureClient::setBuffersTransform");
Mutex::Autolock lock(mMutex);
status_t err = mSurfaceTexture->setTransform(transform);
diff --git a/libs/gui/tests/SurfaceTexture_test.cpp b/libs/gui/tests/SurfaceTexture_test.cpp
index b18e7b0..8c6defe 100644
--- a/libs/gui/tests/SurfaceTexture_test.cpp
+++ b/libs/gui/tests/SurfaceTexture_test.cpp
@@ -24,9 +24,9 @@
#include <utils/String8.h>
#include <utils/threads.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/Surface.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
+#include <gui/ISurfaceComposer.h>
+#include <gui/Surface.h>
+#include <gui/SurfaceComposerClient.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
diff --git a/libs/gui/tests/Surface_test.cpp b/libs/gui/tests/Surface_test.cpp
index ea52750..b585d68 100644
--- a/libs/gui/tests/Surface_test.cpp
+++ b/libs/gui/tests/Surface_test.cpp
@@ -17,9 +17,9 @@
#include <gtest/gtest.h>
#include <binder/IMemory.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/Surface.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
+#include <gui/ISurfaceComposer.h>
+#include <gui/Surface.h>
+#include <gui/SurfaceComposerClient.h>
#include <utils/String8.h>
#include <private/gui/ComposerService.h>
diff --git a/libs/rs/driver/rsdGL.cpp b/libs/rs/driver/rsdGL.cpp
index 8033b08..1b12235 100644
--- a/libs/rs/driver/rsdGL.cpp
+++ b/libs/rs/driver/rsdGL.cpp
@@ -478,3 +478,37 @@ void rsdGLCheckError(const android::renderscript::Context *rsc,
}
}
+
+void rsdGLClearColor(const android::renderscript::Context *rsc,
+ float r, float g, float b, float a) {
+ RSD_CALL_GL(glClearColor, r, g, b, a);
+ RSD_CALL_GL(glClear, GL_COLOR_BUFFER_BIT);
+}
+
+void rsdGLClearDepth(const android::renderscript::Context *rsc, float v) {
+ RSD_CALL_GL(glClearDepthf, v);
+ RSD_CALL_GL(glClear, GL_DEPTH_BUFFER_BIT);
+}
+
+void rsdGLFinish(const android::renderscript::Context *rsc) {
+ RSD_CALL_GL(glFinish);
+}
+
+void rsdGLDrawQuadTexCoords(const android::renderscript::Context *rsc,
+ float x1, float y1, float z1, float u1, float v1,
+ float x2, float y2, float z2, float u2, float v2,
+ float x3, float y3, float z3, float u3, float v3,
+ float x4, float y4, float z4, float u4, float v4) {
+
+ float vtx[] = {x1,y1,z1, x2,y2,z2, x3,y3,z3, x4,y4,z4};
+ const float tex[] = {u1,v1, u2,v2, u3,v3, u4,v4};
+
+ RsdVertexArray::Attrib attribs[2];
+ attribs[0].set(GL_FLOAT, 3, 12, false, (uint32_t)vtx, "ATTRIB_position");
+ attribs[1].set(GL_FLOAT, 2, 8, false, (uint32_t)tex, "ATTRIB_texture0");
+
+ RsdVertexArray va(attribs, 2);
+ va.setup(rsc);
+
+ RSD_CALL_GL(glDrawArrays, GL_TRIANGLE_FAN, 0, 4);
+}
diff --git a/libs/rs/driver/rsdGL.h b/libs/rs/driver/rsdGL.h
index e015cb1..1e5b40f 100644
--- a/libs/rs/driver/rsdGL.h
+++ b/libs/rs/driver/rsdGL.h
@@ -84,6 +84,15 @@ void rsdGLCheckError(const android::renderscript::Context *rsc,
const char *msg, bool isFatal = false);
void rsdGLSetPriority(const android::renderscript::Context *rsc,
int32_t priority);
+void rsdGLClearColor(const android::renderscript::Context *rsc,
+ float r, float g, float b, float a);
+void rsdGLClearDepth(const android::renderscript::Context *rsc, float v);
+void rsdGLFinish(const android::renderscript::Context *rsc);
+void rsdGLDrawQuadTexCoords(const android::renderscript::Context *rsc,
+ float x1, float y1, float z1, float u1, float v1,
+ float x2, float y2, float z2, float u2, float v2,
+ float x3, float y3, float z3, float u3, float v3,
+ float x4, float y4, float z4, float u4, float v4);
#endif
diff --git a/libs/rs/driver/rsdRuntimeStubs.cpp b/libs/rs/driver/rsdRuntimeStubs.cpp
index 44bfb1c..aa9f159 100644
--- a/libs/rs/driver/rsdRuntimeStubs.cpp
+++ b/libs/rs/driver/rsdRuntimeStubs.cpp
@@ -257,17 +257,19 @@ static void SC_Color(float r, float g, float b, float a) {
static void SC_Finish() {
GET_TLS();
- rsrFinish(rsc, sc);
+ rsdGLFinish(rsc);
}
static void SC_ClearColor(float r, float g, float b, float a) {
GET_TLS();
- rsrClearColor(rsc, sc, r, g, b, a);
+ rsrPrepareClear(rsc, sc);
+ rsdGLClearColor(rsc, r, g, b, a);
}
static void SC_ClearDepth(float v) {
GET_TLS();
- rsrClearDepth(rsc, sc, v);
+ rsrPrepareClear(rsc, sc);
+ rsdGLClearDepth(rsc, v);
}
static uint32_t SC_GetWidth() {
diff --git a/libs/rs/rsRuntime.h b/libs/rs/rsRuntime.h
index 3bded62..64f2de8 100644
--- a/libs/rs/rsRuntime.h
+++ b/libs/rs/rsRuntime.h
@@ -86,7 +86,6 @@ void rsrMeshComputeBoundingBox(Context *, Script *, Mesh *,
void rsrColor(Context *, Script *, float r, float g, float b, float a);
-void rsrFinish(Context *, Script *);
void rsrAllocationSyncAll(Context *, Script *, Allocation *);
void rsrAllocationCopy1DRange(Context *, Allocation *dstAlloc,
@@ -103,8 +102,7 @@ void rsrAllocationCopy2DRange(Context *, Allocation *dstAlloc,
uint32_t srcXoff, uint32_t srcYoff,
uint32_t srcMip, uint32_t srcFace);
-void rsrClearColor(Context *, Script *, float r, float g, float b, float a);
-void rsrClearDepth(Context *, Script *, float v);
+void rsrPrepareClear(Context *, Script *);
uint32_t rsrGetWidth(Context *, Script *);
uint32_t rsrGetHeight(Context *, Script *);
void rsrDrawTextAlloc(Context *, Script *, Allocation *, int x, int y);
diff --git a/libs/rs/rsScriptC_LibGL.cpp b/libs/rs/rsScriptC_LibGL.cpp
index 97469d3..bda18fd 100644
--- a/libs/rs/rsScriptC_LibGL.cpp
+++ b/libs/rs/rsScriptC_LibGL.cpp
@@ -269,25 +269,9 @@ void rsrColor(Context *rsc, Script *sc, float r, float g, float b, float a) {
pf->setConstantColor(rsc, r, g, b, a);
}
-void rsrFinish(Context *rsc, Script *sc) {
- RSD_CALL_GL(glFinish);
-}
-
-
-void rsrClearColor(Context *rsc, Script *sc, float r, float g, float b, float a) {
+void rsrPrepareClear(Context *rsc, Script *sc) {
rsc->mFBOCache.setup(rsc);
rsc->setupProgramStore();
-
- RSD_CALL_GL(glClearColor, r, g, b, a);
- RSD_CALL_GL(glClear, GL_COLOR_BUFFER_BIT);
-}
-
-void rsrClearDepth(Context *rsc, Script *sc, float v) {
- rsc->mFBOCache.setup(rsc);
- rsc->setupProgramStore();
-
- RSD_CALL_GL(glClearDepthf, v);
- RSD_CALL_GL(glClear, GL_DEPTH_BUFFER_BIT);
}
uint32_t rsrGetWidth(Context *rsc, Script *sc) {
diff --git a/libs/rs/scriptc/rs_allocation.rsh b/libs/rs/scriptc/rs_allocation.rsh
index a2f69d9..89696b8 100644
--- a/libs/rs/scriptc/rs_allocation.rsh
+++ b/libs/rs/scriptc/rs_allocation.rsh
@@ -298,5 +298,67 @@ extern rs_data_kind __attribute__((overloadable))
extern uint32_t __attribute__((overloadable))
rsElementGetVectorSize(rs_element e);
+/**
+ * Fetch allocation in a way described by the sampler
+ * @param a 1D allocation to sample from
+ * @param s sampler state
+ * @param location to sample from
+ */
+extern const float4 __attribute__((overloadable))
+ rsSample(rs_allocation a, rs_sampler s, float location);
+/**
+ * Fetch allocation in a way described by the sampler
+ * @param a 1D allocation to sample from
+ * @param s sampler state
+ * @param location to sample from
+ * @param lod mip level to sample from, for fractional values
+ * mip levels will be interpolated if
+ * RS_SAMPLER_LINEAR_MIP_LINEAR is used
+ */
+extern const float4 __attribute__((overloadable))
+ rsSample(rs_allocation a, rs_sampler s, float location, float lod);
+
+/**
+ * Fetch allocation in a way described by the sampler
+ * @param a 2D allocation to sample from
+ * @param s sampler state
+ * @param location to sample from
+ */
+extern const float4 __attribute__((overloadable))
+ rsSample(rs_allocation a, rs_sampler s, float2 location);
+
+/**
+ * Fetch allocation in a way described by the sampler
+ * @param a 2D allocation to sample from
+ * @param s sampler state
+ * @param location to sample from
+ * @param lod mip level to sample from, for fractional values
+ * mip levels will be interpolated if
+ * RS_SAMPLER_LINEAR_MIP_LINEAR is used
+ */
+extern const float4 __attribute__((overloadable))
+ rsSample(rs_allocation a, rs_sampler s, float2 location, float lod);
+
+/**
+ * Fetch allocation in a way described by the sampler
+ * @param a 3D allocation to sample from
+ * @param s sampler state
+ * @param location to sample from
+ */
+extern const float4 __attribute__((overloadable))
+ rsSample(rs_allocation a, rs_sampler s, float3 location);
+
+/**
+ * Fetch allocation in a way described by the sampler
+ * @param a 3D allocation to sample from
+ * @param s sampler state
+ * @param location to sample from
+ * @param lod mip level to sample from, for fractional values
+ * mip levels will be interpolated if
+ * RS_SAMPLER_LINEAR_MIP_LINEAR is used
+ */
+extern const float4 __attribute__((overloadable))
+ rsSample(rs_allocation a, rs_sampler s, float3 location, float lod);
+
#endif
diff --git a/libs/rs/scriptc/rs_graphics.rsh b/libs/rs/scriptc/rs_graphics.rsh
index 7fdebdc..e3fde82 100644
--- a/libs/rs/scriptc/rs_graphics.rsh
+++ b/libs/rs/scriptc/rs_graphics.rsh
@@ -23,65 +23,6 @@
#ifndef __RS_GRAPHICS_RSH__
#define __RS_GRAPHICS_RSH__
-// These are API 15 once it get official
-typedef enum {
- RS_DEPTH_FUNC_ALWAYS,
- RS_DEPTH_FUNC_LESS,
- RS_DEPTH_FUNC_LEQUAL,
- RS_DEPTH_FUNC_GREATER,
- RS_DEPTH_FUNC_GEQUAL,
- RS_DEPTH_FUNC_EQUAL,
- RS_DEPTH_FUNC_NOTEQUAL,
-
- RS_DEPTH_FUNC_INVALID = 100,
-} rs_depth_func;
-
-typedef enum {
- RS_BLEND_SRC_ZERO, // 0
- RS_BLEND_SRC_ONE, // 1
- RS_BLEND_SRC_DST_COLOR, // 2
- RS_BLEND_SRC_ONE_MINUS_DST_COLOR, // 3
- RS_BLEND_SRC_SRC_ALPHA, // 4
- RS_BLEND_SRC_ONE_MINUS_SRC_ALPHA, // 5
- RS_BLEND_SRC_DST_ALPHA, // 6
- RS_BLEND_SRC_ONE_MINUS_DST_ALPHA, // 7
- RS_BLEND_SRC_SRC_ALPHA_SATURATE, // 8
-
- RS_BLEND_SRC_INVALID = 100,
-} rs_blend_src_func;
-
-typedef enum {
- RS_BLEND_DST_ZERO, // 0
- RS_BLEND_DST_ONE, // 1
- RS_BLEND_DST_SRC_COLOR, // 2
- RS_BLEND_DST_ONE_MINUS_SRC_COLOR, // 3
- RS_BLEND_DST_SRC_ALPHA, // 4
- RS_BLEND_DST_ONE_MINUS_SRC_ALPHA, // 5
- RS_BLEND_DST_DST_ALPHA, // 6
- RS_BLEND_DST_ONE_MINUS_DST_ALPHA, // 7
-
- RS_BLEND_DST_INVALID = 100,
-} rs_blend_dst_func;
-
-typedef enum {
- RS_CULL_BACK,
- RS_CULL_FRONT,
- RS_CULL_NONE,
-
- RS_CULL_INVALID = 100,
-} rs_cull_mode;
-
-typedef enum {
- RS_SAMPLER_NEAREST,
- RS_SAMPLER_LINEAR,
- RS_SAMPLER_LINEAR_MIP_LINEAR,
- RS_SAMPLER_WRAP,
- RS_SAMPLER_CLAMP,
- RS_SAMPLER_LINEAR_MIP_NEAREST,
-
- RS_SAMPLER_INVALID = 100,
-} rs_sampler_value;
-
#if (defined(RS_VERSION) && (RS_VERSION >= 14))
/**
* Set the color target used for all subsequent rendering calls
diff --git a/libs/rs/scriptc/rs_types.rsh b/libs/rs/scriptc/rs_types.rsh
index 5345a48..f8c2657 100644
--- a/libs/rs/scriptc/rs_types.rsh
+++ b/libs/rs/scriptc/rs_types.rsh
@@ -407,14 +407,14 @@ typedef enum {
*
**/
typedef enum {
- RS_PRIMITIVE_POINT,
- RS_PRIMITIVE_LINE,
- RS_PRIMITIVE_LINE_STRIP,
- RS_PRIMITIVE_TRIANGLE,
- RS_PRIMITIVE_TRIANGLE_STRIP,
- RS_PRIMITIVE_TRIANGLE_FAN,
-
- RS_PRIMITIVE_INVALID = 100,
+ RS_PRIMITIVE_POINT = 0,
+ RS_PRIMITIVE_LINE = 1,
+ RS_PRIMITIVE_LINE_STRIP = 2,
+ RS_PRIMITIVE_TRIANGLE = 3,
+ RS_PRIMITIVE_TRIANGLE_STRIP = 4,
+ RS_PRIMITIVE_TRIANGLE_FAN = 5,
+
+ RS_PRIMITIVE_INVALID = 100,
} rs_primitive;
/**
@@ -436,41 +436,41 @@ typedef enum {
* RS_* objects. 32 bit opaque handles.
*/
typedef enum {
- RS_TYPE_NONE,
+ RS_TYPE_NONE = 0,
//RS_TYPE_FLOAT_16,
- RS_TYPE_FLOAT_32 = 2,
- RS_TYPE_FLOAT_64,
- RS_TYPE_SIGNED_8,
- RS_TYPE_SIGNED_16,
- RS_TYPE_SIGNED_32,
- RS_TYPE_SIGNED_64,
- RS_TYPE_UNSIGNED_8,
- RS_TYPE_UNSIGNED_16,
- RS_TYPE_UNSIGNED_32,
- RS_TYPE_UNSIGNED_64,
-
- RS_TYPE_BOOLEAN,
-
- RS_TYPE_UNSIGNED_5_6_5,
- RS_TYPE_UNSIGNED_5_5_5_1,
- RS_TYPE_UNSIGNED_4_4_4_4,
-
- RS_TYPE_MATRIX_4X4,
- RS_TYPE_MATRIX_3X3,
- RS_TYPE_MATRIX_2X2,
-
- RS_TYPE_ELEMENT = 1000,
- RS_TYPE_TYPE,
- RS_TYPE_ALLOCATION,
- RS_TYPE_SAMPLER,
- RS_TYPE_SCRIPT,
- RS_TYPE_MESH,
- RS_TYPE_PROGRAM_FRAGMENT,
- RS_TYPE_PROGRAM_VERTEX,
- RS_TYPE_PROGRAM_RASTER,
- RS_TYPE_PROGRAM_STORE,
-
- RS_TYPE_INVALID = 10000,
+ RS_TYPE_FLOAT_32 = 2,
+ RS_TYPE_FLOAT_64 = 3,
+ RS_TYPE_SIGNED_8 = 4,
+ RS_TYPE_SIGNED_16 = 5,
+ RS_TYPE_SIGNED_32 = 6,
+ RS_TYPE_SIGNED_64 = 7,
+ RS_TYPE_UNSIGNED_8 = 8,
+ RS_TYPE_UNSIGNED_16 = 9,
+ RS_TYPE_UNSIGNED_32 = 10,
+ RS_TYPE_UNSIGNED_64 = 11,
+
+ RS_TYPE_BOOLEAN = 12,
+
+ RS_TYPE_UNSIGNED_5_6_5 = 13,
+ RS_TYPE_UNSIGNED_5_5_5_1 = 14,
+ RS_TYPE_UNSIGNED_4_4_4_4 = 15,
+
+ RS_TYPE_MATRIX_4X4 = 16,
+ RS_TYPE_MATRIX_3X3 = 17,
+ RS_TYPE_MATRIX_2X2 = 18,
+
+ RS_TYPE_ELEMENT = 1000,
+ RS_TYPE_TYPE = 1001,
+ RS_TYPE_ALLOCATION = 1002,
+ RS_TYPE_SAMPLER = 1003,
+ RS_TYPE_SCRIPT = 1004,
+ RS_TYPE_MESH = 1005,
+ RS_TYPE_PROGRAM_FRAGMENT = 1006,
+ RS_TYPE_PROGRAM_VERTEX = 1007,
+ RS_TYPE_PROGRAM_RASTER = 1008,
+ RS_TYPE_PROGRAM_STORE = 1009,
+
+ RS_TYPE_INVALID = 10000,
} rs_data_type;
/**
@@ -482,16 +482,74 @@ typedef enum {
* representing texture formats.
*/
typedef enum {
- RS_KIND_USER,
+ RS_KIND_USER = 0,
- RS_KIND_PIXEL_L = 7,
- RS_KIND_PIXEL_A,
- RS_KIND_PIXEL_LA,
- RS_KIND_PIXEL_RGB,
- RS_KIND_PIXEL_RGBA,
- RS_KIND_PIXEL_DEPTH,
+ RS_KIND_PIXEL_L = 7,
+ RS_KIND_PIXEL_A = 8,
+ RS_KIND_PIXEL_LA = 9,
+ RS_KIND_PIXEL_RGB = 10,
+ RS_KIND_PIXEL_RGBA = 11,
+ RS_KIND_PIXEL_DEPTH = 12,
- RS_KIND_INVALID = 100,
+ RS_KIND_INVALID = 100,
} rs_data_kind;
+typedef enum {
+ RS_DEPTH_FUNC_ALWAYS = 0,
+ RS_DEPTH_FUNC_LESS = 1,
+ RS_DEPTH_FUNC_LEQUAL = 2,
+ RS_DEPTH_FUNC_GREATER = 3,
+ RS_DEPTH_FUNC_GEQUAL = 4,
+ RS_DEPTH_FUNC_EQUAL = 5,
+ RS_DEPTH_FUNC_NOTEQUAL = 6,
+
+ RS_DEPTH_FUNC_INVALID = 100,
+} rs_depth_func;
+
+typedef enum {
+ RS_BLEND_SRC_ZERO = 0,
+ RS_BLEND_SRC_ONE = 1,
+ RS_BLEND_SRC_DST_COLOR = 2,
+ RS_BLEND_SRC_ONE_MINUS_DST_COLOR = 3,
+ RS_BLEND_SRC_SRC_ALPHA = 4,
+ RS_BLEND_SRC_ONE_MINUS_SRC_ALPHA = 5,
+ RS_BLEND_SRC_DST_ALPHA = 6,
+ RS_BLEND_SRC_ONE_MINUS_DST_ALPHA = 7,
+ RS_BLEND_SRC_SRC_ALPHA_SATURATE = 8,
+
+ RS_BLEND_SRC_INVALID = 100,
+} rs_blend_src_func;
+
+typedef enum {
+ RS_BLEND_DST_ZERO = 0,
+ RS_BLEND_DST_ONE = 1,
+ RS_BLEND_DST_SRC_COLOR = 2,
+ RS_BLEND_DST_ONE_MINUS_SRC_COLOR = 3,
+ RS_BLEND_DST_SRC_ALPHA = 4,
+ RS_BLEND_DST_ONE_MINUS_SRC_ALPHA = 5,
+ RS_BLEND_DST_DST_ALPHA = 6,
+ RS_BLEND_DST_ONE_MINUS_DST_ALPHA = 7,
+
+ RS_BLEND_DST_INVALID = 100,
+} rs_blend_dst_func;
+
+typedef enum {
+ RS_CULL_BACK = 0,
+ RS_CULL_FRONT = 1,
+ RS_CULL_NONE = 2,
+
+ RS_CULL_INVALID = 100,
+} rs_cull_mode;
+
+typedef enum {
+ RS_SAMPLER_NEAREST = 0,
+ RS_SAMPLER_LINEAR = 1,
+ RS_SAMPLER_LINEAR_MIP_LINEAR = 2,
+ RS_SAMPLER_WRAP = 3,
+ RS_SAMPLER_CLAMP = 4,
+ RS_SAMPLER_LINEAR_MIP_NEAREST = 5,
+
+ RS_SAMPLER_INVALID = 100,
+} rs_sampler_value;
+
#endif
diff --git a/libs/surfaceflinger_client/Android.mk b/libs/surfaceflinger_client/Android.mk
deleted file mode 100644
index 5fca1ce..0000000
--- a/libs/surfaceflinger_client/Android.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=
-
-LOCAL_SHARED_LIBRARIES :=
-
-LOCAL_MODULE:= libsurfaceflinger_client
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/libs/utils/Android.mk b/libs/utils/Android.mk
index a96c8e6..57c048a 100644
--- a/libs/utils/Android.mk
+++ b/libs/utils/Android.mk
@@ -77,7 +77,8 @@ include $(CLEAR_VARS)
# we have the common sources, plus some device-specific stuff
LOCAL_SRC_FILES:= \
$(commonSources) \
- Looper.cpp
+ Looper.cpp \
+ Trace.cpp
ifeq ($(TARGET_OS),linux)
LOCAL_LDLIBS += -lrt -ldl
diff --git a/libs/utils/BlobCache.cpp b/libs/utils/BlobCache.cpp
index e52cf2f..be398ee 100644
--- a/libs/utils/BlobCache.cpp
+++ b/libs/utils/BlobCache.cpp
@@ -183,7 +183,7 @@ size_t BlobCache::getFdCount() const {
status_t BlobCache::flatten(void* buffer, size_t size, int fds[], size_t count)
const {
if (count != 0) {
- ALOGE("flatten: nonzero fd count: %d", count);
+ ALOGE("flatten: nonzero fd count: %zu", count);
return BAD_VALUE;
}
@@ -234,7 +234,7 @@ status_t BlobCache::unflatten(void const* buffer, size_t size, int fds[],
mCacheEntries.clear();
if (count != 0) {
- ALOGE("unflatten: nonzero fd count: %d", count);
+ ALOGE("unflatten: nonzero fd count: %zu", count);
return BAD_VALUE;
}
diff --git a/libs/utils/Debug.cpp b/libs/utils/Debug.cpp
index f7988ec..e8ac983 100644
--- a/libs/utils/Debug.cpp
+++ b/libs/utils/Debug.cpp
@@ -199,7 +199,7 @@ void printHexData(int32_t indent, const void *buf, size_t length,
if ((int32_t)length < 0) {
if (singleLineBytesCutoff < 0) func(cookie, "\n");
char buf[64];
- sprintf(buf, "(bad length: %d)", length);
+ sprintf(buf, "(bad length: %zu)", length);
func(cookie, buf);
return;
}
diff --git a/libs/utils/Static.cpp b/libs/utils/Static.cpp
index bfcb2da..624e917 100644
--- a/libs/utils/Static.cpp
+++ b/libs/utils/Static.cpp
@@ -57,8 +57,8 @@ protected:
virtual status_t writeLines(const struct iovec& vec, size_t N)
{
//android_writevLog(&vec, N); <-- this is now a no-op
- if (N != 1) ALOGI("WARNING: writeLines N=%d\n", N);
- ALOGI("%.*s", vec.iov_len, (const char*) vec.iov_base);
+ if (N != 1) ALOGI("WARNING: writeLines N=%zu\n", N);
+ ALOGI("%.*s", (int)vec.iov_len, (const char*) vec.iov_base);
return NO_ERROR;
}
};
diff --git a/libs/utils/StopWatch.cpp b/libs/utils/StopWatch.cpp
index 595aec3..b1708d6 100644
--- a/libs/utils/StopWatch.cpp
+++ b/libs/utils/StopWatch.cpp
@@ -20,6 +20,10 @@
#include <stdlib.h>
#include <stdio.h>
+/* for PRId64 */
+#define __STDC_FORMAT_MACROS 1
+#include <inttypes.h>
+
#include <utils/Log.h>
#include <utils/Errors.h>
#include <utils/StopWatch.h>
@@ -39,11 +43,11 @@ StopWatch::~StopWatch()
{
nsecs_t elapsed = elapsedTime();
const int n = mNumLaps;
- ALOGD("StopWatch %s (us): %lld ", mName, ns2us(elapsed));
+ ALOGD("StopWatch %s (us): %" PRId64 " ", mName, ns2us(elapsed));
for (int i=0 ; i<n ; i++) {
const nsecs_t soFar = mLaps[i].soFar;
const nsecs_t thisLap = mLaps[i].thisLap;
- ALOGD(" [%d: %lld, %lld]", i, ns2us(soFar), ns2us(thisLap));
+ ALOGD(" [%d: %" PRId64 ", %" PRId64, i, ns2us(soFar), ns2us(thisLap));
}
}
diff --git a/libs/utils/Trace.cpp b/libs/utils/Trace.cpp
new file mode 100644
index 0000000..c49278a
--- /dev/null
+++ b/libs/utils/Trace.cpp
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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 <cutils/properties.h>
+#include <utils/Log.h>
+#include <utils/Trace.h>
+
+namespace android {
+
+volatile int32_t Tracer::sIsReady = 0;
+int Tracer::sTraceFD = -1;
+uint64_t Tracer::sEnabledTags = 0;
+Mutex Tracer::sMutex;
+
+void Tracer::init() {
+ Mutex::Autolock lock(sMutex);
+
+ if (!sIsReady) {
+ const char* const traceFileName =
+ "/sys/kernel/debug/tracing/trace_marker";
+ sTraceFD = open(traceFileName, O_WRONLY);
+ if (sTraceFD == -1) {
+ ALOGE("error opening trace file: %s (%d)", strerror(errno), errno);
+ } else {
+ char value[PROPERTY_VALUE_MAX];
+ property_get("atrace.tags.enableflags", value, "0");
+ sEnabledTags = strtoll(value, NULL, 0) | ATRACE_TAG_ALWAYS;
+ }
+
+ android_atomic_release_store(1, &sIsReady);
+ }
+}
+
+} // namespace andoid
diff --git a/media/jni/android_media_MediaCodec.cpp b/media/jni/android_media_MediaCodec.cpp
index 43ca263..71e698f 100644
--- a/media/jni/android_media_MediaCodec.cpp
+++ b/media/jni/android_media_MediaCodec.cpp
@@ -26,13 +26,15 @@
#include "jni.h"
#include "JNIHelp.h"
+#include <gui/Surface.h>
+#include <gui/SurfaceTextureClient.h>
+
#include <media/stagefright/MediaCodec.h>
#include <media/stagefright/foundation/ABuffer.h>
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/foundation/ALooper.h>
#include <media/stagefright/foundation/AMessage.h>
#include <media/stagefright/MediaErrors.h>
-#include <surfaceflinger/Surface.h>
namespace android {
@@ -82,7 +84,7 @@ status_t JMediaCodec::initCheck() const {
}
JMediaCodec::~JMediaCodec() {
- mCodec->stop();
+ mCodec->release();
JNIEnv *env = AndroidRuntime::getJNIEnv();
diff --git a/media/jni/android_media_MediaPlayer.cpp b/media/jni/android_media_MediaPlayer.cpp
index 199d56e4..f3a5668 100644
--- a/media/jni/android_media_MediaPlayer.cpp
+++ b/media/jni/android_media_MediaPlayer.cpp
@@ -39,7 +39,7 @@
#include "android_util_Binder.h"
#include <binder/Parcel.h>
#include <gui/ISurfaceTexture.h>
-#include <surfaceflinger/Surface.h>
+#include <gui/Surface.h>
#include <binder/IPCThreadState.h>
#include <binder/IServiceManager.h>
diff --git a/media/jni/android_media_MediaRecorder.cpp b/media/jni/android_media_MediaRecorder.cpp
index acc65f1..b6e6ceb 100644
--- a/media/jni/android_media_MediaRecorder.cpp
+++ b/media/jni/android_media_MediaRecorder.cpp
@@ -18,7 +18,7 @@
#define LOG_TAG "MediaRecorderJNI"
#include <utils/Log.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
+#include <gui/Surface.h>
#include <camera/ICameraService.h>
#include <camera/Camera.h>
#include <media/mediarecorder.h>
diff --git a/media/jni/mediaeditor/VideoEditorMain.cpp b/media/jni/mediaeditor/VideoEditorMain.cpp
index c84a883..b0c1c35 100755
--- a/media/jni/mediaeditor/VideoEditorMain.cpp
+++ b/media/jni/mediaeditor/VideoEditorMain.cpp
@@ -29,8 +29,7 @@
#include <VideoEditorThumbnailMain.h>
#include <M4OSA_Debug.h>
#include <M4xVSS_Internal.h>
-#include <surfaceflinger/Surface.h>
-#include <surfaceflinger/ISurface.h>
+#include <gui/Surface.h>
#include "VideoEditorPreviewController.h"
#include "VideoEditorMain.h"
diff --git a/media/libeffects/preprocessing/PreProcessing.cpp b/media/libeffects/preprocessing/PreProcessing.cpp
index 098a1a2..dc27d38 100755
--- a/media/libeffects/preprocessing/PreProcessing.cpp
+++ b/media/libeffects/preprocessing/PreProcessing.cpp
@@ -845,6 +845,17 @@ int Session_SetConfig(preproc_session_t *session, effect_config_t *config)
config->inputCfg.samplingRate, config->inputCfg.channels);
int status;
+ // if at least one process is enabled, do not accept configuration changes
+ if (session->enabledMsk) {
+ if (session->samplingRate != config->inputCfg.samplingRate ||
+ session->inChannelCount != inCnl ||
+ session->outChannelCount != outCnl) {
+ return -ENOSYS;
+ } else {
+ return 0;
+ }
+ }
+
// AEC implementation is limited to 16kHz
if (config->inputCfg.samplingRate >= 32000 && !(session->createdMsk & (1 << PREPROC_AEC))) {
session->apmSamplingRate = 32000;
@@ -1287,7 +1298,9 @@ int PreProcessingFx_Command(effect_handle_t self,
if (*(int *)pReplyData != 0) {
break;
}
- *(int *)pReplyData = Effect_SetState(effect, PREPROC_EFFECT_STATE_CONFIG);
+ if (effect->state != PREPROC_EFFECT_STATE_ACTIVE) {
+ *(int *)pReplyData = Effect_SetState(effect, PREPROC_EFFECT_STATE_CONFIG);
+ }
break;
case EFFECT_CMD_GET_CONFIG:
diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp
index a4068ff..943f3af 100644
--- a/media/libmedia/AudioRecord.cpp
+++ b/media/libmedia/AudioRecord.cpp
@@ -307,7 +307,7 @@ status_t AudioRecord::start()
pid_t tid;
if (t != 0) {
mReadyToRun = WOULD_BLOCK;
- t->run("ClientRecordThread", ANDROID_PRIORITY_AUDIO);
+ t->run("AudioRecord", ANDROID_PRIORITY_AUDIO);
tid = t->getTid(); // pid_t is unknown until run()
ALOGV("getTid=%d", tid);
if (tid == -1) {
@@ -386,7 +386,7 @@ bool AudioRecord::stopped() const
return !mActive;
}
-uint32_t AudioRecord::getSampleRate()
+uint32_t AudioRecord::getSampleRate() const
{
AutoMutex lock(mLock);
return mCblk->sampleRate;
@@ -402,7 +402,7 @@ status_t AudioRecord::setMarkerPosition(uint32_t marker)
return NO_ERROR;
}
-status_t AudioRecord::getMarkerPosition(uint32_t *marker)
+status_t AudioRecord::getMarkerPosition(uint32_t *marker) const
{
if (marker == NULL) return BAD_VALUE;
@@ -423,7 +423,7 @@ status_t AudioRecord::setPositionUpdatePeriod(uint32_t updatePeriod)
return NO_ERROR;
}
-status_t AudioRecord::getPositionUpdatePeriod(uint32_t *updatePeriod)
+status_t AudioRecord::getPositionUpdatePeriod(uint32_t *updatePeriod) const
{
if (updatePeriod == NULL) return BAD_VALUE;
@@ -432,7 +432,7 @@ status_t AudioRecord::getPositionUpdatePeriod(uint32_t *updatePeriod)
return NO_ERROR;
}
-status_t AudioRecord::getPosition(uint32_t *position)
+status_t AudioRecord::getPosition(uint32_t *position) const
{
if (position == NULL) return BAD_VALUE;
@@ -442,7 +442,7 @@ status_t AudioRecord::getPosition(uint32_t *position)
return NO_ERROR;
}
-unsigned int AudioRecord::getInputFramesLost()
+unsigned int AudioRecord::getInputFramesLost() const
{
if (mActive)
return AudioSystem::getInputFramesLost(mInput);
@@ -597,7 +597,7 @@ void AudioRecord::releaseBuffer(Buffer* audioBuffer)
mCblk->stepUser(audioBuffer->frameCount);
}
-audio_io_handle_t AudioRecord::getInput()
+audio_io_handle_t AudioRecord::getInput() const
{
AutoMutex lock(mLock);
return mInput;
@@ -615,7 +615,7 @@ audio_io_handle_t AudioRecord::getInput_l()
return mInput;
}
-int AudioRecord::getSessionId()
+int AudioRecord::getSessionId() const
{
return mSessionId;
}
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index 74c97ed..4890f05 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -370,7 +370,7 @@ void AudioTrack::start()
android_atomic_and(~CBLK_DISABLED_ON, &cblk->flags);
pid_t tid;
if (t != 0) {
- t->run("AudioTrackThread", ANDROID_PRIORITY_AUDIO);
+ t->run("AudioTrack", ANDROID_PRIORITY_AUDIO);
tid = t->getTid(); // pid_t is unknown until run()
ALOGV("getTid=%d", tid);
if (tid == -1) {
diff --git a/media/libmedia/IMediaPlayer.cpp b/media/libmedia/IMediaPlayer.cpp
index 64cc919..86d65db 100644
--- a/media/libmedia/IMediaPlayer.cpp
+++ b/media/libmedia/IMediaPlayer.cpp
@@ -23,8 +23,6 @@
#include <media/IMediaPlayer.h>
#include <media/IStreamSource.h>
-#include <surfaceflinger/ISurface.h>
-#include <surfaceflinger/Surface.h>
#include <gui/ISurfaceTexture.h>
#include <utils/String8.h>
diff --git a/media/libmedia/IMediaRecorder.cpp b/media/libmedia/IMediaRecorder.cpp
index 42f55c2..2f4e31a 100644
--- a/media/libmedia/IMediaRecorder.cpp
+++ b/media/libmedia/IMediaRecorder.cpp
@@ -19,10 +19,10 @@
#define LOG_TAG "IMediaRecorder"
#include <utils/Log.h>
#include <binder/Parcel.h>
-#include <surfaceflinger/Surface.h>
#include <camera/ICamera.h>
#include <media/IMediaRecorderClient.h>
#include <media/IMediaRecorder.h>
+#include <gui/Surface.h>
#include <gui/ISurfaceTexture.h>
#include <unistd.h>
diff --git a/media/libmedia/IOMX.cpp b/media/libmedia/IOMX.cpp
index 27c7e03..48e427a 100644
--- a/media/libmedia/IOMX.cpp
+++ b/media/libmedia/IOMX.cpp
@@ -22,8 +22,6 @@
#include <binder/Parcel.h>
#include <media/IOMX.h>
#include <media/stagefright/foundation/ADebug.h>
-#include <surfaceflinger/ISurface.h>
-#include <surfaceflinger/Surface.h>
namespace android {
diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp
index 250425b..9d45907 100644
--- a/media/libmedia/mediaplayer.cpp
+++ b/media/libmedia/mediaplayer.cpp
@@ -32,8 +32,6 @@
#include <media/mediaplayer.h>
#include <media/AudioSystem.h>
-#include <surfaceflinger/Surface.h>
-
#include <binder/MemoryBase.h>
#include <utils/KeyedVector.h>
diff --git a/media/libmedia/mediarecorder.cpp b/media/libmedia/mediarecorder.cpp
index 8d947d8..cc73014 100644
--- a/media/libmedia/mediarecorder.cpp
+++ b/media/libmedia/mediarecorder.cpp
@@ -18,7 +18,6 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "MediaRecorder"
#include <utils/Log.h>
-#include <surfaceflinger/Surface.h>
#include <media/mediarecorder.h>
#include <binder/IServiceManager.h>
#include <utils/String8.h>
diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp
index c5f4f86..ca79657 100644
--- a/media/libmediaplayerservice/StagefrightRecorder.cpp
+++ b/media/libmediaplayerservice/StagefrightRecorder.cpp
@@ -40,7 +40,7 @@
#include <media/MediaProfiles.h>
#include <camera/ICamera.h>
#include <camera/CameraParameters.h>
-#include <surfaceflinger/Surface.h>
+#include <gui/Surface.h>
#include <utils/Errors.h>
#include <sys/types.h>
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
index dec1c08c..e618f67 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -38,7 +38,6 @@
#include <media/stagefright/MediaDefs.h>
#include <media/stagefright/MediaErrors.h>
#include <media/stagefright/MetaData.h>
-#include <surfaceflinger/Surface.h>
#include <gui/ISurfaceTexture.h>
#include "avc_utils.h"
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.h b/media/libmediaplayerservice/nuplayer/NuPlayer.h
index ffc710e..6be14be 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.h
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.h
@@ -21,8 +21,6 @@
#include <media/MediaPlayerInterface.h>
#include <media/stagefright/foundation/AHandler.h>
#include <media/stagefright/NativeWindowWrapper.h>
-#include <gui/SurfaceTextureClient.h>
-#include <surfaceflinger/Surface.h>
namespace android {
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp
index 2a51829..460fc98 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp
@@ -29,8 +29,6 @@
#include <media/stagefright/MediaDefs.h>
#include <media/stagefright/MetaData.h>
#include <media/stagefright/Utils.h>
-#include <surfaceflinger/Surface.h>
-#include <gui/ISurfaceTexture.h>
namespace android {
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index c91fbe6..9a9d094 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -31,9 +31,6 @@
#include <media/stagefright/OMXClient.h>
#include <media/stagefright/OMXCodec.h>
-#include <surfaceflinger/Surface.h>
-#include <gui/SurfaceTextureClient.h>
-
#include <OMX_Component.h>
namespace android {
@@ -168,18 +165,36 @@ struct ACodec::UninitializedState : public ACodec::BaseState {
protected:
virtual bool onMessageReceived(const sp<AMessage> &msg);
+ virtual void stateEntered();
private:
void onSetup(const sp<AMessage> &msg);
- void onAllocateComponent(const sp<AMessage> &msg);
- void onConfigureComponent(const sp<AMessage> &msg);
- void onStart();
+ bool onAllocateComponent(const sp<AMessage> &msg);
DISALLOW_EVIL_CONSTRUCTORS(UninitializedState);
};
////////////////////////////////////////////////////////////////////////////////
+struct ACodec::LoadedState : public ACodec::BaseState {
+ LoadedState(ACodec *codec);
+
+protected:
+ virtual bool onMessageReceived(const sp<AMessage> &msg);
+ virtual void stateEntered();
+
+private:
+ friend struct ACodec::UninitializedState;
+
+ bool onConfigureComponent(const sp<AMessage> &msg);
+ void onStart();
+ void onShutdown(bool keepComponentAllocated);
+
+ DISALLOW_EVIL_CONSTRUCTORS(LoadedState);
+};
+
+////////////////////////////////////////////////////////////////////////////////
+
struct ACodec::LoadedToIdleState : public ACodec::BaseState {
LoadedToIdleState(ACodec *codec);
@@ -315,8 +330,10 @@ private:
ACodec::ACodec()
: mNode(NULL),
mSentFormat(false),
- mIsEncoder(false) {
+ mIsEncoder(false),
+ mShutdownInProgress(false) {
mUninitializedState = new UninitializedState(this);
+ mLoadedState = new LoadedState(this);
mLoadedToIdleState = new LoadedToIdleState(this);
mIdleToExecutingState = new IdleToExecutingState(this);
mExecutingState = new ExecutingState(this);
@@ -372,8 +389,10 @@ void ACodec::signalResume() {
(new AMessage(kWhatResume, id()))->post();
}
-void ACodec::initiateShutdown() {
- (new AMessage(kWhatShutdown, id()))->post();
+void ACodec::initiateShutdown(bool keepComponentAllocated) {
+ sp<AMessage> msg = new AMessage(kWhatShutdown, id());
+ msg->setInt32("keepComponentAllocated", keepComponentAllocated);
+ msg->post();
}
status_t ACodec::allocateBuffersOnPort(OMX_U32 portIndex) {
@@ -2495,6 +2514,10 @@ ACodec::UninitializedState::UninitializedState(ACodec *codec)
: BaseState(codec) {
}
+void ACodec::UninitializedState::stateEntered() {
+ ALOGV("Now uninitialized");
+}
+
bool ACodec::UninitializedState::onMessageReceived(const sp<AMessage> &msg) {
bool handled = false;
@@ -2514,22 +2537,13 @@ bool ACodec::UninitializedState::onMessageReceived(const sp<AMessage> &msg) {
break;
}
- case ACodec::kWhatConfigureComponent:
- {
- onConfigureComponent(msg);
- handled = true;
- break;
- }
-
- case ACodec::kWhatStart:
- {
- onStart();
- handled = true;
- break;
- }
-
case ACodec::kWhatShutdown:
{
+ int32_t keepComponentAllocated;
+ CHECK(msg->findInt32(
+ "keepComponentAllocated", &keepComponentAllocated));
+ CHECK(!keepComponentAllocated);
+
sp<AMessage> notify = mCodec->mNotify->dup();
notify->setInt32("what", ACodec::kWhatShutdownCompleted);
notify->post();
@@ -2557,22 +2571,16 @@ bool ACodec::UninitializedState::onMessageReceived(const sp<AMessage> &msg) {
void ACodec::UninitializedState::onSetup(
const sp<AMessage> &msg) {
- onAllocateComponent(msg);
- onConfigureComponent(msg);
- onStart();
+ if (onAllocateComponent(msg)
+ && mCodec->mLoadedState->onConfigureComponent(msg)) {
+ mCodec->mLoadedState->onStart();
+ }
}
-void ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) {
+bool ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) {
ALOGV("onAllocateComponent");
- if (mCodec->mNode != NULL) {
- CHECK_EQ(mCodec->mOMX->freeNode(mCodec->mNode), (status_t)OK);
-
- mCodec->mNativeWindow.clear();
- mCodec->mNode = NULL;
- mCodec->mOMX.clear();
- mCodec->mComponentName.clear();
- }
+ CHECK(mCodec->mNode == NULL);
OMXClient client;
CHECK_EQ(client.connect(), (status_t)OK);
@@ -2631,7 +2639,7 @@ void ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) {
}
mCodec->signalError(OMX_ErrorComponentNotFound);
- return;
+ return false;
}
sp<AMessage> notify = new AMessage(kWhatOMXMessage, mCodec->id());
@@ -2652,9 +2660,96 @@ void ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) {
notify->setString("componentName", mCodec->mComponentName.c_str());
notify->post();
}
+
+ mCodec->changeState(mCodec->mLoadedState);
+
+ return true;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+ACodec::LoadedState::LoadedState(ACodec *codec)
+ : BaseState(codec) {
+}
+
+void ACodec::LoadedState::stateEntered() {
+ ALOGV("[%s] Now Loaded", mCodec->mComponentName.c_str());
+
+ if (mCodec->mShutdownInProgress) {
+ bool keepComponentAllocated = mCodec->mKeepComponentAllocated;
+
+ mCodec->mShutdownInProgress = false;
+ mCodec->mKeepComponentAllocated = false;
+
+ onShutdown(keepComponentAllocated);
+ }
+}
+
+void ACodec::LoadedState::onShutdown(bool keepComponentAllocated) {
+ if (!keepComponentAllocated) {
+ CHECK_EQ(mCodec->mOMX->freeNode(mCodec->mNode), (status_t)OK);
+
+ mCodec->mNativeWindow.clear();
+ mCodec->mNode = NULL;
+ mCodec->mOMX.clear();
+ mCodec->mComponentName.clear();
+
+ mCodec->changeState(mCodec->mUninitializedState);
+ }
+
+ sp<AMessage> notify = mCodec->mNotify->dup();
+ notify->setInt32("what", ACodec::kWhatShutdownCompleted);
+ notify->post();
}
-void ACodec::UninitializedState::onConfigureComponent(
+bool ACodec::LoadedState::onMessageReceived(const sp<AMessage> &msg) {
+ bool handled = false;
+
+ switch (msg->what()) {
+ case ACodec::kWhatConfigureComponent:
+ {
+ onConfigureComponent(msg);
+ handled = true;
+ break;
+ }
+
+ case ACodec::kWhatStart:
+ {
+ onStart();
+ handled = true;
+ break;
+ }
+
+ case ACodec::kWhatShutdown:
+ {
+ int32_t keepComponentAllocated;
+ CHECK(msg->findInt32(
+ "keepComponentAllocated", &keepComponentAllocated));
+
+ onShutdown(keepComponentAllocated);
+
+ handled = true;
+ break;
+ }
+
+ case ACodec::kWhatFlush:
+ {
+ sp<AMessage> notify = mCodec->mNotify->dup();
+ notify->setInt32("what", ACodec::kWhatFlushCompleted);
+ notify->post();
+
+ handled = true;
+ break;
+ }
+
+ default:
+ return BaseState::onMessageReceived(msg);
+ }
+
+ return handled;
+}
+
+bool ACodec::LoadedState::onConfigureComponent(
const sp<AMessage> &msg) {
ALOGV("onConfigureComponent");
@@ -2667,7 +2762,7 @@ void ACodec::UninitializedState::onConfigureComponent(
if (err != OK) {
mCodec->signalError(OMX_ErrorUndefined, err);
- return;
+ return false;
}
sp<RefBase> obj;
@@ -2685,9 +2780,11 @@ void ACodec::UninitializedState::onConfigureComponent(
notify->setInt32("what", ACodec::kWhatComponentConfigured);
notify->post();
}
+
+ return true;
}
-void ACodec::UninitializedState::onStart() {
+void ACodec::LoadedState::onStart() {
ALOGV("onStart");
CHECK_EQ(mCodec->mOMX->sendCommand(
@@ -2876,6 +2973,13 @@ bool ACodec::ExecutingState::onMessageReceived(const sp<AMessage> &msg) {
switch (msg->what()) {
case kWhatShutdown:
{
+ int32_t keepComponentAllocated;
+ CHECK(msg->findInt32(
+ "keepComponentAllocated", &keepComponentAllocated));
+
+ mCodec->mShutdownInProgress = true;
+ mCodec->mKeepComponentAllocated = keepComponentAllocated;
+
mActive = false;
CHECK_EQ(mCodec->mOMX->sendCommand(
@@ -3213,20 +3317,7 @@ bool ACodec::IdleToLoadedState::onOMXEvent(
CHECK_EQ(data1, (OMX_U32)OMX_CommandStateSet);
CHECK_EQ(data2, (OMX_U32)OMX_StateLoaded);
- ALOGV("[%s] Now Loaded", mCodec->mComponentName.c_str());
-
- CHECK_EQ(mCodec->mOMX->freeNode(mCodec->mNode), (status_t)OK);
-
- mCodec->mNativeWindow.clear();
- mCodec->mNode = NULL;
- mCodec->mOMX.clear();
- mCodec->mComponentName.clear();
-
- mCodec->changeState(mCodec->mUninitializedState);
-
- sp<AMessage> notify = mCodec->mNotify->dup();
- notify->setInt32("what", ACodec::kWhatShutdownCompleted);
- notify->post();
+ mCodec->changeState(mCodec->mLoadedState);
return true;
}
diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk
index cfb1e29..95bcada 100644
--- a/media/libstagefright/Android.mk
+++ b/media/libstagefright/Android.mk
@@ -58,6 +58,7 @@ LOCAL_SRC_FILES:= \
LOCAL_C_INCLUDES:= \
$(JNI_H_INCLUDE) \
$(TOP)/frameworks/base/include/media/stagefright/openmax \
+ $(TOP)/frameworks/base/include/media/stagefright/timedtext \
$(TOP)/external/flac/include \
$(TOP)/external/tremolo \
$(TOP)/external/openssl/include \
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 70945e3..b21e86a 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -30,13 +30,12 @@
#include "include/MPEG2TSExtractor.h"
#include "include/WVMExtractor.h"
-#include "timedtext/TimedTextDriver.h"
-
#include <binder/IPCThreadState.h>
#include <binder/IServiceManager.h>
#include <media/IMediaPlayerService.h>
#include <media/stagefright/foundation/hexdump.h>
#include <media/stagefright/foundation/ADebug.h>
+#include <media/stagefright/timedtext/TimedTextDriver.h>
#include <media/stagefright/AudioPlayer.h>
#include <media/stagefright/DataSource.h>
#include <media/stagefright/FileSource.h>
@@ -47,10 +46,8 @@
#include <media/stagefright/MetaData.h>
#include <media/stagefright/OMXCodec.h>
-#include <surfaceflinger/Surface.h>
#include <gui/ISurfaceTexture.h>
#include <gui/SurfaceTextureClient.h>
-#include <surfaceflinger/ISurfaceComposer.h>
#include <media/stagefright/foundation/AMessage.h>
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp
index ed1d5f4..2df5528 100755
--- a/media/libstagefright/CameraSource.cpp
+++ b/media/libstagefright/CameraSource.cpp
@@ -27,7 +27,7 @@
#include <media/stagefright/MetaData.h>
#include <camera/Camera.h>
#include <camera/CameraParameters.h>
-#include <surfaceflinger/Surface.h>
+#include <gui/Surface.h>
#include <utils/String8.h>
#include <cutils/properties.h>
diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp
index e14b1c4..a9e7f360 100644
--- a/media/libstagefright/MediaCodec.cpp
+++ b/media/libstagefright/MediaCodec.cpp
@@ -164,6 +164,13 @@ status_t MediaCodec::stop() {
return PostAndAwaitResponse(msg, &response);
}
+status_t MediaCodec::release() {
+ sp<AMessage> msg = new AMessage(kWhatRelease, id());
+
+ sp<AMessage> response;
+ return PostAndAwaitResponse(msg, &response);
+}
+
status_t MediaCodec::queueInputBuffer(
size_t index,
size_t offset,
@@ -422,6 +429,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) {
}
case STOPPING:
+ case RELEASING:
{
// Ignore the error, assuming we'll still get
// the shutdown complete notification.
@@ -577,7 +585,9 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) {
{
/* size_t index = */updateBuffers(kPortIndexInput, msg);
- if (mState == FLUSHING || mState == STOPPING) {
+ if (mState == FLUSHING
+ || mState == STOPPING
+ || mState == RELEASING) {
returnBuffersToCodecOnPort(kPortIndexInput);
break;
}
@@ -596,7 +606,9 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) {
{
/* size_t index = */updateBuffers(kPortIndexOutput, msg);
- if (mState == FLUSHING || mState == STOPPING) {
+ if (mState == FLUSHING
+ || mState == STOPPING
+ || mState == RELEASING) {
returnBuffersToCodecOnPort(kPortIndexOutput);
break;
}
@@ -628,8 +640,12 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) {
case ACodec::kWhatShutdownCompleted:
{
- CHECK_EQ(mState, STOPPING);
- setState(UNINITIALIZED);
+ if (mState == STOPPING) {
+ setState(INITIALIZED);
+ } else {
+ CHECK_EQ(mState, RELEASING);
+ setState(UNINITIALIZED);
+ }
(new AMessage)->postReply(mReplyID);
break;
@@ -767,6 +783,28 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) {
mReplyID = replyID;
setState(STOPPING);
+ mCodec->initiateShutdown(true /* keepComponentAllocated */);
+ returnBuffersToCodec();
+ break;
+ }
+
+ case kWhatRelease:
+ {
+ uint32_t replyID;
+ CHECK(msg->senderAwaitsResponse(&replyID));
+
+ if (mState != INITIALIZED
+ && mState != CONFIGURED && mState != STARTED) {
+ sp<AMessage> response = new AMessage;
+ response->setInt32("err", INVALID_OPERATION);
+
+ response->postReply(replyID);
+ break;
+ }
+
+ mReplyID = replyID;
+ setState(RELEASING);
+
mCodec->initiateShutdown();
returnBuffersToCodec();
break;
diff --git a/media/libstagefright/SurfaceMediaSource.cpp b/media/libstagefright/SurfaceMediaSource.cpp
index aa047d6..ab2cff0 100644
--- a/media/libstagefright/SurfaceMediaSource.cpp
+++ b/media/libstagefright/SurfaceMediaSource.cpp
@@ -24,9 +24,8 @@
#include <media/stagefright/MetadataBufferType.h>
#include <ui/GraphicBuffer.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
-#include <surfaceflinger/IGraphicBufferAlloc.h>
+#include <gui/ISurfaceComposer.h>
+#include <gui/IGraphicBufferAlloc.h>
#include <OMX_Component.h>
#include <utils/Log.h>
diff --git a/media/libstagefright/codecs/aacenc/basic_op/typedefs.h b/media/libstagefright/codecs/aacenc/basic_op/typedefs.h
index 2d5d956..8ef43e2 100644
--- a/media/libstagefright/codecs/aacenc/basic_op/typedefs.h
+++ b/media/libstagefright/codecs/aacenc/basic_op/typedefs.h
@@ -48,9 +48,7 @@
#define assert(_Expression) ((void)0)
#endif
-#ifdef LINUX
-#define __inline static __inline__
-#endif
+#define __inline static __inline
#define INT_BITS 32
/*
diff --git a/media/libstagefright/codecs/aacenc/src/qc_main.c b/media/libstagefright/codecs/aacenc/src/qc_main.c
index df6d46e..48ff300 100644
--- a/media/libstagefright/codecs/aacenc/src/qc_main.c
+++ b/media/libstagefright/codecs/aacenc/src/qc_main.c
@@ -163,7 +163,7 @@ void QCOutDelete(QC_OUT* hQC, VO_MEM_OPERATOR *pMemOP)
Word32 i;
if(hQC)
{
- if(hQC->qcChannel[0].quantSpec);
+ if(hQC->qcChannel[0].quantSpec)
mem_free(pMemOP, hQC->qcChannel[0].quantSpec, VO_INDEX_ENC_AAC);
if(hQC->qcChannel[0].maxValueInSfb)
diff --git a/media/libstagefright/codecs/aacenc/src/sf_estim.c b/media/libstagefright/codecs/aacenc/src/sf_estim.c
index fe40137..bc320ec 100644
--- a/media/libstagefright/codecs/aacenc/src/sf_estim.c
+++ b/media/libstagefright/codecs/aacenc/src/sf_estim.c
@@ -400,7 +400,7 @@ static void assimilateSingleScf(PSY_OUT_CHANNEL *psyOutChan,
Word16 *minScfCalculated,
Flag restartOnSuccess)
{
- Word32 sfbLast, sfbAct, sfbNext, scfAct, scfMin;
+ Word16 sfbLast, sfbAct, sfbNext, scfAct, scfMin;
Word16 *scfLast, *scfNext;
Word32 sfbPeOld, sfbPeNew;
Word32 sfbDistNew;
diff --git a/media/libstagefright/codecs/aacenc/src/transform.c b/media/libstagefright/codecs/aacenc/src/transform.c
index a154a2f..a02336f 100644
--- a/media/libstagefright/codecs/aacenc/src/transform.c
+++ b/media/libstagefright/codecs/aacenc/src/transform.c
@@ -339,6 +339,12 @@ static void PostMDCT(int *buf0, int num, const int *csptr)
*buf1-- = MULHIGH(cosb, tr2) + MULHIGH(sinb, ti2);
}
}
+#else
+void Radix4First(int *buf, int num);
+void Radix8First(int *buf, int num);
+void Radix4FFT(int *buf, int num, int bgn, int *twidTab);
+void PreMDCT(int *buf0, int num, const int *csptr);
+void PostMDCT(int *buf0, int num, const int *csptr);
#endif
diff --git a/media/libstagefright/codecs/amrnb/common/include/az_lsp.h b/media/libstagefright/codecs/amrnb/common/include/az_lsp.h
index 3e15ba3..7c24ca9 100644
--- a/media/libstagefright/codecs/amrnb/common/include/az_lsp.h
+++ b/media/libstagefright/codecs/amrnb/common/include/az_lsp.h
@@ -83,7 +83,7 @@ extern "C"
; EXTERNAL VARIABLES REFERENCES
; Declare variables used in this module but defined elsewhere
----------------------------------------------------------------------------*/
- extern Word16 grid[];
+ extern const Word16 grid[];
/*----------------------------------------------------------------------------
; SIMPLE TYPEDEF'S
diff --git a/media/libstagefright/codecs/amrnb/common/include/inv_sqrt.h b/media/libstagefright/codecs/amrnb/common/include/inv_sqrt.h
index 4fb2b11..91ab3e4 100644
--- a/media/libstagefright/codecs/amrnb/common/include/inv_sqrt.h
+++ b/media/libstagefright/codecs/amrnb/common/include/inv_sqrt.h
@@ -85,7 +85,7 @@ extern "C"
; EXTERNAL VARIABLES REFERENCES
; Declare variables used in this module but defined elsewhere
----------------------------------------------------------------------------*/
- extern Word16 inv_sqrt_tbl[];
+ extern const Word16 inv_sqrt_tbl[];
/*----------------------------------------------------------------------------
; SIMPLE TYPEDEF'S
----------------------------------------------------------------------------*/
diff --git a/media/libstagefright/codecs/amrnb/common/include/log2_norm.h b/media/libstagefright/codecs/amrnb/common/include/log2_norm.h
index b104a69..46b4e4d 100644
--- a/media/libstagefright/codecs/amrnb/common/include/log2_norm.h
+++ b/media/libstagefright/codecs/amrnb/common/include/log2_norm.h
@@ -85,7 +85,7 @@ extern "C"
; EXTERNAL VARIABLES REFERENCES
; Declare variables used in this module but defined elsewhere
----------------------------------------------------------------------------*/
- extern Word16 log2_tbl[];
+ extern const Word16 log2_tbl[];
/*----------------------------------------------------------------------------
; SIMPLE TYPEDEF'S
----------------------------------------------------------------------------*/
diff --git a/media/libstagefright/codecs/amrnb/common/include/pow2.h b/media/libstagefright/codecs/amrnb/common/include/pow2.h
index c96fbdd..9b944eb 100644
--- a/media/libstagefright/codecs/amrnb/common/include/pow2.h
+++ b/media/libstagefright/codecs/amrnb/common/include/pow2.h
@@ -81,7 +81,7 @@ extern "C"
; EXTERNAL VARIABLES REFERENCES
; Declare variables used in this module but defined elsewhere
----------------------------------------------------------------------------*/
- extern Word16 pow2_tbl[];
+ extern const Word16 pow2_tbl[];
/*----------------------------------------------------------------------------
; SIMPLE TYPEDEF'S
----------------------------------------------------------------------------*/
diff --git a/media/libstagefright/codecs/amrnb/common/include/sqrt_l.h b/media/libstagefright/codecs/amrnb/common/include/sqrt_l.h
index 86209bd..a6a2ee5 100644
--- a/media/libstagefright/codecs/amrnb/common/include/sqrt_l.h
+++ b/media/libstagefright/codecs/amrnb/common/include/sqrt_l.h
@@ -82,7 +82,7 @@ extern "C"
; EXTERNAL VARIABLES REFERENCES
; Declare variables used in this module but defined elsewhere
----------------------------------------------------------------------------*/
- extern Word16 sqrt_l_tbl[];
+ extern const Word16 sqrt_l_tbl[];
/*----------------------------------------------------------------------------
; SIMPLE TYPEDEF'S
diff --git a/media/libstagefright/codecs/amrnb/common/src/bitno_tab.cpp b/media/libstagefright/codecs/amrnb/common/src/bitno_tab.cpp
index fed684d..4ee04a5 100644
--- a/media/libstagefright/codecs/amrnb/common/src/bitno_tab.cpp
+++ b/media/libstagefright/codecs/amrnb/common/src/bitno_tab.cpp
@@ -152,7 +152,7 @@ extern "C"
; Variable declaration - defined here and used outside this module
----------------------------------------------------------------------------*/
/* number of parameters per modes (values must be <= MAX_PRM_SIZE!) */
- extern const Word16 prmno[N_MODES] =
+ const Word16 prmno[N_MODES] =
{
PRMNO_MR475,
PRMNO_MR515,
@@ -166,7 +166,7 @@ extern "C"
};
/* number of parameters to first subframe per modes */
- extern const Word16 prmnofsf[N_MODES - 1] =
+ const Word16 prmnofsf[N_MODES - 1] =
{
PRMNOFSF_MR475,
PRMNOFSF_MR515,
@@ -179,7 +179,7 @@ extern "C"
};
/* parameter sizes (# of bits), one table per mode */
- extern const Word16 bitno_MR475[PRMNO_MR475] =
+ const Word16 bitno_MR475[PRMNO_MR475] =
{
8, 8, 7, /* LSP VQ */
8, 7, 2, 8, /* first subframe */
@@ -188,7 +188,7 @@ extern "C"
4, 7, 2, /* fourth subframe */
};
- extern const Word16 bitno_MR515[PRMNO_MR515] =
+ const Word16 bitno_MR515[PRMNO_MR515] =
{
8, 8, 7, /* LSP VQ */
8, 7, 2, 6, /* first subframe */
@@ -197,7 +197,7 @@ extern "C"
4, 7, 2, 6, /* fourth subframe */
};
- extern const Word16 bitno_MR59[PRMNO_MR59] =
+ const Word16 bitno_MR59[PRMNO_MR59] =
{
8, 9, 9, /* LSP VQ */
8, 9, 2, 6, /* first subframe */
@@ -206,7 +206,7 @@ extern "C"
4, 9, 2, 6, /* fourth subframe */
};
- extern const Word16 bitno_MR67[PRMNO_MR67] =
+ const Word16 bitno_MR67[PRMNO_MR67] =
{
8, 9, 9, /* LSP VQ */
8, 11, 3, 7, /* first subframe */
@@ -215,7 +215,7 @@ extern "C"
4, 11, 3, 7, /* fourth subframe */
};
- extern const Word16 bitno_MR74[PRMNO_MR74] =
+ const Word16 bitno_MR74[PRMNO_MR74] =
{
8, 9, 9, /* LSP VQ */
8, 13, 4, 7, /* first subframe */
@@ -224,7 +224,7 @@ extern "C"
5, 13, 4, 7, /* fourth subframe */
};
- extern const Word16 bitno_MR795[PRMNO_MR795] =
+ const Word16 bitno_MR795[PRMNO_MR795] =
{
9, 9, 9, /* LSP VQ */
8, 13, 4, 4, 5, /* first subframe */
@@ -233,7 +233,7 @@ extern "C"
6, 13, 4, 4, 5, /* fourth subframe */
};
- extern const Word16 bitno_MR102[PRMNO_MR102] =
+ const Word16 bitno_MR102[PRMNO_MR102] =
{
8, 9, 9, /* LSP VQ */
8, 1, 1, 1, 1, 10, 10, 7, 7, /* first subframe */
@@ -242,7 +242,7 @@ extern "C"
5, 1, 1, 1, 1, 10, 10, 7, 7, /* fourth subframe */
};
- extern const Word16 bitno_MR122[PRMNO_MR122] =
+ const Word16 bitno_MR122[PRMNO_MR122] =
{
7, 8, 9, 8, 6, /* LSP VQ */
9, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 5, /* first subframe */
@@ -251,7 +251,7 @@ extern "C"
6, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 5 /* fourth subframe */
};
- extern const Word16 bitno_MRDTX[PRMNO_MRDTX] =
+ const Word16 bitno_MRDTX[PRMNO_MRDTX] =
{
3,
8, 9, 9,
@@ -259,7 +259,7 @@ extern "C"
};
/* overall table with all parameter sizes for all modes */
- extern const Word16 * const bitno[N_MODES] =
+ const Word16 * const bitno[N_MODES] =
{
bitno_MR475,
bitno_MR515,
diff --git a/media/libstagefright/codecs/amrnb/common/src/bitreorder_tab.cpp b/media/libstagefright/codecs/amrnb/common/src/bitreorder_tab.cpp
index 69b20fb..e284bbc 100644
--- a/media/libstagefright/codecs/amrnb/common/src/bitreorder_tab.cpp
+++ b/media/libstagefright/codecs/amrnb/common/src/bitreorder_tab.cpp
@@ -123,6 +123,7 @@ terms listed above has been obtained from the copyright holder.
; INCLUDES
----------------------------------------------------------------------------*/
#include "typedef.h"
+#include "bitreorder_tab.h"
/*--------------------------------------------------------------------------*/
#ifdef __cplusplus
@@ -171,7 +172,7 @@ extern "C"
; Variable declaration - defined here and used outside this module
----------------------------------------------------------------------------*/
/* number of parameters per modes (values must be <= MAX_PRM_SIZE!) */
- extern const Word16 numOfBits[NUM_MODES] =
+ const Word16 numOfBits[NUM_MODES] =
{
NUMBIT_MR475,
NUMBIT_MR515,
@@ -191,7 +192,7 @@ extern "C"
NUMBIT_NO_DATA
};
- extern const Word16 reorderBits_MR475[NUMBIT_MR475] =
+ const Word16 reorderBits_MR475[NUMBIT_MR475] =
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 23, 24, 25, 26,
@@ -205,7 +206,7 @@ extern "C"
92, 31, 52, 65, 86
};
- extern const Word16 reorderBits_MR515[NUMBIT_MR515] =
+ const Word16 reorderBits_MR515[NUMBIT_MR515] =
{
7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
13, 12, 11, 10, 9, 8, 23, 24, 25, 26,
@@ -220,7 +221,7 @@ extern "C"
53, 72, 91
};
- extern const Word16 reorderBits_MR59[NUMBIT_MR59] =
+ const Word16 reorderBits_MR59[NUMBIT_MR59] =
{
0, 1, 4, 5, 3, 6, 7, 2, 13, 15,
8, 9, 11, 12, 14, 10, 16, 28, 74, 29,
@@ -236,7 +237,7 @@ extern "C"
38, 59, 84, 105, 37, 58, 83, 104
};
- extern const Word16 reorderBits_MR67[NUMBIT_MR67] =
+ const Word16 reorderBits_MR67[NUMBIT_MR67] =
{
0, 1, 4, 3, 5, 6, 13, 7, 2, 8,
9, 11, 15, 12, 14, 10, 28, 82, 29, 83,
@@ -254,7 +255,7 @@ extern "C"
36, 61, 90, 115
};
- extern const Word16 reorderBits_MR74[NUMBIT_MR74] =
+ const Word16 reorderBits_MR74[NUMBIT_MR74] =
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 26, 87, 27,
@@ -273,7 +274,7 @@ extern "C"
39, 68, 100, 129, 40, 69, 101, 130
};
- extern const Word16 reorderBits_MR795[NUMBIT_MR795] =
+ const Word16 reorderBits_MR795[NUMBIT_MR795] =
{
8, 7, 6, 5, 4, 3, 2, 14, 16, 9,
10, 12, 13, 15, 11, 17, 20, 22, 24, 23,
@@ -293,7 +294,7 @@ extern "C"
139, 37, 69, 103, 135, 38, 70, 104, 136
};
- extern const Word16 reorderBits_MR102[NUMBIT_MR102] =
+ const Word16 reorderBits_MR102[NUMBIT_MR102] =
{
7, 6, 5, 4, 3, 2, 1, 0, 16, 15,
14, 13, 12, 11, 10, 9, 8, 26, 27, 28,
@@ -318,7 +319,7 @@ extern "C"
63, 46, 55, 56
};
- extern const Word16 reorderBits_MR122[NUMBIT_MR122] =
+ const Word16 reorderBits_MR122[NUMBIT_MR122] =
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 23, 15, 16, 17, 18,
@@ -348,7 +349,7 @@ extern "C"
};
/* overall table with all parameter sizes for all modes */
- extern const Word16 * const reorderBits[NUM_MODES-1] =
+ const Word16 * const reorderBits[NUM_MODES-1] =
{
reorderBits_MR475,
reorderBits_MR515,
@@ -361,7 +362,7 @@ extern "C"
};
/* Number of Frames (16-bit segments sent for each mode */
- extern const Word16 numCompressedBytes[16] =
+ const Word16 numCompressedBytes[16] =
{
13, /*4.75*/
14, /*5.15*/
diff --git a/media/libstagefright/codecs/amrnb/common/src/bytesused.cpp b/media/libstagefright/codecs/amrnb/common/src/bytesused.cpp
index 9552206..b61bac4 100644
--- a/media/libstagefright/codecs/amrnb/common/src/bytesused.cpp
+++ b/media/libstagefright/codecs/amrnb/common/src/bytesused.cpp
@@ -152,7 +152,7 @@ extern "C"
; LOCAL STORE/BUFFER/POINTER DEFINITIONS
; Variable declaration - defined here and used outside this module
----------------------------------------------------------------------------*/
- extern const short BytesUsed[16] =
+ const short BytesUsed[16] =
{
13, /* 4.75 */
14, /* 5.15 */
diff --git a/media/libstagefright/codecs/amrnb/common/src/c2_9pf_tab.cpp b/media/libstagefright/codecs/amrnb/common/src/c2_9pf_tab.cpp
index 471bee8..20de9d6 100644
--- a/media/libstagefright/codecs/amrnb/common/src/c2_9pf_tab.cpp
+++ b/media/libstagefright/codecs/amrnb/common/src/c2_9pf_tab.cpp
@@ -86,7 +86,8 @@ extern "C"
; LOCAL VARIABLE DEFINITIONS
; [Variable declaration - defined here and used outside this module]
----------------------------------------------------------------------------*/
- extern const Word16 startPos[2*4*2] = {0, 2, 0, 3,
+ extern const Word16 startPos[];
+ const Word16 startPos[2*4*2] = {0, 2, 0, 3,
0, 2, 0, 3,
1, 3, 2, 4,
1, 4, 1, 4
diff --git a/media/libstagefright/codecs/amrnb/common/src/gains_tbl.cpp b/media/libstagefright/codecs/amrnb/common/src/gains_tbl.cpp
index a08dd2d..a7cd6fb 100644
--- a/media/libstagefright/codecs/amrnb/common/src/gains_tbl.cpp
+++ b/media/libstagefright/codecs/amrnb/common/src/gains_tbl.cpp
@@ -86,14 +86,16 @@ extern "C"
----------------------------------------------------------------------------*/
- extern const Word16 qua_gain_pitch[NB_QUA_PITCH] =
+ extern const Word16 qua_gain_pitch[];
+ const Word16 qua_gain_pitch[NB_QUA_PITCH] =
{
0, 3277, 6556, 8192, 9830, 11469, 12288, 13107,
13926, 14746, 15565, 16384, 17203, 18022, 18842, 19661
};
- extern const Word16 qua_gain_code[(NB_QUA_CODE+1)*3] =
+ extern const Word16 qua_gain_code[];
+ const Word16 qua_gain_code[(NB_QUA_CODE+1)*3] =
{
/* gain factor (g_fac) and quantized energy error (qua_ener_MR122, qua_ener)
* are stored:
diff --git a/media/libstagefright/codecs/amrnb/common/src/gray_tbl.cpp b/media/libstagefright/codecs/amrnb/common/src/gray_tbl.cpp
index 99073d9..c4b2dbc 100644
--- a/media/libstagefright/codecs/amrnb/common/src/gray_tbl.cpp
+++ b/media/libstagefright/codecs/amrnb/common/src/gray_tbl.cpp
@@ -83,8 +83,10 @@ extern "C"
; [Variable declaration - defined here and used outside this module]
----------------------------------------------------------------------------*/
- extern const Word16 gray[8] = {0, 1, 3, 2, 6, 4, 5, 7};
- extern const Word16 dgray[8] = {0, 1, 3, 2, 5, 6, 4, 7};
+ extern const Word16 gray[];
+ extern const Word16 dgray[];
+ const Word16 gray[8] = {0, 1, 3, 2, 6, 4, 5, 7};
+ const Word16 dgray[8] = {0, 1, 3, 2, 5, 6, 4, 7};
/*--------------------------------------------------------------------------*/
#ifdef __cplusplus
diff --git a/media/libstagefright/codecs/amrnb/common/src/grid_tbl.cpp b/media/libstagefright/codecs/amrnb/common/src/grid_tbl.cpp
index cd81566..48566cc 100644
--- a/media/libstagefright/codecs/amrnb/common/src/grid_tbl.cpp
+++ b/media/libstagefright/codecs/amrnb/common/src/grid_tbl.cpp
@@ -63,6 +63,7 @@ terms listed above has been obtained from the copyright holder.
; INCLUDES
----------------------------------------------------------------------------*/
#include "typedef.h"
+#include "az_lsp.h"
/*--------------------------------------------------------------------------*/
#ifdef __cplusplus
@@ -91,7 +92,7 @@ extern "C"
; LOCAL VARIABLE DEFINITIONS
; [Variable declaration - defined here and used outside this module]
----------------------------------------------------------------------------*/
- extern const Word16 grid[grid_points + 1] =
+ const Word16 grid[grid_points + 1] =
{
32760, 32723, 32588, 32364, 32051, 31651,
31164, 30591, 29935, 29196, 28377, 27481,
diff --git a/media/libstagefright/codecs/amrnb/common/src/inv_sqrt_tbl.cpp b/media/libstagefright/codecs/amrnb/common/src/inv_sqrt_tbl.cpp
index bde2c4e..13c3b24 100644
--- a/media/libstagefright/codecs/amrnb/common/src/inv_sqrt_tbl.cpp
+++ b/media/libstagefright/codecs/amrnb/common/src/inv_sqrt_tbl.cpp
@@ -55,6 +55,7 @@ terms listed above has been obtained from the copyright holder.
; INCLUDES
----------------------------------------------------------------------------*/
#include "typedef.h"
+#include "inv_sqrt.h"
/*--------------------------------------------------------------------------*/
#ifdef __cplusplus
@@ -82,7 +83,7 @@ extern "C"
; LOCAL VARIABLE DEFINITIONS
; [Variable declaration - defined here and used outside this module]
----------------------------------------------------------------------------*/
- extern const Word16 inv_sqrt_tbl[49] =
+ const Word16 inv_sqrt_tbl[49] =
{
32767, 31790, 30894, 30070, 29309, 28602, 27945, 27330, 26755, 26214,
diff --git a/media/libstagefright/codecs/amrnb/common/src/log2_tbl.cpp b/media/libstagefright/codecs/amrnb/common/src/log2_tbl.cpp
index 25d63b2..9b9b099 100644
--- a/media/libstagefright/codecs/amrnb/common/src/log2_tbl.cpp
+++ b/media/libstagefright/codecs/amrnb/common/src/log2_tbl.cpp
@@ -54,6 +54,7 @@ terms listed above has been obtained from the copyright holder.
; INCLUDES
----------------------------------------------------------------------------*/
#include "typedef.h"
+#include "log2_norm.h"
/*--------------------------------------------------------------------------*/
#ifdef __cplusplus
@@ -82,7 +83,7 @@ extern "C"
; [Variable declaration - defined here and used outside this module]
----------------------------------------------------------------------------*/
- extern const Word16 log2_tbl[33] =
+ const Word16 log2_tbl[33] =
{
0, 1455, 2866, 4236, 5568, 6863, 8124, 9352, 10549, 11716,
12855, 13967, 15054, 16117, 17156, 18172, 19167, 20142, 21097, 22033,
diff --git a/media/libstagefright/codecs/amrnb/common/src/lsp_lsf_tbl.cpp b/media/libstagefright/codecs/amrnb/common/src/lsp_lsf_tbl.cpp
index cee0f32..ddeeba4 100644
--- a/media/libstagefright/codecs/amrnb/common/src/lsp_lsf_tbl.cpp
+++ b/media/libstagefright/codecs/amrnb/common/src/lsp_lsf_tbl.cpp
@@ -77,7 +77,8 @@ extern "C"
; [Variable declaration - defined here and used outside this module]
----------------------------------------------------------------------------*/
- extern const Word16 table[65] =
+ extern const Word16 table[];
+ const Word16 table[65] =
{
32767, 32729, 32610, 32413, 32138, 31786, 31357, 30853,
30274, 29622, 28899, 28106, 27246, 26320, 25330, 24279,
@@ -94,7 +95,8 @@ extern "C"
/* slope used to compute y = acos(x) */
- extern const Word16 slope[64] =
+ extern const Word16 slope[];
+ const Word16 slope[64] =
{
-26887, -8812, -5323, -3813, -2979, -2444, -2081, -1811,
-1608, -1450, -1322, -1219, -1132, -1059, -998, -946,
diff --git a/media/libstagefright/codecs/amrnb/common/src/lsp_tab.cpp b/media/libstagefright/codecs/amrnb/common/src/lsp_tab.cpp
index deded93..0a32dd7 100644
--- a/media/libstagefright/codecs/amrnb/common/src/lsp_tab.cpp
+++ b/media/libstagefright/codecs/amrnb/common/src/lsp_tab.cpp
@@ -117,6 +117,7 @@ terms listed above has been obtained from the copyright holder.
----------------------------------------------------------------------------*/
#include "typedef.h"
#include "cnst.h"
+#include "lsp_tab.h"
/*--------------------------------------------------------------------------*/
#ifdef __cplusplus
@@ -146,7 +147,7 @@ extern "C"
; LOCAL STORE/BUFFER/POINTER DEFINITIONS
; Variable declaration - defined here and used outside this module
----------------------------------------------------------------------------*/
- extern const Word16 lsp_init_data[M] = {30000, 26000, 21000, 15000, 8000,
+ const Word16 lsp_init_data[M] = {30000, 26000, 21000, 15000, 8000,
0, -8000, -15000, -21000, -26000
};
diff --git a/media/libstagefright/codecs/amrnb/common/src/overflow_tbl.cpp b/media/libstagefright/codecs/amrnb/common/src/overflow_tbl.cpp
index e5d42d6..c4a016d 100644
--- a/media/libstagefright/codecs/amrnb/common/src/overflow_tbl.cpp
+++ b/media/libstagefright/codecs/amrnb/common/src/overflow_tbl.cpp
@@ -81,7 +81,7 @@ extern "C"
; LOCAL VARIABLE DEFINITIONS
; [Variable declaration - defined here and used outside this module]
----------------------------------------------------------------------------*/
- extern const Word32 overflow_tbl [32] = {0x7fffffffL, 0x3fffffffL,
+ const Word32 overflow_tbl [32] = {0x7fffffffL, 0x3fffffffL,
0x1fffffffL, 0x0fffffffL,
0x07ffffffL, 0x03ffffffL,
0x01ffffffL, 0x00ffffffL,
diff --git a/media/libstagefright/codecs/amrnb/common/src/ph_disp_tab.cpp b/media/libstagefright/codecs/amrnb/common/src/ph_disp_tab.cpp
index 99725df..d568b78 100644
--- a/media/libstagefright/codecs/amrnb/common/src/ph_disp_tab.cpp
+++ b/media/libstagefright/codecs/amrnb/common/src/ph_disp_tab.cpp
@@ -81,14 +81,16 @@ extern "C"
; LOCAL VARIABLE DEFINITIONS
; [Variable declaration - defined here and used outside this module]
----------------------------------------------------------------------------*/
- extern const Word16 ph_imp_low_MR795[40] =
+ extern const Word16 ph_imp_low_MR795[];
+ const Word16 ph_imp_low_MR795[40] =
{
26777, 801, 2505, -683, -1382, 582, 604, -1274, 3511, -5894,
4534, -499, -1940, 3011, -5058, 5614, -1990, -1061, -1459, 4442,
-700, -5335, 4609, 452, -589, -3352, 2953, 1267, -1212, -2590,
1731, 3670, -4475, -975, 4391, -2537, 949, -1363, -979, 5734
};
- extern const Word16 ph_imp_mid_MR795[40] =
+ extern const Word16 ph_imp_mid_MR795[];
+ const Word16 ph_imp_mid_MR795[40] =
{
30274, 3831, -4036, 2972, -1048, -1002, 2477, -3043, 2815, -2231,
1753, -1611, 1714, -1775, 1543, -1008, 429, -169, 472, -1264,
@@ -96,14 +98,16 @@ extern "C"
-2063, 2644, -3060, 2897, -1978, 557, 780, -1369, 842, 655
};
- extern const Word16 ph_imp_low[40] =
+ extern const Word16 ph_imp_low[];
+ const Word16 ph_imp_low[40] =
{
14690, 11518, 1268, -2761, -5671, 7514, -35, -2807, -3040, 4823,
2952, -8424, 3785, 1455, 2179, -8637, 8051, -2103, -1454, 777,
1108, -2385, 2254, -363, -674, -2103, 6046, -5681, 1072, 3123,
-5058, 5312, -2329, -3728, 6924, -3889, 675, -1775, 29, 10145
};
- extern const Word16 ph_imp_mid[40] =
+ extern const Word16 ph_imp_mid[];
+ const Word16 ph_imp_mid[40] =
{
30274, 3831, -4036, 2972, -1048, -1002, 2477, -3043, 2815, -2231,
1753, -1611, 1714, -1775, 1543, -1008, 429, -169, 472, -1264,
diff --git a/media/libstagefright/codecs/amrnb/common/src/pow2_tbl.cpp b/media/libstagefright/codecs/amrnb/common/src/pow2_tbl.cpp
index e0183a6..902ea0f 100644
--- a/media/libstagefright/codecs/amrnb/common/src/pow2_tbl.cpp
+++ b/media/libstagefright/codecs/amrnb/common/src/pow2_tbl.cpp
@@ -53,6 +53,7 @@ terms listed above has been obtained from the copyright holder.
; INCLUDES
----------------------------------------------------------------------------*/
#include "typedef.h"
+#include "pow2.h"
/*--------------------------------------------------------------------------*/
#ifdef __cplusplus
@@ -81,7 +82,7 @@ extern "C"
; [Variable declaration - defined here and used outside this module]
----------------------------------------------------------------------------*/
- extern const Word16 pow2_tbl[33] =
+ const Word16 pow2_tbl[33] =
{
16384, 16743, 17109, 17484, 17867, 18258, 18658, 19066, 19484, 19911,
20347, 20792, 21247, 21713, 22188, 22674, 23170, 23678, 24196, 24726,
diff --git a/media/libstagefright/codecs/amrnb/common/src/q_plsf_5_tbl.cpp b/media/libstagefright/codecs/amrnb/common/src/q_plsf_5_tbl.cpp
index ceb1e1e..caa81cb 100644
--- a/media/libstagefright/codecs/amrnb/common/src/q_plsf_5_tbl.cpp
+++ b/media/libstagefright/codecs/amrnb/common/src/q_plsf_5_tbl.cpp
@@ -56,6 +56,7 @@ terms listed above has been obtained from the copyright holder.
; INCLUDES
----------------------------------------------------------------------------*/
#include "typedef.h"
+#include "q_plsf_5_tbl.h"
/*--------------------------------------------------------------------------*/
#ifdef __cplusplus
@@ -94,7 +95,7 @@ extern "C"
----------------------------------------------------------------------------*/
/* LSF means ->normalize frequency domain */
- extern const Word16 mean_lsf_5[10] =
+ const Word16 mean_lsf_5[10] =
{
1384,
2077,
@@ -108,7 +109,7 @@ extern "C"
13701
};
- extern const Word16 dico1_lsf_5[DICO1_5_SIZE * 4] =
+ const Word16 dico1_lsf_5[DICO1_5_SIZE * 4] =
{
-451, -1065, -529, -1305,
-450, -756, -497, -863,
@@ -240,7 +241,7 @@ extern "C"
1469, 2181, 1443, 2016
};
- extern const Word16 dico2_lsf_5[DICO2_5_SIZE * 4] =
+ const Word16 dico2_lsf_5[DICO2_5_SIZE * 4] =
{
-1631, -1600, -1796, -2290,
-1027, -1770, -1100, -2025,
@@ -500,7 +501,7 @@ extern "C"
2374, 2787, 1821, 2788
};
- extern const Word16 dico3_lsf_5[DICO3_5_SIZE * 4] =
+ const Word16 dico3_lsf_5[DICO3_5_SIZE * 4] =
{
-1812, -2275, -1879, -2537,
-1640, -1848, -1695, -2004,
@@ -760,7 +761,7 @@ extern "C"
2180, 1975, 2326, 2020
};
- extern const Word16 dico4_lsf_5[DICO4_5_SIZE * 4] =
+ const Word16 dico4_lsf_5[DICO4_5_SIZE * 4] =
{
-1857, -1681, -1857, -1755,
-2056, -1150, -2134, -1654,
@@ -1020,7 +1021,7 @@ extern "C"
1716, 1376, 1948, 1465
};
- extern const Word16 dico5_lsf_5[DICO5_5_SIZE * 4] =
+ const Word16 dico5_lsf_5[DICO5_5_SIZE * 4] =
{
-1002, -929, -1096, -1203,
-641, -931, -604, -961,
diff --git a/media/libstagefright/codecs/amrnb/common/src/qua_gain_tbl.cpp b/media/libstagefright/codecs/amrnb/common/src/qua_gain_tbl.cpp
index 52f77e9..2d913b8 100644
--- a/media/libstagefright/codecs/amrnb/common/src/qua_gain_tbl.cpp
+++ b/media/libstagefright/codecs/amrnb/common/src/qua_gain_tbl.cpp
@@ -54,6 +54,7 @@ terms listed above has been obtained from the copyright holder.
----------------------------------------------------------------------------*/
#include "typedef.h"
#include "qua_gain.h"
+#include "qua_gain_tbl.h"
/*--------------------------------------------------------------------------*/
#ifdef __cplusplus
@@ -96,7 +97,7 @@ extern "C"
/* table used in 'high' rates: MR67 MR74 */
- extern const Word16 table_gain_highrates[VQ_SIZE_HIGHRATES*4] =
+ const Word16 table_gain_highrates[VQ_SIZE_HIGHRATES*4] =
{
/*
@@ -240,7 +241,7 @@ extern "C"
/* table used in 'low' rates: MR475, MR515, MR59 */
- extern const Word16 table_gain_lowrates[VQ_SIZE_LOWRATES*4] =
+ const Word16 table_gain_lowrates[VQ_SIZE_LOWRATES*4] =
{
/*g_pit, g_fac, qua_ener_MR122, qua_ener */
10813, 28753, 2879, 17333,
diff --git a/media/libstagefright/codecs/amrnb/common/src/sqrt_l_tbl.cpp b/media/libstagefright/codecs/amrnb/common/src/sqrt_l_tbl.cpp
index 5e9898c..5a84b63 100644
--- a/media/libstagefright/codecs/amrnb/common/src/sqrt_l_tbl.cpp
+++ b/media/libstagefright/codecs/amrnb/common/src/sqrt_l_tbl.cpp
@@ -58,6 +58,7 @@ terms listed above has been obtained from the copyright holder.
; INCLUDES
----------------------------------------------------------------------------*/
#include "typedef.h"
+#include "sqrt_l.h"
/*--------------------------------------------------------------------------*/
#ifdef __cplusplus
@@ -85,7 +86,7 @@ extern "C"
; LOCAL VARIABLE DEFINITIONS
; [Variable declaration - defined here and used outside this module]
----------------------------------------------------------------------------*/
- extern const Word16 sqrt_l_tbl[50] =
+ const Word16 sqrt_l_tbl[50] =
{
16384, 16888, 17378, 17854, 18318, 18770, 19212, 19644, 20066, 20480,
20886, 21283, 21674, 22058, 22435, 22806, 23170, 23530, 23884, 24232,
diff --git a/media/libstagefright/codecs/amrnb/common/src/window_tab.cpp b/media/libstagefright/codecs/amrnb/common/src/window_tab.cpp
index fa5faa6..d8fc8cc 100644
--- a/media/libstagefright/codecs/amrnb/common/src/window_tab.cpp
+++ b/media/libstagefright/codecs/amrnb/common/src/window_tab.cpp
@@ -117,6 +117,7 @@ terms listed above has been obtained from the copyright holder.
----------------------------------------------------------------------------*/
#include "typedef.h"
#include "cnst.h"
+#include "window_tab.h"
/*--------------------------------------------------------------------------*/
#ifdef __cplusplus
@@ -154,7 +155,7 @@ extern "C"
/* window for non-EFR modesm; uses 40 samples lookahead */
- extern const Word16 window_200_40[L_WINDOW] =
+ const Word16 window_200_40[L_WINDOW] =
{
2621, 2623, 2629, 2638, 2651, 2668, 2689, 2713, 2741, 2772,
2808, 2847, 2890, 2936, 2986, 3040, 3097, 3158, 3223, 3291,
@@ -185,7 +186,7 @@ extern "C"
/* window for EFR, first two subframes, no lookahead */
- extern const Word16 window_160_80[L_WINDOW] =
+ const Word16 window_160_80[L_WINDOW] =
{
2621, 2624, 2633, 2648, 2668, 2695, 2727, 2765, 2809, 2859,
2915, 2976, 3043, 3116, 3194, 3279, 3368, 3464, 3565, 3671,
@@ -215,7 +216,7 @@ extern "C"
/* window for EFR, last two subframes, no lookahead */
- extern const Word16 window_232_8[L_WINDOW] =
+ const Word16 window_232_8[L_WINDOW] =
{
2621, 2623, 2627, 2634, 2644, 2656, 2671, 2689, 2710, 2734,
2760, 2789, 2821, 2855, 2893, 2933, 2975, 3021, 3069, 3120,
diff --git a/media/libstagefright/codecs/amrnb/dec/src/dec_input_format_tab.cpp b/media/libstagefright/codecs/amrnb/dec/src/dec_input_format_tab.cpp
index a59f5fa..fffbbfd 100644
--- a/media/libstagefright/codecs/amrnb/dec/src/dec_input_format_tab.cpp
+++ b/media/libstagefright/codecs/amrnb/dec/src/dec_input_format_tab.cpp
@@ -121,6 +121,7 @@ terms listed above has been obtained from the copyright holder.
; INCLUDES
----------------------------------------------------------------------------*/
#include "typedef.h"
+#include "amrdecode.h"
/*--------------------------------------------------------------------------*/
#ifdef __cplusplus
@@ -152,7 +153,7 @@ extern "C"
----------------------------------------------------------------------------*/
/* Table containing the number of core AMR data bytes for */
/* each codec mode for WMF input format(number excludes frame type byte) */
- extern const Word16 WmfDecBytesPerFrame[16] =
+ const Word16 WmfDecBytesPerFrame[16] =
{
12, /* 4.75 */
13, /* 5.15 */
@@ -174,7 +175,7 @@ extern "C"
/* Table containing the number of core AMR data bytes for */
/* each codec mode for IF2 input format. */
- extern const Word16 If2DecBytesPerFrame[16] =
+ const Word16 If2DecBytesPerFrame[16] =
{
13, /* 4.75 */
14, /* 5.15 */
diff --git a/media/libstagefright/codecs/amrnb/dec/src/qgain475_tab.cpp b/media/libstagefright/codecs/amrnb/dec/src/qgain475_tab.cpp
index fbcd412..1a08efa 100644
--- a/media/libstagefright/codecs/amrnb/dec/src/qgain475_tab.cpp
+++ b/media/libstagefright/codecs/amrnb/dec/src/qgain475_tab.cpp
@@ -92,7 +92,7 @@ extern "C"
* g_fac(2) (Q12) // frame 1 and 3
*
*/
- extern const Word16 table_gain_MR475[MR475_VQ_SIZE*4] =
+ const Word16 table_gain_MR475[MR475_VQ_SIZE*4] =
{
/*g_pit(0), g_fac(0), g_pit(1), g_fac(1) */
812, 128, 542, 140,
diff --git a/media/libstagefright/codecs/amrnb/enc/src/corrwght_tab.cpp b/media/libstagefright/codecs/amrnb/enc/src/corrwght_tab.cpp
index 769e7ba..b3ed02d 100644
--- a/media/libstagefright/codecs/amrnb/enc/src/corrwght_tab.cpp
+++ b/media/libstagefright/codecs/amrnb/enc/src/corrwght_tab.cpp
@@ -57,6 +57,7 @@ terms listed above has been obtained from the copyright holder.
; INCLUDES
----------------------------------------------------------------------------*/
#include "typedef.h"
+#include "p_ol_wgh.h"
/*--------------------------------------------------------------------------*/
#ifdef __cplusplus
@@ -84,7 +85,7 @@ extern "C"
; LOCAL VARIABLE DEFINITIONS
; [Variable declaration - defined here and used outside this module]
----------------------------------------------------------------------------*/
- extern const Word16 corrweight[251] =
+ const Word16 corrweight[251] =
{
20473, 20506, 20539, 20572, 20605, 20644, 20677,
20716, 20749, 20788, 20821, 20860, 20893, 20932,
diff --git a/media/libstagefright/codecs/amrnb/enc/src/enc_output_format_tab.cpp b/media/libstagefright/codecs/amrnb/enc/src/enc_output_format_tab.cpp
index 147989f..4551fd7 100644
--- a/media/libstagefright/codecs/amrnb/enc/src/enc_output_format_tab.cpp
+++ b/media/libstagefright/codecs/amrnb/enc/src/enc_output_format_tab.cpp
@@ -117,6 +117,7 @@ terms listed above has been obtained from the copyright holder.
; INCLUDES
----------------------------------------------------------------------------*/
#include "typedef.h"
+#include "amrencode.h"
/*--------------------------------------------------------------------------*/
#ifdef __cplusplus
@@ -150,7 +151,7 @@ extern "C"
/* for WMF output format. */
/* Each entry is the sum of the 3GPP frame type byte and the */
/* number of packed core AMR data bytes */
- extern const Word16 WmfEncBytesPerFrame[16] =
+ const Word16 WmfEncBytesPerFrame[16] =
{
13, /* 4.75 */
14, /* 5.15 */
@@ -173,7 +174,7 @@ extern "C"
/* Number of data bytes in an encoder frame for each codec mode */
/* for IF2 output format */
- extern const Word16 If2EncBytesPerFrame[16] =
+ const Word16 If2EncBytesPerFrame[16] =
{
13, /* 4.75 */
14, /* 5.15 */
diff --git a/media/libstagefright/codecs/amrnb/enc/src/inter_36_tab.cpp b/media/libstagefright/codecs/amrnb/enc/src/inter_36_tab.cpp
index 27f33e9..c8d7b13 100644
--- a/media/libstagefright/codecs/amrnb/enc/src/inter_36_tab.cpp
+++ b/media/libstagefright/codecs/amrnb/enc/src/inter_36_tab.cpp
@@ -123,6 +123,7 @@ terms listed above has been obtained from the copyright holder.
----------------------------------------------------------------------------*/
#include "typedef.h"
#include "cnst.h"
+#include "inter_36_tab.h"
/*--------------------------------------------------------------------------*/
#ifdef __cplusplus
@@ -162,7 +163,7 @@ extern "C"
inter_3[k] = inter_6[2*k], 0 <= k <= 3*L_INTER_SRCH
*/
- extern const Word16 inter_6[FIR_SIZE] =
+ const Word16 inter_6[FIR_SIZE] =
{
29519,
28316, 24906, 19838, 13896, 7945, 2755,
diff --git a/media/libstagefright/codecs/amrnb/enc/src/lag_wind_tab.cpp b/media/libstagefright/codecs/amrnb/enc/src/lag_wind_tab.cpp
index 53889bb..b0f5b3a 100644
--- a/media/libstagefright/codecs/amrnb/enc/src/lag_wind_tab.cpp
+++ b/media/libstagefright/codecs/amrnb/enc/src/lag_wind_tab.cpp
@@ -138,6 +138,7 @@ terms listed above has been obtained from the copyright holder.
; INCLUDES
----------------------------------------------------------------------------*/
#include "typedef.h"
+#include "lag_wind_tab.h"
/*--------------------------------------------------------------------------*/
#ifdef __cplusplus
@@ -167,7 +168,7 @@ extern "C"
; LOCAL STORE/BUFFER/POINTER DEFINITIONS
; Variable declaration - defined here and used outside this module
----------------------------------------------------------------------------*/
- extern const Word16 lag_h[10] =
+ const Word16 lag_h[10] =
{
32728,
32619,
@@ -181,7 +182,7 @@ extern "C"
29321
};
- extern const Word16 lag_l[10] =
+ const Word16 lag_l[10] =
{
11904,
17280,
diff --git a/media/libstagefright/codecs/amrnb/enc/src/ton_stab.cpp b/media/libstagefright/codecs/amrnb/enc/src/ton_stab.cpp
index 3c4494d..455a510 100644
--- a/media/libstagefright/codecs/amrnb/enc/src/ton_stab.cpp
+++ b/media/libstagefright/codecs/amrnb/enc/src/ton_stab.cpp
@@ -791,7 +791,8 @@ void update_gp_clipping(tonStabState *st, /* i/o : State struct */
)
{
OSCL_UNUSED_ARG(pOverflow);
- for (int i = 0; i < N_FRAME - 1; i++)
+ int i;
+ for (i = 0; i < N_FRAME - 1; i++)
{
st->gp[i] = st->gp[i+1];
}
diff --git a/media/libstagefright/codecs/amrwb/include/pvamrwbdecoder_api.h b/media/libstagefright/codecs/amrwb/include/pvamrwbdecoder_api.h
index 457c21f..eca5ae0 100644
--- a/media/libstagefright/codecs/amrwb/include/pvamrwbdecoder_api.h
+++ b/media/libstagefright/codecs/amrwb/include/pvamrwbdecoder_api.h
@@ -106,7 +106,7 @@ extern "C"
#define NUM_OF_MODES 10
- const int16 AMR_WB_COMPRESSED[NUM_OF_MODES] =
+ static const int16 AMR_WB_COMPRESSED[NUM_OF_MODES] =
{
NBBITS_7k,
NBBITS_9k,
diff --git a/media/libstagefright/codecs/amrwb/src/get_amr_wb_bits.cpp b/media/libstagefright/codecs/amrwb/src/get_amr_wb_bits.cpp
index d7287f3..b325e8f 100644
--- a/media/libstagefright/codecs/amrwb/src/get_amr_wb_bits.cpp
+++ b/media/libstagefright/codecs/amrwb/src/get_amr_wb_bits.cpp
@@ -119,8 +119,9 @@ int16 Serial_parm( /* Return the parameter */
)
{
int16 value = 0;
+ int16 i;
- for (int16 i = no_of_bits >> 1; i != 0; i--)
+ for (i = no_of_bits >> 1; i != 0; i--)
{
value <<= 2;
diff --git a/media/libstagefright/codecs/amrwb/src/homing_amr_wb_dec.cpp b/media/libstagefright/codecs/amrwb/src/homing_amr_wb_dec.cpp
index 59c6c0a..f032a08 100644
--- a/media/libstagefright/codecs/amrwb/src/homing_amr_wb_dec.cpp
+++ b/media/libstagefright/codecs/amrwb/src/homing_amr_wb_dec.cpp
@@ -134,7 +134,7 @@ extern "C"
; LOCAL STORE/BUFFER/POINTER DEFINITIONS
; Variable declaration - defined here and used outside this module
----------------------------------------------------------------------------*/
-const int16 prmnofsf[NUM_OF_SPMODES] =
+static const int16 prmnofsf[NUM_OF_SPMODES] =
{
63, 81, 100,
108, 116, 128,
@@ -142,21 +142,21 @@ const int16 prmnofsf[NUM_OF_SPMODES] =
};
-const int16 dfh_M7k[PRMN_7k] =
+static const int16 dfh_M7k[PRMN_7k] =
{
3168, 29954, 29213, 16121,
64, 13440, 30624, 16430,
19008
};
-const int16 dfh_M9k[PRMN_9k] =
+static const int16 dfh_M9k[PRMN_9k] =
{
3168, 31665, 9943, 9123,
15599, 4358, 20248, 2048,
17040, 27787, 16816, 13888
};
-const int16 dfh_M12k[PRMN_12k] =
+static const int16 dfh_M12k[PRMN_12k] =
{
3168, 31665, 9943, 9128,
3647, 8129, 30930, 27926,
@@ -165,7 +165,7 @@ const int16 dfh_M12k[PRMN_12k] =
13948
};
-const int16 dfh_M14k[PRMN_14k] =
+static const int16 dfh_M14k[PRMN_14k] =
{
3168, 31665, 9943, 9131,
24815, 655, 26616, 26764,
@@ -174,7 +174,7 @@ const int16 dfh_M14k[PRMN_14k] =
221, 20321, 17823
};
-const int16 dfh_M16k[PRMN_16k] =
+static const int16 dfh_M16k[PRMN_16k] =
{
3168, 31665, 9943, 9131,
24815, 700, 3824, 7271,
@@ -184,7 +184,7 @@ const int16 dfh_M16k[PRMN_16k] =
6759, 24576
};
-const int16 dfh_M18k[PRMN_18k] =
+static const int16 dfh_M18k[PRMN_18k] =
{
3168, 31665, 9943, 9135,
14787, 14423, 30477, 24927,
@@ -195,7 +195,7 @@ const int16 dfh_M18k[PRMN_18k] =
0
};
-const int16 dfh_M20k[PRMN_20k] =
+static const int16 dfh_M20k[PRMN_20k] =
{
3168, 31665, 9943, 9129,
8637, 31807, 24646, 736,
@@ -206,7 +206,7 @@ const int16 dfh_M20k[PRMN_20k] =
30249, 29123, 0
};
-const int16 dfh_M23k[PRMN_23k] =
+static const int16 dfh_M23k[PRMN_23k] =
{
3168, 31665, 9943, 9132,
16748, 3202, 28179, 16317,
@@ -218,7 +218,7 @@ const int16 dfh_M23k[PRMN_23k] =
23392, 26053, 31216
};
-const int16 dfh_M24k[PRMN_24k] =
+static const int16 dfh_M24k[PRMN_24k] =
{
3168, 31665, 9943, 9134,
24776, 5857, 18475, 28535,
diff --git a/media/libstagefright/codecs/amrwb/src/isp_isf.cpp b/media/libstagefright/codecs/amrwb/src/isp_isf.cpp
index 41db7e3..0552733 100644
--- a/media/libstagefright/codecs/amrwb/src/isp_isf.cpp
+++ b/media/libstagefright/codecs/amrwb/src/isp_isf.cpp
@@ -108,7 +108,7 @@ terms listed above has been obtained from the copyright holder.
/* table of cos(x) in Q15 */
-const int16 table[129] =
+static const int16 table[129] =
{
32767,
32758, 32729, 32679, 32610, 32522, 32413, 32286, 32138,
diff --git a/media/libstagefright/codecs/amrwb/src/oversamp_12k8_to_16k.cpp b/media/libstagefright/codecs/amrwb/src/oversamp_12k8_to_16k.cpp
index 143c26e..806851e 100644
--- a/media/libstagefright/codecs/amrwb/src/oversamp_12k8_to_16k.cpp
+++ b/media/libstagefright/codecs/amrwb/src/oversamp_12k8_to_16k.cpp
@@ -240,11 +240,11 @@ void AmrWbUp_samp(
{
int32 i;
- int16 frac;
+ int16 frac, j;
int16 * pt_sig_u = sig_u;
frac = 1;
- for (int16 j = 0; j < L_frame; j++)
+ for (j = 0; j < L_frame; j++)
{
i = ((int32)j * INV_FAC5) >> 13; /* integer part = pos * 1/5 */
@@ -337,6 +337,6 @@ int16 AmrWbInterpol( /* return result of interpolation */
L_sum = shl_int32(L_sum, 2); /* saturation can occur here */
- return ((int16(L_sum >> 16)));
+ return ((int16)(L_sum >> 16));
}
diff --git a/media/libstagefright/codecs/amrwb/src/phase_dispersion.cpp b/media/libstagefright/codecs/amrwb/src/phase_dispersion.cpp
index f90a534..7b08a40 100644
--- a/media/libstagefright/codecs/amrwb/src/phase_dispersion.cpp
+++ b/media/libstagefright/codecs/amrwb/src/phase_dispersion.cpp
@@ -109,7 +109,7 @@ terms listed above has been obtained from the copyright holder.
/* impulse response with phase dispersion */
/* 2.0 - 6.4 kHz phase dispersion */
-const int16 ph_imp_low[L_SUBFR] =
+static const int16 ph_imp_low[L_SUBFR] =
{
20182, 9693, 3270, -3437, 2864, -5240, 1589, -1357,
600, 3893, -1497, -698, 1203, -5249, 1199, 5371,
@@ -122,7 +122,7 @@ const int16 ph_imp_low[L_SUBFR] =
};
/* 3.2 - 6.4 kHz phase dispersion */
-const int16 ph_imp_mid[L_SUBFR] =
+static const int16 ph_imp_mid[L_SUBFR] =
{
24098, 10460, -5263, -763, 2048, -927, 1753, -3323,
2212, 652, -2146, 2487, -3539, 4109, -2107, -374,
diff --git a/media/libstagefright/codecs/amrwbenc/inc/isp_isf.tab b/media/libstagefright/codecs/amrwbenc/inc/isp_isf.tab
index 97c3b68..865eea0 100644
--- a/media/libstagefright/codecs/amrwbenc/inc/isp_isf.tab
+++ b/media/libstagefright/codecs/amrwbenc/inc/isp_isf.tab
@@ -21,7 +21,7 @@
/* table of cos(x) in Q15 */
-const static Word16 table[129] = {
+static const Word16 table[129] = {
32767,
32758, 32729, 32679, 32610, 32522, 32413, 32286, 32138,
31972, 31786, 31581, 31357, 31114, 30853, 30572, 30274,
@@ -42,7 +42,7 @@ const static Word16 table[129] = {
/* slope in Q11 used to compute y = acos(x) */
-const static Word16 slope[128] = {
+static const Word16 slope[128] = {
-26214, -9039, -5243, -3799, -2979, -2405, -2064, -1771,
-1579, -1409, -1279, -1170, -1079, -1004, -933, -880,
-827, -783, -743, -708, -676, -647, -621, -599,
diff --git a/media/libstagefright/codecs/amrwbenc/src/voAMRWBEnc.c b/media/libstagefright/codecs/amrwbenc/src/voAMRWBEnc.c
index 0f4d689..ea9da52 100644
--- a/media/libstagefright/codecs/amrwbenc/src/voAMRWBEnc.c
+++ b/media/libstagefright/codecs/amrwbenc/src/voAMRWBEnc.c
@@ -1702,7 +1702,7 @@ VO_U32 VO_API voAMRWB_SetInputData(
gData = (Coder_State *)hCodec;
stream = gData->stream;
- if(NULL == pInput || NULL == pInput->Buffer || 0 > pInput->Length)
+ if(NULL == pInput || NULL == pInput->Buffer)
{
return VO_ERR_INVALID_ARG;
}
diff --git a/media/libstagefright/colorconversion/SoftwareRenderer.cpp b/media/libstagefright/colorconversion/SoftwareRenderer.cpp
index 297f2c9..059d6b9 100644
--- a/media/libstagefright/colorconversion/SoftwareRenderer.cpp
+++ b/media/libstagefright/colorconversion/SoftwareRenderer.cpp
@@ -19,11 +19,8 @@
#include "../include/SoftwareRenderer.h"
-#include <binder/MemoryHeapBase.h>
-#include <binder/MemoryHeapPmem.h>
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/MetaData.h>
-#include <surfaceflinger/Surface.h>
#include <system/window.h>
#include <ui/GraphicBufferMapper.h>
#include <gui/ISurfaceTexture.h>
diff --git a/media/libstagefright/tests/SurfaceMediaSource_test.cpp b/media/libstagefright/tests/SurfaceMediaSource_test.cpp
index d7cec04..3dcd9fc 100644
--- a/media/libstagefright/tests/SurfaceMediaSource_test.cpp
+++ b/media/libstagefright/tests/SurfaceMediaSource_test.cpp
@@ -26,11 +26,11 @@
#include <media/stagefright/SurfaceMediaSource.h>
#include <media/mediarecorder.h>
-#include <gui/SurfaceTextureClient.h>
#include <ui/GraphicBuffer.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/Surface.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
+#include <gui/SurfaceTextureClient.h>
+#include <gui/ISurfaceComposer.h>
+#include <gui/Surface.h>
+#include <gui/SurfaceComposerClient.h>
#include <binder/ProcessState.h>
#include <ui/FramebufferNativeWindow.h>
diff --git a/media/libstagefright/timedtext/Android.mk b/media/libstagefright/timedtext/Android.mk
index dde2066..d2d5f7b 100644
--- a/media/libstagefright/timedtext/Android.mk
+++ b/media/libstagefright/timedtext/Android.mk
@@ -12,6 +12,7 @@ LOCAL_SRC_FILES:= \
LOCAL_CFLAGS += -Wno-multichar
LOCAL_C_INCLUDES:= \
$(JNI_H_INCLUDE) \
+ $(TOP)/frameworks/base/include/media/stagefright/timedtext \
$(TOP)/frameworks/base/media/libstagefright
LOCAL_MODULE:= libstagefright_timedtext
diff --git a/media/libstagefright/timedtext/TimedTextDriver.cpp b/media/libstagefright/timedtext/TimedTextDriver.cpp
index 9ec9415..c70870e 100644
--- a/media/libstagefright/timedtext/TimedTextDriver.cpp
+++ b/media/libstagefright/timedtext/TimedTextDriver.cpp
@@ -27,8 +27,7 @@
#include <media/stagefright/Utils.h>
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/foundation/ALooper.h>
-
-#include "TimedTextDriver.h"
+#include <media/stagefright/timedtext/TimedTextDriver.h>
#include "TextDescriptions.h"
#include "TimedTextPlayer.h"
diff --git a/media/libstagefright/timedtext/TimedTextPlayer.cpp b/media/libstagefright/timedtext/TimedTextPlayer.cpp
index bf7cbf6..bda7b46 100644
--- a/media/libstagefright/timedtext/TimedTextPlayer.cpp
+++ b/media/libstagefright/timedtext/TimedTextPlayer.cpp
@@ -20,12 +20,12 @@
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/foundation/AMessage.h>
+#include <media/stagefright/timedtext/TimedTextDriver.h>
#include <media/stagefright/MediaErrors.h>
#include <media/MediaPlayerInterface.h>
#include "TimedTextPlayer.h"
-#include "TimedTextDriver.h"
#include "TimedTextSource.h"
namespace android {
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaRecorderStressTestRunner.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaRecorderStressTestRunner.java
index e5ecd5c..95e7b5e 100755
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaRecorderStressTestRunner.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaRecorderStressTestRunner.java
@@ -44,7 +44,9 @@ public class MediaRecorderStressTestRunner extends InstrumentationTestRunner {
public static int mVideoHeight = profile.videoFrameHeight;
public static int mBitRate = profile.videoBitRate;
public static boolean mRemoveVideo = true;
- public static int mDuration = 10000;
+ public static int mDuration = 10 * 1000; // 10 seconds
+ public static int mTimeLapseDuration = 180 * 1000; // 3 minutes
+ public static double mCaptureRate = 0.5; // 2 sec timelapse interval
@Override
public TestSuite getAllTests() {
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaRecorderStressTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaRecorderStressTest.java
index e6177ba..73ee4dd 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaRecorderStressTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaRecorderStressTest.java
@@ -22,11 +22,13 @@ import com.android.mediaframeworktest.MediaFrameworkTest;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
+import java.io.IOException;
import java.io.Writer;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import android.hardware.Camera;
+import android.media.CamcorderProfile;
import android.media.MediaPlayer;
import android.media.MediaRecorder;
import android.os.Handler;
@@ -39,21 +41,21 @@ import com.android.mediaframeworktest.MediaRecorderStressTestRunner;
/**
* Junit / Instrumentation test case for the media player api
-
- */
-public class MediaRecorderStressTest extends ActivityInstrumentationTestCase2<MediaFrameworkTest> {
-
-
+ */
+public class MediaRecorderStressTest extends ActivityInstrumentationTestCase2<MediaFrameworkTest> {
+
private String TAG = "MediaRecorderStressTest";
private MediaRecorder mRecorder;
private Camera mCamera;
-
+
private static final int NUMBER_OF_CAMERA_STRESS_LOOPS = 100;
private static final int NUMBER_OF_RECORDER_STRESS_LOOPS = 100;
private static final int NUMBER_OF_RECORDERANDPLAY_STRESS_LOOPS = 50;
private static final int NUMBER_OF_SWTICHING_LOOPS_BW_CAMERA_AND_RECORDER = 200;
- private static final long WAIT_TIME_CAMERA_TEST = 3000; // 3 second
- private static final long WAIT_TIME_RECORDER_TEST = 6000; // 6 second
+ private static final int NUMBER_OF_TIME_LAPSE_LOOPS = 25;
+ private static final int TIME_LAPSE_PLAYBACK_WAIT_TIME = 5* 1000; // 5 seconds
+ private static final long WAIT_TIME_CAMERA_TEST = 3 * 1000; // 3 seconds
+ private static final long WAIT_TIME_RECORDER_TEST = 6 * 1000; // 6 seconds
private static final String OUTPUT_FILE = "/sdcard/temp";
private static final String OUTPUT_FILE_EXT = ".3gp";
private static final String MEDIA_STRESS_OUTPUT =
@@ -61,7 +63,7 @@ public class MediaRecorderStressTest extends ActivityInstrumentationTestCase2<Me
private final CameraErrorCallback mCameraErrorCallback = new CameraErrorCallback();
private final RecorderErrorCallback mRecorderErrorCallback = new RecorderErrorCallback();
- private final static int WAIT_TIMEOUT = 10000;
+ private final static int WAIT_TIMEOUT = 10 * 1000; // 10 seconds
private Thread mLooperThread;
private Handler mHandler;
@@ -306,7 +308,7 @@ public class MediaRecorderStressTest extends ActivityInstrumentationTestCase2<Me
}
}
- public void removeRecodedVideo(String filename){
+ public void removeRecordedVideo(String filename){
File video = new File(filename);
Log.v(TAG, "remove recorded video " + filename);
video.delete();
@@ -381,7 +383,7 @@ public class MediaRecorderStressTest extends ActivityInstrumentationTestCase2<Me
mp.release();
validateRecordedVideo(filename);
if (remove_video) {
- removeRecodedVideo(filename);
+ removeRecordedVideo(filename);
}
output.write(", " + i);
}
@@ -392,4 +394,90 @@ public class MediaRecorderStressTest extends ActivityInstrumentationTestCase2<Me
output.write("\n\n");
output.close();
}
+
+ // Test case for stressing time lapse
+ @LargeTest
+ public void testStressTimeLapse() throws Exception {
+ SurfaceHolder mSurfaceHolder;
+ mSurfaceHolder = MediaFrameworkTest.mSurfaceView.getHolder();
+ int record_duration = MediaRecorderStressTestRunner.mTimeLapseDuration;
+ boolean remove_video = MediaRecorderStressTestRunner.mRemoveVideo;
+ double captureRate = MediaRecorderStressTestRunner.mCaptureRate;
+ String filename;
+ File stressOutFile = new File(MEDIA_STRESS_OUTPUT);
+ Writer output = new BufferedWriter(new FileWriter(stressOutFile, true));
+ output.write("Start camera time lapse stress:\n");
+ output.write("Total number of loops: " + NUMBER_OF_TIME_LAPSE_LOOPS + "\n");
+
+ try {
+ output.write("No of loop: ");
+ for (int i = 0; i < NUMBER_OF_TIME_LAPSE_LOOPS; i++) {
+ filename = OUTPUT_FILE + i + OUTPUT_FILE_EXT;
+ Log.v(TAG, filename);
+ runOnLooper(new Runnable() {
+ @Override
+ public void run() {
+ mRecorder = new MediaRecorder();
+ }
+ });
+
+ // Set callback
+ mRecorder.setOnErrorListener(mRecorderErrorCallback);
+
+ // Set video source
+ mRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
+
+ // Set camcorder profile for time lapse
+ CamcorderProfile profile =
+ CamcorderProfile.get(CamcorderProfile.QUALITY_TIME_LAPSE_HIGH);
+ mRecorder.setProfile(profile);
+
+ // Set the timelapse setting; 0.1 = 10 sec timelapse, 0.5 = 2 sec timelapse, etc.
+ // http://developer.android.com/guide/topics/media/camera.html#time-lapse-video
+ mRecorder.setCaptureRate(captureRate);
+
+ // Set output file
+ mRecorder.setOutputFile(filename);
+
+ // Set the preview display
+ Log.v(TAG, "mediaRecorder setPreviewDisplay");
+ mRecorder.setPreviewDisplay(mSurfaceHolder.getSurface());
+
+ mRecorder.prepare();
+ mRecorder.start();
+ Thread.sleep(record_duration);
+ Log.v(TAG, "Before stop");
+ mRecorder.stop();
+ mRecorder.release();
+
+ // Start the playback
+ MediaPlayer mp = new MediaPlayer();
+ mp.setDataSource(filename);
+ mp.setDisplay(mSurfaceHolder);
+ mp.prepare();
+ mp.start();
+ Thread.sleep(TIME_LAPSE_PLAYBACK_WAIT_TIME);
+ mp.release();
+ validateRecordedVideo(filename);
+ if(remove_video) {
+ removeRecordedVideo(filename);
+ }
+ output.write(", " + i);
+ }
+ }
+ catch (IllegalStateException e) {
+ assertTrue("Camera time lapse stress test IllegalStateException", false);
+ Log.v(TAG, e.toString());
+ }
+ catch (IOException e) {
+ assertTrue("Camera time lapse stress test IOException", false);
+ Log.v(TAG, e.toString());
+ }
+ catch (Exception e) {
+ assertTrue("Camera time lapse stress test Exception", false);
+ Log.v(TAG, e.toString());
+ }
+ output.write("\n\n");
+ output.close();
+ }
}
diff --git a/native/android/native_window.cpp b/native/android/native_window.cpp
index 6b37a12..c58ee00 100644
--- a/native/android/native_window.cpp
+++ b/native/android/native_window.cpp
@@ -18,7 +18,7 @@
#include <utils/Log.h>
#include <android/native_window_jni.h>
-#include <surfaceflinger/Surface.h>
+#include <gui/Surface.h>
#include <android_runtime/android_view_Surface.h>
#include <android_runtime/android_graphics_SurfaceTexture.h>
diff --git a/opengl/libagl/context.h b/opengl/libagl/context.h
index ef36b56..7065a30 100644
--- a/opengl/libagl/context.h
+++ b/opengl/libagl/context.h
@@ -1,20 +1,642 @@
-/* libs/opengles/context.h
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
-
-#include <private/opengles/gl_context.h>
+/*
+ * Copyright (C) 2006 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_OPENGLES_CONTEXT_H
+#define ANDROID_OPENGLES_CONTEXT_H
+
+#include <stdint.h>
+#include <stddef.h>
+#include <sys/types.h>
+#include <pthread.h>
+#ifdef HAVE_ANDROID_OS
+#include <bionic_tls.h>
+#endif
+
+#include <private/pixelflinger/ggl_context.h>
+#include <hardware/gralloc.h>
+
+#include <GLES/gl.h>
+#include <GLES/glext.h>
+
+namespace android {
+
+
+const unsigned int OGLES_NUM_COMPRESSED_TEXTURE_FORMATS = 10
+#ifdef GL_OES_compressed_ETC1_RGB8_texture
+ + 1
+#endif
+ ;
+
+class EGLTextureObject;
+class EGLSurfaceManager;
+class EGLBufferObjectManager;
+
+namespace gl {
+
+struct ogles_context_t;
+struct matrixx_t;
+struct transform_t;
+struct buffer_t;
+
+ogles_context_t* getGlContext();
+
+template<typename T>
+static inline void swap(T& a, T& b) {
+ T t(a); a = b; b = t;
+}
+template<typename T>
+inline T max(T a, T b) {
+ return a<b ? b : a;
+}
+template<typename T>
+inline T max(T a, T b, T c) {
+ return max(a, max(b, c));
+}
+template<typename T>
+inline T min(T a, T b) {
+ return a<b ? a : b;
+}
+template<typename T>
+inline T min(T a, T b, T c) {
+ return min(a, min(b, c));
+}
+template<typename T>
+inline T min(T a, T b, T c, T d) {
+ return min(min(a,b), min(c,d));
+}
+
+// ----------------------------------------------------------------------------
+// vertices
+// ----------------------------------------------------------------------------
+
+struct vec3_t {
+ union {
+ struct { GLfixed x, y, z; };
+ struct { GLfixed r, g, b; };
+ struct { GLfixed S, T, R; };
+ GLfixed v[3];
+ };
+};
+
+struct vec4_t {
+ union {
+ struct { GLfixed x, y, z, w; };
+ struct { GLfixed r, g, b, a; };
+ struct { GLfixed S, T, R, Q; };
+ GLfixed v[4];
+ };
+};
+
+struct vertex_t {
+ enum {
+ // these constant matter for our clipping
+ CLIP_L = 0x0001, // clipping flags
+ CLIP_R = 0x0002,
+ CLIP_B = 0x0004,
+ CLIP_T = 0x0008,
+ CLIP_N = 0x0010,
+ CLIP_F = 0x0020,
+
+ EYE = 0x0040,
+ RESERVED = 0x0080,
+
+ USER_CLIP_0 = 0x0100, // user clipping flags
+ USER_CLIP_1 = 0x0200,
+ USER_CLIP_2 = 0x0400,
+ USER_CLIP_3 = 0x0800,
+ USER_CLIP_4 = 0x1000,
+ USER_CLIP_5 = 0x2000,
+
+ LIT = 0x4000, // lighting has been applied
+ TT = 0x8000, // texture coords transformed
+
+ FRUSTUM_CLIP_ALL= 0x003F,
+ USER_CLIP_ALL = 0x3F00,
+ CLIP_ALL = 0x3F3F,
+ };
+
+ // the fields below are arranged to minimize d-cache usage
+ // we group together, by cache-line, the fields most likely to be used
+
+ union {
+ vec4_t obj;
+ vec4_t eye;
+ };
+ vec4_t clip;
+
+ uint32_t flags;
+ size_t index; // cache tag, and vertex index
+ GLfixed fog;
+ uint8_t locked;
+ uint8_t mru;
+ uint8_t reserved[2];
+ vec4_t window;
+
+ vec4_t color;
+ vec4_t texture[GGL_TEXTURE_UNIT_COUNT];
+ uint32_t reserved1[4];
+
+ inline void clear() {
+ flags = index = locked = mru = 0;
+ }
+};
+
+struct point_size_t {
+ GGLcoord size;
+ GLboolean smooth;
+};
+
+struct line_width_t {
+ GGLcoord width;
+ GLboolean smooth;
+};
+
+struct polygon_offset_t {
+ GLfixed factor;
+ GLfixed units;
+ GLboolean enable;
+};
+
+// ----------------------------------------------------------------------------
+// arrays
+// ----------------------------------------------------------------------------
+
+struct array_t {
+ typedef void (*fetcher_t)(ogles_context_t*, GLfixed*, const GLvoid*);
+ fetcher_t fetch;
+ GLvoid const* physical_pointer;
+ GLint size;
+ GLsizei stride;
+ GLvoid const* pointer;
+ buffer_t const* bo;
+ uint16_t type;
+ GLboolean enable;
+ GLboolean pad;
+ GLsizei bounds;
+ void init(GLint, GLenum, GLsizei, const GLvoid *, const buffer_t*, GLsizei);
+ inline void resolve();
+ inline const GLubyte* element(GLint i) const {
+ return (const GLubyte*)physical_pointer + i * stride;
+ }
+};
+
+struct array_machine_t {
+ array_t vertex;
+ array_t normal;
+ array_t color;
+ array_t texture[GGL_TEXTURE_UNIT_COUNT];
+ uint8_t activeTexture;
+ uint8_t tmu;
+ uint16_t cull;
+ uint32_t flags;
+ GLenum indicesType;
+ buffer_t const* array_buffer;
+ buffer_t const* element_array_buffer;
+
+ void (*compileElements)(ogles_context_t*, vertex_t*, GLint, GLsizei);
+ void (*compileElement)(ogles_context_t*, vertex_t*, GLint);
+
+ void (*mvp_transform)(transform_t const*, vec4_t*, vec4_t const*);
+ void (*mv_transform)(transform_t const*, vec4_t*, vec4_t const*);
+ void (*tex_transform[2])(transform_t const*, vec4_t*, vec4_t const*);
+ void (*perspective)(ogles_context_t*c, vertex_t* v);
+ void (*clipVertex)(ogles_context_t* c, vertex_t* nv,
+ GGLfixed t, const vertex_t* s, const vertex_t* p);
+ void (*clipEye)(ogles_context_t* c, vertex_t* nv,
+ GGLfixed t, const vertex_t* s, const vertex_t* p);
+};
+
+struct vertex_cache_t {
+ enum {
+ // must be at least 4
+ // 3 vertice for triangles
+ // or 2 + 2 for indexed triangles w/ cache contention
+ VERTEX_BUFFER_SIZE = 8,
+ // must be a power of two and at least 3
+ VERTEX_CACHE_SIZE = 64, // 8 KB
+
+ INDEX_BITS = 16,
+ INDEX_MASK = ((1LU<<INDEX_BITS)-1),
+ INDEX_SEQ = 1LU<<INDEX_BITS,
+ };
+ vertex_t* vBuffer;
+ vertex_t* vCache;
+ uint32_t sequence;
+ void* base;
+ uint32_t total;
+ uint32_t misses;
+ int64_t startTime;
+ void init();
+ void uninit();
+ void clear();
+ void dump_stats(GLenum mode);
+};
+
+// ----------------------------------------------------------------------------
+// fog
+// ----------------------------------------------------------------------------
+
+struct fog_t {
+ GLfixed density;
+ GLfixed start;
+ GLfixed end;
+ GLfixed invEndMinusStart;
+ GLenum mode;
+ GLfixed (*fog)(ogles_context_t* c, GLfixed z);
+};
+
+// ----------------------------------------------------------------------------
+// user clip planes
+// ----------------------------------------------------------------------------
+
+const unsigned int OGLES_MAX_CLIP_PLANES = 6;
+
+struct clip_plane_t {
+ vec4_t equation;
+};
+
+struct user_clip_planes_t {
+ clip_plane_t plane[OGLES_MAX_CLIP_PLANES];
+ uint32_t enable;
+};
+
+// ----------------------------------------------------------------------------
+// lighting
+// ----------------------------------------------------------------------------
+
+const unsigned int OGLES_MAX_LIGHTS = 8;
+
+struct light_t {
+ vec4_t ambient;
+ vec4_t diffuse;
+ vec4_t specular;
+ vec4_t implicitAmbient;
+ vec4_t implicitDiffuse;
+ vec4_t implicitSpecular;
+ vec4_t position; // position in eye space
+ vec4_t objPosition;
+ vec4_t normalizedObjPosition;
+ vec4_t spotDir;
+ vec4_t normalizedSpotDir;
+ GLfixed spotExp;
+ GLfixed spotCutoff;
+ GLfixed spotCutoffCosine;
+ GLfixed attenuation[3];
+ GLfixed rConstAttenuation;
+ GLboolean enable;
+};
+
+struct material_t {
+ vec4_t ambient;
+ vec4_t diffuse;
+ vec4_t specular;
+ vec4_t emission;
+ GLfixed shininess;
+};
+
+struct light_model_t {
+ vec4_t ambient;
+ GLboolean twoSide;
+};
+
+struct color_material_t {
+ GLenum face;
+ GLenum mode;
+ GLboolean enable;
+};
+
+struct lighting_t {
+ light_t lights[OGLES_MAX_LIGHTS];
+ material_t front;
+ light_model_t lightModel;
+ color_material_t colorMaterial;
+ vec4_t implicitSceneEmissionAndAmbient;
+ vec4_t objViewer;
+ uint32_t enabledLights;
+ GLboolean enable;
+ GLenum shadeModel;
+ typedef void (*light_fct_t)(ogles_context_t*, vertex_t*);
+ void (*lightVertex)(ogles_context_t* c, vertex_t* v);
+ void (*lightTriangle)(ogles_context_t* c,
+ vertex_t* v0, vertex_t* v1, vertex_t* v2);
+};
+
+struct culling_t {
+ GLenum cullFace;
+ GLenum frontFace;
+ GLboolean enable;
+};
+
+// ----------------------------------------------------------------------------
+// textures
+// ----------------------------------------------------------------------------
+
+struct texture_unit_t {
+ GLuint name;
+ EGLTextureObject* texture;
+ uint8_t dirty;
+};
+
+struct texture_state_t
+{
+ texture_unit_t tmu[GGL_TEXTURE_UNIT_COUNT];
+ int active; // active tmu
+ EGLTextureObject* defaultTexture;
+ GGLContext* ggl;
+ uint8_t packAlignment;
+ uint8_t unpackAlignment;
+};
+
+// ----------------------------------------------------------------------------
+// transformation and matrices
+// ----------------------------------------------------------------------------
+
+struct matrixf_t;
+
+struct matrixx_t {
+ GLfixed m[16];
+ void load(const matrixf_t& rhs);
+};
+
+struct matrix_stack_t;
+
+
+struct matrixf_t {
+ void loadIdentity();
+ void load(const matrixf_t& rhs);
+
+ inline GLfloat* editElements() { return m; }
+ inline GLfloat const* elements() const { return m; }
+
+ void set(const GLfixed* rhs);
+ void set(const GLfloat* rhs);
+
+ static void multiply(matrixf_t& r,
+ const matrixf_t& lhs, const matrixf_t& rhs);
+
+ void dump(const char* what);
+
+private:
+ friend struct matrix_stack_t;
+ GLfloat m[16];
+ void load(const GLfixed* rhs);
+ void load(const GLfloat* rhs);
+ void multiply(const matrixf_t& rhs);
+ void translate(GLfloat x, GLfloat y, GLfloat z);
+ void scale(GLfloat x, GLfloat y, GLfloat z);
+ void rotate(GLfloat a, GLfloat x, GLfloat y, GLfloat z);
+};
+
+enum {
+ OP_IDENTITY = 0x00,
+ OP_TRANSLATE = 0x01,
+ OP_UNIFORM_SCALE = 0x02,
+ OP_SCALE = 0x05,
+ OP_ROTATE = 0x08,
+ OP_SKEW = 0x10,
+ OP_ALL = 0x1F
+};
+
+struct transform_t {
+ enum {
+ FLAGS_2D_PROJECTION = 0x1
+ };
+ matrixx_t matrix;
+ uint32_t flags;
+ uint32_t ops;
+
+ union {
+ struct {
+ void (*point2)(transform_t const* t, vec4_t*, vec4_t const*);
+ void (*point3)(transform_t const* t, vec4_t*, vec4_t const*);
+ void (*point4)(transform_t const* t, vec4_t*, vec4_t const*);
+ };
+ void (*pointv[3])(transform_t const* t, vec4_t*, vec4_t const*);
+ };
+
+ void loadIdentity();
+ void picker();
+ void dump(const char* what);
+};
+
+struct mvui_transform_t : public transform_t
+{
+ void picker();
+};
+
+struct matrix_stack_t {
+ enum {
+ DO_PICKER = 0x1,
+ DO_FLOAT_TO_FIXED = 0x2
+ };
+ transform_t transform;
+ uint8_t maxDepth;
+ uint8_t depth;
+ uint8_t dirty;
+ uint8_t reserved;
+ matrixf_t *stack;
+ uint8_t *ops;
+ void init(int depth);
+ void uninit();
+ void loadIdentity();
+ void load(const GLfixed* rhs);
+ void load(const GLfloat* rhs);
+ void multiply(const matrixf_t& rhs);
+ void translate(GLfloat x, GLfloat y, GLfloat z);
+ void scale(GLfloat x, GLfloat y, GLfloat z);
+ void rotate(GLfloat a, GLfloat x, GLfloat y, GLfloat z);
+ GLint push();
+ GLint pop();
+ void validate();
+ matrixf_t& top() { return stack[depth]; }
+ const matrixf_t& top() const { return stack[depth]; }
+ uint32_t top_ops() const { return ops[depth]; }
+ inline bool isRigidBody() const {
+ return !(ops[depth] & ~(OP_TRANSLATE|OP_UNIFORM_SCALE|OP_ROTATE));
+ }
+};
+
+struct vp_transform_t {
+ transform_t transform;
+ matrixf_t matrix;
+ GLfloat zNear;
+ GLfloat zFar;
+ void loadIdentity();
+};
+
+struct transform_state_t {
+ enum {
+ MODELVIEW = 0x01,
+ PROJECTION = 0x02,
+ VIEWPORT = 0x04,
+ TEXTURE = 0x08,
+ MVUI = 0x10,
+ MVIT = 0x20,
+ MVP = 0x40,
+ };
+ matrix_stack_t *current;
+ matrix_stack_t modelview;
+ matrix_stack_t projection;
+ matrix_stack_t texture[GGL_TEXTURE_UNIT_COUNT];
+
+ // modelview * projection
+ transform_t mvp __attribute__((aligned(32)));
+ // viewport transformation
+ vp_transform_t vpt __attribute__((aligned(32)));
+ // same for 4-D vertices
+ transform_t mvp4;
+ // full modelview inverse transpose
+ transform_t mvit4;
+ // upper 3x3 of mv-inverse-transpose (for normals)
+ mvui_transform_t mvui;
+
+ GLenum matrixMode;
+ GLenum rescaleNormals;
+ uint32_t dirty;
+ void invalidate();
+ void update_mvp();
+ void update_mvit();
+ void update_mvui();
+};
+
+struct viewport_t {
+ GLint x;
+ GLint y;
+ GLsizei w;
+ GLsizei h;
+ struct {
+ GLint x;
+ GLint y;
+ } surfaceport;
+ struct {
+ GLint x;
+ GLint y;
+ GLsizei w;
+ GLsizei h;
+ } scissor;
+};
+
+// ----------------------------------------------------------------------------
+// Lerping
+// ----------------------------------------------------------------------------
+
+struct compute_iterators_t
+{
+ void initTriangle(
+ vertex_t const* v0,
+ vertex_t const* v1,
+ vertex_t const* v2);
+
+ void initLine(
+ vertex_t const* v0,
+ vertex_t const* v1);
+
+ inline void initLerp(vertex_t const* v0, uint32_t enables);
+
+ int iteratorsScale(int32_t it[3],
+ int32_t c0, int32_t c1, int32_t c2) const;
+
+ void iterators1616(GGLfixed it[3],
+ GGLfixed c0, GGLfixed c1, GGLfixed c2) const;
+
+ void iterators0032(int32_t it[3],
+ int32_t c0, int32_t c1, int32_t c2) const;
+
+ void iterators0032(int64_t it[3],
+ int32_t c0, int32_t c1, int32_t c2) const;
+
+ GGLcoord area() const { return m_area; }
+
+private:
+ // don't change order of members here -- used by iterators.S
+ GGLcoord m_dx01, m_dy10, m_dx20, m_dy02;
+ GGLcoord m_x0, m_y0;
+ GGLcoord m_area;
+ uint8_t m_scale;
+ uint8_t m_area_scale;
+ uint8_t m_reserved[2];
+
+};
+
+// ----------------------------------------------------------------------------
+// state
+// ----------------------------------------------------------------------------
+
+#ifdef HAVE_ANDROID_OS
+ // We have a dedicated TLS slot in bionic
+ inline void setGlThreadSpecific(ogles_context_t *value) {
+ ((uint32_t *)__get_tls())[TLS_SLOT_OPENGL] = (uint32_t)value;
+ }
+ inline ogles_context_t* getGlThreadSpecific() {
+ return (ogles_context_t *)(((unsigned *)__get_tls())[TLS_SLOT_OPENGL]);
+ }
+#else
+ extern pthread_key_t gGLKey;
+ inline void setGlThreadSpecific(ogles_context_t *value) {
+ pthread_setspecific(gGLKey, value);
+ }
+ inline ogles_context_t* getGlThreadSpecific() {
+ return static_cast<ogles_context_t*>(pthread_getspecific(gGLKey));
+ }
+#endif
+
+
+struct prims_t {
+ typedef ogles_context_t* GL;
+ void (*renderPoint)(GL, vertex_t*);
+ void (*renderLine)(GL, vertex_t*, vertex_t*);
+ void (*renderTriangle)(GL, vertex_t*, vertex_t*, vertex_t*);
+};
+
+struct ogles_context_t {
+ context_t rasterizer;
+ array_machine_t arrays __attribute__((aligned(32)));
+ texture_state_t textures;
+ transform_state_t transforms;
+ vertex_cache_t vc;
+ prims_t prims;
+ culling_t cull;
+ lighting_t lighting;
+ user_clip_planes_t clipPlanes;
+ compute_iterators_t lerp; __attribute__((aligned(32)));
+ vertex_t current;
+ vec4_t currentColorClamped;
+ vec3_t currentNormal;
+ viewport_t viewport;
+ point_size_t point;
+ line_width_t line;
+ polygon_offset_t polygonOffset;
+ fog_t fog;
+ uint32_t perspective : 1;
+ uint32_t transformTextures : 1;
+ EGLSurfaceManager* surfaceManager;
+ EGLBufferObjectManager* bufferObjectManager;
+
+ GLenum error;
+
+ static inline ogles_context_t* get() {
+ return getGlThreadSpecific();
+ }
+
+};
+
+}; // namespace gl
+}; // namespace android
using namespace android::gl;
+
+#endif // ANDROID_OPENGLES_CONTEXT_H
+
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index a5dc832..a1bd82d 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -14,6 +14,8 @@
** limitations under the License.
*/
+#define ATRACE_TAG ATRACE_TAG_GRAPHICS
+
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
@@ -34,6 +36,7 @@
#include <utils/KeyedVector.h>
#include <utils/SortedVector.h>
#include <utils/String8.h>
+#include <utils/Trace.h>
#include "egl_impl.h"
#include "egl_tls.h"
@@ -348,6 +351,7 @@ EGLBoolean eglQuerySurface( EGLDisplay dpy, EGLSurface surface,
}
void EGLAPI eglBeginFrame(EGLDisplay dpy, EGLSurface surface) {
+ ATRACE_CALL();
clearError();
egl_display_t const * const dp = validate_display(dpy);
@@ -712,6 +716,7 @@ __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *procname)
EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface draw)
{
+ ATRACE_CALL();
clearError();
egl_display_t const * const dp = validate_display(dpy);
diff --git a/opengl/libs/GLES_trace/src/gltrace_api.cpp b/opengl/libs/GLES_trace/src/gltrace_api.cpp
index 358bf54..cef6cbb 100644
--- a/opengl/libs/GLES_trace/src/gltrace_api.cpp
+++ b/opengl/libs/GLES_trace/src/gltrace_api.cpp
@@ -49,9 +49,12 @@ void GLTrace_glActiveTexture(GLenum texture) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -80,9 +83,12 @@ void GLTrace_glAttachShader(GLuint program, GLuint shader) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -117,9 +123,13 @@ void GLTrace_glBindAttribLocation(GLuint program, GLuint index, const GLchar* na
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) name,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -148,9 +158,12 @@ void GLTrace_glBindBuffer(GLenum target, GLuint buffer) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -179,9 +192,12 @@ void GLTrace_glBindFramebuffer(GLenum target, GLuint framebuffer) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -210,9 +226,12 @@ void GLTrace_glBindRenderbuffer(GLenum target, GLuint renderbuffer) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -241,9 +260,12 @@ void GLTrace_glBindTexture(GLenum target, GLuint texture) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -284,9 +306,12 @@ void GLTrace_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -309,9 +334,12 @@ void GLTrace_glBlendEquation(GLenum mode) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -340,9 +368,12 @@ void GLTrace_glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -371,9 +402,12 @@ void GLTrace_glBlendFunc(GLenum sfactor, GLenum dfactor) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -414,9 +448,12 @@ void GLTrace_glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha,
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -436,7 +473,7 @@ void GLTrace_glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GL
GLMessage_DataType *arg_size = glmsg.add_args();
arg_size->set_isarray(false);
arg_size->set_type(GLMessage::DataType::INT);
- arg_size->add_intvalue((int)size);
+ arg_size->add_intvalue(size);
// copy argument data
GLMessage_DataType *arg_data = glmsg.add_args();
@@ -457,9 +494,13 @@ void GLTrace_glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GL
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) data,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -479,13 +520,13 @@ void GLTrace_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, co
GLMessage_DataType *arg_offset = glmsg.add_args();
arg_offset->set_isarray(false);
arg_offset->set_type(GLMessage::DataType::INT);
- arg_offset->add_intvalue((int)offset);
+ arg_offset->add_intvalue(offset);
// copy argument size
GLMessage_DataType *arg_size = glmsg.add_args();
arg_size->set_isarray(false);
arg_size->set_type(GLMessage::DataType::INT);
- arg_size->add_intvalue((int)size);
+ arg_size->add_intvalue(size);
// copy argument data
GLMessage_DataType *arg_data = glmsg.add_args();
@@ -500,9 +541,13 @@ void GLTrace_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, co
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) data,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -531,9 +576,12 @@ GLenum GLTrace_glCheckFramebufferStatus(GLenum target) {
rt->set_type(GLMessage::DataType::ENUM);
rt->add_intvalue((int)retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -558,9 +606,12 @@ void GLTrace_glClear(GLbitfield mask) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -601,9 +652,12 @@ void GLTrace_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -626,9 +680,12 @@ void GLTrace_glClearDepthf(GLclampf depth) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -651,9 +708,12 @@ void GLTrace_glClearStencil(GLint s) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -694,9 +754,12 @@ void GLTrace_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboole
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -719,9 +782,12 @@ void GLTrace_glCompileShader(GLuint shader) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -786,9 +852,13 @@ void GLTrace_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalf
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) data,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -859,9 +929,13 @@ void GLTrace_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) data,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -926,9 +1000,12 @@ void GLTrace_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat,
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -993,9 +1070,12 @@ void GLTrace_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLin
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1018,9 +1098,12 @@ GLuint GLTrace_glCreateProgram(void) {
rt->set_type(GLMessage::DataType::INT);
rt->add_intvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -1051,9 +1134,12 @@ GLuint GLTrace_glCreateShader(GLenum type) {
rt->set_type(GLMessage::DataType::INT);
rt->add_intvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -1078,9 +1164,12 @@ void GLTrace_glCullFace(GLenum mode) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1109,9 +1198,13 @@ void GLTrace_glDeleteBuffers(GLsizei n, const GLuint* buffers) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) buffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1140,9 +1233,13 @@ void GLTrace_glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) framebuffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1165,9 +1262,12 @@ void GLTrace_glDeleteProgram(GLuint program) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1196,9 +1296,13 @@ void GLTrace_glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) renderbuffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1221,9 +1325,12 @@ void GLTrace_glDeleteShader(GLuint shader) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1252,9 +1359,13 @@ void GLTrace_glDeleteTextures(GLsizei n, const GLuint* textures) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) textures,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1277,9 +1388,12 @@ void GLTrace_glDepthFunc(GLenum func) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1302,9 +1416,12 @@ void GLTrace_glDepthMask(GLboolean flag) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1333,9 +1450,12 @@ void GLTrace_glDepthRangef(GLclampf zNear, GLclampf zFar) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1364,9 +1484,12 @@ void GLTrace_glDetachShader(GLuint program, GLuint shader) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1389,9 +1512,12 @@ void GLTrace_glDisable(GLenum cap) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1414,9 +1540,12 @@ void GLTrace_glDisableVertexAttribArray(GLuint index) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1451,9 +1580,12 @@ void GLTrace_glDrawArrays(GLenum mode, GLint first, GLsizei count) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1494,9 +1626,13 @@ void GLTrace_glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoi
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) indices,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1519,9 +1655,12 @@ void GLTrace_glEnable(GLenum cap) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1544,9 +1683,12 @@ void GLTrace_glEnableVertexAttribArray(GLuint index) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1563,9 +1705,12 @@ void GLTrace_glFinish(void) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1582,9 +1727,12 @@ void GLTrace_glFlush(void) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1625,9 +1773,12 @@ void GLTrace_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1674,9 +1825,12 @@ void GLTrace_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum tex
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1699,9 +1853,12 @@ void GLTrace_glFrontFace(GLenum mode) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1730,9 +1887,13 @@ void GLTrace_glGenBuffers(GLsizei n, GLuint* buffers) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) buffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1755,9 +1916,12 @@ void GLTrace_glGenerateMipmap(GLenum target) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1786,9 +1950,13 @@ void GLTrace_glGenFramebuffers(GLsizei n, GLuint* framebuffers) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) framebuffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1817,9 +1985,13 @@ void GLTrace_glGenRenderbuffers(GLsizei n, GLuint* renderbuffers) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) renderbuffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1848,9 +2020,13 @@ void GLTrace_glGenTextures(GLsizei n, GLuint* textures) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) textures,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1909,9 +2085,16 @@ void GLTrace_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GL
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) length,
+ (void *) size,
+ (void *) type,
+ (void *) name,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1970,9 +2153,16 @@ void GLTrace_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, G
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) length,
+ (void *) size,
+ (void *) type,
+ (void *) name,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2013,9 +2203,14 @@ void GLTrace_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* cou
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) count,
+ (void *) shaders,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2050,9 +2245,13 @@ int GLTrace_glGetAttribLocation(GLuint program, const GLchar* name) {
rt->set_type(GLMessage::DataType::INT);
rt->add_intvalue(retValue);
+ void *pointerArgs[] = {
+ (void *) name,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -2083,9 +2282,13 @@ void GLTrace_glGetBooleanv(GLenum pname, GLboolean* params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2120,9 +2323,13 @@ void GLTrace_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2145,9 +2352,12 @@ GLenum GLTrace_glGetError(void) {
rt->set_type(GLMessage::DataType::ENUM);
rt->add_intvalue((int)retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -2178,9 +2388,13 @@ void GLTrace_glGetFloatv(GLenum pname, GLfloat* params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2221,9 +2435,13 @@ void GLTrace_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachm
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2252,9 +2470,13 @@ void GLTrace_glGetIntegerv(GLenum pname, GLint* params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2289,9 +2511,13 @@ void GLTrace_glGetProgramiv(GLuint program, GLenum pname, GLint* params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2332,9 +2558,14 @@ void GLTrace_glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* lengt
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) length,
+ (void *) infolog,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2369,9 +2600,13 @@ void GLTrace_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* pa
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2406,9 +2641,13 @@ void GLTrace_glGetShaderiv(GLuint shader, GLenum pname, GLint* params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2449,9 +2688,14 @@ void GLTrace_glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length,
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) length,
+ (void *) infolog,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2492,9 +2736,14 @@ void GLTrace_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype,
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) range,
+ (void *) precision,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2535,9 +2784,14 @@ void GLTrace_glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length,
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) length,
+ (void *) source,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2566,9 +2820,13 @@ const GLubyte* GLTrace_glGetString(GLenum name) {
rt->set_type(GLMessage::DataType::INT);
rt->add_intvalue((int)retValue);
+ void *pointerArgs[] = {
+ (void *) retValue,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -2605,9 +2863,13 @@ void GLTrace_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2642,9 +2904,13 @@ void GLTrace_glGetTexParameteriv(GLenum target, GLenum pname, GLint* params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2679,9 +2945,13 @@ void GLTrace_glGetUniformfv(GLuint program, GLint location, GLfloat* params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2716,9 +2986,13 @@ void GLTrace_glGetUniformiv(GLuint program, GLint location, GLint* params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2753,9 +3027,13 @@ int GLTrace_glGetUniformLocation(GLuint program, const GLchar* name) {
rt->set_type(GLMessage::DataType::INT);
rt->add_intvalue(retValue);
+ void *pointerArgs[] = {
+ (void *) name,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -2792,9 +3070,13 @@ void GLTrace_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2829,9 +3111,13 @@ void GLTrace_glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2866,9 +3152,13 @@ void GLTrace_glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** poin
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pointer,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2897,9 +3187,12 @@ void GLTrace_glHint(GLenum target, GLenum mode) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2928,9 +3221,12 @@ GLboolean GLTrace_glIsBuffer(GLuint buffer) {
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -2961,9 +3257,12 @@ GLboolean GLTrace_glIsEnabled(GLenum cap) {
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -2994,9 +3293,12 @@ GLboolean GLTrace_glIsFramebuffer(GLuint framebuffer) {
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -3027,9 +3329,12 @@ GLboolean GLTrace_glIsProgram(GLuint program) {
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -3060,9 +3365,12 @@ GLboolean GLTrace_glIsRenderbuffer(GLuint renderbuffer) {
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -3093,9 +3401,12 @@ GLboolean GLTrace_glIsShader(GLuint shader) {
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -3126,9 +3437,12 @@ GLboolean GLTrace_glIsTexture(GLuint texture) {
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -3153,9 +3467,12 @@ void GLTrace_glLineWidth(GLfloat width) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3178,9 +3495,12 @@ void GLTrace_glLinkProgram(GLuint program) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3209,9 +3529,12 @@ void GLTrace_glPixelStorei(GLenum pname, GLint param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3240,9 +3563,12 @@ void GLTrace_glPolygonOffset(GLfloat factor, GLfloat units) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3301,9 +3627,13 @@ void GLTrace_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenu
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pixels,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3320,9 +3650,12 @@ void GLTrace_glReleaseShaderCompiler(void) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3363,9 +3696,12 @@ void GLTrace_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3394,9 +3730,12 @@ void GLTrace_glSampleCoverage(GLclampf value, GLboolean invert) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3437,9 +3776,12 @@ void GLTrace_glScissor(GLint x, GLint y, GLsizei width, GLsizei height) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3486,9 +3828,14 @@ void GLTrace_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryforma
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) shaders,
+ (void *) binary,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3529,9 +3876,14 @@ void GLTrace_glShaderSource(GLuint shader, GLsizei count, const GLchar** string,
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) string,
+ (void *) length,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3566,9 +3918,12 @@ void GLTrace_glStencilFunc(GLenum func, GLint ref, GLuint mask) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3609,9 +3964,12 @@ void GLTrace_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint m
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3634,9 +3992,12 @@ void GLTrace_glStencilMask(GLuint mask) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3665,9 +4026,12 @@ void GLTrace_glStencilMaskSeparate(GLenum face, GLuint mask) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3702,9 +4066,12 @@ void GLTrace_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3745,9 +4112,12 @@ void GLTrace_glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3818,9 +4188,13 @@ void GLTrace_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsi
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pixels,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3855,9 +4229,12 @@ void GLTrace_glTexParameterf(GLenum target, GLenum pname, GLfloat param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3892,9 +4269,13 @@ void GLTrace_glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3929,9 +4310,12 @@ void GLTrace_glTexParameteri(GLenum target, GLenum pname, GLint param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3966,9 +4350,13 @@ void GLTrace_glTexParameteriv(GLenum target, GLenum pname, const GLint* params)
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4039,9 +4427,13 @@ void GLTrace_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yo
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pixels,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4070,9 +4462,12 @@ void GLTrace_glUniform1f(GLint location, GLfloat x) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4107,9 +4502,13 @@ void GLTrace_glUniform1fv(GLint location, GLsizei count, const GLfloat* v) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) v,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4138,9 +4537,12 @@ void GLTrace_glUniform1i(GLint location, GLint x) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4175,9 +4577,13 @@ void GLTrace_glUniform1iv(GLint location, GLsizei count, const GLint* v) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) v,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4212,9 +4618,12 @@ void GLTrace_glUniform2f(GLint location, GLfloat x, GLfloat y) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4249,9 +4658,13 @@ void GLTrace_glUniform2fv(GLint location, GLsizei count, const GLfloat* v) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) v,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4286,9 +4699,12 @@ void GLTrace_glUniform2i(GLint location, GLint x, GLint y) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4323,9 +4739,13 @@ void GLTrace_glUniform2iv(GLint location, GLsizei count, const GLint* v) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) v,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4366,9 +4786,12 @@ void GLTrace_glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4403,9 +4826,13 @@ void GLTrace_glUniform3fv(GLint location, GLsizei count, const GLfloat* v) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) v,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4446,9 +4873,12 @@ void GLTrace_glUniform3i(GLint location, GLint x, GLint y, GLint z) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4483,9 +4913,13 @@ void GLTrace_glUniform3iv(GLint location, GLsizei count, const GLint* v) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) v,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4532,9 +4966,12 @@ void GLTrace_glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloa
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4569,9 +5006,13 @@ void GLTrace_glUniform4fv(GLint location, GLsizei count, const GLfloat* v) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) v,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4618,9 +5059,12 @@ void GLTrace_glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4655,9 +5099,13 @@ void GLTrace_glUniform4iv(GLint location, GLsizei count, const GLint* v) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) v,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4698,9 +5146,13 @@ void GLTrace_glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpo
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4741,9 +5193,13 @@ void GLTrace_glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpo
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4784,9 +5240,13 @@ void GLTrace_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpo
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4809,9 +5269,12 @@ void GLTrace_glUseProgram(GLuint program) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4834,9 +5297,12 @@ void GLTrace_glValidateProgram(GLuint program) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4865,9 +5331,12 @@ void GLTrace_glVertexAttrib1f(GLuint indx, GLfloat x) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4896,9 +5365,13 @@ void GLTrace_glVertexAttrib1fv(GLuint indx, const GLfloat* values) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) values,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4933,9 +5406,12 @@ void GLTrace_glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4964,9 +5440,13 @@ void GLTrace_glVertexAttrib2fv(GLuint indx, const GLfloat* values) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) values,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5007,9 +5487,12 @@ void GLTrace_glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5038,9 +5521,13 @@ void GLTrace_glVertexAttrib3fv(GLuint indx, const GLfloat* values) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) values,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5087,9 +5574,12 @@ void GLTrace_glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfl
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5118,9 +5608,13 @@ void GLTrace_glVertexAttrib4fv(GLuint indx, const GLfloat* values) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) values,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5173,9 +5667,13 @@ void GLTrace_glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboole
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) ptr,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5216,9 +5714,12 @@ void GLTrace_glViewport(GLint x, GLint y, GLsizei width, GLsizei height) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5250,9 +5751,13 @@ void GLTrace_glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) image,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5281,9 +5786,13 @@ void GLTrace_glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) image,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5330,9 +5839,15 @@ void GLTrace_glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei *len
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) length,
+ (void *) binaryFormat,
+ (void *) binary,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5373,9 +5888,13 @@ void GLTrace_glProgramBinaryOES(GLuint program, GLenum binaryFormat, const GLvoi
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) binary,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5410,9 +5929,13 @@ void* GLTrace_glMapBufferOES(GLenum target, GLenum access) {
rt->set_type(GLMessage::DataType::INT);
rt->add_intvalue((int)retValue);
+ void *pointerArgs[] = {
+ (void *) retValue,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -5443,9 +5966,12 @@ GLboolean GLTrace_glUnmapBufferOES(GLenum target) {
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -5482,9 +6008,13 @@ void GLTrace_glGetBufferPointervOES(GLenum target, GLenum pname, GLvoid** params
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5561,9 +6091,13 @@ void GLTrace_glTexImage3DOES(GLenum target, GLint level, GLenum internalformat,
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pixels,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5646,9 +6180,13 @@ void GLTrace_glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pixels,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5719,9 +6257,12 @@ void GLTrace_glCopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, G
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5792,9 +6333,13 @@ void GLTrace_glCompressedTexImage3DOES(GLenum target, GLint level, GLenum intern
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) data,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5877,9 +6422,13 @@ void GLTrace_glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoff
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) data,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5932,9 +6481,12 @@ void GLTrace_glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5957,9 +6509,12 @@ void GLTrace_glBindVertexArrayOES(GLuint array) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5988,9 +6543,13 @@ void GLTrace_glDeleteVertexArraysOES(GLsizei n, const GLuint *arrays) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) arrays,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6019,9 +6578,13 @@ void GLTrace_glGenVertexArraysOES(GLsizei n, GLuint *arrays) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) arrays,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6050,9 +6613,12 @@ GLboolean GLTrace_glIsVertexArrayOES(GLuint array) {
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -6089,9 +6655,14 @@ void GLTrace_glGetPerfMonitorGroupsAMD(GLint *numGroups, GLsizei groupsSize, GLu
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) numGroups,
+ (void *) groups,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6138,9 +6709,15 @@ void GLTrace_glGetPerfMonitorCountersAMD(GLuint group, GLint *numCounters, GLint
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) numCounters,
+ (void *) maxActiveCounters,
+ (void *) counters,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6181,9 +6758,14 @@ void GLTrace_glGetPerfMonitorGroupStringAMD(GLuint group, GLsizei bufSize, GLsiz
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) length,
+ (void *) groupString,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6230,9 +6812,14 @@ void GLTrace_glGetPerfMonitorCounterStringAMD(GLuint group, GLuint counter, GLsi
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) length,
+ (void *) counterString,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6273,9 +6860,13 @@ void GLTrace_glGetPerfMonitorCounterInfoAMD(GLuint group, GLuint counter, GLenum
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) data,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6304,9 +6895,13 @@ void GLTrace_glGenPerfMonitorsAMD(GLsizei n, GLuint *monitors) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) monitors,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6335,9 +6930,13 @@ void GLTrace_glDeletePerfMonitorsAMD(GLsizei n, GLuint *monitors) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) monitors,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6384,9 +6983,13 @@ void GLTrace_glSelectPerfMonitorCountersAMD(GLuint monitor, GLboolean enable, GL
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) countersList,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6409,9 +7012,12 @@ void GLTrace_glBeginPerfMonitorAMD(GLuint monitor) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6434,9 +7040,12 @@ void GLTrace_glEndPerfMonitorAMD(GLuint monitor) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6483,9 +7092,14 @@ void GLTrace_glGetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsize
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) data,
+ (void *) bytesWritten,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6562,9 +7176,12 @@ void GLTrace_glBlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6611,9 +7228,12 @@ void GLTrace_glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei sample
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6660,9 +7280,12 @@ void GLTrace_glRenderbufferStorageMultisampleAPPLE(GLenum target, GLsizei sample
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6679,9 +7302,12 @@ void GLTrace_glResolveMultisampleFramebufferAPPLE(void) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6722,9 +7348,13 @@ void GLTrace_glLabelObjectEXT(GLenum type, GLuint object, GLsizei length, const
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) label,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6771,9 +7401,14 @@ void GLTrace_glGetObjectLabelEXT(GLenum type, GLuint object, GLsizei bufSize, GL
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) length,
+ (void *) label,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6802,9 +7437,13 @@ void GLTrace_glInsertEventMarkerEXT(GLsizei length, const GLchar *marker) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) marker,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6833,9 +7472,13 @@ void GLTrace_glPushGroupMarkerEXT(GLsizei length, const GLchar *marker) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) marker,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6852,9 +7495,12 @@ void GLTrace_glPopGroupMarkerEXT(void) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6889,9 +7535,13 @@ void GLTrace_glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, cons
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) attachments,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6938,9 +7588,12 @@ void GLTrace_glRenderbufferStorageMultisampleEXT(GLenum target, GLsizei samples,
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6993,9 +7646,12 @@ void GLTrace_glFramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachme
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7036,9 +7692,14 @@ void GLTrace_glMultiDrawArraysEXT(GLenum mode, GLint *first, GLsizei *count, GLs
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) first,
+ (void *) count,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7085,9 +7746,14 @@ void GLTrace_glMultiDrawElementsEXT(GLenum mode, const GLsizei *count, GLenum ty
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) count,
+ (void *) indices,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7116,9 +7782,13 @@ void GLTrace_glGenQueriesEXT(GLsizei n, GLuint *ids) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) ids,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7147,9 +7817,13 @@ void GLTrace_glDeleteQueriesEXT(GLsizei n, const GLuint *ids) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) ids,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7178,9 +7852,12 @@ GLboolean GLTrace_glIsQueryEXT(GLuint id) {
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -7211,9 +7888,12 @@ void GLTrace_glBeginQueryEXT(GLenum target, GLuint id) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7236,9 +7916,12 @@ void GLTrace_glEndQueryEXT(GLenum target) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7273,9 +7956,13 @@ void GLTrace_glGetQueryivEXT(GLenum target, GLenum pname, GLint *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7310,9 +7997,13 @@ void GLTrace_glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7335,9 +8026,12 @@ GLenum GLTrace_glGetGraphicsResetStatusEXT(void) {
rt->set_type(GLMessage::DataType::ENUM);
rt->add_intvalue((int)retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -7404,9 +8098,13 @@ void GLTrace_glReadnPixelsEXT(GLint x, GLint y, GLsizei width, GLsizei height, G
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) data,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7447,9 +8145,13 @@ void GLTrace_glGetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize,
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7490,9 +8192,13 @@ void GLTrace_glGetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize,
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7527,9 +8233,12 @@ void GLTrace_glUseProgramStagesEXT(GLuint pipeline, GLbitfield stages, GLuint pr
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7558,9 +8267,12 @@ void GLTrace_glActiveShaderProgramEXT(GLuint pipeline, GLuint program) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7601,9 +8313,13 @@ GLuint GLTrace_glCreateShaderProgramvEXT(GLenum type, GLsizei count, const GLcha
rt->set_type(GLMessage::DataType::INT);
rt->add_intvalue(retValue);
+ void *pointerArgs[] = {
+ (void *) strings,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -7628,9 +8344,12 @@ void GLTrace_glBindProgramPipelineEXT(GLuint pipeline) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7659,9 +8378,13 @@ void GLTrace_glDeleteProgramPipelinesEXT(GLsizei n, const GLuint *pipelines) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pipelines,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7690,9 +8413,13 @@ void GLTrace_glGenProgramPipelinesEXT(GLsizei n, GLuint *pipelines) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pipelines,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7721,9 +8448,12 @@ GLboolean GLTrace_glIsProgramPipelineEXT(GLuint pipeline) {
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -7760,9 +8490,12 @@ void GLTrace_glProgramParameteriEXT(GLuint program, GLenum pname, GLint value) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7797,9 +8530,13 @@ void GLTrace_glGetProgramPipelineivEXT(GLuint pipeline, GLenum pname, GLint *par
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7834,9 +8571,12 @@ void GLTrace_glProgramUniform1iEXT(GLuint program, GLint location, GLint x) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7877,9 +8617,12 @@ void GLTrace_glProgramUniform2iEXT(GLuint program, GLint location, GLint x, GLin
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7926,9 +8669,12 @@ void GLTrace_glProgramUniform3iEXT(GLuint program, GLint location, GLint x, GLin
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7981,9 +8727,12 @@ void GLTrace_glProgramUniform4iEXT(GLuint program, GLint location, GLint x, GLin
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8018,9 +8767,12 @@ void GLTrace_glProgramUniform1fEXT(GLuint program, GLint location, GLfloat x) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8061,9 +8813,12 @@ void GLTrace_glProgramUniform2fEXT(GLuint program, GLint location, GLfloat x, GL
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8110,9 +8865,12 @@ void GLTrace_glProgramUniform3fEXT(GLuint program, GLint location, GLfloat x, GL
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8165,9 +8923,12 @@ void GLTrace_glProgramUniform4fEXT(GLuint program, GLint location, GLfloat x, GL
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8208,9 +8969,13 @@ void GLTrace_glProgramUniform1ivEXT(GLuint program, GLint location, GLsizei coun
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8251,9 +9016,13 @@ void GLTrace_glProgramUniform2ivEXT(GLuint program, GLint location, GLsizei coun
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8294,9 +9063,13 @@ void GLTrace_glProgramUniform3ivEXT(GLuint program, GLint location, GLsizei coun
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8337,9 +9110,13 @@ void GLTrace_glProgramUniform4ivEXT(GLuint program, GLint location, GLsizei coun
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8380,9 +9157,13 @@ void GLTrace_glProgramUniform1fvEXT(GLuint program, GLint location, GLsizei coun
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8423,9 +9204,13 @@ void GLTrace_glProgramUniform2fvEXT(GLuint program, GLint location, GLsizei coun
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8466,9 +9251,13 @@ void GLTrace_glProgramUniform3fvEXT(GLuint program, GLint location, GLsizei coun
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8509,9 +9298,13 @@ void GLTrace_glProgramUniform4fvEXT(GLuint program, GLint location, GLsizei coun
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8558,9 +9351,13 @@ void GLTrace_glProgramUniformMatrix2fvEXT(GLuint program, GLint location, GLsize
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8607,9 +9404,13 @@ void GLTrace_glProgramUniformMatrix3fvEXT(GLuint program, GLint location, GLsize
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8656,9 +9457,13 @@ void GLTrace_glProgramUniformMatrix4fvEXT(GLuint program, GLint location, GLsize
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8681,9 +9486,12 @@ void GLTrace_glValidateProgramPipelineEXT(GLuint pipeline) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8724,9 +9532,14 @@ void GLTrace_glGetProgramPipelineInfoLogEXT(GLuint pipeline, GLsizei bufSize, GL
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) length,
+ (void *) infoLog,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8767,9 +9580,12 @@ void GLTrace_glTexStorage1DEXT(GLenum target, GLsizei levels, GLenum internalfor
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8816,9 +9632,12 @@ void GLTrace_glTexStorage2DEXT(GLenum target, GLsizei levels, GLenum internalfor
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8871,9 +9690,12 @@ void GLTrace_glTexStorage3DEXT(GLenum target, GLsizei levels, GLenum internalfor
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8920,9 +9742,12 @@ void GLTrace_glTextureStorage1DEXT(GLuint texture, GLenum target, GLsizei levels
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8975,9 +9800,12 @@ void GLTrace_glTextureStorage2DEXT(GLuint texture, GLenum target, GLsizei levels
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9036,9 +9864,12 @@ void GLTrace_glTextureStorage3DEXT(GLuint texture, GLenum target, GLsizei levels
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9085,9 +9916,12 @@ void GLTrace_glRenderbufferStorageMultisampleIMG(GLenum target, GLsizei samples,
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9140,9 +9974,12 @@ void GLTrace_glFramebufferTexture2DMultisampleIMG(GLenum target, GLenum attachme
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9165,9 +10002,12 @@ void GLTrace_glCoverageMaskNV(GLboolean mask) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9190,9 +10030,12 @@ void GLTrace_glCoverageOperationNV(GLenum operation) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9221,9 +10064,13 @@ void GLTrace_glDrawBuffersNV(GLsizei n, const GLenum *bufs) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) bufs,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9252,9 +10099,13 @@ void GLTrace_glDeleteFencesNV(GLsizei n, const GLuint *fences) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) fences,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9283,9 +10134,13 @@ void GLTrace_glGenFencesNV(GLsizei n, GLuint *fences) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) fences,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9314,9 +10169,12 @@ GLboolean GLTrace_glIsFenceNV(GLuint fence) {
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -9347,9 +10205,12 @@ GLboolean GLTrace_glTestFenceNV(GLuint fence) {
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -9386,9 +10247,13 @@ void GLTrace_glGetFenceivNV(GLuint fence, GLenum pname, GLint *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9411,9 +10276,12 @@ void GLTrace_glFinishFenceNV(GLuint fence) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9442,9 +10310,12 @@ void GLTrace_glSetFenceNV(GLuint fence, GLenum condition) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9467,9 +10338,12 @@ void GLTrace_glReadBufferNV(GLenum mode) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9498,9 +10372,12 @@ void GLTrace_glAlphaFuncQCOM(GLenum func, GLclampf ref) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9535,9 +10412,14 @@ void GLTrace_glGetDriverControlsQCOM(GLint *num, GLsizei size, GLuint *driverCon
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) num,
+ (void *) driverControls,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9578,9 +10460,14 @@ void GLTrace_glGetDriverControlStringQCOM(GLuint driverControl, GLsizei bufSize,
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) length,
+ (void *) driverControlString,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9603,9 +10490,12 @@ void GLTrace_glEnableDriverControlQCOM(GLuint driverControl) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9628,9 +10518,12 @@ void GLTrace_glDisableDriverControlQCOM(GLuint driverControl) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9665,9 +10558,14 @@ void GLTrace_glExtGetTexturesQCOM(GLuint *textures, GLint maxTextures, GLint *nu
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) textures,
+ (void *) numTextures,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9702,9 +10600,14 @@ void GLTrace_glExtGetBuffersQCOM(GLuint *buffers, GLint maxBuffers, GLint *numBu
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) buffers,
+ (void *) numBuffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9739,9 +10642,14 @@ void GLTrace_glExtGetRenderbuffersQCOM(GLuint *renderbuffers, GLint maxRenderbuf
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) renderbuffers,
+ (void *) numRenderbuffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9776,9 +10684,14 @@ void GLTrace_glExtGetFramebuffersQCOM(GLuint *framebuffers, GLint maxFramebuffer
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) framebuffers,
+ (void *) numFramebuffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9825,9 +10738,13 @@ void GLTrace_glExtGetTexLevelParameterivQCOM(GLuint texture, GLenum face, GLint
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9862,9 +10779,12 @@ void GLTrace_glExtTexObjectStateOverrideiQCOM(GLenum target, GLenum pname, GLint
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9947,9 +10867,13 @@ void GLTrace_glExtGetTexSubImageQCOM(GLenum target, GLint level, GLint xoffset,
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) texels,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9978,9 +10902,13 @@ void GLTrace_glExtGetBufferPointervQCOM(GLenum target, GLvoid **params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10015,9 +10943,14 @@ void GLTrace_glExtGetShadersQCOM(GLuint *shaders, GLint maxShaders, GLint *numSh
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) shaders,
+ (void *) numShaders,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10052,9 +10985,14 @@ void GLTrace_glExtGetProgramsQCOM(GLuint *programs, GLint maxPrograms, GLint *nu
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) programs,
+ (void *) numPrograms,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10083,9 +11021,12 @@ GLboolean GLTrace_glExtIsProgramBinaryQCOM(GLuint program) {
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -10128,9 +11069,14 @@ void GLTrace_glExtGetProgramBinarySourceQCOM(GLuint program, GLenum shadertype,
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) source,
+ (void *) length,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10177,9 +11123,12 @@ void GLTrace_glStartTilingQCOM(GLuint x, GLuint y, GLuint width, GLuint height,
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10202,9 +11151,12 @@ void GLTrace_glEndTilingQCOM(GLbitfield preserveMask) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10236,9 +11188,12 @@ void GLTrace_glAlphaFunc(GLenum func, GLclampf ref) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10267,9 +11222,13 @@ void GLTrace_glClipPlanef(GLenum plane, const GLfloat *equation) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) equation,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10310,9 +11269,12 @@ void GLTrace_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10341,9 +11303,12 @@ void GLTrace_glFogf(GLenum pname, GLfloat param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10372,9 +11337,13 @@ void GLTrace_glFogfv(GLenum pname, const GLfloat *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10427,9 +11396,12 @@ void GLTrace_glFrustumf(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10458,9 +11430,13 @@ void GLTrace_glGetClipPlanef(GLenum pname, GLfloat eqn[4]) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) eqn,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10495,9 +11471,13 @@ void GLTrace_glGetLightfv(GLenum light, GLenum pname, GLfloat *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10532,9 +11512,13 @@ void GLTrace_glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10569,9 +11553,13 @@ void GLTrace_glGetTexEnvfv(GLenum env, GLenum pname, GLfloat *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10600,9 +11588,12 @@ void GLTrace_glLightModelf(GLenum pname, GLfloat param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10631,9 +11622,13 @@ void GLTrace_glLightModelfv(GLenum pname, const GLfloat *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10668,9 +11663,12 @@ void GLTrace_glLightf(GLenum light, GLenum pname, GLfloat param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10705,9 +11703,13 @@ void GLTrace_glLightfv(GLenum light, GLenum pname, const GLfloat *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10730,9 +11732,13 @@ void GLTrace_glLoadMatrixf(const GLfloat *m) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) m,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10767,9 +11773,12 @@ void GLTrace_glMaterialf(GLenum face, GLenum pname, GLfloat param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10804,9 +11813,13 @@ void GLTrace_glMaterialfv(GLenum face, GLenum pname, const GLfloat *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10829,9 +11842,13 @@ void GLTrace_glMultMatrixf(const GLfloat *m) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) m,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10878,9 +11895,12 @@ void GLTrace_glMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, G
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10915,9 +11935,12 @@ void GLTrace_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10970,9 +11993,12 @@ void GLTrace_glOrthof(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top,
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11001,9 +12027,12 @@ void GLTrace_glPointParameterf(GLenum pname, GLfloat param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11032,9 +12061,13 @@ void GLTrace_glPointParameterfv(GLenum pname, const GLfloat *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11057,9 +12090,12 @@ void GLTrace_glPointSize(GLfloat size) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11100,9 +12136,12 @@ void GLTrace_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11137,9 +12176,12 @@ void GLTrace_glScalef(GLfloat x, GLfloat y, GLfloat z) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11174,9 +12216,12 @@ void GLTrace_glTexEnvf(GLenum target, GLenum pname, GLfloat param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11211,9 +12256,13 @@ void GLTrace_glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11248,9 +12297,12 @@ void GLTrace_glTranslatef(GLfloat x, GLfloat y, GLfloat z) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11279,9 +12331,12 @@ void GLTrace_glAlphaFuncx(GLenum func, GLclampx ref) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11322,9 +12377,12 @@ void GLTrace_glClearColorx(GLclampx red, GLclampx green, GLclampx blue, GLclampx
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11347,9 +12405,12 @@ void GLTrace_glClearDepthx(GLclampx depth) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11372,9 +12433,12 @@ void GLTrace_glClientActiveTexture(GLenum texture) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11403,9 +12467,13 @@ void GLTrace_glClipPlanex(GLenum plane, const GLfixed *equation) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) equation,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11446,9 +12514,12 @@ void GLTrace_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11489,9 +12560,12 @@ void GLTrace_glColor4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11532,9 +12606,13 @@ void GLTrace_glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoi
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pointer,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11563,9 +12641,12 @@ void GLTrace_glDepthRangex(GLclampx zNear, GLclampx zFar) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11588,9 +12669,12 @@ void GLTrace_glDisableClientState(GLenum array) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11613,9 +12697,12 @@ void GLTrace_glEnableClientState(GLenum array) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11644,9 +12731,12 @@ void GLTrace_glFogx(GLenum pname, GLfixed param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11675,9 +12765,13 @@ void GLTrace_glFogxv(GLenum pname, const GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11730,9 +12824,12 @@ void GLTrace_glFrustumx(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11761,9 +12858,13 @@ void GLTrace_glGetClipPlanex(GLenum pname, GLfixed eqn[4]) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) eqn,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11792,9 +12893,13 @@ void GLTrace_glGetFixedv(GLenum pname, GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11829,9 +12934,13 @@ void GLTrace_glGetLightxv(GLenum light, GLenum pname, GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11866,9 +12975,13 @@ void GLTrace_glGetMaterialxv(GLenum face, GLenum pname, GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11897,9 +13010,13 @@ void GLTrace_glGetPointerv(GLenum pname, GLvoid **params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11934,9 +13051,13 @@ void GLTrace_glGetTexEnviv(GLenum env, GLenum pname, GLint *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11971,9 +13092,13 @@ void GLTrace_glGetTexEnvxv(GLenum env, GLenum pname, GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12008,9 +13133,13 @@ void GLTrace_glGetTexParameterxv(GLenum target, GLenum pname, GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12039,9 +13168,12 @@ void GLTrace_glLightModelx(GLenum pname, GLfixed param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12070,9 +13202,13 @@ void GLTrace_glLightModelxv(GLenum pname, const GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12107,9 +13243,12 @@ void GLTrace_glLightx(GLenum light, GLenum pname, GLfixed param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12144,9 +13283,13 @@ void GLTrace_glLightxv(GLenum light, GLenum pname, const GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12169,9 +13312,12 @@ void GLTrace_glLineWidthx(GLfixed width) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12188,9 +13334,12 @@ void GLTrace_glLoadIdentity(void) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12213,9 +13362,13 @@ void GLTrace_glLoadMatrixx(const GLfixed *m) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) m,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12238,9 +13391,12 @@ void GLTrace_glLogicOp(GLenum opcode) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12275,9 +13431,12 @@ void GLTrace_glMaterialx(GLenum face, GLenum pname, GLfixed param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12312,9 +13471,13 @@ void GLTrace_glMaterialxv(GLenum face, GLenum pname, const GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12337,9 +13500,12 @@ void GLTrace_glMatrixMode(GLenum mode) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12362,9 +13528,13 @@ void GLTrace_glMultMatrixx(const GLfixed *m) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) m,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12411,9 +13581,12 @@ void GLTrace_glMultiTexCoord4x(GLenum target, GLfixed s, GLfixed t, GLfixed r, G
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12448,9 +13621,12 @@ void GLTrace_glNormal3x(GLfixed nx, GLfixed ny, GLfixed nz) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12485,9 +13661,13 @@ void GLTrace_glNormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer)
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pointer,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12540,9 +13720,12 @@ void GLTrace_glOrthox(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top,
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12571,9 +13754,12 @@ void GLTrace_glPointParameterx(GLenum pname, GLfixed param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12602,9 +13788,13 @@ void GLTrace_glPointParameterxv(GLenum pname, const GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12627,9 +13817,12 @@ void GLTrace_glPointSizex(GLfixed size) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12658,9 +13851,12 @@ void GLTrace_glPolygonOffsetx(GLfixed factor, GLfixed units) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12677,9 +13873,12 @@ void GLTrace_glPopMatrix(void) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12696,9 +13895,12 @@ void GLTrace_glPushMatrix(void) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12739,9 +13941,12 @@ void GLTrace_glRotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12770,9 +13975,12 @@ void GLTrace_glSampleCoveragex(GLclampx value, GLboolean invert) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12807,9 +14015,12 @@ void GLTrace_glScalex(GLfixed x, GLfixed y, GLfixed z) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12832,9 +14043,12 @@ void GLTrace_glShadeModel(GLenum mode) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12875,9 +14089,13 @@ void GLTrace_glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GL
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pointer,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12912,9 +14130,12 @@ void GLTrace_glTexEnvi(GLenum target, GLenum pname, GLint param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12949,9 +14170,12 @@ void GLTrace_glTexEnvx(GLenum target, GLenum pname, GLfixed param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12986,9 +14210,13 @@ void GLTrace_glTexEnviv(GLenum target, GLenum pname, const GLint *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13023,9 +14251,13 @@ void GLTrace_glTexEnvxv(GLenum target, GLenum pname, const GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13060,9 +14292,12 @@ void GLTrace_glTexParameterx(GLenum target, GLenum pname, GLfixed param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13097,9 +14332,13 @@ void GLTrace_glTexParameterxv(GLenum target, GLenum pname, const GLfixed *params
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13134,9 +14373,12 @@ void GLTrace_glTranslatex(GLfixed x, GLfixed y, GLfixed z) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13177,9 +14419,13 @@ void GLTrace_glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvo
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pointer,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13214,9 +14460,13 @@ void GLTrace_glPointSizePointerOES(GLenum type, GLsizei stride, const GLvoid *po
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pointer,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13248,9 +14498,12 @@ void GLTrace_glBlendEquationSeparateOES(GLenum modeRGB, GLenum modeAlpha) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13291,9 +14544,12 @@ void GLTrace_glBlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, GLenum srcAlph
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13316,9 +14572,12 @@ void GLTrace_glBlendEquationOES(GLenum mode) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13365,9 +14624,12 @@ void GLTrace_glDrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLsho
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13414,9 +14676,12 @@ void GLTrace_glDrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height)
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13463,9 +14728,12 @@ void GLTrace_glDrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfix
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13488,9 +14756,13 @@ void GLTrace_glDrawTexsvOES(const GLshort *coords) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) coords,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13513,9 +14785,13 @@ void GLTrace_glDrawTexivOES(const GLint *coords) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) coords,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13538,9 +14814,13 @@ void GLTrace_glDrawTexxvOES(const GLfixed *coords) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) coords,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13587,9 +14867,12 @@ void GLTrace_glDrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLflo
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13612,9 +14895,13 @@ void GLTrace_glDrawTexfvOES(const GLfloat *coords) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) coords,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13643,9 +14930,12 @@ void GLTrace_glAlphaFuncxOES(GLenum func, GLclampx ref) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13686,9 +14976,12 @@ void GLTrace_glClearColorxOES(GLclampx red, GLclampx green, GLclampx blue, GLcla
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13711,9 +15004,12 @@ void GLTrace_glClearDepthxOES(GLclampx depth) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13742,9 +15038,13 @@ void GLTrace_glClipPlanexOES(GLenum plane, const GLfixed *equation) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) equation,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13785,9 +15085,12 @@ void GLTrace_glColor4xOES(GLfixed red, GLfixed green, GLfixed blue, GLfixed alph
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13816,9 +15119,12 @@ void GLTrace_glDepthRangexOES(GLclampx zNear, GLclampx zFar) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13847,9 +15153,12 @@ void GLTrace_glFogxOES(GLenum pname, GLfixed param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13878,9 +15187,13 @@ void GLTrace_glFogxvOES(GLenum pname, const GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13933,9 +15246,12 @@ void GLTrace_glFrustumxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13964,9 +15280,13 @@ void GLTrace_glGetClipPlanexOES(GLenum pname, GLfixed eqn[4]) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) eqn,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13995,9 +15315,13 @@ void GLTrace_glGetFixedvOES(GLenum pname, GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14032,9 +15356,13 @@ void GLTrace_glGetLightxvOES(GLenum light, GLenum pname, GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14069,9 +15397,13 @@ void GLTrace_glGetMaterialxvOES(GLenum face, GLenum pname, GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14106,9 +15438,13 @@ void GLTrace_glGetTexEnvxvOES(GLenum env, GLenum pname, GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14143,9 +15479,13 @@ void GLTrace_glGetTexParameterxvOES(GLenum target, GLenum pname, GLfixed *params
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14174,9 +15514,12 @@ void GLTrace_glLightModelxOES(GLenum pname, GLfixed param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14205,9 +15548,13 @@ void GLTrace_glLightModelxvOES(GLenum pname, const GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14242,9 +15589,12 @@ void GLTrace_glLightxOES(GLenum light, GLenum pname, GLfixed param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14279,9 +15629,13 @@ void GLTrace_glLightxvOES(GLenum light, GLenum pname, const GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14304,9 +15658,12 @@ void GLTrace_glLineWidthxOES(GLfixed width) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14329,9 +15686,13 @@ void GLTrace_glLoadMatrixxOES(const GLfixed *m) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) m,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14366,9 +15727,12 @@ void GLTrace_glMaterialxOES(GLenum face, GLenum pname, GLfixed param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14403,9 +15767,13 @@ void GLTrace_glMaterialxvOES(GLenum face, GLenum pname, const GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14428,9 +15796,13 @@ void GLTrace_glMultMatrixxOES(const GLfixed *m) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) m,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14477,9 +15849,12 @@ void GLTrace_glMultiTexCoord4xOES(GLenum target, GLfixed s, GLfixed t, GLfixed r
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14514,9 +15889,12 @@ void GLTrace_glNormal3xOES(GLfixed nx, GLfixed ny, GLfixed nz) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14569,9 +15947,12 @@ void GLTrace_glOrthoxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed to
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14600,9 +15981,12 @@ void GLTrace_glPointParameterxOES(GLenum pname, GLfixed param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14631,9 +16015,13 @@ void GLTrace_glPointParameterxvOES(GLenum pname, const GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14656,9 +16044,12 @@ void GLTrace_glPointSizexOES(GLfixed size) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14687,9 +16078,12 @@ void GLTrace_glPolygonOffsetxOES(GLfixed factor, GLfixed units) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14730,9 +16124,12 @@ void GLTrace_glRotatexOES(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14761,9 +16158,12 @@ void GLTrace_glSampleCoveragexOES(GLclampx value, GLboolean invert) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14798,9 +16198,12 @@ void GLTrace_glScalexOES(GLfixed x, GLfixed y, GLfixed z) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14835,9 +16238,12 @@ void GLTrace_glTexEnvxOES(GLenum target, GLenum pname, GLfixed param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14872,9 +16278,13 @@ void GLTrace_glTexEnvxvOES(GLenum target, GLenum pname, const GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14909,9 +16319,12 @@ void GLTrace_glTexParameterxOES(GLenum target, GLenum pname, GLfixed param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14946,9 +16359,13 @@ void GLTrace_glTexParameterxvOES(GLenum target, GLenum pname, const GLfixed *par
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14983,9 +16400,12 @@ void GLTrace_glTranslatexOES(GLfixed x, GLfixed y, GLfixed z) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15014,9 +16434,12 @@ GLboolean GLTrace_glIsRenderbufferOES(GLuint renderbuffer) {
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -15047,9 +16470,12 @@ void GLTrace_glBindRenderbufferOES(GLenum target, GLuint renderbuffer) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15078,9 +16504,13 @@ void GLTrace_glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) renderbuffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15109,9 +16539,13 @@ void GLTrace_glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) renderbuffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15152,9 +16586,12 @@ void GLTrace_glRenderbufferStorageOES(GLenum target, GLenum internalformat, GLsi
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15189,9 +16626,13 @@ void GLTrace_glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint*
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15220,9 +16661,12 @@ GLboolean GLTrace_glIsFramebufferOES(GLuint framebuffer) {
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -15253,9 +16697,12 @@ void GLTrace_glBindFramebufferOES(GLenum target, GLuint framebuffer) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15284,9 +16731,13 @@ void GLTrace_glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) framebuffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15315,9 +16766,13 @@ void GLTrace_glGenFramebuffersOES(GLsizei n, GLuint* framebuffers) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) framebuffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15346,9 +16801,12 @@ GLenum GLTrace_glCheckFramebufferStatusOES(GLenum target) {
rt->set_type(GLMessage::DataType::ENUM);
rt->add_intvalue((int)retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -15391,9 +16849,12 @@ void GLTrace_glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLen
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15440,9 +16901,12 @@ void GLTrace_glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15483,9 +16947,13 @@ void GLTrace_glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum atta
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15508,9 +16976,12 @@ void GLTrace_glGenerateMipmapOES(GLenum target) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15533,9 +17004,12 @@ void GLTrace_glCurrentPaletteMatrixOES(GLuint matrixpaletteindex) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15552,9 +17026,12 @@ void GLTrace_glLoadPaletteFromModelViewMatrixOES(void) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15595,9 +17072,13 @@ void GLTrace_glMatrixIndexPointerOES(GLint size, GLenum type, GLsizei stride, co
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pointer,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15638,9 +17119,13 @@ void GLTrace_glWeightPointerOES(GLint size, GLenum type, GLsizei stride, const G
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pointer,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15675,9 +17160,14 @@ GLbitfield GLTrace_glQueryMatrixxOES(GLfixed mantissa[16], GLint exponent[16]) {
rt->set_type(GLMessage::DataType::INT);
rt->add_intvalue(retValue);
+ void *pointerArgs[] = {
+ (void *) mantissa,
+ (void *) exponent,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -15708,9 +17198,12 @@ void GLTrace_glDepthRangefOES(GLclampf zNear, GLclampf zFar) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15763,9 +17256,12 @@ void GLTrace_glFrustumfOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15818,9 +17314,12 @@ void GLTrace_glOrthofOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat to
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15849,9 +17348,13 @@ void GLTrace_glClipPlanefOES(GLenum plane, const GLfloat *equation) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) equation,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15880,9 +17383,13 @@ void GLTrace_glGetClipPlanefOES(GLenum pname, GLfloat eqn[4]) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) eqn,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15905,9 +17412,12 @@ void GLTrace_glClearDepthfOES(GLclampf depth) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15942,9 +17452,12 @@ void GLTrace_glTexGenfOES(GLenum coord, GLenum pname, GLfloat param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15979,9 +17492,13 @@ void GLTrace_glTexGenfvOES(GLenum coord, GLenum pname, const GLfloat *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -16016,9 +17533,12 @@ void GLTrace_glTexGeniOES(GLenum coord, GLenum pname, GLint param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -16053,9 +17573,13 @@ void GLTrace_glTexGenivOES(GLenum coord, GLenum pname, const GLint *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -16090,9 +17614,12 @@ void GLTrace_glTexGenxOES(GLenum coord, GLenum pname, GLfixed param) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -16127,9 +17654,13 @@ void GLTrace_glTexGenxvOES(GLenum coord, GLenum pname, const GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -16164,9 +17695,13 @@ void GLTrace_glGetTexGenfvOES(GLenum coord, GLenum pname, GLfloat *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -16201,9 +17736,13 @@ void GLTrace_glGetTexGenivOES(GLenum coord, GLenum pname, GLint *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -16238,9 +17777,13 @@ void GLTrace_glGetTexGenxvOES(GLenum coord, GLenum pname, GLfixed *params) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -16269,9 +17812,13 @@ void GLTrace_glClipPlanefIMG(GLenum p, const GLfloat *eqn) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) eqn,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -16300,9 +17847,13 @@ void GLTrace_glClipPlanexIMG(GLenum p, const GLfixed *eqn) {
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) eqn,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
diff --git a/opengl/libs/GLES_trace/src/gltrace_fixup.cpp b/opengl/libs/GLES_trace/src/gltrace_fixup.cpp
index a043929..c69ba5e 100644
--- a/opengl/libs/GLES_trace/src/gltrace_fixup.cpp
+++ b/opengl/libs/GLES_trace/src/gltrace_fixup.cpp
@@ -76,21 +76,64 @@ unsigned getBytesPerTexel(const GLenum format, const GLenum type) {
return 1; // in doubt...
}
+void fixup_GenericFloatArray(int argIndex, int nFloats, GLMessage *glmsg, void *src) {
+ GLMessage_DataType *arg_floatarray = glmsg->mutable_args(argIndex);
+ GLfloat *floatp = (GLfloat *)src;
+
+ if (floatp == NULL) {
+ return;
+ }
+
+ arg_floatarray->set_type(GLMessage::DataType::FLOAT);
+ arg_floatarray->set_isarray(true);
+ arg_floatarray->clear_floatvalue();
+
+ for (int i = 0; i < nFloats; i++, floatp++) {
+ arg_floatarray->add_floatvalue(*floatp);
+ }
+}
+
+void fixup_GenericIntArray(int argIndex, int nInts, GLMessage *glmsg, void *src) {
+ GLMessage_DataType *arg_intarray = glmsg->mutable_args(argIndex);
+ GLint *intp = (GLint *)src;
+
+ if (intp == NULL) {
+ return;
+ }
+
+ arg_intarray->set_type(GLMessage::DataType::INT);
+ arg_intarray->set_isarray(true);
+ arg_intarray->clear_intvalue();
+
+ for (int i = 0; i < nInts; i++, intp++) {
+ arg_intarray->add_intvalue(*intp);
+ }
+}
+
+void fixup_GenericEnumArray(int argIndex, int nEnums, GLMessage *glmsg, void *src) {
+ // fixup as if they were ints
+ fixup_GenericIntArray(argIndex, nEnums, glmsg, src);
+
+ // and then set the data type to be enum
+ GLMessage_DataType *arg_enumarray = glmsg->mutable_args(argIndex);
+ arg_enumarray->set_type(GLMessage::DataType::ENUM);
+}
+
/** Generic helper function: extract pointer at argIndex and
replace it with the C style string at *pointer */
-void fixup_CStringPtr(int argIndex, GLMessage *glmsg) {
+void fixup_CStringPtr(int argIndex, GLMessage *glmsg, void *src) {
GLMessage_DataType *arg = glmsg->mutable_args(argIndex);
- GLchar *ptr = (GLchar *)arg->intvalue(0);
+ GLchar *ptr = (GLchar *) src;
arg->set_type(GLMessage::DataType::CHAR);
arg->set_isarray(true);
arg->add_charvalue(ptr);
}
-void fixup_glGetString(GLMessage *glmsg) {
+void fixup_glGetString(GLMessage *glmsg, void *pointersToFixup[]) {
/* const GLubyte* GLTrace_glGetString(GLenum name) */
GLMessage_DataType *ret = glmsg->mutable_returnvalue();
- GLchar *ptr = (GLchar *)ret->intvalue(0);
+ GLchar *ptr = (GLchar *) pointersToFixup[0];
if (ptr != NULL) {
ret->set_type(GLMessage::DataType::CHAR);
@@ -112,7 +155,7 @@ void fixup_addFBContents(GLTraceContext *context, GLMessage *glmsg, FBBinding fb
}
/** Common fixup routing for glTexImage2D & glTexSubImage2D. */
-void fixup_glTexImage(int widthIndex, int heightIndex, GLMessage *glmsg) {
+void fixup_glTexImage(int widthIndex, int heightIndex, GLMessage *glmsg, void *dataSrc) {
GLMessage_DataType arg_width = glmsg->args(widthIndex);
GLMessage_DataType arg_height = glmsg->args(heightIndex);
@@ -124,7 +167,7 @@ void fixup_glTexImage(int widthIndex, int heightIndex, GLMessage *glmsg) {
GLsizei height = arg_height.intvalue(0);
GLenum format = arg_format.intvalue(0);
GLenum type = arg_type.intvalue(0);
- void *data = (void *)arg_data->intvalue(0);
+ void *data = (void *) dataSrc;
int bytesPerTexel = getBytesPerTexel(format, type);
@@ -141,7 +184,7 @@ void fixup_glTexImage(int widthIndex, int heightIndex, GLMessage *glmsg) {
}
-void fixup_glTexImage2D(GLMessage *glmsg) {
+void fixup_glTexImage2D(GLMessage *glmsg, void *pointersToFixup[]) {
/* void glTexImage2D(GLenum target,
GLint level,
GLint internalformat,
@@ -154,10 +197,10 @@ void fixup_glTexImage2D(GLMessage *glmsg) {
*/
int widthIndex = 3;
int heightIndex = 4;
- fixup_glTexImage(widthIndex, heightIndex, glmsg);
+ fixup_glTexImage(widthIndex, heightIndex, glmsg, pointersToFixup[0]);
}
-void fixup_glTexSubImage2D(GLMessage *glmsg) {
+void fixup_glTexSubImage2D(GLMessage *glmsg, void *pointersToFixup[]) {
/*
void glTexSubImage2D(GLenum target,
GLint level,
@@ -171,10 +214,10 @@ void fixup_glTexSubImage2D(GLMessage *glmsg) {
*/
int widthIndex = 4;
int heightIndex = 5;
- fixup_glTexImage(widthIndex, heightIndex, glmsg);
+ fixup_glTexImage(widthIndex, heightIndex, glmsg, pointersToFixup[0]);
}
-void fixup_glShaderSource(GLMessage *glmsg) {
+void fixup_glShaderSource(GLMessage *glmsg, void *pointersToFixup[]) {
/* void glShaderSource(GLuint shader, GLsizei count, const GLchar** string,
const GLint* length) */
GLMessage_DataType arg_count = glmsg->args(1);
@@ -182,8 +225,8 @@ void fixup_glShaderSource(GLMessage *glmsg) {
GLMessage_DataType *arg_strpp = glmsg->mutable_args(2);
GLsizei count = arg_count.intvalue(0);
- GLchar **stringpp = (GLchar **)arg_strpp->intvalue(0);
- GLint *lengthp = (GLint *)arg_lenp.intvalue(0);
+ GLchar **stringpp = (GLchar **) pointersToFixup[0];
+ GLint *lengthp = (GLint *) pointersToFixup[1];
arg_strpp->set_type(GLMessage::DataType::CHAR);
arg_strpp->set_isarray(true);
@@ -202,48 +245,31 @@ void fixup_glShaderSource(GLMessage *glmsg) {
arg_strpp->add_charvalue(src);
}
-void fixup_glUniformGenericInteger(int argIndex, int nIntegers, GLMessage *glmsg) {
+void fixup_glUniformGenericInteger(int argIndex, int nIntegers, GLMessage *glmsg,
+ void *pointersToFixup[]) {
/* void glUniform?iv(GLint location, GLsizei count, const GLint *value); */
- GLMessage_DataType *arg_values = glmsg->mutable_args(argIndex);
- GLint *src = (GLint*)arg_values->intvalue(0);
-
- arg_values->set_type(GLMessage::DataType::INT);
- arg_values->set_isarray(true);
- arg_values->clear_intvalue();
-
- for (int i = 0; i < nIntegers; i++) {
- arg_values->add_intvalue(*src++);
- }
+ fixup_GenericIntArray(argIndex, nIntegers, glmsg, pointersToFixup[0]);
}
-void fixup_glUniformGeneric(int argIndex, int nFloats, GLMessage *glmsg) {
- GLMessage_DataType *arg_values = glmsg->mutable_args(argIndex);
- GLfloat *src = (GLfloat*)arg_values->intvalue(0);
-
- arg_values->set_type(GLMessage::DataType::FLOAT);
- arg_values->set_isarray(true);
- arg_values->clear_floatvalue();
-
- for (int i = 0; i < nFloats; i++) {
- arg_values->add_floatvalue(*src++);
- }
+void fixup_glUniformGeneric(int argIndex, int nFloats, GLMessage *glmsg, void *src) {
+ fixup_GenericFloatArray(argIndex, nFloats, glmsg, src);
}
-void fixup_glUniformMatrixGeneric(int matrixSize, GLMessage *glmsg) {
+void fixup_glUniformMatrixGeneric(int matrixSize, GLMessage *glmsg, void *pointersToFixup[]) {
/* void glUniformMatrix?fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat* value) */
GLMessage_DataType arg_count = glmsg->args(1);
int n_matrices = arg_count.intvalue(0);
- fixup_glUniformGeneric(3, matrixSize * matrixSize * n_matrices, glmsg);
+ fixup_glUniformGeneric(3, matrixSize * matrixSize * n_matrices, glmsg, pointersToFixup[0]);
}
-void fixup_glBufferData(int sizeIndex, int dataIndex, GLMessage *glmsg) {
+void fixup_glBufferData(int sizeIndex, int dataIndex, GLMessage *glmsg, void *pointersToFixup[]) {
/* void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) */
/* void glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) */
GLsizeiptr size = glmsg->args(sizeIndex).intvalue(0);
GLMessage_DataType *arg_datap = glmsg->mutable_args(dataIndex);
- GLvoid *datap = (GLvoid *)arg_datap->intvalue(0);
+ GLvoid *datap = (GLvoid *) pointersToFixup[0];
if (datap == NULL) {
// glBufferData can be called with a NULL data pointer
@@ -257,52 +283,26 @@ void fixup_glBufferData(int sizeIndex, int dataIndex, GLMessage *glmsg) {
arg_datap->add_rawbytes(datap, size);
}
-void fixup_GenericIntArray(int argIndex, int nInts, GLMessage *glmsg) {
- GLMessage_DataType *arg_intarray = glmsg->mutable_args(argIndex);
- GLint *intp = (GLint *)arg_intarray->intvalue(0);
-
- if (intp == NULL) {
- return;
- }
-
- arg_intarray->set_type(GLMessage::DataType::INT);
- arg_intarray->set_isarray(true);
- arg_intarray->clear_intvalue();
-
- for (int i = 0; i < nInts; i++, intp++) {
- arg_intarray->add_intvalue(*intp);
- }
-}
-
-void fixup_GenericEnumArray(int argIndex, int nEnums, GLMessage *glmsg) {
- // fixup as if they were ints
- fixup_GenericIntArray(argIndex, nEnums, glmsg);
-
- // and then set the data type to be enum
- GLMessage_DataType *arg_enumarray = glmsg->mutable_args(argIndex);
- arg_enumarray->set_type(GLMessage::DataType::ENUM);
-}
-
-void fixup_glGenGeneric(GLMessage *glmsg) {
+void fixup_glGenGeneric(GLMessage *glmsg, void *pointersToFixup[]) {
/* void glGen*(GLsizei n, GLuint * buffers); */
GLMessage_DataType arg_n = glmsg->args(0);
GLsizei n = arg_n.intvalue(0);
- fixup_GenericIntArray(1, n, glmsg);
+ fixup_GenericIntArray(1, n, glmsg, pointersToFixup[0]);
}
-void fixup_glDeleteGeneric(GLMessage *glmsg) {
+void fixup_glDeleteGeneric(GLMessage *glmsg, void *pointersToFixup[]) {
/* void glDelete*(GLsizei n, GLuint *buffers); */
GLMessage_DataType arg_n = glmsg->args(0);
GLsizei n = arg_n.intvalue(0);
- fixup_GenericIntArray(1, n, glmsg);
+ fixup_GenericIntArray(1, n, glmsg, pointersToFixup[0]);
}
-void fixup_glGetBooleanv(GLMessage *glmsg) {
+void fixup_glGetBooleanv(GLMessage *glmsg, void *pointersToFixup[]) {
/* void glGetBooleanv(GLenum pname, GLboolean *params); */
GLMessage_DataType *arg_params = glmsg->mutable_args(1);
- GLboolean *src = (GLboolean*)arg_params->intvalue(0);
+ GLboolean *src = (GLboolean*) pointersToFixup[0];
arg_params->set_type(GLMessage::DataType::BOOL);
arg_params->set_isarray(true);
@@ -310,10 +310,10 @@ void fixup_glGetBooleanv(GLMessage *glmsg) {
arg_params->add_boolvalue(*src);
}
-void fixup_glGetFloatv(GLMessage *glmsg) {
+void fixup_glGetFloatv(GLMessage *glmsg, void *pointersToFixup[]) {
/* void glGetFloatv(GLenum pname, GLfloat *params); */
GLMessage_DataType *arg_params = glmsg->mutable_args(1);
- GLfloat *src = (GLfloat*)arg_params->intvalue(0);
+ GLfloat *src = (GLfloat*) pointersToFixup[0];
arg_params->set_type(GLMessage::DataType::FLOAT);
arg_params->set_isarray(true);
@@ -358,16 +358,15 @@ void fixup_glLinkProgram(GLMessage *glmsg) {
}
/** Given a glGetActive[Uniform|Attrib] call, obtain the location
- * of the variable in the call.
+ * of the variable of given name in the call.
*/
-int getShaderVariableLocation(GLTraceContext *context, GLMessage *glmsg) {
+int getShaderVariableLocation(GLTraceContext *context, GLMessage *glmsg, GLchar *name) {
GLMessage_Function func = glmsg->function();
if (func != GLMessage::glGetActiveAttrib && func != GLMessage::glGetActiveUniform) {
return -1;
}
int program = glmsg->args(0).intvalue(0);
- GLchar *name = (GLchar*) glmsg->args(6).intvalue(0);
if (func == GLMessage::glGetActiveAttrib) {
return context->hooks->gl.glGetAttribLocation(program, name);
@@ -376,16 +375,17 @@ int getShaderVariableLocation(GLTraceContext *context, GLMessage *glmsg) {
}
}
-void fixup_glGetActiveAttribOrUniform(GLMessage *glmsg, int location) {
+void fixup_glGetActiveAttribOrUniform(GLTraceContext *context, GLMessage *glmsg,
+ void *pointersToFixup[]) {
/* void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize,
GLsizei* length, GLint* size, GLenum* type, GLchar* name); */
/* void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize,
GLsizei* length, GLint* size, GLenum* type, GLchar* name) */
- fixup_GenericIntArray(3, 1, glmsg); // length
- fixup_GenericIntArray(4, 1, glmsg); // size
- fixup_GenericEnumArray(5, 1, glmsg); // type
- fixup_CStringPtr(6, glmsg); // name
+ fixup_GenericIntArray(3, 1, glmsg, pointersToFixup[0]); // length
+ fixup_GenericIntArray(4, 1, glmsg, pointersToFixup[1]); // size
+ fixup_GenericEnumArray(5, 1, glmsg, pointersToFixup[2]); // type
+ fixup_CStringPtr(6, glmsg, pointersToFixup[3]); // name
// The index argument in the glGetActive[Attrib|Uniform] functions
// does not correspond to the actual location index as used in
@@ -393,6 +393,7 @@ void fixup_glGetActiveAttribOrUniform(GLMessage *glmsg, int location) {
// In order to make things simpler for the debugger, we also pass
// a hidden location argument that stores the actual location.
// append the location value to the end of the argument list
+ int location = getShaderVariableLocation(context, glmsg, (GLchar*)pointersToFixup[3]);
GLMessage_DataType *arg_location = glmsg->add_args();
arg_location->set_isarray(false);
arg_location->set_type(GLMessage::DataType::INT);
@@ -401,7 +402,7 @@ void fixup_glGetActiveAttribOrUniform(GLMessage *glmsg, int location) {
void fixupGLMessage(GLTraceContext *context, nsecs_t wallStart, nsecs_t wallEnd,
nsecs_t threadStart, nsecs_t threadEnd,
- GLMessage *glmsg) {
+ GLMessage *glmsg, void *pointersToFixup[]) {
// for all messages, set the current context id
glmsg->set_context_id(context->getId());
@@ -416,41 +417,41 @@ void fixupGLMessage(GLTraceContext *context, nsecs_t wallStart, nsecs_t wallEnd,
case GLMessage::glDeleteFramebuffers: /* glDeleteFramebuffers(GLsizei n, GLuint *buffers); */
case GLMessage::glDeleteRenderbuffers:/* glDeleteRenderbuffers(GLsizei n, GLuint *buffers); */
case GLMessage::glDeleteTextures: /* glDeleteTextures(GLsizei n, GLuint *textures); */
- fixup_glDeleteGeneric(glmsg);
+ fixup_glDeleteGeneric(glmsg, pointersToFixup);
break;
case GLMessage::glGenBuffers: /* void glGenBuffers(GLsizei n, GLuint *buffers); */
case GLMessage::glGenFramebuffers: /* void glGenFramebuffers(GLsizei n, GLuint *buffers); */
case GLMessage::glGenRenderbuffers: /* void glGenFramebuffers(GLsizei n, GLuint *buffers); */
case GLMessage::glGenTextures: /* void glGenTextures(GLsizei n, GLuint *textures); */
- fixup_glGenGeneric(glmsg);
+ fixup_glGenGeneric(glmsg, pointersToFixup);
break;
case GLMessage::glLinkProgram: /* void glLinkProgram(GLuint program); */
fixup_glLinkProgram(glmsg);
break;
case GLMessage::glGetActiveAttrib:
- fixup_glGetActiveAttribOrUniform(glmsg, getShaderVariableLocation(context, glmsg));
+ fixup_glGetActiveAttribOrUniform(context, glmsg, pointersToFixup);
break;
case GLMessage::glGetActiveUniform:
- fixup_glGetActiveAttribOrUniform(glmsg, getShaderVariableLocation(context, glmsg));
+ fixup_glGetActiveAttribOrUniform(context, glmsg, pointersToFixup);
break;
case GLMessage::glBindAttribLocation:
/* void glBindAttribLocation(GLuint program, GLuint index, const GLchar* name); */
- fixup_CStringPtr(2, glmsg);
+ fixup_CStringPtr(2, glmsg, pointersToFixup[0]);
break;
case GLMessage::glGetAttribLocation:
case GLMessage::glGetUniformLocation:
/* int glGetAttribLocation(GLuint program, const GLchar* name) */
/* int glGetUniformLocation(GLuint program, const GLchar* name) */
- fixup_CStringPtr(1, glmsg);
+ fixup_CStringPtr(1, glmsg, pointersToFixup[0]);
break;
case GLMessage::glGetBooleanv:
- fixup_glGetBooleanv(glmsg);
+ fixup_glGetBooleanv(glmsg, pointersToFixup);
break;
case GLMessage::glGetFloatv:
- fixup_glGetFloatv(glmsg);
+ fixup_glGetFloatv(glmsg, pointersToFixup);
break;
case GLMessage::glGetIntegerv: /* void glGetIntegerv(GLenum pname, GLint *params); */
- fixup_GenericIntArray(1, 1, glmsg);
+ fixup_GenericIntArray(1, 1, glmsg, pointersToFixup[0]);
break;
case GLMessage::glGetProgramiv:
case GLMessage::glGetRenderbufferParameteriv:
@@ -458,78 +459,78 @@ void fixupGLMessage(GLTraceContext *context, nsecs_t wallStart, nsecs_t wallEnd,
/* void glGetProgramiv(GLuint program, GLenum pname, GLint* params) */
/* void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) */
/* void glGetShaderiv(GLuint shader, GLenum pname, GLint* params) */
- fixup_GenericIntArray(2, 1, glmsg);
+ fixup_GenericIntArray(2, 1, glmsg, pointersToFixup[0]);
break;
case GLMessage::glGetString:
- fixup_glGetString(glmsg);
+ fixup_glGetString(glmsg, pointersToFixup);
break;
case GLMessage::glTexImage2D:
if (context->getGlobalTraceState()->shouldCollectTextureDataOnGlTexImage()) {
- fixup_glTexImage2D(glmsg);
+ fixup_glTexImage2D(glmsg, pointersToFixup);
}
break;
case GLMessage::glTexSubImage2D:
if (context->getGlobalTraceState()->shouldCollectTextureDataOnGlTexImage()) {
- fixup_glTexSubImage2D(glmsg);
+ fixup_glTexSubImage2D(glmsg, pointersToFixup);
}
break;
case GLMessage::glShaderSource:
- fixup_glShaderSource(glmsg);
+ fixup_glShaderSource(glmsg, pointersToFixup);
break;
case GLMessage::glUniform1iv:
/* void glUniform1iv(GLint location, GLsizei count, const GLint *value); */
- fixup_glUniformGenericInteger(2, 1, glmsg);
+ fixup_glUniformGenericInteger(2, 1, glmsg, pointersToFixup);
break;
case GLMessage::glUniform2iv:
/* void glUniform2iv(GLint location, GLsizei count, const GLint *value); */
- fixup_glUniformGenericInteger(2, 2, glmsg);
+ fixup_glUniformGenericInteger(2, 2, glmsg, pointersToFixup);
break;
case GLMessage::glUniform3iv:
/* void glUniform3iv(GLint location, GLsizei count, const GLint *value); */
- fixup_glUniformGenericInteger(2, 3, glmsg);
+ fixup_glUniformGenericInteger(2, 3, glmsg, pointersToFixup);
break;
case GLMessage::glUniform4iv:
/* void glUniform4iv(GLint location, GLsizei count, const GLint *value); */
- fixup_glUniformGenericInteger(2, 4, glmsg);
+ fixup_glUniformGenericInteger(2, 4, glmsg, pointersToFixup);
break;
case GLMessage::glUniform1fv:
/* void glUniform1fv(GLint location, GLsizei count, const GLfloat *value); */
- fixup_glUniformGeneric(2, 1, glmsg);
+ fixup_glUniformGeneric(2, 1, glmsg, pointersToFixup[0]);
break;
case GLMessage::glUniform2fv:
/* void glUniform2fv(GLint location, GLsizei count, const GLfloat *value); */
- fixup_glUniformGeneric(2, 2, glmsg);
+ fixup_glUniformGeneric(2, 2, glmsg, pointersToFixup[0]);
break;
case GLMessage::glUniform3fv:
/* void glUniform3fv(GLint location, GLsizei count, const GLfloat *value); */
- fixup_glUniformGeneric(2, 3, glmsg);
+ fixup_glUniformGeneric(2, 3, glmsg, pointersToFixup[0]);
break;
case GLMessage::glUniform4fv:
/* void glUniform4fv(GLint location, GLsizei count, const GLfloat *value); */
- fixup_glUniformGeneric(2, 4, glmsg);
+ fixup_glUniformGeneric(2, 4, glmsg, pointersToFixup[0]);
break;
case GLMessage::glUniformMatrix2fv:
/* void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat* value) */
- fixup_glUniformMatrixGeneric(2, glmsg);
+ fixup_glUniformMatrixGeneric(2, glmsg, pointersToFixup);
break;
case GLMessage::glUniformMatrix3fv:
/* void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat* value) */
- fixup_glUniformMatrixGeneric(3, glmsg);
+ fixup_glUniformMatrixGeneric(3, glmsg, pointersToFixup);
break;
case GLMessage::glUniformMatrix4fv:
/* void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat* value) */
- fixup_glUniformMatrixGeneric(4, glmsg);
+ fixup_glUniformMatrixGeneric(4, glmsg, pointersToFixup);
break;
case GLMessage::glBufferData:
/* void glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) */
- fixup_glBufferData(1, 2, glmsg);
+ fixup_glBufferData(1, 2, glmsg, pointersToFixup);
break;
case GLMessage::glBufferSubData:
/* void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) */
- fixup_glBufferData(2, 3, glmsg);
+ fixup_glBufferData(2, 3, glmsg, pointersToFixup);
break;
case GLMessage::glDrawArrays:
/* void glDrawArrays(GLenum mode, GLint first, GLsizei count) */
@@ -545,11 +546,11 @@ void fixupGLMessage(GLTraceContext *context, nsecs_t wallStart, nsecs_t wallEnd,
break;
case GLMessage::glPushGroupMarkerEXT:
/* void PushGroupMarkerEXT(sizei length, const char *marker); */
- fixup_CStringPtr(1, glmsg);
+ fixup_CStringPtr(1, glmsg, pointersToFixup[0]);
break;
case GLMessage::glInsertEventMarkerEXT:
/* void InsertEventMarkerEXT(sizei length, const char *marker); */
- fixup_CStringPtr(1, glmsg);
+ fixup_CStringPtr(1, glmsg, pointersToFixup[0]);
break;
default:
break;
diff --git a/opengl/libs/GLES_trace/src/gltrace_fixup.h b/opengl/libs/GLES_trace/src/gltrace_fixup.h
index f63b056..fe30125 100644
--- a/opengl/libs/GLES_trace/src/gltrace_fixup.h
+++ b/opengl/libs/GLES_trace/src/gltrace_fixup.h
@@ -27,7 +27,7 @@ namespace gltrace {
void fixupGLMessage(GLTraceContext *curContext, nsecs_t wallStart, nsecs_t wallEnd,
nsecs_t threadStart, nsecs_t threadEnd,
- GLMessage *message);
+ GLMessage *message, void *pointersToFixup[]);
void fixup_addFBContents(GLTraceContext *curContext, GLMessage *message, FBBinding fbToRead);
};
diff --git a/opengl/libs/GLES_trace/tools/genapi.py b/opengl/libs/GLES_trace/tools/genapi.py
index e1660be..24034c1 100755
--- a/opengl/libs/GLES_trace/tools/genapi.py
+++ b/opengl/libs/GLES_trace/tools/genapi.py
@@ -92,8 +92,8 @@ GL2PROTOBUF_TYPE_MAP = {
"GLclampf":DataType.FLOAT,
"GLfixed":DataType.INT,
"GLclampx":DataType.INT,
- "GLsizeiptr":DataType.POINTER,
- "GLintptr":DataType.POINTER,
+ "GLsizeiptr":DataType.INT,
+ "GLintptr":DataType.INT,
"GLeglImageOES":DataType.POINTER,
}
@@ -180,9 +180,20 @@ TRACE_CALL_TEMPLATE = pyratemp.Template(
rt->$!retDataType.getProtobufCall()!$retValue);
<!--(end)-->
+ void *pointerArgs[] = {
+<!--(for argname, argtype in parsedArgs)-->
+ <!--(if argtype == DataType.POINTER)-->
+ (void *) $!argname!$,
+ <!--(end)-->
+<!--(end)-->
+<!--(if retDataType == DataType.POINTER)-->
+ (void *) retValue,
+<!--(end)-->
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
<!--(if retType != "void")-->
diff --git a/packages/FakeOemFeatures/Android.mk b/packages/FakeOemFeatures/Android.mk
new file mode 100644
index 0000000..b0b0eeb
--- /dev/null
+++ b/packages/FakeOemFeatures/Android.mk
@@ -0,0 +1,15 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := debug
+
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+LOCAL_PACKAGE_NAME := FakeOemFeatures
+LOCAL_CERTIFICATE := platform
+
+LOCAL_PROGUARD_ENABLED := disabled
+
+include $(BUILD_PACKAGE)
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/packages/FakeOemFeatures/AndroidManifest.xml b/packages/FakeOemFeatures/AndroidManifest.xml
new file mode 100644
index 0000000..57938ac
--- /dev/null
+++ b/packages/FakeOemFeatures/AndroidManifest.xml
@@ -0,0 +1,25 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.fakeoemfeatures"
+ coreApp="true"
+ >
+
+ <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
+
+ <application
+ android:persistent="true"
+ android:name=".FakeApp"
+ android:allowClearUserData="false"
+ android:allowBackup="false"
+ android:hardwareAccelerated="true"
+ android:label="Fake OEM Features">
+
+ <service android:name=".FakeCoreService" android:process=":core"
+ android:label="Fake OEM Core Service" />
+ <service android:name=".FakeCoreService2" android:process=":core"
+ android:label="Fake OEM Core Service Also" />
+ <service android:name=".FakeCoreService3" android:process=":core"
+ android:label="Fake OEM Core Service Me Too" />
+ <service android:name=".FakeBackgroundService" android:process=":background"
+ android:label="Fake OEM Bg Service" />
+ </application>
+</manifest>
diff --git a/packages/FakeOemFeatures/MODULE_LICENSE_APACHE2 b/packages/FakeOemFeatures/MODULE_LICENSE_APACHE2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/FakeOemFeatures/MODULE_LICENSE_APACHE2
diff --git a/packages/FakeOemFeatures/NOTICE b/packages/FakeOemFeatures/NOTICE
new file mode 100644
index 0000000..c5b1efa
--- /dev/null
+++ b/packages/FakeOemFeatures/NOTICE
@@ -0,0 +1,190 @@
+
+ Copyright (c) 2005-2008, The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
diff --git a/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeApp.java b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeApp.java
new file mode 100644
index 0000000..436e579
--- /dev/null
+++ b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeApp.java
@@ -0,0 +1,157 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.fakeoemfeatures;
+
+import android.app.ActivityManager;
+import android.app.ActivityThread;
+import android.app.AlertDialog;
+import android.app.Application;
+import android.app.Dialog;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.Message;
+import android.util.Slog;
+import android.view.Display;
+import android.view.ViewGroup;
+import android.view.WindowManager;
+
+public class FakeApp extends Application {
+ // Stuffing of 20MB
+ static final int STUFFING_SIZE_BYTES = 20*1024*1024;
+ static final int STUFFING_SIZE_INTS = STUFFING_SIZE_BYTES/4;
+ int[] mStuffing;
+
+ // Assume 4k pages.
+ static final int PAGE_SIZE = 4*1024;
+
+ static final long TICK_DELAY = 4*60*60*1000; // One hour
+ static final int MSG_TICK = 1;
+ final Handler mHandler = new Handler() {
+ @Override public void handleMessage(Message msg) {
+ switch (msg.what) {
+ case MSG_TICK:
+ // Our service is IMPORTANT. We know, we wrote it.
+ // We need to keep that thing running. Because WE KNOW.
+ // Damn you users, STOP MESSING WITH US.
+ startService(new Intent(FakeApp.this, FakeBackgroundService.class));
+ sendEmptyMessageDelayed(MSG_TICK, TICK_DELAY);
+ break;
+ default:
+ super.handleMessage(msg);
+ break;
+ }
+ }
+ };
+
+ // Always run another process for more per-process overhead.
+ ServiceConnection mServiceConnection = new ServiceConnection() {
+ @Override public void onServiceConnected(ComponentName name, IBinder service) {
+ }
+
+ @Override public void onServiceDisconnected(ComponentName name) {
+ }
+ };
+ ServiceConnection mServiceConnection2 = new ServiceConnection() {
+ @Override public void onServiceConnected(ComponentName name, IBinder service) {
+ }
+
+ @Override public void onServiceDisconnected(ComponentName name) {
+ }
+ };
+ ServiceConnection mServiceConnection3 = new ServiceConnection() {
+ @Override public void onServiceConnected(ComponentName name, IBinder service) {
+ }
+
+ @Override public void onServiceDisconnected(ComponentName name) {
+ }
+ };
+
+ @Override
+ public void onCreate() {
+ String processName = ActivityThread.currentPackageName();
+ Slog.i("FakeOEMFeatures", "Creating app in process: " + processName);
+ if (!getApplicationInfo().packageName.equals(processName)) {
+ // If we are not in the main process of the app, then don't do
+ // our extra overhead stuff.
+ return;
+ }
+
+ final WindowManager wm = (WindowManager)getSystemService(Context.WINDOW_SERVICE);
+ final Display display = wm.getDefaultDisplay();
+
+ // Check to make sure we are not running on a user build. If this
+ // is a user build, WARN! Do not want!
+ if ("user".equals(android.os.Build.TYPE)) {
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setTitle("Should not be on user build");
+ builder.setMessage("The app Fake OEM Features should not be installed on a "
+ + "user build. Please remove this .apk before shipping this build to "
+ + " your customers!");
+ builder.setCancelable(false);
+ builder.setPositiveButton("I understand", null);
+ Dialog dialog = builder.create();
+ dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
+ dialog.show();
+ }
+
+ // Make a fake window that is always around eating graphics resources.
+ FakeView view = new FakeView(this);
+ WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
+ WindowManager.LayoutParams.TYPE_SYSTEM_ALERT,
+ WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
+ | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
+ | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
+ if (ActivityManager.isHighEndGfx(display)) {
+ lp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
+ }
+ lp.width = ViewGroup.LayoutParams.MATCH_PARENT;
+ lp.height = ViewGroup.LayoutParams.MATCH_PARENT;
+ int maxSize = display.getMaximumSizeDimension();
+ maxSize *= 2;
+ lp.x = maxSize;
+ lp.y = maxSize;
+ lp.setTitle(getPackageName());
+ wm.addView(view, lp);
+
+ // Bind to a fake service we want to keep running in another process.
+ bindService(new Intent(this, FakeCoreService.class), mServiceConnection,
+ Context.BIND_AUTO_CREATE);
+ bindService(new Intent(this, FakeCoreService2.class), mServiceConnection2,
+ Context.BIND_AUTO_CREATE);
+ bindService(new Intent(this, FakeCoreService3.class), mServiceConnection3,
+ Context.BIND_AUTO_CREATE);
+
+ // Start to a fake service that should run in the background of
+ // another process.
+ mHandler.sendEmptyMessage(MSG_TICK);
+
+ // Make a fake allocation to consume some RAM.
+ mStuffing = new int[STUFFING_SIZE_INTS];
+ for (int i=0; i<STUFFING_SIZE_BYTES/PAGE_SIZE; i++) {
+ // Fill each page with a unique value.
+ final int VAL = i*2 + 100;
+ final int OFF = (i*PAGE_SIZE)/4;
+ for (int j=0; j<(PAGE_SIZE/4); j++) {
+ mStuffing[OFF+j] = VAL;
+ }
+ }
+ }
+}
diff --git a/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeBackgroundService.java b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeBackgroundService.java
new file mode 100644
index 0000000..5d1a398
--- /dev/null
+++ b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeBackgroundService.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.fakeoemfeatures;
+
+import java.util.ArrayList;
+import java.util.Random;
+
+import android.app.Dialog;
+import android.app.Service;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.Message;
+import android.view.Display;
+import android.view.ViewGroup;
+import android.view.WindowManager;
+
+public class FakeBackgroundService extends Service {
+ final ArrayList<int[]> mAllocs = new ArrayList<int[]>();
+
+ final Random mRandom = new Random();
+
+ static final long TICK_DELAY = 30*1000; // 30 seconds
+ static final int MSG_TICK = 1;
+ final Handler mHandler = new Handler() {
+ @Override public void handleMessage(Message msg) {
+ switch (msg.what) {
+ case MSG_TICK:
+ // We are awesome! To prove we are doing awesome stuff,
+ // we must use some memory! It wouldn't be awesome if
+ // we didn't use memory!
+ for (int i=0; i<5; i++) {
+ try {
+ int[] alloc = new int[FakeApp.PAGE_SIZE/4];
+ mAllocs.add(alloc);
+ final int VAL = mRandom.nextInt();
+ for (int j=0; j<FakeApp.PAGE_SIZE/4; j++) {
+ alloc[j] = VAL;
+ }
+ } catch (OutOfMemoryError e) {
+ }
+ }
+ sendEmptyMessageDelayed(MSG_TICK, TICK_DELAY);
+ break;
+ default:
+ super.handleMessage(msg);
+ break;
+ }
+ }
+ };
+
+ @Override public void onCreate() {
+ super.onCreate();
+ mHandler.sendEmptyMessageDelayed(MSG_TICK, TICK_DELAY);
+
+ final WindowManager wm = (WindowManager)getSystemService(Context.WINDOW_SERVICE);
+ final Display display = wm.getDefaultDisplay();
+
+ // Make a fake window that is always around eating graphics resources.
+ FakeView view = new FakeView(this);
+ Dialog dialog = new Dialog(this, android.R.style.Theme_Holo_Dialog);
+ dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
+ dialog.getWindow().setFlags(
+ WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
+ | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
+ | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
+ | WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
+ WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
+ | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
+ | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
+ | WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED
+ | WindowManager.LayoutParams.FLAG_DIM_BEHIND);
+ dialog.getWindow().setDimAmount(0);
+ dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT);
+ WindowManager.LayoutParams lp = dialog.getWindow().getAttributes();
+ int maxSize = display.getMaximumSizeDimension();
+ maxSize *= 2;
+ lp.x = maxSize;
+ lp.y = maxSize;
+ lp.setTitle(getPackageName() + ":background");
+ dialog.getWindow().setAttributes(lp);
+ dialog.getWindow().setContentView(view);
+ dialog.show();
+ }
+
+ @Override public void onDestroy() {
+ super.onDestroy();
+ mHandler.removeMessages(MSG_TICK);
+ }
+
+ @Override public IBinder onBind(Intent intent) {
+ return null;
+ }
+}
diff --git a/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeCoreService.java b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeCoreService.java
new file mode 100644
index 0000000..86bc506
--- /dev/null
+++ b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeCoreService.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.fakeoemfeatures;
+
+import android.app.Service;
+import android.content.Intent;
+import android.os.Binder;
+import android.os.IBinder;
+
+public class FakeCoreService extends Service {
+ final Binder mBinder = new Binder();
+
+ @Override
+ public IBinder onBind(Intent intent) {
+ return mBinder;
+ }
+}
diff --git a/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeCoreService2.java b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeCoreService2.java
new file mode 100644
index 0000000..f06988d
--- /dev/null
+++ b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeCoreService2.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.fakeoemfeatures;
+
+public class FakeCoreService2 extends FakeCoreService {
+}
diff --git a/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeCoreService3.java b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeCoreService3.java
new file mode 100644
index 0000000..a35adb2
--- /dev/null
+++ b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeCoreService3.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.fakeoemfeatures;
+
+public class FakeCoreService3 extends FakeCoreService {
+}
diff --git a/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeView.java b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeView.java
new file mode 100644
index 0000000..276d55ee
--- /dev/null
+++ b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeView.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.fakeoemfeatures;
+
+import java.util.Random;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.os.Handler;
+import android.os.Message;
+import android.view.View;
+
+/**
+ * Dummy view to emulate stuff an OEM may want to do.
+ */
+public class FakeView extends View {
+ static final long TICK_DELAY = 30*1000; // 30 seconds
+ static final int MSG_TICK = 1;
+
+ final Handler mHandler = new Handler() {
+ @Override public void handleMessage(Message msg) {
+ switch (msg.what) {
+ case MSG_TICK:
+ invalidate();
+ sendEmptyMessageDelayed(MSG_TICK, TICK_DELAY);
+ break;
+ default:
+ super.handleMessage(msg);
+ break;
+ }
+ }
+ };
+
+ final Paint mPaint = new Paint();
+ final Random mRandom = new Random();
+
+ public FakeView(Context context) {
+ super(context);
+ }
+
+ @Override
+ protected void onAttachedToWindow() {
+ super.onAttachedToWindow();
+ mHandler.sendEmptyMessageDelayed(MSG_TICK, TICK_DELAY);
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+ mHandler.removeMessages(MSG_TICK);
+ }
+
+ @Override
+ protected void onDraw(Canvas canvas) {
+ super.onDraw(canvas);
+ canvas.drawColor(0xff000000);
+ mPaint.setTextSize(mRandom.nextInt(40) + 10);
+ mPaint.setColor(0xff000000 + mRandom.nextInt(0x1000000));
+ int x = mRandom.nextInt(getWidth()) - (getWidth()/2);
+ int y = mRandom.nextInt(getHeight());
+ canvas.drawText("abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",
+ x, y, mPaint);
+ }
+}
diff --git a/packages/SystemUI/res/layout/navigation_bar.xml b/packages/SystemUI/res/layout/navigation_bar.xml
index d19fd81..82fcc88 100644
--- a/packages/SystemUI/res/layout/navigation_bar.xml
+++ b/packages/SystemUI/res/layout/navigation_bar.xml
@@ -68,7 +68,7 @@
android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_home"
systemui:keyCode="3"
- systemui:keyRepeat="false"
+ systemui:keyRepeat="true"
android:layout_weight="0"
systemui:glowBackground="@drawable/ic_sysbar_highlight"
android:contentDescription="@string/accessibility_home"
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index 3a2ea65..a08b99a 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -22,7 +22,6 @@
<drawable name="notification_item_background_color_pressed">#ff257390</drawable>
<drawable name="ticker_background_color">#ff1d1d1d</drawable>
<drawable name="status_bar_background">#ff000000</drawable>
- <drawable name="status_bar_recents_background_solid">#b3000000</drawable>
<drawable name="status_bar_recents_app_thumbnail_background">#88000000</drawable>
<color name="status_bar_recents_app_label_color">#ffffffff</color>
<drawable name="status_bar_notification_row_background_color">#ff090909</drawable>
diff --git a/packages/SystemUI/src/com/android/systemui/SwipeHelper.java b/packages/SystemUI/src/com/android/systemui/SwipeHelper.java
index 14ce266..276ca21 100644
--- a/packages/SystemUI/src/com/android/systemui/SwipeHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/SwipeHelper.java
@@ -53,6 +53,7 @@ public class SwipeHelper {
// where fade starts
static final float ALPHA_FADE_END = 0.5f; // fraction of thumbnail width
// beyond which alpha->0
+ private float mMinAlpha = 0f;
private float mPagingTouchSlop;
private Callback mCallback;
@@ -120,6 +121,10 @@ public class SwipeHelper {
v.getMeasuredHeight();
}
+ public void setMinAlpha(float minAlpha) {
+ mMinAlpha = minAlpha;
+ }
+
private float getAlphaForOffset(View view) {
float viewSize = getSize(view);
final float fadeSize = ALPHA_FADE_END * viewSize;
@@ -130,10 +135,7 @@ public class SwipeHelper {
} else if (pos < viewSize * (1.0f - ALPHA_FADE_START)) {
result = 1.0f + (viewSize * ALPHA_FADE_START + pos) / fadeSize;
}
- // Make .03 alpha the minimum so you always see the item a bit-- slightly below
- // .03, the item disappears entirely (as if alpha = 0) and that discontinuity looks
- // a bit jarring
- return Math.max(0.03f, result);
+ return Math.max(mMinAlpha, result);
}
// invalidate the view's own bounds all the way up the view hierarchy
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsCallback.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsCallback.java
index 78050a2..deb5670 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsCallback.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsCallback.java
@@ -27,9 +27,5 @@ public interface RecentsCallback {
void handleOnClick(View selectedView);
void handleSwipe(View selectedView);
void handleLongPress(View selectedView, View anchorView, View thumbnailView);
- void handleShowBackground(boolean show);
void dismiss();
-
- // TODO: find another way to get this info from RecentsPanelView
- boolean isRecentsVisible();
}
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java
index 4dc3e33..97c9553 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java
@@ -44,7 +44,7 @@ import com.android.systemui.recent.RecentsPanelView.TaskDescriptionAdapter;
import java.util.ArrayList;
public class RecentsHorizontalScrollView extends HorizontalScrollView
- implements SwipeHelper.Callback {
+ implements SwipeHelper.Callback, RecentsPanelView.RecentsScrollView {
private static final String TAG = RecentsPanelView.TAG;
private static final boolean DEBUG = RecentsPanelView.DEBUG;
private LinearLayout mLinearLayout;
@@ -65,6 +65,10 @@ public class RecentsHorizontalScrollView extends HorizontalScrollView
mRecycledViews = new ArrayList<View>();
}
+ public void setMinSwipeAlpha(float minAlpha) {
+ mSwipeHelper.setMinAlpha(minAlpha);
+ }
+
private int scrollPositionOfMostRecent() {
return mLinearLayout.getWidth() - getWidth();
}
@@ -217,14 +221,6 @@ public class RecentsHorizontalScrollView extends HorizontalScrollView
}
@Override
- protected void onLayout (boolean changed, int left, int top, int right, int bottom) {
- super.onLayout(changed, left, top, right, bottom);
- if (mPerformanceHelper != null) {
- mPerformanceHelper.onLayoutCallback();
- }
- }
-
- @Override
public void draw(Canvas canvas) {
super.draw(canvas);
@@ -327,12 +323,6 @@ public class RecentsHorizontalScrollView extends HorizontalScrollView
});
}
- public void onRecentsVisibilityChanged() {
- if (mPerformanceHelper != null) {
- mPerformanceHelper.updateShowBackground();
- }
- }
-
@Override
protected void onVisibilityChanged(View changedView, int visibility) {
super.onVisibilityChanged(changedView, visibility);
@@ -379,9 +369,6 @@ public class RecentsHorizontalScrollView extends HorizontalScrollView
@Override
public void setLayoutTransition(LayoutTransition transition) {
- if (mPerformanceHelper != null) {
- mPerformanceHelper.setLayoutTransitionCallback(transition);
- }
// The layout transition applies to our embedded LinearLayout
mLinearLayout.setLayoutTransition(transition);
}
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
index 7896720..61aaa43 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
@@ -32,13 +32,14 @@ import android.net.Uri;
import android.provider.Settings;
import android.util.AttributeSet;
import android.util.Log;
+import android.view.Display;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
-import android.view.ViewRootImpl;
+import android.view.WindowManager;
import android.view.accessibility.AccessibilityEvent;
import android.view.animation.AnimationUtils;
import android.widget.AdapterView;
@@ -91,6 +92,13 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
public void onRecentsPanelVisibilityChanged(boolean visible);
}
+ public static interface RecentsScrollView {
+ public int numItemsInOneScreenful();
+ public void setAdapter(TaskDescriptionAdapter adapter);
+ public void setCallback(RecentsCallback callback);
+ public void setMinSwipeAlpha(float minAlpha);
+ }
+
private final class OnLongClickDelegate implements View.OnLongClickListener {
View mOtherView;
OnLongClickDelegate(View other) {
@@ -195,16 +203,11 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
}
public int numItemsInOneScreenful() {
- if (mRecentsContainer instanceof RecentsHorizontalScrollView){
- RecentsHorizontalScrollView scrollView
- = (RecentsHorizontalScrollView) mRecentsContainer;
+ if (mRecentsContainer instanceof RecentsScrollView){
+ RecentsScrollView scrollView
+ = (RecentsScrollView) mRecentsContainer;
return scrollView.numItemsInOneScreenful();
- } else if (mRecentsContainer instanceof RecentsVerticalScrollView){
- RecentsVerticalScrollView scrollView
- = (RecentsVerticalScrollView) mRecentsContainer;
- return scrollView.numItemsInOneScreenful();
- }
- else {
+ } else {
throw new IllegalArgumentException("missing Recents[Horizontal]ScrollView");
}
}
@@ -325,18 +328,6 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
}
}
- public void handleShowBackground(boolean show) {
- if (show) {
- mRecentsScrim.setBackgroundResource(R.drawable.status_bar_recents_background_solid);
- } else {
- mRecentsScrim.setBackgroundDrawable(null);
- }
- }
-
- public boolean isRecentsVisible() {
- return getVisibility() == VISIBLE;
- }
-
public void onAnimationCancel(Animator animation) {
}
@@ -438,18 +429,12 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
mRecentsContainer = (ViewGroup) findViewById(R.id.recents_container);
mStatusBarTouchProxy = (StatusBarTouchProxy) findViewById(R.id.status_bar_touch_proxy);
mListAdapter = new TaskDescriptionAdapter(mContext);
- if (mRecentsContainer instanceof RecentsHorizontalScrollView){
- RecentsHorizontalScrollView scrollView
- = (RecentsHorizontalScrollView) mRecentsContainer;
- scrollView.setAdapter(mListAdapter);
- scrollView.setCallback(this);
- } else if (mRecentsContainer instanceof RecentsVerticalScrollView){
- RecentsVerticalScrollView scrollView
- = (RecentsVerticalScrollView) mRecentsContainer;
+ if (mRecentsContainer instanceof RecentsScrollView){
+ RecentsScrollView scrollView
+ = (RecentsScrollView) mRecentsContainer;
scrollView.setAdapter(mListAdapter);
scrollView.setCallback(this);
- }
- else {
+ } else {
throw new IllegalArgumentException("missing Recents[Horizontal]ScrollView");
}
@@ -457,9 +442,15 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
mRecentsNoApps = findViewById(R.id.recents_no_apps);
mChoreo = new Choreographer(this, mRecentsScrim, mRecentsContainer, mRecentsNoApps, this);
- // In order to save space, we make the background texture repeat in the Y direction
- if (mRecentsScrim != null && mRecentsScrim.getBackground() instanceof BitmapDrawable) {
- ((BitmapDrawable) mRecentsScrim.getBackground()).setTileModeY(TileMode.REPEAT);
+ if (mRecentsScrim != null) {
+ Display d = ((WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE))
+ .getDefaultDisplay();
+ if (!ActivityManager.isHighEndGfx(d)) {
+ mRecentsScrim.setBackgroundDrawable(null);
+ } else if (mRecentsScrim.getBackground() instanceof BitmapDrawable) {
+ // In order to save space, we make the background texture repeat in the Y direction
+ ((BitmapDrawable) mRecentsScrim.getBackground()).setTileModeY(TileMode.REPEAT);
+ }
}
mPreloadTasksRunnable = new Runnable() {
@@ -472,27 +463,20 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
};
}
+ public void setMinSwipeAlpha(float minAlpha) {
+ if (mRecentsContainer instanceof RecentsScrollView){
+ RecentsScrollView scrollView
+ = (RecentsScrollView) mRecentsContainer;
+ scrollView.setMinSwipeAlpha(minAlpha);
+ }
+ }
+
private void createCustomAnimations(LayoutTransition transitioner) {
transitioner.setDuration(200);
transitioner.setStartDelay(LayoutTransition.CHANGE_DISAPPEARING, 0);
transitioner.setAnimator(LayoutTransition.DISAPPEARING, null);
}
- @Override
- protected void onVisibilityChanged(View changedView, int visibility) {
- super.onVisibilityChanged(changedView, visibility);
- if (DEBUG) Log.v(TAG, "onVisibilityChanged(" + changedView + ", " + visibility + ")");
-
- if (mRecentsContainer instanceof RecentsHorizontalScrollView) {
- ((RecentsHorizontalScrollView) mRecentsContainer).onRecentsVisibilityChanged();
- } else if (mRecentsContainer instanceof RecentsVerticalScrollView) {
- ((RecentsVerticalScrollView) mRecentsContainer).onRecentsVisibilityChanged();
- } else {
- throw new IllegalArgumentException("missing Recents[Horizontal]ScrollView");
- }
- }
-
-
private void updateIcon(ViewHolder h, Drawable icon, boolean show, boolean anim) {
if (icon != null) {
h.iconView.setImageDrawable(icon);
@@ -543,8 +527,7 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
synchronized (td) {
if (mRecentsContainer != null) {
ViewGroup container = mRecentsContainer;
- if (container instanceof HorizontalScrollView
- || container instanceof ScrollView) {
+ if (container instanceof RecentsScrollView) {
container = (ViewGroup) container.findViewById(
R.id.recents_linear_layout);
}
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsScrollViewPerformanceHelper.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsScrollViewPerformanceHelper.java
index 813099a..5529d0c 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsScrollViewPerformanceHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsScrollViewPerformanceHelper.java
@@ -78,39 +78,13 @@ public class RecentsScrollViewPerformanceHelper {
mScrollView.setVerticalFadingEdgeEnabled(false);
mScrollView.setHorizontalFadingEdgeEnabled(false);
}
- if (mSoftwareRendered && OPTIMIZE_SW_RENDERED_RECENTS) {
- mCallback = callback;
- mLinearLayout = layout;
- mAttachedToWindow = true;
- mBackgroundDrawable = mContext.getResources()
- .getDrawable(R.drawable.status_bar_recents_background_solid).getConstantState();
- updateShowBackground();
- }
-
}
public void addViewCallback(View newLinearLayoutChild) {
if (mSoftwareRendered && OPTIMIZE_SW_RENDERED_RECENTS) {
final View view = newLinearLayoutChild;
- if (mShowBackground) {
- view.setBackgroundDrawable(mBackgroundDrawable.newDrawable());
- view.setDrawingCacheEnabled(true);
- view.buildDrawingCache();
- } else {
- view.setBackgroundDrawable(null);
- view.setDrawingCacheEnabled(false);
- view.destroyDrawingCache();
- }
- }
- }
-
- public void onLayoutCallback() {
- if (mSoftwareRendered && OPTIMIZE_SW_RENDERED_RECENTS) {
- mScrollView.post(new Runnable() {
- public void run() {
- updateShowBackground();
- }
- });
+ view.setDrawingCacheEnabled(true);
+ view.buildDrawingCache();
}
}
@@ -118,37 +92,6 @@ public class RecentsScrollViewPerformanceHelper {
int left, int right, int top, int bottom, int scrollX, int scrollY,
float topFadingEdgeStrength, float bottomFadingEdgeStrength,
float leftFadingEdgeStrength, float rightFadingEdgeStrength) {
- if (mSoftwareRendered && OPTIMIZE_SW_RENDERED_RECENTS) {
- if (mIsVertical) {
- if (scrollY < 0) {
- Drawable d = mBackgroundDrawable.newDrawable().getCurrent();
- d.setBounds(0, scrollY, mScrollView.getWidth(), 0);
- d.draw(canvas);
- } else {
- final int childHeight = mLinearLayout.getHeight();
- if (scrollY + mScrollView.getHeight() > childHeight) {
- Drawable d = mBackgroundDrawable.newDrawable().getCurrent();
- d.setBounds(0, childHeight, mScrollView.getWidth(),
- scrollY + mScrollView.getHeight());
- d.draw(canvas);
- }
- }
- } else {
- if (scrollX < 0) {
- Drawable d = mBackgroundDrawable.newDrawable().getCurrent();
- d.setBounds(scrollX, 0, 0, mScrollView.getHeight());
- d.draw(canvas);
- } else {
- final int childWidth = mLinearLayout.getWidth();
- if (scrollX + mScrollView.getWidth() > childWidth) {
- Drawable d = mBackgroundDrawable.newDrawable().getCurrent();
- d.setBounds(childWidth, 0,
- scrollX + mScrollView.getWidth(), mScrollView.getHeight());
- d.draw(canvas);
- }
- }
- }
- }
if ((mSoftwareRendered && OPTIMIZE_SW_RENDERED_RECENTS)
|| USE_DARK_FADE_IN_HW_ACCELERATED_MODE) {
@@ -241,64 +184,4 @@ public class RecentsScrollViewPerformanceHelper {
return mFadingEdgeLength;
}
- public void setLayoutTransitionCallback(LayoutTransition transition) {
- if (mSoftwareRendered && OPTIMIZE_SW_RENDERED_RECENTS) {
- if (transition != null) {
- transition.addTransitionListener(new LayoutTransition.TransitionListener() {
- @Override
- public void startTransition(LayoutTransition transition,
- ViewGroup container, View view, int transitionType) {
- updateShowBackground();
- }
-
- @Override
- public void endTransition(LayoutTransition transition,
- ViewGroup container, View view, int transitionType) {
- updateShowBackground();
- }
- });
- }
- }
- }
-
- // Turn on/off drawing the background in our ancestor, and turn on/off drawing
- // in the items in LinearLayout contained by this scrollview.
- // Moving the background drawing to our children, and turning on a drawing cache
- // for each of them, gives us a ~20fps gain when Recents is rendered in software
- public void updateShowBackground() {
- if (!mAttachedToWindow) {
- // We haven't been initialized yet-- we'll get called again when we are
- return;
- }
- if (mSoftwareRendered && OPTIMIZE_SW_RENDERED_RECENTS) {
- LayoutTransition transition = mLinearLayout.getLayoutTransition();
- int linearLayoutSize =
- mIsVertical ? mLinearLayout.getHeight() : mLinearLayout.getWidth();
- int scrollViewSize =
- mIsVertical ? mScrollView.getHeight() : mScrollView.getWidth();
- boolean show = !mScrollView.isHardwareAccelerated() &&
- (linearLayoutSize > scrollViewSize) &&
- !(transition != null && transition.isRunning()) &&
- mCallback.isRecentsVisible();
-
- if (!mFirstTime && show == mShowBackground) return;
- mShowBackground = show;
- mFirstTime = false;
-
- mCallback.handleShowBackground(!show);
- for (int i = 0; i < mLinearLayout.getChildCount(); i++) {
- View v = mLinearLayout.getChildAt(i);
- if (show) {
- v.setBackgroundDrawable(mBackgroundDrawable.newDrawable());
- v.setDrawingCacheEnabled(true);
- v.buildDrawingCache();
- } else {
- v.setDrawingCacheEnabled(false);
- v.destroyDrawingCache();
- v.setBackgroundDrawable(null);
- }
- }
- }
- }
-
}
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java
index 19fce37..f4e516c 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java
@@ -43,7 +43,8 @@ import com.android.systemui.recent.RecentsPanelView.TaskDescriptionAdapter;
import java.util.ArrayList;
-public class RecentsVerticalScrollView extends ScrollView implements SwipeHelper.Callback {
+public class RecentsVerticalScrollView extends ScrollView
+ implements SwipeHelper.Callback, RecentsPanelView.RecentsScrollView {
private static final String TAG = RecentsPanelView.TAG;
private static final boolean DEBUG = RecentsPanelView.DEBUG;
private LinearLayout mLinearLayout;
@@ -65,6 +66,10 @@ public class RecentsVerticalScrollView extends ScrollView implements SwipeHelper
mRecycledViews = new ArrayList<View>();
}
+ public void setMinSwipeAlpha(float minAlpha) {
+ mSwipeHelper.setMinAlpha(minAlpha);
+ }
+
private int scrollPositionOfMostRecent() {
return mLinearLayout.getHeight() - getHeight();
}
@@ -224,14 +229,6 @@ public class RecentsVerticalScrollView extends ScrollView implements SwipeHelper
}
@Override
- protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
- super.onLayout(changed, left, top, right, bottom);
- if (mPerformanceHelper != null) {
- mPerformanceHelper.onLayoutCallback();
- }
- }
-
- @Override
public void draw(Canvas canvas) {
super.draw(canvas);
@@ -334,12 +331,6 @@ public class RecentsVerticalScrollView extends ScrollView implements SwipeHelper
});
}
- public void onRecentsVisibilityChanged() {
- if (mPerformanceHelper != null) {
- mPerformanceHelper.updateShowBackground();
- }
- }
-
@Override
protected void onVisibilityChanged(View changedView, int visibility) {
super.onVisibilityChanged(changedView, visibility);
@@ -387,9 +378,6 @@ public class RecentsVerticalScrollView extends ScrollView implements SwipeHelper
@Override
public void setLayoutTransition(LayoutTransition transition) {
- if (mPerformanceHelper != null) {
- mPerformanceHelper.setLayoutTransitionCallback(transition);
- }
// The layout transition applies to our embedded LinearLayout
mLinearLayout.setLayoutTransition(transition);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 2458495..2e1f120 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -397,6 +397,9 @@ public class PhoneStatusBar extends StatusBar {
(opaque ? PixelFormat.OPAQUE : PixelFormat.TRANSLUCENT));
if (ActivityManager.isHighEndGfx(mDisplay)) {
lp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
+ } else {
+ lp.flags |= WindowManager.LayoutParams.FLAG_DIM_BEHIND;
+ lp.dimAmount = 0.7f;
}
lp.gravity = Gravity.BOTTOM | Gravity.LEFT;
lp.setTitle("RecentsPanel");
@@ -429,6 +432,11 @@ public class PhoneStatusBar extends StatusBar {
mRecentsPanel.setOnTouchListener(new TouchOutsideListener(MSG_CLOSE_RECENTS_PANEL,
mRecentsPanel));
mRecentsPanel.setVisibility(View.GONE);
+
+ // Make .03 alpha the minimum so you always see the item a bit-- slightly below
+ // .03, the item disappears entirely (as if alpha = 0) and that discontinuity looks
+ // a bit jarring
+ mRecentsPanel.setMinSwipeAlpha(0.03f);
WindowManager.LayoutParams lp = getRecentsLayoutParams(mRecentsPanel.getLayoutParams());
WindowManagerImpl.getDefault().addView(mRecentsPanel, lp);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
index c59290c..95704f6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
@@ -203,7 +203,7 @@ public class NetworkController extends BroadcastReceiver {
mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
Handler handler = new WifiHandler();
mWifiChannel = new AsyncChannel();
- Messenger wifiMessenger = mWifiManager.getMessenger();
+ Messenger wifiMessenger = mWifiManager.getWifiServiceMessenger();
if (wifiMessenger != null) {
mWifiChannel.connect(mContext, handler, wifiMessenger);
}
@@ -767,17 +767,10 @@ public class NetworkController extends BroadcastReceiver {
} else if (!mWifiConnected) {
mWifiSsid = null;
}
- // Apparently the wifi level is not stable at this point even if we've just connected to
- // the network; we need to wait for an RSSI_CHANGED_ACTION for that. So let's just set
- // it to 0 for now
- mWifiLevel = 0;
- mWifiRssi = -200;
} else if (action.equals(WifiManager.RSSI_CHANGED_ACTION)) {
- if (mWifiConnected) {
- mWifiRssi = intent.getIntExtra(WifiManager.EXTRA_NEW_RSSI, -200);
- mWifiLevel = WifiManager.calculateSignalLevel(
- mWifiRssi, WifiIcons.WIFI_LEVEL_COUNT);
- }
+ mWifiRssi = intent.getIntExtra(WifiManager.EXTRA_NEW_RSSI, -200);
+ mWifiLevel = WifiManager.calculateSignalLevel(
+ mWifiRssi, WifiIcons.WIFI_LEVEL_COUNT);
}
updateWifiIcons();
diff --git a/packages/VpnDialogs/res/layout/manage.xml b/packages/VpnDialogs/res/layout/manage.xml
index ec710ff..56332c3 100644
--- a/packages/VpnDialogs/res/layout/manage.xml
+++ b/packages/VpnDialogs/res/layout/manage.xml
@@ -32,12 +32,12 @@
<TextView android:id="@+id/duration" style="@style/value"/>
</TableRow>
- <TableRow>
+ <TableRow android:id="@+id/data_transmitted_row" android:visibility="gone">
<TextView android:text="@string/data_transmitted" style="@style/label"/>
<TextView android:id="@+id/data_transmitted" style="@style/value"/>
</TableRow>
- <TableRow>
+ <TableRow android:id="@+id/data_received_row" android:visibility="gone">
<TextView android:text="@string/data_received" style="@style/label"/>
<TextView android:id="@+id/data_received" style="@style/value"/>
</TableRow>
diff --git a/packages/VpnDialogs/res/values-af/strings.xml b/packages/VpnDialogs/res/values-af/strings.xml
index 6f9ac18..2c23fa3 100644
--- a/packages/VpnDialogs/res/values-af/strings.xml
+++ b/packages/VpnDialogs/res/values-af/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Tydsduur:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Gestuur:"</string>
<string name="data_received" msgid="4062776929376067820">"Ontvang:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> grepe/<xliff:g id="NUMBER_1">%2$s</xliff:g> pakkies"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-am/strings.xml b/packages/VpnDialogs/res/values-am/strings.xml
index c13c56b..7fc9897 100644
--- a/packages/VpnDialogs/res/values-am/strings.xml
+++ b/packages/VpnDialogs/res/values-am/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"ጊዜ"</string>
<string name="data_transmitted" msgid="7988167672982199061">"ተልኳል ለ:"</string>
<string name="data_received" msgid="4062776929376067820">"ተቀብሏል፡"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> ባይትስ / <xliff:g id="NUMBER_1">%2$s</xliff:g> ፓኬቶች"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-ar/strings.xml b/packages/VpnDialogs/res/values-ar/strings.xml
index 337b2ce..2380fa2 100644
--- a/packages/VpnDialogs/res/values-ar/strings.xml
+++ b/packages/VpnDialogs/res/values-ar/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"المدة:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"مرسل:"</string>
<string name="data_received" msgid="4062776929376067820">"تم الاستلام:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> بايت / <xliff:g id="NUMBER_1">%2$s</xliff:g> من الحزم"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-be/strings.xml b/packages/VpnDialogs/res/values-be/strings.xml
index 45baff5..af43aef 100644
--- a/packages/VpnDialogs/res/values-be/strings.xml
+++ b/packages/VpnDialogs/res/values-be/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Працягласць:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Адпраўлена:"</string>
<string name="data_received" msgid="4062776929376067820">"Атрымана:"</string>
- <string name="blank_value" msgid="6278484582661984635">"-"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> байт / <xliff:g id="NUMBER_1">%2$s</xliff:g> пакеты"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-bg/strings.xml b/packages/VpnDialogs/res/values-bg/strings.xml
index 5d186a3..7ecfac7 100644
--- a/packages/VpnDialogs/res/values-bg/strings.xml
+++ b/packages/VpnDialogs/res/values-bg/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Продължителност:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Изпратено:"</string>
<string name="data_received" msgid="4062776929376067820">"Получено:"</string>
- <string name="blank_value" msgid="6278484582661984635">"–"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> байта/ <xliff:g id="NUMBER_1">%2$s</xliff:g> пакета"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-ca/strings.xml b/packages/VpnDialogs/res/values-ca/strings.xml
index 91236aa..e5332e0 100644
--- a/packages/VpnDialogs/res/values-ca/strings.xml
+++ b/packages/VpnDialogs/res/values-ca/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Durada:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Enviat:"</string>
<string name="data_received" msgid="4062776929376067820">"Rebut:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bytes/<xliff:g id="NUMBER_1">%2$s</xliff:g> paquets"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-cs/strings.xml b/packages/VpnDialogs/res/values-cs/strings.xml
index ee737a1..28e861f 100644
--- a/packages/VpnDialogs/res/values-cs/strings.xml
+++ b/packages/VpnDialogs/res/values-cs/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Doba trvání:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Odesláno:"</string>
<string name="data_received" msgid="4062776929376067820">"Přijato:"</string>
- <string name="blank_value" msgid="6278484582661984635">"–"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bajtů / <xliff:g id="NUMBER_1">%2$s</xliff:g> paketů"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-da/strings.xml b/packages/VpnDialogs/res/values-da/strings.xml
index 2a48a90..a226d0e 100644
--- a/packages/VpnDialogs/res/values-da/strings.xml
+++ b/packages/VpnDialogs/res/values-da/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Varighed:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Sendt:"</string>
<string name="data_received" msgid="4062776929376067820">"Modtaget:"</string>
- <string name="blank_value" msgid="6278484582661984635">"–"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bytes / <xliff:g id="NUMBER_1">%2$s</xliff:g> pakker"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-de/strings.xml b/packages/VpnDialogs/res/values-de/strings.xml
index 0d2ee85..124a985 100644
--- a/packages/VpnDialogs/res/values-de/strings.xml
+++ b/packages/VpnDialogs/res/values-de/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Dauer:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Gesendet:"</string>
<string name="data_received" msgid="4062776929376067820">"Empfangen:"</string>
- <string name="blank_value" msgid="6278484582661984635">"-"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> Byte/<xliff:g id="NUMBER_1">%2$s</xliff:g> Pakete"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-el/strings.xml b/packages/VpnDialogs/res/values-el/strings.xml
index b82272a..5aefde4 100644
--- a/packages/VpnDialogs/res/values-el/strings.xml
+++ b/packages/VpnDialogs/res/values-el/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Διάρκεια:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Στάλθηκε:"</string>
<string name="data_received" msgid="4062776929376067820">"Λήφθηκε:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> byte / <xliff:g id="NUMBER_1">%2$s</xliff:g> πακέτα"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-en-rGB/strings.xml b/packages/VpnDialogs/res/values-en-rGB/strings.xml
index d7c411a..afc46d8 100644
--- a/packages/VpnDialogs/res/values-en-rGB/strings.xml
+++ b/packages/VpnDialogs/res/values-en-rGB/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Duration:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Sent:"</string>
<string name="data_received" msgid="4062776929376067820">"Received:"</string>
- <string name="blank_value" msgid="6278484582661984635">"-"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bytes / <xliff:g id="NUMBER_1">%2$s</xliff:g> packets"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-es-rUS/strings.xml b/packages/VpnDialogs/res/values-es-rUS/strings.xml
index 58e72d1..4276065 100644
--- a/packages/VpnDialogs/res/values-es-rUS/strings.xml
+++ b/packages/VpnDialogs/res/values-es-rUS/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Duración:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Enviados:"</string>
<string name="data_received" msgid="4062776929376067820">"Recibidos:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bytes / <xliff:g id="NUMBER_1">%2$s</xliff:g> paquetes"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-es/strings.xml b/packages/VpnDialogs/res/values-es/strings.xml
index 79ad80c..272042a 100644
--- a/packages/VpnDialogs/res/values-es/strings.xml
+++ b/packages/VpnDialogs/res/values-es/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Duración:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Enviado:"</string>
<string name="data_received" msgid="4062776929376067820">"Recibido:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bytes / <xliff:g id="NUMBER_1">%2$s</xliff:g> paquetes"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-et/strings.xml b/packages/VpnDialogs/res/values-et/strings.xml
index 3a1ac5a..c016eb0 100644
--- a/packages/VpnDialogs/res/values-et/strings.xml
+++ b/packages/VpnDialogs/res/values-et/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Kestus:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Saadetud:"</string>
<string name="data_received" msgid="4062776929376067820">"Vastu on võetud:"</string>
- <string name="blank_value" msgid="6278484582661984635">"-"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> baiti / <xliff:g id="NUMBER_1">%2$s</xliff:g> paketti"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-fa/strings.xml b/packages/VpnDialogs/res/values-fa/strings.xml
index 9a76594..7bd5590 100644
--- a/packages/VpnDialogs/res/values-fa/strings.xml
+++ b/packages/VpnDialogs/res/values-fa/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"مدت زمان:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"ارسال شده:"</string>
<string name="data_received" msgid="4062776929376067820">"دریافتی:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> بایت / <xliff:g id="NUMBER_1">%2$s</xliff:g> بسته"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-fi/strings.xml b/packages/VpnDialogs/res/values-fi/strings.xml
index c8d830c..2ca550d 100644
--- a/packages/VpnDialogs/res/values-fi/strings.xml
+++ b/packages/VpnDialogs/res/values-fi/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Kesto:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Lähetetty:"</string>
<string name="data_received" msgid="4062776929376067820">"Vastaanotettu:"</string>
- <string name="blank_value" msgid="6278484582661984635">"-"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> tavua / <xliff:g id="NUMBER_1">%2$s</xliff:g> pakettia"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-fr/strings.xml b/packages/VpnDialogs/res/values-fr/strings.xml
index e38c1a2..64334fd 100644
--- a/packages/VpnDialogs/res/values-fr/strings.xml
+++ b/packages/VpnDialogs/res/values-fr/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Durée :"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Envoyé :"</string>
<string name="data_received" msgid="4062776929376067820">"Reçu :"</string>
- <string name="blank_value" msgid="6278484582661984635">"–"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> octets / <xliff:g id="NUMBER_1">%2$s</xliff:g> paquets"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-hi/strings.xml b/packages/VpnDialogs/res/values-hi/strings.xml
index 7166877..e2cb51a 100644
--- a/packages/VpnDialogs/res/values-hi/strings.xml
+++ b/packages/VpnDialogs/res/values-hi/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"अवधि:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"भेजे गए:"</string>
<string name="data_received" msgid="4062776929376067820">"प्राप्त:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> बाइट / <xliff:g id="NUMBER_1">%2$s</xliff:g> पैकेट"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-hr/strings.xml b/packages/VpnDialogs/res/values-hr/strings.xml
index cdbffbc..f825bef 100644
--- a/packages/VpnDialogs/res/values-hr/strings.xml
+++ b/packages/VpnDialogs/res/values-hr/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Trajanje:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Poslano:"</string>
<string name="data_received" msgid="4062776929376067820">"Primljeno:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"Bajtova: <xliff:g id="NUMBER_0">%1$s</xliff:g>/paketa: <xliff:g id="NUMBER_1">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-hu/strings.xml b/packages/VpnDialogs/res/values-hu/strings.xml
index a268402..cb12f27 100644
--- a/packages/VpnDialogs/res/values-hu/strings.xml
+++ b/packages/VpnDialogs/res/values-hu/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Időtartam:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Elküldve:"</string>
<string name="data_received" msgid="4062776929376067820">"Érkezett:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bájt/<xliff:g id="NUMBER_1">%2$s</xliff:g> adatcsomag"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-in/strings.xml b/packages/VpnDialogs/res/values-in/strings.xml
index 1721d68..c9710e5 100644
--- a/packages/VpnDialogs/res/values-in/strings.xml
+++ b/packages/VpnDialogs/res/values-in/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Durasi:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Terkirim:"</string>
<string name="data_received" msgid="4062776929376067820">"Diterima:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> byte / <xliff:g id="NUMBER_1">%2$s</xliff:g> paket"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-it/strings.xml b/packages/VpnDialogs/res/values-it/strings.xml
index 98e5cc9..224f083 100644
--- a/packages/VpnDialogs/res/values-it/strings.xml
+++ b/packages/VpnDialogs/res/values-it/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Durata:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Inviati:"</string>
<string name="data_received" msgid="4062776929376067820">"Ricevuti:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> byte/<xliff:g id="NUMBER_1">%2$s</xliff:g> pacchetti"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-iw/strings.xml b/packages/VpnDialogs/res/values-iw/strings.xml
index 4b8d125..bb845ee 100644
--- a/packages/VpnDialogs/res/values-iw/strings.xml
+++ b/packages/VpnDialogs/res/values-iw/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"משך:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"נשלח:"</string>
<string name="data_received" msgid="4062776929376067820">"התקבל:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> בתים / <xliff:g id="NUMBER_1">%2$s</xliff:g> מנות"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-ja/strings.xml b/packages/VpnDialogs/res/values-ja/strings.xml
index 751162f..a88c388 100644
--- a/packages/VpnDialogs/res/values-ja/strings.xml
+++ b/packages/VpnDialogs/res/values-ja/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"期間:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"送信:"</string>
<string name="data_received" msgid="4062776929376067820">"受信:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g>バイト/<xliff:g id="NUMBER_1">%2$s</xliff:g>パケット"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-ko/strings.xml b/packages/VpnDialogs/res/values-ko/strings.xml
index cfc4ffc..38a5e2e 100644
--- a/packages/VpnDialogs/res/values-ko/strings.xml
+++ b/packages/VpnDialogs/res/values-ko/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"기간:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"보냄:"</string>
<string name="data_received" msgid="4062776929376067820">"수신됨:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g>바이트/<xliff:g id="NUMBER_1">%2$s</xliff:g>패킷"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-lt/strings.xml b/packages/VpnDialogs/res/values-lt/strings.xml
index e70c5e8..8ed3045 100644
--- a/packages/VpnDialogs/res/values-lt/strings.xml
+++ b/packages/VpnDialogs/res/values-lt/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Trukmė:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Išsiųsta"</string>
<string name="data_received" msgid="4062776929376067820">"Gauta"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"Baitų: <xliff:g id="NUMBER_0">%1$s</xliff:g> baitų / paketų: <xliff:g id="NUMBER_1">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-lv/strings.xml b/packages/VpnDialogs/res/values-lv/strings.xml
index 2e1a9f7..2f41747 100644
--- a/packages/VpnDialogs/res/values-lv/strings.xml
+++ b/packages/VpnDialogs/res/values-lv/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Ilgums:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Nosūtīts:"</string>
<string name="data_received" msgid="4062776929376067820">"Saņemts:"</string>
- <string name="blank_value" msgid="6278484582661984635">"—"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> baiti/<xliff:g id="NUMBER_1">%2$s</xliff:g> paketes"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-ms/strings.xml b/packages/VpnDialogs/res/values-ms/strings.xml
index f17d851..417fbae 100644
--- a/packages/VpnDialogs/res/values-ms/strings.xml
+++ b/packages/VpnDialogs/res/values-ms/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Tempoh:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Dihantar:"</string>
<string name="data_received" msgid="4062776929376067820">"Diterima:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bait / <xliff:g id="NUMBER_1">%2$s</xliff:g> bingkisan"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-nb/strings.xml b/packages/VpnDialogs/res/values-nb/strings.xml
index fbd9185..f716422 100644
--- a/packages/VpnDialogs/res/values-nb/strings.xml
+++ b/packages/VpnDialogs/res/values-nb/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Varighet:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Sendt:"</string>
<string name="data_received" msgid="4062776929376067820">"Mottatt:"</string>
- <string name="blank_value" msgid="6278484582661984635">"–"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> byte / <xliff:g id="NUMBER_1">%2$s</xliff:g> pakker"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-nl/strings.xml b/packages/VpnDialogs/res/values-nl/strings.xml
index 7f6e0b1..795071e 100644
--- a/packages/VpnDialogs/res/values-nl/strings.xml
+++ b/packages/VpnDialogs/res/values-nl/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Duur:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Verzonden:"</string>
<string name="data_received" msgid="4062776929376067820">"Ontvangen:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bytes/<xliff:g id="NUMBER_1">%2$s</xliff:g> pakketten"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-pl/strings.xml b/packages/VpnDialogs/res/values-pl/strings.xml
index 80c5a7c..a918162 100644
--- a/packages/VpnDialogs/res/values-pl/strings.xml
+++ b/packages/VpnDialogs/res/values-pl/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Czas trwania:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Wysłano:"</string>
<string name="data_received" msgid="4062776929376067820">"Odebrano:"</string>
- <string name="blank_value" msgid="6278484582661984635">"–"</string>
<string name="data_value_format" msgid="2192466557826897580">"Bajty: <xliff:g id="NUMBER_0">%1$s</xliff:g> / pakiety: <xliff:g id="NUMBER_1">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-pt-rPT/strings.xml b/packages/VpnDialogs/res/values-pt-rPT/strings.xml
index e25ef66..007cd51 100644
--- a/packages/VpnDialogs/res/values-pt-rPT/strings.xml
+++ b/packages/VpnDialogs/res/values-pt-rPT/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Duração:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Enviados:"</string>
<string name="data_received" msgid="4062776929376067820">"Recebidos:"</string>
- <string name="blank_value" msgid="6278484582661984635">"-"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bytes / <xliff:g id="NUMBER_1">%2$s</xliff:g> pacotes"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-pt/strings.xml b/packages/VpnDialogs/res/values-pt/strings.xml
index 8a16e87..07c8482 100644
--- a/packages/VpnDialogs/res/values-pt/strings.xml
+++ b/packages/VpnDialogs/res/values-pt/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Duração:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Enviado:"</string>
<string name="data_received" msgid="4062776929376067820">"Recebido:"</string>
- <string name="blank_value" msgid="6278484582661984635">"-"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bytes/<xliff:g id="NUMBER_1">%2$s</xliff:g> pacotes"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-ro/strings.xml b/packages/VpnDialogs/res/values-ro/strings.xml
index 5b71cfa..fbc0d808 100644
--- a/packages/VpnDialogs/res/values-ro/strings.xml
+++ b/packages/VpnDialogs/res/values-ro/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Durată:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Trimise:"</string>
<string name="data_received" msgid="4062776929376067820">"Primite:"</string>
- <string name="blank_value" msgid="6278484582661984635">"-"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> (de) octeţi/<xliff:g id="NUMBER_1">%2$s</xliff:g> (de) pachete"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-ru/strings.xml b/packages/VpnDialogs/res/values-ru/strings.xml
index 411c51a..b65e9d3 100644
--- a/packages/VpnDialogs/res/values-ru/strings.xml
+++ b/packages/VpnDialogs/res/values-ru/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Продолжительность:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Отправлено:"</string>
<string name="data_received" msgid="4062776929376067820">"Получено:"</string>
- <string name="blank_value" msgid="6278484582661984635">"–"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> Б; пакетов: <xliff:g id="NUMBER_1">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-sk/strings.xml b/packages/VpnDialogs/res/values-sk/strings.xml
index 733efd4..6321bc2 100644
--- a/packages/VpnDialogs/res/values-sk/strings.xml
+++ b/packages/VpnDialogs/res/values-sk/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Trvanie:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Odoslané:"</string>
<string name="data_received" msgid="4062776929376067820">"Prijaté:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> B/<xliff:g id="NUMBER_1">%2$s</xliff:g> paketov"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-sl/strings.xml b/packages/VpnDialogs/res/values-sl/strings.xml
index 92806fc..a93b08a 100644
--- a/packages/VpnDialogs/res/values-sl/strings.xml
+++ b/packages/VpnDialogs/res/values-sl/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Trajanje:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Poslano:"</string>
<string name="data_received" msgid="4062776929376067820">"Prejeto:"</string>
- <string name="blank_value" msgid="6278484582661984635">"-"</string>
<string name="data_value_format" msgid="2192466557826897580">"Št. bajtov: <xliff:g id="NUMBER_0">%1$s</xliff:g>/št. paketov: <xliff:g id="NUMBER_1">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-sr/strings.xml b/packages/VpnDialogs/res/values-sr/strings.xml
index 425ee89..10a25ef 100644
--- a/packages/VpnDialogs/res/values-sr/strings.xml
+++ b/packages/VpnDialogs/res/values-sr/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Трајање:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Послато:"</string>
<string name="data_received" msgid="4062776929376067820">"Примљенo:"</string>
- <string name="blank_value" msgid="6278484582661984635">"–"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> бајт(ов)а / <xliff:g id="NUMBER_1">%2$s</xliff:g> пакета"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-sv/strings.xml b/packages/VpnDialogs/res/values-sv/strings.xml
index 7cec26c..fdfc13f 100644
--- a/packages/VpnDialogs/res/values-sv/strings.xml
+++ b/packages/VpnDialogs/res/values-sv/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Längd:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Skickat:"</string>
<string name="data_received" msgid="4062776929376067820">"Mottaget:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> byte/<xliff:g id="NUMBER_1">%2$s</xliff:g> paket"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-sw/strings.xml b/packages/VpnDialogs/res/values-sw/strings.xml
index 4607728..f987aed 100644
--- a/packages/VpnDialogs/res/values-sw/strings.xml
+++ b/packages/VpnDialogs/res/values-sw/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Muda:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Zilizotumwa:"</string>
<string name="data_received" msgid="4062776929376067820">"Imepokelewa:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"baiti <xliff:g id="NUMBER_0">%1$s</xliff:g> / pakiti <xliff:g id="NUMBER_1">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-th/strings.xml b/packages/VpnDialogs/res/values-th/strings.xml
index 2e9f6f9..0b4a31c 100644
--- a/packages/VpnDialogs/res/values-th/strings.xml
+++ b/packages/VpnDialogs/res/values-th/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"ระยะเวลา:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"ส่งแล้ว:"</string>
<string name="data_received" msgid="4062776929376067820">"รับแล้ว:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> ไบต์/<xliff:g id="NUMBER_1">%2$s</xliff:g> แพ็คเก็ต"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-tl/strings.xml b/packages/VpnDialogs/res/values-tl/strings.xml
index 4826d8f..725a512 100644
--- a/packages/VpnDialogs/res/values-tl/strings.xml
+++ b/packages/VpnDialogs/res/values-tl/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Tagal:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Ipinadala:"</string>
<string name="data_received" msgid="4062776929376067820">"Natanggap:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> (na) byte / <xliff:g id="NUMBER_1">%2$s</xliff:g> (na) packet"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-tr/strings.xml b/packages/VpnDialogs/res/values-tr/strings.xml
index f4fd967..704a8cd 100644
--- a/packages/VpnDialogs/res/values-tr/strings.xml
+++ b/packages/VpnDialogs/res/values-tr/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Süre:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Gönderilen:"</string>
<string name="data_received" msgid="4062776929376067820">"Alınan:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bayt / <xliff:g id="NUMBER_1">%2$s</xliff:g> paket"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-uk/strings.xml b/packages/VpnDialogs/res/values-uk/strings.xml
index a12bfea..b0db053 100644
--- a/packages/VpnDialogs/res/values-uk/strings.xml
+++ b/packages/VpnDialogs/res/values-uk/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Тривалість:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Надіслано:"</string>
<string name="data_received" msgid="4062776929376067820">"Отримано:"</string>
- <string name="blank_value" msgid="6278484582661984635">"–"</string>
<string name="data_value_format" msgid="2192466557826897580">"Байтів: <xliff:g id="NUMBER_0">%1$s</xliff:g> / пакетів: <xliff:g id="NUMBER_1">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-vi/strings.xml b/packages/VpnDialogs/res/values-vi/strings.xml
index eab3812..8cc8e71 100644
--- a/packages/VpnDialogs/res/values-vi/strings.xml
+++ b/packages/VpnDialogs/res/values-vi/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Thời lượng:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Đã gửi:"</string>
<string name="data_received" msgid="4062776929376067820">"Đã nhận:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> byte / <xliff:g id="NUMBER_1">%2$s</xliff:g> gói"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-zh-rCN/strings.xml b/packages/VpnDialogs/res/values-zh-rCN/strings.xml
index 24774eb..7fdb368 100644
--- a/packages/VpnDialogs/res/values-zh-rCN/strings.xml
+++ b/packages/VpnDialogs/res/values-zh-rCN/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"时长:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"已发送:"</string>
<string name="data_received" msgid="4062776929376067820">"已接收:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> 字节/<xliff:g id="NUMBER_1">%2$s</xliff:g> 个数据包"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-zh-rTW/strings.xml b/packages/VpnDialogs/res/values-zh-rTW/strings.xml
index f7663c2..080330f 100644
--- a/packages/VpnDialogs/res/values-zh-rTW/strings.xml
+++ b/packages/VpnDialogs/res/values-zh-rTW/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"持續時間:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"已傳送:"</string>
<string name="data_received" msgid="4062776929376067820">"已接收:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> 位元組 / <xliff:g id="NUMBER_1">%2$s</xliff:g> 個封包"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-zu/strings.xml b/packages/VpnDialogs/res/values-zu/strings.xml
index 67eeeb9..4594748 100644
--- a/packages/VpnDialogs/res/values-zu/strings.xml
+++ b/packages/VpnDialogs/res/values-zu/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Ubude besikhathi:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Thunyelwe:"</string>
<string name="data_received" msgid="4062776929376067820">"Okwamukelwe:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> amaphakethe/ <xliff:g id="NUMBER_1">%2$s</xliff:g> amabhayithi"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values/strings.xml b/packages/VpnDialogs/res/values/strings.xml
index 1352e9b..3ff767a 100644
--- a/packages/VpnDialogs/res/values/strings.xml
+++ b/packages/VpnDialogs/res/values/strings.xml
@@ -48,8 +48,6 @@
<!-- Label for the network usage of data received over VPN. [CHAR LIMIT=20] -->
<string name="data_received">Received:</string>
- <!-- Dummy string for a blank value. [CHAR LIMIT=40] -->
- <string name="blank_value">--</string>
<!-- Formatted string for the network usage over VPN. [CHAR LIMIT=40] -->
<string name="data_value_format">
<xliff:g id="number">%1$s</xliff:g> bytes /
diff --git a/packages/VpnDialogs/res/values/styles.xml b/packages/VpnDialogs/res/values/styles.xml
index e3469ec..0dda673 100644
--- a/packages/VpnDialogs/res/values/styles.xml
+++ b/packages/VpnDialogs/res/values/styles.xml
@@ -25,6 +25,5 @@
<item name="android:gravity">center_vertical|left</item>
<item name="android:textSize">18sp</item>
<item name="android:textStyle">bold</item>
- <item name="android:text">@string/blank_value</item>
</style>
</resources>
diff --git a/packages/VpnDialogs/src/com/android/vpndialogs/ManageDialog.java b/packages/VpnDialogs/src/com/android/vpndialogs/ManageDialog.java
index 2de0251..9999adb 100644
--- a/packages/VpnDialogs/src/com/android/vpndialogs/ManageDialog.java
+++ b/packages/VpnDialogs/src/com/android/vpndialogs/ManageDialog.java
@@ -50,6 +50,7 @@ public class ManageDialog extends AlertActivity implements
private TextView mDuration;
private TextView mDataTransmitted;
private TextView mDataReceived;
+ private boolean mDataRowsHidden;
private Handler mHandler;
@@ -76,6 +77,7 @@ public class ManageDialog extends AlertActivity implements
mDuration = (TextView) view.findViewById(R.id.duration);
mDataTransmitted = (TextView) view.findViewById(R.id.data_transmitted);
mDataReceived = (TextView) view.findViewById(R.id.data_received);
+ mDataRowsHidden = true;
if (mConfig.user.equals(VpnConfig.LEGACY_VPN)) {
mAlertParams.mIconId = android.R.drawable.ic_dialog_info;
@@ -140,8 +142,15 @@ public class ManageDialog extends AlertActivity implements
seconds / 3600, seconds / 60 % 60, seconds % 60));
}
- String[] numbers = getStatistics();
+ String[] numbers = getNumbers();
if (numbers != null) {
+ // First unhide the related data rows.
+ if (mDataRowsHidden) {
+ findViewById(R.id.data_transmitted_row).setVisibility(View.VISIBLE);
+ findViewById(R.id.data_received_row).setVisibility(View.VISIBLE);
+ mDataRowsHidden = false;
+ }
+
// [1] and [2] are received data in bytes and packets.
mDataReceived.setText(getString(R.string.data_value_format,
numbers[1], numbers[2]));
@@ -155,7 +164,7 @@ public class ManageDialog extends AlertActivity implements
return true;
}
- private String[] getStatistics() {
+ private String[] getNumbers() {
DataInputStream in = null;
try {
// See dev_seq_printf_stats() in net/core/dev.c.
diff --git a/policy/src/com/android/internal/policy/impl/LockScreen.java b/policy/src/com/android/internal/policy/impl/LockScreen.java
index 3384661..edf5199 100644
--- a/policy/src/com/android/internal/policy/impl/LockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/LockScreen.java
@@ -231,7 +231,8 @@ class LockScreen extends LinearLayout implements KeyguardScreen {
if (!mCameraDisabled) {
// Start the Camera
Intent intent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+ | Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
try {
ActivityManagerNative.getDefault().dismissKeyguardOnNextActivity();
} catch (RemoteException e) {
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 8f35afb..1763674 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -39,6 +39,8 @@ import android.database.ContentObserver;
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.graphics.RectF;
+import android.media.AudioManager;
+import android.media.IAudioService;
import android.os.BatteryManager;
import android.os.Bundle;
import android.os.Handler;
@@ -64,6 +66,7 @@ import com.android.internal.statusbar.IStatusBarService;
import com.android.internal.telephony.ITelephony;
import com.android.internal.widget.PointerLocationView;
+import android.speech.RecognizerIntent;
import android.util.DisplayMetrics;
import android.util.EventLog;
import android.util.Log;
@@ -133,8 +136,6 @@ import android.view.KeyCharacterMap.FallbackAction;
import android.view.accessibility.AccessibilityEvent;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
-import android.media.IAudioService;
-import android.media.AudioManager;
import java.io.File;
import java.io.FileDescriptor;
@@ -176,6 +177,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
static final int LONG_PRESS_HOME_NOTHING = 0;
static final int LONG_PRESS_HOME_RECENT_DIALOG = 1;
static final int LONG_PRESS_HOME_RECENT_SYSTEM_UI = 2;
+ static final int LONG_PRESS_HOME_VOICE_SEARCH = 3;
// wallpaper is at the bottom, though the window manager may move it.
static final int WALLPAPER_LAYER = 2;
@@ -710,6 +712,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
mLongPressOnHomeBehavior > LONG_PRESS_HOME_RECENT_SYSTEM_UI) {
mLongPressOnHomeBehavior = LONG_PRESS_HOME_NOTHING;
}
+ if (hasNavigationBar()) {
+ mLongPressOnHomeBehavior = LONG_PRESS_HOME_VOICE_SEARCH;
+ }
}
if (mLongPressOnHomeBehavior != LONG_PRESS_HOME_NOTHING) {
@@ -729,6 +734,18 @@ public class PhoneWindowManager implements WindowManagerPolicy {
} catch (RemoteException e) {
Slog.e(TAG, "RemoteException when showing recent apps", e);
}
+ } else if (mLongPressOnHomeBehavior == LONG_PRESS_HOME_VOICE_SEARCH) {
+ Intent intent = new Intent(RecognizerIntent.ACTION_WEB_SEARCH);
+ try {
+ intent.setFlags(
+ Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
+ mContext.startActivity(intent);
+ } catch (ActivityNotFoundException e) {
+ Log.e(TAG, "Unable to launch. tag=" + TAG + " intent=" + intent, e);
+ } catch (SecurityException e) {
+ Log.e(TAG, "PhoneWindowManager does not have the permission to launch " +
+ "tag=" + TAG + " intent=" + intent, e);
+ }
}
}
diff --git a/services/audioflinger/Android.mk b/services/audioflinger/Android.mk
index 22fa752..86692e7 100644
--- a/services/audioflinger/Android.mk
+++ b/services/audioflinger/Android.mk
@@ -7,7 +7,6 @@ LOCAL_SRC_FILES:= \
AudioMixer.cpp.arm \
AudioResampler.cpp.arm \
AudioPolicyService.cpp \
- AudioBufferProvider.cpp \
ServiceUtilities.cpp
# AudioResamplerSinc.cpp.arm
# AudioResamplerCubic.cpp.arm
diff --git a/services/audioflinger/AudioBufferProvider.h b/services/audioflinger/AudioBufferProvider.h
index 62ad6bd..43e4de7 100644
--- a/services/audioflinger/AudioBufferProvider.h
+++ b/services/audioflinger/AudioBufferProvider.h
@@ -17,8 +17,6 @@
#ifndef ANDROID_AUDIO_BUFFER_PROVIDER_H
#define ANDROID_AUDIO_BUFFER_PROVIDER_H
-#include <stdint.h>
-#include <sys/types.h>
#include <utils/Errors.h>
namespace android {
@@ -29,6 +27,7 @@ class AudioBufferProvider
public:
struct Buffer {
+ Buffer() : raw(NULL), frameCount(0) { }
union {
void* raw;
short* i16;
@@ -40,12 +39,12 @@ public:
virtual ~AudioBufferProvider() {}
// value representing an invalid presentation timestamp
- static const int64_t kInvalidPTS;
+ static const int64_t kInvalidPTS = 0x7FFFFFFFFFFFFFFFLL; // <stdint.h> is too painful
// pts is the local time when the next sample yielded by getNextBuffer
// will be rendered.
// Pass kInvalidPTS if the PTS is unknown or not applicable.
- virtual status_t getNextBuffer(Buffer* buffer, int64_t pts) = 0;
+ virtual status_t getNextBuffer(Buffer* buffer, int64_t pts = kInvalidPTS) = 0;
virtual void releaseBuffer(Buffer* buffer) = 0;
};
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 2687cd5..8f7b35c 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -232,7 +232,7 @@ void AudioFlinger::onFirstRef()
(NO_ERROR != dev->set_master_volume(dev, initialVolume))) {
mMasterVolumeSupportLvl = MVS_NONE;
}
- mHardwareStatus = AUDIO_HW_INIT;
+ mHardwareStatus = AUDIO_HW_IDLE;
}
// Set the mode for each audio HAL, and try to set the initial volume (if
@@ -254,7 +254,7 @@ void AudioFlinger::onFirstRef()
dev->set_master_volume(dev, initialVolume);
}
- mHardwareStatus = AUDIO_HW_INIT;
+ mHardwareStatus = AUDIO_HW_IDLE;
}
}
@@ -823,8 +823,6 @@ bool AudioFlinger::streamMute(audio_stream_type_t stream) const
status_t AudioFlinger::setParameters(audio_io_handle_t ioHandle, const String8& keyValuePairs)
{
- status_t result;
-
ALOGV("setParameters(): io %d, keyvalue %s, tid %d, calling pid %d",
ioHandle, keyValuePairs.string(), gettid(), IPCThreadState::self()->getCallingPid());
// check calling permissions
@@ -834,15 +832,17 @@ status_t AudioFlinger::setParameters(audio_io_handle_t ioHandle, const String8&
// ioHandle == 0 means the parameters are global to the audio hardware interface
if (ioHandle == 0) {
- AutoMutex lock(mHardwareLock);
- mHardwareStatus = AUDIO_SET_PARAMETER;
status_t final_result = NO_ERROR;
+ {
+ AutoMutex lock(mHardwareLock);
+ mHardwareStatus = AUDIO_HW_SET_PARAMETER;
for (size_t i = 0; i < mAudioHwDevs.size(); i++) {
audio_hw_device_t *dev = mAudioHwDevs[i];
- result = dev->set_parameters(dev, keyValuePairs.string());
+ status_t result = dev->set_parameters(dev, keyValuePairs.string());
final_result = result ?: final_result;
}
mHardwareStatus = AUDIO_HW_IDLE;
+ }
// disable AEC and NS if the device is a BT SCO headset supporting those pre processings
AudioParameter param = AudioParameter(keyValuePairs);
String8 value;
@@ -905,8 +905,14 @@ String8 AudioFlinger::getParameters(audio_io_handle_t ioHandle, const String8& k
String8 out_s8;
for (size_t i = 0; i < mAudioHwDevs.size(); i++) {
+ char *s;
+ {
+ AutoMutex lock(mHardwareLock);
+ mHardwareStatus = AUDIO_HW_GET_PARAMETER;
audio_hw_device_t *dev = mAudioHwDevs[i];
- char *s = dev->get_parameters(dev, keys.string());
+ s = dev->get_parameters(dev, keys.string());
+ mHardwareStatus = AUDIO_HW_IDLE;
+ }
out_s8 += String8(s ? s : "");
free(s);
}
@@ -968,7 +974,7 @@ status_t AudioFlinger::setVoiceVolume(float value)
}
AutoMutex lock(mHardwareLock);
- mHardwareStatus = AUDIO_SET_VOICE_VOLUME;
+ mHardwareStatus = AUDIO_HW_SET_VOICE_VOLUME;
ret = mPrimaryHardwareDev->set_voice_volume(mPrimaryHardwareDev, value);
mHardwareStatus = AUDIO_HW_IDLE;
@@ -1023,12 +1029,7 @@ void AudioFlinger::removeNotificationClient(pid_t pid)
{
Mutex::Autolock _l(mLock);
- ssize_t index = mNotificationClients.indexOfKey(pid);
- if (index >= 0) {
- sp <NotificationClient> client = mNotificationClients.valueFor(pid);
- ALOGV("removeNotificationClient() %p, pid %d", client.get(), pid);
- mNotificationClients.removeItem(pid);
- }
+ mNotificationClients.removeItem(pid);
ALOGV("%d died, releasing its sessions", pid);
size_t num = mAudioSessionRefs.size();
@@ -1463,7 +1464,7 @@ AudioFlinger::PlaybackThread::PlaybackThread(const sp<AudioFlinger>& audioFlinge
mMasterVolume(audioFlinger->masterVolumeSW_l()),
mLastWriteTime(0), mNumWrites(0), mNumDelayedWrites(0), mInWrite(false)
{
- snprintf(mName, kNameLength, "AudioOut_%d", id);
+ snprintf(mName, kNameLength, "AudioOut_%X", id);
readOutputParameters();
@@ -1992,9 +1993,12 @@ void AudioFlinger::PlaybackThread::checkSilentMode_l()
bool AudioFlinger::MixerThread::threadLoop()
{
+ // DirectOutputThread has single trackToRemove instead of Vector
Vector< sp<Track> > tracksToRemove;
+ // DirectOutputThread has activeTrack here
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
// increase threshold again due to low power audio mode. The way this warning threshold is
@@ -2002,18 +2006,26 @@ bool AudioFlinger::MixerThread::threadLoop()
nsecs_t maxPeriod = seconds(mFrameCount) / mSampleRate * 15;
nsecs_t lastWarning = 0;
bool longStandbyExit = false;
+
uint32_t activeSleepTime = activeSleepTimeUs();
uint32_t idleSleepTime = idleSleepTimeUs();
uint32_t sleepTime = idleSleepTime;
+
uint32_t sleepTimeShift = 0;
- Vector< sp<EffectChain> > effectChains;
CpuStats cpuStats;
+ // DirectOutputThread has shorter standbyDelay
+
acquireWakeLock();
while (!exitPending())
{
cpuStats.sample();
+
+ // DirectOutputThread has rampVolume, leftVol, rightVol
+
+ Vector< sp<EffectChain> > effectChains;
+
processConfigEvents();
mixer_state mixerStatus = MIXER_IDLE;
@@ -2023,28 +2035,29 @@ bool AudioFlinger::MixerThread::threadLoop()
if (checkForNewParameters_l()) {
mixBufferSize = mFrameCount * mFrameSize;
+
// FIXME: Relaxed timing because of a certain device that can't meet latency
// Should be reduced to 2x after the vendor fixes the driver issue
// increase threshold again due to low power audio mode. The way this warning
// threshold is calculated and its usefulness should be reconsidered anyway.
maxPeriod = seconds(mFrameCount) / mSampleRate * 15;
+
activeSleepTime = activeSleepTimeUs();
idleSleepTime = idleSleepTimeUs();
+ // DirectOutputThread updates standbyDelay also
}
- const SortedVector< wp<Track> >& activeTracks = mActiveTracks;
-
// put audio hardware into standby after short delay
- if (CC_UNLIKELY((!activeTracks.size() && systemTime() > standbyTime) ||
- mSuspended)) {
+ if (CC_UNLIKELY((!mActiveTracks.size() && systemTime() > standbyTime) ||
+ mSuspended > 0)) {
if (!mStandby) {
- ALOGV("Audio hardware entering standby, mixer %p, mSuspended %d", this, mSuspended);
+ ALOGV("Audio hardware entering standby, mixer %p, suspend count %u", this, mSuspended);
mOutput->stream->common.standby(&mOutput->stream->common);
mStandby = true;
mBytesWritten = 0;
}
- if (!activeTracks.size() && mConfigEvents.isEmpty()) {
+ if (!mActiveTracks.size() && mConfigEvents.isEmpty()) {
// we're about to wait, flush the binder command buffer
IPCThreadState::self()->flushCommands();
@@ -2067,7 +2080,7 @@ bool AudioFlinger::MixerThread::threadLoop()
}
}
- mixerStatus = prepareTracks_l(activeTracks, &tracksToRemove);
+ mixerStatus = prepareTracks_l(&tracksToRemove);
// prevent any changes in effect chain list and in each effect chain
// during mixing and effect process as the audio buffers could be deleted
@@ -2129,24 +2142,35 @@ bool AudioFlinger::MixerThread::threadLoop()
// TODO add standby time extension fct of effect tail
}
- if (mSuspended) {
+ if (mSuspended > 0) {
sleepTime = suspendSleepTimeUs();
}
- // sleepTime == 0 means we must write to audio hardware
+
+ // only process effects if we're going to write
if (sleepTime == 0) {
+
+ // DirectOutputThread adds applyVolume here
+
for (size_t i = 0; i < effectChains.size(); i ++) {
effectChains[i]->process_l();
}
- // enable changes in effect chain
- unlockEffectChains(effectChains);
+ }
+
+ // enable changes in effect chain
+ unlockEffectChains(effectChains);
+
+ // sleepTime == 0 means we must write to audio hardware
+ if (sleepTime == 0) {
+ // FIXME Only in MixerThread, and rewrite to reduce number of system calls
mLastWriteTime = systemTime();
mInWrite = true;
mBytesWritten += mixBufferSize;
-
int bytesWritten = (int)mOutput->stream->write(mOutput->stream, mMixBuffer, mixBufferSize);
if (bytesWritten < 0) mBytesWritten -= mixBufferSize;
mNumWrites++;
mInWrite = false;
+
+ // Only in MixerThread: start of write blocked detection
nsecs_t now = systemTime();
nsecs_t delta = now - mLastWriteTime;
if (!mStandby && delta > maxPeriod) {
@@ -2160,14 +2184,14 @@ bool AudioFlinger::MixerThread::threadLoop()
longStandbyExit = true;
}
}
+ // end of write blocked detection
+
mStandby = false;
} else {
- // enable changes in effect chain
- unlockEffectChains(effectChains);
usleep(sleepTime);
}
- // finally let go of all our tracks, without the lock held
+ // finally let go of removed track(s), without the lock held
// since we can't guarantee the destructors won't acquire that
// same lock.
tracksToRemove.clear();
@@ -2175,8 +2199,12 @@ bool AudioFlinger::MixerThread::threadLoop()
// Effect chains will be actually deleted here if they were removed from
// mEffectChains list during mixing or effects processing
effectChains.clear();
+
+ // FIXME Note that the above .clear() is no longer necessary since effectChains
+ // is now local to this block, but will keep it for now (at least until merge done).
}
+ // put output stream into standby mode
if (!mStandby) {
mOutput->stream->common.standby(&mOutput->stream->common);
}
@@ -2189,12 +2217,12 @@ bool AudioFlinger::MixerThread::threadLoop()
// prepareTracks_l() must be called with ThreadBase::mLock held
AudioFlinger::PlaybackThread::mixer_state AudioFlinger::MixerThread::prepareTracks_l(
- const SortedVector< wp<Track> >& activeTracks, Vector< sp<Track> > *tracksToRemove)
+ Vector< sp<Track> > *tracksToRemove)
{
mixer_state mixerStatus = MIXER_IDLE;
// find out which tracks need to be processed
- size_t count = activeTracks.size();
+ size_t count = mActiveTracks.size();
size_t mixedTracks = 0;
size_t tracksWithEffect = 0;
@@ -2214,7 +2242,7 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::MixerThread::prepareTrac
}
for (size_t i=0 ; i<count ; i++) {
- sp<Track> t = activeTracks[i].promote();
+ sp<Track> t = mActiveTracks[i].promote();
if (t == 0) continue;
// this const just means the local variable doesn't change
@@ -2701,13 +2729,20 @@ void AudioFlinger::DirectOutputThread::applyVolume(uint16_t leftVol, uint16_t ri
bool AudioFlinger::DirectOutputThread::threadLoop()
{
+ // MixerThread has Vector instead of single trackToRemove
sp<Track> trackToRemove;
- sp<Track> activeTrack;
+
nsecs_t standbyTime = systemTime();
- size_t mixBufferSize = mFrameCount*mFrameSize;
+ size_t mixBufferSize = mFrameCount * mFrameSize;
+
+ // MixerThread has relaxed timing: maxPeriod, lastWarning, longStandbyExit
+
uint32_t activeSleepTime = activeSleepTimeUs();
uint32_t idleSleepTime = idleSleepTimeUs();
uint32_t sleepTime = idleSleepTime;
+
+ // MixerThread has sleepTimeShift and cpuStats
+
// use shorter standby delay as on normal output to release
// hardware resources as soon as possible
nsecs_t standbyDelay = microseconds(activeSleepTime*2);
@@ -2716,20 +2751,30 @@ bool AudioFlinger::DirectOutputThread::threadLoop()
while (!exitPending())
{
+ // MixerThread has cpuStats.sample()
+
bool rampVolume;
uint16_t leftVol;
uint16_t rightVol;
+
Vector< sp<EffectChain> > effectChains;
processConfigEvents();
+ // MixerThread does not have activeTrack here
+ sp<Track> activeTrack;
+
mixer_state mixerStatus = MIXER_IDLE;
{ // scope for the mLock
Mutex::Autolock _l(mLock);
if (checkForNewParameters_l()) {
- mixBufferSize = mFrameCount*mFrameSize;
+ mixBufferSize = mFrameCount * mFrameSize;
+
+ // different calculations here
+ standbyDelay = microseconds(activeSleepTime*2);
+
activeSleepTime = activeSleepTimeUs();
idleSleepTime = idleSleepTimeUs();
standbyDelay = microseconds(activeSleepTime*2);
@@ -2737,10 +2782,9 @@ bool AudioFlinger::DirectOutputThread::threadLoop()
// put audio hardware into standby after short delay
if (CC_UNLIKELY((!mActiveTracks.size() && systemTime() > standbyTime) ||
- mSuspended)) {
- // wait until we have something to do...
+ mSuspended > 0)) {
if (!mStandby) {
- ALOGV("Audio hardware entering standby, mixer %p, mSuspended %d", this, mSuspended);
+ ALOGV("Audio hardware entering standby, mixer %p, suspend count %u", this, mSuspended);
mOutput->stream->common.standby(&mOutput->stream->common);
mStandby = true;
mBytesWritten = 0;
@@ -2753,19 +2797,27 @@ bool AudioFlinger::DirectOutputThread::threadLoop()
if (exitPending()) break;
releaseWakeLock_l();
+ // wait until we have something to do...
ALOGV("Thread %p type %d TID %d going to sleep", this, mType, gettid());
mWaitWorkCV.wait(mLock);
ALOGV("Thread %p type %d TID %d waking up", this, mType, gettid());
acquireWakeLock_l();
+ // MixerThread has "mPrevMixerStatus = MIXER_IDLE"
checkSilentMode_l();
+ // MixerThread has different standbyDelay
standbyTime = systemTime() + standbyDelay;
sleepTime = idleSleepTime;
+ // MixerThread has "sleepTimeShift = 0"
continue;
}
}
+ // MixerThread has "mixerStatus = prepareTracks_l(...)"
+
+ // equivalent to MixerThread's lockEffectChains_l, but without the lock
+ // FIXME - is it OK to omit the lock here?
effectChains = mEffectChains;
// find out which tracks need to be processed
@@ -2896,6 +2948,7 @@ bool AudioFlinger::DirectOutputThread::threadLoop()
lockEffectChains_l(effectChains);
}
+ // For DirectOutputThread, this test is equivalent to "activeTrack != 0"
if (CC_LIKELY(mixerStatus == MIXER_TRACKS_READY)) {
AudioBufferProvider::Buffer buffer;
size_t frameCount = mFrameCount;
@@ -2903,8 +2956,7 @@ bool AudioFlinger::DirectOutputThread::threadLoop()
// output audio to hardware
while (frameCount) {
buffer.frameCount = frameCount;
- activeTrack->getNextBuffer(&buffer,
- AudioBufferProvider::kInvalidPTS);
+ activeTrack->getNextBuffer(&buffer);
if (CC_UNLIKELY(buffer.raw == NULL)) {
memset(curBuf, 0, frameCount * mFrameSize);
break;
@@ -2929,19 +2981,28 @@ bool AudioFlinger::DirectOutputThread::threadLoop()
}
}
- if (mSuspended) {
+ if (mSuspended > 0) {
sleepTime = suspendSleepTimeUs();
}
- // sleepTime == 0 means we must write to audio hardware
+
+ // only process effects if we're going to write
if (sleepTime == 0) {
+
+ // MixerThread does not have applyVolume
if (mixerStatus == MIXER_TRACKS_READY) {
applyVolume(leftVol, rightVol, rampVolume);
}
+
for (size_t i = 0; i < effectChains.size(); i ++) {
effectChains[i]->process_l();
}
- unlockEffectChains(effectChains);
+ }
+ // enable changes in effect chain
+ unlockEffectChains(effectChains);
+
+ // sleepTime == 0 means we must write to audio hardware
+ if (sleepTime == 0) {
mLastWriteTime = systemTime();
mInWrite = true;
mBytesWritten += mixBufferSize;
@@ -2949,13 +3010,15 @@ bool AudioFlinger::DirectOutputThread::threadLoop()
if (bytesWritten < 0) mBytesWritten -= mixBufferSize;
mNumWrites++;
mInWrite = false;
+
+ // MixerThread has write blocked detection here
+
mStandby = false;
} else {
- unlockEffectChains(effectChains);
usleep(sleepTime);
}
- // finally let go of removed track, without the lock held
+ // finally let go of removed track(s), without the lock held
// since we can't guarantee the destructors won't acquire that
// same lock.
trackToRemove.clear();
@@ -2964,8 +3027,12 @@ bool AudioFlinger::DirectOutputThread::threadLoop()
// Effect chains will be actually deleted here if they were removed from
// mEffectChains list during mixing or effects processing
effectChains.clear();
+
+ // FIXME Note that the above .clear() is no longer necessary since effectChains
+ // is now local to this block, but will keep it for now (at least until merge done).
}
+ // put output stream into standby mode
if (!mStandby) {
mOutput->stream->common.standby(&mOutput->stream->common);
}
@@ -3090,18 +3157,24 @@ bool AudioFlinger::DuplicatingThread::threadLoop()
{
Vector< sp<Track> > tracksToRemove;
nsecs_t standbyTime = systemTime();
- size_t mixBufferSize = mFrameCount*mFrameSize;
+ size_t mixBufferSize = mFrameCount * mFrameSize;
+
+ // Only in DuplicatingThread
SortedVector< sp<OutputTrack> > outputTracks;
uint32_t writeFrames = 0;
+
uint32_t activeSleepTime = activeSleepTimeUs();
uint32_t idleSleepTime = idleSleepTimeUs();
uint32_t sleepTime = idleSleepTime;
- Vector< sp<EffectChain> > effectChains;
acquireWakeLock();
while (!exitPending())
{
+ // MixerThread has cpuStats.sample
+
+ Vector< sp<EffectChain> > effectChains;
+
processConfigEvents();
mixer_state mixerStatus = MIXER_IDLE;
@@ -3110,22 +3183,25 @@ bool AudioFlinger::DuplicatingThread::threadLoop()
Mutex::Autolock _l(mLock);
if (checkForNewParameters_l()) {
- mixBufferSize = mFrameCount*mFrameSize;
+ mixBufferSize = mFrameCount * mFrameSize;
+
+ // Only in DuplicatingThread
updateWaitTime();
+
activeSleepTime = activeSleepTimeUs();
idleSleepTime = idleSleepTimeUs();
}
- const SortedVector< wp<Track> >& activeTracks = mActiveTracks;
-
+ // Only in DuplicatingThread
for (size_t i = 0; i < mOutputTracks.size(); i++) {
outputTracks.add(mOutputTracks[i]);
}
// put audio hardware into standby after short delay
- if (CC_UNLIKELY((!activeTracks.size() && systemTime() > standbyTime) ||
- mSuspended)) {
+ if (CC_UNLIKELY((!mActiveTracks.size() && systemTime() > standbyTime) ||
+ mSuspended > 0)) {
if (!mStandby) {
+ // DuplicatingThread implements standby by stopping all tracks
for (size_t i = 0; i < outputTracks.size(); i++) {
outputTracks[i]->stop();
}
@@ -3133,7 +3209,7 @@ bool AudioFlinger::DuplicatingThread::threadLoop()
mBytesWritten = 0;
}
- if (!activeTracks.size() && mConfigEvents.isEmpty()) {
+ if (!mActiveTracks.size() && mConfigEvents.isEmpty()) {
// we're about to wait, flush the binder command buffer
IPCThreadState::self()->flushCommands();
outputTracks.clear();
@@ -3147,15 +3223,17 @@ bool AudioFlinger::DuplicatingThread::threadLoop()
ALOGV("Thread %p type %d TID %d waking up", this, mType, gettid());
acquireWakeLock_l();
+ // MixerThread has "mPrevMixerStatus = MIXER_IDLE"
checkSilentMode_l();
standbyTime = systemTime() + mStandbyTimeInNsecs;
sleepTime = idleSleepTime;
+ // MixerThread has sleepTimeShift
continue;
}
}
- mixerStatus = prepareTracks_l(activeTracks, &tracksToRemove);
+ mixerStatus = prepareTracks_l(&tracksToRemove);
// prevent any changes in effect chain list and in each effect chain
// during mixing and effect process as the audio buffers could be deleted
@@ -3163,6 +3241,7 @@ bool AudioFlinger::DuplicatingThread::threadLoop()
lockEffectChains_l(effectChains);
}
+ // Duplicating Thread is completely different here
if (CC_LIKELY(mixerStatus == MIXER_TRACKS_READY)) {
// mix buffers...
if (outputsReady(outputTracks)) {
@@ -3192,30 +3271,36 @@ bool AudioFlinger::DuplicatingThread::threadLoop()
}
}
- if (mSuspended) {
+ if (mSuspended > 0) {
sleepTime = suspendSleepTimeUs();
}
- // sleepTime == 0 means we must write to audio hardware
+
+ // only process effects if we're going to write
if (sleepTime == 0) {
for (size_t i = 0; i < effectChains.size(); i ++) {
effectChains[i]->process_l();
}
- // enable changes in effect chain
- unlockEffectChains(effectChains);
+ }
+
+ // enable changes in effect chain
+ unlockEffectChains(effectChains);
+ // sleepTime == 0 means we must write to audio hardware
+ if (sleepTime == 0) {
standbyTime = systemTime() + mStandbyTimeInNsecs;
for (size_t i = 0; i < outputTracks.size(); i++) {
outputTracks[i]->write(mMixBuffer, writeFrames);
}
mStandby = false;
mBytesWritten += mixBufferSize;
+
+ // MixerThread has write blocked detection here
+
} else {
- // enable changes in effect chain
- unlockEffectChains(effectChains);
usleep(sleepTime);
}
- // finally let go of all our tracks, without the lock held
+ // finally let go of removed track(s), without the lock held
// since we can't guarantee the destructors won't acquire that
// same lock.
tracksToRemove.clear();
@@ -3224,8 +3309,14 @@ bool AudioFlinger::DuplicatingThread::threadLoop()
// Effect chains will be actually deleted here if they were removed from
// mEffectChains list during mixing or effects processing
effectChains.clear();
+
+ // FIXME Note that the above .clear() is no longer necessary since effectChains
+ // is now local to this block, but will keep it for now (at least until merge done).
}
+ // MixerThread and DirectOutpuThread have standby here,
+ // but for DuplicatingThread this is handled by the outputTracks
+
releaseWakeLock();
ALOGV("Thread %p type %d exiting", this, mType);
@@ -3234,6 +3325,7 @@ bool AudioFlinger::DuplicatingThread::threadLoop()
void AudioFlinger::DuplicatingThread::addOutputTrack(MixerThread *thread)
{
+ Mutex::Autolock _l(mLock);
// FIXME explain this formula
int frameCount = (3 * mFrameCount * mSampleRate) / thread->sampleRate();
OutputTrack *outputTrack = new OutputTrack(thread,
@@ -3279,7 +3371,7 @@ void AudioFlinger::DuplicatingThread::updateWaitTime()
}
-bool AudioFlinger::DuplicatingThread::outputsReady(SortedVector< sp<OutputTrack> > &outputTracks)
+bool AudioFlinger::DuplicatingThread::outputsReady(const SortedVector< sp<OutputTrack> > &outputTracks)
{
for (size_t i = 0; i < outputTracks.size(); i++) {
sp <ThreadBase> thread = outputTracks[i]->thread().promote();
@@ -3402,11 +3494,14 @@ AudioFlinger::ThreadBase::TrackBase::~TrackBase()
}
}
+// AudioBufferProvider interface
+// getNextBuffer() = 0;
+// This implementation of releaseBuffer() is used by Track and RecordTrack, but not TimedTrack
void AudioFlinger::ThreadBase::TrackBase::releaseBuffer(AudioBufferProvider::Buffer* buffer)
{
buffer->raw = NULL;
mFrameCount = buffer->frameCount;
- step();
+ (void) step(); // ignore return value of step()
buffer->frameCount = 0;
}
@@ -3552,6 +3647,7 @@ void AudioFlinger::PlaybackThread::Track::dump(char* buffer, size_t size)
(int)mAuxBuffer);
}
+// AudioBufferProvider interface
status_t AudioFlinger::PlaybackThread::Track::getNextBuffer(
AudioBufferProvider::Buffer* buffer, int64_t pts)
{
@@ -4100,6 +4196,7 @@ void AudioFlinger::PlaybackThread::TimedTrack::timedYieldSilence(
mTimedAudioOutputOnTime = false;
}
+// AudioBufferProvider interface
void AudioFlinger::PlaybackThread::TimedTrack::releaseBuffer(
AudioBufferProvider::Buffer* buffer) {
@@ -4184,6 +4281,7 @@ AudioFlinger::RecordThread::RecordTrack::~RecordTrack()
}
}
+// AudioBufferProvider interface
status_t AudioFlinger::RecordThread::RecordTrack::getNextBuffer(AudioBufferProvider::Buffer* buffer, int64_t pts)
{
audio_track_cblk_t* cblk = this->cblk();
@@ -4772,7 +4870,7 @@ AudioFlinger::RecordThread::RecordThread(const sp<AudioFlinger>& audioFlinger,
// mBytesRead is only meaningful while active, and so is cleared in start()
// (but might be better to also clear here for dump?)
{
- snprintf(mName, kNameLength, "AudioIn_%d", id);
+ snprintf(mName, kNameLength, "AudioIn_%X", id);
readInputParameters();
}
@@ -4871,8 +4969,7 @@ bool AudioFlinger::RecordThread::threadLoop()
}
buffer.frameCount = mFrameCount;
- if (CC_LIKELY(mActiveTrack->getNextBuffer(
- &buffer, AudioBufferProvider::kInvalidPTS) == NO_ERROR)) {
+ if (CC_LIKELY(mActiveTrack->getNextBuffer(&buffer) == NO_ERROR)) {
size_t framesOut = buffer.frameCount;
if (mResampler == NULL) {
// no resampling
@@ -5149,6 +5246,7 @@ status_t AudioFlinger::RecordThread::dump(int fd, const Vector<String16>& args)
return NO_ERROR;
}
+// AudioBufferProvider interface
status_t AudioFlinger::RecordThread::getNextBuffer(AudioBufferProvider::Buffer* buffer, int64_t pts)
{
size_t framesReq = buffer->frameCount;
@@ -5187,6 +5285,7 @@ status_t AudioFlinger::RecordThread::getNextBuffer(AudioBufferProvider::Buffer*
return NO_ERROR;
}
+// AudioBufferProvider interface
void AudioFlinger::RecordThread::releaseBuffer(AudioBufferProvider::Buffer* buffer)
{
mRsmpInIndex += buffer->frameCount;
@@ -5431,7 +5530,6 @@ audio_io_handle_t AudioFlinger::openOutput(uint32_t *pDevices,
{
status_t status;
PlaybackThread *thread = NULL;
- mHardwareStatus = AUDIO_HW_OUTPUT_OPEN;
uint32_t samplingRate = pSamplingRate ? *pSamplingRate : 0;
audio_format_t format = pFormat ? *pFormat : AUDIO_FORMAT_DEFAULT;
uint32_t channels = pChannels ? *pChannels : 0;
@@ -5456,8 +5554,10 @@ audio_io_handle_t AudioFlinger::openOutput(uint32_t *pDevices,
if (outHwDev == NULL)
return 0;
+ mHardwareStatus = AUDIO_HW_OUTPUT_OPEN;
status = outHwDev->open_output_stream(outHwDev, *pDevices, &format,
&channels, &samplingRate, &outStream);
+ mHardwareStatus = AUDIO_HW_IDLE;
ALOGV("openOutput() openOutputStream returned output %p, SamplingRate %d, Format %d, Channels %x, status %d",
outStream,
samplingRate,
@@ -5465,7 +5565,6 @@ audio_io_handle_t AudioFlinger::openOutput(uint32_t *pDevices,
channels,
status);
- mHardwareStatus = AUDIO_HW_IDLE;
if (outStream != NULL) {
AudioStreamOut *output = new AudioStreamOut(outHwDev, outStream);
audio_io_handle_t id = nextUniqueId();
@@ -5857,7 +5956,7 @@ uint32_t AudioFlinger::nextUniqueId()
return android_atomic_inc(&mNextUniqueId);
}
-AudioFlinger::PlaybackThread *AudioFlinger::primaryPlaybackThread_l()
+AudioFlinger::PlaybackThread *AudioFlinger::primaryPlaybackThread_l() const
{
for (size_t i = 0; i < mPlaybackThreads.size(); i++) {
PlaybackThread *thread = mPlaybackThreads.valueAt(i).get();
@@ -5869,7 +5968,7 @@ AudioFlinger::PlaybackThread *AudioFlinger::primaryPlaybackThread_l()
return NULL;
}
-uint32_t AudioFlinger::primaryOutputDevice_l()
+uint32_t AudioFlinger::primaryOutputDevice_l() const
{
PlaybackThread *thread = primaryPlaybackThread_l();
@@ -6364,7 +6463,7 @@ void AudioFlinger::ThreadBase::lockEffectChains_l(
}
void AudioFlinger::ThreadBase::unlockEffectChains(
- Vector<sp <AudioFlinger::EffectChain> >& effectChains)
+ const Vector<sp <AudioFlinger::EffectChain> >& effectChains)
{
for (size_t i = 0; i < effectChains.size(); i++) {
effectChains[i]->unlock();
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index 2a5d805..bdaf97c 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -339,9 +339,8 @@ private:
TrackBase(const TrackBase&);
TrackBase& operator = (const TrackBase&);
- virtual status_t getNextBuffer(
- AudioBufferProvider::Buffer* buffer,
- int64_t pts) = 0;
+ // AudioBufferProvider interface
+ virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer, int64_t pts) = 0;
virtual void releaseBuffer(AudioBufferProvider::Buffer* buffer);
audio_format_t format() const {
@@ -424,8 +423,8 @@ private:
void sendConfigEvent_l(int event, int param = 0);
void processConfigEvents();
audio_io_handle_t id() const { return mId;}
- bool standby() { return mStandby; }
- uint32_t device() { return mDevice; }
+ bool standby() const { return mStandby; }
+ uint32_t device() const { return mDevice; }
virtual audio_stream_t* stream() = 0;
sp<EffectHandle> createEffect_l(
@@ -456,12 +455,13 @@ private:
virtual status_t addEffectChain_l(const sp<EffectChain>& chain) = 0;
// remove an effect chain from the chain list (mEffectChains)
virtual size_t removeEffectChain_l(const sp<EffectChain>& chain) = 0;
- // lock mall effect chains Mutexes. Must be called before releasing the
+ // lock all effect chains Mutexes. Must be called before releasing the
// ThreadBase mutex before processing the mixer and effects. This guarantees the
// integrity of the chains during the process.
+ // Also sets the parameter 'effectChains' to current value of mEffectChains.
void lockEffectChains_l(Vector<sp <EffectChain> >& effectChains);
// unlock effect chains after process
- void unlockEffectChains(Vector<sp <EffectChain> >& effectChains);
+ void unlockEffectChains(const Vector<sp<EffectChain> >& effectChains);
// set audio mode to all effect chains
void setMode(audio_mode_t mode);
// get effect module with corresponding ID on specified audio session
@@ -549,7 +549,7 @@ private:
Vector< sp<EffectChain> > mEffectChains;
uint32_t mDevice; // output device for PlaybackThread
// input + output devices for RecordThread
- static const int kNameLength = 32;
+ static const int kNameLength = 16; // prctl(PR_SET_NAME) limit
char mName[kNameLength];
sp<IPowerManager> mPowerManager;
sp<IBinder> mWakeLockToken;
@@ -576,9 +576,11 @@ private:
public:
enum mixer_state {
- MIXER_IDLE,
- MIXER_TRACKS_ENABLED,
- MIXER_TRACKS_READY
+ MIXER_IDLE, // no active tracks
+ MIXER_TRACKS_ENABLED, // at least one active track, but no track has any data ready
+ MIXER_TRACKS_READY // at least one active track, and at least one track has data
+ // standby mode does not have an enum value
+ // suspend by audio policy manager is orthogonal to mixer state
};
// playback track
@@ -627,9 +629,10 @@ private:
Track(const Track&);
Track& operator = (const Track&);
- virtual status_t getNextBuffer(
- AudioBufferProvider::Buffer* buffer,
- int64_t pts);
+ // AudioBufferProvider interface
+ virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer, int64_t pts = kInvalidPTS);
+ // releaseBuffer() not overridden
+
virtual uint32_t framesReady() const;
bool isMuted() const { return mMute; }
@@ -696,9 +699,10 @@ private:
virtual uint32_t framesReady() const;
- virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer,
- int64_t pts);
+ // AudioBufferProvider interface
+ virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer, int64_t pts);
virtual void releaseBuffer(AudioBufferProvider::Buffer* buffer);
+
void timedYieldSamples(AudioBufferProvider::Buffer* buffer);
void timedYieldSilence(uint32_t numFrames,
AudioBufferProvider::Buffer* buffer);
@@ -820,8 +824,8 @@ private:
virtual audio_stream_t* stream();
void suspend() { mSuspended++; }
- void restore() { if (mSuspended) mSuspended--; }
- bool isSuspended() const { return (mSuspended != 0); }
+ void restore() { if (mSuspended > 0) mSuspended--; }
+ bool isSuspended() const { return (mSuspended > 0); }
virtual String8 getParameters(const String8& keys);
virtual void audioConfigChanged_l(int event, int param = 0);
virtual status_t getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames);
@@ -842,7 +846,7 @@ private:
protected:
int16_t* mMixBuffer;
- int mSuspended;
+ uint32_t mSuspended; // suspend count, > 0 means suspended
int mBytesWritten;
private:
// mMasterMute is in both PlaybackThread and in AudioFlinger. When a
@@ -912,8 +916,11 @@ private:
virtual status_t dumpInternals(int fd, const Vector<String16>& args);
protected:
- mixer_state prepareTracks_l(const SortedVector< wp<Track> >& activeTracks,
- Vector< sp<Track> > *tracksToRemove);
+ // prepareTracks_l reads and writes mActiveTracks, and also returns the
+ // pending set of tracks to remove via Vector 'tracksToRemove'. The caller is
+ // responsible for clearing or destroying this Vector later on, when it
+ // is safe to do so. That will drop the final ref count and destroy the tracks.
+ mixer_state prepareTracks_l(Vector< sp<Track> > *tracksToRemove);
virtual int getTrackName_l();
virtual void deleteTrackName_l(int name);
virtual uint32_t idleSleepTimeUs();
@@ -968,7 +975,7 @@ private:
virtual uint32_t activeSleepTimeUs();
private:
- bool outputsReady(SortedVector< sp<OutputTrack> > &outputTracks);
+ bool outputsReady(const SortedVector<sp<OutputTrack> > &outputTracks);
void updateWaitTime();
SortedVector < sp<OutputTrack> > mOutputTracks;
@@ -993,8 +1000,9 @@ private:
PlaybackThread *srcThread,
PlaybackThread *dstThread,
bool reRegister);
- PlaybackThread *primaryPlaybackThread_l();
- uint32_t primaryOutputDevice_l();
+ // return thread associated with primary hardware device, or NULL
+ PlaybackThread *primaryPlaybackThread_l() const;
+ uint32_t primaryOutputDevice_l() const;
friend class AudioBuffer;
@@ -1062,9 +1070,9 @@ private:
RecordTrack(const RecordTrack&);
RecordTrack& operator = (const RecordTrack&);
- virtual status_t getNextBuffer(
- AudioBufferProvider::Buffer* buffer,
- int64_t pts);
+ // AudioBufferProvider interface
+ virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer, int64_t pts = kInvalidPTS);
+ // releaseBuffer() not overridden
bool mOverflow;
};
@@ -1100,9 +1108,10 @@ private:
AudioStreamIn* clearInput();
virtual audio_stream_t* stream();
- virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer,
- int64_t pts);
+ // AudioBufferProvider interface
+ virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer, int64_t pts);
virtual void releaseBuffer(AudioBufferProvider::Buffer* buffer);
+
virtual bool checkForNewParameters_l();
virtual String8 getParameters(const String8& keys);
virtual void audioConfigChanged_l(int event, int param = 0);
@@ -1531,25 +1540,27 @@ mutable Mutex mLock; // mutex for process, commands and handl
audio_hw_device_t* mPrimaryHardwareDev; // mAudioHwDevs[0] or NULL
Vector<audio_hw_device_t*> mAudioHwDevs;
+ // for dump, indicates which hardware operation is currently in progress (but not stream ops)
enum hardware_call_state {
- AUDIO_HW_IDLE = 0,
- AUDIO_HW_INIT,
- AUDIO_HW_OUTPUT_OPEN,
- AUDIO_HW_OUTPUT_CLOSE,
- AUDIO_HW_INPUT_OPEN,
- AUDIO_HW_INPUT_CLOSE,
- AUDIO_HW_STANDBY,
- AUDIO_HW_SET_MASTER_VOLUME,
- AUDIO_HW_GET_ROUTING,
- AUDIO_HW_SET_ROUTING,
- AUDIO_HW_GET_MODE,
- AUDIO_HW_SET_MODE,
- AUDIO_HW_GET_MIC_MUTE,
- AUDIO_HW_SET_MIC_MUTE,
- AUDIO_SET_VOICE_VOLUME,
- AUDIO_SET_PARAMETER,
- AUDIO_HW_GET_INPUT_BUFFER_SIZE,
- AUDIO_HW_GET_MASTER_VOLUME,
+ AUDIO_HW_IDLE = 0, // no operation in progress
+ AUDIO_HW_INIT, // init_check
+ AUDIO_HW_OUTPUT_OPEN, // open_output_stream
+ AUDIO_HW_OUTPUT_CLOSE, // unused
+ AUDIO_HW_INPUT_OPEN, // unused
+ AUDIO_HW_INPUT_CLOSE, // unused
+ AUDIO_HW_STANDBY, // unused
+ AUDIO_HW_SET_MASTER_VOLUME, // set_master_volume
+ AUDIO_HW_GET_ROUTING, // unused
+ AUDIO_HW_SET_ROUTING, // unused
+ AUDIO_HW_GET_MODE, // unused
+ AUDIO_HW_SET_MODE, // set_mode
+ AUDIO_HW_GET_MIC_MUTE, // get_mic_mute
+ AUDIO_HW_SET_MIC_MUTE, // set_mic_mute
+ AUDIO_HW_SET_VOICE_VOLUME, // set_voice_volume
+ AUDIO_HW_SET_PARAMETER, // set_parameters
+ AUDIO_HW_GET_INPUT_BUFFER_SIZE, // get_input_buffer_size
+ AUDIO_HW_GET_MASTER_VOLUME, // get_master_volume
+ AUDIO_HW_GET_PARAMETER, // get_parameters
};
mutable hardware_call_state mHardwareStatus; // for dump only
diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp
index 020d62a..2cec525 100644
--- a/services/audioflinger/AudioMixer.cpp
+++ b/services/audioflinger/AudioMixer.cpp
@@ -332,11 +332,11 @@ size_t AudioMixer::getUnreleasedFrames(int name) const
return 0;
}
-void AudioMixer::setBufferProvider(int name, AudioBufferProvider* buffer)
+void AudioMixer::setBufferProvider(int name, AudioBufferProvider* bufferProvider)
{
name -= TRACK0;
assert(uint32_t(name) < MAX_NUM_TRACKS);
- mState.tracks[name].bufferProvider = buffer;
+ mState.tracks[name].bufferProvider = bufferProvider;
}
diff --git a/services/audioflinger/AudioPolicyService.cpp b/services/audioflinger/AudioPolicyService.cpp
index 987b039..753b1d2 100644
--- a/services/audioflinger/AudioPolicyService.cpp
+++ b/services/audioflinger/AudioPolicyService.cpp
@@ -69,7 +69,7 @@ AudioPolicyService::AudioPolicyService()
// start tone playback thread
mTonePlaybackThread = new AudioCommandThread(String8(""));
// start audio commands thread
- mAudioCommandThread = new AudioCommandThread(String8("ApmCommandThread"));
+ mAudioCommandThread = new AudioCommandThread(String8("ApmCommand"));
/* instantiate the audio policy manager */
rc = hw_get_module(AUDIO_POLICY_HARDWARE_MODULE_ID, &module);
@@ -638,7 +638,7 @@ void AudioPolicyService::AudioCommandThread::onFirstRef()
if (mName != "") {
run(mName.string(), ANDROID_PRIORITY_AUDIO);
} else {
- run("AudioCommandThread", ANDROID_PRIORITY_AUDIO);
+ run("AudioCommand", ANDROID_PRIORITY_AUDIO);
}
}
diff --git a/services/audioflinger/AudioPolicyService.h b/services/audioflinger/AudioPolicyService.h
index 679fd30..962c917 100644
--- a/services/audioflinger/AudioPolicyService.h
+++ b/services/audioflinger/AudioPolicyService.h
@@ -66,7 +66,7 @@ public:
audio_format_t format = AUDIO_FORMAT_DEFAULT,
uint32_t channels = 0,
audio_policy_output_flags_t flags =
- AUDIO_POLICY_OUTPUT_FLAG_INDIRECT);
+ AUDIO_POLICY_OUTPUT_FLAG_NONE);
virtual status_t startOutput(audio_io_handle_t output,
audio_stream_type_t stream,
int session = 0);
diff --git a/services/camera/libcameraservice/CameraHardwareInterface.h b/services/camera/libcameraservice/CameraHardwareInterface.h
index 78e225f..87a0802 100644
--- a/services/camera/libcameraservice/CameraHardwareInterface.h
+++ b/services/camera/libcameraservice/CameraHardwareInterface.h
@@ -21,7 +21,6 @@
#include <binder/MemoryBase.h>
#include <binder/MemoryHeapBase.h>
#include <utils/RefBase.h>
-#include <surfaceflinger/ISurface.h>
#include <ui/GraphicBuffer.h>
#include <camera/Camera.h>
#include <camera/CameraParameters.h>
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
index 06fc708..adf1d49 100644
--- a/services/camera/libcameraservice/CameraService.cpp
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -29,10 +29,10 @@
#include <cutils/atomic.h>
#include <cutils/properties.h>
#include <gui/SurfaceTextureClient.h>
+#include <gui/Surface.h>
#include <hardware/hardware.h>
#include <media/AudioSystem.h>
#include <media/mediaplayer.h>
-#include <surfaceflinger/ISurface.h>
#include <utils/Errors.h>
#include <utils/Log.h>
#include <utils/String16.h>
diff --git a/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp b/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp
index 1055538..e417b79 100644
--- a/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp
+++ b/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp
@@ -22,7 +22,6 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
-#include <surfaceflinger/ISurface.h>
#include <camera/Camera.h>
#include <camera/CameraParameters.h>
#include <ui/GraphicBuffer.h>
diff --git a/services/input/SpriteController.h b/services/input/SpriteController.h
index 50ae8a5..75e4843 100644
--- a/services/input/SpriteController.h
+++ b/services/input/SpriteController.h
@@ -20,9 +20,7 @@
#include <utils/RefBase.h>
#include <utils/Looper.h>
-#include <surfaceflinger/Surface.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
-#include <surfaceflinger/ISurfaceComposer.h>
+#include <gui/SurfaceComposerClient.h>
#include <SkBitmap.h>
diff --git a/services/java/com/android/server/BootReceiver.java b/services/java/com/android/server/BootReceiver.java
index 6665614..da65438 100644
--- a/services/java/com/android/server/BootReceiver.java
+++ b/services/java/com/android/server/BootReceiver.java
@@ -39,8 +39,10 @@ import java.io.IOException;
public class BootReceiver extends BroadcastReceiver {
private static final String TAG = "BootReceiver";
- // Maximum size of a logged event (files get truncated if they're longer)
- private static final int LOG_SIZE = 65536;
+ // Maximum size of a logged event (files get truncated if they're longer).
+ // Give userdebug builds a larger max to capture extra debug, esp. for last_kmsg.
+ private static final int LOG_SIZE =
+ SystemProperties.getInt("ro.debuggable", 0) == 1 ? 98304 : 65536;
private static final File TOMBSTONE_DIR = new File("/data/tombstones");
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index c9b5997..423dad6 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -402,6 +402,14 @@ class ServerThread extends Thread {
reportWtf("starting ThrottleService", e);
}
+ try {
+ Slog.i(TAG, "UpdateLock Service");
+ ServiceManager.addService(Context.UPDATE_LOCK_SERVICE,
+ new UpdateLockService(context));
+ } catch (Throwable e) {
+ reportWtf("starting UpdateLockService", e);
+ }
+
if (!"0".equals(SystemProperties.get("system_init.startmountservice"))) {
try {
/*
diff --git a/services/java/com/android/server/TextServicesManagerService.java b/services/java/com/android/server/TextServicesManagerService.java
index 8384ebc..106bb3e 100644
--- a/services/java/com/android/server/TextServicesManagerService.java
+++ b/services/java/com/android/server/TextServicesManagerService.java
@@ -52,6 +52,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.concurrent.CopyOnWriteArrayList;
public class TextServicesManagerService extends ITextServicesManager.Stub {
private static final String TAG = TextServicesManagerService.class.getSimpleName();
@@ -582,8 +583,8 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
private class SpellCheckerBindGroup {
private final String TAG = SpellCheckerBindGroup.class.getSimpleName();
private final InternalServiceConnection mInternalConnection;
- private final ArrayList<InternalDeathRecipient> mListeners =
- new ArrayList<InternalDeathRecipient>();
+ private final CopyOnWriteArrayList<InternalDeathRecipient> mListeners =
+ new CopyOnWriteArrayList<InternalDeathRecipient>();
public boolean mBound;
public ISpellCheckerService mSpellChecker;
public boolean mConnected;
@@ -601,19 +602,24 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
if (DBG) {
Slog.d(TAG, "onServiceConnected");
}
- synchronized(mSpellCheckerMap) {
- for (InternalDeathRecipient listener : mListeners) {
- try {
- final ISpellCheckerSession session = spellChecker.getISpellCheckerSession(
- listener.mScLocale, listener.mScListener, listener.mBundle);
- listener.mTsListener.onServiceConnected(session);
- } catch (RemoteException e) {
- Slog.e(TAG, "Exception in getting the spell checker session."
- + "Reconnect to the spellchecker. ", e);
- removeAll();
- return;
+
+ for (InternalDeathRecipient listener : mListeners) {
+ try {
+ final ISpellCheckerSession session = spellChecker.getISpellCheckerSession(
+ listener.mScLocale, listener.mScListener, listener.mBundle);
+ synchronized(mSpellCheckerMap) {
+ if (mListeners.contains(listener)) {
+ listener.mTsListener.onServiceConnected(session);
+ }
}
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Exception in getting the spell checker session."
+ + "Reconnect to the spellchecker. ", e);
+ removeAll();
+ return;
}
+ }
+ synchronized(mSpellCheckerMap) {
mSpellChecker = spellChecker;
mConnected = true;
}
diff --git a/services/java/com/android/server/UpdateLockService.java b/services/java/com/android/server/UpdateLockService.java
new file mode 100644
index 0000000..5df1928
--- /dev/null
+++ b/services/java/com/android/server/UpdateLockService.java
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server;
+
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.os.Binder;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.IUpdateLock;
+import android.os.RemoteException;
+import android.os.SystemClock;
+import android.os.TokenWatcher;
+import android.os.UpdateLock;
+import android.util.Slog;
+
+import java.io.FileDescriptor;
+import java.io.PrintWriter;
+
+public class UpdateLockService extends IUpdateLock.Stub {
+ static final boolean DEBUG = false;
+ static final String TAG = "UpdateLockService";
+
+ // signatureOrSystem required to use update locks
+ static final String PERMISSION = "android.permission.UPDATE_LOCK";
+
+ Context mContext;
+ LockWatcher mLocks;
+
+ class LockWatcher extends TokenWatcher {
+ LockWatcher(Handler h, String tag) {
+ super(h, tag);
+ }
+
+ public void acquired() {
+ if (DEBUG) {
+ Slog.d(TAG, "first acquire; broadcasting convenient=false");
+ }
+ sendLockChangedBroadcast(false);
+ }
+ public void released() {
+ if (DEBUG) {
+ Slog.d(TAG, "last release; broadcasting convenient=true");
+ }
+ sendLockChangedBroadcast(true);
+ }
+ }
+
+ UpdateLockService(Context context) {
+ mContext = context;
+ mLocks = new LockWatcher(new Handler(), "UpdateLocks");
+
+ // Consider just-booting to be a reasonable time to allow
+ // interruptions for update installation etc.
+ sendLockChangedBroadcast(true);
+ }
+
+ void sendLockChangedBroadcast(boolean state) {
+ // Safe early during boot because this broadcast only goes to registered receivers.
+ long oldIdent = Binder.clearCallingIdentity();
+ try {
+ Intent intent = new Intent(UpdateLock.UPDATE_LOCK_CHANGED)
+ .putExtra(UpdateLock.NOW_IS_CONVENIENT, state)
+ .putExtra(UpdateLock.TIMESTAMP, System.currentTimeMillis())
+ .addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
+ mContext.sendStickyBroadcast(intent);
+ } finally {
+ Binder.restoreCallingIdentity(oldIdent);
+ }
+ }
+
+ @Override
+ public void acquireUpdateLock(IBinder token, String tag) throws RemoteException {
+ if (DEBUG) {
+ Slog.d(TAG, "acquire(" + token + ") by " + makeTag(tag));
+ }
+
+ mContext.enforceCallingOrSelfPermission(PERMISSION, "acquireUpdateLock");
+ mLocks.acquire(token, makeTag(tag));
+ }
+
+ @Override
+ public void releaseUpdateLock(IBinder token) throws RemoteException {
+ if (DEBUG) {
+ Slog.d(TAG, "release(" + token + ')');
+ }
+
+ mContext.enforceCallingOrSelfPermission(PERMISSION, "releaseUpdateLock");
+ mLocks.release(token);
+ };
+
+ private String makeTag(String tag) {
+ return "{tag=" + tag
+ + " uid=" + Binder.getCallingUid()
+ + " pid=" + Binder.getCallingPid() + '}';
+ }
+
+ @Override
+ public 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 update lock service from from pid="
+ + Binder.getCallingPid()
+ + ", uid=" + Binder.getCallingUid());
+ return;
+ }
+
+ mLocks.dump(pw);
+ }
+}
diff --git a/services/java/com/android/server/WifiService.java b/services/java/com/android/server/WifiService.java
index 5208785..f09c43f 100644
--- a/services/java/com/android/server/WifiService.java
+++ b/services/java/com/android/server/WifiService.java
@@ -914,7 +914,7 @@ public class WifiService extends IWifiManager.Stub {
* Get a reference to handler. This is used by a client to establish
* an AsyncChannel communication with WifiService
*/
- public Messenger getMessenger() {
+ public Messenger getWifiServiceMessenger() {
/* Enforce the highest permissions
TODO: when we consider exposing the asynchronous API, think about
how to provide both access and change permissions seperately
@@ -924,6 +924,13 @@ public class WifiService extends IWifiManager.Stub {
return new Messenger(mAsyncServiceHandler);
}
+ /** Get a reference to WifiStateMachine handler for AsyncChannel communication */
+ public Messenger getWifiStateMachineMessenger() {
+ enforceAccessPermission();
+ enforceChangePermission();
+ return mWifiStateMachine.getMessenger();
+ }
+
/**
* Get the IP and proxy configuration file
*/
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 8a5e7fc..3ac446c 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -2792,14 +2792,7 @@ public final class ActivityManagerService extends ActivityManagerNative
r.task.taskId, r.shortComponentName,
"proc died without state saved");
}
- r.makeFinishing();
- mMainStack.mHistory.remove(i);
- r.takeFromHistory();
- mWindowManager.removeAppToken(r.appToken);
- if (VALIDATE_TOKENS) {
- mMainStack.validateAppTokensLocked();
- }
- r.removeUriPermissionsLocked();
+ mMainStack.removeActivityFromHistoryLocked(r);
} else {
// We have the current state for this activity, so
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java
index 7b8bc26..f9641eb 100644
--- a/services/java/com/android/server/am/ActivityStack.java
+++ b/services/java/com/android/server/am/ActivityStack.java
@@ -3414,6 +3414,33 @@ final class ActivityStack {
return true;
}
+ final void finishActivityResultsLocked(ActivityRecord r, int resultCode, Intent resultData) {
+ // send the result
+ ActivityRecord resultTo = r.resultTo;
+ if (resultTo != null) {
+ if (DEBUG_RESULTS) Slog.v(TAG, "Adding result to " + resultTo
+ + " who=" + r.resultWho + " req=" + r.requestCode
+ + " res=" + resultCode + " data=" + resultData);
+ if (r.info.applicationInfo.uid > 0) {
+ mService.grantUriPermissionFromIntentLocked(r.info.applicationInfo.uid,
+ resultTo.packageName, resultData,
+ resultTo.getUriPermissionsLocked());
+ }
+ resultTo.addResultLocked(r, r.resultWho, r.requestCode, resultCode,
+ resultData);
+ r.resultTo = null;
+ }
+ else if (DEBUG_RESULTS) Slog.v(TAG, "No result destination from " + r);
+
+ // Make sure this HistoryRecord is not holding on to other resources,
+ // because clients have remote IPC references to this object so we
+ // can't assume that will go away and want to avoid circular IPC refs.
+ r.results = null;
+ r.pendingResults = null;
+ r.newIntents = null;
+ r.icicle = null;
+ }
+
/**
* @return Returns true if this activity has been removed from the history
* list, or false if it is still in the list and will be removed later.
@@ -3452,30 +3479,7 @@ final class ActivityStack {
}
}
- // send the result
- ActivityRecord resultTo = r.resultTo;
- if (resultTo != null) {
- if (DEBUG_RESULTS) Slog.v(TAG, "Adding result to " + resultTo
- + " who=" + r.resultWho + " req=" + r.requestCode
- + " res=" + resultCode + " data=" + resultData);
- if (r.info.applicationInfo.uid > 0) {
- mService.grantUriPermissionFromIntentLocked(r.info.applicationInfo.uid,
- resultTo.packageName, resultData,
- resultTo.getUriPermissionsLocked());
- }
- resultTo.addResultLocked(r, r.resultWho, r.requestCode, resultCode,
- resultData);
- r.resultTo = null;
- }
- else if (DEBUG_RESULTS) Slog.v(TAG, "No result destination from " + r);
-
- // Make sure this HistoryRecord is not holding on to other resources,
- // because clients have remote IPC references to this object so we
- // can't assume that will go away and want to avoid circular IPC refs.
- r.results = null;
- r.pendingResults = null;
- r.newIntents = null;
- r.icicle = null;
+ finishActivityResultsLocked(r, resultCode, resultData);
if (mService.mPendingThumbnails.size() > 0) {
// There are clients waiting to receive thumbnails so, in case
@@ -3638,8 +3642,9 @@ final class ActivityStack {
mHandler.removeMessages(DESTROY_TIMEOUT_MSG, r);
}
- private final void removeActivityFromHistoryLocked(ActivityRecord r) {
+ final void removeActivityFromHistoryLocked(ActivityRecord r) {
if (r.state != ActivityState.DESTROYED) {
+ finishActivityResultsLocked(r, Activity.RESULT_CANCELED, null);
r.makeFinishing();
if (DEBUG_ADD_REMOVE) {
RuntimeException here = new RuntimeException("here");
diff --git a/services/java/com/android/server/connectivity/Tethering.java b/services/java/com/android/server/connectivity/Tethering.java
index 9573fda..88a0ccb 100644
--- a/services/java/com/android/server/connectivity/Tethering.java
+++ b/services/java/com/android/server/connectivity/Tethering.java
@@ -1215,6 +1215,8 @@ public class Tethering extends INetworkManagementEventObserver.Stub {
return retValue;
}
protected boolean turnOffUpstreamMobileConnection() {
+ // ignore pending renewal requests
+ ++mCurrentConnectionSequence;
if (mMobileApnReserved != ConnectivityManager.TYPE_NONE) {
try {
mConnService.stopUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE,
@@ -1304,6 +1306,14 @@ public class Tethering extends INetworkManagementEventObserver.Stub {
if (upType == ConnectivityManager.TYPE_MOBILE_DUN ||
upType == ConnectivityManager.TYPE_MOBILE_HIPRI) {
turnOnUpstreamMobileConnection(upType);
+ } else if (upType != ConnectivityManager.TYPE_NONE) {
+ /* If we've found an active upstream connection that's not DUN/HIPRI
+ * we should stop any outstanding DUN/HIPRI start requests.
+ *
+ * If we found NONE we don't want to do this as we want any previous
+ * requests to keep trying to bring up something we can use.
+ */
+ turnOffUpstreamMobileConnection();
}
if (upType == ConnectivityManager.TYPE_NONE) {
diff --git a/services/java/com/android/server/location/GpsLocationProvider.java b/services/java/com/android/server/location/GpsLocationProvider.java
index 0ce5499..65b9627 100755
--- a/services/java/com/android/server/location/GpsLocationProvider.java
+++ b/services/java/com/android/server/location/GpsLocationProvider.java
@@ -1082,6 +1082,7 @@ public class GpsLocationProvider implements LocationProviderInterface {
} else {
mLocation.removeAccuracy();
}
+ mLocation.setExtras(mLocationExtras);
try {
mLocationManager.reportLocation(mLocation, false);
diff --git a/services/java/com/android/server/net/NetworkStatsRecorder.java b/services/java/com/android/server/net/NetworkStatsRecorder.java
index 240cc1c..290bd2c 100644
--- a/services/java/com/android/server/net/NetworkStatsRecorder.java
+++ b/services/java/com/android/server/net/NetworkStatsRecorder.java
@@ -50,7 +50,7 @@ import java.util.Map;
*/
public class NetworkStatsRecorder {
private static final String TAG = "NetworkStatsRecorder";
- private static final boolean LOGD = true;
+ private static final boolean LOGD = false;
private static final boolean LOGV = false;
private final FileRotator mRotator;
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 21cb3e8..008793c 100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -7685,8 +7685,6 @@ public class WindowManagerService extends IWindowManager.Stub
}
}
- final boolean wasAnimating = w.mAnimating;
-
// If the window has moved due to its containing
// content frame changing, then we'd like to animate
// it. The checks here are ordered by what is least
@@ -7705,8 +7703,13 @@ public class WindowManagerService extends IWindowManager.Stub
w.mAnimDh = innerDh;
}
- // Execute animation.
- final boolean nowAnimating = w.isAnimating();
+ final boolean wasAnimating = w.mWasAnimating;
+ final boolean nowAnimating = w.mLocalAnimating;
+
+ if (DEBUG_WALLPAPER) {
+ Slog.v(TAG, w + ": wasAnimating=" + wasAnimating +
+ ", nowAnimating=" + nowAnimating);
+ }
// If this window is animating, make a note that we have
// an animating window and take care of a request to run
diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java
index d7a7cb0..eeecad1 100644
--- a/services/java/com/android/server/wm/WindowState.java
+++ b/services/java/com/android/server/wm/WindowState.java
@@ -91,6 +91,7 @@ final class WindowState implements WindowManagerPolicy.WindowState {
boolean mAttachedHidden; // is our parent window hidden?
boolean mLastHidden; // was this window last hidden?
boolean mWallpaperVisible; // for wallpaper, what was last vis report?
+ boolean mWasAnimating; // Were we animating going into the most recent animation step?
/**
* The window size that was requested by the application. These are in
@@ -979,6 +980,9 @@ final class WindowState implements WindowManagerPolicy.WindowState {
// This must be called while inside a transaction. Returns true if
// there is more animation to run.
boolean stepAnimationLocked(long currentTime) {
+ // Save the animation state as it was before this step so WindowManagerService can tell if
+ // we just started or just stopped animating by comparing mWasAnimating with isAnimating().
+ mWasAnimating = mAnimating;
if (!mService.mDisplayFrozen && mService.mPolicy.isScreenOnFully()) {
// We will run animations as long as the display isn't frozen.
diff --git a/services/jni/com_android_server_PowerManagerService.cpp b/services/jni/com_android_server_PowerManagerService.cpp
index d2b3118..ce80c1f 100644
--- a/services/jni/com_android_server_PowerManagerService.cpp
+++ b/services/jni/com_android_server_PowerManagerService.cpp
@@ -25,8 +25,7 @@
#include <android_runtime/AndroidRuntime.h>
#include <utils/Timers.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
+#include <gui/ISurfaceComposer.h>
#include <private/gui/ComposerService.h>
diff --git a/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp b/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
index cea17f8..9baae80 100644
--- a/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
+++ b/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
@@ -31,8 +31,6 @@
#include <EGL/egl.h>
#include <EGL/eglext.h>
-#include <pixelflinger/pixelflinger.h>
-
#include "DisplayHardware/DisplayHardware.h"
#include <hardware/gralloc.h>
diff --git a/services/surfaceflinger/DisplayHardware/DisplayHardware.h b/services/surfaceflinger/DisplayHardware/DisplayHardware.h
index 02be4dc..0a828b3 100644
--- a/services/surfaceflinger/DisplayHardware/DisplayHardware.h
+++ b/services/surfaceflinger/DisplayHardware/DisplayHardware.h
@@ -27,8 +27,6 @@
#include <EGL/egl.h>
#include <EGL/eglext.h>
-#include <pixelflinger/pixelflinger.h>
-
#include "GLExtensions.h"
#include "DisplayHardware/DisplayHardwareBase.h"
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index efcdd87..df7fe5c 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -14,9 +14,12 @@
* limitations under the License.
*/
+#define ATRACE_TAG ATRACE_TAG_GRAPHICS
+
#include <stdlib.h>
#include <stdint.h>
#include <sys/types.h>
+#include <math.h>
#include <cutils/compiler.h>
#include <cutils/native_handle.h>
@@ -25,11 +28,12 @@
#include <utils/Errors.h>
#include <utils/Log.h>
#include <utils/StopWatch.h>
+#include <utils/Trace.h>
#include <ui/GraphicBuffer.h>
#include <ui/PixelFormat.h>
-#include <surfaceflinger/Surface.h>
+#include <gui/Surface.h>
#include "clz.h"
#include "DisplayHardware/DisplayHardware.h"
@@ -38,7 +42,6 @@
#include "Layer.h"
#include "SurfaceFlinger.h"
#include "SurfaceTextureLayer.h"
-#include <math.h>
#define DEBUG_RESIZE 0
@@ -267,6 +270,8 @@ void Layer::setPerFrameData(hwc_layer_t* hwcl) {
void Layer::onDraw(const Region& clip) const
{
+ ATRACE_CALL();
+
if (CC_UNLIKELY(mActiveBuffer == 0)) {
// the texture has not been created yet, this Layer has
// in fact never been drawn into. This happens frequently with
@@ -365,6 +370,8 @@ bool Layer::isProtected() const
uint32_t Layer::doTransaction(uint32_t flags)
{
+ ATRACE_CALL();
+
const Layer::State& front(drawingState());
const Layer::State& temp(currentState());
@@ -418,6 +425,8 @@ bool Layer::onPreComposition() {
void Layer::lockPageFlip(bool& recomputeVisibleRegions)
{
+ ATRACE_CALL();
+
if (mQueuedFrames > 0) {
// if we've already called updateTexImage() without going through
@@ -450,6 +459,12 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions)
mActiveBuffer = mSurfaceTexture->getCurrentBuffer();
mFrameLatencyNeeded = true;
+ if (oldActiveBuffer == NULL && mActiveBuffer != NULL) {
+ // the first time we receive a buffer, we need to trigger a
+ // geometry invalidation.
+ mFlinger->invalidateHwcGeometry();
+ }
+
const Rect crop(mSurfaceTexture->getCurrentCrop());
const uint32_t transform(mSurfaceTexture->getCurrentTransform());
const uint32_t scalingMode(mSurfaceTexture->getCurrentScalingMode());
@@ -540,6 +555,8 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions)
void Layer::unlockPageFlip(
const Transform& planeTransform, Region& outDirtyRegion)
{
+ ATRACE_CALL();
+
Region postedRegion(mPostedDirtyRegion);
if (!postedRegion.isEmpty()) {
mPostedDirtyRegion.clear();
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 39bbb2b..8d508c2 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -22,10 +22,13 @@
#include <gui/SurfaceTexture.h>
-#include <pixelflinger/pixelflinger.h>
+#include <utils/Timers.h>
+
#include <ui/GraphicBuffer.h>
#include <ui/PixelFormat.h>
+#include <gui/ISurfaceComposerClient.h>
+
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <GLES/gl.h>
@@ -34,7 +37,6 @@
#include "LayerBase.h"
#include "SurfaceTextureLayer.h"
#include "Transform.h"
-#include <utils/Timers.h>
namespace android {
diff --git a/services/surfaceflinger/LayerBase.h b/services/surfaceflinger/LayerBase.h
index b8f7680..cd6efdd 100644
--- a/services/surfaceflinger/LayerBase.h
+++ b/services/surfaceflinger/LayerBase.h
@@ -28,10 +28,9 @@
#include <ui/Region.h>
-#include <surfaceflinger/ISurfaceComposerClient.h>
-#include <private/surfaceflinger/LayerState.h>
+#include <gui/ISurfaceComposerClient.h>
-#include <pixelflinger/pixelflinger.h>
+#include <private/gui/LayerState.h>
#include <hardware/hwcomposer.h>
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 05b5bf5..42ed4fa 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#define ATRACE_TAG ATRACE_TAG_GRAPHICS
+
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
@@ -39,18 +41,18 @@
#include <utils/String8.h>
#include <utils/String16.h>
#include <utils/StopWatch.h>
+#include <utils/Trace.h>
#include <ui/GraphicBufferAllocator.h>
#include <ui/PixelFormat.h>
-#include <pixelflinger/pixelflinger.h>
#include <GLES/gl.h>
#include "clz.h"
+#include "DdmConnection.h"
#include "DisplayEventConnection.h"
#include "EventThread.h"
#include "GLExtensions.h"
-#include "DdmConnection.h"
#include "Layer.h"
#include "LayerDim.h"
#include "LayerScreenshot.h"
@@ -60,7 +62,7 @@
#include "DisplayHardware/HWComposer.h"
#include <private/android_filesystem_config.h>
-#include <private/surfaceflinger/SharedBufferStack.h>
+#include <private/gui/SharedBufferStack.h>
#define EGL_VERSION_HW_ANDROID 0x3143
@@ -403,6 +405,7 @@ bool SurfaceFlinger::threadLoop()
void SurfaceFlinger::onMessageReceived(int32_t what)
{
+ ATRACE_CALL();
switch (what) {
case MessageQueue::REFRESH: {
// case MessageQueue::INVALIDATE: {
@@ -738,6 +741,7 @@ void SurfaceFlinger::commitTransaction()
void SurfaceFlinger::handlePageFlip()
{
+ ATRACE_CALL();
const DisplayHardware& hw = graphicPlane(0).displayHardware();
const Region screenRegion(hw.bounds());
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index fcd9361..b507877 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -33,9 +33,9 @@
#include <binder/IMemory.h>
#include <ui/PixelFormat.h>
-#include <surfaceflinger/IGraphicBufferAlloc.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/ISurfaceComposerClient.h>
+#include <gui/IGraphicBufferAlloc.h>
+#include <gui/ISurfaceComposer.h>
+#include <gui/ISurfaceComposerClient.h>
#include "Barrier.h"
#include "Layer.h"
diff --git a/services/surfaceflinger/tests/Transaction_test.cpp b/services/surfaceflinger/tests/Transaction_test.cpp
index 396a3fd..84ae0d9 100644
--- a/services/surfaceflinger/tests/Transaction_test.cpp
+++ b/services/surfaceflinger/tests/Transaction_test.cpp
@@ -17,9 +17,12 @@
#include <gtest/gtest.h>
#include <binder/IMemory.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/Surface.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
+
+#include <gui/ISurfaceComposer.h>
+#include <gui/Surface.h>
+#include <gui/SurfaceComposerClient.h>
+#include <private/gui/ComposerService.h>
+
#include <utils/String8.h>
namespace android {
diff --git a/services/surfaceflinger/tests/resize/resize.cpp b/services/surfaceflinger/tests/resize/resize.cpp
index 7f3f064..c143b3d 100644
--- a/services/surfaceflinger/tests/resize/resize.cpp
+++ b/services/surfaceflinger/tests/resize/resize.cpp
@@ -22,9 +22,8 @@
#include <binder/ProcessState.h>
#include <binder/IServiceManager.h>
-#include <surfaceflinger/Surface.h>
-#include <surfaceflinger/ISurface.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
+#include <gui/Surface.h>
+#include <gui/SurfaceComposerClient.h>
using namespace android;
diff --git a/services/surfaceflinger/tests/screencap/screencap.cpp b/services/surfaceflinger/tests/screencap/screencap.cpp
index 6cf1504..53566e0 100644
--- a/services/surfaceflinger/tests/screencap/screencap.cpp
+++ b/services/surfaceflinger/tests/screencap/screencap.cpp
@@ -21,7 +21,7 @@
#include <binder/IServiceManager.h>
#include <binder/IMemory.h>
-#include <surfaceflinger/ISurfaceComposer.h>
+#include <gui/ISurfaceComposer.h>
#include <SkImageEncoder.h>
#include <SkBitmap.h>
diff --git a/services/surfaceflinger/tests/surface/surface.cpp b/services/surfaceflinger/tests/surface/surface.cpp
index 9c15f9b..a8878f7 100644
--- a/services/surfaceflinger/tests/surface/surface.cpp
+++ b/services/surfaceflinger/tests/surface/surface.cpp
@@ -22,9 +22,8 @@
#include <binder/ProcessState.h>
#include <binder/IServiceManager.h>
-#include <surfaceflinger/Surface.h>
-#include <surfaceflinger/ISurface.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
+#include <gui/Surface.h>
+#include <gui/SurfaceComposerClient.h>
using namespace android;
diff --git a/telephony/java/com/android/internal/telephony/RIL.java b/telephony/java/com/android/internal/telephony/RIL.java
index 5afc1f3..cf96ab2 100644
--- a/telephony/java/com/android/internal/telephony/RIL.java
+++ b/telephony/java/com/android/internal/telephony/RIL.java
@@ -2566,13 +2566,20 @@ public final class RIL extends BaseCommands implements CommandsInterface {
result[0] = ret;
result[1] = Long.valueOf(nitzReceiveTime);
- if (mNITZTimeRegistrant != null) {
+ boolean ignoreNitz = SystemProperties.getBoolean(
+ TelephonyProperties.PROPERTY_IGNORE_NITZ, false);
- mNITZTimeRegistrant
- .notifyRegistrant(new AsyncResult (null, result, null));
+ if (ignoreNitz) {
+ if (RILJ_LOGD) riljLog("ignoring UNSOL_NITZ_TIME_RECEIVED");
} else {
- // in case NITZ time registrant isnt registered yet
- mLastNITZTimeInfo = result;
+ if (mNITZTimeRegistrant != null) {
+
+ mNITZTimeRegistrant
+ .notifyRegistrant(new AsyncResult (null, result, null));
+ } else {
+ // in case NITZ time registrant isnt registered yet
+ mLastNITZTimeInfo = result;
+ }
}
break;
diff --git a/telephony/java/com/android/internal/telephony/TelephonyProperties.java b/telephony/java/com/android/internal/telephony/TelephonyProperties.java
index abb4523..f95e081 100644
--- a/telephony/java/com/android/internal/telephony/TelephonyProperties.java
+++ b/telephony/java/com/android/internal/telephony/TelephonyProperties.java
@@ -182,4 +182,9 @@ public interface TelephonyProperties
* in commercial configuration.
*/
static final String PROPERTY_TEST_CSIM = "persist.radio.test-csim";
+
+ /**
+ * Ignore RIL_UNSOL_NITZ_TIME_RECEIVED completely, used for debugging/testing.
+ */
+ static final String PROPERTY_IGNORE_NITZ = "telephony.test.ignore.nitz";
}
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmCallTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmCallTracker.java
index 425afe6..b4e0775 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmCallTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmCallTracker.java
@@ -167,7 +167,7 @@ public final class GsmCallTracker extends CallTracker {
/**
* clirMode is one of the CLIR_ constants
*/
- Connection
+ synchronized Connection
dial (String dialString, int clirMode, UUSInfo uusInfo) throws CallStateException {
// note that this triggers call state changed notif
clearDisconnected();
@@ -406,7 +406,7 @@ public final class GsmCallTracker extends CallTracker {
}
}
- protected void
+ protected synchronized void
handlePollCalls(AsyncResult ar) {
List polledCalls;
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
index a4fb1d8..148b139 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
@@ -59,9 +59,12 @@ import android.util.EventLog;
import android.util.Log;
import android.util.TimeUtils;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
+import java.util.Collection;
import java.util.Date;
+import java.util.HashSet;
import java.util.TimeZone;
/**
@@ -112,6 +115,9 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
private boolean mGotCountryCode = false;
private ContentResolver cr;
+ /** Boolean is true is setTimeFromNITZString was called */
+ private boolean mNitzUpdatedTime = false;
+
String mSavedTimeZone;
long mSavedTime;
long mSavedAtTime;
@@ -698,6 +704,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
newCellLoc.setStateInvalid();
setSignalStrengthDefaultValues();
mGotCountryCode = false;
+ mNitzUpdatedTime = false;
pollStateDone();
break;
@@ -706,6 +713,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
newCellLoc.setStateInvalid();
setSignalStrengthDefaultValues();
mGotCountryCode = false;
+ mNitzUpdatedTime = false;
pollStateDone();
break;
@@ -826,6 +834,12 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
if (hasRegistered) {
mNetworkAttachedRegistrants.notifyRegistrants();
+
+ if (DBG) {
+ log("pollStateDone: registering current mNitzUpdatedTime=" +
+ mNitzUpdatedTime + " changing to false");
+ }
+ mNitzUpdatedTime = false;
}
if (hasChanged) {
@@ -840,28 +854,71 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
phone.setSystemProperty(TelephonyProperties.PROPERTY_OPERATOR_NUMERIC, operatorNumeric);
if (operatorNumeric == null) {
+ if (DBG) {
+ log("pollStateDone: operatorNumeric is null:" +
+ " clear PROPERTY_OPERATOR_ISO_COUNTRY");
+ }
phone.setSystemProperty(TelephonyProperties.PROPERTY_OPERATOR_ISO_COUNTRY, "");
mGotCountryCode = false;
+ mNitzUpdatedTime = false;
} else {
String iso = "";
+ String mcc = operatorNumeric.substring(0, 3);
try{
- iso = MccTable.countryCodeForMcc(Integer.parseInt(
- operatorNumeric.substring(0,3)));
+ iso = MccTable.countryCodeForMcc(Integer.parseInt(mcc));
} catch ( NumberFormatException ex){
- loge("countryCodeForMcc error" + ex);
+ loge("pollStateDone: countryCodeForMcc error" + ex);
} catch ( StringIndexOutOfBoundsException ex) {
- loge("countryCodeForMcc error" + ex);
+ loge("pollStateDone: countryCodeForMcc error" + ex);
+ }
+ if (DBG) {
+ log("pollStateDone: operatorNumeric=" + operatorNumeric +
+ " mcc=" + mcc + " iso=" + iso);
}
phone.setSystemProperty(TelephonyProperties.PROPERTY_OPERATOR_ISO_COUNTRY, iso);
mGotCountryCode = true;
+ TimeZone zone = null;
+
+ if (!mNitzUpdatedTime && !mcc.equals("000") && !TextUtils.isEmpty(iso) &&
+ getAutoTimeZone()) {
+
+ // Test both paths if ignore nitz is true
+ boolean testOneUniqueOffsetPath = SystemProperties.getBoolean(
+ TelephonyProperties.PROPERTY_IGNORE_NITZ, false) &&
+ ((SystemClock.uptimeMillis() & 1) == 0);
+
+ ArrayList<TimeZone> uniqueZones = TimeUtils.getTimeZonesWithUniqueOffsets(iso);
+ if ((uniqueZones.size() == 1) || testOneUniqueOffsetPath) {
+ zone = uniqueZones.get(0);
+ if (DBG) {
+ log("pollStateDone: no nitz but one TZ for iso=" + iso +
+ " with zone.getID=" + zone.getID() +
+ " testOneUniqueOffsetPath=" + testOneUniqueOffsetPath);
+ }
+ setAndBroadcastNetworkSetTimeZone(zone.getID());
+ } else {
+ if (DBG) {
+ log("pollStateDone: there are " + uniqueZones.size() +
+ " unique offsets for iso='" + iso +
+ " testOneUniqueOffsetPath=" + testOneUniqueOffsetPath +
+ "', do nothing");
+ }
+ }
+ }
+
if (mNeedFixZone) {
- TimeZone zone = null;
// If the offset is (0, false) and the timezone property
// is set, use the timezone property rather than
// GMT.
String zoneName = SystemProperties.get(TIMEZONE_PROPERTY);
+ if (DBG) {
+ log("pollStateDone: mNeedFixZone==true zoneName='" + zoneName +
+ "' mZoneOffset=" + mZoneOffset + " mZoneDst=" + mZoneDst +
+ " iso='" + iso +
+ "' iso-cc-idx=" + Arrays.binarySearch(GMT_COUNTRY_CODES, iso));
+ }
if ((mZoneOffset == 0) && (mZoneDst == false) &&
(zoneName != null) && (zoneName.length() > 0) &&
(Arrays.binarySearch(GMT_COUNTRY_CODES, iso) < 0)) {
@@ -876,22 +933,36 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
// Adjust the saved NITZ time to account for tzOffset.
mSavedTime = mSavedTime - tzOffset;
}
+ if (DBG) log("pollStateDone: using default TimeZone");
} else if (iso.equals("")){
// Country code not found. This is likely a test network.
// Get a TimeZone based only on the NITZ parameters (best guess).
zone = getNitzTimeZone(mZoneOffset, mZoneDst, mZoneTime);
+ if (DBG) log("pollStateDone: using NITZ TimeZone");
} else {
- zone = TimeUtils.getTimeZone(mZoneOffset,
- mZoneDst, mZoneTime, iso);
+ zone = TimeUtils.getTimeZone(mZoneOffset, mZoneDst, mZoneTime, iso);
+ if (DBG) log("pollStateDone: using getTimeZone(off, dst, time, iso)");
}
mNeedFixZone = false;
if (zone != null) {
+ log("pollStateDone: zone != null zone.getID=" + zone.getID());
if (getAutoTimeZone()) {
setAndBroadcastNetworkSetTimeZone(zone.getID());
}
saveNitzTimeZone(zone.getID());
+ } else {
+ log("pollStateDone: zone == null");
+ }
+ } else {
+ if (DBG) {
+ String zoneName = SystemProperties.get(TIMEZONE_PROPERTY);
+ zone = TimeZone.getDefault();
+ log("pollStateDone: mNeedFixZone==false zoneName='" + zoneName +
+ "' mZoneOffset=" + mZoneOffset + " mZoneDst=" + mZoneDst +
+ " iso='" + iso +
+ "' iso-cc-idx=" + Arrays.binarySearch(GMT_COUNTRY_CODES, iso));
}
}
}
@@ -1440,6 +1511,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
long end = SystemClock.elapsedRealtime();
log("NITZ: end=" + end + " dur=" + (end - start));
}
+ mNitzUpdatedTime = true;
} finally {
mWakeLock.release();
}
@@ -1489,6 +1561,10 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
intent.putExtra("time-zone", zoneId);
phone.getContext().sendStickyBroadcast(intent);
+ if (DBG) {
+ log("setAndBroadcastNetworkSetTimeZone: call alarm.setTimeZone and broadcast zoneId=" +
+ zoneId);
+ }
}
/**
diff --git a/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java b/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java
index de8401e..d98aa62 100755
--- a/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java
+++ b/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java
@@ -166,8 +166,10 @@ public class SIMRecords extends IccRecords {
"405841", "405842", "405843", "405844", "405845", "405846", "405847", "405848",
"405849", "405850", "405851", "405852", "405853", "405875", "405876", "405877",
"405878", "405879", "405880", "405881", "405882", "405883", "405884", "405885",
- "405886", "405908", "405909", "405910", "405911", "405925", "405926", "405927",
- "405928", "405929", "405932"
+ "405886", "405908", "405909", "405910", "405911", "405912", "405913", "405914",
+ "405915", "405916", "405917", "405918", "405919", "405920", "405921", "405922",
+ "405923", "405924", "405925", "405926", "405927", "405928", "405929", "405930",
+ "405931", "405932"
};
// ***** Constructor
diff --git a/tests/RenderScriptTests/tests/src/com/android/rs/test/RSTestCore.java b/tests/RenderScriptTests/tests/src/com/android/rs/test/RSTestCore.java
index 6f56223..22e1bff 100644
--- a/tests/RenderScriptTests/tests/src/com/android/rs/test/RSTestCore.java
+++ b/tests/RenderScriptTests/tests/src/com/android/rs/test/RSTestCore.java
@@ -68,6 +68,7 @@ public class RSTestCore {
unitTests.add(new UT_constant(this, mRes, mCtx));
unitTests.add(new UT_vector(this, mRes, mCtx));
unitTests.add(new UT_array_init(this, mRes, mCtx));
+ unitTests.add(new UT_convert(this, mRes, mCtx));
unitTests.add(new UT_rsdebug(this, mRes, mCtx));
unitTests.add(new UT_rstime(this, mRes, mCtx));
unitTests.add(new UT_rstypes(this, mRes, mCtx));
diff --git a/tests/RenderScriptTests/tests/src/com/android/rs/test/UT_convert.java b/tests/RenderScriptTests/tests/src/com/android/rs/test/UT_convert.java
new file mode 100644
index 0000000..4fc6c55
--- /dev/null
+++ b/tests/RenderScriptTests/tests/src/com/android/rs/test/UT_convert.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.rs.test;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.renderscript.*;
+
+public class UT_convert extends UnitTest {
+ private Resources mRes;
+
+ protected UT_convert(RSTestCore rstc, Resources res, Context ctx) {
+ super(rstc, "Convert", ctx);
+ mRes = res;
+ }
+
+ public void run() {
+ RenderScript pRS = RenderScript.create(mCtx);
+ ScriptC_convert s = new ScriptC_convert(pRS, mRes, R.raw.convert);
+ pRS.setMessageHandler(mRsMessage);
+ s.invoke_convert_test();
+ pRS.finish();
+ waitForMessage();
+ pRS.destroy();
+ }
+}
diff --git a/tests/RenderScriptTests/tests/src/com/android/rs/test/convert.rs b/tests/RenderScriptTests/tests/src/com/android/rs/test/convert.rs
new file mode 100644
index 0000000..e314f2b
--- /dev/null
+++ b/tests/RenderScriptTests/tests/src/com/android/rs/test/convert.rs
@@ -0,0 +1,37 @@
+#include "shared.rsh"
+
+float4 f4 = { 2.0f, 4.0f, 6.0f, 8.0f };
+
+char4 i8_4 = { -1, -2, -3, 4 };
+
+static bool test_convert() {
+ bool failed = false;
+
+ f4 = convert_float4(i8_4);
+ _RS_ASSERT(f4.x == -1.0f);
+ _RS_ASSERT(f4.y == -2.0f);
+ _RS_ASSERT(f4.z == -3.0f);
+ _RS_ASSERT(f4.w == 4.0f);
+
+ if (failed) {
+ rsDebug("test_convert FAILED", 0);
+ }
+ else {
+ rsDebug("test_convert PASSED", 0);
+ }
+
+ return failed;
+}
+
+void convert_test() {
+ bool failed = false;
+ failed |= test_convert();
+
+ if (failed) {
+ rsSendToClientBlocking(RS_MSG_TEST_FAILED);
+ }
+ else {
+ rsSendToClientBlocking(RS_MSG_TEST_PASSED);
+ }
+}
+
diff --git a/wifi/java/android/net/wifi/IWifiManager.aidl b/wifi/java/android/net/wifi/IWifiManager.aidl
index 61dfebf..6b08074 100644
--- a/wifi/java/android/net/wifi/IWifiManager.aidl
+++ b/wifi/java/android/net/wifi/IWifiManager.aidl
@@ -101,7 +101,9 @@ interface IWifiManager
void clearBlacklist();
- Messenger getMessenger();
+ Messenger getWifiServiceMessenger();
+
+ Messenger getWifiStateMachineMessenger();
String getConfigFile();
}
diff --git a/wifi/java/android/net/wifi/SupplicantState.java b/wifi/java/android/net/wifi/SupplicantState.java
index 509b02c..4a2037d 100644
--- a/wifi/java/android/net/wifi/SupplicantState.java
+++ b/wifi/java/android/net/wifi/SupplicantState.java
@@ -171,8 +171,8 @@ public enum SupplicantState implements Parcelable {
}
- /* Supplicant associating or authenticating is considered a handshake state */
- static boolean isHandshakeState(SupplicantState state) {
+ /** Supplicant associating or authenticating is considered a handshake state {@hide} */
+ public static boolean isHandshakeState(SupplicantState state) {
switch(state) {
case AUTHENTICATING:
case ASSOCIATING:
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index 1a0e0da..1acfd3a 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -1096,7 +1096,7 @@ public class WifiManager {
* @hide
*/
public void asyncConnect(Context srcContext, Handler srcHandler) {
- mAsyncChannel.connect(srcContext, srcHandler, getMessenger());
+ mAsyncChannel.connect(srcContext, srcHandler, getWifiServiceMessenger());
}
/**
@@ -1197,15 +1197,30 @@ public class WifiManager {
* @return Messenger pointing to the WifiService handler
* @hide
*/
- public Messenger getMessenger() {
+ public Messenger getWifiServiceMessenger() {
try {
- return mService.getMessenger();
+ return mService.getWifiServiceMessenger();
} catch (RemoteException e) {
return null;
}
}
/**
+ * Get a reference to WifiStateMachine handler.
+ * @return Messenger pointing to the WifiService handler
+ * @hide
+ */
+ public Messenger getWifiStateMachineMessenger() {
+ try {
+ return mService.getWifiStateMachineMessenger();
+ } catch (RemoteException e) {
+ return null;
+ }
+ }
+
+
+
+ /**
* Returns the file in which IP and proxy configuration data is stored
* @hide
*/
diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java
index 1b64f3e..e140d80 100644
--- a/wifi/java/android/net/wifi/WifiStateMachine.java
+++ b/wifi/java/android/net/wifi/WifiStateMachine.java
@@ -463,8 +463,12 @@ public class WifiStateMachine extends StateMachine {
private State mScanModeState = new ScanModeState();
/* Connecting to an access point */
private State mConnectModeState = new ConnectModeState();
- /* Fetching IP after network connection (assoc+auth complete) */
- private State mConnectingState = new ConnectingState();
+ /* Connected at 802.11 (L2) level */
+ private State mL2ConnectedState = new L2ConnectedState();
+ /* fetching IP after connection to access point (assoc+auth complete) */
+ private State mObtainingIpState = new ObtainingIpState();
+ /* Waiting for link quality verification to be complete */
+ private State mVerifyingLinkState = new VerifyingLinkState();
/* Connected with IP addr */
private State mConnectedState = new ConnectedState();
/* disconnect issued, waiting for network disconnect confirmation */
@@ -629,8 +633,10 @@ public class WifiStateMachine extends StateMachine {
addState(mDriverStartedState, mSupplicantStartedState);
addState(mScanModeState, mDriverStartedState);
addState(mConnectModeState, mDriverStartedState);
- addState(mConnectingState, mConnectModeState);
- addState(mConnectedState, mConnectModeState);
+ addState(mL2ConnectedState, mConnectModeState);
+ addState(mObtainingIpState, mL2ConnectedState);
+ addState(mVerifyingLinkState, mL2ConnectedState);
+ addState(mConnectedState, mL2ConnectedState);
addState(mDisconnectingState, mConnectModeState);
addState(mDisconnectedState, mConnectModeState);
addState(mWaitForWpsCompletionState, mConnectModeState);
@@ -655,6 +661,9 @@ public class WifiStateMachine extends StateMachine {
* Methods exposed for public use
********************************************************/
+ public Messenger getMessenger() {
+ return new Messenger(getHandler());
+ }
/**
* TODO: doc
*/
@@ -1543,12 +1552,14 @@ public class WifiStateMachine extends StateMachine {
Intent intent = new Intent(WifiManager.NETWORK_STATE_CHANGED_ACTION);
intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT
| Intent.FLAG_RECEIVER_REPLACE_PENDING);
- intent.putExtra(WifiManager.EXTRA_NETWORK_INFO, mNetworkInfo);
+ intent.putExtra(WifiManager.EXTRA_NETWORK_INFO, new NetworkInfo(mNetworkInfo));
intent.putExtra(WifiManager.EXTRA_LINK_PROPERTIES, new LinkProperties (mLinkProperties));
if (bssid != null)
intent.putExtra(WifiManager.EXTRA_BSSID, bssid);
- if (mNetworkInfo.getState() == NetworkInfo.State.CONNECTED)
+ if (mNetworkInfo.getDetailedState() == DetailedState.VERIFYING_POOR_LINK ||
+ mNetworkInfo.getDetailedState() == DetailedState.CONNECTED) {
intent.putExtra(WifiManager.EXTRA_WIFI_INFO, new WifiInfo(mWifiInfo));
+ }
mContext.sendStickyBroadcast(intent);
}
@@ -1740,9 +1751,6 @@ public class WifiStateMachine extends StateMachine {
}
} else {
configureLinkProperties();
- setNetworkDetailedState(DetailedState.CONNECTED);
- mWifiConfigStore.updateStatus(mLastNetworkId, DetailedState.CONNECTED);
- sendNetworkStateChangeBroadcast(mLastBssid);
}
}
@@ -1890,6 +1898,8 @@ public class WifiStateMachine extends StateMachine {
case CMD_SET_AP_CONFIG_COMPLETED:
case CMD_REQUEST_AP_CONFIG:
case CMD_RESPONSE_AP_CONFIG:
+ case WifiWatchdogStateMachine.POOR_LINK_DETECTED:
+ case WifiWatchdogStateMachine.GOOD_LINK_DETECTED:
break;
case WifiMonitor.DRIVER_HUNG_EVENT:
setWifiEnabled(false);
@@ -2885,7 +2895,7 @@ public class WifiStateMachine extends StateMachine {
/* send event to CM & network change broadcast */
setNetworkDetailedState(DetailedState.OBTAINING_IPADDR);
sendNetworkStateChangeBroadcast(mLastBssid);
- transitionTo(mConnectingState);
+ transitionTo(mObtainingIpState);
break;
case WifiMonitor.NETWORK_DISCONNECTION_EVENT:
if (DBG) log("Network connection lost");
@@ -2900,122 +2910,18 @@ public class WifiStateMachine extends StateMachine {
}
}
- class ConnectingState extends State {
-
- @Override
- public void enter() {
- if (DBG) log(getName() + "\n");
- EventLog.writeEvent(EVENTLOG_WIFI_STATE_CHANGED, getName());
-
- try {
- mNwService.enableIpv6(mInterfaceName);
- } catch (RemoteException re) {
- loge("Failed to enable IPv6: " + re);
- } catch (IllegalStateException e) {
- loge("Failed to enable IPv6: " + e);
- }
-
- if (!mWifiConfigStore.isUsingStaticIp(mLastNetworkId)) {
- //start DHCP
- mDhcpStateMachine = DhcpStateMachine.makeDhcpStateMachine(
- mContext, WifiStateMachine.this, mInterfaceName);
- mDhcpStateMachine.registerForPreDhcpNotification();
- mDhcpStateMachine.sendMessage(DhcpStateMachine.CMD_START_DHCP);
- } else {
- DhcpInfoInternal dhcpInfoInternal = mWifiConfigStore.getIpConfiguration(
- mLastNetworkId);
- InterfaceConfiguration ifcg = new InterfaceConfiguration();
- ifcg.setLinkAddress(dhcpInfoInternal.makeLinkAddress());
- ifcg.setInterfaceUp();
- try {
- mNwService.setInterfaceConfig(mInterfaceName, ifcg);
- if (DBG) log("Static IP configuration succeeded");
- sendMessage(CMD_STATIC_IP_SUCCESS, dhcpInfoInternal);
- } catch (RemoteException re) {
- loge("Static IP configuration failed: " + re);
- sendMessage(CMD_STATIC_IP_FAILURE);
- } catch (IllegalStateException e) {
- loge("Static IP configuration failed: " + e);
- sendMessage(CMD_STATIC_IP_FAILURE);
- }
- }
- }
- @Override
- public boolean processMessage(Message message) {
- if (DBG) log(getName() + message.toString() + "\n");
-
- switch(message.what) {
- case DhcpStateMachine.CMD_PRE_DHCP_ACTION:
- handlePreDhcpSetup();
- mDhcpStateMachine.sendMessage(DhcpStateMachine.CMD_PRE_DHCP_ACTION_COMPLETE);
- break;
- case DhcpStateMachine.CMD_POST_DHCP_ACTION:
- handlePostDhcpSetup();
- if (message.arg1 == DhcpStateMachine.DHCP_SUCCESS) {
- handleSuccessfulIpConfiguration((DhcpInfoInternal) message.obj);
- transitionTo(mConnectedState);
- } else if (message.arg1 == DhcpStateMachine.DHCP_FAILURE) {
- handleFailedIpConfiguration();
- transitionTo(mDisconnectingState);
- }
- break;
- case CMD_STATIC_IP_SUCCESS:
- handleSuccessfulIpConfiguration((DhcpInfoInternal) message.obj);
- transitionTo(mConnectedState);
- break;
- case CMD_STATIC_IP_FAILURE:
- handleFailedIpConfiguration();
- transitionTo(mDisconnectingState);
- break;
- case CMD_DISCONNECT:
- mWifiNative.disconnect();
- transitionTo(mDisconnectingState);
- break;
- /* Ignore connection to same network */
- case CMD_CONNECT_NETWORK:
- int netId = message.arg1;
- if (mWifiInfo.getNetworkId() == netId) {
- break;
- }
- return NOT_HANDLED;
- case CMD_SAVE_NETWORK:
- deferMessage(message);
- break;
- /* Ignore */
- case WifiMonitor.NETWORK_CONNECTION_EVENT:
- break;
- case CMD_SET_SCAN_MODE:
- if (message.arg1 == SCAN_ONLY_MODE) {
- sendMessage(CMD_DISCONNECT);
- deferMessage(message);
- }
- break;
- /* Defer scan when IP is being fetched */
- case CMD_START_SCAN:
- deferMessage(message);
- break;
- /* Defer any power mode changes since we must keep active power mode at DHCP */
- case CMD_SET_HIGH_PERF_MODE:
- deferMessage(message);
- break;
- default:
- return NOT_HANDLED;
- }
- EventLog.writeEvent(EVENTLOG_WIFI_EVENT_HANDLED, message.what);
- return HANDLED;
- }
- }
- class ConnectedState extends State {
+ class L2ConnectedState extends State {
@Override
public void enter() {
if (DBG) log(getName() + "\n");
EventLog.writeEvent(EVENTLOG_WIFI_STATE_CHANGED, getName());
mRssiPollToken++;
if (mEnableRssiPolling) {
- sendMessage(obtainMessage(WifiStateMachine.CMD_RSSI_POLL, mRssiPollToken, 0));
+ sendMessage(obtainMessage(CMD_RSSI_POLL, mRssiPollToken, 0));
}
}
+
@Override
public boolean processMessage(Message message) {
if (DBG) log(getName() + message.toString() + "\n");
@@ -3028,8 +2934,11 @@ public class WifiStateMachine extends StateMachine {
case DhcpStateMachine.CMD_POST_DHCP_ACTION:
handlePostDhcpSetup();
if (message.arg1 == DhcpStateMachine.DHCP_SUCCESS) {
+ if (DBG) log("DHCP successful");
handleSuccessfulIpConfiguration((DhcpInfoInternal) message.obj);
+ transitionTo(mVerifyingLinkState);
} else if (message.arg1 == DhcpStateMachine.DHCP_FAILURE) {
+ if (DBG) log("DHCP failed");
handleFailedIpConfiguration();
transitionTo(mDisconnectingState);
}
@@ -3067,7 +2976,7 @@ public class WifiStateMachine extends StateMachine {
if (mWifiInfo.getNetworkId() == result.getNetworkId()) {
if (result.hasIpChanged()) {
log("Reconfiguring IP on connection");
- transitionTo(mConnectingState);
+ transitionTo(mObtainingIpState);
}
if (result.hasProxyChanged()) {
log("Reconfiguring proxy on connection");
@@ -3084,7 +2993,7 @@ public class WifiStateMachine extends StateMachine {
if (message.arg1 == mRssiPollToken) {
// Get Info and continue polling
fetchRssiAndLinkSpeedNative();
- sendMessageDelayed(obtainMessage(WifiStateMachine.CMD_RSSI_POLL,
+ sendMessageDelayed(obtainMessage(CMD_RSSI_POLL,
mRssiPollToken, 0), POLL_RSSI_INTERVAL_MSECS);
} else {
// Polling has completed
@@ -3096,25 +3005,22 @@ public class WifiStateMachine extends StateMachine {
if (mEnableRssiPolling) {
// first poll
fetchRssiAndLinkSpeedNative();
- sendMessageDelayed(obtainMessage(WifiStateMachine.CMD_RSSI_POLL,
+ sendMessageDelayed(obtainMessage(CMD_RSSI_POLL,
mRssiPollToken, 0), POLL_RSSI_INTERVAL_MSECS);
}
break;
default:
return NOT_HANDLED;
}
+
if (eventLoggingEnabled) {
EventLog.writeEvent(EVENTLOG_WIFI_EVENT_HANDLED, message.what);
}
return HANDLED;
}
+
@Override
public void exit() {
-
- /* Request a CS wakelock during transition to mobile */
- checkAndSetConnectivityInstance();
- mCm.requestNetworkTransitionWakelock(TAG);
-
/* If a scan result is pending in connected state, the supplicant
* is in SCAN_ONLY_MODE. Restore CONNECT_MODE on exit
*/
@@ -3124,6 +3030,141 @@ public class WifiStateMachine extends StateMachine {
}
}
+ class ObtainingIpState extends State {
+ @Override
+ public void enter() {
+ if (DBG) log(getName() + "\n");
+ EventLog.writeEvent(EVENTLOG_WIFI_STATE_CHANGED, getName());
+
+ if (!mWifiConfigStore.isUsingStaticIp(mLastNetworkId)) {
+ //start DHCP
+ mDhcpStateMachine = DhcpStateMachine.makeDhcpStateMachine(
+ mContext, WifiStateMachine.this, mInterfaceName);
+ mDhcpStateMachine.registerForPreDhcpNotification();
+ mDhcpStateMachine.sendMessage(DhcpStateMachine.CMD_START_DHCP);
+ } else {
+ DhcpInfoInternal dhcpInfoInternal = mWifiConfigStore.getIpConfiguration(
+ mLastNetworkId);
+ InterfaceConfiguration ifcg = new InterfaceConfiguration();
+ ifcg.setLinkAddress(dhcpInfoInternal.makeLinkAddress());
+ ifcg.setInterfaceUp();
+ try {
+ mNwService.setInterfaceConfig(mInterfaceName, ifcg);
+ if (DBG) log("Static IP configuration succeeded");
+ sendMessage(CMD_STATIC_IP_SUCCESS, dhcpInfoInternal);
+ } catch (RemoteException re) {
+ loge("Static IP configuration failed: " + re);
+ sendMessage(CMD_STATIC_IP_FAILURE);
+ } catch (IllegalStateException e) {
+ loge("Static IP configuration failed: " + e);
+ sendMessage(CMD_STATIC_IP_FAILURE);
+ }
+ }
+ }
+ @Override
+ public boolean processMessage(Message message) {
+ if (DBG) log(getName() + message.toString() + "\n");
+ switch(message.what) {
+ case CMD_STATIC_IP_SUCCESS:
+ handleSuccessfulIpConfiguration((DhcpInfoInternal) message.obj);
+ transitionTo(mVerifyingLinkState);
+ break;
+ case CMD_STATIC_IP_FAILURE:
+ handleFailedIpConfiguration();
+ transitionTo(mDisconnectingState);
+ break;
+ case CMD_SAVE_NETWORK:
+ deferMessage(message);
+ break;
+ /* Defer any power mode changes since we must keep active power mode at DHCP */
+ case CMD_SET_HIGH_PERF_MODE:
+ deferMessage(message);
+ break;
+ default:
+ return NOT_HANDLED;
+ }
+ EventLog.writeEvent(EVENTLOG_WIFI_EVENT_HANDLED, message.what);
+ return HANDLED;
+ }
+ }
+
+ class VerifyingLinkState extends State {
+ @Override
+ public void enter() {
+ if (DBG) log(getName() + "\n");
+ EventLog.writeEvent(EVENTLOG_WIFI_STATE_CHANGED, getName());
+ setNetworkDetailedState(DetailedState.VERIFYING_POOR_LINK);
+ mWifiConfigStore.updateStatus(mLastNetworkId, DetailedState.VERIFYING_POOR_LINK);
+ sendNetworkStateChangeBroadcast(mLastBssid);
+ }
+ @Override
+ public boolean processMessage(Message message) {
+ switch (message.what) {
+ case WifiWatchdogStateMachine.POOR_LINK_DETECTED:
+ //stay here
+ break;
+ case WifiWatchdogStateMachine.GOOD_LINK_DETECTED:
+ try {
+ mNwService.enableIpv6(mInterfaceName);
+ } catch (RemoteException re) {
+ loge("Failed to enable IPv6: " + re);
+ } catch (IllegalStateException e) {
+ loge("Failed to enable IPv6: " + e);
+ }
+
+ setNetworkDetailedState(DetailedState.CONNECTED);
+ mWifiConfigStore.updateStatus(mLastNetworkId, DetailedState.CONNECTED);
+ sendNetworkStateChangeBroadcast(mLastBssid);
+ transitionTo(mConnectedState);
+ break;
+ default:
+ return NOT_HANDLED;
+ }
+ EventLog.writeEvent(EVENTLOG_WIFI_EVENT_HANDLED, message.what);
+ return HANDLED;
+ }
+ }
+
+ class ConnectedState extends State {
+ @Override
+ public void enter() {
+ if (DBG) log(getName() + "\n");
+ EventLog.writeEvent(EVENTLOG_WIFI_STATE_CHANGED, getName());
+ }
+ @Override
+ public boolean processMessage(Message message) {
+ if (DBG) log(getName() + message.toString() + "\n");
+ switch (message.what) {
+ case WifiWatchdogStateMachine.POOR_LINK_DETECTED:
+ if (DBG) log("Watchdog reports poor link");
+ try {
+ mNwService.disableIpv6(mInterfaceName);
+ } catch (RemoteException re) {
+ loge("Failed to disable IPv6: " + re);
+ } catch (IllegalStateException e) {
+ loge("Failed to disable IPv6: " + e);
+ }
+ /* Report a disconnect */
+ setNetworkDetailedState(DetailedState.DISCONNECTED);
+ mWifiConfigStore.updateStatus(mLastNetworkId, DetailedState.DISCONNECTED);
+ sendNetworkStateChangeBroadcast(mLastBssid);
+
+ transitionTo(mVerifyingLinkState);
+ break;
+ default:
+ return NOT_HANDLED;
+ }
+ EventLog.writeEvent(EVENTLOG_WIFI_EVENT_HANDLED, message.what);
+ return HANDLED;
+ }
+ @Override
+ public void exit() {
+ /* Request a CS wakelock during transition to mobile */
+ checkAndSetConnectivityInstance();
+ mCm.requestNetworkTransitionWakelock(TAG);
+ }
+ }
+
class DisconnectingState extends State {
@Override
public void enter() {
diff --git a/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java b/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java
index 0ca3852..a2f6343 100644
--- a/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java
+++ b/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java
@@ -26,9 +26,12 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Resources;
import android.database.ContentObserver;
+import android.net.arp.ArpPeer;
import android.net.ConnectivityManager;
-import android.net.DnsPinger;
+import android.net.LinkAddress;
+import android.net.LinkProperties;
import android.net.NetworkInfo;
+import android.net.RouteInfo;
import android.net.Uri;
import android.os.Message;
import android.os.SystemClock;
@@ -38,6 +41,7 @@ import android.provider.Settings.Secure;
import android.util.Log;
import com.android.internal.R;
+import com.android.internal.util.AsyncChannel;
import com.android.internal.util.Protocol;
import com.android.internal.util.State;
import com.android.internal.util.StateMachine;
@@ -46,49 +50,66 @@ import java.io.IOException;
import java.io.PrintWriter;
import java.net.HttpURLConnection;
import java.net.InetAddress;
+import java.net.SocketException;
import java.net.URL;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
/**
- * {@link WifiWatchdogStateMachine} monitors the initial connection to a Wi-Fi
- * network with multiple access points. After the framework successfully
- * connects to an access point, the watchdog verifies connectivity by 'pinging'
- * the configured DNS server using {@link DnsPinger}.
- * <p>
- * On DNS check failure, the BSSID is blacklisted if it is reasonably likely
- * that another AP might have internet access; otherwise the SSID is disabled.
- * <p>
- * On DNS success, the WatchdogService initiates a walled garden check via an
- * http get. A browser window is activated if a walled garden is detected.
+ * WifiWatchdogStateMachine monitors the connection to a Wi-Fi
+ * network. After the framework notifies that it has connected to an
+ * acccess point and is waiting for link to be verified, the watchdog
+ * takes over and verifies if the link is good by doing ARP pings to
+ * the gateway using {@link ArpPeer}.
+ *
+ * Upon successful verification, the watchdog notifies and continues
+ * to monitor the link afterwards when the RSSI level falls below
+ * a certain threshold.
+
+ * When Wi-fi connects at L2 layer, the beacons from access point reach
+ * the device and it can maintain a connection, but the application
+ * connectivity can be flaky (due to bigger packet size exchange).
+ *
+ * We now monitor the quality of the last hop on
+ * Wi-Fi using signal strength and ARP connectivity as indicators
+ * to decide if the link is good enough to switch to Wi-Fi as the uplink.
+ *
+ * ARP pings are useful for link validation but can still get through
+ * when the application traffic fails to go through and are thus not
+ * the best indicator of real packet loss since they are tiny packets
+ * (28 bytes) and have a much low chance of packet corruption than the
+ * regular data packets.
+ *
+ * When signal strength and ARP are used together, it ends up working well in tests.
+ * The goal is to switch to Wi-Fi after validating ARP transfer
+ * and RSSI and then switching out of Wi-Fi when we hit a low
+ * signal strength threshold and then waiting until the signal strength
+ * improves and validating ARP transfer.
*
* @hide
*/
public class WifiWatchdogStateMachine extends StateMachine {
- private static final boolean DBG = false;
+ /* STOPSHIP: Keep this configurable for debugging until ship */
+ private static boolean DBG = false;
private static final String TAG = "WifiWatchdogStateMachine";
- private static final String DISABLED_NETWORK_NOTIFICATION_ID = "WifiWatchdog.networkdisabled";
private static final String WALLED_GARDEN_NOTIFICATION_ID = "WifiWatchdog.walledgarden";
- private static final int WIFI_SIGNAL_LEVELS = 4;
- /**
- * Low signal is defined as less than or equal to cut off
- */
- private static final int LOW_SIGNAL_CUTOFF = 0;
+ /* Wi-fi connection is considered poor below this
+ RSSI level threshold and the watchdog report it
+ to the WifiStateMachine */
+ private static final int RSSI_LEVEL_CUTOFF = 1;
+ /* Wi-fi connection is monitored actively below this
+ threshold */
+ private static final int RSSI_LEVEL_MONITOR = 2;
- private static final long DEFAULT_DNS_CHECK_SHORT_INTERVAL_MS = 2 * 60 * 1000;
- private static final long DEFAULT_DNS_CHECK_LONG_INTERVAL_MS = 60 * 60 * 1000;
- private static final long DEFAULT_WALLED_GARDEN_INTERVAL_MS = 30 * 60 * 1000;
+ private int mCurrentSignalLevel;
- private static final int DEFAULT_MAX_SSID_BLACKLISTS = 7;
- private static final int DEFAULT_NUM_DNS_PINGS = 5; // Multiple pings to detect setup issues
- private static final int DEFAULT_MIN_DNS_RESPONSES = 1;
+ private static final long DEFAULT_ARP_CHECK_INTERVAL_MS = 2 * 60 * 1000;
+ private static final long DEFAULT_WALLED_GARDEN_INTERVAL_MS = 30 * 60 * 1000;
- private static final int DEFAULT_DNS_PING_TIMEOUT_MS = 2000;
+ private static final int DEFAULT_NUM_ARP_PINGS = 5;
+ private static final int DEFAULT_MIN_ARP_RESPONSES = 1;
- private static final long DEFAULT_BLACKLIST_FOLLOWUP_INTERVAL_MS = 15 * 1000;
+ private static final int DEFAULT_ARP_PING_TIMEOUT_MS = 100;
// See http://go/clientsdns for usage approval
private static final String DEFAULT_WALLED_GARDEN_URL =
@@ -102,10 +123,6 @@ public class WifiWatchdogStateMachine extends StateMachine {
*/
private static final int WALLED_GARDEN_START_DELAY_MS = 3000;
- private static final int DNS_INTRATEST_PING_INTERVAL_MS = 200;
- /* With some router setups, it takes a few hunder milli-seconds before connection is active */
- private static final int DNS_START_DELAY_MS = 1000;
-
private static final int BASE = Protocol.BASE_WIFI_WATCHDOG;
/**
@@ -118,99 +135,76 @@ public class WifiWatchdogStateMachine extends StateMachine {
* which has a non-null networkInfo object
*/
private static final int EVENT_NETWORK_STATE_CHANGE = BASE + 2;
- /**
- * Indicates the signal has changed. Passed with arg1
- * {@link #mNetEventCounter} and arg2 [raw signal strength]
- */
+ /* Passed with RSSI information */
private static final int EVENT_RSSI_CHANGE = BASE + 3;
- private static final int EVENT_SCAN_RESULTS_AVAILABLE = BASE + 4;
private static final int EVENT_WIFI_RADIO_STATE_CHANGE = BASE + 5;
private static final int EVENT_WATCHDOG_SETTINGS_CHANGE = BASE + 6;
- private static final int MESSAGE_HANDLE_WALLED_GARDEN = BASE + 100;
- private static final int MESSAGE_HANDLE_BAD_AP = BASE + 101;
- /**
- * arg1 == mOnlineWatchState.checkCount
- */
- private static final int MESSAGE_SINGLE_DNS_CHECK = BASE + 102;
- private static final int MESSAGE_NETWORK_FOLLOWUP = BASE + 103;
- private static final int MESSAGE_DELAYED_WALLED_GARDEN_CHECK = BASE + 104;
+ /* Internal messages */
+ private static final int CMD_ARP_CHECK = BASE + 11;
+ private static final int CMD_DELAYED_WALLED_GARDEN_CHECK = BASE + 12;
+
+ /* Notifications to WifiStateMachine */
+ static final int POOR_LINK_DETECTED = BASE + 21;
+ static final int GOOD_LINK_DETECTED = BASE + 22;
+
+ private static final int SINGLE_ARP_CHECK = 0;
+ private static final int FULL_ARP_CHECK = 1;
private Context mContext;
private ContentResolver mContentResolver;
private WifiManager mWifiManager;
- private DnsPinger mDnsPinger;
private IntentFilter mIntentFilter;
private BroadcastReceiver mBroadcastReceiver;
+ private AsyncChannel mWsmChannel = new AsyncChannel();;
private DefaultState mDefaultState = new DefaultState();
private WatchdogDisabledState mWatchdogDisabledState = new WatchdogDisabledState();
private WatchdogEnabledState mWatchdogEnabledState = new WatchdogEnabledState();
private NotConnectedState mNotConnectedState = new NotConnectedState();
+ private VerifyingLinkState mVerifyingLinkState = new VerifyingLinkState();
private ConnectedState mConnectedState = new ConnectedState();
- private DnsCheckingState mDnsCheckingState = new DnsCheckingState();
+ private WalledGardenCheckState mWalledGardenCheckState = new WalledGardenCheckState();
+ /* Online and watching link connectivity */
private OnlineWatchState mOnlineWatchState = new OnlineWatchState();
+ /* Online and doing nothing */
private OnlineState mOnlineState = new OnlineState();
- private DnsCheckFailureState mDnsCheckFailureState = new DnsCheckFailureState();
- private DelayWalledGardenState mDelayWalledGardenState = new DelayWalledGardenState();
- private WalledGardenState mWalledGardenState = new WalledGardenState();
- private BlacklistedApState mBlacklistedApState = new BlacklistedApState();
- private long mDnsCheckShortIntervalMs;
- private long mDnsCheckLongIntervalMs;
+ private int mArpToken = 0;
+ private long mArpCheckIntervalMs;
private long mWalledGardenIntervalMs;
- private int mMaxSsidBlacklists;
- private int mNumDnsPings;
- private int mMinDnsResponses;
- private int mDnsPingTimeoutMs;
- private long mBlacklistFollowupIntervalMs;
+ private int mNumArpPings;
+ private int mMinArpResponses;
+ private int mArpPingTimeoutMs;
private boolean mPoorNetworkDetectionEnabled;
private boolean mWalledGardenTestEnabled;
private String mWalledGardenUrl;
- private boolean mShowDisabledNotification;
- /**
- * The {@link WifiInfo} object passed to WWSM on network broadcasts
- */
- private WifiInfo mConnectionInfo;
- private int mNetEventCounter = 0;
-
- /**
- * Currently maintained but not used, TODO
- */
- private HashSet<String> mBssids = new HashSet<String>();
- private int mNumCheckFailures = 0;
+ private WifiInfo mWifiInfo;
+ private LinkProperties mLinkProperties;
- private Long mLastWalledGardenCheckTime = null;
+ private long mLastWalledGardenCheckTime = 0;
- /**
- * This is set by the blacklisted state and reset when connected to a new AP.
- * It triggers a disableNetwork call if a DNS check fails.
- */
- public boolean mDisableAPNextFailure = false;
private static boolean sWifiOnly = false;
- private boolean mDisabledNotificationShown;
private boolean mWalledGardenNotificationShown;
- public boolean mHasConnectedWifiManager = false;
/**
* STATE MAP
* Default
* / \
- * Disabled Enabled
- * / \
- * NotConnected Connected
- * /---------\
- * (all other states)
+ * Disabled Enabled
+ * / \ \
+ * NotConnected Verifying Connected
+ * /---------\
+ * (all other states)
*/
private WifiWatchdogStateMachine(Context context) {
super(TAG);
mContext = context;
mContentResolver = context.getContentResolver();
mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
- mDnsPinger = new DnsPinger(mContext, "WifiWatchdogStateMachine.DnsPinger",
- this.getHandler().getLooper(), this.getHandler(),
- ConnectivityManager.TYPE_WIFI);
+ mWsmChannel.connectSync(mContext, getHandler(),
+ mWifiManager.getWifiStateMachineMessenger());
setupNetworkReceiver();
@@ -221,16 +215,17 @@ public class WifiWatchdogStateMachine extends StateMachine {
addState(mWatchdogDisabledState, mDefaultState);
addState(mWatchdogEnabledState, mDefaultState);
addState(mNotConnectedState, mWatchdogEnabledState);
+ addState(mVerifyingLinkState, mWatchdogEnabledState);
addState(mConnectedState, mWatchdogEnabledState);
- addState(mDnsCheckingState, mConnectedState);
- addState(mDnsCheckFailureState, mConnectedState);
- addState(mDelayWalledGardenState, mConnectedState);
- addState(mWalledGardenState, mConnectedState);
- addState(mBlacklistedApState, mConnectedState);
+ addState(mWalledGardenCheckState, mConnectedState);
addState(mOnlineWatchState, mConnectedState);
addState(mOnlineState, mConnectedState);
- setInitialState(mWatchdogDisabledState);
+ if (isWatchdogEnabled()) {
+ setInitialState(mNotConnectedState);
+ } else {
+ setInitialState(mWatchdogDisabledState);
+ }
updateSettings();
}
@@ -242,19 +237,15 @@ public class WifiWatchdogStateMachine extends StateMachine {
sWifiOnly = (cm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE) == false);
// Disable for wifi only devices.
- if (Settings.Secure.getString(contentResolver, Settings.Secure.WIFI_WATCHDOG_ON) == null &&
- sWifiOnly) {
+ if (Settings.Secure.getString(contentResolver, Settings.Secure.WIFI_WATCHDOG_ON) == null
+ && sWifiOnly) {
putSettingsBoolean(contentResolver, Settings.Secure.WIFI_WATCHDOG_ON, false);
}
WifiWatchdogStateMachine wwsm = new WifiWatchdogStateMachine(context);
wwsm.start();
- wwsm.sendMessage(EVENT_WATCHDOG_TOGGLED);
return wwsm;
}
- /**
- *
- */
private void setupNetworkReceiver() {
mBroadcastReceiver = new BroadcastReceiver() {
@Override
@@ -263,10 +254,8 @@ public class WifiWatchdogStateMachine extends StateMachine {
if (action.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) {
sendMessage(EVENT_NETWORK_STATE_CHANGE, intent);
} else if (action.equals(WifiManager.RSSI_CHANGED_ACTION)) {
- obtainMessage(EVENT_RSSI_CHANGE, mNetEventCounter,
- intent.getIntExtra(WifiManager.EXTRA_NEW_RSSI, -200)).sendToTarget();
- } else if (action.equals(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION)) {
- sendMessage(EVENT_SCAN_RESULTS_AVAILABLE);
+ obtainMessage(EVENT_RSSI_CHANGE,
+ intent.getIntExtra(WifiManager.EXTRA_NEW_RSSI, -200), 0).sendToTarget();
} else if (action.equals(WifiManager.WIFI_STATE_CHANGED_ACTION)) {
sendMessage(EVENT_WIFI_RADIO_STATE_CHANGE,
intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE,
@@ -279,7 +268,7 @@ public class WifiWatchdogStateMachine extends StateMachine {
mIntentFilter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
mIntentFilter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION);
mIntentFilter.addAction(WifiManager.RSSI_CHANGED_ACTION);
- mIntentFilter.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION);
+ mContext.registerReceiver(mBroadcastReceiver, mIntentFilter);
}
/**
@@ -311,39 +300,29 @@ public class WifiWatchdogStateMachine extends StateMachine {
mContext.getContentResolver().registerContentObserver(
Settings.Secure.getUriFor(
- Settings.Secure.WIFI_WATCHDOG_DNS_CHECK_SHORT_INTERVAL_MS),
+ Settings.Secure.WIFI_WATCHDOG_ARP_CHECK_INTERVAL_MS),
false, contentObserver);
mContext.getContentResolver().registerContentObserver(
- Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_DNS_CHECK_LONG_INTERVAL_MS),
- false, contentObserver);
- mContext.getContentResolver().registerContentObserver(
Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_WALLED_GARDEN_INTERVAL_MS),
false, contentObserver);
mContext.getContentResolver().registerContentObserver(
- Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_MAX_SSID_BLACKLISTS),
+ Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_NUM_ARP_PINGS),
false, contentObserver);
mContext.getContentResolver().registerContentObserver(
- Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_NUM_DNS_PINGS),
+ Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_MIN_ARP_RESPONSES),
false, contentObserver);
mContext.getContentResolver().registerContentObserver(
- Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_MIN_DNS_RESPONSES),
+ Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_ARP_PING_TIMEOUT_MS),
false, contentObserver);
mContext.getContentResolver().registerContentObserver(
- Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_DNS_PING_TIMEOUT_MS),
+ Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED),
false, contentObserver);
mContext.getContentResolver().registerContentObserver(
- Settings.Secure.getUriFor(
- Settings.Secure.WIFI_WATCHDOG_BLACKLIST_FOLLOWUP_INTERVAL_MS),
- false, contentObserver);
- mContext.getContentResolver().registerContentObserver(
Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_WALLED_GARDEN_TEST_ENABLED),
false, contentObserver);
mContext.getContentResolver().registerContentObserver(
Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_WALLED_GARDEN_URL),
false, contentObserver);
- mContext.getContentResolver().registerContentObserver(
- Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_SHOW_DISABLED_NETWORK_POPUP)
- , false, contentObserver);
}
/**
@@ -375,17 +354,20 @@ public class WifiWatchdogStateMachine extends StateMachine {
}
}
- private boolean rssiStrengthAboveCutoff(int rssi) {
- return WifiManager.calculateSignalLevel(rssi, WIFI_SIGNAL_LEVELS) > LOW_SIGNAL_CUTOFF;
- }
-
public void dump(PrintWriter pw) {
pw.print("WatchdogStatus: ");
- pw.print("State " + getCurrentState());
- pw.println(", network [" + mConnectionInfo + "]");
- pw.print("checkFailures " + mNumCheckFailures);
- pw.println(", bssids: " + mBssids);
- pw.println("lastSingleCheck: " + mOnlineWatchState.lastCheckTime);
+ pw.print("State: " + getCurrentState());
+ pw.println("mWifiInfo: [" + mWifiInfo + "]");
+ pw.println("mLinkProperties: [" + mLinkProperties + "]");
+ pw.println("mCurrentSignalLevel: [" + mCurrentSignalLevel + "]");
+ pw.println("mArpCheckIntervalMs: [" + mArpCheckIntervalMs+ "]");
+ pw.println("mWalledGardenIntervalMs: [" + mWalledGardenIntervalMs + "]");
+ pw.println("mNumArpPings: [" + mNumArpPings + "]");
+ pw.println("mMinArpResponses: [" + mMinArpResponses + "]");
+ pw.println("mArpPingTimeoutMs: [" + mArpPingTimeoutMs + "]");
+ pw.println("mPoorNetworkDetectionEnabled: [" + mPoorNetworkDetectionEnabled + "]");
+ pw.println("mWalledGardenTestEnabled: [" + mWalledGardenTestEnabled + "]");
+ pw.println("mWalledGardenUrl: [" + mWalledGardenUrl + "]");
}
private boolean isWatchdogEnabled() {
@@ -393,31 +375,22 @@ public class WifiWatchdogStateMachine extends StateMachine {
}
private void updateSettings() {
- mDnsCheckShortIntervalMs = Secure.getLong(mContentResolver,
- Secure.WIFI_WATCHDOG_DNS_CHECK_SHORT_INTERVAL_MS,
- DEFAULT_DNS_CHECK_SHORT_INTERVAL_MS);
- mDnsCheckLongIntervalMs = Secure.getLong(mContentResolver,
- Secure.WIFI_WATCHDOG_DNS_CHECK_LONG_INTERVAL_MS,
- DEFAULT_DNS_CHECK_LONG_INTERVAL_MS);
- mMaxSsidBlacklists = Secure.getInt(mContentResolver,
- Secure.WIFI_WATCHDOG_MAX_SSID_BLACKLISTS,
- DEFAULT_MAX_SSID_BLACKLISTS);
- mNumDnsPings = Secure.getInt(mContentResolver,
- Secure.WIFI_WATCHDOG_NUM_DNS_PINGS,
- DEFAULT_NUM_DNS_PINGS);
- mMinDnsResponses = Secure.getInt(mContentResolver,
- Secure.WIFI_WATCHDOG_MIN_DNS_RESPONSES,
- DEFAULT_MIN_DNS_RESPONSES);
- mDnsPingTimeoutMs = Secure.getInt(mContentResolver,
- Secure.WIFI_WATCHDOG_DNS_PING_TIMEOUT_MS,
- DEFAULT_DNS_PING_TIMEOUT_MS);
- mBlacklistFollowupIntervalMs = Secure.getLong(mContentResolver,
- Settings.Secure.WIFI_WATCHDOG_BLACKLIST_FOLLOWUP_INTERVAL_MS,
- DEFAULT_BLACKLIST_FOLLOWUP_INTERVAL_MS);
- //TODO: enable this by default after changing watchdog behavior
- //Also, update settings description
+ if (DBG) log("Updating secure settings");
+
+ mArpCheckIntervalMs = Secure.getLong(mContentResolver,
+ Secure.WIFI_WATCHDOG_ARP_CHECK_INTERVAL_MS,
+ DEFAULT_ARP_CHECK_INTERVAL_MS);
+ mNumArpPings = Secure.getInt(mContentResolver,
+ Secure.WIFI_WATCHDOG_NUM_ARP_PINGS,
+ DEFAULT_NUM_ARP_PINGS);
+ mMinArpResponses = Secure.getInt(mContentResolver,
+ Secure.WIFI_WATCHDOG_MIN_ARP_RESPONSES,
+ DEFAULT_MIN_ARP_RESPONSES);
+ mArpPingTimeoutMs = Secure.getInt(mContentResolver,
+ Secure.WIFI_WATCHDOG_ARP_PING_TIMEOUT_MS,
+ DEFAULT_ARP_PING_TIMEOUT_MS);
mPoorNetworkDetectionEnabled = getSettingsBoolean(mContentResolver,
- Settings.Secure.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED, false);
+ Settings.Secure.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED, true);
mWalledGardenTestEnabled = getSettingsBoolean(mContentResolver,
Settings.Secure.WIFI_WATCHDOG_WALLED_GARDEN_TEST_ENABLED, true);
mWalledGardenUrl = getSettingsStr(mContentResolver,
@@ -426,69 +399,6 @@ public class WifiWatchdogStateMachine extends StateMachine {
mWalledGardenIntervalMs = Secure.getLong(mContentResolver,
Secure.WIFI_WATCHDOG_WALLED_GARDEN_INTERVAL_MS,
DEFAULT_WALLED_GARDEN_INTERVAL_MS);
- mShowDisabledNotification = getSettingsBoolean(mContentResolver,
- Settings.Secure.WIFI_WATCHDOG_SHOW_DISABLED_NETWORK_POPUP, true);
- }
-
- /**
- * Helper to return wait time left given a min interval and last run
- *
- * @param interval minimum wait interval
- * @param lastTime last time action was performed in
- * SystemClock.elapsedRealtime(). Null if never.
- * @return non negative time to wait
- */
- private static long waitTime(long interval, Long lastTime) {
- if (lastTime == null)
- return 0;
- long wait = interval + lastTime - SystemClock.elapsedRealtime();
- return wait > 0 ? wait : 0;
- }
-
- private static String wifiInfoToStr(WifiInfo wifiInfo) {
- if (wifiInfo == null)
- return "null";
- return "(" + wifiInfo.getSSID() + ", " + wifiInfo.getBSSID() + ")";
- }
-
- /**
- * Uses {@link #mConnectionInfo}.
- */
- private void updateBssids() {
- String curSsid = mConnectionInfo.getSSID();
- List<ScanResult> results = mWifiManager.getScanResults();
- int oldNumBssids = mBssids.size();
-
- if (results == null) {
- if (DBG) {
- log("updateBssids: Got null scan results!");
- }
- return;
- }
-
- for (ScanResult result : results) {
- if (result == null || result.SSID == null) {
- if (DBG) {
- log("Received invalid scan result: " + result);
- }
- continue;
- }
- if (curSsid.equals(result.SSID))
- mBssids.add(result.BSSID);
- }
- }
-
- private void resetWatchdogState() {
- if (DBG) {
- log("Resetting watchdog state...");
- }
- mConnectionInfo = null;
- mDisableAPNextFailure = false;
- mLastWalledGardenCheckTime = null;
- mNumCheckFailures = 0;
- mBssids.clear();
- setDisabledNetworkNotificationVisible(false);
- setWalledGardenNotificationVisible(false);
}
private void setWalledGardenNotificationVisible(boolean visible) {
@@ -507,7 +417,7 @@ public class WifiWatchdogStateMachine extends StateMachine {
CharSequence title = r.getString(R.string.wifi_available_sign_in, 0);
CharSequence details = r.getString(R.string.wifi_available_sign_in_detailed,
- mConnectionInfo.getSSID());
+ mWifiInfo.getSSID());
Notification notification = new Notification();
notification.when = 0;
@@ -524,41 +434,6 @@ public class WifiWatchdogStateMachine extends StateMachine {
mWalledGardenNotificationShown = visible;
}
- private void setDisabledNetworkNotificationVisible(boolean visible) {
- // If it should be hidden and it is already hidden, then noop
- if (!visible && !mDisabledNotificationShown) {
- return;
- }
-
- Resources r = Resources.getSystem();
- NotificationManager notificationManager = (NotificationManager) mContext
- .getSystemService(Context.NOTIFICATION_SERVICE);
-
- if (visible) {
- CharSequence title = r.getText(R.string.wifi_watchdog_network_disabled);
- String msg = mConnectionInfo.getSSID() +
- r.getText(R.string.wifi_watchdog_network_disabled_detailed);
-
- Notification wifiDisabledWarning = new Notification.Builder(mContext)
- .setSmallIcon(R.drawable.stat_sys_warning)
- .setDefaults(Notification.DEFAULT_ALL)
- .setTicker(title)
- .setContentTitle(title)
- .setContentText(msg)
- .setContentIntent(PendingIntent.getActivity(mContext, 0,
- new Intent(WifiManager.ACTION_PICK_WIFI_NETWORK)
- .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK), 0))
- .setWhen(System.currentTimeMillis())
- .setAutoCancel(true)
- .getNotification();
-
- notificationManager.notify(DISABLED_NETWORK_NOTIFICATION_ID, 1, wifiDisabledWarning);
- } else {
- notificationManager.cancel(DISABLED_NETWORK_NOTIFICATION_ID, 1);
- }
- mDisabledNotificationShown = visible;
- }
-
class DefaultState extends State {
@Override
public boolean processMessage(Message msg) {
@@ -568,11 +443,20 @@ public class WifiWatchdogStateMachine extends StateMachine {
if (DBG) {
log("Updating wifi-watchdog secure settings");
}
- return HANDLED;
- }
- if (DBG) {
- log("Caught message " + msg.what + " in state " +
- getCurrentState().getName());
+ break;
+ case EVENT_RSSI_CHANGE:
+ mCurrentSignalLevel = WifiManager.calculateSignalLevel(msg.arg1,
+ WifiManager.RSSI_LEVELS);
+ break;
+ case EVENT_WIFI_RADIO_STATE_CHANGE:
+ case EVENT_NETWORK_STATE_CHANGE:
+ case CMD_ARP_CHECK:
+ case CMD_DELAYED_WALLED_GARDEN_CHECK:
+ //ignore
+ break;
+ default:
+ log("Unhandled message " + msg + " in state " + getCurrentState().getName());
+ break;
}
return HANDLED;
}
@@ -586,6 +470,20 @@ public class WifiWatchdogStateMachine extends StateMachine {
if (isWatchdogEnabled())
transitionTo(mNotConnectedState);
return HANDLED;
+ case EVENT_NETWORK_STATE_CHANGE:
+ Intent intent = (Intent) msg.obj;
+ NetworkInfo networkInfo = (NetworkInfo)
+ intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO);
+
+ switch (networkInfo.getDetailedState()) {
+ case VERIFYING_POOR_LINK:
+ if (DBG) log("Watchdog disabled, verify link");
+ mWsmChannel.sendMessage(GOOD_LINK_DETECTED);
+ break;
+ default:
+ break;
+ }
+ break;
}
return NOT_HANDLED;
}
@@ -594,10 +492,8 @@ public class WifiWatchdogStateMachine extends StateMachine {
class WatchdogEnabledState extends State {
@Override
public void enter() {
- resetWatchdogState();
- mContext.registerReceiver(mBroadcastReceiver, mIntentFilter);
if (DBG) log("WifiWatchdogService enabled");
- }
+ }
@Override
public boolean processMessage(Message msg) {
@@ -605,77 +501,57 @@ public class WifiWatchdogStateMachine extends StateMachine {
case EVENT_WATCHDOG_TOGGLED:
if (!isWatchdogEnabled())
transitionTo(mWatchdogDisabledState);
- return HANDLED;
+ break;
case EVENT_NETWORK_STATE_CHANGE:
- Intent stateChangeIntent = (Intent) msg.obj;
+ Intent intent = (Intent) msg.obj;
NetworkInfo networkInfo = (NetworkInfo)
- stateChangeIntent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO);
-
- setDisabledNetworkNotificationVisible(false);
- setWalledGardenNotificationVisible(false);
- switch (networkInfo.getState()) {
- case CONNECTED:
- WifiInfo wifiInfo = (WifiInfo)
- stateChangeIntent.getParcelableExtra(WifiManager.EXTRA_WIFI_INFO);
- if (wifiInfo == null) {
- loge("Connected --> WifiInfo object null!");
- return HANDLED;
- }
-
- if (wifiInfo.getSSID() == null || wifiInfo.getBSSID() == null) {
- loge("Received wifiInfo object with null elts: "
- + wifiInfoToStr(wifiInfo));
- return HANDLED;
- }
-
- initConnection(wifiInfo);
- mConnectionInfo = wifiInfo;
- mNetEventCounter++;
+ intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO);
+
+ switch (networkInfo.getDetailedState()) {
+ case VERIFYING_POOR_LINK:
+ mLinkProperties = (LinkProperties) intent.getParcelableExtra(
+ WifiManager.EXTRA_LINK_PROPERTIES);
+ mWifiInfo = (WifiInfo) intent.getParcelableExtra(
+ WifiManager.EXTRA_WIFI_INFO);
if (mPoorNetworkDetectionEnabled) {
- updateBssids();
- transitionTo(mDnsCheckingState);
+ if (mWifiInfo == null) {
+ log("Ignoring link verification, mWifiInfo is NULL");
+ mWsmChannel.sendMessage(GOOD_LINK_DETECTED);
+ } else {
+ transitionTo(mVerifyingLinkState);
+ }
} else {
- transitionTo(mDelayWalledGardenState);
+ mWsmChannel.sendMessage(GOOD_LINK_DETECTED);
+ }
+ break;
+ case CONNECTED:
+ if (shouldCheckWalledGarden()) {
+ transitionTo(mWalledGardenCheckState);
+ } else {
+ transitionTo(mOnlineWatchState);
}
break;
default:
- mNetEventCounter++;
transitionTo(mNotConnectedState);
break;
}
- return HANDLED;
+ break;
case EVENT_WIFI_RADIO_STATE_CHANGE:
if ((Integer) msg.obj == WifiManager.WIFI_STATE_DISABLING) {
if (DBG) log("WifiStateDisabling -- Resetting WatchdogState");
- resetWatchdogState();
- mNetEventCounter++;
transitionTo(mNotConnectedState);
}
- return HANDLED;
- }
-
- return NOT_HANDLED;
- }
-
- /**
- * @param wifiInfo Info object with non-null ssid and bssid
- */
- private void initConnection(WifiInfo wifiInfo) {
- if (DBG) {
- log("Connected:: old " + wifiInfoToStr(mConnectionInfo) +
- " ==> new " + wifiInfoToStr(wifiInfo));
+ break;
+ default:
+ return NOT_HANDLED;
}
- if (mConnectionInfo == null || !wifiInfo.getSSID().equals(mConnectionInfo.getSSID())) {
- resetWatchdogState();
- } else if (!wifiInfo.getBSSID().equals(mConnectionInfo.getBSSID())) {
- mDisableAPNextFailure = false;
- }
+ setWalledGardenNotificationVisible(false);
+ return HANDLED;
}
@Override
public void exit() {
- mContext.unregisterReceiver(mBroadcastReceiver);
if (DBG) log("WifiWatchdogService disabled");
}
}
@@ -683,423 +559,240 @@ public class WifiWatchdogStateMachine extends StateMachine {
class NotConnectedState extends State {
}
- class ConnectedState extends State {
+ class VerifyingLinkState extends State {
+ @Override
+ public void enter() {
+ if (DBG) log(getName() + "\n");
+ //Treat entry as an rssi change
+ handleRssiChange();
+ }
+
+ private void handleRssiChange() {
+ if (mCurrentSignalLevel <= RSSI_LEVEL_CUTOFF) {
+ //stay here
+ if (DBG) log("enter VerifyingLinkState, stay level: " + mCurrentSignalLevel);
+ } else {
+ if (DBG) log("enter VerifyingLinkState, arp check level: " + mCurrentSignalLevel);
+ sendMessage(obtainMessage(CMD_ARP_CHECK, ++mArpToken, 0));
+ }
+ }
+
@Override
public boolean processMessage(Message msg) {
switch (msg.what) {
- case EVENT_SCAN_RESULTS_AVAILABLE:
- if (mPoorNetworkDetectionEnabled) {
- updateBssids();
- }
- return HANDLED;
case EVENT_WATCHDOG_SETTINGS_CHANGE:
updateSettings();
- if (mPoorNetworkDetectionEnabled) {
- transitionTo(mOnlineWatchState);
- } else {
- transitionTo(mOnlineState);
+ if (!mPoorNetworkDetectionEnabled) {
+ mWsmChannel.sendMessage(GOOD_LINK_DETECTED);
}
- return HANDLED;
+ break;
+ case EVENT_RSSI_CHANGE:
+ int signalLevel = WifiManager.calculateSignalLevel(msg.arg1,
+ WifiManager.RSSI_LEVELS);
+ if (DBG) log("RSSI change old: " + mCurrentSignalLevel + "new: " + signalLevel);
+ mCurrentSignalLevel = signalLevel;
+
+ handleRssiChange();
+ break;
+ case CMD_ARP_CHECK:
+ if (msg.arg1 == mArpToken) {
+ if (doArpTest(FULL_ARP_CHECK) == true) {
+ if (DBG) log("Notify link is good " + mCurrentSignalLevel);
+ mWsmChannel.sendMessage(GOOD_LINK_DETECTED);
+ } else {
+ if (DBG) log("Continue ARP check, rssi level: " + mCurrentSignalLevel);
+ sendMessageDelayed(obtainMessage(CMD_ARP_CHECK, ++mArpToken, 0),
+ mArpCheckIntervalMs);
+ }
+ }
+ break;
+ default:
+ return NOT_HANDLED;
}
- return NOT_HANDLED;
+ return HANDLED;
}
}
- class DnsCheckingState extends State {
- List<InetAddress> mDnsList;
- int[] dnsCheckSuccesses;
- String dnsCheckLogStr;
- String[] dnsResponseStrs;
- /** Keeps track of active dns pings. Map is from pingID to index in mDnsList */
- HashMap<Integer, Integer> idDnsMap = new HashMap<Integer, Integer>();
-
+ class ConnectedState extends State {
@Override
public void enter() {
- mDnsList = mDnsPinger.getDnsList();
- int numDnses = mDnsList.size();
- dnsCheckSuccesses = new int[numDnses];
- dnsResponseStrs = new String[numDnses];
- for (int i = 0; i < numDnses; i++)
- dnsResponseStrs[i] = "";
-
- if (DBG) {
- dnsCheckLogStr = String.format("Pinging %s on ssid [%s]: ",
- mDnsList, mConnectionInfo.getSSID());
- log(dnsCheckLogStr);
- }
-
- idDnsMap.clear();
- for (int i=0; i < mNumDnsPings; i++) {
- for (int j = 0; j < numDnses; j++) {
- idDnsMap.put(mDnsPinger.pingDnsAsync(mDnsList.get(j), mDnsPingTimeoutMs,
- DNS_START_DELAY_MS + DNS_INTRATEST_PING_INTERVAL_MS * i), j);
- }
- }
+ if (DBG) log(getName() + "\n");
}
-
@Override
public boolean processMessage(Message msg) {
- if (msg.what != DnsPinger.DNS_PING_RESULT) {
- return NOT_HANDLED;
- }
-
- int pingID = msg.arg1;
- int pingResponseTime = msg.arg2;
-
- Integer dnsServerId = idDnsMap.get(pingID);
- if (dnsServerId == null) {
- loge("Received a Dns response with unknown ID!");
- return HANDLED;
- }
-
- idDnsMap.remove(pingID);
- if (pingResponseTime >= 0)
- dnsCheckSuccesses[dnsServerId]++;
-
- if (DBG) {
- if (pingResponseTime >= 0) {
- dnsResponseStrs[dnsServerId] += "|" + pingResponseTime;
- } else {
- dnsResponseStrs[dnsServerId] += "|x";
- }
- }
-
- /**
- * After a full ping count, if we have more responses than this
- * cutoff, the outcome is success; else it is 'failure'.
- */
-
- /**
- * Our final success count will be at least this big, so we're
- * guaranteed to succeed.
- */
- if (dnsCheckSuccesses[dnsServerId] >= mMinDnsResponses) {
- // DNS CHECKS OK, NOW WALLED GARDEN
- if (DBG) {
- log(makeLogString() + " SUCCESS");
- }
+ switch (msg.what) {
+ case EVENT_WATCHDOG_SETTINGS_CHANGE:
+ updateSettings();
+ //STOPSHIP: Remove this at ship
+ DBG = true;
+ if (DBG) log("Updated secure settings and turned debug on");
- if (!shouldCheckWalledGarden()) {
- transitionTo(mOnlineWatchState);
+ if (mPoorNetworkDetectionEnabled) {
+ transitionTo(mOnlineWatchState);
+ } else {
+ transitionTo(mOnlineState);
+ }
return HANDLED;
- }
-
- transitionTo(mDelayWalledGardenState);
- return HANDLED;
- }
-
- if (idDnsMap.isEmpty()) {
- if (DBG) {
- log(makeLogString() + " FAILURE");
- }
- transitionTo(mDnsCheckFailureState);
- return HANDLED;
}
-
- return HANDLED;
- }
-
- private String makeLogString() {
- String logStr = dnsCheckLogStr;
- for (String respStr : dnsResponseStrs)
- logStr += " [" + respStr + "]";
- return logStr;
- }
-
- @Override
- public void exit() {
- mDnsPinger.cancelPings();
- }
-
- private boolean shouldCheckWalledGarden() {
- if (!mWalledGardenTestEnabled) {
- if (DBG)
- log("Skipping walled garden check - disabled");
- return false;
- }
- long waitTime = waitTime(mWalledGardenIntervalMs,
- mLastWalledGardenCheckTime);
- if (waitTime > 0) {
- if (DBG) {
- log("Skipping walled garden check - wait " +
- waitTime + " ms.");
- }
- return false;
- }
- return true;
+ return NOT_HANDLED;
}
}
- class DelayWalledGardenState extends State {
+ class WalledGardenCheckState extends State {
+ private int mWalledGardenToken = 0;
@Override
public void enter() {
- sendMessageDelayed(MESSAGE_DELAYED_WALLED_GARDEN_CHECK, WALLED_GARDEN_START_DELAY_MS);
+ if (DBG) log(getName() + "\n");
+ sendMessageDelayed(obtainMessage(CMD_DELAYED_WALLED_GARDEN_CHECK,
+ ++mWalledGardenToken, 0), WALLED_GARDEN_START_DELAY_MS);
}
@Override
public boolean processMessage(Message msg) {
switch (msg.what) {
- case MESSAGE_DELAYED_WALLED_GARDEN_CHECK:
- mLastWalledGardenCheckTime = SystemClock.elapsedRealtime();
- if (isWalledGardenConnection()) {
- if (DBG) log("Walled garden test complete - walled garden detected");
- transitionTo(mWalledGardenState);
- } else {
- if (DBG) log("Walled garden test complete - online");
- if (mPoorNetworkDetectionEnabled) {
- transitionTo(mOnlineWatchState);
- } else {
- transitionTo(mOnlineState);
+ case CMD_DELAYED_WALLED_GARDEN_CHECK:
+ if (msg.arg1 == mWalledGardenToken) {
+ mLastWalledGardenCheckTime = SystemClock.elapsedRealtime();
+ if (isWalledGardenConnection()) {
+ if (DBG) log("Walled garden detected");
+ setWalledGardenNotificationVisible(true);
}
+ transitionTo(mOnlineWatchState);
}
- return HANDLED;
+ break;
default:
return NOT_HANDLED;
}
+ return HANDLED;
}
}
class OnlineWatchState extends State {
- /**
- * Signals a short-wait message is enqueued for the current 'guard' counter
- */
- boolean unstableSignalChecks = false;
-
- /**
- * The signal is unstable. We should enqueue a short-wait check, if one is enqueued
- * already
- */
- boolean signalUnstable = false;
-
- /**
- * A monotonic counter to ensure that at most one check message will be processed from any
- * set of check messages currently enqueued. Avoids duplicate checks when a low-signal
- * event is observed.
- */
- int checkGuard = 0;
- Long lastCheckTime = null;
-
- /** Keeps track of dns pings. Map is from pingID to InetAddress used for ping */
- HashMap<Integer, InetAddress> pingInfoMap = new HashMap<Integer, InetAddress>();
-
- @Override
public void enter() {
- lastCheckTime = SystemClock.elapsedRealtime();
- signalUnstable = false;
- checkGuard++;
- unstableSignalChecks = false;
- pingInfoMap.clear();
- triggerSingleDnsCheck();
+ if (DBG) log(getName() + "\n");
+ if (mPoorNetworkDetectionEnabled) {
+ //Treat entry as an rssi change
+ handleRssiChange();
+ } else {
+ transitionTo(mOnlineState);
+ }
+ }
+
+ private void handleRssiChange() {
+ if (mCurrentSignalLevel <= RSSI_LEVEL_CUTOFF) {
+ if (DBG) log("Transition out, below cut off level: " + mCurrentSignalLevel);
+ mWsmChannel.sendMessage(POOR_LINK_DETECTED);
+ } else if (mCurrentSignalLevel <= RSSI_LEVEL_MONITOR) {
+ if (DBG) log("Start monitoring, level: " + mCurrentSignalLevel);
+ sendMessage(obtainMessage(CMD_ARP_CHECK, ++mArpToken, 0));
+ }
}
@Override
public boolean processMessage(Message msg) {
switch (msg.what) {
case EVENT_RSSI_CHANGE:
- if (msg.arg1 != mNetEventCounter) {
- if (DBG) {
- log("Rssi change message out of sync, ignoring");
- }
- return HANDLED;
- }
- int newRssi = msg.arg2;
- signalUnstable = !rssiStrengthAboveCutoff(newRssi);
- if (DBG) {
- log("OnlineWatchState:: new rssi " + newRssi + " --> level " +
- WifiManager.calculateSignalLevel(newRssi, WIFI_SIGNAL_LEVELS));
- }
-
- if (signalUnstable && !unstableSignalChecks) {
- if (DBG) {
- log("Sending triggered check msg");
- }
- triggerSingleDnsCheck();
- }
- return HANDLED;
- case MESSAGE_SINGLE_DNS_CHECK:
- if (msg.arg1 != checkGuard) {
- if (DBG) {
- log("Single check msg out of sync, ignoring.");
- }
- return HANDLED;
- }
- lastCheckTime = SystemClock.elapsedRealtime();
- pingInfoMap.clear();
- for (InetAddress curDns: mDnsPinger.getDnsList()) {
- pingInfoMap.put(mDnsPinger.pingDnsAsync(curDns, mDnsPingTimeoutMs, 0),
- curDns);
- }
- return HANDLED;
- case DnsPinger.DNS_PING_RESULT:
- InetAddress curDnsServer = pingInfoMap.get(msg.arg1);
- if (curDnsServer == null) {
- return HANDLED;
- }
- pingInfoMap.remove(msg.arg1);
- int responseTime = msg.arg2;
- if (responseTime >= 0) {
- if (DBG) {
- log("Single DNS ping OK. Response time: "
- + responseTime + " from DNS " + curDnsServer);
+ int signalLevel = WifiManager.calculateSignalLevel(msg.arg1,
+ WifiManager.RSSI_LEVELS);
+ if (DBG) log("RSSI change old: " + mCurrentSignalLevel + "new: " + signalLevel);
+ mCurrentSignalLevel = signalLevel;
+
+ handleRssiChange();
+
+ break;
+ case CMD_ARP_CHECK:
+ if (msg.arg1 == mArpToken) {
+ if (doArpTest(SINGLE_ARP_CHECK) != true) {
+ if (DBG) log("single ARP fail, full ARP check");
+ //do a full test
+ if (doArpTest(FULL_ARP_CHECK) != true) {
+ if (DBG) log("notify full ARP fail, level: " + mCurrentSignalLevel);
+ mWsmChannel.sendMessage(POOR_LINK_DETECTED);
+ }
}
- pingInfoMap.clear();
- checkGuard++;
- unstableSignalChecks = false;
- triggerSingleDnsCheck();
- } else {
- if (pingInfoMap.isEmpty()) {
- if (DBG) {
- log("Single dns ping failure. All dns servers failed, "
- + "starting full checks.");
- }
- transitionTo(mDnsCheckingState);
+ if (mCurrentSignalLevel <= RSSI_LEVEL_MONITOR) {
+ if (DBG) log("Continue ARP check, rssi level: " + mCurrentSignalLevel);
+ sendMessageDelayed(obtainMessage(CMD_ARP_CHECK, ++mArpToken, 0),
+ mArpCheckIntervalMs);
}
}
- return HANDLED;
- }
- return NOT_HANDLED;
- }
-
- @Override
- public void exit() {
- mDnsPinger.cancelPings();
- }
-
- /**
- * Times a dns check with an interval based on {@link #signalUnstable}
- */
- private void triggerSingleDnsCheck() {
- long waitInterval;
- if (signalUnstable) {
- waitInterval = mDnsCheckShortIntervalMs;
- unstableSignalChecks = true;
- } else {
- waitInterval = mDnsCheckLongIntervalMs;
+ break;
+ default:
+ return NOT_HANDLED;
}
- sendMessageDelayed(obtainMessage(MESSAGE_SINGLE_DNS_CHECK, checkGuard, 0),
- waitTime(waitInterval, lastCheckTime));
+ return HANDLED;
}
}
-
/* Child state of ConnectedState indicating that we are online
* and there is nothing to do
*/
class OnlineState extends State {
}
- class DnsCheckFailureState extends State {
-
- @Override
- public void enter() {
- mNumCheckFailures++;
- obtainMessage(MESSAGE_HANDLE_BAD_AP, mNetEventCounter, 0).sendToTarget();
+ private boolean shouldCheckWalledGarden() {
+ if (!mWalledGardenTestEnabled) {
+ if (DBG) log("Skipping walled garden check - disabled");
+ return false;
}
- @Override
- public boolean processMessage(Message msg) {
- if (msg.what != MESSAGE_HANDLE_BAD_AP) {
- return NOT_HANDLED;
- }
-
- if (msg.arg1 != mNetEventCounter) {
- if (DBG) {
- log("Msg out of sync, ignoring...");
- }
- return HANDLED;
- }
+ long waitTime = (mWalledGardenIntervalMs + mLastWalledGardenCheckTime)
+ - SystemClock.elapsedRealtime();
- if (mDisableAPNextFailure || mNumCheckFailures >= mBssids.size()
- || mNumCheckFailures >= mMaxSsidBlacklists) {
- if (sWifiOnly) {
- log("Would disable bad network, but device has no mobile data!" +
- " Going idle...");
- // This state should be called idle -- will be changing flow.
- transitionTo(mNotConnectedState);
- return HANDLED;
- }
-
- // TODO : Unban networks if they had low signal ?
- log("Disabling current SSID " + wifiInfoToStr(mConnectionInfo)
- + ". " + "numCheckFailures " + mNumCheckFailures
- + ", numAPs " + mBssids.size());
- int networkId = mConnectionInfo.getNetworkId();
- if (!mHasConnectedWifiManager) {
- mWifiManager.asyncConnect(mContext, getHandler());
- mHasConnectedWifiManager = true;
- }
- mWifiManager.disableNetwork(networkId, WifiConfiguration.DISABLED_DNS_FAILURE);
- if (mShowDisabledNotification) {
- setDisabledNetworkNotificationVisible(true);
- }
- transitionTo(mNotConnectedState);
- } else {
- log("Blacklisting current BSSID. " + wifiInfoToStr(mConnectionInfo)
- + "numCheckFailures " + mNumCheckFailures + ", numAPs " + mBssids.size());
-
- mWifiManager.addToBlacklist(mConnectionInfo.getBSSID());
- mWifiManager.reassociate();
- transitionTo(mBlacklistedApState);
+ if (mLastWalledGardenCheckTime != 0 && waitTime > 0) {
+ if (DBG) {
+ log("Skipping walled garden check - wait " +
+ waitTime + " ms.");
}
- return HANDLED;
+ return false;
}
+ return true;
}
- class WalledGardenState extends State {
- @Override
- public void enter() {
- obtainMessage(MESSAGE_HANDLE_WALLED_GARDEN, mNetEventCounter, 0).sendToTarget();
- }
+ private boolean doArpTest(int type) {
+ boolean success;
- @Override
- public boolean processMessage(Message msg) {
- if (msg.what != MESSAGE_HANDLE_WALLED_GARDEN) {
- return NOT_HANDLED;
- }
+ String iface = mLinkProperties.getInterfaceName();
+ String mac = mWifiInfo.getMacAddress();
+ InetAddress inetAddress = null;
+ InetAddress gateway = null;
- if (msg.arg1 != mNetEventCounter) {
- if (DBG) {
- log("WalledGardenState::Msg out of sync, ignoring...");
- }
- return HANDLED;
- }
- setWalledGardenNotificationVisible(true);
- if (mPoorNetworkDetectionEnabled) {
- transitionTo(mOnlineWatchState);
- } else {
- transitionTo(mOnlineState);
- }
- return HANDLED;
+ for (LinkAddress la : mLinkProperties.getLinkAddresses()) {
+ inetAddress = la.getAddress();
+ break;
}
- }
- class BlacklistedApState extends State {
- @Override
- public void enter() {
- mDisableAPNextFailure = true;
- sendMessageDelayed(obtainMessage(MESSAGE_NETWORK_FOLLOWUP, mNetEventCounter, 0),
- mBlacklistFollowupIntervalMs);
+ for (RouteInfo route : mLinkProperties.getRoutes()) {
+ gateway = route.getGateway();
+ break;
}
- @Override
- public boolean processMessage(Message msg) {
- if (msg.what != MESSAGE_NETWORK_FOLLOWUP) {
- return NOT_HANDLED;
- }
+ if (DBG) log("ARP " + iface + "addr: " + inetAddress + "mac: " + mac + "gw: " + gateway);
- if (msg.arg1 != mNetEventCounter) {
- if (DBG) {
- log("BlacklistedApState::Msg out of sync, ignoring...");
+ try {
+ ArpPeer peer = new ArpPeer(iface, inetAddress, mac, gateway);
+ if (type == SINGLE_ARP_CHECK) {
+ success = (peer.doArp(mArpPingTimeoutMs) != null);
+ if (DBG) log("single ARP test result: " + success);
+ } else {
+ int responses = 0;
+ for (int i=0; i < mNumArpPings; i++) {
+ if(peer.doArp(mArpPingTimeoutMs) != null) responses++;
}
- return HANDLED;
+ if (DBG) log("full ARP test result: " + responses + "/" + mNumArpPings);
+ success = (responses >= mMinArpResponses);
}
-
- transitionTo(mDnsCheckingState);
- return HANDLED;
+ peer.close();
+ } catch (SocketException se) {
+ //Consider an Arp socket creation issue as a successful Arp
+ //test to avoid any wifi connectivity issues
+ loge("ARP test initiation failure: " + se);
+ success = true;
}
- }
+ return success;
+ }
/**
* Convenience function for retrieving a single secure settings value