patch_615_1029_to_1127 1485/1 1485/head 1487/target/1
authorSnickerSun <snickersun@163.com>
Mon, 2 Dec 2024 06:47:41 +0000 (14:47 +0800)
committerSnickerSun <snickersun@163.com>
Mon, 2 Dec 2024 06:47:41 +0000 (14:47 +0800)
添加u8 project

388 files changed:
autobuild.sh
code/sdk/application/brandy/brandy_standard/input_app.c
code/sdk/application/wearable/nativeabilityfwk/CMakeLists.txt
code/sdk/application/wearable/nativeabilityfwk/include/Ability.h
code/sdk/application/wearable/nativeabilityfwk/include/AbilitySlice.h
code/sdk/application/wearable/nativeabilityfwk/include/AbilitySliceProxy.h
code/sdk/application/wearable/nativeabilityfwk/include/BackDragListener.h [new file with mode: 0644]
code/sdk/application/wearable/nativeabilityfwk/include/NativeAbility.h
code/sdk/application/wearable/nativeabilityfwk/include/Presenter.h
code/sdk/application/wearable/nativeabilityfwk/include/SliceTransition.h
code/sdk/application/wearable/nativeabilityfwk/src/Ability.cpp
code/sdk/application/wearable/nativeabilityfwk/src/BackDragListener.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeabilityfwk/src/SliceTransition.cpp
code/sdk/application/wearable/nativeapp/CMakeLists.txt
code/sdk/application/wearable/nativeapp/nativelauncher/include/AppViewIDs.h
code/sdk/application/wearable/nativeapp/nativelauncher/include/NativeLauncher.h
code/sdk/application/wearable/nativeapp/nativelauncher/src/NativeLauncher.cpp
code/sdk/application/wearable/nativeapp/nativeui/aod_view/include/AodModel.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/aod_view/include/AodPresenter.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/aod_view/include/AodView.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/aod_view/src/AodModel.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/aod_view/src/AodPresenter.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/aod_view/src/AodView.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/applist/include/ApplistModel.h
code/sdk/application/wearable/nativeapp/nativeui/applist/src/ApplistModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/applist/src/ApplistPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/clock/include/AmbientClockView.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/clock/src/AmbientClockView.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/connectnewphone/src/ConnectOpenView.cpp
code/sdk/application/wearable/nativeapp/nativeui/connectnewphone/src/ConnectSelectView.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/include/DialBinParser.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/DialBinTypes.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/DialBinTypesV2.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/main/include/MainModel.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialViewGroup.h
code/sdk/application/wearable/nativeapp/nativeui/main/src/MainModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/MainPresenterSample.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialArcLabelView.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialDigitalImgView.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialLabelView.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialViewGroup.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/parser/DialBinParser.cpp
code/sdk/application/wearable/nativeapp/nativeui/rebootdevice/src/RebootDeviceView.cpp
code/sdk/application/wearable/nativeapp/nativeui/rebootdevice/src/RebootView.cpp
code/sdk/application/wearable/nativeapp/nativeui/rebootdevice/src/ShutdownDeviceView.cpp
code/sdk/application/wearable/nativeapp/nativeui/screennotify/include/ui_screennotify.h
code/sdk/application/wearable/nativeapp/nativeui/screennotify/src/ui_screennotify.cpp
code/sdk/application/wearable/nativeapp/nativeui/screensetting/src/ScreenModels.cpp
code/sdk/application/wearable/nativeapp/nativeui/set_desktop/src/SetDesktopView.cpp
code/sdk/application/wearable/nativeapp/nativeui/set_dial/include/SetDialInfo.h
code/sdk/application/wearable/nativeapp/nativeui/set_dial/include/SetDialModel.h
code/sdk/application/wearable/nativeapp/nativeui/set_dial/src/SetDialModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/set_dial_style/include/SetDialStyleView.h
code/sdk/application/wearable/nativeapp/nativeui/set_dial_style/src/SetDialStyleView.cpp
code/sdk/application/wearable/nativeapp/nativeui/settings/include/SettingItem.h
code/sdk/application/wearable/nativeapp/nativeui/settings/include/SettingItemView.h
code/sdk/application/wearable/nativeapp/nativeui/settings/src/SettingModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/settings/src/SettingPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/settings/src/SettingView.cpp
code/sdk/application/wearable/nativeapp/nativeui/uisample/uitest/framework/src/ui_test_group.cpp
code/sdk/application/wearable/service/msg_center/CMakeLists.txt
code/sdk/application/wearable/service/msg_center/brandy-auto-ota-cli/libmsg_center.a
code/sdk/application/wearable/service/msg_center/brandy-auto-ota-ser/libmsg_center.a
code/sdk/application/wearable/service/msg_center/brandy-native-js-fd230/libmsg_center.a
code/sdk/application/wearable/service/msg_center/brandy-native-js-lt22/libmsg_center.a
code/sdk/application/wearable/service/msg_center/brandy-native-js-u8/libmsg_center.a [new file with mode: 0644]
code/sdk/application/wearable/service/msg_center/brandy-native-js-w9/libmsg_center.a
code/sdk/application/wearable/service/msg_center/brandy-native-js/libmsg_center.a
code/sdk/application/wearable/service/msg_center/brandy-xts/libmsg_center.a
code/sdk/application/wearable/service/msg_center/include/vendor_app/baidu_app.h
code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp
code/sdk/application/wearable/service/msg_center/src/vendor_app/baidu/baidu_app.cpp
code/sdk/application/wearable/service/power_manager/include/power_display_service.h
code/sdk/application/wearable/service/power_manager/src/actions/display_action.c
code/sdk/application/wearable/service/power_manager/src/display_state_machine.c
code/sdk/application/wearable/service/power_manager/src/filters/gui_event_filter.c
code/sdk/application/wearable/service/power_manager/src/filters/timer_event_filter.c
code/sdk/application/wearable/service/power_manager/src/power_display_service.c
code/sdk/application/wstp/at_service/ohosfwk/ohosfwk_at_process.cpp
code/sdk/build/cmake/build_component.cmake
code/sdk/build/config/target_config/brandy/config.py
code/sdk/build/script/sdk_generator/sdk_generator.py
code/sdk/build/script/utils/build_utils.py
code/sdk/drivers/boards/brandy_evb/board_config/board_u8.h [new file with mode: 0644]
code/sdk/drivers/chips/brandy/pmu/drivers/acore/pmu_ldo.h
code/sdk/drivers/chips/brandy/pmu/drivers/acore/pmu_vdd.c
code/sdk/drivers/chips/brandy/pmu/hal/hal_pmu_interrupt.h
code/sdk/drivers/chips/brandy/porting/liteos/riscv70/tick_timer.c
code/sdk/drivers/chips/brandy/porting/pinctrl/pinctrl_porting_brandy.c
code/sdk/drivers/drivers/driver/audio/source/build/cmake/audio_common.cmake
code/sdk/drivers/drivers/driver/audio/source/drv/aoe/drv_ao.c
code/sdk/drivers/drivers/driver/efuse/efuse.c
code/sdk/include/middleware/services/bts/br/bts_spp.h
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/appsys_bms_cmd.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/gt_bundle_extractor.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/gt_bundle_installer.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/gt_bundle_parser.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/image_cache_manager.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/lite_m_gfx_engine.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/local_device_manager.c.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/lv_draw_vgu.c.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/map_svg_parser.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/sdk_general_gap.c.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/spp_service.c.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/text_ext.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_canvas_ext.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_coverflow_view2.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_font_hw_cache.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_font_hw_vector.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_hexagons_list.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_roller_view.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_waterfall_list.cpp.xml
code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/ble/libbt_host_brandy_service.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/ble/libbt_host_sdk.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/br/libbt_host_audio_manager_wrapper.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/br/libbt_host_brandy_service.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/br/libbt_host_sdk.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/ble/libbt_host_brandy_service.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/ble/libbt_host_sdk.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_audio_manager_wrapper.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_brandy_service.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_sdk.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/mini/ble/libbt_host_brandy_service.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/mini/ble/libbt_host_sdk.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/mini/br/libbt_host_audio_manager_wrapper.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/mini/br/libbt_host_brandy_service.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/mini/br/libbt_host_sdk.a
code/sdk/middleware/chips/brandy/dfx/CMakeLists.txt
code/sdk/middleware/chips/brandy/dfx/include/log_def_app.h
code/sdk/middleware/chips/brandy/pm/service/pm_sleep.c
code/sdk/middleware/chips/brandy/pm/service/pm_tickless.c
code/sdk/middleware/services/gpu/api/rm/brandy-auto-ota-cli/libgfx_rm.a
code/sdk/middleware/services/gpu/api/rm/brandy-auto-ota-ser/libgfx_rm.a
code/sdk/middleware/services/gpu/api/rm/brandy-native-js-fd230-r/libgfx_rm.a
code/sdk/middleware/services/gpu/api/rm/brandy-native-js-fd230/libgfx_rm.a
code/sdk/middleware/services/gpu/api/rm/brandy-native-js-lt22-r/libgfx_rm.a
code/sdk/middleware/services/gpu/api/rm/brandy-native-js-lt22/libgfx_rm.a
code/sdk/middleware/services/gpu/api/rm/brandy-native-js-r/libgfx_rm.a
code/sdk/middleware/services/gpu/api/rm/brandy-native-js-u8-r/libgfx_rm.a [new file with mode: 0644]
code/sdk/middleware/services/gpu/api/rm/brandy-native-js-u8/libgfx_rm.a [new file with mode: 0644]
code/sdk/middleware/services/gpu/api/rm/brandy-native-js-w9-r/libgfx_rm.a
code/sdk/middleware/services/gpu/api/rm/brandy-native-js-w9/libgfx_rm.a
code/sdk/middleware/services/gpu/api/rm/brandy-native-js/libgfx_rm.a
code/sdk/middleware/services/gpu/api/rm/brandy-target1-r/libgfx_rm.a
code/sdk/middleware/services/gpu/api/rm/brandy-target1/libgfx_rm.a
code/sdk/middleware/services/gpu/api/rm/brandy-target3-r/libgfx_rm.a
code/sdk/middleware/services/gpu/api/rm/brandy-target3/libgfx_rm.a
code/sdk/middleware/services/gpu/api/rm/brandy-target4-r/libgfx_rm.a
code/sdk/middleware/services/gpu/api/rm/brandy-target4/libgfx_rm.a
code/sdk/middleware/services/gpu/api/rm/brandy-target5-r/libgfx_rm.a
code/sdk/middleware/services/gpu/api/rm/brandy-target5/libgfx_rm.a
code/sdk/middleware/services/gpu/api/rm/brandy-xts/libgfx_rm.a
code/sdk/middleware/services/gpu/api/rm/testsuite-brandy-sdk/libgfx_rm.a
code/sdk/middleware/services/gpu/drv/dpu/layer/dpu_layer.c
code/sdk/middleware/services/gui/hal/display/CMakeLists.txt
code/sdk/middleware/services/gui/hal/display/brandy-auto-ota-cli/libdisplay_gfx.a
code/sdk/middleware/services/gui/hal/display/brandy-auto-ota-ser/libdisplay_gfx.a
code/sdk/middleware/services/gui/hal/display/brandy-native-js-fd230/libdisplay_gfx.a
code/sdk/middleware/services/gui/hal/display/brandy-native-js-lt22/libdisplay_gfx.a
code/sdk/middleware/services/gui/hal/display/brandy-native-js-u8/libdisplay_gfx.a [new file with mode: 0644]
code/sdk/middleware/services/gui/hal/display/brandy-native-js-w9/libdisplay_gfx.a
code/sdk/middleware/services/gui/hal/display/brandy-native-js/libdisplay_gfx.a
code/sdk/middleware/services/gui/hal/display/brandy-target1/libdisplay_gfx.a
code/sdk/middleware/services/gui/hal/display/brandy-target3/libdisplay_gfx.a
code/sdk/middleware/services/gui/hal/display/brandy-target5/libdisplay_gfx.a
code/sdk/middleware/services/gui/hal/display/brandy-xts/libdisplay_gfx.a
code/sdk/middleware/services/gui/hal/display/src/display_gralloc.c
code/sdk/middleware/services/gui/hal/input/CMakeLists.txt
code/sdk/middleware/services/gui/lvgl/CMakeLists.txt
code/sdk/middleware/services/gui/lvgl/brandy-target1/liblvgl_proprietary_mini.a
code/sdk/middleware/services/gui/lvgl/brandy-target5/liblvgl_proprietary.a
code/sdk/middleware/services/gui/uikit/CMakeLists.txt
code/sdk/middleware/services/gui/uikit/brandy-auto-ota-cli/libuikit_ext.a
code/sdk/middleware/services/gui/uikit/brandy-auto-ota-ser/libuikit_ext.a
code/sdk/middleware/services/gui/uikit/brandy-native-js-fd230/libuikit_ext.a
code/sdk/middleware/services/gui/uikit/brandy-native-js-lt22/libuikit_ext.a
code/sdk/middleware/services/gui/uikit/brandy-native-js-u8/libuikit_ext.a [new file with mode: 0644]
code/sdk/middleware/services/gui/uikit/brandy-native-js-w9/libuikit_ext.a
code/sdk/middleware/services/gui/uikit/brandy-native-js/libuikit_ext.a
code/sdk/middleware/services/gui/uikit/brandy-target3/libuikit_ext.a
code/sdk/middleware/services/gui/uikit/brandy-xts/libuikit_ext.a
code/sdk/middleware/services/gui/uikit/proprietary/include/common/image_cache_manager.h
code/sdk/middleware/services/gui/uikit/proprietary/include/common/lite_surface.h
code/sdk/middleware/services/gui/uikit/proprietary/include/common/text_ext.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_cross_view.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_hexagons_list.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_icosahedron_view.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_lite_surface_view.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_map_view.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_roller_view.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_sphere_view.h [new file with mode: 0644]
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_waterfall_list.h
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/common/lite_surface.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/ui_custom_hexagons_list.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/ui_lite_surface_view.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/ui_sweep_clock.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components_ext/hor_swipe_view.h
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components_ext/ver_swipe_view.h [new file with mode: 0644]
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/dfx/dfx_dom_dump.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/font/ui_font_hw_cache.h
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/innerkits/font/ui_font_hw_vector.h
code/sdk/middleware/services/gui/uikit/proprietary/src/utils/frameworks/hals/display_dev.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/utils/frameworks/hals/gralloc_engines.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/utils/innerkits/hals/gralloc_engines.h
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_coverflow/ui_test_coverflow2.cpp
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_coverflow/ui_test_coverflow2.h
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_hexagons_list/ui_test_hexagons_list.cpp
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_hexagons_list/ui_test_hexagons_list.h
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_sphere_view/ui_test_sphere_view.cpp [new file with mode: 0644]
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_sphere_view/ui_test_sphere_view.h [new file with mode: 0644]
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_waterfall_list/ui_test_waterfall_list.cpp
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_waterfall_list/ui_test_waterfall_list.h
code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_view.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_view_group.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/dock/rotate_input_device.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/font/ui_font.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/font/ui_font_vector.cpp
code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/root_view.h
code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h
code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/font/base_font.h
code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/font/ui_font.h
code/sdk/middleware/services/media/foundation/audio_capturer/interfaces/kits/audio_capturer_lite/recording_module.cpp
code/sdk/middleware/services/media/foundation/audio_capturer/interfaces/kits/audio_capturer_lite/recording_module.h
code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/audio_service.c
code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/devicemanager/src/device_hal.c
code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/policymanager/src/interrupt_manager.c
code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/streammanager/src/track_handle.c
code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audiostream/CMakeLists.txt
code/sdk/middleware/services/media/foundation/player/frameworks/player_control/player/liteplayer.cpp
code/sdk/middleware/services/media/foundation/player/interfaces/kits/player_lite/js/builtin/CMakeLists.txt
code/sdk/middleware/services/media/foundation/player/interfaces/kits/player_lite/js/builtin/src/audio_module.cpp
code/sdk/middleware/services/media/foundation/player/interfaces/kits/player_lite/js/builtin/src/audio_player.cpp
code/sdk/middleware/services/media/foundation/sample/wrapper/player_sample_wrapper.cpp
code/sdk/middleware/services/media/foundation/sample/wrapper/video_play_wrapper.cpp
code/sdk/middleware/services/media/foundation/sample/wrapper/video_play_wrapper.h
code/sdk/middleware/services/media/hal/audio/plugins/brandy/bluetooth/bluetooth_sub_port.c
code/sdk/middleware/services/media/hal/audio/plugins/brandy/common/CMakeLists.txt
code/sdk/middleware/services/media/hal/audio/plugins/brandy/primary/primary_sub_port_in.c
code/sdk/middleware/services/media/hal/camera/hw_camera/CMakeLists.txt
code/sdk/middleware/services/media/hal/format/CMakeLists.txt
code/sdk/middleware/utils/dfx/diag_dfx_cmd/diag_audio_dump/CMakeLists.txt
code/sdk/middleware/utils/dfx/diag_dfx_cmd/diag_audio_probe/CMakeLists.txt
code/sdk/middleware/utils/dfx/diag_dfx_cmd/diag_audio_proc/CMakeLists.txt
code/sdk/middleware/utils/dfx/diag_dfx_cmd/diag_gpu_proc/CMakeLists.txt
code/sdk/middleware/utils/dfx/diag_dfx_cmd/diag_nv/CMakeLists.txt
code/sdk/middleware/utils/dfx/diag_dfx_cmd/diag_update/CMakeLists.txt
code/sdk/middleware/utils/dfx/panic/private/panic.c
code/sdk/middleware/utils/dfx/preserve/public/preserve.h
code/sdk/middleware/utils/fs/vfs/brandy-auto-ota-cli/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-auto-ota-ser/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd230-r/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd230/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-native-js-lt22-r/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-native-js-lt22/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-native-js-r/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-native-js-u8-r/libx_vfs_private.a [new file with mode: 0644]
code/sdk/middleware/utils/fs/vfs/brandy-native-js-u8/libx_vfs_private.a [new file with mode: 0644]
code/sdk/middleware/utils/fs/vfs/brandy-native-js-w9-r/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-native-js-w9/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-native-js/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-target1-r/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-target1/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-target3-r/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-target3/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-target4-r/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-target4/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-target5-r/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-target5/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-xts-r/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-xts/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/testsuite-brandy-sdk/libx_vfs_private.a
code/sdk/middleware/utils/fs/yaffs2/brandy-auto-ota-cli/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-auto-ota-ser/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd230-r/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd230/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-lt22-r/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-lt22/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-r/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-u8-r/libfs_yaffs2.a [new file with mode: 0644]
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-u8/libfs_yaffs2.a [new file with mode: 0644]
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-w9-r/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-w9/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-target1-r/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-target1/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-target3-r/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-target3/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-target4-r/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-target4/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-target5-r/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-target5/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-xts-r/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-xts/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/testsuite-brandy-sdk/libfs_yaffs2.a
code/sdk/open_source/openharmony/base/global/i18n_lite/CMakeLists.txt
code/sdk/open_source/openharmony/base/security/appverify/CMakeLists.txt
code/sdk/open_source/openharmony/drivers/peripheral/display/interfaces/include/display_gralloc.h
code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/CMakeLists.txt
code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-auto-ota-cli/libams.a
code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-auto-ota-ser/libams.a
code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-fd230/libams.a
code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-lt22/libams.a
code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-u8/libams.a [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-w9/libams.a
code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js/libams.a
code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-xts/libams.a
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-auto-ota-cli/libace.a
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-auto-ota-ser/libace.a
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-fd230/libace.a
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-lt22/libace.a
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-u8/libace.a [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-w9/libace.a
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js/libace.a
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-xts/libace.a
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.cpp
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/list_adapter.h
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/list_component.cpp
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/list_component.h
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent/baidumap.cpp
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/display/display.cpp
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/geolocation_module.cpp
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/keyinput/keyinput.cpp
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/keyinput/keyinput.h
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/presets/cjson_parser.cpp
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/sensor_module.cpp
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/vibrator_module.cpp
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/CMakeLists.txt
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-auto-ota-cli/libbms.a
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-auto-ota-ser/libbms.a
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-fd230/libbms.a
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-lt22/libbms.a
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-u8/libbms.a [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-w9/libbms.a
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js/libbms.a
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-xts/libbms.a
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/include/appexecfwk/appexecfwk_lite/interfaces/kits/bundle_lite/appexecfwk_errors.h
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/include/appexecfwk/appexecfwk_lite/services/bundlemgr_lite/include/bundle_common.h
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/include/appexecfwk/appexecfwk_lite/services/bundlemgr_lite/include/gt_bundle_installer.h
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/include/appexecfwk/appexecfwk_lite/services/bundlemgr_lite/include/gt_bundle_manager_service.h
code/sdk/open_source/openharmony/foundation/multimedia/audio_capturer/interfaces/kits/audio_capturer_lite/recording_module.h
code/sdk/open_source/openharmony/third_party/freetype/CMakeLists.txt
code/sdk/open_source/openharmony/third_party/jerryscript/CMakeLists.txt
code/sdk/open_source/openharmony/third_party/jerryscript/brandy-auto-ota-cli/libjerryscript.a
code/sdk/open_source/openharmony/third_party/jerryscript/brandy-auto-ota-ser/libjerryscript.a
code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-fd230/libjerryscript.a
code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-lt22/libjerryscript.a
code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-u8/libjerryscript.a [new file with mode: 0644]
code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-w9/libjerryscript.a
code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js/libjerryscript.a
code/sdk/open_source/openharmony/third_party/jerryscript/brandy-xts/libjerryscript.a
code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/src/nativeapi_fs.cpp
code/sdk/open_source/openharmony/utils/native/lite/js/builtin/kvstorekit/src/nativeapi_kv.cpp
code/sdk/protocol/bt/host/bt/bts/bt_sample/bt_core/sample_bts_gap.c
code/sdk/tools/bin/xts_tools/PCID.json [new file with mode: 0644]
code/sdk/tools/bin/xts_tools/PCID.sc [new file with mode: 0644]
code/sdk/tools/bin/xts_tools/syscap_tool_bin/syscap_tool [new file with mode: 0644]
code/sdk/vendor/alipay_sdk/alipay_sec_sdk_v3.0.0/soc/CMakeLists.txt
jsapp/keyinput_sample/.gitignore [new file with mode: 0644]
jsapp/keyinput_sample/build.gradle [new file with mode: 0644]
jsapp/keyinput_sample/entry/.gitignore [new file with mode: 0644]
jsapp/keyinput_sample/entry/build.gradle [new file with mode: 0644]
jsapp/keyinput_sample/entry/proguard-rules.pro [new file with mode: 0644]
jsapp/keyinput_sample/entry/src/main/config.json [new file with mode: 0644]
jsapp/keyinput_sample/entry/src/main/js/default/app.js [new file with mode: 0644]
jsapp/keyinput_sample/entry/src/main/js/default/i18n/en-US.json [new file with mode: 0644]
jsapp/keyinput_sample/entry/src/main/js/default/i18n/zh-CN.json [new file with mode: 0644]
jsapp/keyinput_sample/entry/src/main/js/default/pages/index/index.css [new file with mode: 0644]
jsapp/keyinput_sample/entry/src/main/js/default/pages/index/index.hml [new file with mode: 0644]
jsapp/keyinput_sample/entry/src/main/js/default/pages/index/index.js [new file with mode: 0644]
jsapp/keyinput_sample/entry/src/main/js/default/pages/keyinput/keyinput.css [new file with mode: 0644]
jsapp/keyinput_sample/entry/src/main/js/default/pages/keyinput/keyinput.hml [new file with mode: 0644]
jsapp/keyinput_sample/entry/src/main/js/default/pages/keyinput/keyinput.js [new file with mode: 0644]
jsapp/keyinput_sample/entry/src/main/js/default/pages/list_scrollToEnd/list_scrollToEnd.css [new file with mode: 0644]
jsapp/keyinput_sample/entry/src/main/js/default/pages/list_scrollToEnd/list_scrollToEnd.hml [new file with mode: 0644]
jsapp/keyinput_sample/entry/src/main/js/default/pages/list_scrollToEnd/list_scrollToEnd.js [new file with mode: 0644]
jsapp/keyinput_sample/entry/src/main/js/default/pages/rotation/rotation.css [new file with mode: 0644]
jsapp/keyinput_sample/entry/src/main/js/default/pages/rotation/rotation.hml [new file with mode: 0644]
jsapp/keyinput_sample/entry/src/main/js/default/pages/rotation/rotation.js [new file with mode: 0644]
jsapp/keyinput_sample/entry/src/main/resources/base/element/string.json [new file with mode: 0644]
jsapp/keyinput_sample/entry/src/main/resources/base/media/icon.png [new file with mode: 0644]
jsapp/keyinput_sample/entry/src/main/resources/base/media/icon_small.png [new file with mode: 0644]
jsapp/keyinput_sample/gradle.properties [new file with mode: 0644]
jsapp/keyinput_sample/gradle/wrapper/gradle-wrapper.jar [new file with mode: 0644]
jsapp/keyinput_sample/gradle/wrapper/gradle-wrapper.properties [new file with mode: 0644]
jsapp/keyinput_sample/gradlew [new file with mode: 0644]
jsapp/keyinput_sample/gradlew.bat [new file with mode: 0644]
jsapp/keyinput_sample/settings.gradle [new file with mode: 0644]
patch_615_1029_to_1127.txt [new file with mode: 0644]

index 257e77f..66f79d2 100644 (file)
@@ -86,7 +86,14 @@ RECOVERY_NAME=$APPLICATION_NAME-r
 SSB_NAME=$APPLICATION_NAME-ssb
 BUILD_NAME=_FD230
 fi
-
+if [ "$1" == "u8" ]
+then
+TARGET_PACK_NAME=pack_brandy_native_js_u8
+APPLICATION_NAME=brandy-native-js-u8
+RECOVERY_NAME=$APPLICATION_NAME-r
+SSB_NAME=$APPLICATION_NAME-ssb
+BUILD_NAME=_U8
+fi
 if [ "$1" == "w9" ]
 then
 TARGET_PACK_NAME=pack_brandy_native_js_w9
index bcc6ec8..87c6c9a 100644 (file)
@@ -409,7 +409,9 @@ static void button_released_state_handler(button_id_t id)
         g_button_state_record = 0;
         g_button_press_time = 0;
     }
+    uint32_t int_sts = osal_irq_lock();
     button_report_click_state(id);
+    osal_irq_restore(int_sts);
 }
 
 static void button_pressed_state_handler(button_id_t id)
index cced05e..29b6d12 100644 (file)
@@ -28,6 +28,7 @@ set(SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/src/NativeAbility.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/StartNative.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/SliceTransition.cpp
+    ${CMAKE_CURRENT_SOURCE_DIR}/src/BackDragListener.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/TransitionManager.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/transition/ZoomTransition.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/transition/HexagonsTransition.cpp
index 9ddab5c..9e35475 100644 (file)
@@ -16,6 +16,7 @@
 #ifndef NATIVEABILITYFWK_ABILITY_H
 #define NATIVEABILITYFWK_ABILITY_H
 #include "utils/utils_list.h"
+#include "gfx_utils/vector.h"
 #include <cstdint>
 #include <vector>
 
@@ -37,7 +38,7 @@ public:
 
     void AddSliceProxy(const uint16_t sliceId, SliceProxy* proxy);
     void ChangeSlice(const uint16_t targetSliceId, TransitionType type = TransitionType::TRANSITION_INVALID,
-        const uint16_t priority = gSliceDefaultPriority);
+        const uint16_t priority = gSliceDefaultPriority, bool enableSlideBack = false);
     void SetDefaultSliceId(const uint16_t defaultSliceId) {
         defaultSliceId_ = defaultSliceId;
     }
@@ -70,6 +71,9 @@ public:
     void ResumeSlice(const uint16_t priority = gSliceDefaultPriority);
     void PauseSlice();
     void StopSlice();
+    void StopSliceTransition();
+    UIView* GetSlideBackInfo();
+    void BackToPreSlice();
 
 protected:
     Ability() = default;
@@ -80,8 +84,8 @@ protected:
     };
 
     struct SliceStruct {
-        uint16_t sliceId;
-        Slice* slice;
+        uint16_t sliceId = 0;
+        Slice* slice = nullptr;
     };
 
     // 预加载的所有slices
@@ -90,6 +94,41 @@ protected:
     // 历史记录的所有slices, 当前只使用了id
     // TODO:: 整页面的能力恢复功能待考虑扩展
     std::vector<uint16_t> allSlices_;
+    struct {
+        uint16_t sliceId;
+        std::shared_ptr<UIImageView> img;
+    } history_[gMaxHistorySlices];
+    int16_t curHistoryNum_ = 0;
+
+    bool PushHistory(uint16_t id, std::shared_ptr<UIImageView> img)
+    {
+        if (curHistoryNum_ < static_cast<int16_t>(gMaxHistorySlices)) {
+            history_[curHistoryNum_].sliceId = id;
+            history_[curHistoryNum_].img = img;
+            ++curHistoryNum_;
+            return true;
+        }
+        return false;
+    }
+
+    bool PopHistory()
+    {
+        if (curHistoryNum_ <= 0) {
+            return false;
+        }
+        --curHistoryNum_;
+        history_[curHistoryNum_].img = nullptr;
+        return true;
+    }
+
+    void ClearHistory()
+    {
+        while (curHistoryNum_ > 0) {
+            PopHistory();
+        }
+    }
+
+    void RecordHistory(bool useTransition, bool enableSlideBack, bool isCurSnapshotEnabled);
 
     SliceStruct curSlice_;
     SliceStruct prevSlice_;
@@ -99,7 +138,8 @@ protected:
     SliceTransition sliceTransition_;
     osal_atomic transitionCount_{0};
 
-    void PostChangeSlice(const uint16_t targetSliceId, TransitionType type, const uint16_t priority);
+    void PostChangeSlice(const uint16_t targetSliceId, TransitionType type,
+        const uint16_t priority, bool enableSlideBack);
 
     ListsNode<Ability::ProxyStruct>* Find(const uint16_t sliceId);
 
index deaaf92..a4acb09 100644 (file)
@@ -30,7 +30,7 @@ enum class SliceState : uint8_t {
 template<class V, class P, class M = void>
 class AbilitySlice : public Slice {
 public:
-    AbilitySlice<V, P, M>() 
+    AbilitySlice<V, P, M>()
         :view_(nullptr), presenter_(nullptr), state_(SliceState::UNINITIALIZED) {}
     ~AbilitySlice() {}
 
index 24d2d0f..d942f0c 100644 (file)
@@ -21,9 +21,9 @@
 #include "wearable_log.h"
 
 namespace OHOS {
-template<class V, class P>
+template <class V, class P>
 
-class AbilitySliceProxy : public SliceProxy        {
+class AbilitySliceProxy : public SliceProxy {
 public:
     AbilitySliceProxy<V, P>() {}
     ~AbilitySliceProxy() {}
diff --git a/code/sdk/application/wearable/nativeabilityfwk/include/BackDragListener.h b/code/sdk/application/wearable/nativeabilityfwk/include/BackDragListener.h
new file mode 100644 (file)
index 0000000..e6603d6
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2024-2024. All rights reserved.
+ * Description: BackDragListener
+ * Author:
+ * Create: 2024-11-13
+ */
+
+#ifndef BACK_DRAG_LISTENER_H
+#define BACK_DRAG_LISTENER_H
+#include <functional>
+#include "animator/animator.h"
+#include "components/ui_view.h"
+
+namespace OHOS {
+class BackDragListener : public UIView::OnDragListener {
+public:
+    BackDragListener(UIView *cur = nullptr, UIView *target = nullptr, std::function<void()> targetAction = nullptr,
+        std::function<void()> curAction = nullptr)
+        : curView_(cur), targetView_(target), targetAction_(targetAction), curAction_(curAction)
+    {}
+    BackDragListener(const BackDragListener&) = delete;
+    BackDragListener& operator =(const BackDragListener&) = delete;
+    ~BackDragListener() override
+    {
+        ClearStatus();
+    }
+    bool OnDragStart(UIView& view, const DragEvent& event) override;
+    bool OnDrag(UIView& view, const DragEvent& event) override;
+    bool OnDragEnd(UIView& view, const DragEvent& event) override;
+    void SetCurrentAndTarget(UIView *cur, UIView *tar)
+    {
+        curView_ = cur;
+        targetView_ = tar;
+    }
+
+    void SetDragToTargetAction(const std::function<void()> &action)
+    {
+        targetAction_ = action;
+    }
+
+    void SetDragToCurrentAction(const std::function<void()> &action)
+    {
+        curAction_ = action;
+    }
+
+    void SetAnimatorTime(uint16_t time)
+    {
+        time_ = time;
+    }
+
+private:
+    void ClearStatus();
+    class BackAnimatorCallback : public AnimatorCallback {
+    public:
+        void Callback(UIView* view) override;
+        void OnStop(UIView& view) override;
+        void SetDragParam(int16_t startX, int16_t endX, uint16_t dragTimes)
+        {
+            startValueX_ = startX;
+            endValueX_ = endX;
+            dragTimes_ = dragTimes;
+        }
+
+        void SetAnimator(Animator *ani)
+        {
+            ani_ = ani;
+        }
+
+        void SetStopAction(const std::function<void()> &action)
+        {
+            stopAct_ = action;
+        }
+
+        void SetTargetView(UIView *target)
+        {
+            targetView_ = target;
+        }
+
+    private:
+        void ResetStatus()
+        {
+            curtTime_ = 0;
+            dragTimes_ = 0;
+            startValueX_ = 0;
+            endValueX_ = 0;
+            ani_ = nullptr;
+            stopAct_ = nullptr;
+            targetView_ = nullptr;
+        }
+
+        Animator *ani_ = nullptr;
+        UIView *targetView_ = nullptr;
+        uint16_t curtTime_ = 0;
+        uint16_t dragTimes_ = 0;
+        int16_t startValueX_ = 0;
+        int16_t endValueX_ = 0;
+        std::function<void()> stopAct_;
+    };
+
+    Animator *backAnimator_ = nullptr;
+    BackAnimatorCallback backCallback_;
+    UIView *targetView_ = nullptr;
+    UIView *curView_ = nullptr;
+    int16_t left_ = 0;
+    int16_t right_ = 0;
+    std::function<void()> targetAction_;
+    std::function<void()> curAction_;
+    uint16_t time_ = 200;
+}; // BackDragListener
+
+} // namespace OHOS
+#endif // BACK_DRAG_LISTENER_H
index 7b0bc55..ef957b3 100644 (file)
@@ -36,7 +36,7 @@ namespace OHOS {
 
 class NativeAbility : public Ability
 #ifdef JS_ENABLE
-, public SliteAbility 
+, public SliteAbility
 #endif
 {
 public:
index 8e4bb93..df5e488 100644 (file)
@@ -19,6 +19,8 @@
 #include "components/root_view.h"
 #include "KeyInputListener.h"
 #include "dock/focus_manager.h"
+#include "BackDragListener.h"
+#include "NativeAbility.h"
 
 namespace OHOS {
 template<class V, class M = void>
@@ -26,7 +28,13 @@ template<class V, class M = void>
 class Presenter {
 public:
     Presenter() : view_(nullptr), model_(nullptr) {}
-    virtual ~Presenter() {}
+    virtual ~Presenter()
+    {
+        if (backDragListener_ != nullptr) {
+            delete backDragListener_;
+            backDragListener_ = nullptr;
+        }
+    }
 
     /**
      * @brief Scheduled by slice when it is started and before transition animator starts if exsit
@@ -49,6 +57,13 @@ public:
         }
         // Reset the default key listener
         RootView::GetInstance()->SetOnKeyActListener(KeyInputListener::GetInstance());
+        UIView* backView = NativeAbility::GetInstance().GetSlideBackInfo();
+        if (backView == nullptr || backDragListener_ != nullptr) {
+            return;
+        }
+        backDragListener_ = new BackDragListener(
+            view_->GetRootContainer(), backView, []() { NativeAbility::GetInstance().BackToPreSlice(); });
+        view_->GetRootContainer()->SetOnDragListener(backDragListener_);
     }
 
     /**
@@ -93,6 +108,7 @@ public:
 protected:
     V* view_;
     M* model_;
+    BackDragListener* backDragListener_ = nullptr;
 
 private:
     Presenter(const Presenter&) = delete;
index b6f5acc..1dbbf70 100644 (file)
@@ -7,6 +7,7 @@
 
 #ifndef SLICE_TRANSITION_H
 #define SLICE_TRANSITION_H
+#include <memory>
 #include "Slice.h"
 #include "TransitionCallback.h"
 #include "TransitionType.h"
@@ -28,6 +29,24 @@ private:
     SliceTransition* sliceTransition_ = nullptr;
 };
 
+struct ImageDeleter {
+    void operator()(UIImageView *img) const
+    {
+        if (img == nullptr) {
+            return;
+        }
+        UIViewGroup* parent = dynamic_cast<UIViewGroup*>(img->GetParent());
+        if (parent != nullptr) {
+            parent->Remove(img);
+        }
+        if (img != nullptr && img->GetImageInfo() != nullptr &&
+            img->GetImageInfo()->data != nullptr) {
+            ImageCacheFree(*const_cast<ImageInfo *>(img->GetImageInfo()));
+        }
+        delete img;
+    }
+};
+
 class SliceTransition : public HeapBase {
 public:
     friend class TransitionAnimatorCallback;
@@ -38,10 +57,16 @@ public:
     bool IsCurrentSnapshotEnabled();
     bool SaveCurrentSnapshot(UIView* view);
     void StopAnimator();
+    uint8_t GetAnimatorState() const;
+    std::shared_ptr<UIImageView> GetCurrentSnapshot()
+    {
+        return currentSnapshot_;
+    }
+
 private:
     Animator* animator_ = nullptr;
     TransitionAnimatorCallback* animatorCallback_ = nullptr;
-    UIImageView* currentSnapshot_ = nullptr;
+    std::shared_ptr<UIImageView> currentSnapshot_;
     UIImageView* targetSnapshot_ = nullptr;
     UIViewGroup* currentView_ = nullptr;
     UIViewGroup* targetView_ = nullptr;
index 1cf68ae..c4ef8b3 100644 (file)
  */
 
 #include "Ability.h"
+#include "AppViewIDs.h"
 #include "graphic_service.h"
 #include "abilityms_slite_client.h"
 #include "common/input_device_manager.h"
+#include "animator/animator.h"
+#include "components/root_view.h"
+#include "common/screen.h"
+#include "BackDragListener.h"
+#include "common/graphic_utils.h"
 
 namespace OHOS {
 
@@ -91,16 +97,17 @@ ListsNode<Ability::ProxyStruct>* Ability::Find(const uint16_t sliceId)
     return nullptr;
 }
 
-void Ability::ChangeSlice(const uint16_t targetSliceId, TransitionType type, const uint16_t priority)
+void Ability::ChangeSlice(const uint16_t targetSliceId, TransitionType type,
+    const uint16_t priority, bool enableSlideBack)
 {
     if (type == TransitionType::TRANSITION_INVALID) {
         GraphicService::GetInstance()->PostGraphicEvent(std::bind(&Ability::PostChangeSlice, this, targetSliceId,
-            type, priority));
+            type, priority, enableSlideBack));
     } else {
         if (osal_atomic_read(&transitionCount_) <= 0) {
             osal_atomic_inc(&transitionCount_);
             GraphicService::GetInstance()->PostGraphicEvent(std::bind(&Ability::PostChangeSlice, this, targetSliceId,
-                type, priority));
+                type, priority, enableSlideBack));
         } else {
             GRAPHIC_LOGE("ChangeSlice failed! targetSliceId = %u, transitionCount_ = %d",
                 targetSliceId, osal_atomic_read(&transitionCount_));
@@ -108,7 +115,55 @@ void Ability::ChangeSlice(const uint16_t targetSliceId, TransitionType type, con
     }
 }
 
-void Ability::PostChangeSlice(const uint16_t targetSliceId, TransitionType type, const uint16_t priority)
+static std::shared_ptr<UIImageView> SaveSnapshot(UIView *view)
+{
+    if (view == nullptr) {
+        return nullptr;
+    }
+    std::shared_ptr<UIImageView> img(new UIImageView, ImageDeleter());
+    ImageInfo info;
+    memset_s(&info, sizeof(info), 0, sizeof(info));
+    if (RootView::GetInstance()->isSystemViewEmpty() && !view->IsVideoContained()) {
+        if (!Screen::GetInstance().GetCurrentScreenBitmap(info)) {
+            return nullptr;
+        }
+    } else {
+        if (!view->GetBitmap(info)) {
+            return nullptr;
+        }
+    }
+    img->SetSrc(&info);
+    return img;
+}
+
+void Ability::RecordHistory(bool useTransition, bool enableSlideBack, bool isCurSnapshotEnabled)
+{
+    if (!enableSlideBack) {
+        ClearHistory();
+        return;
+    }
+    if (curSlice_.sliceId == VIEW_INVALID) {
+        return;
+    }
+    if (curHistoryNum_ < gMaxHistorySlices) {
+        std::shared_ptr<UIImageView> img;
+        if (!useTransition) {
+            img = SaveSnapshot(curSlice_.slice->GetSliceContainer());
+        } else {
+            if (isCurSnapshotEnabled) {
+                img = sliceTransition_.GetCurrentSnapshot();
+            } else {
+                img = SaveSnapshot(curSlice_.slice->GetSliceContainer());
+            }
+        }
+        if (img) {
+            PushHistory(curSlice_.sliceId, img);
+        }
+    }
+}
+
+void Ability::PostChangeSlice(const uint16_t targetSliceId, TransitionType type,
+    const uint16_t priority, bool enableSlideBack)
 {
 #ifdef JS_ENABLE
     ElementName *elementName = OHOS::AbilityMsClient::GetInstance().GetTopAbility();
@@ -127,14 +182,19 @@ void Ability::PostChangeSlice(const uint16_t targetSliceId, TransitionType type,
     bool useTransition = sliceTransition_.SetTransitionType(type);
     bool isCurSnapshotEnabled = sliceTransition_.IsCurrentSnapshotEnabled();
     PauseSlice();
+
     if (!useTransition) {
+        RecordHistory(useTransition, enableSlideBack, isCurSnapshotEnabled);
         StopSlice();
     } else if (isCurSnapshotEnabled) {
         if (!sliceTransition_.SaveCurrentSnapshot(curSlice_.slice->GetSliceContainer())) {
             useTransition = false;
             osal_atomic_dec(&transitionCount_);
         }
+        RecordHistory(useTransition, enableSlideBack, isCurSnapshotEnabled);
         StopSlice();
+    } else {
+        RecordHistory(useTransition, enableSlideBack, isCurSnapshotEnabled);
     }
 
     // slice页面跳转,先onstop,再onstart.在一个线程同步执行绘制,不会出现闪屏现象
@@ -203,4 +263,42 @@ void Ability::StopSlice()
         GRAPHIC_LOGE("No valid slice to stop");
     }
 }
+
+void Ability::StopSliceTransition()
+{
+    if (sliceTransition_.GetAnimatorState() != Animator::STOP) {
+        sliceTransition_.StopAnimator();
+    }
+}
+
+UIView* Ability::GetSlideBackInfo()
+{
+    if (curHistoryNum_ > 0) {
+        return history_[curHistoryNum_ - 1].img.get();
+    }
+    return nullptr;
+}
+
+void Ability::BackToPreSlice()
+{
+    GraphicService::GetInstance()->PostGraphicEvent([this](){
+        uint16_t targetSliceId = 0;
+        if (curHistoryNum_ > 0) {
+            targetSliceId = history_[curHistoryNum_ - 1].sliceId;
+        }
+        if (targetSliceId == 0) {
+            return;
+        }
+
+        PopHistory();
+        PauseSlice();
+        StopSlice();
+
+        // slice页面跳转,先onstop,再onstart.在一个线程同步执行绘制,不会出现闪屏现象
+        StartSlice(targetSliceId, gSliceDefaultPriority);
+        if (curSlice_.slice != nullptr) {
+            curSlice_.slice->OnResume();
+        }
+    });
+}
 } // namespace OHOS
diff --git a/code/sdk/application/wearable/nativeabilityfwk/src/BackDragListener.cpp b/code/sdk/application/wearable/nativeabilityfwk/src/BackDragListener.cpp
new file mode 100644 (file)
index 0000000..8f72c22
--- /dev/null
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2024-2024. All rights reserved.
+ * Description: BackDragListener
+ * Author:
+ * Create: 2024-11-13
+ */
+
+#include "BackDragListener.h"
+#include "graphic_config.h"
+#include "components/root_view.h"
+#include "animator/easing_equation.h"
+
+namespace OHOS {
+bool BackDragListener::OnDragStart(UIView& view, const DragEvent& event)
+{
+    if (targetView_ == nullptr || curView_ == nullptr || &view != curView_) {
+        return false;
+    }
+
+    if (backAnimator_ != nullptr) {
+        delete backAnimator_;
+        backAnimator_ = nullptr;
+    }
+    RootView::GetInstance()->Insert(nullptr, targetView_);
+    RootView::GetInstance()->Invalidate();
+    left_ = curView_->GetRelativeRect().GetLeft();
+    right_ = curView_->GetRelativeRect().GetRight();
+    return true;
+}
+
+bool BackDragListener::OnDrag(UIView& view, const DragEvent& event)
+{
+    if (targetView_ == nullptr || curView_ == nullptr || &view != curView_) {
+        return false;
+    }
+
+    if (backAnimator_ != nullptr) {
+        delete backAnimator_;
+        backAnimator_ = nullptr;
+    }
+    int16_t distance = event.GetDeltaX();
+    int16_t x = curView_->GetX();
+    x = x + distance;
+    if (x > right_) {
+        x = right_;
+    } else if (x < left_) {
+        x = left_;
+    }
+
+    curView_->SetX(x);
+    RootView::GetInstance()->Invalidate();
+    return true;
+}
+
+bool BackDragListener::OnDragEnd(UIView& view, const DragEvent& event)
+{
+    if (targetView_ == nullptr || curView_ == nullptr || &view != curView_) {
+        return false;
+    }
+
+    if (backAnimator_ != nullptr) {
+        delete backAnimator_;
+        backAnimator_ = nullptr;
+    }
+    bool startAnimator = false;
+    if (left_ < curView_->GetX() && curView_->GetX() < right_) {
+        startAnimator = true;
+    }
+    if (startAnimator) {
+        backAnimator_ = new Animator(&backCallback_, curView_, 0, true);
+        if (backAnimator_ == nullptr) {
+            return false;
+        }
+        backCallback_.SetAnimator(backAnimator_);
+        int16_t x = curView_->GetX();
+        int16_t end;
+        if (x > (left_ + right_) / 2) { // 2: half
+            end = right_;
+            backCallback_.SetStopAction(targetAction_);
+        } else {
+            end = left_;
+            backCallback_.SetStopAction(curAction_);
+        }
+        backCallback_.SetTargetView(targetView_);
+        backCallback_.SetDragParam(x, end, time_ / DEFAULT_TASK_PERIOD);
+        backAnimator_->Start();
+    } else {
+        if (curView_->GetX() <= left_) {
+            curView_->SetX(left_);
+            if (curAction_) {
+                curAction_();
+            }
+        } else {
+            curView_->SetX(right_);
+            if (targetAction_) {
+                targetAction_();
+            }
+        }
+    }
+
+    return true;
+}
+
+void BackDragListener::ClearStatus()
+{
+    if (backAnimator_ != nullptr) {
+        delete backAnimator_;
+        backAnimator_ = nullptr;
+    }
+    targetView_ = nullptr;
+    curView_ = nullptr;
+    left_ = 0;
+    right_ = 0;
+    targetAction_ = nullptr;
+    curAction_ = nullptr;
+    time_ = 200; // 200: defalut time
+}
+
+void BackDragListener::BackAnimatorCallback::Callback(UIView* view)
+{
+    if (view == nullptr || ani_ == nullptr || targetView_ == nullptr) {
+        return;
+    }
+
+    if (curtTime_ < dragTimes_) {
+        if (startValueX_ != endValueX_) {
+            int16_t x = EasingEquation::CubicEaseOut(startValueX_, endValueX_, curtTime_, dragTimes_);
+            view->SetX(x);
+            RootView::GetInstance()->Invalidate();
+        } else {
+            ani_->Stop();
+        }
+    } else {
+        ani_->Stop();
+    }
+    ++curtTime_;
+}
+
+void BackDragListener::BackAnimatorCallback::OnStop(UIView& view)
+{
+    if (targetView_ == nullptr) {
+        return;
+    }
+    view.SetX(endValueX_);
+    RootView::GetInstance()->Invalidate();
+    if (stopAct_ != nullptr) {
+        stopAct_();
+    }
+    ResetStatus();
+}
+} // namespace OHOS
index 9266d4c..fda6da5 100644 (file)
@@ -25,9 +25,9 @@ void TransitionAnimatorCallback::Callback(UIView* view)
     TransitionCallback* callback = sliceTransition_->transitionCallback_;
     if (!isStarted_) {
         if (callback->enableCurrentSnapshot_ && callback->enableTargetSnapshot_) {
-            callback->OnTransitionStart(sliceTransition_->currentSnapshot_, sliceTransition_->targetSnapshot_);
+            callback->OnTransitionStart(sliceTransition_->currentSnapshot_.get(), sliceTransition_->targetSnapshot_);
         } else if (callback->enableCurrentSnapshot_ && !callback->enableTargetSnapshot_) {
-            callback->OnTransitionStart(sliceTransition_->currentSnapshot_, sliceTransition_->targetView_);
+            callback->OnTransitionStart(sliceTransition_->currentSnapshot_.get(), sliceTransition_->targetView_);
         } else if (!callback->enableCurrentSnapshot_ && callback->enableTargetSnapshot_) {
             callback->OnTransitionStart(sliceTransition_->currentView_, sliceTransition_->targetSnapshot_);
         } else {
@@ -69,19 +69,11 @@ SliceTransition::~SliceTransition()
 
 void SliceTransition::ClearTransitionResource()
 {
-    if (currentSnapshot_ != nullptr && currentSnapshot_->GetImageInfo() != nullptr &&
-        currentSnapshot_->GetImageInfo()->data != nullptr) {
-        ImageCacheFree(*const_cast<ImageInfo *>(currentSnapshot_->GetImageInfo()));
-    }
-
     if (targetSnapshot_ != nullptr && targetSnapshot_->GetImageInfo() != nullptr &&
         targetSnapshot_->GetImageInfo()->data != nullptr) {
         ImageCacheFree(*const_cast<ImageInfo *>(targetSnapshot_->GetImageInfo()));
     }
-    if (currentSnapshot_ != nullptr) {
-        delete currentSnapshot_;
-        currentSnapshot_ = nullptr;
-    }
+    currentSnapshot_ = nullptr;
     if (targetSnapshot_ != nullptr) {
         delete targetSnapshot_;
         targetSnapshot_ = nullptr;
@@ -105,6 +97,11 @@ bool SliceTransition::SetTransitionType(TransitionType type)
     return true;
 }
 
+uint8_t SliceTransition::GetAnimatorState() const
+{
+    return animator_->GetState();
+}
+
 bool SliceTransition::IsCurrentSnapshotEnabled()
 {
     if (transitionCallback_ == nullptr) {
@@ -135,7 +132,7 @@ bool SliceTransition::SaveCurrentSnapshot(UIView* view)
     if (view == nullptr) {
         return false;
     }
-    currentSnapshot_ = new UIImageView();
+    currentSnapshot_ = std::shared_ptr<UIImageView>(new UIImageView(), ImageDeleter());
     if (currentSnapshot_ == nullptr) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "currentSnapshot new failed");
         return false;
@@ -206,7 +203,7 @@ void SliceTransition::Transition(UIViewGroup* current, UIViewGroup* target)
     if (transitionCallback_->enableCurrentSnapshot_) {
         currentSnapshot_->SetPosition(0, 0, Screen::GetInstance().GetWidth(),
             Screen::GetInstance().GetHeight());
-        RootView::GetInstance()->Add(currentSnapshot_);
+        RootView::GetInstance()->Add(currentSnapshot_.get());
     }
 
     if (transitionCallback_->enableTargetSnapshot_) {
@@ -224,7 +221,7 @@ void SliceTransition::StopAnimator()
     }
     if (transitionCallback_ != nullptr) {
         if (transitionCallback_->enableCurrentSnapshot_) {
-            RootView::GetInstance()->Remove(currentSnapshot_);
+            RootView::GetInstance()->Remove(currentSnapshot_.get());
         }
 
         if (transitionCallback_->enableTargetSnapshot_) {
index 547475d..48ae863 100644 (file)
@@ -6,7 +6,6 @@ set(UI_SAMPLE_ROOT ${ROOT_DIR}/middleware/services/gui/uikit/sample/uitest)
 
 set(PUBLIC_HEADER
     ${NativeApp}/nativelauncher/include
-    ${NativeApp}/nativelauncher/include/slices/main
     ${NativeApp}/nativeui/screennotify/include
     ${NativeApp}/nativeui/bluetooth/include
 )
@@ -45,6 +44,7 @@ set(PRIVATE_HEADER
     ${NativeApp}/nativeui/uiservice/include
     ${NativeApp}/nativeui/uisample/include
     ${NativeApp}/nativeui/uisample/uitest/framework/include
+    ${NativeApp}/nativeui/aod_view/include
 
     ${NativeApp}/nativeui/alipay/include
     ${NativeApp}/nativeui/alipay/include/AlipayList
@@ -119,6 +119,7 @@ set(SOURCES
     ${UI_SAMPLE_ROOT}/components/ui_test_kaleidoscope/ui_test_kaleidoscope.cpp
     ${UI_SAMPLE_ROOT}/components/ui_test_roller_view/ui_test_roller_view.cpp
     ${UI_SAMPLE_ROOT}/components/ui_test_emoji/ui_test_emoji.cpp
+    ${UI_SAMPLE_ROOT}/components/ui_test_sphere_view/ui_test_sphere_view.cpp
 )
 
 
index 1086da4..762f0f5 100644 (file)
@@ -53,6 +53,7 @@ typedef enum : uint16_t {
     VIEW_ADD_CARD,
     VIEW_SET_DIAL,
     VIEW_SET_DIAL_STYLE,
+    VIEW_AOD,
     VIEW_MAX_INTER_ARRY_APP = 0x7FFF, // 在此之前添加内部数组native应用ID.
     VIEW_MAX_INTER_APP = 0xFFFD, // 在此之前添加内部静态注册native应用ID,此ID在NativeRegisterType.h里单独管理
     VIEW_EXTERN_APP = 0xFFFE, // 三方应用
index b0dbb5c..fc251dd 100644 (file)
@@ -41,6 +41,7 @@ public:
     void InitIndoorWalkSlice(void);
     void InitRebootSlice(void);
     void InitUISampleSlice(void);
+    void InitAodViewSlice(void);
     void InitMainAlipaySlice(void);
     void InitSetDesktopSlice(void);
     void InitSetCardSlice(void);
index 3f9578d..d5036e4 100644 (file)
@@ -74,6 +74,7 @@
 #include "SetDialPresenter.h"
 #include "SetDialStylePresenter.h"
 #include "SetDialStyleView.h"
+#include "AodPresenter.h"
 #ifdef JS_ENABLE
 #include "product_adapter.h"
 #endif
@@ -107,6 +108,7 @@ static const AppViewMapper SLICE_MAPPER[] = {
     {VIEW_INDOORWALK, &NativeLauncher::InitIndoorWalkSlice},
     {VIEW_REBOOT, &NativeLauncher::InitRebootSlice},
     {VIEW_UISAMPLE, &NativeLauncher::InitUISampleSlice},
+    {VIEW_AOD, &NativeLauncher::InitAodViewSlice},
 #ifdef SUPPORT_ALIPAY_SEC
     {VIEW_MAIN_ALIPAY, &NativeLauncher::InitMainAlipaySlice},
 #endif
@@ -397,6 +399,17 @@ void NativeLauncher::InitUISampleSlice(void)
     NativeAbility::GetInstance().AddSliceProxy(VIEW_UISAMPLE, uisampleView);
 }
 
+void NativeLauncher::InitAodViewSlice(void)
+{
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "NativeLauncher::InitAodVewSlice");
+    SliceProxy *aodViewSample = new AbilitySliceProxy<AodView, AodPresenter>;
+    if (aodViewSample == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "aodViewSample");
+        return;
+    }
+    NativeAbility::GetInstance().AddSliceProxy(VIEW_AOD, aodViewSample);
+}
+
 void NativeLauncher::InitSetDesktopSlice(void)
 {
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "NativeLauncher::InitSetDesktopSlice");
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/aod_view/include/AodModel.h b/code/sdk/application/wearable/nativeapp/nativeui/aod_view/include/AodModel.h
new file mode 100644 (file)
index 0000000..6958685
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2024-2024. All rights reserved.
+ * Description: AodModel
+ * Author:
+ * Create: 2024-10-30
+ */
+
+#ifndef AODMODEL_H
+#define AODMODEL_H
+#include "AodView.h"
+#include "components/ui_view.h"
+
+namespace OHOS {
+class AodModel {
+public:
+    static AodModel& GetInstance()
+    {
+        static AodModel model;
+        return model;
+    }
+    void GetAodDialSetting(DialSetting &dial);
+    void SaveAodDialSetting(const DialSetting &dial);
+
+private:
+    AodModel();
+    ~AodModel();
+    AodModel(const AodModel&) = delete;
+    AodModel& operator=(const AodModel&) = delete;
+    DialSetting aodDialSetting_;
+};
+} // OHOS
+#endif // AODMODEL_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/aod_view/include/AodPresenter.h b/code/sdk/application/wearable/nativeapp/nativeui/aod_view/include/AodPresenter.h
new file mode 100644 (file)
index 0000000..969fc9c
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2024-2024. All rights reserved.
+ * Description: AodPresenter
+ * Author:
+ * Create: 2024-10-30
+ */
+
+#ifndef AODPRESENTER_H
+#define AODPRESENTER_H
+#include "Presenter.h"
+#include "AodView.h"
+#include "components/ui_view.h"
+#include "KeyInputListener.h"
+#include "ModelListenerSample.h"
+
+namespace OHOS {
+class AodView;
+class AodModel;
+class AodPresenter : public Presenter<AodView>, public ModelListenerSample {
+public:
+    AodPresenter() {}
+    ~AodPresenter() override {}
+    AodPresenter(const AodPresenter &) = delete;
+    AodPresenter &operator=(const AodPresenter &) = delete;
+    void Notify() override;
+}; // AodPresenter
+} // OHOS
+
+#endif // AODPRESENTER_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/aod_view/include/AodView.h b/code/sdk/application/wearable/nativeapp/nativeui/aod_view/include/AodView.h
new file mode 100644 (file)
index 0000000..0bcf7af
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2024-2024. All rights reserved.
+ * Description: AodView
+ * Author:
+ * Create: 2024-10-30
+ */
+
+#ifndef AODVIEW_H
+#define AODVIEW_H
+#include "View.h"
+#include "MainModel.h"
+#include "SetDialInfo.h"
+#include "DialBinTypesV2.h"
+#include "components/ui_view.h"
+#include "components/ui_card_page.h"
+
+namespace OHOS {
+class AodPresenter;
+class AodView : public View<AodPresenter> {
+public:
+    AodView() {}
+    ~AodView();
+    AodView(const AodView &) = delete;
+    AodView& operator=(const AodView &) = delete;
+
+    void OnStart() override;
+    void OnStop() override;
+    void PeriodicUpdate();
+
+private:
+    UIViewGroup *InitAodDial(DialSetting &setting);
+    UIViewGroup *InitAodOffDial(DialSetting &setting);
+    UIViewGroup *InitDefaultAod();
+    bool isLoaded_ = false;
+
+    UIViewGroup *clockDial_;
+};
+} // OHOS
+#endif // AODVIEW_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/aod_view/src/AodModel.cpp b/code/sdk/application/wearable/nativeapp/nativeui/aod_view/src/AodModel.cpp
new file mode 100644 (file)
index 0000000..e06b38c
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2024-2024. All rights reserved.
+ * Description: AodModel
+ * Author:
+ * Create: 2024-10-30
+ */
+
+#include "AodModel.h"
+#include "kv_store.h"
+
+namespace OHOS {
+static const int DIAL_SETTING_VALUE_LEN = 64;
+AodModel::AodModel()
+{
+    aodDialSetting_.dialFlag = 0;
+    aodDialSetting_.dialId = 0;
+    aodDialSetting_.dialFullName = "";
+}
+
+AodModel::~AodModel()
+{
+}
+
+void AodModel::GetAodDialSetting(DialSetting &dial)
+{
+    char temp[DIAL_SETTING_VALUE_LEN] = { 0 };
+    int32_t len = UtilsGetValue("aod_dial_setting", temp, DIAL_SETTING_VALUE_LEN);
+    if (len < 0) {
+        dial = aodDialSetting_;
+        return;
+    }
+    char *setBuffer = nullptr;
+    char *setValue = strtok_s(temp, ",", &setBuffer);
+    if (setValue != nullptr) {
+        dial.dialFlag = atoi(setValue);
+    } else {
+        dial = aodDialSetting_;
+        return;
+    }
+
+    setValue = strtok_s(nullptr, ",", &setBuffer);
+    if (setValue != nullptr) {
+        dial.dialId = atoi(setValue);
+    } else {
+        dial = aodDialSetting_;
+        return;
+    }
+
+    setValue = strtok_s(nullptr, ",", &setBuffer);
+    if (setValue != nullptr) {
+        dial.dialFullName = setValue;
+        if (!((dial.dialFullName.length() > 0) &&
+            (access(dial.dialFullName.c_str(), F_OK) == 0))) {
+            dial = aodDialSetting_;
+            return;
+        }
+    } else {
+        dial = aodDialSetting_;
+        return;
+    }
+    aodDialSetting_ = dial;
+}
+
+void AodModel::SaveAodDialSetting(const DialSetting &dial)
+{
+    aodDialSetting_ = dial;
+    std::string tmp;
+    tmp += std::to_string(dial.dialFlag);
+    tmp += ",";
+    tmp += std::to_string(dial.dialId);
+    tmp += ",";
+    tmp += dial.dialFullName;
+    tmp += ",";
+    UtilsSetValue("aod_dial_setting", tmp.c_str());
+}
+} // OHOS
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/aod_view/src/AodPresenter.cpp b/code/sdk/application/wearable/nativeapp/nativeui/aod_view/src/AodPresenter.cpp
new file mode 100644 (file)
index 0000000..6af30c4
--- /dev/null
@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2024-2024. All rights reserved.
+ * Description: AodPresenter
+ * Author:
+ * Create: 2024-10-30
+ */
+
+#include "AodPresenter.h"
+
+namespace OHOS {
+void AodPresenter::Notify()
+{
+    view_->PeriodicUpdate();
+}
+} // OHOS
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/aod_view/src/AodView.cpp b/code/sdk/application/wearable/nativeapp/nativeui/aod_view/src/AodView.cpp
new file mode 100644 (file)
index 0000000..208138a
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2024-2024. All rights reserved.
+ * Description: AodView
+ * Author:
+ * Create: 2024-10-30
+ */
+
+#include "AodView.h"
+#include "AodPresenter.h"
+#include "AodModel.h"
+#include "common/graphic_utils.h"
+#include "DialBinParser.h"
+#include "DialViewGroup.h"
+#include "AmbientClockView.h"
+#include "DialModelTime.h"
+
+namespace OHOS {
+AodView::~AodView()
+{
+    if (clockDial_ != nullptr) {
+        delete clockDial_;
+        clockDial_ = nullptr;
+    }
+}
+
+void AodView::OnStart()
+{
+    DialSetting &setting = MainModel::GetInstance().GetDialSetting();
+    if (setting.dialFlag == 0) { // 在线表盘
+        clockDial_ = InitAodDial(setting);
+    } else {
+        clockDial_ = InitAodOffDial(setting);
+    }
+    if (clockDial_ == nullptr) {
+        clockDial_ = InitDefaultAod();
+    }
+    if (clockDial_ == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AodView::OnStart: Failed to generate the AOD watch face.\n");
+        return;
+    }
+    DialViewGroup *dial = dynamic_cast<DialViewGroup*>(clockDial_);
+    if (dial != nullptr) {
+        dial->PreLoad();
+        dial->OnActive();
+        presenter_->SetPeriod(dial->GetPeriod());
+    } else {
+        AmbientClockView *clock = dynamic_cast<AmbientClockView*>(clockDial_);
+        if (clock != nullptr) {
+            presenter_->SetPeriod(clock->GetPeriod());
+        }
+    }
+    isLoaded_ = true;
+    AddViewToRootContainer(clockDial_);
+}
+
+void AodView::OnStop()
+{
+    if (clockDial_ != nullptr) {
+        DialViewGroup *dial = dynamic_cast<DialViewGroup *>(clockDial_);
+        if (dial != nullptr) {
+            dial->OnInactive();
+            dial->UnLoad();
+        }
+        isLoaded_ = false;
+    }
+}
+
+UIViewGroup *AodView::InitAodDial(DialSetting &setting)
+{
+    switch (setting.dialId) {
+        case DIAL_CLOCK:
+            return new AmbientClockView;
+        default:
+            return nullptr;
+    }
+    return nullptr;
+}
+
+UIViewGroup *AodView::InitAodOffDial(DialSetting &setting)
+{
+    DialPreviewInfo preview;
+    memset_s(&preview, sizeof(preview), 0, sizeof(preview));
+    FILE *fp = fopen(setting.dialFullName.c_str(), "rb");
+    if (fp == nullptr) {
+        return nullptr;
+    }
+    bool ret = DialBinParser::GetInstance()->GetDialPreviewInfo(fp, &preview);
+    fclose(fp);
+    if (!ret) {
+        return nullptr;
+    }
+    if (preview.capability == DIAL_DISPLAY_CAPABILITY_AMBITIENT_ONLY ||
+        preview.capability == DIAL_DISPLAY_CAPABILITY_AMBITIENT_NORMAL) {
+        DialViewGroup *dial = new DialViewGroup;
+        dial->SetDial(setting.dialFullName, DisplayState::AOD);
+        return dial;
+    }
+    return nullptr;
+}
+
+UIViewGroup *AodView::InitDefaultAod()
+{
+    DialSetting setting;
+    AodModel::GetInstance().GetAodDialSetting(setting);
+    if (setting.dialFlag == 0) {
+        return InitAodDial(setting);
+    }
+    return InitAodOffDial(setting);
+}
+
+void AodView::PeriodicUpdate()
+{
+    if (clockDial_ == nullptr || !isLoaded_) {
+        return;
+    }
+
+    DialViewGroup *dial = dynamic_cast<DialViewGroup*>(clockDial_);
+    if (dial != nullptr) {
+        DialModelTime::GetInstance()->UpdateTime();
+        dial->UpdateViewsByPeriodicUpdateData();
+        return;
+    }
+
+    AmbientClockView *clock = dynamic_cast<AmbientClockView*>(clockDial_);
+    if (clockDial_ != nullptr) {
+        clock->UpdateTime();
+    }
+}
+} // OHOS
index 191790b..fdf1a34 100644 (file)
@@ -47,6 +47,7 @@ public:
     void ApplistUpdate(void);
     void SetPresenter(ApplistPresenter *p);
     AppListStyle GetCurrentStyle(void);
+    void SetInitFlag(bool flag);
 
 private:
     ApplistModel();
index 2aa48ef..86d11a5 100644 (file)
@@ -62,6 +62,11 @@ namespace OHOS {
         }
     }
 
+    void ApplistModel::SetInitFlag(bool flag)
+    {
+        initFlag = flag;
+    }
+
     void ApplistModel::ResolvingJSAppItems(void)
     {
 #ifdef JS_ENABLE
index f73e438..7e3301b 100644 (file)
@@ -115,7 +115,11 @@ namespace OHOS {
         }
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistPresenter::OnClick viewid = %d", viewId);
         if (viewId < VIEW_MAX_INTER_APP) {
-            NativeAbility::GetInstance().ChangeSlice(viewId, type);
+            if (viewId == VIEW_SETTING && style == AppListStyle::APPLIST_STYLE) {
+                NativeAbility::GetInstance().ChangeSlice(viewId, type, gSliceDefaultPriority, true);
+            } else {
+                NativeAbility::GetInstance().ChangeSlice(viewId, type);
+            }
             return true;
         } else if (viewId == VIEW_EXTERN_APP) {
 #ifdef JS_ENABLE
@@ -130,6 +134,7 @@ namespace OHOS {
             SetWantElement(want, startElement);
 
             StartAbility(want);
+            ClearWant(want);
             delete want;
             return true;
 #endif
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/clock/include/AmbientClockView.h b/code/sdk/application/wearable/nativeapp/nativeui/clock/include/AmbientClockView.h
new file mode 100644 (file)
index 0000000..2d02ca4
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2024-2024. All rights reserved.
+ * Description: AmbientClockView
+ * Author:
+ * Create: 2024-10-30
+ */
+
+#ifndef AMBIENT_VIEW_GROUP_H
+#define AMBIENT_VIEW_GROUP_H
+
+#include <string>
+#include <ctime>
+#include "View.h"
+#include "components/ui_label.h"
+#include "components/root_view.h"
+#include "components/ui_view_group.h"
+#include "components/ui_image_view.h"
+#include "components/ui_label_button.h"
+#include "components/ui_sweep_clock.h"
+#include "ChangeSliceListener.h"
+#include "font/ui_font_bitmap.h"
+#include "font/ui_font.h"
+#include "graphic_config.h"
+#include "HealthModel.h"
+#include "ActivityModel.h"
+#include "UiConfig.h"
+#include "components/ui_card_page.h"
+#include "animator/animator_manager.h"
+#include "sys/time.h"
+
+namespace OHOS {
+class AmbientClockView : public UICardPage {
+public:
+    AmbientClockView();
+    ~AmbientClockView() override;
+    AmbientClockView(const AmbientClockView &) = delete;
+    AmbientClockView &operator=(const AmbientClockView &) = delete;
+
+    bool InitView(void);
+    void PreLoad(void) override;
+    void UpdateTime(void);
+    uint32_t GetPeriod(void) const
+    {
+        return 1000; // 1000: ms
+    }
+
+private:
+    bool InitCenterCircleView(void);
+    bool InitHandView(void);
+    void InitDateTime(void);
+    bool InitSweepClock(void);
+    bool LoadClockImage(Image *view, uint32_t resId);
+    UISweepClock *mainSweepClock_{nullptr};
+    Image *secondHand_{nullptr};
+    Image *minuteHand_{nullptr};
+    Image *hourHand_{nullptr};
+    Image *hand24Hour_{nullptr};
+    Image *bigCircle_{nullptr};
+    Image *medCircle_{nullptr};
+    Image *smallCircle_{nullptr};
+    bool viewiInitStatus_{false};
+}; // class AmbientClockView
+} // namespace OHOS
+#endif // AMBIENT_VIEW_GROUP_H
+
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/clock/src/AmbientClockView.cpp b/code/sdk/application/wearable/nativeapp/nativeui/clock/src/AmbientClockView.cpp
new file mode 100644 (file)
index 0000000..7bc705a
--- /dev/null
@@ -0,0 +1,232 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2024-2024. All rights reserved.
+ * Description: AmbientClockView
+ * Author:
+ * Create: 2024-10-30
+ */
+
+#include "AmbientClockView.h"
+#include "MainPresenterSample.h"
+#include "components/ui_label.h"
+#include "wearable_log.h"
+#include "ui_resource_image.h"
+#include "common/image_cache_manager.h"
+
+namespace OHOS {
+static constexpr uint16_t POINT_POSITION_X = 202;
+static constexpr uint16_t POINT_POSITION_Y = 16;
+static constexpr uint16_t SECOND_POINT_POSITION_Y = 16;
+static constexpr uint16_t POINT_CENTER_X = 25;
+static constexpr uint16_t POINT_CENTER_Y = 211;
+static constexpr uint16_t BIGCIRCLE_POSITION_X = 202;
+static constexpr uint16_t BIGCIRCLE_POSITION_Y = 202;
+static constexpr uint16_t MEDCIRCLE_POSITION_X = 202;
+static constexpr uint16_t MEDCIRCLE_POSITION_Y = 202;
+static constexpr uint16_t SMALLCIRCLE_POSITION_X = 202;
+static constexpr uint16_t SMALLCIRCLE_POSITION_Y = 202;
+static constexpr int16_t SEC_TO_MILLI = 1000;
+static constexpr int16_t USEC_TO_MILLI = 1000;
+static constexpr int16_t MIN_TO_HOUR = 60;
+static constexpr int16_t HOURLY_SYSTEM = 24;
+
+AmbientClockView::AmbientClockView()
+{
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AmbientClockView::AmbientClockView");
+    SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);
+    PreLoad();
+}
+
+AmbientClockView::~AmbientClockView()
+{
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AmbientClockView::~AmbientClockView");
+    if (viewiInitStatus_) {
+        mainSweepClock_->RemoveAll();
+        delete secondHand_;
+        secondHand_ = nullptr;
+        delete minuteHand_;
+        minuteHand_ = nullptr;
+        delete hourHand_;
+        hourHand_ = nullptr;
+        delete hand24Hour_;
+        hand24Hour_ = nullptr;
+        delete bigCircle_;
+        bigCircle_ = nullptr;
+        delete medCircle_;
+        medCircle_ = nullptr;
+        delete smallCircle_;
+        smallCircle_ = nullptr;
+        Remove(mainSweepClock_);
+        delete mainSweepClock_;
+        mainSweepClock_ = nullptr;
+    }
+}
+
+bool AmbientClockView::InitCenterCircleView(void)
+{
+    bigCircle_ = new Image();
+    if (bigCircle_ == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "bigCircle new fail");
+        return false;
+    }
+    if (!LoadClockImage(bigCircle_, CLOCK_BIGCIRCLE_IMAGE_PATH)) {
+        return false;
+    }
+
+    medCircle_ = new Image();
+    if (medCircle_ == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "medCircle new fail");
+        return false;
+    }
+    if (!LoadClockImage(medCircle_, CLOCK_MEDCIRCLE_IMAGE_PATH)) {
+        return false;
+    }
+
+    smallCircle_ = new Image();
+    if (smallCircle_ == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "smallCircle new fail");
+        return false;
+    }
+    if (!LoadClockImage(smallCircle_, CLOCK_CIRCLE_IMAGE_PATH)) {
+        return false;
+    }
+    return true;
+}
+
+bool AmbientClockView::InitHandView(void)
+{
+    secondHand_ = new Image();
+    if (secondHand_ == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "secondHand new fail");
+        return false;
+    }
+    if (!LoadClockImage(secondHand_, CLOCK_SECONDHAND)) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "secondHand load fail");
+        return false;
+    }
+
+    minuteHand_ = new Image();
+    if (minuteHand_ == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "minuteHand new fail");
+        return false;
+    }
+    if (!LoadClockImage(minuteHand_, CLOCK_MINUTEHAND)) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "minuteHand load fail");
+        return false;
+    }
+    hourHand_ = new Image();
+    if (hourHand_ == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "hourHand new fail");
+        return false;
+    }
+    if (!LoadClockImage(hourHand_, CLOCK_HOURHAND)) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "hourHand load fail");
+        return false;
+    }
+
+    hand24Hour_ = new Image();
+    if (hand24Hour_ == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "hand24Hour new fail");
+        return false;
+    }
+    if (!LoadClockImage(hand24Hour_, CLOCK_HAND24HOUR_IMAGE_PATH)) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "hand24Hour load fail");
+        return false;
+    }
+    return true;
+}
+
+bool AmbientClockView::LoadClockImage(Image *view, uint32_t resId)
+{
+    std::string file = CLOCK_IAMGES;
+    ImageInfo* image = ImageCacheManager::GetInstance().LoadOneInMultiRes(resId, file);
+    if (image == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "LoadClockImage %x fail", resId);
+        return false;
+    }
+    view->SetSrc(image);
+    return true;
+}
+
+bool AmbientClockView::InitSweepClock(void)
+{
+    if (!InitCenterCircleView()) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitCenterCircleView() fail");
+        return false;
+    }
+
+    InitHandView();
+    return true;
+}
+
+void AmbientClockView::PreLoad(void)
+{
+    if (!viewiInitStatus_) {
+        InitView();
+        viewiInitStatus_ = true;
+    }
+}
+
+bool AmbientClockView::InitView(void)
+{
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AmbientClockView::InitView");
+
+    mainSweepClock_ = new UISweepClock();
+    if (mainSweepClock_ == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "mainSweepClock new fail");
+        return false;
+    }
+    if (!InitSweepClock()) {
+        return false;
+    }
+
+    Add(mainSweepClock_);
+
+    mainSweepClock_->SetDragParentInstead(true);
+    mainSweepClock_->SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);
+
+    // {214, 3}: position x, y {14, 223}: center x, y
+    mainSweepClock_->SetHandImage(UISweepClock::HandType::SECOND_HAND, *secondHand_,
+        { POINT_POSITION_X, SECOND_POINT_POSITION_Y }, { POINT_CENTER_X, POINT_CENTER_Y });
+    mainSweepClock_->SetHandImage(UISweepClock::HandType::MINUTE_HAND, *minuteHand_,
+        { POINT_POSITION_X, POINT_POSITION_Y }, { POINT_CENTER_X, POINT_CENTER_Y });
+    mainSweepClock_->SetHandImage(UISweepClock::HandType::HOUR_HAND, *hourHand_, { POINT_POSITION_X, POINT_POSITION_Y },
+        { POINT_CENTER_X, POINT_CENTER_Y });
+    mainSweepClock_->SetHandCircleImage(UISweepClock::HandType::SECOND_HAND, *smallCircle_,
+        { SMALLCIRCLE_POSITION_X, SMALLCIRCLE_POSITION_Y });
+    mainSweepClock_->SetHandCircleImage(UISweepClock::HandType::MINUTE_HAND, *medCircle_,
+        { MEDCIRCLE_POSITION_X, MEDCIRCLE_POSITION_Y });
+    mainSweepClock_->SetHandCircleImage(UISweepClock::HandType::HOUR_HAND, *bigCircle_,
+        { BIGCIRCLE_POSITION_X, BIGCIRCLE_POSITION_Y });
+
+    mainSweepClock_->SetInitTime24Hour(0, 0, 0);
+    mainSweepClock_->SetWorkMode(UISweepClock::WorkMode::NORMAL);
+    InitDateTime();
+    SetCoverable(true);
+    return true;
+}
+
+void AmbientClockView::InitDateTime(void)
+{
+    struct tm pTM;
+    time_t seconds;
+    time(&seconds);
+    localtime_r(&seconds, &pTM);
+    mainSweepClock_->SetTime24Hour(pTM.tm_hour, pTM.tm_min, pTM.tm_sec);
+}
+
+void AmbientClockView::UpdateTime(void)
+{
+    struct timeval tv;
+    gettimeofday(&tv, nullptr);
+    uint64_t second = tv.tv_sec;
+    uint64_t uSecond = tv.tv_usec;
+    uint64_t minute = second / MIN_TO_HOUR;
+    uint64_t hour = minute / MIN_TO_HOUR + timezone / (MIN_TO_HOUR * MIN_TO_HOUR);
+    uint8_t realHour = static_cast<uint8_t>(hour % HOURLY_SYSTEM);
+    uint8_t realMinute = static_cast<uint8_t>(minute % MIN_TO_HOUR);
+    uint16_t realMilliSecond = static_cast<uint16_t>((second % MIN_TO_HOUR) *
+        SEC_TO_MILLI + uSecond / USEC_TO_MILLI);
+    mainSweepClock_->SetSweepTime12Hour(realHour, realMinute, realMilliSecond, 1);
+}
+}
+
index 6c93595..fe31775 100644 (file)
@@ -120,7 +120,9 @@ UIViewGroup *ConnectOpenView::InitShowUpView(void)
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "tipsDragListener GetInstance fail");\r
         return nullptr;\r
     }\r
-    group->SetOnDragListener(tipsDragListener);\r
+    if (NativeAbility::GetInstance().GetSlideBackInfo() == nullptr) {\r
+        group->SetOnDragListener(tipsDragListener);\r
+    }\r
     group->SetViewId(CONNECT_OPEN_VIEW);\r
     group->SetDraggable(true);\r
     group->SetTouchable(true);\r
index 296c088..e223a9a 100644 (file)
@@ -109,7 +109,9 @@ UIViewGroup *ConnectSelectView::InitShowUpView()
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "connectDragListener GetInstance fail");\r
         return nullptr;\r
     }\r
-    group->SetOnDragListener(connectDragListener);\r
+    if (NativeAbility::GetInstance().GetSlideBackInfo() == nullptr) {\r
+        group->SetOnDragListener(connectDragListener);\r
+    }\r
     group->SetViewId(CONNECT_SELECT_VIEW);\r
     group->SetDraggable(true);\r
     group->SetTouchable(true);\r
index dc73723..82c3ad0 100644 (file)
 #include "graphic_types.h"\r
 #include "DialViewGroup.h"\r
 #include "DialBinTypes.h"\r
+#include "DialBinTypesV2.h"\r
 #include "components/ui_abstract_progress.h"\r
 \r
 namespace OHOS {\r
 class DialBinParser {\r
 public:\r
     static DialBinParser* GetInstance(void);\r
-    bool UpdateDial(const std::string& file, FILE* fp, DialViewGroup* group);\r
+    bool UpdateDial(const std::string& file, FILE* fp, DialViewGroup* group, DisplayState state = DisplayState::NORMAL);\r
     bool GetDialPreviewInfo(FILE* fp, DialPreviewInfo* info);\r
 \r
 protected:\r
@@ -56,6 +57,8 @@ private:
     std::string file_;\r
     uint32_t dirId_ = 0xfef << 20; // 20: offset\r
     uint32_t imageOffset_ = 0;\r
+    bool v2Version_ = false;\r
+    DisplayState state_ = DisplayState::NORMAL;\r
 };\r
 }\r
 #endif\r
index 366c1be..d242a3d 100644 (file)
@@ -29,6 +29,7 @@ struct DialPreviewInfo {
     char description[DIAL_DESCRIPTION_MAX_LEN];\r
     uint32_t imgId;\r
     uint32_t offset;\r
+    uint8_t capability;\r
 };\r
 \r
 struct DialRect {\r
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/main/include/DialBinTypesV2.h b/code/sdk/application/wearable/nativeapp/nativeui/main/include/DialBinTypesV2.h
new file mode 100644 (file)
index 0000000..837a0a6
--- /dev/null
@@ -0,0 +1,167 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2024-2024. All rights reserved.
+ * Description: DialBinTypesV2
+ * Author:
+ * Create: 2024-10-30
+ */
+
+#ifndef GRAPHIC_LITE_DIAL_BIN_TYPE_V2_H
+#define GRAPHIC_LITE_DIAL_BIN_TYPE_V2_H
+#include "DialBinTypes.h"
+
+namespace OHOS {
+enum class DisplayState {
+    NORMAL,
+    AOD,
+};
+static constexpr uint8_t DIAL_DISPLAY_CAPABILITY_NORMAL_ONLY = 0;
+static constexpr uint8_t DIAL_DISPLAY_CAPABILITY_AMBITIENT_ONLY = 1;
+static constexpr uint8_t DIAL_DISPLAY_CAPABILITY_AMBITIENT_NORMAL = 2;
+
+struct DialHeader_V2 {
+    char dialName[DIAL_NAME_MAX_LEN];
+    int16_t width;
+    int16_t height;
+    char version[DIAL_VERSION_MAX_LEN];
+    uint16_t previewImgId;
+    char description[DIAL_DESCRIPTION_MAX_LEN];
+    uint32_t imageOffset;
+    uint8_t freq;
+    uint8_t dialViewCount;
+    uint8_t displayCapabiliy;
+    uint8_t ambientFreq;
+};
+
+struct DialStaticImg_V2 {
+    Point pos;
+    Point center;
+    float rotate;
+    uint16_t imgId;
+    uint8_t displayMode;
+};
+
+struct DialSequenceImg_V2 {
+    Point pos;
+    uint16_t interval;
+    bool repeat;
+    uint8_t imgNum;
+    uint8_t displayMode;
+};
+
+struct DialRotateImg_V2 {
+    Point pos;
+    Point center;
+    int16_t rotateStart;
+    int16_t rotateEnd;
+    uint16_t imgId;
+    int16_t bindData;
+    bool isPeriod;
+    uint8_t displayMode;
+    bool isAmbientPeriodic;
+};
+
+struct DialOptionImg_V2 {
+    Point pos;
+    int16_t bindData;
+    bool isPeriod;
+    uint8_t count;
+    uint8_t displayMode;
+    bool isAmbientPeriodic;
+};
+
+struct DialDigitalImg_V2 {
+    uint8_t alignType : 4;
+    uint8_t integerLength : 4;
+    uint8_t decimalPrecision;
+    uint16_t imgIds[DIAL_DIGITALIMG_IMG_MAX_NUM];
+    int16_t signImgId;
+    int16_t decimalPointImgId;
+    uint16_t space;
+    Point alignPosition;
+    int16_t bindData;
+    bool isPeriod;
+    uint8_t displayMode;
+    bool isAmbientPeriodic;
+};
+
+struct DialLabel_V2 {
+    uint8_t breakMode;
+    uint8_t align;
+    uint8_t fontSize;
+    bool isPeriod;
+    DialRect rect;
+    uint32_t color;
+    char fontName[64];
+    char text[64];
+    int16_t bindData;
+    uint8_t displayMode;
+    bool isAmbientPeriodic;
+};
+
+struct DialArcLabel_V2 {
+    uint8_t align;
+    uint8_t fontSize;
+    Point center;
+    int16_t radius;
+    int16_t rotateStart;
+    int16_t rotateEnd;
+    uint32_t color;
+    char fontName[64];
+    char text[64];
+    int16_t bindData;
+    bool isPeriod;
+    uint8_t displayMode;
+    bool isAmbientPeriodic;
+};
+
+struct DialBoxProgress_V2 {
+    uint8_t cap;
+    uint8_t direction;
+    bool isPeriod;
+    int16_t bindData;
+    uint32_t bgColor;
+    DialProgressType typeData;
+    uint8_t displayMode;
+    bool isAmbientPeriodic;
+};
+
+struct DialArcProgress_V2 {
+    uint8_t cap;
+    bool isPeriod;
+    uint16_t radius;
+    uint16_t startAngle;
+    uint16_t endAngle;
+    uint16_t lineWidth;
+    int16_t bindData;
+    uint32_t bgColor;
+    DialProgressType typeData;
+    uint8_t displayMode;
+    bool isAmbientPeriodic;
+};
+
+struct DialVideo_V2 {
+    DialRect rect;
+    uint32_t offset;
+    Color32 colorKey;
+    uint32_t imgId;
+    uint8_t displayMode;
+};
+
+struct DialClick_V2 {
+    uint8_t type;
+    DialRect rect;
+    union {
+        uint32_t sliceId;
+        char bundleName[64];
+    };
+    uint8_t displayMode;
+};
+
+struct DialKaleidoscope_V2 {
+    uint16_t imgId;
+    float crownRotateStep;
+    float animatorRotateStep;
+    uint8_t displayMode;
+};
+} // namespace OHOS
+#endif // GRAPHIC_LITE_DIAL_BIN_TYPE_V2_H
index 1d82fac..8d691e9 100644 (file)
@@ -18,14 +18,15 @@ namespace OHOS {
     } CardInfo;\r
 \r
     typedef struct {\r
-        DialId id;\r
+        uint8_t id;\r
         const char *dialName;\r
         const char *dialImg;\r
         uint8_t freq;\r
+        uint8_t capability;\r
     } DialInfo;\r
 \r
     typedef struct {\r
-        uint8_t dialFlag;\r
+        uint8_t dialFlag; // 0 ÔÚÏß±íÅÌ 1 ÀëÏß±íÅÌ\r
         uint8_t dialId;\r
         std::string dialFullName;\r
     } DialSetting;\r
@@ -39,7 +40,8 @@ namespace OHOS {
         void DeleteCardSetting(uint8_t index);\r
         void AddCardSetting(uint8_t index);\r
         const CardInfo *GetCardInfo(CardId card) const;\r
-        const DialInfo *GetDialInfo(DialId dial) const;\r
+        const DialInfo *GetDialInfo(uint8_t dial) const; // »ñÈ¡ÔÚÏß±íÅÌÅäÖÃ\r
+        uint8_t GetDialInfoNum() const; // »ñÈ¡ÔÚÏß±íÅ̵ÄÊýÁ¿\r
         void AddDialSetting(const DialSetting &setting);\r
         void InitDialSettings(void);\r
         DialSetting &GetDialSetting();\r
@@ -47,6 +49,9 @@ namespace OHOS {
         void SetFromSetCardView(bool isFrom);\r
         void SetFromCardId(uint8_t cardId);\r
         uint8_t GetFromCardId(void);\r
+        bool IsAodEnabled();\r
+        void EnableAod(bool enable);\r
+\r
     private:\r
         void InitDialSettingDefault(void);\r
         MainModel();\r
@@ -59,6 +64,7 @@ namespace OHOS {
         DialSetting dialSetting;\r
         bool isFromSetCardView{false};\r
         uint8_t fromCardId{MAX_CARD};\r
+        bool isAodEnabled{false};\r
     };\r
 }\r
 \r
index 3242760..76ada9f 100644 (file)
@@ -14,6 +14,7 @@
 #include "gfx_utils/list.h"
 #include "DialView.h"
 #include "DialVideoView.h"
+#include "DialBinTypesV2.h"
 
 namespace OHOS {
 class DialViewGroup : public UICardPage, public OnDialDataUpdateListener {
@@ -24,7 +25,7 @@ public:
     /**
     * @brief  Set dial resource path.
     */
-    void SetDial(std::string filePath);
+    void SetDial(std::string filePath, DisplayState state = DisplayState::NORMAL);
 
     /**
     * @brief  Add a view which binds with data of a specific type and could be updated periodically.
@@ -127,6 +128,7 @@ private:
     FILE* fp_ = nullptr;
     DialVideoView* video_ = nullptr;
     UIKaleidoscopeView* kaleidoscope_ = nullptr;
+    DisplayState state_ = DisplayState::NORMAL;
 
     typedef struct {
         Rect area;
index 737e038..f32f769 100644 (file)
@@ -10,6 +10,8 @@
 #include "kv_store.h"\r
 #include "securec.h"\r
 #include "wearable_log.h"\r
+#include "DialBinTypesV2.h"\r
+#include "power_display_service.h"\r
 \r
 namespace OHOS {\r
     static const int CARD_SETTING_VALUE_LEN = 32;\r
@@ -22,10 +24,14 @@ namespace OHOS {
     };\r
 \r
     const DialInfo dialInfoMap[] = {\r
-        { DIAL_CLOCK, "扫秒表盘", PNG_SET_DIAL_CLOCK, DEFAULT_TASK_PERIOD },\r
+        { 0, "扫秒表盘", PNG_SET_DIAL_CLOCK, DEFAULT_TASK_PERIOD, DIAL_DISPLAY_CAPABILITY_NORMAL_ONLY},\r
+        { 1, "aod扫秒表盘", PNG_SET_DIAL_CLOCK, DEFAULT_TASK_PERIOD, DIAL_DISPLAY_CAPABILITY_AMBITIENT_ONLY},\r
     };\r
 \r
-    MainModel::MainModel() {}\r
+    MainModel::MainModel()\r
+    {\r
+        power_display_gui_enable_aod(IsAodEnabled());\r
+    }\r
 \r
     MainModel::~MainModel() {}\r
 \r
@@ -45,7 +51,7 @@ namespace OHOS {
         return nullptr;\r
     }\r
 \r
-    const DialInfo *MainModel::GetDialInfo(DialId dialId) const\r
+    const DialInfo *MainModel::GetDialInfo(uint8_t dialId) const\r
     {\r
         for (uint8_t i = 0; i < (sizeof(dialInfoMap) / sizeof(dialInfoMap[0])); i++) {\r
             if (dialId == dialInfoMap[i].id) {\r
@@ -55,6 +61,11 @@ namespace OHOS {
         return nullptr;\r
     }\r
 \r
+    uint8_t MainModel::GetDialInfoNum() const\r
+    {\r
+        return sizeof(dialInfoMap) / sizeof(dialInfoMap[0]);\r
+    }\r
+\r
     void MainModel::InitCardSettings(void)\r
     {\r
         char temp[CARD_SETTING_VALUE_LEN] = { 0 };\r
@@ -140,7 +151,7 @@ namespace OHOS {
     {\r
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "InitDialSettingDefault");\r
         dialSetting.dialFlag = 0;\r
-        dialSetting.dialId = DIAL_CLOCK;\r
+        dialSetting.dialId = 0;\r
         dialSetting.dialFullName = "";\r
     }\r
 \r
@@ -219,4 +230,26 @@ namespace OHOS {
     {\r
         return fromCardId;\r
     }\r
+\r
+    bool MainModel::IsAodEnabled()\r
+    {\r
+        char temp[DIAL_SETTING_VALUE_LEN] = { 0 };\r
+        int32_t len = UtilsGetValue("enable_aod", temp, DIAL_SETTING_VALUE_LEN);\r
+        if (len >= 0) {\r
+            int enable = atoi(temp);\r
+            isAodEnabled = (enable != 0);\r
+        }\r
+        return isAodEnabled;\r
+    }\r
+\r
+    void  MainModel::EnableAod(bool enable)\r
+    {\r
+        power_display_gui_enable_aod(enable);\r
+        isAodEnabled = enable;\r
+        if (isAodEnabled) {\r
+            UtilsSetValue("enable_aod", "1");\r
+        } else {\r
+            UtilsSetValue("enable_aod", "0");\r
+        }\r
+    }\r
 }
\ No newline at end of file
index f6b7bbf..e4f3c8f 100644 (file)
@@ -127,7 +127,12 @@ bool MainPresenterSample::OnClick(UIView &view, const ClickEvent &event)
     }
 
     if (g_jumpView.count(curViewId) != 0) {
-        NativeAbility::GetInstance().ChangeSlice(g_jumpView[curViewId]);
+        if (g_jumpView[curViewId] == VIEW_SETTING) {
+            NativeAbility::GetInstance().ChangeSlice(g_jumpView[curViewId], TransitionType::TRANSITION_INVALID,
+                gSliceDefaultPriority, true);
+        } else {
+            NativeAbility::GetInstance().ChangeSlice(g_jumpView[curViewId]);
+        }
     }
     return true;
 }
index dbfa000..6704a22 100644 (file)
@@ -60,12 +60,12 @@ bool DialArcLabelView::SetTextWithWildcard(const char* text)
     if (text_ == nullptr) {
         return false;
     }
-    if (memcpy_s(text_, textLen, text, textLen) != EOK) {
+    if (strcpy_s(text_, textLen, text) != EOK) {
+        GRAPHIC_LOGE("strcpy_s failed");
         UIFree(text_);
         text_ = nullptr;
         return false;
     }
-    text_[textLen] = '\0';
     return true;
 }
 
index 0650368..6d7bb74 100644 (file)
@@ -143,11 +143,13 @@ void DialDigitalImgView::HandlePosition()
     } else if (align_ == ImgAlign::CENTER) {
         curX -= totalWidth / 2; // 2: half
     }
+    UIView* prev = this; // this is always the leading view of those images.
     for (uint8_t i = 0; i < currentIndex_; i++) {
-        parent_->Add(imgs_[i]);
+        parent_->Insert(prev, imgs_[i]);
         imgs_[i]->SetPosition(curX, alignPos_.y);
         imgs_[i]->Invalidate();
         curX += imgs_[i]->GetWidth() + space_;
+        prev = imgs_[i];
     }
 }
 
index f7cb557..b2e41f5 100644 (file)
@@ -59,12 +59,12 @@ bool DialLabelView::SetTextWithWildcard(const char* text)
     if (text_ == nullptr) {
         return false;
     }
-    if (memcpy_s(text_, textLen, text, textLen) != EOK) {
+    if (strcpy_s(text_, textLen, text) != EOK) {
+        GRAPHIC_LOGE("strcpy_s failed");
         UIFree(text_);
         text_ = nullptr;
         return false;
     }
-    text_[textLen] = '\0';
     return true;
 }
 
index da4317e..b8d9e8c 100644 (file)
@@ -99,11 +99,12 @@ void DialViewGroup::ClearDial()
     }
 }
 
-void DialViewGroup::SetDial(std::string filePath)
+void DialViewGroup::SetDial(std::string filePath, DisplayState state)
 {
     ClearDial();
     resPreloaded_ = false;
     filePath_ = filePath;
+    state_ = state;
 }
 
 void DialViewGroup::PreLoad(void)
@@ -114,7 +115,7 @@ void DialViewGroup::PreLoad(void)
             GRAPHIC_LOGE("cannot open file: %s\n", filePath_.c_str());
             return;
         }
-        DialBinParser::GetInstance()->UpdateDial(filePath_, fp_, this);
+        DialBinParser::GetInstance()->UpdateDial(filePath_, fp_, this, state_);
         resPreloaded_ = true;
     }
 }
@@ -180,8 +181,8 @@ void DialViewGroup::AddView(DialDataType type, DialView* view, bool isPeriodic)
         passiveUpdateTypes_.PushBack(type);
     }
     dialViews_.PushBack(dynamic_cast<UIView*>(view));
-    ProcessData(type, view);
     Add(dynamic_cast<UIView*>(view));
+    ProcessData(type, view);
 }
 
 void DialViewGroup::SetPeriod(uint32_t period)
index b656272..388ab54 100644 (file)
@@ -81,25 +81,44 @@ DialBinParser* DialBinParser::GetInstance(void)
 bool DialBinParser::GetDialPreviewInfo(FILE* fp, DialPreviewInfo* info)\r
 {\r
     if (fp == nullptr || info == nullptr) {\r
-        GRAPHIC_LOGE("Get dial preview fail, param error!\n");\r
+        GRAPHIC_LOGE("Get dial preview fail, param error!");\r
         return false;\r
     }\r
 \r
     DialHeader* dialHeader = static_cast<DialHeader*>(MallocAndReadBuf(fp, sizeof(DialHeader)));\r
+    DialHeader_V2 *v2Header = nullptr;\r
     if (dialHeader == nullptr) {\r
-        GRAPHIC_LOGE("[%s: %d]malloc or read fail!\n", __FUNCTION__, __LINE__);\r
+        GRAPHIC_LOGE("malloc or read fail!");\r
         return false;\r
     }\r
+    if (strcmp(dialHeader->version, "2.0") == 0) {\r
+        UIFree(dialHeader);\r
+        dialHeader = nullptr;\r
+        int ret = fseek(fp, 0, SEEK_SET);\r
+        if (ret != 0) {\r
+            GRAPHIC_LOGE("file fseek 0 failed!");\r
+            return false;\r
+        }\r
+        v2Header = static_cast<DialHeader_V2*>(MallocAndReadBuf(fp, sizeof(DialHeader_V2)));\r
+        dialHeader = reinterpret_cast<DialHeader*>(v2Header);\r
+        if (dialHeader == nullptr) {\r
+            GRAPHIC_LOGE("malloc or read fail!");\r
+            return false;\r
+        }\r
+        info->capability = v2Header->displayCapabiliy;\r
+    } else {\r
+        info->capability = DIAL_DISPLAY_CAPABILITY_NORMAL_ONLY;\r
+    }\r
 \r
     if (memcpy_s(info->dialName, DIAL_NAME_MAX_LEN, dialHeader->dialName, DIAL_NAME_MAX_LEN) != EOK) {\r
-        GRAPHIC_LOGE("[%s: %d]memcpy_s dial name fail!\n", __FUNCTION__, __LINE__);\r
+        GRAPHIC_LOGE("memcpy_s dial name fail!");\r
         UIFree(dialHeader);\r
         return false;\r
     }\r
 \r
     if (memcpy_s(info->description, DIAL_DESCRIPTION_MAX_LEN,\r
         dialHeader->description, DIAL_DESCRIPTION_MAX_LEN) != EOK) {\r
-        GRAPHIC_LOGE("[%s: %d]memcpy_s dial description fail!\n", __FUNCTION__, __LINE__);\r
+        GRAPHIC_LOGE("memcpy_s dial description fail!");\r
         UIFree(dialHeader);\r
         return false;\r
     }\r
@@ -111,22 +130,52 @@ bool DialBinParser::GetDialPreviewInfo(FILE* fp, DialPreviewInfo* info)
     return true;\r
 }\r
 \r
-bool DialBinParser::UpdateDial(const std::string& file, FILE* fp, DialViewGroup* group)\r
+static bool SupportAod(uint8_t capability)\r
+{\r
+    if (capability == DIAL_DISPLAY_CAPABILITY_AMBITIENT_ONLY ||\r
+        capability == DIAL_DISPLAY_CAPABILITY_AMBITIENT_NORMAL) {\r
+        return true;\r
+    }\r
+    return false;\r
+}\r
+\r
+static bool SupportNormal(uint8_t capability)\r
+{\r
+    if (capability == DIAL_DISPLAY_CAPABILITY_NORMAL_ONLY ||\r
+        capability == DIAL_DISPLAY_CAPABILITY_AMBITIENT_NORMAL) {\r
+        return true;\r
+    }\r
+    return false;\r
+}\r
+\r
+static bool SupportDisplayState(DisplayState state, uint8_t capability)\r
+{\r
+    if (state == DisplayState::AOD && SupportAod(capability)) {\r
+        return true;\r
+    }\r
+    if (state == DisplayState::NORMAL && SupportNormal(capability)) {\r
+        return true;\r
+    }\r
+    return false;\r
+}\r
+\r
+bool DialBinParser::UpdateDial(const std::string& file, FILE* fp, DialViewGroup* group, DisplayState state)\r
 {\r
     if (fp == nullptr) {\r
-        GRAPHIC_LOGE("fp is nullptr!\n");\r
+        GRAPHIC_LOGE("fp is nullptr!");\r
         return false;\r
     }\r
     if (group == nullptr) {\r
-        GRAPHIC_LOGE("update dial param error!\n");\r
+        GRAPHIC_LOGE("update dial param error!");\r
         return false;\r
     }\r
     file_ = file;\r
     dialGroup_ = group;\r
+    state_ = state;\r
 \r
     int32_t ret = ParseDialHeader(fp);\r
     if (ret == -1) {\r
-        GRAPHIC_LOGE("Parse dial header fail, allom header mem fail!\n");\r
+        GRAPHIC_LOGE("Parse dial header fail, allom header mem fail!");\r
         return false;\r
     }\r
     return true;\r
@@ -135,25 +184,59 @@ bool DialBinParser::UpdateDial(const std::string& file, FILE* fp, DialViewGroup*
 int32_t DialBinParser::ParseDialHeader(FILE* file)\r
 {\r
     if (file == nullptr) {\r
-        GRAPHIC_LOGE("Parser dial header fail, param error!\n");\r
+        GRAPHIC_LOGE("Parser dial header fail, param error!");\r
         return -1;\r
     }\r
 \r
     DialHeader* dialHeader = static_cast<DialHeader*>(MallocAndReadBuf(file, sizeof(DialHeader)));\r
+    DialHeader_V2* dialHeaderV2 = nullptr;\r
     if (dialHeader == nullptr) {\r
-        GRAPHIC_LOGE("[%s: %d]malloc or read fail!\n", __FUNCTION__, __LINE__);\r
+        GRAPHIC_LOGE("malloc or read fail!");\r
+        return -1;\r
+    }\r
+    v2Version_ = (strcmp(dialHeader->version, "2.0") == 0);\r
+    if (v2Version_) {\r
+        UIFree(dialHeader);\r
+        dialHeader = nullptr;\r
+        int ret = fseek(file, 0, SEEK_SET);\r
+        if (ret != 0) {\r
+            GRAPHIC_LOGE("file fseek 0 failed!");\r
+            return -1;\r
+        }\r
+        dialHeaderV2 = static_cast<DialHeader_V2*>(MallocAndReadBuf(file, sizeof(DialHeader_V2)));\r
+        dialHeader = reinterpret_cast<DialHeader*>(dialHeaderV2);\r
+        if (dialHeader == nullptr) {\r
+            GRAPHIC_LOGE("malloc or read fail!");\r
+            return -1;\r
+        }\r
+    }\r
+    uint8_t capability =\r
+        (dialHeaderV2 == nullptr ? (DIAL_DISPLAY_CAPABILITY_NORMAL_ONLY) : dialHeaderV2->displayCapabiliy);\r
+    if (!SupportDisplayState(state_, capability)) {\r
+        UIFree(dialHeader);\r
+        GRAPHIC_LOGE("capability %u not support state %d!",\r
+            capability, static_cast<int>(state_));\r
         return -1;\r
     }\r
 \r
     dialGroup_->SetWidth(dialHeader->width);\r
     dialGroup_->SetHeight(dialHeader->height);\r
-    dialGroup_->SetPeriod(1000 / dialHeader->freq); // 1000: ms\r
+    uint32_t period = UINT32_MAX;\r
+    if (state_ == DisplayState::NORMAL) {\r
+        period = dialHeader->freq == 0 ? UINT32_MAX : 1000 / dialHeader->freq; // 1000: ms\r
+    } else {\r
+        if (dialHeaderV2 != nullptr) {\r
+            period =\r
+                dialHeaderV2->ambientFreq == 0 ? UINT32_MAX : 1000 / dialHeaderV2->ambientFreq;  // 1000: ms\r
+        }\r
+    }\r
+    dialGroup_->SetPeriod(period);\r
     imageOffset_ = dialHeader->imageOffset;\r
 \r
     uint8_t* viewType = static_cast<uint8_t*>(MallocAndReadBuf(file, (sizeof(uint8_t) * dialHeader->dialViewCount)));\r
     if (viewType == nullptr) {\r
         UIFree(dialHeader);\r
-        GRAPHIC_LOGE("[%s: %d]malloc or read fail!\n", __FUNCTION__, __LINE__);\r
+        GRAPHIC_LOGE("malloc or read fail!");\r
         return -1;\r
     }\r
 \r
@@ -161,7 +244,7 @@ int32_t DialBinParser::ParseDialHeader(FILE* file)
         if (viewType[i] < DIAL_BIN_PARSER_FUNC_NUM) {\r
             int32_t ret = (this->*funcArray_[viewType[i]])(file);\r
             if (ret == -1) {\r
-                GRAPHIC_LOGE("parser dial view fail, view type id is %d!\n", viewType[i]);\r
+                GRAPHIC_LOGE("parser dial view fail, view type id is %d!", viewType[i]);\r
                 break;\r
             }\r
         }\r
@@ -175,13 +258,19 @@ int32_t DialBinParser::ParseDialHeader(FILE* file)
 int32_t DialBinParser::ParserDialStaticImg(FILE* fp)\r
 {\r
     if (fp == nullptr) {\r
-        GRAPHIC_LOGE("Parser dial static image fail, file is nullptr!\n");\r
+        GRAPHIC_LOGE("Parser dial static image fail, file is nullptr!");\r
         return -1;\r
     }\r
-\r
-    DialStaticImg* data = static_cast<DialStaticImg*>(MallocAndReadBuf(fp, sizeof(DialStaticImg)));\r
+    DialStaticImg* data = nullptr;\r
+    DialStaticImg_V2* dataV2 = nullptr;\r
+    if (v2Version_) {\r
+        dataV2 = static_cast<DialStaticImg_V2*>(MallocAndReadBuf(fp, sizeof(DialStaticImg_V2)));\r
+        data = reinterpret_cast<decltype(data)>(dataV2);\r
+    } else {\r
+        data = static_cast<DialStaticImg*>(MallocAndReadBuf(fp, sizeof(DialStaticImg)));\r
+    }\r
     if (data == nullptr) {\r
-        GRAPHIC_LOGE("[%s: %d]malloc or read fail!\n", __FUNCTION__, __LINE__);\r
+        GRAPHIC_LOGE("malloc or read fail!");\r
         return -1;\r
     }\r
 \r
@@ -192,12 +281,19 @@ int32_t DialBinParser::ParserDialStaticImg(FILE* fp)
     uint32_t curReadPt = ftell(fp);\r
     ImageInfo* info = ImageCacheManager::GetInstance().LoadOneInMultiRes(resId, file_, fp, false, imageOffset_);\r
     if (info == nullptr) {\r
-        GRAPHIC_LOGE("[%s: %d]load img fail! file:%s resId:%x\n", __FUNCTION__, __LINE__, file_.c_str(), resId);\r
+        GRAPHIC_LOGE("load img fail! file:%s resId:%x", file_.c_str(), resId);\r
         UIFree(data);\r
         return -1;\r
     }\r
     fseek(fp, curReadPt, SEEK_SET);\r
     view->SetSrc(info);\r
+    uint8_t capability =\r
+        (dataV2 == nullptr ? (DIAL_DISPLAY_CAPABILITY_NORMAL_ONLY) : dataV2->displayMode);\r
+    if (!SupportDisplayState(state_, capability)) {\r
+        UIFree(data);\r
+        delete view;\r
+        return 0;\r
+    }\r
     dialGroup_->AddView(view);\r
 \r
     UIFree(data);\r
@@ -207,19 +303,26 @@ int32_t DialBinParser::ParserDialStaticImg(FILE* fp)
 int32_t DialBinParser::ParserDialSequenceImg(FILE* fp)\r
 {\r
     if (fp == nullptr) {\r
-        GRAPHIC_LOGE("Parser dial sequence image fail, file is nullptr!\n");\r
+        GRAPHIC_LOGE("Parser dial sequence image fail, file is nullptr!");\r
         return -1;\r
     }\r
 \r
-    DialSequenceImg* data = static_cast<DialSequenceImg*>(MallocAndReadBuf(fp, sizeof(DialSequenceImg)));\r
+    DialSequenceImg_V2* dataV2 = nullptr;\r
+    DialSequenceImg *data = nullptr;\r
+    if (v2Version_) {\r
+        dataV2 = static_cast<DialSequenceImg_V2*>(MallocAndReadBuf(fp, sizeof(DialSequenceImg_V2)));\r
+        data = reinterpret_cast<decltype(data)>(dataV2);\r
+    } else {\r
+        data = static_cast<DialSequenceImg*>(MallocAndReadBuf(fp, sizeof(DialSequenceImg)));\r
+    }\r
     if (data == nullptr) {\r
-        GRAPHIC_LOGE("[%s: %d]malloc or read fail!\n", __FUNCTION__, __LINE__);\r
+        GRAPHIC_LOGE("malloc or read fail!");\r
         return -1;\r
     }\r
 \r
     uint16_t* imgIdArray = static_cast<uint16_t*>(MallocAndReadBuf(fp, (sizeof(uint16_t) * data->imgNum)));\r
     if (imgIdArray == nullptr) {\r
-        GRAPHIC_LOGE("[%s: %d]malloc or read fail!\n", __FUNCTION__, __LINE__);\r
+        GRAPHIC_LOGE("malloc or read fail!");\r
         UIFree(data);\r
         return -1;\r
     }\r
@@ -237,7 +340,7 @@ int32_t DialBinParser::ParserDialSequenceImg(FILE* fp)
         if (info == nullptr) {\r
             UIFree(imgIdArray);\r
             UIFree(data);\r
-            GRAPHIC_LOGE("[%s: %d]load img fail! file:%s resId:%x\n", __FUNCTION__, __LINE__, file_.c_str(), resId);\r
+            GRAPHIC_LOGE("load img fail! file:%s resId:%x", file_.c_str(), resId);\r
             return -1;\r
         }\r
         fseek(fp, curReadPt, SEEK_SET);\r
@@ -250,6 +353,14 @@ int32_t DialBinParser::ParserDialSequenceImg(FILE* fp)
     view->SetSequenceRes(imgInfoArray, data->imgNum);\r
     delete [] imgInfoArray;\r
     view->Start();\r
+    uint8_t capability =\r
+        (dataV2 == nullptr ? (DIAL_DISPLAY_CAPABILITY_NORMAL_ONLY) : dataV2->displayMode);\r
+    if (!SupportDisplayState(state_, capability)) {\r
+        delete view;\r
+        UIFree(imgIdArray);\r
+        UIFree(data);\r
+        return 0;\r
+    }\r
     dialGroup_->AddView(view);\r
 \r
     UIFree(imgIdArray);\r
@@ -260,13 +371,20 @@ int32_t DialBinParser::ParserDialSequenceImg(FILE* fp)
 int32_t DialBinParser::ParserDialRotateImg(FILE* fp)\r
 {\r
     if (fp == nullptr) {\r
-        GRAPHIC_LOGE("Parser dial sequence image fail, file is nullptr!\n");\r
+        GRAPHIC_LOGE("Parser dial sequence image fail, file is nullptr!");\r
         return -1;\r
     }\r
 \r
-    DialRotateImg* data = static_cast<DialRotateImg*>(MallocAndReadBuf(fp, sizeof(DialRotateImg)));\r
+    DialRotateImg* data = nullptr;\r
+    DialRotateImg_V2* dataV2 = nullptr;\r
+    if (v2Version_) {\r
+        dataV2 = static_cast<DialRotateImg_V2*>(MallocAndReadBuf(fp, sizeof(DialRotateImg_V2)));\r
+        data = reinterpret_cast<decltype(data)>(dataV2);\r
+    } else {\r
+        data = static_cast<DialRotateImg*>(MallocAndReadBuf(fp, sizeof(DialRotateImg)));\r
+    }\r
     if (data == nullptr) {\r
-        GRAPHIC_LOGE("[%s: %d]malloc or read fail!\n", __FUNCTION__, __LINE__);\r
+        GRAPHIC_LOGE("malloc or read fail!");\r
         return -1;\r
     }\r
     DialRotateImgView* view = new DialRotateImgView();\r
@@ -278,13 +396,26 @@ int32_t DialBinParser::ParserDialRotateImg(FILE* fp)
     uint32_t curReadPt = ftell(fp);\r
     ImageInfo* info = ImageCacheManager::GetInstance().LoadOneInMultiRes(resId, file_, fp, false, imageOffset_);\r
     if (info == nullptr) {\r
-        GRAPHIC_LOGE("[%s: %d]load img fail! file:%s resId:%x\n", __FUNCTION__, __LINE__, file_.c_str(), resId);\r
+        GRAPHIC_LOGE("load img fail! file:%s resId:%x", file_.c_str(), resId);\r
         UIFree(data);\r
         return -1;\r
     }\r
     fseek(fp, curReadPt, SEEK_SET);\r
     view->SetSrc(info);\r
-    dialGroup_->AddView(static_cast<DialDataType>(data->bindData), view, data->isPeriod);\r
+    uint8_t capability =\r
+        (dataV2 == nullptr ? (DIAL_DISPLAY_CAPABILITY_NORMAL_ONLY) : dataV2->displayMode);\r
+    if (!SupportDisplayState(state_, capability)) {\r
+        delete view;\r
+        UIFree(data);\r
+        return 0;\r
+    }\r
+    if (state_ == DisplayState::NORMAL) {\r
+        dialGroup_->AddView(static_cast<DialDataType>(data->bindData), view, data->isPeriod);\r
+    } else {\r
+        if (dataV2 != nullptr) {\r
+            dialGroup_->AddView(static_cast<DialDataType>(data->bindData), view, dataV2->isAmbientPeriodic);\r
+        }\r
+    }\r
 \r
     UIFree(data);\r
     return 0;\r
@@ -293,20 +424,28 @@ int32_t DialBinParser::ParserDialRotateImg(FILE* fp)
 int32_t DialBinParser::ParserDialOptionImg(FILE* fp)\r
 {\r
     if (fp == nullptr) {\r
-        GRAPHIC_LOGE("Parser dial option image fail, file is nullptr!\n");\r
+        GRAPHIC_LOGE("Parser dial option image fail, file is nullptr!");\r
         return -1;\r
     }\r
 \r
-    DialOptionImg* data = static_cast<DialOptionImg*>(MallocAndReadBuf(fp, sizeof(DialOptionImg)));\r
+    DialOptionImg* data = nullptr;\r
+    DialOptionImg_V2* dataV2 = nullptr;\r
+    if (v2Version_) {\r
+        dataV2 = static_cast<DialOptionImg_V2*>(MallocAndReadBuf(fp, sizeof(DialOptionImg_V2)));\r
+        data = reinterpret_cast<decltype(data)>(dataV2);\r
+    } else {\r
+        data = static_cast<DialOptionImg*>(MallocAndReadBuf(fp, sizeof(DialOptionImg)));\r
+    }\r
+\r
     if (data == nullptr) {\r
-        GRAPHIC_LOGE("[%s: %d]malloc or read fail!\n", __FUNCTION__, __LINE__);\r
+        GRAPHIC_LOGE("malloc or read fail!");\r
         return -1;\r
     }\r
 \r
     uint16_t* imgIdArray = static_cast<uint16_t*>(MallocAndReadBuf(fp, (sizeof(uint16_t) * data->count)));\r
     if (imgIdArray == nullptr) {\r
         UIFree(data);\r
-        GRAPHIC_LOGE("[%s: %d]malloc or read fail!\n", __FUNCTION__, __LINE__);\r
+        GRAPHIC_LOGE("malloc or read fail!");\r
         return -1;\r
     }\r
 \r
@@ -320,7 +459,7 @@ int32_t DialBinParser::ParserDialOptionImg(FILE* fp)
         ImageInfo* info = ImageCacheManager::GetInstance().LoadOneInMultiRes(resId,\r
             file_, fp, false, imageOffset_);\r
         if (info == nullptr) {\r
-            GRAPHIC_LOGE("[%s: %d]load img fail! file:%s resId:%x\n", __FUNCTION__, __LINE__, file_.c_str(), resId);\r
+            GRAPHIC_LOGE("load img fail! file:%s resId:%x", file_.c_str(), resId);\r
             UIFree(imgIdArray);\r
             UIFree(data);\r
             return -1;\r
@@ -331,7 +470,21 @@ int32_t DialBinParser::ParserDialOptionImg(FILE* fp)
     view->SetOptionRes(infoArray, data->count);\r
     delete []infoArray;\r
 \r
-    dialGroup_->AddView(static_cast<DialDataType>(data->bindData), view, data->isPeriod);\r
+    uint8_t capability =\r
+        (dataV2 == nullptr ? (DIAL_DISPLAY_CAPABILITY_NORMAL_ONLY) : dataV2->displayMode);\r
+    if (!SupportDisplayState(state_, capability)) {\r
+        delete view;\r
+        UIFree(imgIdArray);\r
+        UIFree(data);\r
+        return 0;\r
+    }\r
+    if (state_ == DisplayState::NORMAL) {\r
+        dialGroup_->AddView(static_cast<DialDataType>(data->bindData), view, data->isPeriod);\r
+    } else {\r
+        if (dataV2 != nullptr) {\r
+            dialGroup_->AddView(static_cast<DialDataType>(data->bindData), view, dataV2->isAmbientPeriodic);\r
+        }\r
+    }\r
 \r
     UIFree(imgIdArray);\r
     UIFree(data);\r
@@ -340,9 +493,16 @@ int32_t DialBinParser::ParserDialOptionImg(FILE* fp)
 \r
 int32_t DialBinParser::ParserDialDigitalImg(FILE* fp)\r
 {\r
-    DialDigitalImg* data = static_cast<DialDigitalImg*>(MallocAndReadBuf(fp, sizeof(DialDigitalImg)));\r
+    DialDigitalImg* data = nullptr;\r
+    DialDigitalImg_V2* dataV2 = nullptr;\r
+    if (v2Version_) {\r
+        dataV2 = static_cast<DialDigitalImg_V2*>(MallocAndReadBuf(fp, sizeof(DialDigitalImg_V2)));\r
+        data = reinterpret_cast<decltype(data)>(dataV2);\r
+    } else {\r
+        data = static_cast<DialDigitalImg*>(MallocAndReadBuf(fp, sizeof(DialDigitalImg)));\r
+    }\r
     if (data == nullptr) {\r
-        GRAPHIC_LOGE("[%s: %d]malloc or read fail!\n", __FUNCTION__, __LINE__);\r
+        GRAPHIC_LOGE("malloc or read fail!");\r
         return -1;\r
     }\r
 \r
@@ -382,8 +542,7 @@ int32_t DialBinParser::ParserDialDigitalImg(FILE* fp)
         numInfoArray[i] = ImageCacheManager::GetInstance().LoadOneInMultiRes(resId,\r
             file_, fp, false, imageOffset_);\r
         if (numInfoArray[i] == nullptr) {\r
-            GRAPHIC_LOGE("[%s: %d]load img fail! file: %s resId: %x\n",\r
-                __FUNCTION__, __LINE__, file_.c_str(), data->imgIds[i]);\r
+            GRAPHIC_LOGE("load img fail! file: %s resId: %x", file_.c_str(), data->imgIds[i]);\r
             UIFree(data);\r
             return -1;\r
         }\r
@@ -391,7 +550,20 @@ int32_t DialBinParser::ParserDialDigitalImg(FILE* fp)
     }\r
     view->SetParent(dialGroup_);\r
     view->SetNumRes(const_cast<const ImageInfo**>(numInfoArray), DIAL_DIGITALIMG_IMG_MAX_NUM);\r
-    dialGroup_->AddView(static_cast<DialDataType>(data->bindData), view, data->isPeriod);\r
+    uint8_t capability =\r
+        (dataV2 == nullptr ? (DIAL_DISPLAY_CAPABILITY_NORMAL_ONLY) : dataV2->displayMode);\r
+    if (!SupportDisplayState(state_, capability)) {\r
+        delete view;\r
+        UIFree(data);\r
+        return 0;\r
+    }\r
+    if (state_ == DisplayState::NORMAL) {\r
+        dialGroup_->AddView(static_cast<DialDataType>(data->bindData), view, data->isPeriod);\r
+    } else {\r
+        if (dataV2 != nullptr) {\r
+            dialGroup_->AddView(static_cast<DialDataType>(data->bindData), view, dataV2->isAmbientPeriodic);\r
+        }\r
+    }\r
 \r
     UIFree(data);\r
     return 0;\r
@@ -400,13 +572,21 @@ int32_t DialBinParser::ParserDialDigitalImg(FILE* fp)
 int32_t DialBinParser::ParserDialLabel(FILE* fp)\r
 {\r
     if (fp == nullptr) {\r
-        GRAPHIC_LOGE("Parser dial option image fail, file is nullptr!\n");\r
+        GRAPHIC_LOGE("Parser dial option image fail, file is nullptr!");\r
         return -1;\r
     }\r
 \r
-    DialLabel* data = static_cast<DialLabel*>(MallocAndReadBuf(fp, sizeof(DialLabel)));\r
+    DialLabel* data = nullptr;\r
+    DialLabel_V2* dataV2 = nullptr;\r
+    if (v2Version_) {\r
+        dataV2 = static_cast<DialLabel_V2*>(MallocAndReadBuf(fp, sizeof(DialLabel_V2)));\r
+        data = reinterpret_cast<decltype(data)>(dataV2);\r
+    } else {\r
+        data = static_cast<DialLabel*>(MallocAndReadBuf(fp, sizeof(DialLabel)));\r
+    }\r
+\r
     if (data == nullptr) {\r
-        GRAPHIC_LOGE("[%s: %d]malloc or read fail!\n", __FUNCTION__, __LINE__);\r
+        GRAPHIC_LOGE("malloc or read fail!");\r
         return -1;\r
     }\r
 \r
@@ -417,9 +597,25 @@ int32_t DialBinParser::ParserDialLabel(FILE* fp)
     Color32 color = {.full = data->color};\r
     view->SetTextColor(color);\r
     view->SetAlign(static_cast<UITextLanguageAlignment>(data->align));\r
+    bool isPeriodic = false;\r
+    if (state_ == DisplayState::NORMAL) {\r
+        isPeriodic = data->isPeriod;\r
+    } else {\r
+        if (dataV2 != nullptr) {\r
+            isPeriodic = dataV2->isAmbientPeriodic;\r
+        }\r
+    }\r
+\r
+    uint8_t capability =\r
+        (dataV2 == nullptr ? (DIAL_DISPLAY_CAPABILITY_NORMAL_ONLY) : dataV2->displayMode);\r
+    if (!SupportDisplayState(state_, capability)) {\r
+        delete view;\r
+        UIFree(data);\r
+        return 0;\r
+    }\r
     if (data->bindData != 0) {\r
         view->SetTextWithWildcard(data->text);\r
-        dialGroup_->AddView(static_cast<DialDataType>(data->bindData), view, data->isPeriod);\r
+        dialGroup_->AddView(static_cast<DialDataType>(data->bindData), view, isPeriodic);\r
     } else {\r
         view->SetText(data->text);\r
         dialGroup_->AddView(view);\r
@@ -431,13 +627,19 @@ int32_t DialBinParser::ParserDialLabel(FILE* fp)
 int32_t DialBinParser::ParserDialArcLabel(FILE* fp)\r
 {\r
     if (fp == nullptr) {\r
-        GRAPHIC_LOGE("Parser dial option image fail, file is nullptr!\n");\r
+        GRAPHIC_LOGE("Parser dial option image fail, file is nullptr!");\r
         return -1;\r
     }\r
-\r
-    DialArcLabel* data = static_cast<DialArcLabel*>(MallocAndReadBuf(fp, sizeof(DialArcLabel)));\r
+    DialArcLabel* data = nullptr;\r
+    DialArcLabel_V2* dataV2 = nullptr;\r
+    if (v2Version_) {\r
+        dataV2 = static_cast<DialArcLabel_V2*>(MallocAndReadBuf(fp, sizeof(DialArcLabel_V2)));\r
+        data = reinterpret_cast<decltype(data)>(dataV2);\r
+    } else {\r
+        data = static_cast<DialArcLabel*>(MallocAndReadBuf(fp, sizeof(DialArcLabel)));\r
+    }\r
     if (data == nullptr) {\r
-        GRAPHIC_LOGE("[%s: %d]malloc or read fail!\n", __FUNCTION__, __LINE__);\r
+        GRAPHIC_LOGE("malloc or read fail!");\r
         return -1;\r
     }\r
 \r
@@ -448,9 +650,24 @@ int32_t DialBinParser::ParserDialArcLabel(FILE* fp)
     view->SetArcTextRadius(data->radius);\r
     view->SetArcTextAngle(data->rotateStart, data->rotateEnd);\r
     view->SetStyle(STYLE_TEXT_COLOR, data->color);\r
+    bool isPeriodic = false;\r
+    if (state_ == DisplayState::NORMAL) {\r
+        isPeriodic = data->isPeriod;\r
+    } else {\r
+        if (dataV2 != nullptr) {\r
+            isPeriodic = dataV2->isAmbientPeriodic;\r
+        }\r
+    }\r
+    uint8_t capability =\r
+        (dataV2 == nullptr ? (DIAL_DISPLAY_CAPABILITY_NORMAL_ONLY) : dataV2->displayMode);\r
+    if (!SupportDisplayState(state_, capability)) {\r
+        delete view;\r
+        UIFree(data);\r
+        return 0;\r
+    }\r
     if (data->bindData != 0) {\r
         view->SetTextWithWildcard(data->text);\r
-        dialGroup_->AddView(static_cast<DialDataType>(data->bindData), view, data->isPeriod);\r
+        dialGroup_->AddView(static_cast<DialDataType>(data->bindData), view, isPeriodic);\r
     } else {\r
         view->SetText(data->text);\r
         dialGroup_->AddView(view);\r
@@ -462,7 +679,7 @@ int32_t DialBinParser::ParserDialArcLabel(FILE* fp)
 bool DialBinParser::SetProgressType(FILE* fp, UIAbstractProgress* view, DialProgressType data)\r
 {\r
     if (view == nullptr || fp == nullptr) {\r
-        GRAPHIC_LOGE("[%s: %d]param error!\n", __FUNCTION__, __LINE__);\r
+        GRAPHIC_LOGE("param error!");\r
         return false;\r
     }\r
 \r
@@ -472,8 +689,7 @@ bool DialBinParser::SetProgressType(FILE* fp, UIAbstractProgress* view, DialProg
         ImageInfo* foregroundInfo = ImageCacheManager::GetInstance().LoadOneInMultiRes(resId,\r
             file_, fp, false, imageOffset_);\r
         if (foregroundInfo == nullptr) {\r
-            GRAPHIC_LOGE("[%s: %d]load img fail! file: %s resId: %x\n",\r
-                __FUNCTION__, __LINE__, file_.c_str(), resId);\r
+            GRAPHIC_LOGE("load img fail! file: %s resId: %x", file_.c_str(), resId);\r
             return false;\r
         }\r
         fseek(fp, curReadPt, SEEK_SET);\r
@@ -487,7 +703,7 @@ bool DialBinParser::SetProgressType(FILE* fp, UIAbstractProgress* view, DialProg
     } else if (data.type == 2) { // 2: gradient\r
         ColorStop* stopArray = static_cast<ColorStop*>(MallocAndReadBuf(fp, (sizeof(ColorStop) * data.stopCount)));\r
         if (stopArray == nullptr) {\r
-            GRAPHIC_LOGE("[%s: %d]malloc or read fail!\n", __FUNCTION__, __LINE__);\r
+            GRAPHIC_LOGE("malloc or read fail!");\r
             return false;\r
         }\r
 \r
@@ -502,13 +718,20 @@ bool DialBinParser::SetProgressType(FILE* fp, UIAbstractProgress* view, DialProg
 int32_t DialBinParser::ParserDialBoxProgress(FILE* fp)\r
 {\r
     if (fp == nullptr) {\r
-        GRAPHIC_LOGE("Parser dial option image fail, file is nullptr!\n");\r
+        GRAPHIC_LOGE("Parser dial option image fail, file is nullptr!");\r
         return -1;\r
     }\r
 \r
-    DialBoxProgress* data = static_cast<DialBoxProgress*>(MallocAndReadBuf(fp, sizeof(DialBoxProgress)));\r
+    DialBoxProgress* data = nullptr;\r
+    DialBoxProgress_V2* dataV2 = nullptr;\r
+    if (v2Version_) {\r
+        dataV2 = static_cast<DialBoxProgress_V2*>(MallocAndReadBuf(fp, sizeof(DialBoxProgress_V2)));\r
+        data = reinterpret_cast<decltype(data)>(dataV2);\r
+    } else {\r
+        data = static_cast<DialBoxProgress*>(MallocAndReadBuf(fp, sizeof(DialBoxProgress)));\r
+    }\r
     if (data == nullptr) {\r
-        GRAPHIC_LOGE("[%s: %d]malloc or read fail!\n", __FUNCTION__, __LINE__);\r
+        GRAPHIC_LOGE("malloc or read fail!");\r
         return -1;\r
     }\r
 \r
@@ -522,7 +745,22 @@ int32_t DialBinParser::ParserDialBoxProgress(FILE* fp)
         UIFree(data);\r
         return -1;\r
     }\r
-    dialGroup_->AddView(static_cast<DialDataType>(data->bindData), view, data->isPeriod);\r
+    bool isPeriodic = false;\r
+    if (state_ == DisplayState::NORMAL) {\r
+        isPeriodic = data->isPeriod;\r
+    } else {\r
+        if (dataV2 != nullptr) {\r
+            isPeriodic = dataV2->isAmbientPeriodic;\r
+        }\r
+    }\r
+    uint8_t capability =\r
+        (dataV2 == nullptr ? (DIAL_DISPLAY_CAPABILITY_NORMAL_ONLY) : dataV2->displayMode);\r
+    if (!SupportDisplayState(state_, capability)) {\r
+        delete view;\r
+        UIFree(data);\r
+        return 0;\r
+    }\r
+    dialGroup_->AddView(static_cast<DialDataType>(data->bindData), view, isPeriodic);\r
     UIFree(data);\r
     return 0;\r
 }\r
@@ -530,13 +768,20 @@ int32_t DialBinParser::ParserDialBoxProgress(FILE* fp)
 int32_t DialBinParser::ParserDialArcProgress(FILE* fp)\r
 {\r
     if (fp == nullptr) {\r
-        GRAPHIC_LOGE("Parser dial option image fail, file is nullptr!\n");\r
+        GRAPHIC_LOGE("Parser dial option image fail, file is nullptr!");\r
         return -1;\r
     }\r
 \r
-    DialArcProgress* data = static_cast<DialArcProgress*>(MallocAndReadBuf(fp, sizeof(DialArcProgress)));\r
+    DialArcProgress* data = nullptr;\r
+    DialArcProgress_V2* dataV2 = nullptr;\r
+    if (v2Version_) {\r
+        dataV2 = static_cast<DialArcProgress_V2*>(MallocAndReadBuf(fp, sizeof(DialArcProgress_V2)));\r
+        data = reinterpret_cast<decltype(data)>(dataV2);\r
+    } else {\r
+        data = static_cast<DialArcProgress*>(MallocAndReadBuf(fp, sizeof(DialArcProgress)));\r
+    }\r
     if (data == nullptr) {\r
-        GRAPHIC_LOGE("[%s: %d]malloc or read fail!\n", __FUNCTION__, __LINE__);\r
+        GRAPHIC_LOGE("malloc or read fail!");\r
         return -1;\r
     }\r
 \r
@@ -556,7 +801,22 @@ int32_t DialBinParser::ParserDialArcProgress(FILE* fp)
         return -1;\r
     }\r
 \r
-    dialGroup_->AddView(static_cast<DialDataType>(data->bindData), view, data->isPeriod);\r
+    bool isPeriodic = false;\r
+    if (state_ == DisplayState::NORMAL) {\r
+        isPeriodic = data->isPeriod;\r
+    } else {\r
+        if (dataV2 != nullptr) {\r
+            isPeriodic = dataV2->isAmbientPeriodic;\r
+        }\r
+    }\r
+    uint8_t capability =\r
+        (dataV2 == nullptr ? (DIAL_DISPLAY_CAPABILITY_NORMAL_ONLY) : dataV2->displayMode);\r
+    if (!SupportDisplayState(state_, capability)) {\r
+        delete view;\r
+        UIFree(data);\r
+        return 0;\r
+    }\r
+    dialGroup_->AddView(static_cast<DialDataType>(data->bindData), view, isPeriodic);\r
     UIFree(data);\r
     return 0;\r
 }\r
@@ -564,13 +824,20 @@ int32_t DialBinParser::ParserDialArcProgress(FILE* fp)
 int32_t DialBinParser::ParserDialVideo(FILE* fp)\r
 {\r
     if (fp == nullptr) {\r
-        GRAPHIC_LOGE("Parser dial option image fail, file is nullptr!\n");\r
+        GRAPHIC_LOGE("Parser dial option image fail, file is nullptr!");\r
         return -1;\r
     }\r
 \r
-    DialVideo* data = static_cast<DialVideo*>(MallocAndReadBuf(fp, sizeof(DialVideo)));\r
+    DialVideo* data = nullptr;\r
+    DialVideo_V2* dataV2 = nullptr;\r
+    if (v2Version_) {\r
+        dataV2 = static_cast<DialVideo_V2 *>(MallocAndReadBuf(fp, sizeof(DialVideo_V2)));\r
+        data = reinterpret_cast<decltype(data)>(dataV2);\r
+    } else {\r
+        data = static_cast<DialVideo *>(MallocAndReadBuf(fp, sizeof(DialVideo)));\r
+    }\r
     if (data == nullptr) {\r
-        GRAPHIC_LOGE("[%s: %d]malloc or read fail!\n", __FUNCTION__, __LINE__);\r
+        GRAPHIC_LOGE("malloc or read fail!");\r
         return -1;\r
     }\r
 \r
@@ -583,12 +850,18 @@ int32_t DialBinParser::ParserDialVideo(FILE* fp)
     ImageInfo* imgInfo = ImageCacheManager::GetInstance().LoadOneInMultiRes(resId,\r
         file_, fp, false, imageOffset_);\r
     if (imgInfo == nullptr) {\r
-        GRAPHIC_LOGE("[%s: %d]load img fail! file: %s resId: %x\n",\r
-            __FUNCTION__, __LINE__, file_.c_str(), resId);\r
+        GRAPHIC_LOGE("load img fail! file: %s resId: %x", file_.c_str(), resId);\r
         return false;\r
     }\r
     fseek(fp, curReadPt, SEEK_SET);\r
     view->SetPreview(imgInfo);\r
+    uint8_t capability =\r
+        (dataV2 == nullptr ? (DIAL_DISPLAY_CAPABILITY_NORMAL_ONLY) : dataV2->displayMode);\r
+    if (!SupportDisplayState(state_, capability)) {\r
+        delete view;\r
+        UIFree(data);\r
+        return 0;\r
+    }\r
     dialGroup_->AddView(view, true);\r
     UIFree(data);\r
     return 0;\r
@@ -597,17 +870,30 @@ int32_t DialBinParser::ParserDialVideo(FILE* fp)
 int32_t DialBinParser::ParserDialClick(FILE* fp)\r
 {\r
     if (fp == nullptr) {\r
-        GRAPHIC_LOGE("Parser dial option image fail, file is nullptr!\n");\r
+        GRAPHIC_LOGE("Parser dial option image fail, file is nullptr!");\r
         return -1;\r
     }\r
 \r
-    DialClick* data = static_cast<DialClick*>(MallocAndReadBuf(fp, sizeof(DialClick)));\r
+    DialClick* data = nullptr;\r
+    DialClick_V2* dataV2 = nullptr;\r
+    if (v2Version_) {\r
+        dataV2 = static_cast<DialClick_V2 *>(MallocAndReadBuf(fp, sizeof(DialClick_V2)));\r
+        data = reinterpret_cast<decltype(data)>(dataV2);\r
+    } else {\r
+        data = static_cast<DialClick *>(MallocAndReadBuf(fp, sizeof(DialClick)));\r
+    }\r
     if (data == nullptr) {\r
-        GRAPHIC_LOGE("[%s: %d]malloc or read fail!\n", __FUNCTION__, __LINE__);\r
+        GRAPHIC_LOGE("malloc or read fail!");\r
         return -1;\r
     }\r
 \r
     Rect rect = {data->rect.x, data->rect.y, data->rect.x + data->rect.w - 1, data->rect.y + data->rect.h - 1};\r
+    uint8_t capability =\r
+        (dataV2 == nullptr ? (DIAL_DISPLAY_CAPABILITY_NORMAL_ONLY) : dataV2->displayMode);\r
+    if (!SupportDisplayState(state_, capability)) {\r
+        UIFree(data);\r
+        return 0;\r
+    }\r
     if (data->type == 0) {\r
         dialGroup_->AddDialClick(rect, data->sliceId);\r
     } else if (data->type == 1) {\r
@@ -621,13 +907,20 @@ int32_t DialBinParser::ParserDialClick(FILE* fp)
 int32_t DialBinParser::ParserDialKaleidoscope(FILE* fp)\r
 {\r
     if (fp == nullptr) {\r
-        GRAPHIC_LOGE("Parser dial option image fail, file is nullptr!\n");\r
+        GRAPHIC_LOGE("Parser dial option image fail, file is nullptr!");\r
         return -1;\r
     }\r
 \r
-    DialKaleidoscope* data = static_cast<DialKaleidoscope*>(MallocAndReadBuf(fp, sizeof(DialKaleidoscope)));\r
+    DialKaleidoscope* data = nullptr;\r
+    DialKaleidoscope_V2* dataV2 = nullptr;\r
+    if (v2Version_) {\r
+        dataV2 = static_cast<DialKaleidoscope_V2*>(MallocAndReadBuf(fp, sizeof(DialKaleidoscope_V2)));\r
+        data = reinterpret_cast<decltype(data)>(dataV2);\r
+    } else {\r
+        data = static_cast<DialKaleidoscope*>(MallocAndReadBuf(fp, sizeof(DialKaleidoscope)));\r
+    }\r
     if (data == nullptr) {\r
-        GRAPHIC_LOGE("[%s: %d]malloc or read fail!\n", __FUNCTION__, __LINE__);\r
+        GRAPHIC_LOGE("malloc or read fail!");\r
         return -1;\r
     }\r
 \r
@@ -637,8 +930,7 @@ int32_t DialBinParser::ParserDialKaleidoscope(FILE* fp)
     ImageInfo* imgInfo = ImageCacheManager::GetInstance().LoadOneInMultiRes(resId,\r
         file_, fp, false, imageOffset_);\r
     if (imgInfo == nullptr) {\r
-        GRAPHIC_LOGE("[%s: %d]load img fail! file: %s resId: %x\n",\r
-            __FUNCTION__, __LINE__, file_.c_str(), resId);\r
+        GRAPHIC_LOGE("load img fail! file: %s resId: %x", file_.c_str(), resId);\r
         return false;\r
     }\r
     fseek(fp, curReadPt, SEEK_SET);\r
@@ -646,6 +938,13 @@ int32_t DialBinParser::ParserDialKaleidoscope(FILE* fp)
     view->SetSrc(imgInfo);\r
     view->SetRotateEventFactor(data->crownRotateStep); // 0.2: rotate event factor\r
     view->SetRotateAnimatorValue(data->animatorRotateStep); // 0.1: rotate animator value\r
+    uint8_t capability =\r
+        (dataV2 == nullptr ? (DIAL_DISPLAY_CAPABILITY_NORMAL_ONLY) : dataV2->displayMode);\r
+    if (!SupportDisplayState(state_, capability)) {\r
+        delete view;\r
+        UIFree(data);\r
+        return 0;\r
+    }\r
     dialGroup_->AddView(view);\r
 \r
     UIFree(data);\r
index dba1ce0..7474ad6 100644 (file)
@@ -98,7 +98,9 @@ UIViewGroup *RebootDeviceView::InitShowUpView(void)
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "rebootDeviceDragListener GetInstance fail");\r
         return nullptr;\r
     }\r
-    group->SetOnDragListener(rebootDeviceDragListener);\r
+    if (NativeAbility::GetInstance().GetSlideBackInfo() == nullptr) {\r
+        group->SetOnDragListener(rebootDeviceDragListener);\r
+    }\r
     group->SetViewId(REBOOTDEVICE_VIEW);\r
     group->SetDraggable(true);\r
     group->SetTouchable(true);\r
index 3c573f7..bfe9a2a 100644 (file)
@@ -162,7 +162,9 @@ UIViewGroup *RebootView::InitShowUpView(void)
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "rebootDragListener GetInstance fail");
         return nullptr;
     }
-    group->SetOnDragListener(rebootDragListener);
+    if (NativeAbility::GetInstance().GetSlideBackInfo() == nullptr) {
+        group->SetOnDragListener(rebootDragListener);
+    }
     group->SetViewId(REBOOT_VIEW);
     group->SetDraggable(true);
     group->SetTouchable(true);
index e3d74ec..8e07938 100644 (file)
@@ -98,7 +98,9 @@ UIViewGroup *ShutdownDeviceView::InitShowUpView(void)
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "rebootDragListener GetInstance fail");\r
         return nullptr;\r
     }\r
-    group->SetOnDragListener(rebootDragListener);\r
+    if (NativeAbility::GetInstance().GetSlideBackInfo() == nullptr) {\r
+        group->SetOnDragListener(rebootDragListener);\r
+    }\r
     group->SetViewId(SHUTDOWNDEVICE_VIEW);\r
     group->SetDraggable(true);\r
     group->SetTouchable(true);\r
index 4d20275..39399a4 100644 (file)
@@ -24,6 +24,8 @@ void deregisterNotifyScreenStatus(ScreenStatusNotifyCallback callback);
 
 void notify_screen_on_event(void);
 void notify_screen_off_event(void);
+void notify_screen_aod_on_event(void);
+void notify_screen_aod_off_event(void);
 
 /**
  * @brief 设置灭屏后slice的存活期,需要在slice对应的Presentor的OnStart方法中调用
index f4e5532..89cef0a 100644 (file)
@@ -13,6 +13,7 @@
 #include "ui_screennotify.h"
 #include "components/root_view.h"
 #include "notification_manager.h"
+#include "DialBinTypesV2.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -58,6 +59,26 @@ static void ChangeToHomeView(void)
     }
 }
 
+static void GuiEnterAod(bool entry)
+{
+    using namespace OHOS;
+    DisplayState newState = entry ? DisplayState::AOD : DisplayState::NORMAL;
+
+    uint16_t current_slice_id = NativeAbility::GetInstance().GetCurSliceId();
+    for (uint16_t i = 0; i < sizeof(ignore_slice_ids) / sizeof(uint16_t); i++) {
+        if (ignore_slice_ids[i] == current_slice_id) {
+            return;
+        }
+    }
+    if (NativeAbility::GetInstance().GetNativeAbilityState() == STATE_ACTIVE) {
+        if (newState == DisplayState::AOD) {
+            NativeAbility::GetInstance().ChangeSlice(VIEW_AOD);
+        } else {
+            NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN_SAMPLE);
+        }
+    }
+};
+
 void notify_screen_on_event(void)
 {
     for (auto callback : g_callback) {
@@ -75,10 +96,21 @@ void notify_screen_off_event(void)
         callback(SCREEN_STATUS_OFF);
     }
     if (GraphicService::GetInstance()->IsNativeRunning()) {
+        OHOS::NativeAbility::GetInstance().StopSliceTransition(); // make sure to end slice transition before turning screen off.
         OHOS::NativeAbility::GetInstance().PauseSlice();
     }
 }
 
+void notify_screen_aod_on_event(void)
+{
+    GuiEnterAod(true);
+}
+
+void notify_screen_aod_off_event(void)
+{
+    GuiEnterAod(false);
+}
+
 void set_back_to_home_interval(uint32_t time_sec)
 {
     g_back_to_home_interval = time_sec;
index a2b2402..3a76e14 100644 (file)
@@ -37,11 +37,15 @@ ScreenModels *ScreenModels::GetInstance(void)
 void ScreenModels::InitKvStorage(void)
 {
 #if !defined(_WIN32)
+#ifndef XTS_SUPPORT
     int ret = UtilsSetEnv("/user");
+    WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "UtilsSetEnv /user ret = %d", ret);
+#endif
 #else
     int ret = UtilsSetEnv("../bin");
+    WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "UtilsSetEnv ../user ret = %d", ret);
 #endif
-    WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "UtilsSetEnv /user ret = %d", ret);
+
 }
 
 void ScreenModels::LoadAppMultiImages(std::string file, uint32_t startId, uint32_t lastId)
index 8b08c86..1b2ff5a 100644 (file)
@@ -28,7 +28,9 @@ SetDesktopView::~SetDesktopView()
 void SetDesktopView::OnStart()
 {
     GetRootContainer()->SetDraggable(true);
-    GetRootContainer()->SetOnDragListener(presenter_);
+    if (NativeAbility::GetInstance().GetSlideBackInfo() == nullptr) {
+        GetRootContainer()->SetOnDragListener(presenter_);
+    }
     GetRootContainer()->SetTouchable(true);
 
     scrollview = new UIScrollView();
index 937c149..abc288d 100644 (file)
@@ -21,6 +21,7 @@ namespace OHOS {
         std::string dialName;\r
         std::string description;   /* 仅离线表盘使用 */\r
         ImageInfo *preImageInfo;\r
+        uint8_t capability;\r
     } SetDialInfo;\r
 }\r
 #endif
\ No newline at end of file
index 4a6b7ff..ff3787b 100644 (file)
@@ -18,6 +18,7 @@ namespace OHOS {
         void LoadAllDial(void);
         size_t GetDialCount(void);
         std::vector<SetDialInfo>& GetDialInfo(void);
+        std::vector<SetDialInfo>& GetAmbientDialInfo(void);
         void ClearDialInfo(void);
         void SaveDialSetting(uint8_t pageIndex);
         uint8_t GetPageIndex(void);
@@ -30,6 +31,7 @@ namespace OHOS {
         virtual ~SetDialModel();
         int32_t ParseDialHeader(const std::string &dialFileName, SetDialInfo &dialInfo);
         std::vector<SetDialInfo> dialInfoList;
+        std::vector<SetDialInfo> aodDialInfoList;
     };
 }
 
index e694bad..51eded2 100644 (file)
@@ -25,19 +25,23 @@ namespace OHOS {
     }
     void SetDialModel::LoadAllDial()
     {
-        LoadAllDialFromRam();
+        LoadAllDialFromRam(); // 导入在线表盘
         size_t dialSize = dialInfoList.size();
-        LoadAllDialFromFs();
+        size_t aodSize = aodDialInfoList.size();
+        LoadAllDialFromFs(); // 导入离线表盘
         /* 只排序离线表盘 */
         std::sort(dialInfoList.begin() + dialSize, dialInfoList.end(), [](const SetDialInfo& f, const SetDialInfo& n) {
                     return f.dialName < n.dialName;
                 });
+        std::sort(aodDialInfoList.begin() + aodSize,
+            aodDialInfoList.end(),
+            [](const SetDialInfo &f, const SetDialInfo &n) { return f.dialName < n.dialName; });
     }
 
     void SetDialModel::LoadAllDialFromRam()
     {
-        for (uint8_t i = DIAL_CLOCK; i < DIAL_MAX; i++) {
-            const DialInfo *info = MainModel::GetInstance().GetDialInfo((DialId)i);
+        for (uint8_t i = 0; i < MainModel::GetInstance().GetDialInfoNum(); i++) {
+            const DialInfo *info = MainModel::GetInstance().GetDialInfo(i);
             if (info != nullptr) {
                 SetDialInfo dialInfo{0};
                 dialInfo.dialFlag = 0;
@@ -51,7 +55,14 @@ namespace OHOS {
                     continue;
                 }
                 dialInfo.preImageInfo = imageInfo;
-                dialInfoList.push_back(dialInfo);
+                if (info->capability == DIAL_DISPLAY_CAPABILITY_NORMAL_ONLY) {
+                    dialInfoList.push_back(dialInfo);
+                } else if (info->capability == DIAL_DISPLAY_CAPABILITY_AMBITIENT_ONLY) {
+                    aodDialInfoList.push_back(dialInfo);
+                } else {
+                    dialInfoList.push_back(dialInfo);
+                    aodDialInfoList.push_back(dialInfo);
+                }
             }
         }
     }
@@ -69,7 +80,14 @@ namespace OHOS {
                 SetDialInfo dialInfo{0};
                 int ret = ParseDialHeader(direntp->d_name, dialInfo);
                 if (ret == 0) {
-                    dialInfoList.push_back(dialInfo);
+                    if (dialInfo.capability == DIAL_DISPLAY_CAPABILITY_NORMAL_ONLY) {
+                        dialInfoList.push_back(dialInfo);
+                    } else if (dialInfo.capability == DIAL_DISPLAY_CAPABILITY_AMBITIENT_ONLY) {
+                        aodDialInfoList.push_back(dialInfo);
+                    } else {
+                        dialInfoList.push_back(dialInfo);
+                        aodDialInfoList.push_back(dialInfo);
+                    }
                 }
             }
         }
@@ -122,6 +140,7 @@ namespace OHOS {
         dialInfo.dialName = preInfo.dialName;
         dialInfo.description = preInfo.description;
         dialInfo.preImageInfo = info;
+        dialInfo.capability = preInfo.capability;
 
         fclose(fp);
         return 0;
@@ -152,6 +171,11 @@ namespace OHOS {
         return dialInfoList;
     }
 
+    std::vector<SetDialInfo>& SetDialModel::GetAmbientDialInfo(void)
+    {
+        return aodDialInfoList;
+    }
+
     void SetDialModel::ClearDialInfo(void)
     {
         for (auto iter : dialInfoList) {
index 30b9c95..e7f148a 100644 (file)
@@ -29,8 +29,10 @@ public:
 private:
     UILabel labelCover_;
     UILabel labelRoller_;
+    UILabel labelEnableAod_;
     UIToggleButton btnCover_;
     UIToggleButton btnRoller_;
+    UIToggleButton btnEnableAod_;
     struct {
         UIToggleButton *btn;
         DialStyle style;
index 142ff95..b042071 100644 (file)
@@ -8,6 +8,7 @@
 #include "SetDialStyleView.h"
 #include "SetDialStyleModel.h"
 #include "SetDialStylePresenter.h"
+#include "MainModel.h"
 
 namespace OHOS {
 SetDialStyleView::SetDialStyleView()
@@ -22,20 +23,39 @@ void SetDialStyleView::OnStart()
 {
     GetRootContainer()->SetDraggable(true);
     GetRootContainer()->SetTouchable(true);
-    GetRootContainer()->SetOnDragListener(presenter_);
-    labelCover_.SetPosition(96, 328, 200, 60);
+    if (NativeAbility::GetInstance().GetSlideBackInfo() == nullptr) {
+        GetRootContainer()->SetOnDragListener(presenter_);
+    }
+    const int16_t BTN_HEIGHT = 55;
+    const int16_t BTN_WIDTH = 113;
+    const int16_t LABEL_WIDTH = 110;
+    const int16_t LABEL_HEIGHT = 18;
+    const int16_t COVER_X = 20;
+    const int16_t ROLLER_X = 158;
+    const int16_t ENABLE_X = 296;
+    const int16_t Y1 = 176;
+    const int16_t Y2 = 250;
+
+    labelCover_.SetPosition(COVER_X, Y2, LABEL_WIDTH, LABEL_HEIGHT);
     labelCover_.SetText("Coverflow");
     AddViewToRootContainer(&labelCover_);
 
-    labelRoller_.SetPosition(305, 328, 200, 60);
+    labelRoller_.SetPosition(ROLLER_X, Y2, LABEL_WIDTH, LABEL_HEIGHT);
     labelRoller_.SetText("Roller");
     AddViewToRootContainer(&labelRoller_);
 
-    btnCover_.SetPosition(47, 157, 148, 148);
+    btnCover_.SetPosition(COVER_X, Y1, BTN_WIDTH, BTN_HEIGHT);
     AddViewToRootContainer(&btnCover_);
-    btnRoller_.SetPosition(267, 157, 148, 148);
+    btnRoller_.SetPosition(ROLLER_X, Y1, BTN_WIDTH, BTN_HEIGHT);
     AddViewToRootContainer(&btnRoller_);
 
+    labelEnableAod_.SetPosition(ENABLE_X, Y2, LABEL_WIDTH, LABEL_HEIGHT);
+    labelEnableAod_.SetText("´ò¿ªÏ¨ÆÁÏÔʾ");
+    AddViewToRootContainer(&labelEnableAod_);
+    btnEnableAod_.SetPosition(ENABLE_X, Y1, BTN_WIDTH, BTN_HEIGHT);
+    AddViewToRootContainer(&btnEnableAod_);
+    btnEnableAod_.SetState(MainModel::GetInstance().IsAodEnabled());
+
     const DialStyle style = SetDialStyleModel::GetInstance().GetStyle();
     int len = sizeof(styleTable_) / sizeof(styleTable_[0]);
     for (int i = 0; i < len; ++i) {
@@ -48,6 +68,7 @@ void SetDialStyleView::OnStart()
 
     btnCover_.SetOnClickListener(presenter_);
     btnRoller_.SetOnClickListener(presenter_);
+    btnEnableAod_.SetOnClickListener(presenter_);
 }
 
 void SetDialStyleView::OnClick(UIView &view)
@@ -56,6 +77,10 @@ void SetDialStyleView::OnClick(UIView &view)
     if (ptr == nullptr) {
         return;
     }
+    if (ptr == &btnEnableAod_) {
+        MainModel::GetInstance().EnableAod(ptr->GetState());
+        return;
+    }
     int len = sizeof(styleTable_) / sizeof(styleTable_[0]);
     for (int i = 0; i < len; ++i) {
         if (ptr == styleTable_[i].btn) {
index 250105c..0031350 100644 (file)
@@ -16,6 +16,7 @@ typedef struct {
     const char *icon;
     const char *label;
     bool hasSecondMenu;
+    bool enableSlideBack;
 } SettingItem;
 }
 #endif
\ No newline at end of file
index 934e816..f045d1c 100644 (file)
@@ -22,13 +22,17 @@ public:
     ~SettingItemView() override;
     virtual void SetItemInfo(const SettingItem itemInfo);
     virtual void SetUpChild();
+    bool SlideBackEnabled() const
+    {
+        return sItemInfo.enableSlideBack;
+    }
     AppViewId GetViewId();
     const char* GetIconId();
 private:
     UIImageView sIcon;
     UILabel sLabel;
     UIImageView sNextImage;
-    SettingItem sItemInfo = { VIEW_INVALID, nullptr, nullptr, false };
+    SettingItem sItemInfo = { VIEW_INVALID, nullptr, nullptr, false, false };
 };
 }
 
index 61b893d..b13f61a 100644 (file)
@@ -22,14 +22,14 @@ namespace OHOS {
     void SettingModel::InitSettingItem()
     {
         int index = 0;
-        settings[index++] = {VIEW_BLUETOOTH_EARPHONE, PNG_BLUETOOTH_STITLE, "蓝牙耳机", true};
-        settings[index++] = {VIEW_CONNECT_PHONE, PNG_CONNECT_PHONE_IMAGE, "连接手机", true};
-        settings[index++] = {VIEW_REBOOT, PNG_SETTTING_REBOOT_IMAGE, "重启", true};
-        settings[index++] = {VIEW_REBOOT, PNG_SETTTING_SHUTDOWN_IMAGE, "关机", true};
-        settings[index++] = {VIEW_SET_DESKTOP, PNG_SETTTING_DESKTOP_IMAGE, "桌面", true};
-        settings[index++] = {VIEW_SET_DIAL, PNG_SETTTING_DESKTOP_IMAGE, "表盘", true};
-        settings[index++] = {VIEW_SET_CARD, PNG_SETTTING_DESKTOP_IMAGE, "卡片", true};
-        settings[index++] = {VIEW_SET_DIAL_STYLE, PNG_SETTTING_DESKTOP_IMAGE, "表盘风格", true};
+        settings[index++] = {VIEW_BLUETOOTH_EARPHONE, PNG_BLUETOOTH_STITLE, "蓝牙耳机", true, false};
+        settings[index++] = {VIEW_CONNECT_PHONE, PNG_CONNECT_PHONE_IMAGE, "连接手机", true, true};
+        settings[index++] = {VIEW_REBOOT, PNG_SETTTING_REBOOT_IMAGE, "重启", true, true};
+        settings[index++] = {VIEW_REBOOT, PNG_SETTTING_SHUTDOWN_IMAGE, "关机", true, true};
+        settings[index++] = {VIEW_SET_DESKTOP, PNG_SETTTING_DESKTOP_IMAGE, "桌面", true, true};
+        settings[index++] = {VIEW_SET_DIAL, PNG_SETTTING_DESKTOP_IMAGE, "表盘", true, false};
+        settings[index++] = {VIEW_SET_CARD, PNG_SETTTING_DESKTOP_IMAGE, "卡片", true, false};
+        settings[index++] = {VIEW_SET_DIAL_STYLE, PNG_SETTTING_DESKTOP_IMAGE, "表盘风格", true, true};
         usedLen = index;
     }
 
index 06d4fd6..72c677b 100644 (file)
@@ -55,7 +55,12 @@ namespace OHOS {
                 RebootModel::GetInstance()->SetExitsView(true);
             }
         }
-        NativeAbility::GetInstance().ChangeSlice(viewId);
+        if (settingItemView->SlideBackEnabled()) {
+            NativeAbility::GetInstance().ChangeSlice(viewId, TransitionType::TRANSITION_INVALID,
+                gSliceDefaultPriority, true);
+        } else {
+            NativeAbility::GetInstance().ChangeSlice(viewId);
+        }
         return true;
     }
 }
index c99f703..99bcefc 100644 (file)
@@ -94,7 +94,9 @@ void SettingView::OnStart()
     scrollView->SetStyle(STYLE_BACKGROUND_OPA, UN_OPACITY);
     scrollView->SetThrowDrag(true);
 
-    scrollView->SetOnDragListener(presenter_);
+    if (NativeAbility::GetInstance().GetSlideBackInfo() == nullptr) {
+        scrollView->SetOnDragListener(presenter_);
+    }
     scrollView->SetYScrollBarVisible(true);
     scrollView->Add(title);
     scrollView->Add(contentList);
index 5b4ae5c..fc045bf 100644 (file)
@@ -37,6 +37,7 @@
 #include "ui_test_kaleidoscope/ui_test_kaleidoscope.h"
 #include "ui_test_roller_view/ui_test_roller_view.h"
 #include "ui_test_emoji/ui_test_emoji.h"
+#include "ui_test_sphere_view/ui_test_sphere_view.h"
 
 namespace OHOS {
 void UITestGroup::AddTestCase(TestCaseInfo testCaseInfo)
@@ -76,6 +77,7 @@ void UITestGroup::SetUpTestCase()
 #endif
     testCaseList_->PushBack(TestCaseInfo{"表情包显示", new UITestEmoji()});
     testCaseList_->PushBack(TestCaseInfo{"视频播放", new UITestVideoPlay()});
+    testCaseList_->PushBack(TestCaseInfo{"球型菜单", new UITestSphereView()});
     testCaseList_->PushBack(TestCaseInfo{"足球效果", new UITestIcosahedron()});
 }
 
index 17c37cf..a8d8571 100644 (file)
@@ -108,10 +108,12 @@ set(PRIVATE_HEADER
     ${ROOT_DIR}/open_source/openharmony/drivers/peripheral/display/interfaces/include
     ${ROOT_DIR}/open_source/openharmony/foundation/multimedia/player/interfaces/kits/
     ${ROOT_DIR}/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent
+    ${ROOT_DIR}/open_source/openharmony/foundation/ace/ace_engine_lite/modules/keyinput
     ${ROOT_DIR}/middleware/utils/fs/include/fs
     ${ROOT_DIR}/include/middleware/services/bts/br
     ${ROOT_DIR}/include/middleware/services/bts/common
     ${ROOT_DIR}/application/auto_ota
+    ${ROOT_DIR}/open_source/openharmony/foundation/multimedia/audio_capturer/interfaces/kits/audio_capturer_lite
 )
 
 if("JS_ENABLE" IN_LIST DEFINES)
index 69b5ffb..8bb4f29 100644 (file)
Binary files a/code/sdk/application/wearable/service/msg_center/brandy-auto-ota-cli/libmsg_center.a and b/code/sdk/application/wearable/service/msg_center/brandy-auto-ota-cli/libmsg_center.a differ
index e4d13c4..76e461c 100644 (file)
Binary files a/code/sdk/application/wearable/service/msg_center/brandy-auto-ota-ser/libmsg_center.a and b/code/sdk/application/wearable/service/msg_center/brandy-auto-ota-ser/libmsg_center.a differ
index a5c5042..721d4cb 100644 (file)
Binary files a/code/sdk/application/wearable/service/msg_center/brandy-native-js-fd230/libmsg_center.a and b/code/sdk/application/wearable/service/msg_center/brandy-native-js-fd230/libmsg_center.a differ
index a5c5042..721d4cb 100644 (file)
Binary files a/code/sdk/application/wearable/service/msg_center/brandy-native-js-lt22/libmsg_center.a and b/code/sdk/application/wearable/service/msg_center/brandy-native-js-lt22/libmsg_center.a differ
diff --git a/code/sdk/application/wearable/service/msg_center/brandy-native-js-u8/libmsg_center.a b/code/sdk/application/wearable/service/msg_center/brandy-native-js-u8/libmsg_center.a
new file mode 100644 (file)
index 0000000..721d4cb
Binary files /dev/null and b/code/sdk/application/wearable/service/msg_center/brandy-native-js-u8/libmsg_center.a differ
index a5c5042..721d4cb 100644 (file)
Binary files a/code/sdk/application/wearable/service/msg_center/brandy-native-js-w9/libmsg_center.a and b/code/sdk/application/wearable/service/msg_center/brandy-native-js-w9/libmsg_center.a differ
index a5c5042..721d4cb 100644 (file)
Binary files a/code/sdk/application/wearable/service/msg_center/brandy-native-js/libmsg_center.a and b/code/sdk/application/wearable/service/msg_center/brandy-native-js/libmsg_center.a differ
index 240b7f4..2f1bae7 100644 (file)
Binary files a/code/sdk/application/wearable/service/msg_center/brandy-xts/libmsg_center.a and b/code/sdk/application/wearable/service/msg_center/brandy-xts/libmsg_center.a differ
index 7484c90..53bbb4d 100644 (file)
@@ -123,6 +123,7 @@ errcode_t msg_center_vector_navi_req_destroy_from_watch(uint8_t cmd_id, uint8_t
 errcode_t msg_center_vector_navi_rec_destroy_from_watch(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
 \r
 bool is_vector_navi_long_distance(uint8_t type);\r
+void msg_center_xiaodu_audio_pcm_clear_res(void);\r
 \r
 #ifdef __cplusplus\r
 #if __cplusplus\r
index 147a225..a59ed0a 100644 (file)
 #include "msg_center_protocol.h"
 #include "baidumap.h"
 #include "common_def.h"
-
+#include "keyinput.h"
+#include "KeyInputListener.h"
+#include "VolumeSettingView.h"
+#include "VolumeSettingPresenter.h"
+#include "VolumeSettingView.h"
 namespace OHOS {
 
 #ifdef __cplusplus
@@ -46,6 +50,9 @@ const PriorityMapper PRI_MAPPER[] = {
     {TOPIC_EVENT_HFP_PHONE_TO_WATCH, PRIORITY_ONE},
 };
 
+bool g_pressFlag = false;
+bool g_longPressFlag = false;
+
 static bool CheckPriority(const Topic topic)
 {
     uint16_t mapperSize = sizeof(PRI_MAPPER) / sizeof(PRI_MAPPER[0]);
@@ -192,14 +199,119 @@ static uint8_t MsgCenterGetNotifyTblSize(void)
     return sizeof(g_msgCenterNotifyTable) / sizeof(g_msgCenterNotifyTable[0]);
 }
 
+static void CallVolumeDipSwitchControl(uint16_t notifyId, uint8_t states)
+{
+    VolumeSliderEventListener *volumeSliderEventListener = nullptr;
+    if (notifyId == TOPIC_EVENT_HFP_WATCH_ACTIVE ||
+            notifyId == TOPIC_EVENT_HFP_PHONE_TO_WATCH) {
+        if (NotificationManager::GetInstance()->GetVolumeScreenStatus()) {
+            VolumeSettingView *settingView = GetvolumeSetting();
+            if (settingView == nullptr) {
+                return;
+            }
+            volumeSliderEventListener = settingView->GetVolumeEventListener();
+            if (volumeSliderEventListener == nullptr) {
+                return;
+            }
+            volumeSliderEventListener->ChangeVolume(static_cast<VolumeChangeStatus>(VOLUMEUP));
+        } else {
+            HonrsViewChange();
+            NotificationManager::GetInstance()->SetVolumeScreenStatus(true);
+        }
+    }
+    return;
+}
+
+static void OnKeyLongPress(uint16_t keyID)
+{
+    g_longPressFlag = true; // Long press the logo
+    if (keyID == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_POWER)) { // Power button
+        // After StopNotify, a restart card will pop up first
+        uint16_t notifyId = NotificationManager::GetInstance()->GetShowingNotifyId();
+        if(notifyId == TOPIC_EVENT_ALARM_RING) {
+            NativeAbility::GetInstance().ChangeSlice(VIEW_REBOOT);
+            NotificationManager::GetInstance()->SetNativeUIRunning(true);
+            NotificationManager::GetInstance()->StopNotify();
+        }
+    } else if (keyID == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_FUNC)) { // Function buttons
+        // Switch to user configured shortcut card
+    }
+    return;
+}
+
+static void HandleKeyPress(uint16_t notifyId)
+{
+    if (notifyId == TOPIC_EVENT_ALARM_RING) {
+        AlarmClockModel::GetInstance()->AlarmGetClockNum();
+        AlarmPopUpPresenter::GetInstance()->DelayAlarmRing();
+        NotificationManager::GetInstance()->StopNotify();
+    }
+}
+
+static bool PressKeyEvent(uint16_t keyID, uint8_t state)
+{
+    switch (state) {
+        case InputDevice::STATE_PRESS:
+            g_pressFlag = true;
+            return true;
+        case InputDevice::STATE_LONG_PRESS:
+            OnKeyLongPress(keyID);
+            return true;
+        case InputDevice::STATE_RELEASE:
+            if (g_longPressFlag) {
+                g_pressFlag = false;
+                g_longPressFlag = false;
+                return true;
+            }
+            break;
+        default:
+            break;
+    }
+    return false;
+}
+
+static bool KeyNotifyCallback(uint16_t keyID, uint8_t state)
+{
+    if (!OHOS::NotificationManager::GetInstance()->HasNotifyShowing()) {
+        WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "Notify does not exist!");
+        OHOS::ACELite::KeyInputModule::SetNotifyKeyListener(nullptr);
+        g_pressFlag = false;
+        g_longPressFlag = false;
+        return false;
+    }
+    if (PressKeyEvent(keyID, state)) {
+        return true;
+    }
+    uint16_t notifyId = NotificationManager::GetInstance()->GetShowingNotifyId();
+    if (keyID == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_POWER)) { // Power button
+        if (NotificationManager::GetInstance()->GetWatchCallStatus()) { // Volume card
+            // volume+
+            CallVolumeDipSwitchControl(notifyId, VOLUMEUP);
+        } else {
+            HandleKeyPress(notifyId);
+        }
+    }
+    else if (keyID == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_FUNC)) { // Function buttons
+        if (NotificationManager::GetInstance()->GetWatchCallStatus()) { // Volume card
+            // volume-
+            CallVolumeDipSwitchControl(notifyId, VOLUMEDOWN);
+        } else {
+            // Switch to user configured shortcut card
+        }
+    }
+    g_pressFlag = false;
+    g_longPressFlag = false;
+    return true;
+}
+
 bool MsgCenterNotifyProc(const Topic topic, Request* req)
 {
     uint8_t i;
     uint8_t tblSize = MsgCenterGetNotifyTblSize();
-
+    OHOS::ACELite::KeyInputModule::SetNotifyKeyListener(KeyNotifyCallback);
     for (i = 0; i < tblSize; i++) {
         MsgCenterNotifyTable *item = MsgCenterGetNotifyTblCb(i);
-        if (item->topic == topic && item->cb != nullptr) {
+        if (item != nullptr && item->topic == topic && item->cb != nullptr) {
             item->cb(topic, req);
             return true;
         }
@@ -242,7 +354,7 @@ void StartJsApp(char *bundleName)
     SetWantElement(want, startElement);
 
     StartAbility(want);
-
+    ClearWant(want);
     delete want;
 }
 
index 33edb7e..fe13e2c 100644 (file)
@@ -22,6 +22,7 @@
 #include "soc_osal.h"\r
 #include "watchdog.h"\r
 #include "js_ability.h"\r
+#include "recording_module.h"\r
 \r
 #ifdef __cplusplus\r
 extern "C" {\r
@@ -35,6 +36,7 @@ extern "C" {
 #define ROUTE_TRANS_MAX_SIZE (60 * 1024) /* 60K大小的导航路线规划,距离大概是15KM */\r
 \r
 osMessageQueueId_t g_pcm_stream_msg_queue_id = nullptr;\r
+static bool g_pcm_stream_end_record_sended_flag = false; /* 标识pcm的end帧是否发送完成,用于异常场景时资源清理 */\r
 \r
 errcode_t msg_center_navigation_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
 {\r
@@ -135,6 +137,8 @@ static errcode_t pcm_stream_task_body(void *data)
         return ERRCODE_FAIL;\r
     }\r
 \r
+    g_pcm_stream_end_record_sended_flag = false;\r
+\r
     for (;;) {\r
         osStatus_t ret = osMessageQueueGet(g_pcm_stream_msg_queue_id, &msg, nullptr, osWaitForever);\r
         if (ret != osOK) {\r
@@ -147,6 +151,7 @@ static errcode_t pcm_stream_task_body(void *data)
             msg.data = nullptr;\r
             if (res != ERRCODE_SUCC) {\r
                 WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "send pcm stream failed");\r
+                pcm_stream_del_queue();\r
                 return ERRCODE_FAIL;\r
             }\r
         } else if (msg.msg_id == MSGCENTER_TYPE_ID_XIAODU_END_RECORD) {\r
@@ -156,8 +161,10 @@ static errcode_t pcm_stream_task_body(void *data)
             msg.data = nullptr;\r
             if (res != ERRCODE_SUCC) {\r
                 WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "send pcm end failed");\r
+                pcm_stream_del_queue();\r
                 return ERRCODE_FAIL;\r
             }\r
+            g_pcm_stream_end_record_sended_flag = true;\r
             return ERRCODE_SUCC;\r
         }\r
     }\r
@@ -165,6 +172,31 @@ static errcode_t pcm_stream_task_body(void *data)
     return ERRCODE_SUCC;\r
 }\r
 \r
+/*\r
+ 异常场景时清除audio资源、pcm队列资源\r
+ 可能的异常场景包括:\r
+ 1)录音过程中,JS直接退出;\r
+ 2)录音完成后,等待APP结果未返回时,JS退出;\r
+ */\r
+void msg_center_xiaodu_audio_pcm_clear_res(void)\r
+{\r
+    OHOS::ACELite::AudioCapturerModule::ExceptionStop();\r
+    if (g_pcm_stream_end_record_sended_flag == false) {\r
+        pcm_stream_queue_msg msg;\r
+        msg.msg_id = MSGCENTER_TYPE_ID_XIAODU_END_RECORD;\r
+        msg.data = 0;\r
+        msg.len = 1;\r
+        if (g_pcm_stream_msg_queue_id != nullptr) {\r
+            osStatus_t ret = osMessageQueuePut(g_pcm_stream_msg_queue_id, &msg, 0, 0);\r
+            if (ret != osOK) {\r
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "Fatal err, ret = %d\r\n", ret);\r
+            }\r
+            WEARABLE_LOGD(WEARABLE_LOG_MODULE_MSG_CENTER, "active send pcm end\r\n");\r
+        }\r
+    }\r
+    return;\r
+}\r
+\r
 osMessageQueueId_t GetPcmMsgQueueId(void)\r
 {\r
     return g_pcm_stream_msg_queue_id;\r
@@ -183,6 +215,7 @@ errcode_t pcm_stream_create_task(void)
          0 };\r
     if (osThreadNew((osThreadFunc_t)pcm_stream_task_body, nullptr, &attr) == nullptr) {\r
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "create pcm_stream task fail!\r\n");\r
+        pcm_stream_del_queue();\r
         return ERRCODE_FAIL;\r
     }\r
 \r
index 6c8cc5f..dc240c3 100644 (file)
@@ -223,6 +223,7 @@ typedef struct screen_context {
     bool press_state;\r
     uint32_t screen_on_time_interval;\r
     uint32_t screen_off_time_interval;\r
+    bool enable_aod;\r
 } screen_context_t;\r
 \r
 /**\r
@@ -400,6 +401,8 @@ errcode_t power_display_task_init(void);
  */\r
 screen_context_t *power_display_get_screen_context(void);\r
 \r
+void power_display_gui_enable_aod(bool enable);\r
+\r
 #ifdef __cplusplus\r
 #if __cplusplus\r
 }\r
index 92fceba..976e3c5 100644 (file)
@@ -266,11 +266,11 @@ int32_t action_display_execute_entry(uint16_t action_bitmap, uint16_t new_state,
     }\r
 \r
     if ((action_bitmap & GET_ACTION_MASK(SET_DISPLAY_TO_IDLE_MODE)) != 0) {\r
-        // rerserve\r
+        notify_screen_aod_on_event();\r
     }\r
 \r
     if ((action_bitmap & GET_ACTION_MASK(SET_DISPLAY_TO_NORMAL_MODE)) != 0) {\r
-        // rerserve\r
+        notify_screen_aod_off_event();\r
     }\r
 \r
     if ((action_bitmap & GET_ACTION_MASK(SET_TE_ON)) != 0) {\r
index 86b46bc..767af9f 100644 (file)
@@ -97,6 +97,35 @@ static screen_state_change_maxtrix_t g_state_change_matrix[] = {
         GET_ACTION_MASK(STOP_TIMER),\r
     },\r
 \r
+    // 当前状态为Ambient\r
+    {\r
+        SCREEN_AMBIENT,\r
+        GET_ACTION_MASK(TURN_ON_SCREEN),\r
+        SCREEN_ON,\r
+        GET_ACTION_MASK(SET_DISPLAY_ON) |\r
+        GET_ACTION_MASK(SET_TE_ON) |\r
+        GET_ACTION_MASK(SET_DISPLAY_TO_NORMAL_MODE) |\r
+        GET_ACTION_MASK(SET_TP_TO_NORMAL_WORK_MODE) |\r
+        GET_ACTION_MASK(START_TIMER),\r
+    },\r
+    {\r
+        SCREEN_AMBIENT,\r
+        GET_ACTION_MASK(KEEP_CURRENT_STATE) |\r
+        GET_ACTION_MASK(ENTER_AMBIENT) |\r
+        GET_ACTION_MASK(RESET_TIMER),\r
+        SCREEN_AMBIENT,\r
+        GET_ACTION_MASK(SET_DISPLAY_ON) |\r
+        GET_ACTION_MASK(SET_DISPLAY_TO_IDLE_MODE)\r
+    },\r
+    {\r
+        SCREEN_AMBIENT,\r
+        GET_ACTION_MASK(TURN_OFF_SCREEN),\r
+        SCREEN_OFF,\r
+        GET_ACTION_MASK(SET_DISPLAY_OFF) |\r
+        GET_ACTION_MASK(SET_TE_OFF) |\r
+        GET_ACTION_MASK(SET_TP_TO_SLEEP_MODE) |\r
+        GET_ACTION_MASK(STOP_TIMER),\r
+    },\r
 };\r
 \r
 static void power_display_run_state_machine(uint32_t input_action_bitmap, state_change_info_t *info)\r
index 0a9b5e4..334b4ad 100644 (file)
@@ -35,8 +35,17 @@ static input_action_t filter_gui_execute_touch_event(screen_context_t *current,
         current->press_state = false;\r
     }\r
 \r
+    screen_context_t *sc = power_display_get_screen_context();\r
     if (event == MC_TP_COVER) {\r
-        ac = TURN_OFF_SCREEN;\r
+        if (sc->enable_aod) {\r
+            if (sc->current_state == SCREEN_ON) {\r
+                ac = ENTER_AMBIENT;\r
+            } else if (sc->current_state == SCREEN_AMBIENT) {\r
+                ac = TURN_ON_SCREEN;\r
+            }\r
+        } else {\r
+            ac = TURN_OFF_SCREEN;\r
+        }\r
     } else {\r
         ac = TURN_ON_SCREEN;\r
     }\r
index 1229604..d5fcdf8 100644 (file)
@@ -27,7 +27,11 @@ static input_action_t filter_timer_execute_system_rule(screen_context_t *current
         }\r
     } else if (event == DEFAULT_TIMER_TIME_OUT) {\r
         if (sc->press_state == 0 && sc->time_out_enable == true) {\r
-            ac = TURN_OFF_SCREEN;\r
+            if (sc->enable_aod) {\r
+                ac = ENTER_AMBIENT;\r
+            } else {\r
+                ac = TURN_OFF_SCREEN;\r
+            }\r
         }\r
     } else if (event == KEEP_ON_TIMER_TIME_OUT) {\r
         ac = RESET_TIMER;\r
index 5deec97..2a27a66 100644 (file)
@@ -43,6 +43,7 @@ static screen_context_t g_screen_context = {
     .time_out_enable = true,\r
     .last_gui_event_stamp = 0,\r
     .press_state = 0,\r
+    .enable_aod = false,\r
 };\r
 \r
 #ifdef SUPPORT_OHOSFWK\r
@@ -104,7 +105,7 @@ static errcode_t power_display_turn_on_screen(void)
 \r
 static errcode_t power_display_turn_off_screen(void)\r
 {\r
-#ifndef SUPPORT_OHOSFWK    \r
+#ifndef SUPPORT_OHOSFWK\r
     message_type_t mt = TURN_OFF_SCREEN_CMD;\r
     uint32_t event_info = 0;\r
     errcode_t ret = power_display_msg_write(mt, (uint8_t *)&event_info, sizeof(uint32_t), false);\r
@@ -428,7 +429,7 @@ errcode_t power_display_set_screenoff_switch_handle(uint32_t message_type, uint3
     g_screen_context.time_out_enable = (bool)message_value;\r
     if(message_value == 1){\r
         return power_display_execute_filter_rules(TIMER_EVENT, SET_DEFAULT_TIMEOUT);\r
-    }    \r
+    }\r
     return ERRCODE_SUCC;\r
 }\r
 \r
@@ -620,3 +621,8 @@ errcode_t uapi_power_display_init(void)
     button_register_power_display_cb(power_display_key_event_cb);\r
     return ERRCODE_SUCC;\r
 }\r
+\r
+void power_display_gui_enable_aod(bool enable)\r
+{\r
+    g_screen_context.enable_aod = enable;\r
+}\r
index 217a764..9be12aa 100644 (file)
@@ -21,6 +21,7 @@
 #include "global.h"
 #include "gt_bundle_manager_service.h"
 #include "ApplistModel.h"
+#include "bundle_manager.h"
 
 #define ARRAY_COUNT(array) (sizeof(array) / sizeof(array[0]))
 #define OHOSFWK_MAX_ARGC            8
@@ -51,6 +52,7 @@ static void ReceiveCallback(const uint8_t resultCode, const void *resultMessage)
     } else {
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "bms resultCode = 0x%x", resultCode);
     }
+    AdapterFree(installMsg);
 }
 
 static int ConvertCmdToParam(uint8_t *para, uint32_t paraLen,
@@ -225,6 +227,7 @@ static uint32_t OhosfwkATCmdAmStartJsApp(uint8_t *para, uint32_t paraLen, char *
     startElement.deviceId = nullptr;
     SetWantElement(want, startElement);
     StartAbility(want);
+    ClearWant(want);
     delete want;
     return ERRCODE_SUCC;
 }
@@ -258,6 +261,18 @@ static uint32_t OhosfwkATCmdChangeLanguage(uint8_t *para, uint32_t paraLen, char
 
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "Language changed to %s\n", languageRegion);
 
+    bool scanResult = ScanPackages(nullptr);
+
+    if (scanResult) {
+        WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "Scan Packages Succeeded");
+    } else {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Scan Packages Failed");
+        return ERRCODE_FAIL;
+    }
+
+    OHOS::ApplistModel::GetInstance().SetInitFlag(false);
+    WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "Set InitFlag false Succeeded");
+
     return ERRCODE_SUCC;
 }
 
index d494bbb..9d103ae 100644 (file)
@@ -220,6 +220,7 @@ macro(unset_var)
     UNSET(LIBS)
     UNSET(LIB)
     UNSET(REWRITE_CCFLAGS)
+    UNSET(AUTO_ADD_PATH)
 endmacro(unset_var)
 
 
@@ -231,14 +232,17 @@ macro(build_component)
     component_on_rom()
     if(DEFINED COMPONENT_ON_ROM)
         need_whole_archiv()
-        if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/private)
-            set(PRIVATE_HEADER ${PRIVATE_HEADER} ${CMAKE_CURRENT_SOURCE_DIR}/private)
-        endif()
-        if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/public)
-            set(PUBLIC_HEADER ${PUBLIC_HEADER} ${CMAKE_CURRENT_SOURCE_DIR}/public)
-        endif()
-        if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/include)
-            set(PUBLIC_HEADER ${PUBLIC_HEADER} ${CMAKE_CURRENT_SOURCE_DIR}/include)
+        if(DEFINED AUTO_ADD_PATH AND AUTO_ADD_PATH STREQUAL false)
+        else()
+            if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/private)
+                set(PRIVATE_HEADER ${PRIVATE_HEADER} ${CMAKE_CURRENT_SOURCE_DIR}/private)
+            endif()
+            if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/public)
+                set(PUBLIC_HEADER ${PUBLIC_HEADER} ${CMAKE_CURRENT_SOURCE_DIR}/public)
+            endif()
+            if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/include)
+                set(PUBLIC_HEADER ${PUBLIC_HEADER} ${CMAKE_CURRENT_SOURCE_DIR}/include)
+            endif()
         endif()
         if(COMPONENT_ON_ROM STREQUAL false)
             if(REWRITE_CCFLAGS STREQUAL true)
index c652717..04546e6 100644 (file)
@@ -359,6 +359,39 @@ target = {
             'NANDFLASH_DS35X'
         ]
     },
+################# U8 ############################
+    'brandy-native-js-u8': {
+        'base_target_name': 'brandy-native-js',
+        #自定义配置项,选择硬件及功能参数
+        'defines': [
+            'BOARD_U8',
+            'FT_SINGLE_UART',
+            'SUPPORT_AUTO_OTA_SERVER', 
+            'CONFIG_DFX_SUPPORT_DIAG_UP_MACHINE=1',
+            'TPTYPE_FT6X46',
+            'NANDFLASH_DS35X'
+        ],
+        #添加自定义应用
+        'ram_component': ['custom_cmd_service']
+    },
+    'brandy-native-js-u8-r': {
+        'base_target_name': 'brandy-native-js-r',
+        #自定义配置项,选择硬件及功能参数
+        'defines': [
+            'BOARD_U8',
+            'FT_SINGLE_UART',
+            'NANDFLASH_DS35X'
+        ]
+    },
+    'brandy-native-js-u8-ssb': {
+        'base_target_name': 'brandy-ssb',
+        #自定义配置项,选择硬件及功能参数
+        'defines': [
+            'BOARD_U8',
+            'FT_SINGLE_UART',
+            'NANDFLASH_DS35X'
+        ]
+    },
 ################# W9 ############################
     'brandy-native-js-w9': {
         'base_target_name': 'brandy-native-js',
@@ -435,6 +468,7 @@ target_group = {
     'pack_brandy_target5': ['brandy-ssb', 'brandy-target5-r', 'brandy-target5'],
     'pack_brandy_native_js': ['brandy-native-js-ssb', 'brandy-native-js-r', 'brandy-native-js'],
     'pack_brandy_native_js_fd230': ['brandy-native-js-fd230-ssb', 'brandy-native-js-fd230-r', 'brandy-native-js-fd230'],
+    'pack_brandy_native_js_u8': ['brandy-native-js-u8-ssb', 'brandy-native-js-u8-r', 'brandy-native-js-u8'],
     'pack_brandy_native_js_w9': ['brandy-native-js-w9-ssb', 'brandy-native-js-w9-r', 'brandy-native-js-w9'],
     'pack_brandy_native_js_lt22': ['brandy-native-js-lt22-ssb', 'brandy-native-js-lt22-r', 'brandy-native-js-lt22'],
     'pack_brandy_native_js_user': ['brandy-native-js-user-ssb', 'brandy-native-js-user-r', 'brandy-native-js-user'],
index 82679bd..ac9ea16 100644 (file)
@@ -11,6 +11,7 @@ from utils.build_utils import root_path, script_path, target_config_path, output
 from utils.build_utils import pkg_tools_path, jlink_tools_path, lzma_tools_path, sign_tools_path
 from utils.build_utils import memcheck_tools_path, factory_tools_path, derived_tools_path
 from utils.build_utils import ohos_tools_path
+from utils.build_utils import xts_tools_path
 from utils.build_utils import CopyModule, exec_shell, cmp_file, rm_pyc, rm_all, fn_get_subdirs
 from enviroment import TargetEnvironment
 from sdk_generator.target_config_genarator import genarate_reserve_config
@@ -27,6 +28,7 @@ sdk_copy_common_files = [
     os.path.join(factory_tools_path, 'factory_tools'),
     os.path.join(derived_tools_path),
     os.path.join(ohos_tools_path),
+    os.path.join(xts_tools_path),
 ]
 
 sdk_close_components = [
index 2bed760..92ab62f 100644 (file)
@@ -34,7 +34,7 @@ memcheck_tools_path = os.path.join(root_path, 'tools', 'bin', 'memcheck')
 factory_tools_path = os.path.join(root_path, 'tools', 'bin', 'factory_tools')
 derived_tools_path = os.path.join(root_path, 'tools', 'bin', 'derived_key_tool')
 ohos_tools_path = os.path.join(root_path, 'tools', 'bin', 'ohos_tools')
-
+xts_tools_path = os.path.join(root_path, 'tools', 'bin', 'xts_tools')
 """
 Colors defines. To highlight important output.
 """
diff --git a/code/sdk/drivers/boards/brandy_evb/board_config/board_u8.h b/code/sdk/drivers/boards/brandy_evb/board_config/board_u8.h
new file mode 100644 (file)
index 0000000..5c15708
--- /dev/null
@@ -0,0 +1,308 @@
+/*
+ * Copyright (c) @CompanyNameMagicTag 2018-2021. All rights reserved.
+ * Description:   brandy evb board config
+ * Author: @CompanyNameTag
+ * Create: 2020-02-19
+ */
+#ifndef BOARD_U8_CONFIG_H
+#define BOARD_U8_CONFIG_H
+
+#include "pinctrl_porting.h"
+#include "gpio_porting.h"
+#include "platform_types.h"
+
+#ifdef ENABLE_CYWEE
+extern void cywee_int_callback(pin_t pin, uintptr_t param);
+#endif
+/**
+ * @addtogroup connectivity_config_boards
+ * @{
+ */
+/**
+ * @brief  Global evb pio functions.
+ */
+const hal_pio_config_t g_pio_function_config[PIN_MAX_NUMBER] = {
+    { HAL_PIO_FUNC_QSPI0, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },   // S_EGPIO0
+    { HAL_PIO_FUNC_QSPI0, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },  // S_EGPIO1
+    { HAL_PIO_FUNC_QSPI0, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },   // S_EGPIO2
+    { HAL_PIO_FUNC_QSPI0, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },   // S_EGPIO3
+    { HAL_PIO_FUNC_QSPI0, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },  // S_EGPIO4 clk
+    { HAL_PIO_FUNC_QSPI0, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },  // S_EGPIO5 cs
+    { HAL_PIO_FUNC_OPI, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },     // S_EGPIO6
+    { HAL_PIO_FUNC_OPI, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },   // S_EGPIO7
+    { HAL_PIO_FUNC_OPI, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },   // S_EGPIO8
+    { HAL_PIO_FUNC_OPI, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },   // S_EGPIO9
+    { HAL_PIO_FUNC_OPI, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },   // S_EGPIO10
+    { HAL_PIO_FUNC_OPI, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },   // S_EGPIO11
+    { HAL_PIO_FUNC_OPI, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },   // S_EGPIO12
+    { HAL_PIO_FUNC_OPI, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },   // S_EGPIO13
+    { HAL_PIO_FUNC_OPI, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },   // S_EGPIO14
+    { HAL_PIO_FUNC_OPI, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },   // S_EGPIO15
+    { HAL_PIO_FUNC_OPI, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },   // S_EGPIO16
+    { HAL_PIO_FUNC_OPI, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },   // S_EGPIO17
+    { HAL_PIO_FUNC_OPI, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },   // S_EGPIO18
+    { HAL_PIO_FUNC_OPI, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },   // S_EGPIO19
+    { HAL_PIO_FUNC_OPI, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },   // S_EGPIO20
+    { HAL_PIO_FUNC_OPI, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN,  HAL_PIO_IE_ENBALE },   // S_EGPIO21
+    { HAL_PIO_FUNC_OPI, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX,  HAL_PIO_IE_DISABLE },   // S_EGPIO22 clk
+    { HAL_PIO_FUNC_OPI, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX,  HAL_PIO_IE_DISABLE },   // S_EGPIO23 ce
+    { HAL_PIO_FUNC_OPI, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN,  HAL_PIO_IE_ENBALE },    // S_EGPIO24
+    { HAL_PIO_FUNC_OPI, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN,  HAL_PIO_IE_ENBALE },    // S_EGPIO25
+
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },    // S_HGPIO0 NC
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },    // S_HGPIO1 NC
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },    // S_HGPIO2 NC
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },    // S_HGPIO3 NC
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },    // S_HGPIO4 NC
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },    // S_HGPIO5 NC
+#if (defined CFG_DRIVERS_NANDFLASH)
+    { HAL_PIO_FUNC_QSPI1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },   // S_HGPIO6
+    { HAL_PIO_FUNC_QSPI1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },   // S_HGPIO7
+    { HAL_PIO_FUNC_QSPI1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },   // S_HGPIO8
+    { HAL_PIO_FUNC_QSPI1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },   // S_HGPIO9
+    { HAL_PIO_FUNC_GPIO,  HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_DISABLE },  // S_HGPIO10
+    { HAL_PIO_FUNC_QSPI1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_DISABLE },  // S_HGPIO11 cs0
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_DISABLE },   // S_HGPIO12 cs1
+    { HAL_PIO_FUNC_GPIO,  HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_DISABLE },  // S_HGPIO13
+    { HAL_PIO_FUNC_GPIO,  HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_DISABLE },  // S_HGPIO14
+    { HAL_PIO_FUNC_QSPI1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_DISABLE },  // S_HGPIO15 clk
+#else
+    { HAL_PIO_FUNC_EMMC, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },     // S_HGPIO6
+    { HAL_PIO_FUNC_EMMC, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },     // S_HGPIO7
+    { HAL_PIO_FUNC_EMMC, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },     // S_HGPIO8
+    { HAL_PIO_FUNC_EMMC, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },     // S_HGPIO9
+    { HAL_PIO_FUNC_EMMC, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },     // S_HGPIO10  
+    { HAL_PIO_FUNC_EMMC, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },     // S_HGPIO11
+    { HAL_PIO_FUNC_EMMC, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },     // S_HGPIO12  
+    { HAL_PIO_FUNC_EMMC, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },     // S_HGPIO13  
+    { HAL_PIO_FUNC_EMMC, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },     // S_HGPIO14  
+    { HAL_PIO_FUNC_EMMC, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },   // S_HGPIO15 emmc clk
+#endif
+    { HAL_PIO_FUNC_SPI0, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },    // S_MGPIO0   NC
+    { HAL_PIO_FUNC_SPI0, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },    // S_MGPIO1   NC
+    { HAL_PIO_FUNC_SPI0, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },    // S_MGPIO2   NC
+    { HAL_PIO_FUNC_SPI0, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },    // S_MGPIO3   NC
+
+// #if (defined BRANDY_PRODUCT_EVB4)
+    { HAL_PIO_FUNC_SPI0, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },    // S_MGPIO4   NC
+// #else
+    // { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },    // S_MGPIO4   NC
+// #endif
+
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },     // S_MGPIO5  NC
+#ifdef A5133_USE_HW_SPI
+    { HAL_PIO_FUNC_SPI1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },  // S_MGPIO6  SPI1 DI
+    { HAL_PIO_FUNC_SPI1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },  // S_MGPIO7 SPI1 DO
+    { HAL_PIO_FUNC_SPI1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },  // S_MGPIO8 SPI1 CLK
+    { HAL_PIO_FUNC_SPI1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },   // S_MGPIO9 SPI1 CS0
+    { HAL_PIO_FUNC_SPI1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },   // S_MGPIO10 SPI1 CS1 NC
+#else
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },  // S_MGPIO6  SPI1 DI
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },  // S_MGPIO7 SPI1 DO
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },  // S_MGPIO8 SPI1 CLK
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },   // S_MGPIO9 SPI1 CS0
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },   // S_MGPIO10 SPI1 CS1 NC
+#endif
+    { HAL_PIO_FUNC_I2C0_M1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE }, // S_MGPIO11 i2c0 SCL NC
+    { HAL_PIO_FUNC_I2C0_M1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE }, // S_MGPIO12 I2C0 SDA
+    { HAL_PIO_FUNC_I2C1_M1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE }, // S_MGPIO13 I2C1 SCL touch i2c
+    { HAL_PIO_FUNC_I2C1_M1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE }, // S_MGPIO14  I2C1 SDA
+    { HAL_PIO_FUNC_I2C2_M1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },  // S_MGPIO15 I2C2 SCL Sensor 6轴 指南针 心率
+    { HAL_PIO_FUNC_I2C2_M1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },  // S_MGPIO16 I2C2 SDA Sensor
+    { HAL_PIO_FUNC_I2C3_M1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },   // S_MGPIO17 i2c3 SCL    smart pa\ 预留马达控制 \安全芯片
+    { HAL_PIO_FUNC_I2C3_M1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },   // S_MGPIO18  I2C3 SDA
+    { HAL_PIO_FUNC_UART1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },    // S_MGPIO19 uart1 tx
+    { HAL_PIO_FUNC_UART1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },      // S_MGPIO20 uart1 rx
+    { HAL_PIO_FUNC_UART1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },     // S_MGPIO21 uart1 rts
+    { HAL_PIO_FUNC_UART1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },     // S_MGPIO22 uart1 cts
+    { HAL_PIO_FUNC_SPI2_M1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },   // S_MGPIO23 NC
+    { HAL_PIO_FUNC_SPI2_M1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },   // S_MGPIO24 NC
+    { HAL_PIO_FUNC_SPI2_M1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },   // S_MGPIO25 NC
+    { HAL_PIO_FUNC_SPI2_M1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },   // S_MGPIO26 NC
+#if (defined QSPI_DISPLAY)
+    { HAL_PIO_FUNC_QSPI2, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },   // S_MGPIO27
+    { HAL_PIO_FUNC_QSPI2, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },   // S_MGPIO28
+    { HAL_PIO_FUNC_QSPI2, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },   // S_MGPIO29
+    { HAL_PIO_FUNC_QSPI2, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },   // S_MGPIO30
+    { HAL_PIO_FUNC_QSPI2, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },   // S_MGPIO31
+    { HAL_PIO_FUNC_QSPI2, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },   // S_MGPIO32
+#else
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },   // S_MGPIO27
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },   // S_MGPIO28
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },   // S_MGPIO29
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },   // S_MGPIO30
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },   // S_MGPIO31
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },   // S_MGPIO32
+#endif
+    { HAL_PIO_FUNC_UART_HS_UART, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE }, // S_MGPIO33 huart tx
+    { HAL_PIO_FUNC_UART_HS_UART, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },   // S_MGPIO34 huart rx
+    { HAL_PIO_FUNC_UART_HS_UART, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },  // S_MGPIO35
+    { HAL_PIO_FUNC_UART_HS_UART, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },  // S_MGPIO36
+#if 0
+    { HAL_PIO_FUNC_UART2_M2, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },     // S_MGPIO37 uart tx
+    { HAL_PIO_FUNC_UART2_M2, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },       // S_MGPIO38 uart rx
+#else
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },     // S_MGPIO37 uart tx  NC
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },       // S_MGPIO38 uart rx  NC
+#endif
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },     // S_AGPIO_L0  NC
+
+    { HAL_PIO_FUNC_I2S1_M1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },   // S_AGPIO_L1 i2s1
+    { HAL_PIO_FUNC_I2S1_M1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },   // S_AGPIO_L2
+    { HAL_PIO_FUNC_I2S1_M1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },   // S_AGPIO_L3
+    { HAL_PIO_FUNC_I2S1_M1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },   // S_AGPIO_L4
+
+    { HAL_PIO_FUNC_I2S0_M1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },   // S_AGPIO_L5
+    { HAL_PIO_FUNC_I2S0_M1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE }, // S_AGPIO_L6 i2s0
+    { HAL_PIO_FUNC_I2S0_M1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE }, // S_AGPIO_L7
+    { HAL_PIO_FUNC_I2S0_M1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE }, // S_AGPIO_L8
+
+#if (defined FT_BT_UART)
+    { HAL_PIO_FUNC_UART2_M1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },  // S_AGPIO_L9 uart2 txd
+    { HAL_PIO_FUNC_UART2_M1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },    // S_AGPIO_L10 uart2 rxd
+#else
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },    // S_AGPIO_L9 dsp uart   TP35
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },    // S_AGPIO_L10 dsp uart   TP36
+#endif
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },    // S_AGPIO_L11 G_INT1
+
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },    // S_AGPIO_L12 i2c data HX3507_SDIO
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },   // S_AGPIO_L13 i2c CLK HX3507_SCLK
+
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE }, // S_AGPIO_L14   NC
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE }, // S_AGPIO_L15   NC
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE }, // S_AGPIO_L16   NC
+    
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },    // S_AGPIO_L17 HX3507_INT   not use
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },    // S_AGPIO_L18  VDDEN  //暂时无用,采用VDDIO 默认开启 EXt V3.0 EXt V1.8
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_DISABLE },  // S_AGPIO_L19  G_INT2  //暂时不用 
+
+
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_DISABLE }, // S_AGPIO_L20  0.2C_CHRG
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },    // S_AGPIO_L21  NTC_VDD_ON 给低打开 NTC上拉电源
+#ifdef QSPI_DISPLAY
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },    // S_AGPIO_L22 QSPI TE
+#else
+    { HAL_PIO_FUNC_TE, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },      // S_AGPIO_L22 MIPI TE
+#endif
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },   // S_AGPIO_L23 CAT_1_PWR_ON 控制CAT_1开机脚,或者控制 CAT1电源   拉高有效
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },   // S_AGPIO_L24 LCM_EN
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },   // S_AGPIO_L25  //////////// audio pa reset
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },   // S_AGPIO_L26 心率复位 PPG reset
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },   // S_AGPIO_L27    LCM reset
+#ifdef SUPPORT_A5133_SERVICE
+    //{ HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },   // S_AGPIO_L28    CAT_1复位 CAT1_RESET_N  拉低有效
+#else
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },   // S_AGPIO_L28    CAT_1复位 CAT1_RESET_N  拉低有效
+#endif
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },   // S_AGPIO_L29    charge done info 检测是否充满电
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },   // S_AGPIO_L30   KP_MKIN1 唤醒 CAT1 ,输出
+#ifdef SUPPORT_A5133_SERVICE
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },   // S_AGPIO_L31  控制A5133开关
+#else
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },   // S_AGPIO_L31    KP_MKOUIT1 唤醒 蓝牙 ,输入
+#endif
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },   // S_AGPIO_L32    NC
+
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },   // S_AGPIO_R0   PRG_LED_POWER ON  心率等电源控制脚
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },   // S_AGPIO_R1   SE_REST 安全芯片复位唤醒脚
+//   #if VIB_USE_PWM
+    // { HAL_PIO_FUNC_PWMP1_M2, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },   // S_AGPIO_R2     VIBR_PWM 马达控制脚 兼容预留马达驱动复位脚
+    // { HAL_PIO_FUNC_PWMN1_M3, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },   // S_AGPIO_R2     VIBR_PWM 马达控制脚 兼容预留马达驱动复位脚
+//   #else
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },   // S_AGPIO_R2     VIBR_PWM 马达控制脚 兼容预留马达驱动复位脚
+//   #endif
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE  },   // S_AGPIO_R3     NC   
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_DISABLE  },    // S_AGPIO_R4     tp reset
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE  },   // S_AGPIO_R5     touch int
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },    // S_AGPIO_R6     PRG_INT 心率中断
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },   // S_AGPIO_R7     GYRO_INT2
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },   // S_AGPIO_R8     GYRO_INT1
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE },   // S_AGPIO_R9     BAT_CHARGE_OFF 关掉充电 温度高的时候
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },   // S_AGPIO_R10   Key2 ///////////////////HAL_PIO_IE_ENBALE input enable
+
+#if CORE == APPS
+    { HAL_PIO_FUNC_INVALID, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE }, // ULP_GPIO0 mode not config
+    { HAL_PIO_FUNC_INVALID, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE }, // ULP_GPIO1 mode not config
+    { HAL_PIO_FUNC_INVALID, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE }, // ULP_GPIO2 mode not config
+    { HAL_PIO_FUNC_INVALID, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE }, // ULP_GPIO3 mode not config
+    { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },    // ULP_GPIO4
+    { HAL_PIO_FUNC_SWD, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },       // ULP_GPIO5
+    { HAL_PIO_FUNC_SWD, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },       // ULP_GPIO6
+#endif
+};
+/**
+ * @}
+ */
+
+
+/**
+ * @addtogroup connectivity_config_boards
+ * @{
+ */
+/**
+ * @brief  Global evb gpio functions.
+ * 
+ * 
+ * typedef struct {
+    pin_t gpio;
+    hal_gpio_direction_t direction;
+    hal_gpio_level_t level;
+    uint32_t triger;
+    hal_gpio_callback_t callback;
+} hal_gpio_config_t;
+ */
+
+
+//需要配置默认输出的,以及需要配置默认输入中断函数的。
+const hal_gpio_config_t g_gpio_function_config[PIN_MAX_NUMBER] = {
+    // S_AGPIO_L17   HX3507_INT 
+    // {   S_AGPIO_L17, HAL_GPIO_DIRECTION_INPUT, HAL_GPIO_LEVEL_LOW, 0, NULL },
+    // S_AGPIO_L12  SDIO_BT
+    {   S_AGPIO_L12, HAL_GPIO_DIRECTION_OUTPUT, HAL_GPIO_LEVEL_LOW, 0, NULL },
+    // S_AGPIO_L13   SCLK_BT
+    {   S_AGPIO_L13, HAL_GPIO_DIRECTION_OUTPUT, HAL_GPIO_LEVEL_LOW, 0, NULL },
+
+     // S_AGPIO_L26 心率复位 PPG reset
+    {   S_AGPIO_L26, HAL_GPIO_DIRECTION_OUTPUT, HAL_GPIO_LEVEL_LOW, 0, NULL },
+    // S_AGPIO_R0 PRG_LED_POWER ON  心率等电源控制脚
+    {   S_AGPIO_R0, HAL_GPIO_DIRECTION_OUTPUT, HAL_GPIO_LEVEL_LOW, 0, NULL },
+
+    //S_AGPIO_L21 NTC_VDD_ON 给低打开 NTC上拉电源 ,默认关闭
+    {   S_AGPIO_L21, HAL_GPIO_DIRECTION_OUTPUT, HAL_GPIO_LEVEL_HIGH, 0, NULL },
+#if 0  //默认正常充电 
+//    #define GPIO_PIN_ENABLE_CHARGE S_AGPIO_R9  //low enable
+// #define GPIO_PIN_ENABLE_CHARGE_0_2C S_AGPIO_L20   //low 0.2c 低电流充电
+    {   S_AGPIO_R9, HAL_GPIO_DIRECTION_OUTPUT, HAL_GPIO_LEVEL_LOW, 0, NULL },
+    {   S_AGPIO_L20, HAL_GPIO_DIRECTION_OUTPUT, HAL_GPIO_LEVEL_LOW, 0, NULL },
+#else
+    {   S_AGPIO_R9, HAL_GPIO_DIRECTION_OUTPUT, HAL_GPIO_LEVEL_LOW, 0, NULL },
+    {   S_AGPIO_L20, HAL_GPIO_DIRECTION_OUTPUT, HAL_GPIO_LEVEL_HIGH, 0, NULL },
+#endif
+
+//默认关闭马达
+    {   S_AGPIO_R2, HAL_GPIO_DIRECTION_OUTPUT, HAL_GPIO_LEVEL_LOW, 0, NULL },
+//默认开启 EXT LDO V3.0 V1.8
+    {   S_AGPIO_L18, HAL_GPIO_DIRECTION_OUTPUT, HAL_GPIO_LEVEL_HIGH, 0, NULL },
+
+#ifdef ENABLE_CYWEE
+    /**G sensor G_INT1 S_AGPIO_L11 G_INT2 S_AGPIO_L19   采用timer 时这些中断要屏蔽*/
+    {   S_AGPIO_L11, HAL_GPIO_DIRECTION_INPUT, NULL, GPIO_INTERRUPT_RISING_EDGE, cywee_int_callback },
+    //{   S_AGPIO_L19, HAL_GPIO_DIRECTION_INPUT, NULL, GPIO_INTERRUPT_DEDGE, cywee_int_callback },
+#endif   
+    /**S_AGPIO_R1 GPO alipay默认resetpin*/
+    {   S_AGPIO_R1, HAL_GPIO_DIRECTION_OUTPUT, HAL_GPIO_LEVEL_HIGH, 0, NULL },
+#ifdef SUPPORT_CAT1_SERVICE
+    /**cat1 ring input key*/
+    // {   S_AGPIO_L31, HAL_GPIO_DIRECTION_INPUT, NULL, GPIO_INTERRUPT_DEDGE,  cat1_ring_isr_callback},
+    {   S_AGPIO_L31, HAL_GPIO_DIRECTION_INPUT, NULL, GPIO_INTERRUPT_RISING_EDGE,  cat1_ring_isr_callback},
+
+#endif
+#ifdef SUPPORT_A5133_SERVICE
+    //{   S_AGPIO_L28, HAL_GPIO_DIRECTION_INPUT, NULL, GPIO_INTERRUPT_RISING_EDGE,  a5133_cko_isr_callback},
+#endif
+};
+/**
+ * @}
+ */
+#endif
index 1675ea8..52ef76f 100644 (file)
@@ -89,6 +89,12 @@ void pmu_bcore_vdd0p8_power_vset(uint8_t level);
  */
 void pmu_vdd0p8_power_vset(uint8_t level);
 
+/**
+ * @brief  VDD0p8 power adjust get.
+ * @param  level Voltage level.
+ */
+void pmu_vdd0p8_power_vget(uint8_t *level);
+
 /**
  * @brief  LDO power on/off.
  * @param  sub      Which ldo select.
index c5a0c2d..984a312 100644 (file)
@@ -7,6 +7,8 @@
 #include "hal_pmu_vdd.h"
 #include "std_def.h"
 
+uint8_t g_pmu_0p8_vget = 0;
+
 typedef struct {
     volatile uint32_t lock;
     volatile uint32_t req_closed;
@@ -62,6 +64,11 @@ void pmu_vdd1p0_request_switch(switch_type_t en)
     osal_irq_restore(irq);
 }
 
+void pmu_vdd0p8_power_vget(uint8_t *level)
+{
+    *level = g_pmu_0p8_vget;
+}
+
 void pmu_vdd0p8_power_vset(uint8_t level)
 {
     /* 1. Set vset step, default: 0.25mv
@@ -69,6 +76,7 @@ void pmu_vdd0p8_power_vset(uint8_t level)
      * 3. requset vset config
      * 4. wait ack, clr ack
      */
+    g_pmu_0p8_vget = level;
     hal_pmu_vdd0p8_set_nor_voltage(level);
     hal_pmu_vdd0p8_vset_requset(PMU_VSET_MCORE);
     (void)hal_pmu_vdd0p8_vset_ack_get(PMU_VSET_MCORE);
index db816f1..ca5d08b 100644 (file)
@@ -45,7 +45,8 @@ typedef enum {
 
 
 #define PMU_LPM_MCPU_WKUP_ALL_MASK          0xFFFF
-#define PMU_LPM_MCPU_WKUP_MASK              (BIT(PMU_LPM_MCPU_DAP_WAKEUP)       | \
+#define PMU_LPM_MCPU_WKUP_MASK              (BIT(PMU_LPM_MCPU_CWDT_INT_WAKEUP)  | \
+                                            BIT(PMU_LPM_MCPU_DAP_WAKEUP)        | \
                                             BIT(PMU_LPM_MCPU_SSI_WAKEUP)        | \
                                             BIT(PMU_LPM_MCPU_GPIO_WAKEUP)       | \
                                             BIT(PMU_LPM_MCPU_M_RTC_WAKEUP)      | \
index 1a7e00b..a2e29cb 100644 (file)
@@ -120,48 +120,17 @@ void HalDelayUs(unsigned usecs)
     }\r
 }\r
 \r
-#ifdef SUPPORT_RC_CALIBRATION\r
-volatile uint64_t g_pre_count = 0;\r
-volatile double g_pre_msec = 0;\r
-#endif\r
-\r
 uint64_t HalClockGetCycles(void)\r
 {\r
-#ifdef SUPPORT_RC_CALIBRATION\r
-    volatile double tick_count;\r
-#else\r
     uint64_t tick_count;\r
-#endif\r
     uint64_t cycle;\r
     uint32_t lock_int_save;\r
     uint32_t load_tick;\r
-#ifdef SUPPORT_RC_CALIBRATION\r
-    volatile double msec;\r
-    volatile uint64_t now_count;\r
-#endif\r
 \r
     lock_int_save = LOS_IntLock();\r
-\r
-#ifdef SUPPORT_RC_CALIBRATION\r
-    if (g_pre_count == 0) {\r
-        tick_count = (uapi_systick_get_count() * OS_SYS_MS_PER_SECOND) / CLOCK_32K_CALI_FREQ;\r
-        g_pre_count = uapi_systick_get_count();\r
-        g_pre_msec = tick_count;\r
-    } else {\r
-        now_count = uapi_systick_get_count();\r
-        msec = (double)((now_count - g_pre_count) * OS_SYS_MS_PER_SECOND) / CLOCK_32K_CALI_FREQ;\r
-        tick_count = g_pre_msec + msec;\r
-\r
-        g_pre_count = now_count;\r
-        g_pre_msec = tick_count;\r
-    }\r
-#else\r
     tick_count = uapi_systick_get_ms();\r
-#endif\r
-\r
     load_tick = machine_timer_get_load_count();\r
     cycle = (uint64_t)(tick_count * load_tick);\r
-\r
     LOS_IntRestore(lock_int_save);\r
     return cycle;\r
 }\r
index f81fa9f..105bbd6 100644 (file)
 #elif PRE_ASIC
 #if defined(BOARD_FD230)
 #include "board_fd230.h"
-// #warning board fd230
+#elif defined(BOARD_U8)
+#include "board_u8.h"
 #elif defined(BOARD_W9)
 #include "board_w9.h"
-// #warning board w9
 #elif defined(BOARD_LT22)
 #include "board_lt22.h"
-// #warning board lt22
 #else
 #include "board_evb.h"
-// #warning board evb
 #endif
 #endif
 #include "pinctrl.h"
index 87158e5..5a90df9 100644 (file)
@@ -58,6 +58,10 @@ set(MAIN_COMPONENT
     false\r
 )\r
 \r
+set(AUTO_ADD_PATH\r
+    false\r
+)\r
+\r
 set(SAP_BOARD ${BOARD})\r
 # Switch audio libs dir for brandy evb4\r
 if("BRANDY_PRODUCT_EVB4" IN_LIST DEFINES)\r
index efc78a1..c58bdf5 100644 (file)
@@ -216,12 +216,6 @@ td_s32 sap_ioctl_ao_open(td_u32 cmd, td_void *arg, td_void *file)
     }
 #endif
 
-    ret = drv_ao_load_aef();
-    if (ret != AUDIO_SUCCESS) {
-        sap_err_log_fun(drv_ao_load_aef, ret);
-        return ret;
-    }
-
     audio_unused(cmd);
     audio_unused(file);
     return AUDIO_SUCCESS;
@@ -700,6 +694,14 @@ td_s32 sap_ioctl_ao_set_aef_profile(td_u32 cmd, td_void *arg, td_void *file)
     profile = (sap_ao_port_aef_profile *)arg;
     drv_ao = profile->h_mod;
 
+    if (profile->aef_profile > AO_AEF_PROFILE_NONE && profile->aef_profile < AO_AEF_PROFILE_MAX) {
+        ret = drv_ao_load_aef();
+        if (ret != AUDIO_SUCCESS) {
+            sap_err_log_fun(drv_ao_load_aef, ret);
+            return ret;
+        }
+    }
+
     ret = drv_msg_ao_set_aef_profile(drv_ao, profile->aef_profile);
     if (ret != AUDIO_SUCCESS) {
         sap_err_log_fun(drv_msg_ao_set_aef_profile, ret);
index d2ea93b..43cd9f6 100644 (file)
@@ -13,6 +13,8 @@
 #include "soc_osal.h"
 #include "errcode.h"
 #include "tcxo.h"
+#include "pmu_ldo.h"
+#include "hal_pmu_vdd.h"
 #include "hal_efuse.h"
 #include "efuse_porting.h"
 
@@ -101,11 +103,22 @@ errcode_t uapi_efuse_write_bit(uint32_t byte_number, uint8_t bit_pos)
         return ERRCODE_INVALID_PARAM;
     }
 
+    uint8_t old_level = 0;
+    pmu_vdd0p8_power_vget(&old_level);
+    if (old_level != HAL_PMU_VDD0P8_1P0_0P925V) {
+        pmu_vdd0p8_power_vset(HAL_PMU_VDD0P8_1P0_0P925V);
+    }
     hal_efuse_region_t region = hal_efuse_get_region(byte_number);
     if (hal_funcs->write_op(byte_number, (uint8_t)bit(bit_pos), region) == ERRCODE_SUCC) {
+        if (old_level != HAL_PMU_VDD0P8_1P0_0P925V) {
+            pmu_vdd0p8_power_vset(old_level);
+        }
         return ERRCODE_SUCC;
     }
 
+    if (old_level != HAL_PMU_VDD0P8_1P0_0P925V) {
+        pmu_vdd0p8_power_vset(old_level);
+    }
     return ERRCODE_FAIL;
 }
 #endif
@@ -126,16 +139,28 @@ static errcode_t efuse_write_param_check(uint32_t byte_number, const uint8_t *bu
 errcode_t uapi_efuse_write_buffer(uint32_t byte_number, const uint8_t *buffer, uint16_t length)
 {
     errcode_t ret;
+    uint8_t old_level;
 
     ret = efuse_write_param_check(byte_number, buffer, length);
     if (ret != ERRCODE_SUCC) {
         return ERRCODE_EFUSE_INVALID_PARAM;
     }
+
+    pmu_vdd0p8_power_vget(&old_level);
+    if (old_level != HAL_PMU_VDD0P8_1P0_0P925V) {
+        pmu_vdd0p8_power_vset(HAL_PMU_VDD0P8_1P0_0P925V);
+    }
     hal_efuse_funcs_t *hal_funcs = hal_efuse_get_funcs();
     if (hal_funcs->write_buffer_op(byte_number, buffer, length) != ERRCODE_SUCC) {
+        if (old_level != HAL_PMU_VDD0P8_1P0_0P925V) {
+            pmu_vdd0p8_power_vset(old_level);
+        }
         return ERRCODE_FAIL;
     }
 
+    if (old_level != HAL_PMU_VDD0P8_1P0_0P925V) {
+        pmu_vdd0p8_power_vset(old_level);
+    }
     return ERRCODE_SUCC;
 }
 
index daf1829..a32df6e 100644 (file)
@@ -285,6 +285,26 @@ int spp_get_remote_addr(int client_id, bd_addr_t *remote_addr);
  */
 int spp_write(int client_id, const char *data, const unsigned int len);
 
+/**
+ * @if Eng
+ * @brief  Config client write data retry max times.
+ * @attention NULL.
+ * @param  [in]  retry_times  Indicate the retry max times when write operation failed,
+                              retry interval is 5ms.
+ * @retval ERRCODE_BT_SUCCESS The operation success.
+ * @par Dependency:
+ * @li bts_spp.h
+ * @else
+ * @brief  配置spp写重试最大次数
+ * @attention NULL.
+ * @param  [in]  retry_times 入参,用来指定写操作失败时重试的最大次数,重试间隔为5ms。
+ * @retval ERRCODE_BT_SUCCESS 操作成功。
+ * @par 依赖:
+ * @li bts_spp.h
+ * @endif
+ */
+errcode_bt_t spp_write_retry_times_config(uint32_t retry_times);
+
 /**
  * @if Eng
  * @brief Callback function for connection event.
index 91cdbc7..313b390 100644 (file)
@@ -1,19 +1,19 @@
 <MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="initAppSysCmd bm! @appsys_bms_cmd.cpp(53),INFO" ID="0xe04a01ad" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm ReceiveCallback resultCode = %d @appsys_bms_cmd.cpp(60),INFO" ID="0xe04a01e5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="argc &gt; 4, ERR!!! @appsys_bms_cmd.cpp(67),ERROR" ID="0xe04a021a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="input failed! @appsys_bms_cmd.cpp(76),ERROR" ID="0xe04a0262" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="argc &gt; 4, ERR!!! @appsys_bms_cmd.cpp(84),ERROR" ID="0xe04a02a2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="js app is active, first need terminate @appsys_bms_cmd.cpp(110),INFO" ID="0xe04a0375" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="bm dump argc 2 only support allBundles, ERR!!! @appsys_bms_cmd.cpp(122),ERROR" ID="0xe04a03d2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo len = %d @appsys_bms_cmd.cpp(131),DBG" ID="0xe04a041e" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo bundleName = %s @appsys_bms_cmd.cpp(134),DBG" ID="0xe04a0436" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo versionName = %s @appsys_bms_cmd.cpp(135),DBG" ID="0xe04a043e" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo deviceType = %s @appsys_bms_cmd.cpp(137),DBG" ID="0xe04a044e" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo udid = %d @appsys_bms_cmd.cpp(139),DBG" ID="0xe04a045e" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo isSystemApp = %d @appsys_bms_cmd.cpp(140),DBG" ID="0xe04a0466" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="cmd_bm start @appsys_bms_cmd.cpp(159),INFO" ID="0xe04a04fd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="argc is not 2, ERR!!! @appsys_bms_cmd.cpp(161),ERROR" ID="0xe04a050a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm command = %s @appsys_bms_cmd.cpp(166),INFO" ID="0xe04a0535" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="cmd_bm no correct cmd!!! @appsys_bms_cmd.cpp(180),ERROR" ID="0xe04a05a2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="cmd_bm end @appsys_bms_cmd.cpp(183),INFO" ID="0xe04a05bd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="argc &gt; 4, ERR!!! @appsys_bms_cmd.cpp(68),ERROR" ID="0xe04a0222" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="input failed! @appsys_bms_cmd.cpp(77),ERROR" ID="0xe04a026a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="argc &gt; 4, ERR!!! @appsys_bms_cmd.cpp(85),ERROR" ID="0xe04a02aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="js app is active, first need terminate @appsys_bms_cmd.cpp(111),INFO" ID="0xe04a037d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="bm dump argc 2 only support allBundles, ERR!!! @appsys_bms_cmd.cpp(123),ERROR" ID="0xe04a03da" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo len = %d @appsys_bms_cmd.cpp(132),DBG" ID="0xe04a0426" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo bundleName = %s @appsys_bms_cmd.cpp(135),DBG" ID="0xe04a043e" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo versionName = %s @appsys_bms_cmd.cpp(136),DBG" ID="0xe04a0446" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo deviceType = %s @appsys_bms_cmd.cpp(138),DBG" ID="0xe04a0456" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo udid = %d @appsys_bms_cmd.cpp(140),DBG" ID="0xe04a0466" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo isSystemApp = %d @appsys_bms_cmd.cpp(141),DBG" ID="0xe04a046e" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="cmd_bm start @appsys_bms_cmd.cpp(160),INFO" ID="0xe04a0505" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="argc is not 2, ERR!!! @appsys_bms_cmd.cpp(162),ERROR" ID="0xe04a0512" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm command = %s @appsys_bms_cmd.cpp(167),INFO" ID="0xe04a053d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="cmd_bm no correct cmd!!! @appsys_bms_cmd.cpp(181),ERROR" ID="0xe04a05aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="cmd_bm end @appsys_bms_cmd.cpp(184),INFO" ID="0xe04a05c5" />
                        </MSG_LOG>
\ No newline at end of file
index 584bf5c..665f6d6 100644 (file)
@@ -3,8 +3,8 @@
                        <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] get profile data failed! @gt_bundle_extractor.cpp(117),ERROR" ID="0xe04003aa" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] extract file data pos failed! @gt_bundle_extractor.cpp(145),ERROR" ID="0xe040048a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] get file attr failed! @gt_bundle_extractor.cpp(151),ERROR" ID="0xe04004ba" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="VINCENTSS::GtBundleExtractor::ExtractInstallMsg totalFileSize = %d @gt_bundle_extractor.cpp(198),INFO" ID="0xe0400635" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] get unsigned file length failed! @gt_bundle_extractor.cpp(200),ERROR" ID="0xe0400642" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] extract resource file failed! @gt_bundle_extractor.cpp(222),ERROR" ID="0xe04006f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] parse hap profile get bundle info failed! @gt_bundle_extractor.cpp(231),ERROR" ID="0xe040073a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="VINCENTSS::GtBundleExtractor::ExtractInstallMsg totalFileSize = %d @gt_bundle_extractor.cpp(199),INFO" ID="0xe040063d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] get unsigned file length failed! @gt_bundle_extractor.cpp(201),ERROR" ID="0xe040064a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] extract resource file failed! @gt_bundle_extractor.cpp(237),ERROR" ID="0xe040076a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] parse hap profile get bundle info failed! @gt_bundle_extractor.cpp(246),ERROR" ID="0xe04007b2" />
                        </MSG_LOG>
\ No newline at end of file
index 85db150..19e319a 100644 (file)
@@ -27,7 +27,7 @@
                        <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] rawfile is not exists! @gt_bundle_installer.cpp(403),INFO" ID="0xe0420c9d" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] dstRawFilePath is nullptr @gt_bundle_installer.cpp(411),ERROR" ID="0xe0420cda" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] frename rawfile fail! @gt_bundle_installer.cpp(417),ERROR" ID="0xe0420d0a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] transform js to bc when install, result is %d @gt_bundle_installer.cpp(564),INFO" ID="0xe04211a5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] ConvertResInfoToBundleInfo errorCode = %d @gt_bundle_installer.cpp(589),INFO" ID="0xe042126d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] delete permissions, result is %d @gt_bundle_installer.cpp(823),INFO" ID="0xe04219bd" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] transform js to bc when install, result is %d @gt_bundle_installer.cpp(559),INFO" ID="0xe042117d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] ConvertResInfoToBundleInfo errorCode = %d @gt_bundle_installer.cpp(584),INFO" ID="0xe0421245" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] delete permissions, result is %d @gt_bundle_installer.cpp(818),INFO" ID="0xe0421995" />
                        </MSG_LOG>
\ No newline at end of file
index a591e40..db2c7c3 100644 (file)
@@ -2,5 +2,5 @@
                        <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] ExtractHapProfile failed when excute parse bundle! @gt_bundle_parser.cpp(100),ERROR" ID="0xe0460322" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] cJSON_Parse failed when excute parse bundle! @gt_bundle_parser.cpp(108),ERROR" ID="0xe0460362" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] cJSON_GetObjectItem failed when excute parse bundle! @gt_bundle_parser.cpp(116),ERROR" ID="0xe04603a2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="SetModuleInfoDeviceType fail! @gt_bundle_parser.cpp(703),ERROR" ID="0xe04615fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="SetModuleInfoDeviceType fail! @gt_bundle_parser.cpp(719),ERROR" ID="0xe046167a" />
                        </MSG_LOG>
\ No newline at end of file
index a62c263..cab6261 100644 (file)
@@ -8,33 +8,33 @@
                        <MSG STRUCTURE="diag_log_msg0" NAME="multiImgInfo is nullptr! @image_cache_manager.cpp(110),ERROR" ID="0xcb1c0372" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc node failed! @image_cache_manager.cpp(120),ERROR" ID="0xcb1c03c2" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="multiImgInfo.info is nullptr @image_cache_manager.cpp(130),ERROR" ID="0xcb1c0412" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="LRU free short term image %s resid: 0x%x @image_cache_manager.cpp(148),DBG" ID="0xcb1c04a6" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="LRU free long term image %s resid: 0x%x @image_cache_manager.cpp(157),DBG" ID="0xcb1c04ee" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc for node failed! @image_cache_manager.cpp(170),ERROR" ID="0xcb1c0552" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ImageCacheMalloc for img data failed! @image_cache_manager.cpp(178),ERROR" ID="0xcb1c0592" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="File is not loaded. File: %s. @image_cache_manager.cpp(216),ERROR" ID="0xcb1c06c2" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="MultiImgInfo is nullptr, or resId is invalid. File: %s, ResId: %u. @image_cache_manager.cpp(224),ERROR" ID="0xcb1c0702" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="Node is nullptr. File: %s, ResId: %u. @image_cache_manager.cpp(229),ERROR" ID="0xcb1c072a" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="LoadSingleRes failed. File: %s, ResId: %u. @image_cache_manager.cpp(244),ERROR" ID="0xcb1c07a2" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="LoadOneInMultiRes failed. File: %s, ResId: %u. @image_cache_manager.cpp(250),ERROR" ID="0xcb1c07d2" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="Update image info failed. Set img data to nullptr. File: %s, FileLen: %u, ResId: %u. @image_cache_manager.cpp(262),ERROR" ID="0xcb1c0832" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="CreateImageNode failed! @image_cache_manager.cpp(284),ERROR" ID="0xcb1c08e2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="fread info header failed! @image_cache_manager.cpp(298),ERROR" ID="0xcb1c0952" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="LoadAllImgInfo failed! @image_cache_manager.cpp(327),ERROR" ID="0xcb1c0a3a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="LoadSingleImgInfo failed! node is nullptr or imgIndex is invalid. @image_cache_manager.cpp(335),ERROR" ID="0xcb1c0a7a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="LoadSingleImgInfo failed! @image_cache_manager.cpp(385),ERROR" ID="0xcb1c0c0a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="LoadAllInMultiRes failed! Open file failed: %s @image_cache_manager.cpp(396),ERROR" ID="0xcb1c0c62" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="fread bin header failed! @image_cache_manager.cpp(408),ERROR" ID="0xcb1c0cc2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="LoadAllImgInfo failed! @image_cache_manager.cpp(427),ERROR" ID="0xcb1c0d5a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="LoadAllInMultiRes failed! file: %s @image_cache_manager.cpp(442),ERROR" ID="0xcb1c0dd2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Res file is already loaded. @image_cache_manager.cpp(450),WARNING" ID="0xcb1c0e13" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="CreateImageNode failed! @image_cache_manager.cpp(468),ERROR" ID="0xcb1c0ea2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy info header failed! @image_cache_manager.cpp(472),ERROR" ID="0xcb1c0ec2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy img data failed! @image_cache_manager.cpp(477),ERROR" ID="0xcb1c0eea" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="LoadOneInMultiRes failed! resId: 0x%x, file: %s @image_cache_manager.cpp(564),ERROR" ID="0xcb1c11a2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="CreateImageNode failed! @image_cache_manager.cpp(578),ERROR" ID="0xcb1c1212" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="Res file is not loaded: %s @image_cache_manager.cpp(635),ERROR" ID="0xcb1c13da" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Res file is not loaded. @image_cache_manager.cpp(663),ERROR" ID="0xcb1c14ba" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="Res file is not loaded: %s @image_cache_manager.cpp(690),ERROR" ID="0xcb1c1592" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Res file is not loaded. @image_cache_manager.cpp(705),ERROR" ID="0xcb1c160a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="LRU free short term image %s resid: 0x%x @image_cache_manager.cpp(149),DBG" ID="0xcb1c04ae" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="LRU free long term image %s resid: 0x%x @image_cache_manager.cpp(159),DBG" ID="0xcb1c04fe" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc for node failed! @image_cache_manager.cpp(174),ERROR" ID="0xcb1c0572" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ImageCacheMalloc for img data failed! @image_cache_manager.cpp(182),ERROR" ID="0xcb1c05b2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="File is not loaded. File: %s. @image_cache_manager.cpp(224),ERROR" ID="0xcb1c0702" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="MultiImgInfo is nullptr, or resId is invalid. File: %s, ResId: %u. @image_cache_manager.cpp(232),ERROR" ID="0xcb1c0742" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="Node is nullptr. File: %s, ResId: %u. @image_cache_manager.cpp(237),ERROR" ID="0xcb1c076a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="LoadSingleRes failed. File: %s, ResId: %u. @image_cache_manager.cpp(254),ERROR" ID="0xcb1c07f2" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="LoadOneInMultiRes failed. File: %s, ResId: %u. @image_cache_manager.cpp(260),ERROR" ID="0xcb1c0822" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="Update image info failed. Set img data to nullptr. File: %s, FileLen: %u, ResId: %u. @image_cache_manager.cpp(272),ERROR" ID="0xcb1c0882" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="CreateImageNode failed! @image_cache_manager.cpp(294),ERROR" ID="0xcb1c0932" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="fread info header failed! @image_cache_manager.cpp(312),ERROR" ID="0xcb1c09c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="LoadAllImgInfo failed! @image_cache_manager.cpp(341),ERROR" ID="0xcb1c0aaa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="LoadSingleImgInfo failed! node is nullptr or imgIndex is invalid. @image_cache_manager.cpp(349),ERROR" ID="0xcb1c0aea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="LoadSingleImgInfo failed! @image_cache_manager.cpp(403),ERROR" ID="0xcb1c0c9a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="LoadAllInMultiRes failed! Open file failed: %s @image_cache_manager.cpp(414),ERROR" ID="0xcb1c0cf2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="fread bin header failed! @image_cache_manager.cpp(426),ERROR" ID="0xcb1c0d52" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="LoadAllImgInfo failed! @image_cache_manager.cpp(445),ERROR" ID="0xcb1c0dea" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="LoadAllInMultiRes failed! file: %s @image_cache_manager.cpp(460),ERROR" ID="0xcb1c0e62" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Res file is already loaded. @image_cache_manager.cpp(468),WARNING" ID="0xcb1c0ea3" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="CreateImageNode failed! @image_cache_manager.cpp(486),ERROR" ID="0xcb1c0f32" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy info header failed! @image_cache_manager.cpp(490),ERROR" ID="0xcb1c0f52" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy img data failed! @image_cache_manager.cpp(495),ERROR" ID="0xcb1c0f7a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="LoadOneInMultiRes failed! resId: 0x%x, file: %s @image_cache_manager.cpp(584),ERROR" ID="0xcb1c1242" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="CreateImageNode failed! @image_cache_manager.cpp(598),ERROR" ID="0xcb1c12b2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="Res file is not loaded: %s @image_cache_manager.cpp(655),ERROR" ID="0xcb1c147a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Res file is not loaded. @image_cache_manager.cpp(683),ERROR" ID="0xcb1c155a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="Res file is not loaded: %s @image_cache_manager.cpp(710),ERROR" ID="0xcb1c1632" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Res file is not loaded. @image_cache_manager.cpp(725),ERROR" ID="0xcb1c16aa" />
                        </MSG_LOG>
\ No newline at end of file
index 143cdc1..907140a 100644 (file)
                        <MSG STRUCTURE="diag_log_msg0" NAME="RenderPath failed. Sync previous task. @lite_m_gfx_engine.cpp(430),ERROR" ID="0xcb0e0d72" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(446),ERROR" ID="0xcb0e0df2" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="RenderPath failed. Sync previous task. @lite_m_gfx_engine.cpp(473),ERROR" ID="0xcb0e0eca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(488),ERROR" ID="0xcb0e0f42" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderPath failed. Sync previous task. @lite_m_gfx_engine.cpp(501),ERROR" ID="0xcb0e0faa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(611),ERROR" ID="0xcb0e131a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(638),ERROR" ID="0xcb0e13f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderBlur failed! @lite_m_gfx_engine.cpp(654),ERROR" ID="0xcb0e1472" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ignore js syncHwDraw when native ui task is already running! @lite_m_gfx_engine.cpp(669),WARNING" ID="0xcb0e14eb" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ignore native syncHwDraw when js ui task is already running! @lite_m_gfx_engine.cpp(675),WARNING" ID="0xcb0e151b" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderBlit failed! @lite_m_gfx_engine.cpp(723),ERROR" ID="0xcb0e169a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="DrawTransform failed. Software can only process uncompressed data. @lite_m_gfx_engine.cpp(758),ERROR" ID="0xcb0e17b2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="vguFuncs_ is null! @lite_m_gfx_engine.cpp(813),ERROR" ID="0xcb0e196a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="InitVgu or RenderClearRect is null! @lite_m_gfx_engine.cpp(817),ERROR" ID="0xcb0e198a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="VGUPathInit, VGUPathAppendData, VGUPathClear or RenderPath is nullptr! @lite_m_gfx_engine.cpp(824),ERROR" ID="0xcb0e19c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="VGUPathInit, VGUPathAppendData, VGUPathClear or RenderPath is nullptr! @lite_m_gfx_engine.cpp(830),ERROR" ID="0xcb0e19f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="InitVgu failed! @lite_m_gfx_engine.cpp(835),ERROR" ID="0xcb0e1a1a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="vguFuncs_ is null! @lite_m_gfx_engine.cpp(846),INFO" ID="0xcb0e1a75" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="DeinitVgu failed! @lite_m_gfx_engine.cpp(851),ERROR" ID="0xcb0e1a9a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="AllocBuffer failed. @lite_m_gfx_engine.cpp(870),ERROR" ID="0xcb0e1b32" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="unsupported PixelFormat: %d @lite_m_gfx_engine.cpp(897),ERROR" ID="0xcb0e1c0a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="bufferInfo_ is not inited. @lite_m_gfx_engine.cpp(1002),ERROR" ID="0xcb0e1f52" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="set value: %d @lite_m_gfx_engine.cpp(1056),DBG" ID="0xcb0e2106" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(496),ERROR" ID="0xcb0e0f82" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderPath failed. Sync previous task. @lite_m_gfx_engine.cpp(509),ERROR" ID="0xcb0e0fea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(619),ERROR" ID="0xcb0e135a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(646),ERROR" ID="0xcb0e1432" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderBlur failed! @lite_m_gfx_engine.cpp(668),ERROR" ID="0xcb0e14e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ignore js syncHwDraw when native ui task is already running! @lite_m_gfx_engine.cpp(683),WARNING" ID="0xcb0e155b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ignore native syncHwDraw when js ui task is already running! @lite_m_gfx_engine.cpp(689),WARNING" ID="0xcb0e158b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderBlit failed! @lite_m_gfx_engine.cpp(737),ERROR" ID="0xcb0e170a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="DrawTransform failed. Software can only process uncompressed data. @lite_m_gfx_engine.cpp(772),ERROR" ID="0xcb0e1822" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="vguFuncs_ is null! @lite_m_gfx_engine.cpp(827),ERROR" ID="0xcb0e19da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="InitVgu or RenderClearRect is null! @lite_m_gfx_engine.cpp(831),ERROR" ID="0xcb0e19fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="VGUPathInit, VGUPathAppendData, VGUPathClear or RenderPath is nullptr! @lite_m_gfx_engine.cpp(838),ERROR" ID="0xcb0e1a32" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="VGUPathInit, VGUPathAppendData, VGUPathClear or RenderPath is nullptr! @lite_m_gfx_engine.cpp(844),ERROR" ID="0xcb0e1a62" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="InitVgu failed! @lite_m_gfx_engine.cpp(849),ERROR" ID="0xcb0e1a8a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="vguFuncs_ is null! @lite_m_gfx_engine.cpp(860),INFO" ID="0xcb0e1ae5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="DeinitVgu failed! @lite_m_gfx_engine.cpp(865),ERROR" ID="0xcb0e1b0a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="AllocBuffer failed. @lite_m_gfx_engine.cpp(884),ERROR" ID="0xcb0e1ba2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="unsupported PixelFormat: %d @lite_m_gfx_engine.cpp(911),ERROR" ID="0xcb0e1c7a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="bufferInfo_ is not inited. @lite_m_gfx_engine.cpp(1016),ERROR" ID="0xcb0e1fc2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="set value: %d @lite_m_gfx_engine.cpp(1070),DBG" ID="0xcb0e2176" />
                        </MSG_LOG>
\ No newline at end of file
index fbbae6e..78791ff 100644 (file)
                        <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap set scan rsp data memcpy_s fail @local_device_manager.c(1489),ERROR" ID="0xd8082e8a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[Error] btsrv_gap_set_adv_param memcpy_s fail @local_device_manager.c(1508),ERROR" ID="0xd8082f22" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap set adv param memcpy_s fail @local_device_manager.c(1513),ERROR" ID="0xd8082f4a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt malloc fail @local_device_manager.c(1534),ERROR" ID="0xd8082ff2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt memcpy fail @local_device_manager.c(1539),ERROR" ID="0xd808301a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt memcpy fail @local_device_manager.c(1545),ERROR" ID="0xd808304a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt malloc fail @local_device_manager.c(1567),ERROR" ID="0xd80830fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt memcpy fail @local_device_manager.c(1572),ERROR" ID="0xd8083122" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap adv set terminated cbk param error @local_device_manager.c(1587),ERROR" ID="0xd808319a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble enable cbk param error @local_device_manager.c(1598),ERROR" ID="0xd80831f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble read remote rssi cbk param error @local_device_manager.c(1609),ERROR" ID="0xd808324a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble conn param update cbk param error @local_device_manager.c(1625),ERROR" ID="0xd80832ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap conn param malloc fail @local_device_manager.c(1639),ERROR" ID="0xd808333a" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="ble conn param update cbk interval:%x, latency:%x, timeout:%x @local_device_manager.c(1646),INFO" ID="0xd8083375" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(1680),ERROR" ID="0xd8083482" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="adv id(%d) is discoverying, please stop first. @local_device_manager.c(1684),ERROR" ID="0xd80834a2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="adv param alloc fail @local_device_manager.c(1693),ERROR" ID="0xd80834ea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(1726),ERROR" ID="0xd80835f2" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="no advertising in progress or advertising for adv_id(%d). No advertising for adv_id(%d). @local_device_manager.c(1732),ERROR" ID="0xd8083622" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="mc sdk ble stop adv atb failed  @local_device_manager.c(1738),ERROR" ID="0xd8083652" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="scanning in process, please stop first. @local_device_manager.c(1772),ERROR" ID="0xd8083762" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="scanning already stopped. @local_device_manager.c(1805),ERROR" ID="0xd808386a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble stop extern scan ret: %#x @local_device_manager.c(1809),INFO" ID="0xd808388d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set phy node == NULL @local_device_manager.c(1832),ERROR" ID="0xd8083942" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set phy memcpy fail @local_device_manager.c(1837),ERROR" ID="0xd808396a" />
-                       <MSG STRUCTURE="diag_log_msg5" NAME="ble general set phy hdl:%x all:%x rx:%x tx:%x op:%x. @local_device_manager.c(1845),INFO" ID="0xd80839ad" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble set phy ret: %#x @local_device_manager.c(1848),ERROR" ID="0xd80839c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set data length node == NULL @local_device_manager.c(1869),ERROR" ID="0xd8083a6a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set data length memcpy fail @local_device_manager.c(1875),ERROR" ID="0xd8083a9a" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="ble general set len hdl:%x maxoct:%x maxtime:%x @local_device_manager.c(1882),INFO" ID="0xd8083ad5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble set len ret: %#x @local_device_manager.c(1885),ERROR" ID="0xd8083aea" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bts sert log type levle:%x @local_device_manager.c(1903),INFO" ID="0xd8083b7d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="g_bts_feature_bitmap bt_auto_reconnect_closed:%d. @local_device_manager.c(1924),ERROR" ID="0xd8083c22" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt malloc fail @local_device_manager.c(1551),ERROR" ID="0xd808307a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt memcpy fail @local_device_manager.c(1556),ERROR" ID="0xd80830a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt memcpy fail @local_device_manager.c(1562),ERROR" ID="0xd80830d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt malloc fail @local_device_manager.c(1573),ERROR" ID="0xd808312a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt memcpy fail @local_device_manager.c(1578),ERROR" ID="0xd8083152" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap adv set terminated cbk param error @local_device_manager.c(1598),ERROR" ID="0xd80831f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble enable cbk param error @local_device_manager.c(1609),ERROR" ID="0xd808324a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble read remote rssi cbk param error @local_device_manager.c(1620),ERROR" ID="0xd80832a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble conn param update cbk param error @local_device_manager.c(1636),ERROR" ID="0xd8083322" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap conn param malloc fail @local_device_manager.c(1650),ERROR" ID="0xd8083392" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="ble conn param update cbk interval:%x, latency:%x, timeout:%x @local_device_manager.c(1657),INFO" ID="0xd80833cd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(1691),ERROR" ID="0xd80834da" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="adv id(%d) is discoverying, please stop first. @local_device_manager.c(1695),ERROR" ID="0xd80834fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="adv param alloc fail @local_device_manager.c(1704),ERROR" ID="0xd8083542" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(1737),ERROR" ID="0xd808364a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="no advertising in progress or advertising for adv_id(%d). No advertising for adv_id(%d). @local_device_manager.c(1743),ERROR" ID="0xd808367a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="mc sdk ble stop adv atb failed  @local_device_manager.c(1749),ERROR" ID="0xd80836aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="scanning in process, please stop first. @local_device_manager.c(1783),ERROR" ID="0xd80837ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="scanning already stopped. @local_device_manager.c(1816),ERROR" ID="0xd80838c2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble stop extern scan ret: %#x @local_device_manager.c(1820),INFO" ID="0xd80838e5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set phy node == NULL @local_device_manager.c(1843),ERROR" ID="0xd808399a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set phy memcpy fail @local_device_manager.c(1848),ERROR" ID="0xd80839c2" />
+                       <MSG STRUCTURE="diag_log_msg5" NAME="ble general set phy hdl:%x all:%x rx:%x tx:%x op:%x. @local_device_manager.c(1856),INFO" ID="0xd8083a05" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble set phy ret: %#x @local_device_manager.c(1859),ERROR" ID="0xd8083a1a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set data length node == NULL @local_device_manager.c(1880),ERROR" ID="0xd8083ac2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set data length memcpy fail @local_device_manager.c(1886),ERROR" ID="0xd8083af2" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="ble general set len hdl:%x maxoct:%x maxtime:%x @local_device_manager.c(1893),INFO" ID="0xd8083b2d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble set len ret: %#x @local_device_manager.c(1896),ERROR" ID="0xd8083b42" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bts sert log type levle:%x @local_device_manager.c(1914),INFO" ID="0xd8083bd5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="g_bts_feature_bitmap bt_auto_reconnect_closed:%d. @local_device_manager.c(1935),ERROR" ID="0xd8083c7a" />
                        </MSG_LOG>
\ No newline at end of file
index 4087476..dd44adf 100644 (file)
@@ -6,15 +6,15 @@
                        <MSG STRUCTURE="diag_log_msg3" NAME="lv_draw_letter: glyph dsc. not found for U+%&quot; PRIX32, letter);#if LV_USE_FONT_PLACEHOLDER/* draw placeholder */lv_area_t glyphCoords;lv_draw_rect_dsc_t rectDsc;lv_coord_t beginX = pos-&gt;x + glyphDsc.ofs_x;lv_coord_t beginY = pos-&gt;y + glyphDsc.ofs_y;lv_area_set(&amp;glyphCoords, beginX, beginY, beginX + glyphDsc.box_w, beginY + glyphDsc.box_h);lv_draw_rect_dsc_init(&amp;rectDsc);rectDsc.bg_opa = LV_OPA_MIN;rectDsc.outline_opa = LV_OPA_MIN;rectDsc.shadow_opa = LV_OPA_MIN;rectDsc.bg_img_opa = LV_OPA_MIN;rectDsc.border_color = dsc-&gt;color;rectDsc.border_width = 1;drawCtx-&gt;draw_rect(drawCtx, &amp;rectDsc, &amp;glyphCoords);#endif}return;}if ((glyphDsc.box_h == 0) || (glyphDsc.box_w == 0)) {return;}#if LV_USE_DFX_CMD &amp;&amp; LV_USE_DFX_TRACEFrameTraceStart(FRAME_TRACE_HW_DRAW_LETTER);#endifRenderGlyphPath(drawCtx, dsc, pos, letter, &amp;glyphDsc);#if LV_USE_DFX_CMD &amp;&amp; LV_USE_DFX_TRACElv_area_t area = {pos-&gt;x, pos-&gt;y, letter};FrameTraceEnd(FRAME_TRACE_HW_DRAW_LETTER, &amp;area);#endif#elseLvSubmitHwDraw(true);#if LV_USE_DFX_CMD &amp;&amp; LV_USE_DFX_TRACEFrameTraceStart(FRAME_TRACE_SW_DRAW_LETTER);#endiflv_draw_sw_letter(drawCtx, dsc, pos, letter);#if LV_USE_DFX_CMD &amp;&amp; LV_USE_DFX_TRACElv_area_t area = {pos-&gt;x, pos-&gt;y, letter};FrameTraceEnd(FRAME_TRACE_SW_DRAW_LETTER, &amp;area);#endif#endif}static void LvDrawLine(struct _lv_draw_ctx_t* drawCtx, const lv_draw_line_dsc_t* dsc,const lv_point_t* point1, const lv_point_t* point2){BlitPendingImgs();LvSubmitHwDraw(true);#if LV_USE_DFX_CMD &amp;&amp; LV_USE_DFX_TRACEFrameTraceStart(FRAME_TRACE_SW_DRAW_LINE);#endiflv_draw_sw_line(drawCtx, dsc, point1, point2);#if LV_USE_DFX_CMD &amp;&amp; LV_USE_DFX_TRACElv_area_t area = {point1-&gt;x, point1-&gt;y, point2-&gt;x, point2-&gt;y};FrameTraceEnd(FRAME_TRACE_SW_DRAW_LINE, &amp;area);#endif}static void LvDrawPolygon(lv_draw_ctx_t* drawCtx, const lv_draw_rect_dsc_t* dsc,const lv_point_t* points, uint16_t pointCnt){BlitPendingImgs();LvSubmitHwDraw(true);#if LV_USE_DFX_CMD &amp;&amp; LV_USE_DFX_TRACEFrameTraceStart(FRAME_TRACE_SW_DRAW_POLYGON);#endiflv_draw_sw_polygon(drawCtx, dsc, points, pointCnt);#if LV_USE_DFX_CMD &amp;&amp; LV_USE_DFX_TRACElv_area_t area = {points-&gt;x, points-&gt;y, pointCnt, 0};FrameTraceEnd(FRAME_TRACE_SW_DRAW_POLYGON, &amp;area);#endif}static void LvDrawBufferCopy(lv_draw_ctx_t* drawCtx,void* dstBuf, lv_coord_t dstStride, const lv_area_t* dstArea,void* srcBuf, lv_coord_t srcStride, const lv_area_t* srcArea){BlitPendingImgs();LvSubmitHwDraw(true);#if LV_USE_DFX_CMD &amp;&amp; LV_USE_DFX_TRACEFrameTraceStart(FRAME_TRACE_SW_DRAW_BUFCOPY);#endiflv_draw_sw_buffer_copy(drawCtx, dstBuf, dstStride, dstArea, srcBuf, srcStride, srcArea);#if LV_USE_DFX_CMD &amp;&amp; LV_USE_DFX_TRACEFrameTraceEnd(FRAME_TRACE_SW_DRAW_BUFCOPY, dstArea);#endif}static struct _lv_draw_layer_ctx_t* LvDrawLayerCreate(struct _lv_draw_ctx_t* drawCtx,lv_draw_layer_ctx_t* layerCtx, lv_draw_layer_flags_t flags){BlitPendingImgs();LvSubmitHwDraw(true);#if LV_USE_DFX_CMD &amp;&amp; LV_USE_DFX_TRACEFrameTraceStart(FRAME_TRACE_SW_DRAW_LAYERC);#endifstruct _lv_draw_layer_ctx_t* ret = lv_draw_sw_layer_create(drawCtx, layerCtx, flags);#if LV_USE_DFX_CMD &amp;&amp; LV_USE_DFX_TRACElv_area_t area = {flags, 0, 0, 0};FrameTraceEnd(FRAME_TRACE_SW_DRAW_LAYERC, &amp;area);#endifreturn ret;}static void LvDrawLayerAdjust(struct _lv_draw_ctx_t* drawCtx, struct _lv_draw_layer_ctx_t* layerCtx,lv_draw_layer_flags_t flags){BlitPendingImgs();LvSubmitHwDraw(true);#if LV_USE_DFX_CMD &amp;&amp; LV_USE_DFX_TRACEFrameTraceStart(FRAME_TRACE_SW_DRAW_LAYERA);#endiflv_draw_sw_layer_adjust(drawCtx, layerCtx, flags);#if LV_USE_DFX_CMD &amp;&amp; LV_USE_DFX_TRACElv_area_t area = {flags, 0, 0, 0};FrameTraceEnd(FRAME_TRACE_SW_DRAW_LAYERA, &amp;area);#endif}static void LvDrawLayerBlend(struct _lv_draw_ctx_t* drawCtx, struct _lv_draw_layer_ctx_t* layerCtx,const lv_draw_img_dsc_t* dsc){BlitPendingImgs();LvSubmitHwDraw(true);#if LV_USE_DFX_CMD &amp;&amp; LV_USE_DFX_TRACEFrameTraceStart(FRAME_TRACE_SW_DRAW_LAYERB);#endiflv_draw_sw_layer_blend(drawCtx, layerCtx, dsc);#if LV_USE_DFX_CMD &amp;&amp; LV_USE_DFX_TRACElv_area_t area = {dsc-&gt;resId, 0, 0, 0};FrameTraceEnd(FRAME_TRACE_SW_DRAW_LAYERB, &amp;area);#endif}static void LvDrawLayerDestroy(lv_draw_ctx_t* drawCtx, lv_draw_layer_ctx_t* layerCtx){BlitPendingImgs();LvSubmitHwDraw(true);#if LV_USE_DFX_CMD &amp;&amp; LV_USE_DFX_TRACEFrameTraceStart(FRAME_TRACE_SW_DRAW_LAYERD);#endiflv_draw_sw_layer_destroy(drawCtx, layerCtx);#if LV_USE_DFX_CMD &amp;&amp; LV_USE_DFX_TRACEFrameTraceEnd(FRAME_TRACE_SW_DRAW_LAYERD, NULL);#endif}void LvDrawVguCtxInit(struct _lv_disp_drv_t* drv, lv_draw_ctx_t* drawCtx){if (g_vguFuncs == NULL) {LV_LOGE(&quot;[%s: %d] module is not inited. @lv_draw_vgu.c(895),ERROR" ID="0xc9481bfa" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="drawCtx is null. @lv_draw_vgu.c(964),ERROR" ID="0xc9481e22" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[%s: %d] cannot support draw layer. @lv_draw_vgu.c(969),ERROR" ID="0xc9481e4a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderBlur failed! @lv_draw_vgu.c(1000),ERROR" ID="0xc9481f42" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="unsupported color format: %u @lv_draw_vgu.c(1044),ERROR" ID="0xc94820a2" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[%s: %d] cannot support draw layer. @lv_draw_vgu.c(1113),ERROR" ID="0xc94822ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Not support mask @lv_draw_vgu.c(1120),ERROR" ID="0xc9482302" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[%s: %d] cannot support draw layer. @lv_draw_vgu.c(1232),ERROR" ID="0xc9482682" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[%s: %d] cannot support draw layer. @lv_draw_vgu.c(1305),ERROR" ID="0xc94828ca" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[%s: %d] cannot support draw layer. @lv_draw_vgu.c(1356),ERROR" ID="0xc9482a62" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[%s: %d] cannot support draw layer. @lv_draw_vgu.c(1378),ERROR" ID="0xc9482b12" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="VGUPathSetData failed. @lv_draw_vgu.c(1383),ERROR" ID="0xc9482b3a" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[%s: %d] cannot support draw layer. @lv_draw_vgu.c(1396),ERROR" ID="0xc9482ba2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderPath failed. @lv_draw_vgu.c(1421),ERROR" ID="0xc9482c6a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderBlur failed! @lv_draw_vgu.c(1006),ERROR" ID="0xc9481f72" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="unsupported color format: %u @lv_draw_vgu.c(1050),ERROR" ID="0xc94820d2" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[%s: %d] cannot support draw layer. @lv_draw_vgu.c(1119),ERROR" ID="0xc94822fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Not support mask @lv_draw_vgu.c(1126),ERROR" ID="0xc9482332" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[%s: %d] cannot support draw layer. @lv_draw_vgu.c(1238),ERROR" ID="0xc94826b2" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[%s: %d] cannot support draw layer. @lv_draw_vgu.c(1311),ERROR" ID="0xc94828fa" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[%s: %d] cannot support draw layer. @lv_draw_vgu.c(1362),ERROR" ID="0xc9482a92" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[%s: %d] cannot support draw layer. @lv_draw_vgu.c(1384),ERROR" ID="0xc9482b42" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="VGUPathSetData failed. @lv_draw_vgu.c(1389),ERROR" ID="0xc9482b6a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[%s: %d] cannot support draw layer. @lv_draw_vgu.c(1402),ERROR" ID="0xc9482bd2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderPath failed. @lv_draw_vgu.c(1435),ERROR" ID="0xc9482cda" />
                        </MSG_LOG>
\ No newline at end of file
index 5bed393..a80746c 100644 (file)
                        <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for buffer failed. @map_svg_parser.cpp(284),ERROR" ID="0xcb4e08e2" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(295),ERROR" ID="0xcb4e093a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(302),ERROR" ID="0xcb4e0972" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read map path array faild @map_svg_parser.cpp(311),ERROR" ID="0xcb4e09ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="alloc path faild @map_svg_parser.cpp(318),ERROR" ID="0xcb4e09f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read path cmd faild @map_svg_parser.cpp(324),ERROR" ID="0xcb4e0a22" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read path data faild @map_svg_parser.cpp(330),ERROR" ID="0xcb4e0a52" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(341),ERROR" ID="0xcb4e0aaa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(348),ERROR" ID="0xcb4e0ae2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map path array faild @map_svg_parser.cpp(356),ERROR" ID="0xcb4e0b22" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="alloc path faild @map_svg_parser.cpp(366),ERROR" ID="0xcb4e0b72" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s path cmd faild @map_svg_parser.cpp(371),ERROR" ID="0xcb4e0b9a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s path data faild @map_svg_parser.cpp(378),ERROR" ID="0xcb4e0bd2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(413),ERROR" ID="0xcb4e0cea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(420),ERROR" ID="0xcb4e0d22" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read map text array faild @map_svg_parser.cpp(429),ERROR" ID="0xcb4e0d6a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path cmd faild @map_svg_parser.cpp(436),ERROR" ID="0xcb4e0da2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read text faild @map_svg_parser.cpp(443),ERROR" ID="0xcb4e0dda" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc text offset faild @map_svg_parser.cpp(451),ERROR" ID="0xcb4e0e1a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read text offset faild @map_svg_parser.cpp(457),ERROR" ID="0xcb4e0e4a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(468),ERROR" ID="0xcb4e0ea2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(475),ERROR" ID="0xcb4e0eda" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(483),ERROR" ID="0xcb4e0f1a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path cmd faild @map_svg_parser.cpp(492),ERROR" ID="0xcb4e0f62" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s text faild @map_svg_parser.cpp(497),ERROR" ID="0xcb4e0f8a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc text offset faild @map_svg_parser.cpp(507),ERROR" ID="0xcb4e0fda" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s text offset faild @map_svg_parser.cpp(512),ERROR" ID="0xcb4e1002" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(546),ERROR" ID="0xcb4e1112" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(553),ERROR" ID="0xcb4e114a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read map image array faild @map_svg_parser.cpp(558),ERROR" ID="0xcb4e1172" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(566),ERROR" ID="0xcb4e11b2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(595),ERROR" ID="0xcb4e129a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(602),ERROR" ID="0xcb4e12d2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(607),ERROR" ID="0xcb4e12fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(615),ERROR" ID="0xcb4e133a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(647),ERROR" ID="0xcb4e143a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(654),ERROR" ID="0xcb4e1472" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read map road array faild @map_svg_parser.cpp(659),ERROR" ID="0xcb4e149a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(669),ERROR" ID="0xcb4e14ea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(676),ERROR" ID="0xcb4e1522" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(681),ERROR" ID="0xcb4e154a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(700),ERROR" ID="0xcb4e15e2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(707),ERROR" ID="0xcb4e161a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read map poi array faild @map_svg_parser.cpp(712),ERROR" ID="0xcb4e1642" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(722),ERROR" ID="0xcb4e1692" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(729),ERROR" ID="0xcb4e16ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(734),ERROR" ID="0xcb4e16f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read map path array faild @map_svg_parser.cpp(312),ERROR" ID="0xcb4e09c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="alloc path faild @map_svg_parser.cpp(319),ERROR" ID="0xcb4e09fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read path cmd faild @map_svg_parser.cpp(325),ERROR" ID="0xcb4e0a2a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read path data faild @map_svg_parser.cpp(331),ERROR" ID="0xcb4e0a5a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(342),ERROR" ID="0xcb4e0ab2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(349),ERROR" ID="0xcb4e0aea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map path array faild @map_svg_parser.cpp(358),ERROR" ID="0xcb4e0b32" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="alloc path faild @map_svg_parser.cpp(368),ERROR" ID="0xcb4e0b82" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s path cmd faild @map_svg_parser.cpp(373),ERROR" ID="0xcb4e0baa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s path data faild @map_svg_parser.cpp(380),ERROR" ID="0xcb4e0be2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(415),ERROR" ID="0xcb4e0cfa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(422),ERROR" ID="0xcb4e0d32" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read map text array faild @map_svg_parser.cpp(432),ERROR" ID="0xcb4e0d82" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path cmd faild @map_svg_parser.cpp(439),ERROR" ID="0xcb4e0dba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read text faild @map_svg_parser.cpp(445),ERROR" ID="0xcb4e0dea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc text offset faild @map_svg_parser.cpp(453),ERROR" ID="0xcb4e0e2a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read text offset faild @map_svg_parser.cpp(459),ERROR" ID="0xcb4e0e5a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(470),ERROR" ID="0xcb4e0eb2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(477),ERROR" ID="0xcb4e0eea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(486),ERROR" ID="0xcb4e0f32" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path cmd faild @map_svg_parser.cpp(495),ERROR" ID="0xcb4e0f7a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s text faild @map_svg_parser.cpp(499),ERROR" ID="0xcb4e0f9a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc text offset faild @map_svg_parser.cpp(509),ERROR" ID="0xcb4e0fea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s text offset faild @map_svg_parser.cpp(514),ERROR" ID="0xcb4e1012" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(548),ERROR" ID="0xcb4e1122" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(555),ERROR" ID="0xcb4e115a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read map image array faild @map_svg_parser.cpp(560),ERROR" ID="0xcb4e1182" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(568),ERROR" ID="0xcb4e11c2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(597),ERROR" ID="0xcb4e12aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(604),ERROR" ID="0xcb4e12e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(609),ERROR" ID="0xcb4e130a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(617),ERROR" ID="0xcb4e134a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(649),ERROR" ID="0xcb4e144a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(656),ERROR" ID="0xcb4e1482" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read map road array faild @map_svg_parser.cpp(661),ERROR" ID="0xcb4e14aa" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(671),ERROR" ID="0xcb4e14fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(678),ERROR" ID="0xcb4e1532" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(683),ERROR" ID="0xcb4e155a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(702),ERROR" ID="0xcb4e15f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(709),ERROR" ID="0xcb4e162a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read map poi array faild @map_svg_parser.cpp(714),ERROR" ID="0xcb4e1652" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(724),ERROR" ID="0xcb4e16a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(731),ERROR" ID="0xcb4e16da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(736),ERROR" ID="0xcb4e1702" />
                        </MSG_LOG>
\ No newline at end of file
index 4efd772..e31002f 100644 (file)
@@ -4,41 +4,39 @@
                        <MSG STRUCTURE="diag_log_msg0" NAME="[Core] ble general: mc ble conn state. @sdk_general_gap.c(239),INFO" ID="0xd86c077d" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble conn state fail. len = %u @sdk_general_gap.c(242),ERROR" ID="0xd86c0792" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble conn state memcpy fail: %d @sdk_general_gap.c(248),ERROR" ID="0xd86c07c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Core] ble general: gap general interface. @sdk_general_gap.c(259),INFO" ID="0xd86c081d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: gap general interface fail. len = %u @sdk_general_gap.c(262),ERROR" ID="0xd86c0832" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: gap general interface fail. len = %u @sdk_general_gap.c(268),ERROR" ID="0xd86c0862" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[ACore] ble general: gap ext adv report. addr_type:0x%x addr:0x%02x:**:**:**:**:%02x data_len:0x%02x @sdk_general_gap.c(273),INFO" ID="0xd86c088d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: gap adv set terminated fail. len = %u @sdk_general_gap.c(283),ERROR" ID="0xd86c08da" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: gap adv set terminated status: %u @sdk_general_gap.c(288),INFO" ID="0xd86c0905" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble smp passkey req bta fail. len = %u @sdk_general_gap.c(299),ERROR" ID="0xd86c095a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble smp passkey req bta. rmt_dev_handle = 0x%x @sdk_general_gap.c(305),INFO" ID="0xd86c098d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble smp passkey notify bta fail. len = %u @sdk_general_gap.c(319),ERROR" ID="0xd86c09fa" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[ACore] ble general: mc ble smp passkey notify bta. rmt_dev_handle = 0x%x, number = %u @sdk_general_gap.c(326),INFO" ID="0xd86c0a35" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble smp pair keys bta fail. len = %u @sdk_general_gap.c(338),ERROR" ID="0xd86c0a92" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] ble general: mc ble smp pair keys addr memcpy fail. @sdk_general_gap.c(345),ERROR" ID="0xd86c0aca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] ble general: mc ble smp pair keys memcpy fail. @sdk_general_gap.c(351),ERROR" ID="0xd86c0afa" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[ACore] ble general: mc ble smp pair keys bta. addr:%02x:**:**:**:%02x:%02x @sdk_general_gap.c(355),INFO" ID="0xd86c0b1d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble smp pair complete bta fail. len = %u @sdk_general_gap.c(366),ERROR" ID="0xd86c0b72" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[ACore] ble general: mc ble smp pair complete bta. rmt_dev_handle = 0x%x, result = 0x%x @sdk_general_gap.c(373),INFO" ID="0xd86c0bad" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble gap get apperance fail. len = %u @sdk_general_gap.c(383),ERROR" ID="0xd86c0bfa" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble gap get apperance apperance = %u @sdk_general_gap.c(388),ERROR" ID="0xd86c0c22" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[Core] ble general: mc ble gap get white list pkt_len = %d, sizeof(bth_gap_white_addr_list) = %d @sdk_general_gap.c(398),INFO" ID="0xd86c0c75" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="mc ble gap get white list: count = %d. @sdk_general_gap.c(401),INFO" ID="0xd86c0c8d" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="mc ble gap get white list addr:0x%x:**:**:**:0x%x:0x%x. @sdk_general_gap.c(405),INFO" ID="0xd86c0cad" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[ACore] ble conn general gap proc:cmdid:0x%02X pay_len:%d. @sdk_general_gap.c(427),INFO" ID="0xd86c0d5d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble conn general gap proc no handle for command id:0x%02x. @sdk_general_gap.c(442),INFO" ID="0xd86c0dd5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp pair remote device atb. @sdk_general_gap.c(521),INFO" ID="0xd86c104d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp passkey number atb. @sdk_general_gap.c(529),INFO" ID="0xd86c108d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp send passkey number did not receive passkey req. @sdk_general_gap.c(541),INFO" ID="0xd86c10ed" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp remove pair info atb. @sdk_general_gap.c(554),INFO" ID="0xd86c1155" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp remove pair device atb. @sdk_general_gap.c(566),INFO" ID="0xd86c11b5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble disc all links atb. @sdk_general_gap.c(575),INFO" ID="0xd86c11fd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp set key from btc atb. @sdk_general_gap.c(606),INFO" ID="0xd86c12f5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble remove adv by handle atb. @sdk_general_gap.c(616),INFO" ID="0xd86c1345" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble disable adv by handle atb. @sdk_general_gap.c(623),INFO" ID="0xd86c137d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[warning] uapi disconnect ble link conn_node not found disc all. @sdk_general_gap.c(746),INFO" ID="0xd86c1755" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[error] uapi disconnect ble link addr memcpy fail. @sdk_general_gap.c(752),INFO" ID="0xd86c1785" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[INFO] uapi disconnect ble link ret:%u. @sdk_general_gap.c(757),INFO" ID="0xd86c17ad" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] ble general: set ble sec param comes. @sdk_general_gap.c(769),INFO" ID="0xd86c180d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] bt at cmd set ble sec param fail, value is null! @sdk_general_gap.c(772),ERROR" ID="0xd86c1822" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: gap general interface fail. len = %u @sdk_general_gap.c(260),ERROR" ID="0xd86c0822" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: gap general interface fail. len = %u @sdk_general_gap.c(266),ERROR" ID="0xd86c0852" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: gap adv set terminated fail. len = %u @sdk_general_gap.c(279),ERROR" ID="0xd86c08ba" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: gap adv set terminated status: %u @sdk_general_gap.c(284),INFO" ID="0xd86c08e5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble smp passkey req bta fail. len = %u @sdk_general_gap.c(295),ERROR" ID="0xd86c093a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble smp passkey req bta. rmt_dev_handle = 0x%x @sdk_general_gap.c(301),INFO" ID="0xd86c096d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble smp passkey notify bta fail. len = %u @sdk_general_gap.c(315),ERROR" ID="0xd86c09da" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[ACore] ble general: mc ble smp passkey notify bta. rmt_dev_handle = 0x%x, number = %u @sdk_general_gap.c(322),INFO" ID="0xd86c0a15" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble smp pair keys bta fail. len = %u @sdk_general_gap.c(334),ERROR" ID="0xd86c0a72" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] ble general: mc ble smp pair keys addr memcpy fail. @sdk_general_gap.c(341),ERROR" ID="0xd86c0aaa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] ble general: mc ble smp pair keys memcpy fail. @sdk_general_gap.c(347),ERROR" ID="0xd86c0ada" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[ACore] ble general: mc ble smp pair keys bta. addr:%02x:**:**:**:%02x:%02x @sdk_general_gap.c(351),INFO" ID="0xd86c0afd" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble smp pair complete bta fail. len = %u @sdk_general_gap.c(362),ERROR" ID="0xd86c0b52" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[ACore] ble general: mc ble smp pair complete bta. rmt_dev_handle = 0x%x, result = 0x%x @sdk_general_gap.c(369),INFO" ID="0xd86c0b8d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble gap get apperance fail. len = %u @sdk_general_gap.c(379),ERROR" ID="0xd86c0bda" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble gap get apperance apperance = %u @sdk_general_gap.c(384),ERROR" ID="0xd86c0c02" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[Core] ble general: mc ble gap get white list pkt_len = %d, sizeof(bth_gap_white_addr_list) = %d @sdk_general_gap.c(394),INFO" ID="0xd86c0c55" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="mc ble gap get white list: count = %d. @sdk_general_gap.c(397),INFO" ID="0xd86c0c6d" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="mc ble gap get white list addr:0x%x:**:**:**:0x%x:0x%x. @sdk_general_gap.c(401),INFO" ID="0xd86c0c8d" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[ACore] ble conn general gap proc:cmdid:0x%02X pay_len:%d. @sdk_general_gap.c(423),INFO" ID="0xd86c0d3d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble conn general gap proc no handle for command id:0x%02x. @sdk_general_gap.c(438),INFO" ID="0xd86c0db5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp pair remote device atb. @sdk_general_gap.c(517),INFO" ID="0xd86c102d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp passkey number atb. @sdk_general_gap.c(525),INFO" ID="0xd86c106d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp send passkey number did not receive passkey req. @sdk_general_gap.c(537),INFO" ID="0xd86c10cd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp remove pair info atb. @sdk_general_gap.c(550),INFO" ID="0xd86c1135" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp remove pair device atb. @sdk_general_gap.c(562),INFO" ID="0xd86c1195" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble disc all links atb. @sdk_general_gap.c(571),INFO" ID="0xd86c11dd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp set key from btc atb. @sdk_general_gap.c(602),INFO" ID="0xd86c12d5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble remove adv by handle atb. @sdk_general_gap.c(612),INFO" ID="0xd86c1325" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble disable adv by handle atb. @sdk_general_gap.c(619),INFO" ID="0xd86c135d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[warning] uapi disconnect ble link conn_node not found disc all. @sdk_general_gap.c(742),INFO" ID="0xd86c1735" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[error] uapi disconnect ble link addr memcpy fail. @sdk_general_gap.c(748),INFO" ID="0xd86c1765" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[INFO] uapi disconnect ble link ret:%u. @sdk_general_gap.c(753),INFO" ID="0xd86c178d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] ble general: set ble sec param comes. @sdk_general_gap.c(765),INFO" ID="0xd86c17ed" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] bt at cmd set ble sec param fail, value is null! @sdk_general_gap.c(768),ERROR" ID="0xd86c1802" />
                        </MSG_LOG>
\ No newline at end of file
index 8666eca..bc7f62c 100644 (file)
@@ -1,58 +1,58 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="osal_sem_init error %x @spp_service.c(86),ERROR" ID="0xd82a02b2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="osal_sem_down error %x @spp_service.c(110),ERROR" ID="0xd82a0372" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="client num reached max limit @spp_service.c(134),ERROR" ID="0xd82a0432" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="client malloc fail @spp_service.c(140),ERROR" ID="0xd82a0462" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="uuid memcpy fail @spp_service.c(147),ERROR" ID="0xd82a049a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="spp client %x add success @spp_service.c(158),INFO" ID="0xd82a04f5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="uuid=%s @spp_service.c(182),INFO" ID="0xd82a05b5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="client_id invalid @spp_service.c(237),ERROR" ID="0xd82a076a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="sleep too long. %d ms. @spp_service.c(250),WARNING" ID="0xd82a07d3" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="spp client %x delete success @spp_service.c(256),INFO" ID="0xd82a0805" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="add client fail @spp_service.c(265),ERROR" ID="0xd82a084a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="spp server %x add success @spp_service.c(295),INFO" ID="0xd82a093d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="spp server %x add fail @spp_service.c(298),ERROR" ID="0xd82a0952" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="sleep too long. %d ms. @spp_service.c(339),WARNING" ID="0xd82a0a9b" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="unregister spp service ret: %x @spp_service.c(346),WARNING" ID="0xd82a0ad3" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="spp server %x delete success @spp_service.c(357),INFO" ID="0xd82a0b2d" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="spp connect connHdl: %x devHdl: %x svcHdl: %x @spp_service.c(362),INFO" ID="0xd82a0b55" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="server not exist @spp_service.c(368),WARNING" ID="0xd82a0b83" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="client not exist @spp_service.c(375),WARNING" ID="0xd82a0bbb" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="spp disconnect connHdl: %x @spp_service.c(396),INFO" ID="0xd82a0c65" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="client not exist @spp_service.c(400),WARNING" ID="0xd82a0c83" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="server %x disconnected @spp_service.c(412),INFO" ID="0xd82a0ce5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="unhandled msg id %x @spp_service.c(437),WARNING" ID="0xd82a0dab" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="params socket_para invalid. @spp_service.c(445),ERROR" ID="0xd82a0dea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="uuid invalid @spp_service.c(450),ERROR" ID="0xd82a0e12" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="params name len invalid. @spp_service.c(456),ERROR" ID="0xd82a0e42" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="exist same uuid client @spp_service.c(463),ERROR" ID="0xd82a0e7a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="add server fail @spp_service.c(469),ERROR" ID="0xd82a0eaa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="btsdk_register_spp_service fail @spp_service.c(485),WARNING" ID="0xd82a0f2b" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="server %x create success. svc_hdl: %x @spp_service.c(489),INFO" ID="0xd82a0f4d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="server id %d invalid @spp_service.c(498),ERROR" ID="0xd82a0f92" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="server not exist. server id %d @spp_service.c(505),ERROR" ID="0xd82a0fca" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="server is already waiting to accept. server id %d @spp_service.c(510),ERROR" ID="0xd82a0ff2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="client not exist. server id %d @spp_service.c(522),ERROR" ID="0xd82a1052" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="server waiting for accept timeout. server id %d @spp_service.c(536),ERROR" ID="0xd82a10c2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="server not exist. server id %d @spp_service.c(553),ERROR" ID="0xd82a114a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="BTSDK_DisconnectConnection fail retCode: %x @spp_service.c(563),ERROR" ID="0xd82a119a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="access_cnt=%d @spp_service.c(569),INFO" ID="0xd82a11cd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="socket_type invalid @spp_service.c(581),ERROR" ID="0xd82a122a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="uuid invalid @spp_service.c(586),ERROR" ID="0xd82a1252" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="acl not connected @spp_service.c(591),ERROR" ID="0xd82a127a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="dev_hdl invalid @spp_service.c(597),ERROR" ID="0xd82a12aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="add client fail @spp_service.c(611),INFO" ID="0xd82a131d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="connect spp fail. ret: %x @spp_service.c(620),INFO" ID="0xd82a1365" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="BTSDK_DisconnectConnection fail retCode: %x @spp_service.c(645),ERROR" ID="0xd82a142a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="spp read data failed @spp_service.c(731),ERROR" ID="0xd82a16da" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="client is null. client id %d @spp_service.c(755),ERROR" ID="0xd82a179a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="client not connected. client id %d @spp_service.c(759),ERROR" ID="0xd82a17ba" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="connHdl: %x dataLen: %d writeRet: %d writeLen: %d @spp_service.c(774),WARNING" ID="0xd82a1833" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="hdl 0x%x not exist @spp_service.c(788),WARNING" ID="0xd82a18a3" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="no recieve function registered @spp_service.c(795),INFO" ID="0xd82a18dd" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="hdl 0x%x not exist @spp_service.c(810),WARNING" ID="0xd82a1953" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="no match client id for hdl 0x%x, try %d times @spp_service.c(814),INFO" ID="0xd82a1975" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="BTSDK_SPP_EVT_CONNECTED hdl=0x%x @spp_service.c(830),INFO" ID="0xd82a19f5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="BTSDK_SPP_EVT_DISCONNECTED hdl=0x%x @spp_service.c(834),INFO" ID="0xd82a1a15" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="BTSDK_SPP_EVT_FC_ON hdl=0x%x @spp_service.c(841),INFO" ID="0xd82a1a4d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="unknown msg hdl=0x%x @spp_service.c(844),WARNING" ID="0xd82a1a63" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="osal_sem_init error %x @spp_service.c(89),ERROR" ID="0xd82a02ca" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="osal_sem_down error %x @spp_service.c(113),ERROR" ID="0xd82a038a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="client num reached max limit @spp_service.c(137),ERROR" ID="0xd82a044a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="client malloc fail @spp_service.c(143),ERROR" ID="0xd82a047a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="uuid memcpy fail @spp_service.c(150),ERROR" ID="0xd82a04b2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="spp client %x add success @spp_service.c(161),INFO" ID="0xd82a050d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="uuid=%s @spp_service.c(185),INFO" ID="0xd82a05cd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="client_id invalid @spp_service.c(240),ERROR" ID="0xd82a0782" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="sleep too long. %d ms. @spp_service.c(253),WARNING" ID="0xd82a07eb" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="spp client %x delete success @spp_service.c(259),INFO" ID="0xd82a081d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="add client fail @spp_service.c(268),ERROR" ID="0xd82a0862" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="spp server %x add success @spp_service.c(298),INFO" ID="0xd82a0955" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="spp server %x add fail @spp_service.c(301),ERROR" ID="0xd82a096a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="sleep too long. %d ms. @spp_service.c(342),WARNING" ID="0xd82a0ab3" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="unregister spp service ret: %x @spp_service.c(349),WARNING" ID="0xd82a0aeb" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="spp server %x delete success @spp_service.c(360),INFO" ID="0xd82a0b45" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="spp connect connHdl: %x devHdl: %x svcHdl: %x @spp_service.c(365),INFO" ID="0xd82a0b6d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="server not exist @spp_service.c(371),WARNING" ID="0xd82a0b9b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="client not exist @spp_service.c(378),WARNING" ID="0xd82a0bd3" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="spp disconnect connHdl: %x @spp_service.c(399),INFO" ID="0xd82a0c7d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="client not exist @spp_service.c(403),WARNING" ID="0xd82a0c9b" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="server %x disconnected @spp_service.c(415),INFO" ID="0xd82a0cfd" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="unhandled msg id %x @spp_service.c(440),WARNING" ID="0xd82a0dc3" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="params socket_para invalid. @spp_service.c(448),ERROR" ID="0xd82a0e02" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="uuid invalid @spp_service.c(453),ERROR" ID="0xd82a0e2a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="params name len invalid. @spp_service.c(459),ERROR" ID="0xd82a0e5a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="exist same uuid client @spp_service.c(466),ERROR" ID="0xd82a0e92" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="add server fail @spp_service.c(472),ERROR" ID="0xd82a0ec2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="btsdk_register_spp_service fail @spp_service.c(488),WARNING" ID="0xd82a0f43" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="server %x create success. svc_hdl: %x @spp_service.c(492),INFO" ID="0xd82a0f65" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="server id %d invalid @spp_service.c(501),ERROR" ID="0xd82a0faa" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="server not exist. server id %d @spp_service.c(508),ERROR" ID="0xd82a0fe2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="server is already waiting to accept. server id %d @spp_service.c(513),ERROR" ID="0xd82a100a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="client not exist. server id %d @spp_service.c(525),ERROR" ID="0xd82a106a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="server waiting for accept timeout. server id %d @spp_service.c(539),ERROR" ID="0xd82a10da" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="server not exist. server id %d @spp_service.c(556),ERROR" ID="0xd82a1162" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="BTSDK_DisconnectConnection fail retCode: %x @spp_service.c(566),ERROR" ID="0xd82a11b2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="access_cnt=%d @spp_service.c(572),INFO" ID="0xd82a11e5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="socket_type invalid @spp_service.c(584),ERROR" ID="0xd82a1242" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="uuid invalid @spp_service.c(589),ERROR" ID="0xd82a126a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="acl not connected @spp_service.c(594),ERROR" ID="0xd82a1292" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="dev_hdl invalid @spp_service.c(600),ERROR" ID="0xd82a12c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="add client fail @spp_service.c(614),INFO" ID="0xd82a1335" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="connect spp fail. ret: %x @spp_service.c(623),INFO" ID="0xd82a137d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="BTSDK_DisconnectConnection fail retCode: %x @spp_service.c(648),ERROR" ID="0xd82a1442" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="spp read data failed @spp_service.c(734),ERROR" ID="0xd82a16f2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="client is null. client id %d @spp_service.c(759),ERROR" ID="0xd82a17ba" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="client not connected. client id %d @spp_service.c(763),ERROR" ID="0xd82a17da" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="connHdl: %x dataLen: %d writeRet: %d writeLen: %d @spp_service.c(778),WARNING" ID="0xd82a1853" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="hdl 0x%x not exist @spp_service.c(801),WARNING" ID="0xd82a190b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="no recieve function registered @spp_service.c(808),INFO" ID="0xd82a1945" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="hdl 0x%x not exist @spp_service.c(823),WARNING" ID="0xd82a19bb" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="no match client id for hdl 0x%x, try %d times @spp_service.c(827),INFO" ID="0xd82a19dd" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="BTSDK_SPP_EVT_CONNECTED hdl=0x%x @spp_service.c(843),INFO" ID="0xd82a1a5d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="BTSDK_SPP_EVT_DISCONNECTED hdl=0x%x @spp_service.c(847),INFO" ID="0xd82a1a7d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="BTSDK_SPP_EVT_FC_ON hdl=0x%x @spp_service.c(854),INFO" ID="0xd82a1ab5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="unknown msg hdl=0x%x @spp_service.c(857),WARNING" ID="0xd82a1acb" />
                        </MSG_LOG>
\ No newline at end of file
index 673f2b3..f99e427 100644 (file)
@@ -1,5 +1,5 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="the fontName %s no register, use default font @text_ext.cpp(74),ERROR" ID="0xcae20252" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc buffer for utf16Text failed. @text_ext.cpp(109),ERROR" ID="0xcae2036a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="text_ is nullptr. @text_ext.cpp(133),ERROR" ID="0xcae2042a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc for shapingLineText failed. @text_ext.cpp(256),ERROR" ID="0xcae20802" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="the fontName %s no register, use default font @text_ext.cpp(82),ERROR" ID="0xcae20292" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc buffer for utf16Text failed. @text_ext.cpp(117),ERROR" ID="0xcae203aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="text_ is nullptr. @text_ext.cpp(141),ERROR" ID="0xcae2046a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc for shapingLineText failed. @text_ext.cpp(264),ERROR" ID="0xcae20842" />
                        </MSG_LOG>
\ No newline at end of file
index 36adcae..3cb0994 100644 (file)
@@ -1,33 +1,33 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="memcpy tempPaint error! @ui_canvas_ext.cpp(51),ERROR" ID="0xcaea019a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc for stops failed. Gradient will be inactive. @ui_canvas_ext.cpp(54),WARNING" ID="0xcaea01b3" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Already beginned a path without setting path data. @ui_canvas_ext.cpp(63),ERROR" ID="0xcaea01fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Previous path has been initialized but has not called DrawPath. @ui_canvas_ext.cpp(67),ERROR" ID="0xcaea021a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="cmd or data is nullptr. @ui_canvas_ext.cpp(81),ERROR" ID="0xcaea028a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Need to call BeginPath prior to calling this method. @ui_canvas_ext.cpp(85),ERROR" ID="0xcaea02aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="path is nullptr @ui_canvas_ext.cpp(90),ERROR" ID="0xcaea02d2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Path data has been set. Can only set once. @ui_canvas_ext.cpp(94),ERROR" ID="0xcaea02f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for data failed. @ui_canvas_ext.cpp(103),ERROR" ID="0xcaea033a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy for cmds failed. @ui_canvas_ext.cpp(110),ERROR" ID="0xcaea0372" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for data failed. @ui_canvas_ext.cpp(121),ERROR" ID="0xcaea03ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy for data failed. @ui_canvas_ext.cpp(130),ERROR" ID="0xcaea0412" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="can only set matrix after beginning any path. @ui_canvas_ext.cpp(144),ERROR" ID="0xcaea0482" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Index out of range. @ui_canvas_ext.cpp(152),ERROR" ID="0xcaea04c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="HandleStyleAndPattern failed. UpdateImageInfoIfNecessary failed. @ui_canvas_ext.cpp(273),ERROR" ID="0xcaea088a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Image is invalid! @ui_canvas_ext.cpp(339),ERROR" ID="0xcaea0a9a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="path or paint or matrix is nullptr. @ui_canvas_ext.cpp(389),ERROR" ID="0xcaea0c2a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for cmd failed. @ui_canvas_ext.cpp(454),ERROR" ID="0xcaea0e32" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for cmd failed. @ui_canvas_ext.cpp(491),ERROR" ID="0xcaea0f5a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for cmd failed. @ui_canvas_ext.cpp(525),ERROR" ID="0xcaea106a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Sector is not supported currently @ui_canvas_ext.cpp(541),WARNING" ID="0xcaea10eb" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="startAngle and endAngle can not be smaller than 0. @ui_canvas_ext.cpp(549),ERROR" ID="0xcaea112a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="endAngle should not be equal to startAngle @ui_canvas_ext.cpp(553),ERROR" ID="0xcaea114a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="realpath fail:  %s @ui_canvas_ext.cpp(594),ERROR" ID="0xcaea1292" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="new svgdata obj failed @ui_canvas_ext.cpp(606),ERROR" ID="0xcaea12f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="OverlayOpacity Failed!!! @ui_canvas_ext.cpp(631),ERROR" ID="0xcaea13ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="can only set matrix after beginning any path. @ui_canvas_ext.cpp(718),ERROR" ID="0xcaea1672" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="index error @ui_canvas_ext.cpp(722),ERROR" ID="0xcaea1692" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read data fail. @ui_canvas_ext.cpp(785),ERROR" ID="0xcaea188a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc path fail. @ui_canvas_ext.cpp(803),ERROR" ID="0xcaea191a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc path fail. @ui_canvas_ext.cpp(808),ERROR" ID="0xcaea1942" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="open %s fail @ui_canvas_ext.cpp(824),ERROR" ID="0xcaea19c2" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="memcpy tempPaint error! @ui_canvas_ext.cpp(52),ERROR" ID="0xcaea01a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc for stops failed. Gradient will be inactive. @ui_canvas_ext.cpp(55),WARNING" ID="0xcaea01bb" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Already beginned a path without setting path data. @ui_canvas_ext.cpp(64),ERROR" ID="0xcaea0202" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Previous path has been initialized but has not called DrawPath. @ui_canvas_ext.cpp(68),ERROR" ID="0xcaea0222" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="cmd or data is nullptr. @ui_canvas_ext.cpp(82),ERROR" ID="0xcaea0292" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Need to call BeginPath prior to calling this method. @ui_canvas_ext.cpp(86),ERROR" ID="0xcaea02b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="path is nullptr @ui_canvas_ext.cpp(91),ERROR" ID="0xcaea02da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Path data has been set. Can only set once. @ui_canvas_ext.cpp(95),ERROR" ID="0xcaea02fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for data failed. @ui_canvas_ext.cpp(104),ERROR" ID="0xcaea0342" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy for cmds failed. @ui_canvas_ext.cpp(111),ERROR" ID="0xcaea037a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for data failed. @ui_canvas_ext.cpp(122),ERROR" ID="0xcaea03d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy for data failed. @ui_canvas_ext.cpp(131),ERROR" ID="0xcaea041a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="can only set matrix after beginning any path. @ui_canvas_ext.cpp(145),ERROR" ID="0xcaea048a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Index out of range. @ui_canvas_ext.cpp(153),ERROR" ID="0xcaea04ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="HandleStyleAndPattern failed. UpdateImageInfoIfNecessary failed. @ui_canvas_ext.cpp(274),ERROR" ID="0xcaea0892" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Image is invalid! @ui_canvas_ext.cpp(340),ERROR" ID="0xcaea0aa2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="path or paint or matrix is nullptr. @ui_canvas_ext.cpp(390),ERROR" ID="0xcaea0c32" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for cmd failed. @ui_canvas_ext.cpp(455),ERROR" ID="0xcaea0e3a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for cmd failed. @ui_canvas_ext.cpp(492),ERROR" ID="0xcaea0f62" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for cmd failed. @ui_canvas_ext.cpp(526),ERROR" ID="0xcaea1072" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Sector is not supported currently @ui_canvas_ext.cpp(542),WARNING" ID="0xcaea10f3" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="startAngle and endAngle can not be smaller than 0. @ui_canvas_ext.cpp(550),ERROR" ID="0xcaea1132" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="endAngle should not be equal to startAngle @ui_canvas_ext.cpp(554),ERROR" ID="0xcaea1152" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="realpath fail:  %s @ui_canvas_ext.cpp(595),ERROR" ID="0xcaea129a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="new svgdata obj failed @ui_canvas_ext.cpp(607),ERROR" ID="0xcaea12fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="OverlayOpacity Failed!!! @ui_canvas_ext.cpp(632),ERROR" ID="0xcaea13c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="can only set matrix after beginning any path. @ui_canvas_ext.cpp(719),ERROR" ID="0xcaea167a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="index error @ui_canvas_ext.cpp(723),ERROR" ID="0xcaea169a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read data fail. @ui_canvas_ext.cpp(786),ERROR" ID="0xcaea1892" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc path fail. @ui_canvas_ext.cpp(804),ERROR" ID="0xcaea1922" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc path fail. @ui_canvas_ext.cpp(809),ERROR" ID="0xcaea194a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="open %s fail @ui_canvas_ext.cpp(825),ERROR" ID="0xcaea19ca" />
                        </MSG_LOG>
\ No newline at end of file
index 531cd1b..0c209cd 100644 (file)
@@ -2,7 +2,7 @@
                        <MSG STRUCTURE="diag_log_msg0" NAME="add failed, the view type is not support, only suppot UITransformGroup. @ui_coverflow_view2.cpp(58),ERROR" ID="0xcb4401d2" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="insert failed, view is nullptr @ui_coverflow_view2.cpp(76),ERROR" ID="0xcb440262" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="add failed, the view type is not support, only suppot UITransformGroup. @ui_coverflow_view2.cpp(81),ERROR" ID="0xcb44028a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="remove failed, view is nullptr @ui_coverflow_view2.cpp(99),ERROR" ID="0xcb44031a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="remove failed, the view type is not support, only suppot UITransformGroup. @ui_coverflow_view2.cpp(104),ERROR" ID="0xcb440342" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="remove failed, view parent is nullptr @ui_coverflow_view2.cpp(110),ERROR" ID="0xcb440372" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="remove failed, view is nullptr @ui_coverflow_view2.cpp(104),ERROR" ID="0xcb440342" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="remove failed, the view type is not support, only suppot UITransformGroup. @ui_coverflow_view2.cpp(109),ERROR" ID="0xcb44036a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="remove failed, view parent is nullptr @ui_coverflow_view2.cpp(115),ERROR" ID="0xcb44039a" />
                        </MSG_LOG>
\ No newline at end of file
index 781eaee..59e58c8 100644 (file)
@@ -1,4 +1,5 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="GetSpace AllocBuffer failed. @ui_font_hw_cache.cpp(52),ERROR" ID="0xcb1201a2" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="unicode %u was not found in font %u @ui_font_hw_cache.cpp(68),ERROR" ID="0xcb120222" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="unicode %u was not found in font %u @ui_font_hw_cache.cpp(96),ERROR" ID="0xcb120302" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="Nothing in font cache can be freed! @ui_font_hw_cache.cpp(45),ERROR" ID="0xcb12016a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="unicode %u was not found in font %u @ui_font_hw_cache.cpp(55),ERROR" ID="0xcb1201ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="GetSpace AllocBuffer failed. @ui_font_hw_cache.cpp(69),ERROR" ID="0xcb12022a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="unicode %u was not found in font %u @ui_font_hw_cache.cpp(97),ERROR" ID="0xcb12030a" />
                        </MSG_LOG>
\ No newline at end of file
index 3970f50..f24c47f 100644 (file)
@@ -1,3 +1,3 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="memcpy cmd data failed @ui_font_hw_vector.cpp(267),ERROR" ID="0xcb14085a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy path data failed @ui_font_hw_vector.cpp(270),ERROR" ID="0xcb140872" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="memcpy cmd data failed @ui_font_hw_vector.cpp(276),ERROR" ID="0xcb1408a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy path data failed @ui_font_hw_vector.cpp(279),ERROR" ID="0xcb1408ba" />
                        </MSG_LOG>
\ No newline at end of file
index ff2fbb7..7c90cac 100644 (file)
@@ -1,6 +1,7 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="can not add view which is not image view @ui_hexagons_list.cpp(65),ERROR" ID="0xcb34020a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="can not add view which is not image view @ui_hexagons_list.cpp(89),ERROR" ID="0xcb3402ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="don't support scale when rebound mode is normal @ui_hexagons_list.cpp(219),ERROR" ID="0xcb3406da" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="scale value %f is invalid @ui_hexagons_list.cpp(224),ERROR" ID="0xcb340702" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="parameter is not valid, distance_:%u size:%d @ui_hexagons_list.cpp(614),ERROR" ID="0xcb341332" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="Can not add view other than UIImageView or UITransfromGroup. @ui_hexagons_list.cpp(73),ERROR" ID="0xcb34024a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="insertView is nullptr! @ui_hexagons_list.cpp(92),ERROR" ID="0xcb3402e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Can not insert view other than UIImageView or UITransfromGroup. @ui_hexagons_list.cpp(105),ERROR" ID="0xcb34034a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="don't support scale when rebound mode is normal @ui_hexagons_list.cpp(230),ERROR" ID="0xcb340732" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="scale value %f is invalid @ui_hexagons_list.cpp(235),ERROR" ID="0xcb34075a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="parameter is not valid, distance_:%u size:%d @ui_hexagons_list.cpp(632),ERROR" ID="0xcb3413c2" />
                        </MSG_LOG>
\ No newline at end of file
index 0033c8c..706b972 100644 (file)
@@ -1,12 +1,13 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="RollerItemInfo is nullptr! @ui_roller_view.cpp(180),ERROR" ID="0xcb4805a2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Already add an item with the same name. Remove it before adding this. @ui_roller_view.cpp(224),ERROR" ID="0xcb480702" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="name is empty! @ui_roller_view.cpp(267),ERROR" ID="0xcb48085a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Should remove an item in DISPLAY mode @ui_roller_view.cpp(272),ERROR" ID="0xcb480882" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="RollerItemInfo is null! @ui_roller_view.cpp(453),ERROR" ID="0xcb480e2a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Cannot set align item when mode is about to change. @ui_roller_view.cpp(506),ERROR" ID="0xcb480fd2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Should SetCurrentItem in DISPLAY mode. @ui_roller_view.cpp(510),ERROR" ID="0xcb480ff2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="Cannot find an item with name: %s @ui_roller_view.cpp(525),ERROR" ID="0xcb48106a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Cannot set mode when AlignAnim is running @ui_roller_view.cpp(620),ERROR" ID="0xcb481362" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="mode is already set. @ui_roller_view.cpp(625),ERROR" ID="0xcb48138a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Cannot Set mode during transition or cannot set TRANSITION mode. @ui_roller_view.cpp(630),ERROR" ID="0xcb4813b2" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="width and height can not set 0 @ui_roller_view.cpp(146),ERROR" ID="0xcb480492" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="RollerItemInfo is nullptr! @ui_roller_view.cpp(193),ERROR" ID="0xcb48060a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Already add an item with the same name. Remove it before adding this. @ui_roller_view.cpp(237),ERROR" ID="0xcb48076a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="name is empty! @ui_roller_view.cpp(280),ERROR" ID="0xcb4808c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Should remove an item in DISPLAY mode @ui_roller_view.cpp(285),ERROR" ID="0xcb4808ea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="RollerItemInfo is null! @ui_roller_view.cpp(466),ERROR" ID="0xcb480e92" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Cannot set align item when mode is about to change. @ui_roller_view.cpp(519),ERROR" ID="0xcb48103a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Should SetCurrentItem in DISPLAY mode. @ui_roller_view.cpp(523),ERROR" ID="0xcb48105a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="Cannot find an item with name: %s @ui_roller_view.cpp(538),ERROR" ID="0xcb4810d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Cannot set mode when AlignAnim is running @ui_roller_view.cpp(633),ERROR" ID="0xcb4813ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="mode is already set. @ui_roller_view.cpp(638),ERROR" ID="0xcb4813f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Cannot Set mode during transition or cannot set TRANSITION mode. @ui_roller_view.cpp(643),ERROR" ID="0xcb48141a" />
                        </MSG_LOG>
\ No newline at end of file
index ea98aa0..2f9847d 100644 (file)
@@ -1,5 +1,6 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="can not add view which is not image view @ui_waterfall_list.cpp(47),ERROR" ID="0xcb3a017a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="can not add view which is not image view @ui_waterfall_list.cpp(71),ERROR" ID="0xcb3a023a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="scale value %f is invalid @ui_waterfall_list.cpp(260),ERROR" ID="0xcb3a0822" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="parameter is not valid, distance_:%u size:%d @ui_waterfall_list.cpp(411),ERROR" ID="0xcb3a0cda" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="Can not add view other than UIImageView or UITransfromGroup. @ui_waterfall_list.cpp(55),ERROR" ID="0xcb3a01ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="insertView is nullptr! @ui_waterfall_list.cpp(74),ERROR" ID="0xcb3a0252" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Can not insert view other than UIImageView or UITransfromGroup. @ui_waterfall_list.cpp(87),ERROR" ID="0xcb3a02ba" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="scale value %f is invalid @ui_waterfall_list.cpp(271),ERROR" ID="0xcb3a087a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="parameter is not valid, distance_:%u size:%d @ui_waterfall_list.cpp(430),ERROR" ID="0xcb3a0d72" />
                        </MSG_LOG>
\ No newline at end of file
index 01a4a5d..7026169 100644 (file)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/ble/libbt_host_brandy_service.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/ble/libbt_host_brandy_service.a differ
index 7431d8d..bffbace 100644 (file)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/ble/libbt_host_sdk.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/ble/libbt_host_sdk.a differ
index f776f74..a0d6c72 100644 (file)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/br/libbt_host_audio_manager_wrapper.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/br/libbt_host_audio_manager_wrapper.a differ
index b52dba1..f8a9408 100644 (file)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/br/libbt_host_brandy_service.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/br/libbt_host_brandy_service.a differ
index ac5d475..dad262a 100644 (file)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/br/libbt_host_sdk.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/br/libbt_host_sdk.a differ
index ccbd601..053da16 100644 (file)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/ble/libbt_host_brandy_service.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/ble/libbt_host_brandy_service.a differ
index 7a1c780..e9bac2a 100644 (file)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/ble/libbt_host_sdk.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/ble/libbt_host_sdk.a differ
index 8b569b6..8625c77 100644 (file)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_audio_manager_wrapper.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_audio_manager_wrapper.a differ
index 9a9308f..88e109a 100644 (file)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_brandy_service.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_brandy_service.a differ
index 5168795..09e5b4a 100644 (file)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_sdk.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_sdk.a differ
index f08233b..eca5d67 100644 (file)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/mini/ble/libbt_host_brandy_service.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/mini/ble/libbt_host_brandy_service.a differ
index 4c2d713..86c785a 100644 (file)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/mini/ble/libbt_host_sdk.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/mini/ble/libbt_host_sdk.a differ
index 1148190..443c14a 100644 (file)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/mini/br/libbt_host_audio_manager_wrapper.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/mini/br/libbt_host_audio_manager_wrapper.a differ
index b78256b..93bc0f2 100644 (file)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/mini/br/libbt_host_brandy_service.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/mini/br/libbt_host_brandy_service.a differ
index 5f08962..f6eae9b 100644 (file)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/mini/br/libbt_host_sdk.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/mini/br/libbt_host_sdk.a differ
index 245ab42..0087bde 100644 (file)
@@ -28,6 +28,12 @@ set(PRIVATE_HEADER
     ${ROOT_DIR}/middleware/utils/dfx/diag_dfx_cmd/last_dump/include
     ${ROOT_DIR}/middleware/utils/dfx/diag_dfx_cmd/sample_data/dfx_include
     ${ROOT_DIR}/middleware/utils/dfx/diag_dfx_cmd/sample_data/include
+    ${ROOT_DIR}/middleware/utils/dfx/diag_dfx_cmd/diag_update/include
+    ${ROOT_DIR}/middleware/utils/dfx/diag_dfx_cmd/diag_nv/include
+    ${ROOT_DIR}/middleware/utils/dfx/diag_dfx_cmd/diag_audio_dump/include
+    ${ROOT_DIR}/middleware/utils/dfx/diag_dfx_cmd/diag_audio_probe/include
+    ${ROOT_DIR}/middleware/utils/dfx/diag_dfx_cmd/diag_audio_proc/include
+    ${ROOT_DIR}/middleware/utils/dfx/diag_dfx_cmd/diag_gpu_proc/include
     ${ROOT_DIR}/include/middleware/services/bts
     ${ROOT_DIR}/include/middleware/services/bts/ble
     ${ROOT_DIR}/include/middleware/services/bts/br
index 88f45f0..b95b745 100644 (file)
@@ -87,6 +87,8 @@ typedef enum {
     CALLERLOGPRESENTER_CPP,
     CALLERLOGVIEW_CPP,
     MAINCLOCKVIEW_CPP,
+    AMBIENTCLOCKVIEW_CPP,
+    AODVIEW_CPP,
     COMPASSCALIBRATIONVIEW_CPP,
     COMPASSCONTROLVIEW_CPP,
     COMPASSPRESENTER_CPP,
index e1f6194..04b0d18 100644 (file)
@@ -31,6 +31,9 @@
 #define PM_SLEEP_SEL_EVENT            0x777
 #define PM_SLEEP_TRACE_DEF_VAL        0x5a5a
 #define PM_OS_US_TO_MS                  1000
+#define PM_RTC_LOAD_COUNT_REG       0x57024000
+#define PM_RTC_CUR_ALERT_US         64000000
+#define PM_RTC_LOAD_THRESHOLD_MS   (CLOCK_32K_CALI_FREQ / 50)
 
 enum {
     PM_SLEEP_STATE_IDLE,
@@ -287,6 +290,7 @@ void pm_enter_sleep(uint32_t sleep_ms_val)
     uint32_t status;
     uint32_t sleep_ms = sleep_ms_val;
     uint32_t rtc_times = 0;
+    uint32_t rtc_times_alert = 0;
     if ((g_pm_mcu_dynamic_power_flag == 1) || hal_ipc_get_core_clr_sts(CORES_BT_CORE)) {
         return;
     }
@@ -294,6 +298,10 @@ void pm_enter_sleep(uint32_t sleep_ms_val)
         return;
     }
     uapi_rtc_get_current_time_us(0, &rtc_times);
+    if (rtc_times > PM_RTC_CUR_ALERT_US) {
+        rtc_times_alert = rtc_times;
+        rtc_times = rtc_porting_cycle_2_us(readl(PM_RTC_LOAD_COUNT_REG));
+    }
     if (rtc_times < PM_OS_US_TO_MS && rtc_times > 0) {
         return;
     }
@@ -315,7 +323,8 @@ void pm_enter_sleep(uint32_t sleep_ms_val)
 
     pm_enter_deepsleep_set_flag();
     status = pm_os_irq_lock();
-    if ((sleep_ms <= g_pm_sleep_threshold) || pm_get_sleep_veto() || hal_rtc_get_int_status(0) == 1) {
+    if ((sleep_ms <= g_pm_sleep_threshold) || pm_get_sleep_veto() || hal_rtc_get_int_status(0) == 1 ||
+        ((readl(PM_RTC_LOAD_COUNT_REG) < PM_RTC_LOAD_THRESHOLD_MS) && (rtc_times_alert > PM_RTC_CUR_ALERT_US))) {
         pm_enter_deepsleep_cancel_flag();
         pm_enter_light_sleep();
     } else {
index 0a40c9f..f5ebd3a 100644 (file)
@@ -63,10 +63,14 @@ static void pm_tickless_compensate_os_ticks(uint32_t ticks)
     g_exit_sleep_time = pm_core_get_count(); // freq:32768
     uint64_t sleep_time = ((g_exit_sleep_time - g_entry_sleep_time) * PM_OS_TICKS_PER_S) + g_32k_time_calibrate;
     uint32_t actual_sleep_time = (uint32_t)(sleep_time / CLOCK_32K_CALI_FREQ);
-    g_32k_time_calibrate = actual_sleep_time & 0x7FFF;
+    g_32k_time_calibrate = actual_sleep_time % CLOCK_32K_CALI_FREQ;
 
     if (actual_sleep_time > ticks) {
+#ifdef __FREERTOS__
         pm_os_compensate_sleep_ticks(ticks);
+#else
+        pm_os_compensate_sleep_ticks(actual_sleep_time);
+#endif
     } else {
         pm_os_compensate_sleep_ticks(actual_sleep_time);
     }
index 14858f9..c3aeb4d 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-auto-ota-cli/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-auto-ota-cli/libgfx_rm.a differ
index f518742..41edc9b 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-auto-ota-ser/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-auto-ota-ser/libgfx_rm.a differ
index 3882fd8..a646c14 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-fd230-r/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-fd230-r/libgfx_rm.a differ
index f74e033..39d4b05 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-fd230/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-fd230/libgfx_rm.a differ
index 3882fd8..a646c14 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-lt22-r/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-lt22-r/libgfx_rm.a differ
index f74e033..39d4b05 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-lt22/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-lt22/libgfx_rm.a differ
index 3882fd8..a646c14 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-r/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-r/libgfx_rm.a differ
diff --git a/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-u8-r/libgfx_rm.a b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-u8-r/libgfx_rm.a
new file mode 100644 (file)
index 0000000..a646c14
Binary files /dev/null and b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-u8-r/libgfx_rm.a differ
diff --git a/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-u8/libgfx_rm.a b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-u8/libgfx_rm.a
new file mode 100644 (file)
index 0000000..39d4b05
Binary files /dev/null and b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-u8/libgfx_rm.a differ
index 3882fd8..a646c14 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-w9-r/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-w9-r/libgfx_rm.a differ
index f74e033..39d4b05 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-w9/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-w9/libgfx_rm.a differ
index f74e033..39d4b05 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-native-js/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js/libgfx_rm.a differ
index 6b57354..f7c2119 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-target1-r/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-target1-r/libgfx_rm.a differ
index a35b38e..259458f 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-target1/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-target1/libgfx_rm.a differ
index fc2f5ba..9411414 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-target3-r/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-target3-r/libgfx_rm.a differ
index c8cf64a..8edeb54 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-target3/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-target3/libgfx_rm.a differ
index ea0fcc7..84b84ab 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-target4-r/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-target4-r/libgfx_rm.a differ
index fad81d7..72a9205 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-target4/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-target4/libgfx_rm.a differ
index 892e432..aedcb5c 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-target5-r/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-target5-r/libgfx_rm.a differ
index 0a5933b..445f9cf 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-target5/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-target5/libgfx_rm.a differ
index 650d296..5510f05 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-xts/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-xts/libgfx_rm.a differ
index b309e7d..e9e265a 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/testsuite-brandy-sdk/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/testsuite-brandy-sdk/libgfx_rm.a differ
index 706ccc6..d431017 100644 (file)
@@ -660,6 +660,10 @@ td_s32 dpu_layer_set_pos(drv_dpu_layer_id layer_id, td_s32 pos_x, td_s32 pos_y)
         return DRV_ERR_DPU_OPERATION_NOT_SUPPORT;\r
     }\r
 \r
+    if ((layer_dev->run_info.pos_x == pos_x) && (layer_dev->run_info.pos_y == pos_y)) {\r
+        return EXT_SUCCESS;\r
+    }\r
+\r
     osal_spin_lock_irqsave(&layer_dev->layer_lock, &flag);\r
     layer_dev->update_flag = TD_TRUE;\r
     layer_dev->run_info.pos_x = pos_x;\r
@@ -902,9 +906,11 @@ td_s32 dpu_layer_refresh(void)
     dpu_disp_set_chnl_reg_up();\r
     dpu_isr_clear_finish_flag();\r
 \r
+#ifdef MIPI_ULPS_SUPPORT\r
     if (uapi_mipi_tx_is_in_ulps() == true) {\r
         dpu_err("mipi_tx_is_not_exit_ulps, can not flush\n");\r
     }\r
+#endif\r
     dpu_hal_disp_set_frame_ready();\r
 \r
     if (need_cur_done == TD_TRUE) {\r
index 3151d97..d6b31d0 100644 (file)
@@ -56,6 +56,10 @@ set(MAIN_COMPONENT
     false
 )
 
+set(AUTO_ADD_PATH
+    false
+)
+
 build_component()
 
 #===============================================================================
@@ -109,6 +113,10 @@ set(MAIN_COMPONENT
     false
 )
 
+set(AUTO_ADD_PATH
+    false
+)
+
 build_component()
 
 #===============================================================================
@@ -157,5 +165,6 @@ set(MAIN_COMPONENT
     false
 )
 
+
 build_component()
 
index 8669dfe..477c78e 100644 (file)
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-auto-ota-cli/libdisplay_gfx.a and b/code/sdk/middleware/services/gui/hal/display/brandy-auto-ota-cli/libdisplay_gfx.a differ
index 270e21e..331f27d 100644 (file)
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-auto-ota-ser/libdisplay_gfx.a and b/code/sdk/middleware/services/gui/hal/display/brandy-auto-ota-ser/libdisplay_gfx.a differ
index 19047e8..6f841f3 100644 (file)
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-native-js-fd230/libdisplay_gfx.a and b/code/sdk/middleware/services/gui/hal/display/brandy-native-js-fd230/libdisplay_gfx.a differ
index 19047e8..6f841f3 100644 (file)
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-native-js-lt22/libdisplay_gfx.a and b/code/sdk/middleware/services/gui/hal/display/brandy-native-js-lt22/libdisplay_gfx.a differ
diff --git a/code/sdk/middleware/services/gui/hal/display/brandy-native-js-u8/libdisplay_gfx.a b/code/sdk/middleware/services/gui/hal/display/brandy-native-js-u8/libdisplay_gfx.a
new file mode 100644 (file)
index 0000000..6f841f3
Binary files /dev/null and b/code/sdk/middleware/services/gui/hal/display/brandy-native-js-u8/libdisplay_gfx.a differ
index 19047e8..6f841f3 100644 (file)
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-native-js-w9/libdisplay_gfx.a and b/code/sdk/middleware/services/gui/hal/display/brandy-native-js-w9/libdisplay_gfx.a differ
index 19047e8..6f841f3 100644 (file)
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-native-js/libdisplay_gfx.a and b/code/sdk/middleware/services/gui/hal/display/brandy-native-js/libdisplay_gfx.a differ
index 11ca32e..21817f0 100644 (file)
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-target1/libdisplay_gfx.a and b/code/sdk/middleware/services/gui/hal/display/brandy-target1/libdisplay_gfx.a differ
index a3d1483..8aebfbd 100644 (file)
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-target3/libdisplay_gfx.a and b/code/sdk/middleware/services/gui/hal/display/brandy-target3/libdisplay_gfx.a differ
index 2d58be4..d55fbbf 100644 (file)
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-target5/libdisplay_gfx.a and b/code/sdk/middleware/services/gui/hal/display/brandy-target5/libdisplay_gfx.a differ
index 36e4f2d..7c37397 100644 (file)
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-xts/libdisplay_gfx.a and b/code/sdk/middleware/services/gui/hal/display/brandy-xts/libdisplay_gfx.a differ
index 6f95f71..fde9329 100644 (file)
@@ -57,6 +57,8 @@ typedef struct {
 } AddrInfo;
 
 TryToFreeImgCallback g_tryToFreeImgCallback = NULL;
+TryToFreeFontCacheCallback g_tryToFreeFontCacheCallback = NULL;
+
 #if ENABLE_GMMU
 static bool g_gmmuAllocated[FB_COUNT] = {false, false};
 struct gmmu_buf_struct g_gmmuMem = { 0 };
@@ -228,14 +230,23 @@ static int32_t AllocMem(const AllocInfo *info, BufferHandle **handle)
     }
 
     uint8_t *addr = LosAllocMem(pool, (uint32_t)(buffer->size));
-    if (((info->usage & HBM_USE_MEM_YUV) != HBM_USE_MEM_YUV) &&
-        (pool == g_poolId) && (g_tryToFreeImgCallback != NULL)) {
+    if ((pool == g_poolId) && (g_tryToFreeImgCallback != NULL)) {
         while (addr == NULL) {
             if (g_tryToFreeImgCallback()) {
                 DISP_LOGW("Success to free image during AllocMem size: %u\n", buffer->size);
                 addr = LosAllocMem(pool, (uint32_t)(buffer->size));
             } else {
-                DISP_LOGE("Failed to AllocMem size: %u and no image can be free\n", buffer->size);
+                DISP_LOGE("Failed to AllocMem size: %u, and no image can be free\n", buffer->size);
+                break;
+            }
+        }
+    } else if ((pool == g_fontPoolId) && (g_tryToFreeFontCacheCallback != NULL)) {
+        while (addr == NULL) {
+            if (g_tryToFreeFontCacheCallback()) {
+                DISP_LOGW("Success to free font cache during AllocMem size: %u\n", buffer->size);
+                addr = LosAllocMem(pool, (uint32_t)(buffer->size));
+            } else {
+                DISP_LOGE("Failed to AllocMem size: %u, and no font cache can be free\n", buffer->size);
                 break;
             }
         }
@@ -275,7 +286,7 @@ static void FreeMem(BufferHandle *handle)
 #endif
         }
     } else if (((handle->usage & HBM_USE_MEM_FONT) == HBM_USE_MEM_FONT) ||
-        ((handle->usage & HBM_USE_MEM_PATH) == HBM_USE_MEM_PATH)){
+        ((handle->usage & HBM_USE_MEM_PATH) == HBM_USE_MEM_PATH)) {
         LosFreeMem(g_fontPoolId, handle->virAddr);
     } else {
         LosFreeMem(g_poolId, handle->virAddr);
@@ -290,6 +301,11 @@ static void RegisterTryToFreeImgCallback(TryToFreeImgCallback callback)
     g_tryToFreeImgCallback = callback;
 }
 
+static void RegisterTryToFreeFontCacheCallback(TryToFreeFontCacheCallback callback)
+{
+    g_tryToFreeFontCacheCallback = callback;
+}
+
 int32_t GrallocInitialize(GrallocFuncs **funcs)
 {
     CHECK_NULLPOINTER_RETURN_VALUE(funcs, DISPLAY_NULL_PTR);
@@ -310,6 +326,7 @@ int32_t GrallocInitialize(GrallocFuncs **funcs)
     gFuncs->AllocMem = AllocMem;
     gFuncs->FreeMem = FreeMem;
     gFuncs->RegisterTryToFreeImgCallback = RegisterTryToFreeImgCallback;
+    gFuncs->RegisterTryToFreeFontCacheCallback = RegisterTryToFreeFontCacheCallback;
     *funcs = gFuncs;
 
 #if ENABLE_GMMU
index 57ccefb..215d26c 100644 (file)
@@ -146,6 +146,7 @@ set(PRIVATE_HEADER
     ${LVGL_DIR}/proprietary/src/misc\r
     ${ROOT_DIR}/middleware/services/gui/hal/input/include\r
     ${ROOT_DIR}/open_source/openharmony/drivers/peripheral/display/interfaces/include\r
+    ${ROOT_DIR}/open_source/openharmony/third_party/freetype/include\r
 )\r
 \r
 set(PRIVATE_DEFINES\r
index 7695c17..48522c9 100644 (file)
Binary files a/code/sdk/middleware/services/gui/lvgl/brandy-target1/liblvgl_proprietary_mini.a and b/code/sdk/middleware/services/gui/lvgl/brandy-target1/liblvgl_proprietary_mini.a differ
index 185a1b4..8accbb2 100644 (file)
Binary files a/code/sdk/middleware/services/gui/lvgl/brandy-target5/liblvgl_proprietary.a and b/code/sdk/middleware/services/gui/lvgl/brandy-target5/liblvgl_proprietary.a differ
index c61f8e2..84d5e2f 100644 (file)
@@ -207,6 +207,7 @@ set(COMPONENT_SRC
     ${PROP_UI_SRC}/components_ext/ui_icosahedron_view.cpp\r
     ${PROP_UI_SRC}/components_ext/ui_transform_group.cpp\r
     ${PROP_UI_SRC}/components_ext/ui_transform_list.cpp\r
+    ${PROP_UI_SRC}/components_ext/ui_sphere_view.cpp\r
 )\r
 \r
 set(SOURCES\r
index 1666ee2..3e53b5c 100644 (file)
Binary files a/code/sdk/middleware/services/gui/uikit/brandy-auto-ota-cli/libuikit_ext.a and b/code/sdk/middleware/services/gui/uikit/brandy-auto-ota-cli/libuikit_ext.a differ
index 04e7a6a..2908a3b 100644 (file)
Binary files a/code/sdk/middleware/services/gui/uikit/brandy-auto-ota-ser/libuikit_ext.a and b/code/sdk/middleware/services/gui/uikit/brandy-auto-ota-ser/libuikit_ext.a differ
index a163d4e..3258fdf 100644 (file)
Binary files a/code/sdk/middleware/services/gui/uikit/brandy-native-js-fd230/libuikit_ext.a and b/code/sdk/middleware/services/gui/uikit/brandy-native-js-fd230/libuikit_ext.a differ
index a163d4e..3258fdf 100644 (file)
Binary files a/code/sdk/middleware/services/gui/uikit/brandy-native-js-lt22/libuikit_ext.a and b/code/sdk/middleware/services/gui/uikit/brandy-native-js-lt22/libuikit_ext.a differ
diff --git a/code/sdk/middleware/services/gui/uikit/brandy-native-js-u8/libuikit_ext.a b/code/sdk/middleware/services/gui/uikit/brandy-native-js-u8/libuikit_ext.a
new file mode 100644 (file)
index 0000000..3258fdf
Binary files /dev/null and b/code/sdk/middleware/services/gui/uikit/brandy-native-js-u8/libuikit_ext.a differ
index a163d4e..3258fdf 100644 (file)
Binary files a/code/sdk/middleware/services/gui/uikit/brandy-native-js-w9/libuikit_ext.a and b/code/sdk/middleware/services/gui/uikit/brandy-native-js-w9/libuikit_ext.a differ
index a163d4e..3258fdf 100644 (file)
Binary files a/code/sdk/middleware/services/gui/uikit/brandy-native-js/libuikit_ext.a and b/code/sdk/middleware/services/gui/uikit/brandy-native-js/libuikit_ext.a differ
index 97a2fe0..fc0a9b4 100644 (file)
Binary files a/code/sdk/middleware/services/gui/uikit/brandy-target3/libuikit_ext.a and b/code/sdk/middleware/services/gui/uikit/brandy-target3/libuikit_ext.a differ
index a3bd205..470c5f1 100644 (file)
Binary files a/code/sdk/middleware/services/gui/uikit/brandy-xts/libuikit_ext.a and b/code/sdk/middleware/services/gui/uikit/brandy-xts/libuikit_ext.a differ
index 699ef70..a7e8fa6 100644 (file)
 #include "gfx_utils/heap_base.h"
 #include "graphic_config.h"
 #include "hals/gralloc_engines.h"
+#include "graphic_mutex.h"
+
+#ifdef ERROR
+#undef ERROR
+#endif
 
 #if ENABLE_IMAGE_PACKER
 namespace OHOS {
@@ -144,6 +149,7 @@ private:
     std::unordered_map<uint8_t*, MultiImageInfo*> bufMap_;
     ImageNode longTermList_;
     ImageNode shortTermList_;
+    GraphicMutex listMutex_;
 
     ImageCacheManager()
     {
index dc31d5d..d8b6bbc 100644 (file)
@@ -33,6 +33,7 @@
 #define GRAPHIC_LITE_LITE_SURFACE_H\r
 \r
 #include <pthread.h>\r
+#include <memory>\r
 #include "graphic_utils.h"\r
 #include "gfx_utils/list.h"\r
 #include "gfx_utils/pixel_format_utils.h"\r
@@ -295,6 +296,13 @@ public:
      */\r
     void CancelBuffer(SurfaceBuffer* buffer) override;\r
 \r
+    /**\r
+     * @brief Prepare video buffers. This should be called before playing video.\r
+     * @since 1.0\r
+     * @version 1.0\r
+     */\r
+    void PrepareBuffers();\r
+\r
     void ClearBuffers();\r
     SurfaceBuffer* GetBackBuf();\r
 \r
@@ -317,6 +325,7 @@ protected:
     List<SurfaceBuffer*> freeList_;\r
     List<SurfaceBuffer*> dirtyList_;\r
     IBufferConsumerListener* consumerListener_;\r
+    std::shared_ptr<bool> waitPrepareBuffer_;\r
 };\r
 } // end namespace\r
 #endif\r
index d4c9233..e02a80f 100644 (file)
@@ -95,6 +95,7 @@ protected:
 #endif
 
 private:
+    void SetTextInnner(const char* text);
     uint16_t textId_ = FontGlobalManager::INVALID_TEXT_ID;
 #if ENABLE_SHAPING
     bool isNeedShaping_ = 0;
index 3643000..3ffc31d 100644 (file)
@@ -31,6 +31,7 @@
 #include "components/ui_swipe_view.h"
 #include "components/card_swipe.h"
 #include "components_ext/hor_swipe_view.h"
+#include "components_ext/ver_swipe_view.h"
 
 namespace OHOS {
 /**
@@ -39,7 +40,8 @@ namespace OHOS {
  * @since 1.0
  * @version 1.0
  */
-class UICrossView : public UIViewGroup, public UISwipeView::OnSwipeListener {
+class UICrossView : public UIViewGroup, public UISwipeView::OnSwipeListener,
+    public VerSwipeView::OnMoveChildListener {
 public:
     UICrossView(const UICrossView &) = delete;
     UICrossView &operator=(const UICrossView &) = delete;
@@ -77,6 +79,7 @@ public:
         return &instance;
     }
 
+    void OnMoveChild(UISwipeView& view, int16_t xOffset, int16_t yOffset) override;
     void OnSwipe(UISwipeView& view) override;
     bool OnDragStartEvent(const DragEvent& event) override;
     bool OnDragEvent(const DragEvent& event) override;
@@ -234,13 +237,11 @@ private:
     static constexpr uint16_t INVALID_VIEW_INDEX = 0xff;
     bool loop_ = false;
     bool enableScreenCap_ = false;
-    bool gaussianBlurEnable_ = false;
     int swipeDirect_ = 0;
-    int pullIndex_ = 0;
     int16_t hDragStartIndex_ = INVALID_VIEW_INDEX;
     int16_t vBlankIndex_ = INVALID_VIEW_INDEX;
     UIView* vBlankView_ = nullptr;
-    UISwipeView vertical_;
+    VerSwipeView vertical_;
     HorSwipeView horizontal_;
     UIView* tailView_ = nullptr;
     UISwipeView::OnSwipeListener *swipeListener_ = nullptr;
@@ -250,7 +251,6 @@ private:
 
     void RemoveAllInner(UISwipeView& view);
     void ProcessRes(bool loadAdjacent = true);
-    void VertSetGausBlur(uint16_t direct);
     void HorHandleCardEvent(int16_t index, uint16_t scrollStage);
     void VertHandleCardEvent(uint16_t scrollStage);
 };
index 1bc870e..2925fd1 100644 (file)
@@ -32,10 +32,11 @@ public:
     }
 
     /**
-     * @brief Set image size
+     * @brief Set the size of Image or UITransformGroup.
      *        LayoutChildren(true) must be invoked mannualy after invoking this method.
      *
-     * @param size Indicates size to set, when the image in the center
+     * @param size Indicates size to set, when the Image or UITransformGroup is displayed in the center.
+     *             It is best to keep child's size as same as this size.
      */
     void SetImageSizeInCenter(uint16_t size)
     {
@@ -85,9 +86,9 @@ public:
     }
 
     /**
-     * @brief Adds a child image view whose resize mode will set to be UIImageView::COVER.
+     * @brief Adds UITransformGroup or UIImageView whose resize mode will set to be UIImageView::COVER.
      *        LayoutChildren(true) should be invoked mannualy after invoking this method.
-     *        Note: View index was set for children innner in order of addition, so you can
+     *        Note: View index was set for children inner in order of addition, so you can
      *        get its index by call method GetViewIndex()
      *
      * @param view Indicates the pointer to the child view to add.
@@ -95,13 +96,13 @@ public:
     void Add(UIView* view) override;
 
     /**
-     * @brief Inserts a child image view whose resize mode will set to be UIImageView::COVER.
+     * @brief Inserts UITransformGroup or UIImageView whose resize mode will set to be UIImageView::COVER.
      *        LayoutChildren(true) should be invoked mannualy after invoking this method.
-     *        Note: View index was set for children innner in order of addition, so you can
+     *        Note: View index was set for children inner in order of addition, so you can
      *        get its index by call method GetViewIndex()
      *
-     * @param prevView Indicates the pointer to the child image view, previous to the new child image view.
-     * @param view Indicates the pointer to the new child image view to insert.
+     * @param prevView Indicates the pointer to the child view, previous to the new child view.
+     * @param view Indicates the pointer to the new child view to insert.
      */
     void Insert(UIView* prevView, UIView* insertView) override;
 
@@ -217,6 +218,7 @@ private:
     void CalculateNearestPointFromOutterPoint(const Vector2<int16_t>& outerPoint);
     void UpdateNearestPointFromFixedPoint(const Vector2<int16_t>& fixedPoint, uint8_t index);
     void CreatePolygons(uint16_t lap, int16_t angle);
+    void ScaleBaseElement(UIView* view, float scaleX, float scaleY);
     Graphic::Vector<Vector2<int16_t>> imgPoints_{64};
     uint16_t maxLap_ = 0;
     uint16_t maxAngleInMaxLap_ = 0;
index e4b063a..8fbc5d7 100644 (file)
@@ -56,7 +56,7 @@ public:
     void RefreshIcosahedron();\r
 \r
     /**\r
-     * @brief Rotates the icosahedral in 3d.\r
+     * @brief Rotates the icosahedral in 3d, from the start position.\r
      *\r
      * @param angle Indicates the rotation angle.\r
      * @param pivotStart Indicates the coordinates of the rotation start pivot.\r
@@ -64,6 +64,15 @@ public:
      */\r
     bool RotatePlanes(int16_t angle, const Vector3<float>& pivotStart, const Vector3<float>& pivotEnd);\r
 \r
+    /**\r
+     * @brief Rotates the icosahedral in 3d, from the current location.\r
+     *\r
+     * @param angle Indicates the rotation angle.\r
+     * @param pivotStart Indicates the coordinates of the rotation start pivot.\r
+     * @param pivotEnd Indicates the coordinates of the rotation end pivot.\r
+     */\r
+    bool Rotate(int16_t angle, const Vector3<float>& pivotStart, const Vector3<float>& pivotEnd);\r
+\r
     /**\r
      * @brief Set default Image,the default picture will be used if less than 20 faces are set\r
      * @param src Pointer to a ImageInfo struct, which is the source img for kaleidoscope img.\r
index aeb9dc4..d7a506f 100644 (file)
@@ -179,6 +179,8 @@ public:
 
     void DumpImgInfo() override;
 
+    std::string GetGuiInfo() const override;
+
 private:
     UILiteSurfaceView(const UILiteSurfaceView&) = delete;
     UILiteSurfaceView &operator=(const UILiteSurfaceView&) = delete;
index 5e91bf6..ee1e649 100644 (file)
@@ -141,7 +141,7 @@ public:
      */
     void HidePOI(uint16_t tag, bool isHide = true);
     void SetX(int16_t x) override;
-    void SetY(int16_t x) override;
+    void SetY(int16_t y) override;
 
 private:
     POIInfo* pois_ = nullptr;
index 6167260..2ce2401 100644 (file)
@@ -319,8 +319,8 @@ private:
     bool switchModeWithAnim_ = false;
     bool alignWithAnim_ = false;
     UIView* coverPreviousItem_ = nullptr;
-    uint16_t itemWidth_ = 0;
-    uint16_t itemHeight_ = 0;
+    uint16_t itemWidth_ = 1;
+    uint16_t itemHeight_ = 1;
     uint8_t mirrorOpa_ = 100;
     float radius_ = 0.0f;
     float perimeter_ = 0.0f;
diff --git a/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_sphere_view.h b/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_sphere_view.h
new file mode 100644 (file)
index 0000000..cb057fc
--- /dev/null
@@ -0,0 +1,135 @@
+/*\r
+ * Copyright (c) 2024 CompanyNameMagicTag.\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef UI_SPHERE_VIEW_H\r
+#define UI_SPHERE_VIEW_H\r
+#include "components/ui_scroll_view.h"\r
+#include "components/ui_transform_group.h"\r
+#include "components/ui_image_view.h"\r
+namespace OHOS {\r
+class UISphereView : public UIScrollView {\r
+public:\r
+    UISphereView(uint8_t numberOfRow);\r
+    virtual ~UISphereView() override;\r
+\r
+    UIViewType GetViewType() const override\r
+    {\r
+        return UI_SPHERE_VIEW;\r
+    }\r
+\r
+    void Add(UIView* child) override;\r
+    void Remove(UIView* child) override;\r
+    void Insert(UIView* prevView, UIView* insertView) override;\r
+    void SetNumberOfRow(uint8_t numberOfRow);\r
+    void SetSphereCameraPosition(const Vector2<float>& position);\r
+    void SetSphereCameraDistance(int16_t distance);\r
+    uint8_t GetNumberOfRow()\r
+    {\r
+        return numberOfRow_;\r
+    }\r
+\r
+    void SetSensitivityFactor(float sensitivity)\r
+    {\r
+        sensitivityFactor_ = sensitivity;\r
+    }\r
+\r
+    float GetSensitivityFactor()\r
+    {\r
+        return sensitivityFactor_;\r
+    }\r
+\r
+#if ENABLE_ROTATE_INPUT\r
+    bool OnRotateStartEvent(const RotateEvent& event) override;\r
+\r
+    bool OnRotateEvent(const RotateEvent& event) override;\r
+\r
+    bool OnRotateEndEvent(const RotateEvent& event) override;\r
+#endif\r
+\r
+    void UpdateItemAngle(float angle);\r
+    bool OnDragStartEvent(const DragEvent& event) override;\r
+    bool OnDragEvent(const DragEvent& event) override;\r
+    bool OnDragEndEvent(const DragEvent& event) override;\r
+    void SetHeight(int16_t height) override;\r
+    void SetWidth(int16_t width) override;\r
+\r
+protected:\r
+    bool DragXInner(int16_t distance) override;\r
+    bool DragYInner(int16_t distance) override\r
+    {\r
+        return true;\r
+    }\r
+    void StopAnimator() override;\r
+\r
+private:\r
+    class DragAnimatorCallback : public AnimatorCallback {\r
+    public:\r
+        DragAnimatorCallback()\r
+            : curTime_(0),\r
+              animTime_(0),\r
+              previousAngle_(0),\r
+              angle_(0)\r
+        {\r
+        }\r
+\r
+        virtual ~DragAnimatorCallback() {}\r
+\r
+        void SetAnimTimes(uint16_t times)\r
+        {\r
+            animTime_ = times;\r
+        }\r
+\r
+        void SetAngle(float angle)\r
+        {\r
+            angle_ = angle;\r
+        }\r
+\r
+        void ResetCallback()\r
+        {\r
+            angle_ = 0;\r
+            previousAngle_ = 0;\r
+            animTime_ = 0;\r
+            curTime_ = 0;\r
+        }\r
+\r
+        virtual void Callback(UIView* view) override;\r
+\r
+        uint16_t curTime_;\r
+        uint16_t animTime_;\r
+        float previousAngle_;\r
+        float angle_;\r
+    };\r
+\r
+    float ConvertDistanceToAngle(int16_t distance);\r
+    bool InitChildExtraMsg();\r
+    void ReMeasure(void) override;\r
+    void CalculateCameraMatrix();\r
+    void TransformItemGroup();\r
+\r
+    Animator dragAnim_;\r
+    DragAnimatorCallback dragCallback_;\r
+    uint8_t numberOfRow_ = 1;\r
+    bool needRefreshSphere_ = false;\r
+    int16_t offsetRotate_ = 0;\r
+    float perimeter_ = 0.0f;\r
+    float sensitivityFactor_ = 1.0f;\r
+    int16_t cameraDistance_ = -2000;  // -2000 : default distance\r
+    Vector2<float> cameraPosition_;\r
+    Matrix4<float> perspectiveMatrix_;\r
+    /* calculate swipe anim period: angle offset / ANGLE_COEFFICIENT. Minimum swipe anim period is MIN_DRAG_TIMES. */\r
+    static constexpr uint8_t ANGLE_COEFFICIENT = 5;\r
+};\r
+}\r
+#endif // UI_SPHERE_VIEW_H
\ No newline at end of file
index 06fea11..c4d9b69 100644 (file)
@@ -32,10 +32,11 @@ public:
     }
 
     /**
-     * @brief Set image size
+     * @brief Set the size of Image or UITransformGroup.
      *        LayoutChildren(true) must be invoked mannualy after invoking this method.
      *
-     * @param size Indicates size to set, when the image in the center
+     * @param size Indicates size to set, when the Image or UITransformGroup is displayed in the center.
+     *             It is best to keep child's size as same as this size.
      */
     void SetImageSizeInCenter(uint16_t size)
     {
@@ -85,9 +86,9 @@ public:
     }
 
     /**
-     * @brief Adds a child image view whose resize mode will set to be UIImageView::COVER.
+     * @brief Adds UITransformGroup or UIImageView whose resize mode will set to be UIImageView::COVER.
      *        LayoutChildren(true) should be invoked mannualy after invoking this method.
-     *        Note: View index was set for children innner in order of addition, so you can
+     *        Note: View index was set for children inner in order of addition, so you can
      *        get its index by call method GetViewIndex()
      *
      * @param view Indicates the pointer to the child view to add.
@@ -95,13 +96,13 @@ public:
     void Add(UIView* view) override;
 
     /**
-     * @brief Inserts a child image view whose resize mode will set to be UIImageView::COVER.
+     * @brief Inserts UITransformGroup or UIImageView whose resize mode will set to be UIImageView::COVER.
      *        LayoutChildren(true) should be invoked mannualy after invoking this method.
-     *        Note: View index was set for children innner in order of addition, so you can
+     *        Note: View index was set for children inner in order of addition, so you can
      *        get its index by call method GetViewIndex()
      *
-     * @param prevView Indicates the pointer to the child image view, previous to the new child image view.
-     * @param view Indicates the pointer to the new child image view to insert.
+     * @param prevView Indicates the pointer to the child view, previous to the new child view.
+     * @param view Indicates the pointer to the new child view to insert.
      */
     void Insert(UIView* prevView, UIView* insertView) override;
 
@@ -144,7 +145,7 @@ public:
      * @brief Get the Index Of View object in this view group
      *
      * @param  index, Indicates the view to search
-     * @return Returns the index, nullptr if not exsit
+     * @return Returns the view, nullptr if not exsit
      */
     UIView* GetViewByIndex(uint8_t index);
 
@@ -230,6 +231,7 @@ private:
     void CalculateAdjustDistanceForRectScreen(Vector2<float>& position, float& imgScaleRatio);
     void AdjustViewByDistance(UIView& view, const Vector2<int16_t>& position);
     void CalculateReboundDistance(int16_t& dragDistanceX, int16_t& dragDistanceY) override;
+    void ScaleBaseElement(UIView* view, float scaleX, float scaleY);
     Graphic::Vector<Vector2<int16_t>> imgPoints_{64};
     float imgDistance_{0};
     uint16_t oriImgDistance_{0};
index f0d3f05..332ffe5 100644 (file)
 #include "hals/gralloc_engines.h"
 #include "gfx_utils/graphic_log.h"
 #include "gfx_utils/graphic_math.h"
+#include "graphic_service.h"
+
 namespace OHOS {
 LiteSurface::LiteSurface() : bufferCount_(0), queueSize_(0), size_(0),
     width_(0), height_(0), strideAlignment_(0), format_(PIXEL_FMT_BUTT),
-    consumerListener_(nullptr)
+    consumerListener_(nullptr), waitPrepareBuffer_(std::make_shared<bool>(false))
 {
 }
 
@@ -51,6 +53,17 @@ void LiteSurface::ClearBuffers()
     lock_.Unlock();
 }
 
+void LiteSurface::PrepareBuffers()
+{
+    if (bufferCount_ != 0) {
+        GRAPHIC_LOGD("Already prepared buffers, bufferCount_ is %u", bufferCount_);
+        return;
+    }
+    for (uint8_t i = 0; i < queueSize_; i++) {
+        AddBuffer();
+    }
+}
+
 void LiteSurface::AddBuffer()
 {
     if (queueSize_ == bufferCount_) {
@@ -101,12 +114,21 @@ bool LiteSurface::CanRequest(uint8_t wait)
         goto END;
     }
     if (bufferCount_ < queueSize_) {
-        AddBuffer();
-        res = true;
-        if (freeList_.IsEmpty()) {
-            GRAPHIC_LOGE("Cannot request buffer: freeList is empty.");
-            res = false;
+        bool waitPrepareBuffer = *waitPrepareBuffer_;
+        if (!waitPrepareBuffer) {
+            std::weak_ptr<bool> wp = waitPrepareBuffer_;
+            GraphicService::GetInstance()->PostGraphicEvent([this, wp]() {
+                if (!wp.expired()) {
+                    PrepareBuffers();
+                    *waitPrepareBuffer_ = false;
+                }
+            });
+            *waitPrepareBuffer_ = true;
+            GRAPHIC_LOGE("Post PrepareBuffers Event. BufferCount: %d, QueueSize: %d.", bufferCount_, queueSize_);
+        } else {
+            GRAPHIC_LOGW("Waiting Preparing buffer!");
         }
+        res = false;
         goto END;
     }
     if (wait) {
@@ -119,9 +141,13 @@ END:
 
 BufferItem* LiteSurface::GetBufferItem(const SurfaceBuffer* buffer)
 {
+    if (buffer == nullptr) {
+        return nullptr;
+    }
+
     ListNode<BufferItem*>* cur = buffers_.Head();
     while (cur != buffers_.End()) {
-        if (cur->data_->buffer->addr == buffer->addr) {
+        if ((cur->data_->buffer == buffer) && (cur->data_->buffer->addr == buffer->addr)) {
             return cur->data_;
         }
         cur = cur->next_;
@@ -240,9 +266,12 @@ SurfaceBuffer* LiteSurface::AcquireBuffer()
         SurfaceBuffer* surfaceBuffer = dirtyList_.Front();
         dirtyList_.PopFront();
         BufferItem* bufferItem = GetBufferItem(surfaceBuffer);
-        if (bufferItem != nullptr) {
-            bufferItem->state = BufferState::BUFFER_STATE_ACQUIRE;
+        if (bufferItem == nullptr) {
+            GRAPHIC_LOGE("Acquired buffer is invalid: %p", surfaceBuffer);
+            lock_.Unlock();
+            return nullptr;
         }
+        bufferItem->state = BufferState::BUFFER_STATE_ACQUIRE;
         lock_.Unlock();
         return surfaceBuffer;
     }
@@ -253,30 +282,30 @@ SurfaceBuffer* LiteSurface::AcquireBuffer()
 bool LiteSurface::ReleaseBuffer(SurfaceBuffer* buffer)
 {
     lock_.Lock();
-    if (buffer != nullptr) {
-        freeList_.PushBack(buffer);
-        BufferItem* bufferItem = GetBufferItem(buffer);
-        if (bufferItem != nullptr) {
-            bufferItem->state = BufferState::BUFFER_STATE_RELEASE;
-        }
-        cond_.Signal();
+    BufferItem* bufferItem = GetBufferItem(buffer);
+    if (bufferItem == nullptr) {
+        GRAPHIC_LOGE("Release invalid buffer: %p", buffer);
         lock_.Unlock();
-        return true;
+        return false;
     }
+    bufferItem->state = BufferState::BUFFER_STATE_RELEASE;
+    freeList_.PushBack(buffer);
     cond_.Signal();
     lock_.Unlock();
-    return false;
+    return true;
 }
 
 int32_t LiteSurface::FlushBuffer(SurfaceBuffer* buffer)
 {
     lock_.Lock();
-    dirtyList_.PushBack(buffer);
-
     BufferItem* bufferItem = GetBufferItem(buffer);
-    if (bufferItem != nullptr) {
-        bufferItem->state = BufferState::BUFFER_STATE_FLUSH;
+    if (bufferItem == nullptr) {
+        GRAPHIC_LOGE("Flush invalid buffer: %p", buffer);
+        lock_.Unlock();
+        return -1;
     }
+    bufferItem->state = BufferState::BUFFER_STATE_FLUSH;
+    dirtyList_.PushBack(buffer);
     if (consumerListener_ != nullptr) {
         consumerListener_->OnBufferAvailable();
     }
@@ -302,10 +331,12 @@ SurfaceBuffer* LiteSurface::RequestBuffer(uint8_t wait)
             freeList_.PopFront();
 
             BufferItem* bufferItem = GetBufferItem(buffer);
-
-            if (bufferItem != nullptr) {
-                bufferItem->state = BufferState::BUFFER_STATE_REQUEST;
+            if (bufferItem == nullptr) {
+                GRAPHIC_LOGE("Requested buffer is invalid: %p", buffer);
+                lock_.Unlock();
+                return nullptr;
             }
+            bufferItem->state = BufferState::BUFFER_STATE_REQUEST;
             lock_.Unlock();
             return buffer;
         }
index 36eac6b..08fba08 100644 (file)
@@ -115,6 +115,8 @@ bool UICustomHexagonsList::OnRotateStartEvent(const RotateEvent& event)
             rotateCenterIndexInNormal_ = static_cast<uint8_t>(focusIndex);
         }
     }
+    SetTouchable(false);
+    SetDraggable(false);
     return UIView::OnRotateStartEvent(event);
 }
 
@@ -186,6 +188,8 @@ bool UICustomHexagonsList::OnRotateEndEvent(const RotateEvent& event)
         SetReboundMode(ReboundMode::CENTER_IMG_ON_SCR_CENTER);
     }
 
+    SetTouchable(true);
+    SetDraggable(true);
     return UIView::OnRotateEndEvent(event);
 }
 #endif
index b1aba5c..c474a88 100644 (file)
@@ -50,14 +50,7 @@ UILiteSurfaceView::~UILiteSurfaceView()
         DisplayDev::GetInstance()->CloseLayer(LAYER_1);\r
         DisplayDev::GetInstance()->SetLayerColorKey(LAYER_0, false);\r
     }\r
-    if (lastFlushedBuffer_ != nullptr) {\r
-        surface_->ReleaseBuffer(lastFlushedBuffer_);\r
-        lastFlushedBuffer_ = nullptr;\r
-    }\r
-    if (currentBuffer_ != nullptr) {\r
-        surface_->ReleaseBuffer(currentBuffer_);\r
-        currentBuffer_ = nullptr;\r
-    }\r
+\r
     surface_->UnregisterConsumerListener();\r
     LiteMGfxEngine::GetInstance()->ClearHardwareLayer(this);\r
     GraphicService::GetInstance()->PostGraphicEvent([] {\r
@@ -249,6 +242,7 @@ void UILiteSurfaceView::BlitBitmapToFb(BufferInfo& gfxDstBuffer, const Rect& inv
     BlendOption blendOption;\r
 #if UIKIT_SKIP_LINE\r
     blendOption.transMap.Scale(Vector2<float>{2.0, 2.0}, Vector2<float>{0, 0}); // 2.0: scale 2\r
+    blendOption.transMap.Translate(Vector2<int16_t>(GetRect().GetX(), GetRect().GetY()));\r
 #endif\r
     blendOption.opacity = OPA_OPAQUE;\r
     blendOption.mode = BLEND_SRC_OVER;\r
@@ -306,13 +300,12 @@ void UILiteSurfaceView::OnDraw(BufferInfo& gfxDstBuffer, const Rect& invalidated
         style.bgColor_ = colorKey_;\r
     }\r
 \r
-    if (!(layerRect_ == GetRect())) {\r
-        layerRect_ = GetRect();\r
-        AdjustArea(layerRect_);\r
-        Rect dirtyRect(0, 0, layerRect_.GetWidth() - 1, layerRect_.GetHeight() - 1);\r
-        DisplayDev::GetInstance()->SetLayerPositon(LAYER_1, layerRect_.GetX(), layerRect_.GetY());\r
-        DisplayDev::GetInstance()->SetLayerDirtyRegion(LAYER_1, dirtyRect);\r
-    }\r
+    layerRect_ = GetRect();\r
+    AdjustArea(layerRect_);\r
+    Rect dirtyRect(0, 0, layerRect_.GetWidth() - 1, layerRect_.GetHeight() - 1);\r
+    DisplayDev::GetInstance()->SetLayerPositon(LAYER_1, layerRect_.GetX(), layerRect_.GetY());\r
+    DisplayDev::GetInstance()->SetLayerDirtyRegion(LAYER_1, dirtyRect);\r
+\r
     BaseGfxEngine::GetInstance()->DrawRect(gfxDstBuffer, GetRect(), invalidatedArea, style, OPA_OPAQUE);\r
 }\r
 \r
@@ -386,4 +379,19 @@ void UILiteSurfaceView::DumpImgInfo()
         PrintImgInfo(info);\r
     }\r
 }\r
+\r
+std::string  UILiteSurfaceView::GetGuiInfo() const\r
+{\r
+    const int len = 256;\r
+    char *buf = new (std::nothrow) char[len];\r
+    if (buf == nullptr) {\r
+        return std::string("");\r
+    }\r
+    memset_s(buf, len, 0, len);\r
+    sprintf_s(buf, len, "stopped %d layerinit %d flushCnt %u lastbuf %p curbuf %p colorKey %x preView %p",\r
+        isStopped_, isLayerInit_, flushCount_, lastFlushedBuffer_, currentBuffer_, colorKey_.full, preView_);\r
+    std::string str(buf);\r
+    delete []buf;\r
+    return str;\r
+}\r
 }\r
index 1e487d1..ce7ded2 100644 (file)
@@ -225,6 +225,7 @@ void UISweepClock::CalculateRedrawArea(const Rect& current, Hand& hand, bool clo
     int16_t right = left + hand.width_ - 1;
     int16_t top = hand.position_.y + current.GetTop();
     int16_t bottom = top + hand.height_ - 1;
+    int16_t compensationDistance = hand.width_ / 2;
     Rect handRect(left, top, right, bottom);
     TransformMap backwardMap(handRect);
     Vector2<float> pivot;
@@ -240,6 +241,8 @@ void UISweepClock::CalculateRedrawArea(const Rect& current, Hand& hand, bool clo
     if (!clockInit) {
         /* Prevent old images from being residued */
         redraw.Join(redraw, hand.target_);
+        redraw.SetRect(redraw.GetLeft() - compensationDistance, redraw.GetTop() - compensationDistance,
+                       redraw.GetRight() + compensationDistance, redraw.GetBottom() + compensationDistance);
         InvalidateRect(redraw);
     }
 }
index 8c23ed2..8939b41 100644 (file)
@@ -75,16 +75,6 @@ public:
      */
     void SwipeStart(void);
 
-    /* *
-     * @brief Get state of scroll animator.
-     * @since 1.0
-     * @version 1.0
-     */
-    uint8_t GetScrollState()
-    {
-        return scrollAnimator_.GetState();
-    }
-
 private:
     bool enableScreenCap_ = false;
     CardSwipe* swipeCallback_ = nullptr;
diff --git a/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components_ext/ver_swipe_view.h b/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components_ext/ver_swipe_view.h
new file mode 100644 (file)
index 0000000..cbea964
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2024. All rights reserved.
+ * Description: VerSwipeView
+ * Author:
+ * Create: 2024-11
+ */
+
+#ifndef UI_VER_SWIPE_VIEW_H
+#define UI_VER_SWIPE_VIEW_H
+#include "components/ui_swipe_view.h"
+
+namespace OHOS {
+class VerSwipeView : public UISwipeView {
+public:
+    /**
+     * @brief Represents a listener for moving children.
+     *
+     * This is an inner class of <b>VerSwipeView</b>.
+     * It contains a callback function to be invoked when the swipe view moves children.
+     *
+     * @since 1.0
+     * @version 1.0
+     */
+    class OnMoveChildListener : public HeapBase {
+    public:
+        OnMoveChildListener() {}
+        virtual ~OnMoveChildListener() {}
+        virtual void OnMoveChild(UISwipeView& view, int16_t xOffset, int16_t yOffset) = 0;
+    };
+
+    /* *
+     * @brief A constructor used to create the <b>VerSwipeView</b> instance.
+     * @since 1.0
+     * @version 1.0
+     */
+    VerSwipeView() {}
+
+    /* *
+     * @brief A destructor used to delete the <b>VerSwipeView</b> instance.
+     * @since 1.0
+     * @version 1.0
+     */
+    ~VerSwipeView() override {}
+
+    /**
+     * @brief Obtains the listener set for moving child event.
+     *
+     * @return Returns the move child listener.
+     * @since 1.0
+     * @version 1.0
+     */
+    OnMoveChildListener*& GetOnMoveChildListener()
+    {
+        return onMoveChildListener_;
+    }
+
+    /**
+     * @brief Sets the listener that contains a callback to be invoked upon moving child.
+     *
+     * @param onMoveChildListener Indicates the listener to set.
+     * @since 1.0
+     * @version 1.0
+     */
+    void SetOnMoveChildListener(OnMoveChildListener* onMoveChildListener)
+    {
+        onMoveChildListener_ = onMoveChildListener;
+    }
+
+protected:
+    void MoveChildByOffset(int16_t xOffset, int16_t yOffset) override
+    {
+        UISwipeView::MoveChildByOffset(xOffset, yOffset);
+        if (onMoveChildListener_ != nullptr) {
+            onMoveChildListener_->OnMoveChild(*this, xOffset, yOffset);
+        }
+    }
+
+private:
+    OnMoveChildListener* onMoveChildListener_ = nullptr;
+};
+}
+#endif
index 79b7aec..601ea1e 100644 (file)
@@ -88,6 +88,7 @@ static const struct {
     {UI_TRANSFORM_GROUP, "UI_TRANSFORM_GROUP"},
     {UI_TRANSFORM_LIST, "UI_TRANSFORM_LIST"},
     {UI_COVER_FLOW_2, "UI_COVER_FLOW_2"},
+    {UI_SPHERE_VIEW, "UI_SPHERE_VIEW"},
     {UI_NUMBER_MAX, "UI_NUMBER_MAX"},
 };
 
index 4f015d8..74f8be7 100644 (file)
@@ -45,6 +45,8 @@ public:
         pointData_.PushBack(data);
     }
 
+    bool TryToFreeFontCache() override;
+
 private:
     float size_ = 0;
     UIFontHWCache* pathCache_ = nullptr;
index 5b29de2..c401887 100644 (file)
@@ -431,10 +431,6 @@ void DisplayDev::SetLayerPositon(uint8_t layerId, int16_t x, int16_t y)
         return;
     }
 
-    if (layer_[layerId].pos.x == x && layer_[layerId].pos.y == y) {
-        return;
-    }
-
     layer_[layerId].pos.x = x;
     layer_[layerId].pos.y = y;
     if (layerFuncs_->SetLayerSize != nullptr) {
index 084dfed..aca7b25 100644 (file)
@@ -21,6 +21,7 @@
 #include "gfx_utils/graphic_log.h"
 #include "securec.h"
 #include "common/image_cache_manager.h"
+#include "font/ui_font.h"
 #include "hals/gralloc_engines.h"
 
 namespace OHOS {
@@ -37,6 +38,11 @@ static bool TryToFreeImage()
     return ImageCacheManager::GetInstance().TryToFreeImage();
 }
 
+static bool TryToFreeFontCache()
+{
+    return UIFont::GetInstance()->TryToFreeFontCache();
+}
+
 bool GrallocEngines::Init()
 {
     if (grallocFuncs_ != nullptr) {
@@ -47,6 +53,7 @@ bool GrallocEngines::Init()
         return false;
     }
     grallocFuncs_->RegisterTryToFreeImgCallback(TryToFreeImage);
+    grallocFuncs_->RegisterTryToFreeFontCacheCallback(TryToFreeFontCache);
     return true;
 }
 
@@ -64,6 +71,7 @@ bool GrallocEngines::AllocBuffer(const AllocInfo& info, GrallocBuffer& buffer)
 #endif
 #ifdef __LITEOS__
         OsMemInfoPrint(reinterpret_cast<void*>(MEM_POOL_UI_OTHER));
+        OsMemInfoPrint(reinterpret_cast<void*>(MEM_POOL_UI_FONT));
 #endif
         return false;
     }
@@ -118,7 +126,7 @@ void GrallocEngines::FreeBuffer(uint8_t* virAddr)
 }
 
 #if ENABLE_MEMORY_CHECK
-void GrallocEngines::DumpMem()
+void GrallocEngines::DumpMem(bool dumpDetails)
 {
     int32_t fontCacheSize = 0;
     int32_t imageCacheSize = 0;
@@ -128,6 +136,7 @@ void GrallocEngines::DumpMem()
     int32_t yuvCacheSize = 0;
     int32_t fontCount = 0;
     int32_t fontMax = 0;
+    int32_t pathCnt = 0;
     printf("current gralloc allocate memory:\n");
     for (auto it : g_buffers) {
         if ((it.second->usage & HBM_USE_MEM_FONT) == HBM_USE_MEM_FONT) {
@@ -140,42 +149,57 @@ void GrallocEngines::DumpMem()
         }
         if (it.second->usage == HBM_USE_ASSIGN_SIZE) {
             imageCacheSize += it.second->size;
-            printf("  image addr=%p, size=%d\n", reinterpret_cast<void*>(it.first), it.second->size);
+            if (dumpDetails) {
+                printf("  image addr=%p, size=%d\n", reinterpret_cast<void*>(it.first), it.second->size);
+            }
             continue;
         }
         if ((it.second->usage & HBM_USE_MEM_MULTI_IMG) == HBM_USE_MEM_MULTI_IMG) {
             imageCacheSize += it.second->size;
-            printf("  multi image addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
+            if (dumpDetails) {
+                printf("  multi image addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
+            }
             continue;
         }
         if ((it.second->usage & HBM_USE_MEM_PATH) == HBM_USE_MEM_PATH) {
             pathCacheSize += it.second->size;
-            printf("  path addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
+            if (dumpDetails) {
+                printf("  path addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
+            }
+            pathCnt++;
             continue;
         }
         if ((it.second->usage & HBM_USE_MEM_FB) == HBM_USE_MEM_FB) {
             fbSize += it.second->size;
-            printf("  fb addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
+            if (dumpDetails) {
+                printf("  fb addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
+            }
             continue;
         }
         if ((it.second->usage & HBM_USE_MEM_BUFMAP) == HBM_USE_MEM_BUFMAP) {
             mapBufferSize += it.second->size;
-            printf("  mapbuffer addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
+            if (dumpDetails) {
+                printf("  mapbuffer addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
+            }
             continue;
         }
         if ((it.second->usage & HBM_USE_MEM_YUV) == HBM_USE_MEM_YUV) {
-            printf("  yuv addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
             yuvCacheSize += it.second->size;
+            if (dumpDetails) {
+                printf("  yuv addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
+            }
             continue;
         }
         if ((it.second->usage & HBM_USE_MEM_JPEG_DATA) == HBM_USE_MEM_JPEG_DATA) {
-            printf("  jpeg addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
             yuvCacheSize += it.second->size;
+            if (dumpDetails) {
+                printf("  jpeg addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
+            }
             continue;
         }
     }
-    printf("total size: font %d (count: %d, max: %d), image %d, path %d, fb %d, mapbuffer:%d, yuv %d\n",
-        fontCacheSize, fontCount, fontMax, imageCacheSize, pathCacheSize, fbSize, mapBufferSize, yuvCacheSize);
+    printf("total size: font %d (count: %d, max: %d), image %d, path %d (count: %d), fb %d, mapbuffer:%d, yuv %d\n",
+        fontCacheSize, fontCount, fontMax, imageCacheSize, pathCacheSize, pathCnt, fbSize, mapBufferSize, yuvCacheSize);
 }
 
 void GrallocEngines::SetMemMonitor(bool enable)
index 138bad1..e83c506 100644 (file)
@@ -42,7 +42,7 @@ public:
     bool AllocBufferOnce(const AllocInfo& info, GrallocBuffer& buffer);
     void FreeBuffer(uint8_t* virAddr);
 #if ENABLE_MEMORY_CHECK
-    void DumpMem();
+    void DumpMem(bool dumpDetails = false);
     void SetMemMonitor(bool enable);
 #endif
 private:
index e23737a..a4d3de6 100644 (file)
@@ -74,7 +74,6 @@ void UITestCoverflow2::TearDown()
         coverflow_ = nullptr;\r
     }\r
     lastIndex_ = 0;\r
-    lastPage_ = nullptr;\r
     addImage_ = nullptr;\r
     if (label_ != nullptr) {\r
         delete label_;\r
@@ -124,7 +123,6 @@ void UITestCoverflow2::UITestCoverflow2001()
         imageSub->SetTouchable(true);\r
         imageSub->SetOnClickListener(this);\r
         coverflow_->Add(page);\r
-        lastPage_ = page;\r
     }\r
     CreateAddButton();\r
     CreateTitleLabel();\r
@@ -186,8 +184,7 @@ bool UITestCoverflow2::OnClick(UIView& view, const ClickEvent& event)
         imageSub->SetSrc(src);\r
         imageSub->SetTouchable(true);\r
         imageSub->SetOnClickListener(this);\r
-        coverflow_->Insert(lastPage_, page);\r
-        lastPage_ = page;\r
+        coverflow_->Insert(nullptr, page);\r
     } else {\r
         UITransformGroup* page = dynamic_cast<UITransformGroup*>(view.GetParent());\r
         UIView* child = page->GetChildrenHead();\r
index 6cb1d90..0b4bc18 100644 (file)
@@ -48,7 +48,6 @@ private:
     UILabel* label_ = nullptr;\r
     UIImageView* addImage_ = nullptr;\r
     uint16_t lastIndex_ = 0;\r
-    UITransformGroup* lastPage_ = nullptr;\r
 };\r
 } // namespace OHOS\r
 #endif // UI_TEST_COVERFLOW_VIEW_2_H\r
index 5cb8964..0bf0b97 100644 (file)
@@ -5,6 +5,7 @@
 #include "ui_test_hexagons_list/ui_test_hexagons_list.h"
 #include "components/root_view.h"
 #include "components/ui_image_view.h"
+#include "components/ui_transform_group.h"
 #include "common/image_cache_manager.h"
 #include "common/screen.h"
 #include "ui_test_list_fps/ui_list_fps_res.h"
@@ -61,6 +62,50 @@ void UITestHexagonsList::SetUpButtons(int16_t xEnd, int16_t yEnd, int16_t xMiddl
         modifyBorderRadiusButton_ = new UIButton();
         ConfigButtonAttr(*modifyBorderRadiusButton_, xMiddle - BUTTON_SIZE, yMiddle, BUTTON_SIZE, BUTTON_SIZE);
     }
+    if (modifyModeButton_ == nullptr) {
+        modifyModeButton_ = new UIButton(); // click bottom mid to change mode for next time.
+        ConfigButtonAttr(*modifyModeButton_,
+            (container_->GetWidth() - BUTTON_SIZE) / 2, container_->GetHeight() - BUTTON_SIZE, // 2: divisor
+            BUTTON_SIZE, BUTTON_SIZE);
+    }
+}
+
+void UITestHexagonsList::SetUpChildren()
+{
+    ImageInfo* logo = ImageCacheManager::GetInstance().LoadSingleRes(RES_PATH"hexagons.bin");
+    ImageInfo* arrow = ImageCacheManager::GetInstance().LoadSingleRes(RES_PATH"left_arrow.bin");
+    for (int16_t i = 0; i < IMG_COUNT; i++) {
+        UIImageView* img = new UIImageView();
+        img->SetSrc(logo);
+        if (isImageMode_) {  // test UIImageView
+            img->SetTouchable(true);
+            img->Resize(imgSize_, imgSize_);
+            img->SetOnClickListener(this);
+            hexagonsList_->Add(img);
+        } else { // test UITransformGroup
+            UITransformGroup* transformGroup = new UITransformGroup();
+            transformGroup->SetStyle(STYLE_BACKGROUND_OPA, 0);
+            transformGroup->Add(img);
+
+            UIImageView* topImg = new UIImageView();
+            topImg->SetSrc(arrow);
+            transformGroup->Add(topImg);
+
+            UILabel* label = new UILabel();
+            label->SetText("6");
+            transformGroup->Add(label);
+
+            // Layout transformgroup as if displayed in center.
+            img->SetPosition(0, 0, imgSize_, imgSize_);
+            topImg->SetPosition(0, 0, imgSize_ / 3, imgSize_ / 3); // 3: divisor
+            label->SetPosition(imgSize_ - (imgSize_ / 3), 0, imgSize_ / 3, imgSize_ / 3); // 3: divisor
+            transformGroup->SetPosition(0, 0, imgSize_, imgSize_);
+
+            transformGroup->SetTouchable(true);
+            transformGroup->SetOnClickListener(this);
+            hexagonsList_->Add(transformGroup);
+        }
+    }
 }
 
 void UITestHexagonsList::SetUp()
@@ -93,14 +138,7 @@ void UITestHexagonsList::SetUp()
     hexagonsList_->SetPosition(0, 0,
         container_->GetWidth() - 2 * (horMargin_ + 1), container_->GetHeight() - 2 * (verMargin_ + 1)); // 2, two
 
-    ImageInfo* info = ImageCacheManager::GetInstance().LoadSingleRes(RES_PATH"hexagons.bin");
-    for (int16_t i = 0; i < IMG_COUNT; i++) {
-        UIImageView* img = new UIImageView();
-        img->SetSrc(info);
-        img->SetTouchable(true);
-        img->SetOnClickListener(this);
-        hexagonsList_->Add(img);
-    }
+    SetUpChildren();
     imgScaleFactor_ = hexagonsList_->GetScaleFactorByDistance();
     globalScale_ = hexagonsList_->GetGlobalScale();
     hexagonsList_->SetImageDistance(imgDistance_);
@@ -129,6 +167,7 @@ void UITestHexagonsList::TearDown()
     modifyHorMarginButton_ = nullptr;
     modifyVerMarginButton_ = nullptr;
     modifyBorderRadiusButton_ = nullptr;
+    modifyModeButton_ = nullptr;
 }
 
 void UITestHexagonsList::HandleClickEventForRectScreen(const UIView& view)
@@ -157,7 +196,7 @@ void UITestHexagonsList::HandleClickEventForRectScreen(const UIView& view)
 bool UITestHexagonsList::OnClick(UIView& view, const ClickEvent& event)
 {
     // Handle content click for image view
-    if (view.GetViewType() == UI_IMAGE_VIEW) {
+    if ((view.GetViewType() == UI_IMAGE_VIEW) || (view.GetViewType() == UI_TRANSFORM_GROUP)) {
         uint8_t index = static_cast<uint8_t>(view.GetViewIndex());
         float scaleInSmall = hexagonsList_->GetScaleInSmallState();
         Vector2<int16_t> center(hexagonsList_->GetWidth() / 2, hexagonsList_->GetHeight() / 2); // 2, center
@@ -183,12 +222,15 @@ bool UITestHexagonsList::OnClick(UIView& view, const ClickEvent& event)
         imgScaleFactor_ += isIncreaseScaleFactor_ ? IMG_SCALE_FACTOR_DELTA : -IMG_SCALE_FACTOR_DELTA;
         hexagonsList_->SetScaleFactorByDistance(imgScaleFactor_);
         hexagonsList_->LayoutChildren(true);
-    }  else if (modifyGlobalScaleButton_ == &view) {
+    } else if (modifyGlobalScaleButton_ == &view) {
         globalScale_ += isIncreaseGlobalScale_ ? GLOBAL_SCALE_DELTA : -GLOBAL_SCALE_DELTA;
         int8_t index = hexagonsList_->GetFocusedImgIndex();
         if (index >= 0) {
             hexagonsList_->Scale(globalScale_, static_cast<uint8_t>(index));
         }
+    } else if (modifyModeButton_ == &view) {
+        isImageMode_ = !isImageMode_;
+        printf("Change display mode to: %d\n", isImageMode_);
     }
     if (FloatLess(globalScale_, hexagonsList_->GetScaleThesholdOfZeroFactor())) {
         hexagonsList_->SetReboundMode(UIHexagonsList::ReboundMode::CENTER_IMG_ON_SCR_CENTER);
index 999b41b..3d0b383 100644 (file)
@@ -25,6 +25,7 @@ private:
     void HandleClickEventForRectScreen(const UIView& view);
     void ConfigButtonAttr(UIView& view, int16_t x, int16_t y, int16_t width, int16_t height);
     void SetUpButtons(int16_t xEnd, int16_t yEnd, int16_t xMiddle, int16_t yMiddle);
+    void SetUpChildren();
     UICustomHexagonsList* hexagonsList_ = nullptr;
     int16_t horMargin_ = 0;
     int16_t verMargin_ = 0;
@@ -48,6 +49,8 @@ private:
     UIButton* modifyVerMarginButton_ = nullptr;
     bool isIncreaseBorderRadius_ = true;
     UIButton* modifyBorderRadiusButton_ = nullptr;
+    bool isImageMode_ = true;
+    UIButton* modifyModeButton_ = nullptr;
 };
 }
 #endif // UI_TEST_HEXAGONS_LIST_H
\ No newline at end of file
diff --git a/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_sphere_view/ui_test_sphere_view.cpp b/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_sphere_view/ui_test_sphere_view.cpp
new file mode 100644 (file)
index 0000000..7e9b3ba
--- /dev/null
@@ -0,0 +1,160 @@
+/*\r
+ * Copyright (c) 2024 CompanyNameMagicTag.\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include "ui_test_sphere_view.h"\r
+#include "components/ui_transform_group.h"\r
+#include "components/ui_image_view.h"\r
+#include "common/image_cache_manager.h"\r
+#include "common/screen.h"\r
+\r
+namespace OHOS {\r
+static constexpr uint8_t STEP_SIZE = 10;\r
+\r
+UITestSphereView::UITestSphereView()\r
+{\r
+}\r
+\r
+void UITestSphereView::SetUp()\r
+{\r
+    container_ = new UIViewGroup();\r
+    container_->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());\r
+    container_->SetStyle(STYLE_BACKGROUND_OPA, OPA_OPAQUE);\r
+    container_->SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full);\r
+\r
+    sphereView_ = new UISphereView(8); // 8: Setting the Number of Displayed Lines.\r
+    sphereView_->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());\r
+    sphereView_->SetThrowDrag(true);\r
+    sphereView_->RequestFocus();\r
+    container_->Add(sphereView_);\r
+    for (uint8_t i = 0; i < 24; i++) { // 24: item number.\r
+        UITransformGroup* group = new UITransformGroup();\r
+        group->SetPosition(0, 0, 60, 60); // 60: view size\r
+        group->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
+\r
+        UIImageView* image = new UIImageView();\r
+        image->SetPosition(0, 0, 60, 60); // 60: view size\r
+        image->SetAutoEnable(false);\r
+        image->SetResizeMode(UIImageView::ImageResizeMode::FILL);\r
+        ImageInfo* info = ImageCacheManager::GetInstance().LoadSingleRes(RES_PATH"/kaleidoscope.bin");\r
+        image->SetSrc(info);\r
+        group->Add(image);\r
+        sphereView_->Add(group);\r
+    }\r
+\r
+    SetUpLabelButton();\r
+}\r
+\r
+void UITestSphereView::TearDown()\r
+{\r
+    sphereView_->ClearFocus();\r
+    DeleteChildren(container_);\r
+    container_ = nullptr;\r
+    sphereView_ = nullptr;\r
+    controlGroup_ = nullptr;\r
+    controlBt_ = nullptr;\r
+    sizeIncreaseBt_ = nullptr;\r
+    sizeDiminishedBt_ = nullptr;\r
+    addItemBt_ = nullptr;\r
+    updateCameraDistance = nullptr;\r
+    removeItemBt_ = nullptr;\r
+}\r
+\r
+void UITestSphereView::SetUpLabelButton()\r
+{\r
+    controlGroup_ = new UIViewGroup();\r
+    controlGroup_->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());\r
+    controlGroup_->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
+    controlGroup_->SetVisible(false);\r
+    container_->Add(controlGroup_);\r
+\r
+    controlBt_ = new UILabelButton();\r
+    controlBt_->SetPosition(200, 400, 60, 30); // 200, 400, 60, 30: label button size\r
+    controlBt_->SetOnClickListener(this);\r
+    controlBt_->SetText("control");\r
+    container_->Add(controlBt_);\r
+\r
+    sizeIncreaseBt_ = new UILabelButton();\r
+    sizeIncreaseBt_->SetPosition(50, 100, 60, 30); // 50, 100, 60, 30: label button size\r
+    sizeIncreaseBt_->SetOnClickListener(this);\r
+    sizeIncreaseBt_->SetText("size +");\r
+    controlGroup_->Add(sizeIncreaseBt_);\r
+\r
+    sizeDiminishedBt_ = new UILabelButton();\r
+    sizeDiminishedBt_->SetPosition(50, 200, 60, 30); // 50, 200, 60, 30: label button size\r
+    sizeDiminishedBt_->SetOnClickListener(this);\r
+    sizeDiminishedBt_->SetText("size -");\r
+    controlGroup_->Add(sizeDiminishedBt_);\r
+\r
+    addItemBt_ = new UILabelButton();\r
+    addItemBt_->SetPosition(140, 100, 60, 30); // 140, 100, 60, 30: label button size\r
+    addItemBt_->SetOnClickListener(this);\r
+    addItemBt_->SetText("item +");\r
+    controlGroup_->Add(addItemBt_);\r
+\r
+    removeItemBt_ = new UILabelButton();\r
+    removeItemBt_->SetPosition(140, 200, 60, 30); // 140, 200, 60, 30: label button size\r
+    removeItemBt_->SetOnClickListener(this);\r
+    removeItemBt_->SetText("item -");\r
+    controlGroup_->Add(removeItemBt_);\r
+\r
+    updateCameraDistance = new UILabelButton();\r
+    updateCameraDistance->SetPosition(230, 100, 60, 30); // 230, 100, 60, 30: label button size\r
+    updateCameraDistance->SetOnClickListener(this);\r
+    updateCameraDistance->SetText("update distance");\r
+    controlGroup_->Add(updateCameraDistance);\r
+}\r
+\r
+const UIView* UITestSphereView::GetTestView()\r
+{\r
+    return container_;\r
+}\r
+\r
+bool UITestSphereView::OnClick(UIView& view, const ClickEvent& event)\r
+{\r
+    int16_t x = sphereView_->GetX();\r
+    int16_t y = sphereView_->GetY();\r
+    uint16_t width = sphereView_->GetWidth();\r
+    uint16_t height = sphereView_->GetHeight();\r
+    if (&view == controlBt_) {\r
+        bool visible = controlGroup_->IsVisible();\r
+        controlGroup_->SetVisible(!visible);\r
+    } else if (&view == sizeIncreaseBt_) {\r
+        sphereView_->SetPosition(x + (STEP_SIZE >> 1), y + (STEP_SIZE >> 1), width - STEP_SIZE, height - STEP_SIZE);\r
+    } else if (&view == sizeDiminishedBt_) {\r
+        sphereView_->SetPosition(x - (STEP_SIZE >> 1), y - (STEP_SIZE >> 1), width + STEP_SIZE, height + STEP_SIZE);\r
+    } else if (&view == addItemBt_) {\r
+        UITransformGroup* group = new UITransformGroup();\r
+        group->SetPosition(0, 0, 60, 60); // 60: view size\r
+        group->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
+\r
+        UIImageView* image = new UIImageView();\r
+        image->SetPosition(0, 0, 60, 60); // 60: view size\r
+        image->SetAutoEnable(false);\r
+        image->SetResizeMode(UIImageView::ImageResizeMode::FILL);\r
+        ImageInfo* info = ImageCacheManager::GetInstance().LoadSingleRes(RES_PATH"/kaleidoscope.bin");\r
+        image->SetSrc(info);\r
+        group->Add(image);\r
+        sphereView_->Add(group);\r
+    } else if (&view == removeItemBt_) {\r
+        UIView* child = sphereView_->GetChildrenTail();\r
+        if (child != nullptr) {\r
+            sphereView_->Remove(child);\r
+        }\r
+    } else if (&view == updateCameraDistance) {\r
+        sphereView_->SetSphereCameraDistance(-1000); // -1000 cramer distance\r
+    }\r
+    return true;\r
+}\r
+}
\ No newline at end of file
diff --git a/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_sphere_view/ui_test_sphere_view.h b/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_sphere_view/ui_test_sphere_view.h
new file mode 100644 (file)
index 0000000..f13f956
--- /dev/null
@@ -0,0 +1,45 @@
+/*\r
+ * Copyright (c) 2024 CompanyNameMagicTag.\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+#ifndef UI_TEST_SPHERE_VIEW_H\r
+#define UI_TEST_SPHERE_VIEW_H\r
+\r
+#include "components/ui_sphere_view.h"\r
+#include "components/ui_label_button.h"\r
+#include "ui_test.h"\r
+\r
+namespace OHOS {\r
+class UITestSphereView : public UITest, public UIView::OnClickListener {\r
+public:\r
+    UITestSphereView();\r
+    ~UITestSphereView() override {}\r
+    void SetUp() override;\r
+    void TearDown() override;;\r
+    const UIView* GetTestView() override;\r
+    bool OnClick(UIView& view, const ClickEvent& event) override;\r
+private:\r
+    void SetUpLabelButton();\r
+    UIViewGroup* container_ = nullptr;\r
+    UISphereView* sphereView_ = nullptr;\r
+\r
+    UIViewGroup* controlGroup_ = nullptr;\r
+    UILabelButton* controlBt_ = nullptr;\r
+    UILabelButton* sizeIncreaseBt_ = nullptr;\r
+    UILabelButton* sizeDiminishedBt_ = nullptr;\r
+    UILabelButton* addItemBt_ = nullptr;\r
+    UILabelButton* removeItemBt_ = nullptr;\r
+    UILabelButton* updateCameraDistance = nullptr;\r
+};\r
+}\r
+#endif
\ No newline at end of file
index 72eed72..09e3124 100644 (file)
@@ -5,6 +5,7 @@
 #include "ui_test_waterfall_list/ui_test_waterfall_list.h"
 #include "components/root_view.h"
 #include "components/ui_image_view.h"
+#include "components/ui_transform_group.h"
 #include "common/image_cache_manager.h"
 #include "common/screen.h"
 #include "ui_test_list_fps/ui_list_fps_res.h"
@@ -55,6 +56,50 @@ void UITestWaterfallList::SetUpButtons(int16_t xEnd, int16_t yEnd, int16_t xMidd
         modifyBorderRadiusButton_ = new UIButton();
         ConfigButtonAttr(*modifyBorderRadiusButton_, xMiddle - BUTTON_SIZE, yMiddle, BUTTON_SIZE, BUTTON_SIZE);
     }
+    if (modifyModeButton_ == nullptr) {
+        modifyModeButton_ = new UIButton(); // click bottom mid to change mode for next time.
+        ConfigButtonAttr(*modifyModeButton_,
+            (container_->GetWidth() - BUTTON_SIZE) / 2, container_->GetHeight() - BUTTON_SIZE, // 2: divisor
+            BUTTON_SIZE, BUTTON_SIZE);
+        modifyModeButton_->SetStyle(STYLE_BACKGROUND_COLOR, Color::Gray().full);
+    }
+}
+
+void UITestWaterfallList::SetUpChildren()
+{
+    ImageInfo* logo = ImageCacheManager::GetInstance().LoadSingleRes(RES_PATH"hexagons.bin");
+    ImageInfo* arrow = ImageCacheManager::GetInstance().LoadSingleRes(RES_PATH"left_arrow.bin");
+    for (int16_t i = 0; i < IMG_COUNT; i++) {
+        UIImageView* img = new UIImageView();
+        img->SetSrc(logo);
+        if (isImageMode_) {  // test UIImageView
+            img->SetTouchable(true);
+            img->SetOnClickListener(this);
+            waterfallList_->Add(img);
+        } else { // test UITransformGroup
+            UITransformGroup* transformGroup = new UITransformGroup();
+            transformGroup->SetStyle(STYLE_BACKGROUND_OPA, 0);
+            transformGroup->Add(img);
+
+            UIImageView* topImg = new UIImageView();
+            topImg->SetSrc(arrow);
+            transformGroup->Add(topImg);
+
+            UILabel* label = new UILabel();
+            label->SetText("6");
+            transformGroup->Add(label);
+
+            // Layout transformgroup as if displayed in center.
+            img->SetPosition(0, 0, imgSize_, imgSize_);
+            topImg->SetPosition(0, 0, imgSize_ / 3, imgSize_ / 3); // 3: divisor
+            label->SetPosition(imgSize_ - (imgSize_ / 3), 0, imgSize_ / 3, imgSize_ / 3); // 3: divisor
+            transformGroup->SetPosition(0, 0, imgSize_, imgSize_);
+
+            transformGroup->SetTouchable(true);
+            transformGroup->SetOnClickListener(this);
+            waterfallList_->Add(transformGroup);
+        }
+    }
 }
 
 void UITestWaterfallList::SetUp()
@@ -87,14 +132,8 @@ void UITestWaterfallList::SetUp()
     waterfallList_->SetPosition(0, 0,
         container_->GetWidth() - 2 * (horMargin_ + 1), container_->GetHeight() - 2 * (verMargin_ + 1)); // 2, two
 
-    ImageInfo* info = ImageCacheManager::GetInstance().LoadSingleRes(RES_PATH"hexagons.bin");
-    for (int16_t i = 0; i < IMG_COUNT; i++) {
-        UIImageView* img = new UIImageView();
-        img->SetSrc(info);
-        img->SetTouchable(true);
-        img->SetOnClickListener(this);
-        waterfallList_->Add(img);
-    }
+    SetUpChildren();
+
     imgScaleFactor_ = waterfallList_->GetScaleFactorByDistance();
 
     waterfallList_->SetImageDistance(imgDistance_);
@@ -121,6 +160,7 @@ void UITestWaterfallList::TearDown()
     modifyHorMarginButton_ = nullptr;
     modifyVerMarginButton_ = nullptr;
     modifyBorderRadiusButton_ = nullptr;
+    modifyModeButton_ = nullptr;
 }
 
 void UITestWaterfallList::HandleClickEventForRectScreen(const UIView& view)
@@ -160,6 +200,9 @@ bool UITestWaterfallList::OnClick(UIView& view, const ClickEvent& event)
         imgScaleFactor_ += isIncreaseScaleFactor_ ? IMG_SCALE_FACTOR_DELTA : -IMG_SCALE_FACTOR_DELTA;
         waterfallList_->SetScaleFactorByDistance(imgScaleFactor_);
         waterfallList_->LayoutChildren(true);
+    } else if (modifyModeButton_ == &view) {
+        isImageMode_ = !isImageMode_;
+        printf("Change display mode to: %d\n", isImageMode_);
     }
     if (Screen::GetInstance().GetScreenShape() == RECTANGLE) {
         HandleClickEventForRectScreen(view);
index 7b6c61a..fedc2bf 100644 (file)
@@ -25,6 +25,7 @@ private:
     void HandleClickEventForRectScreen(const UIView& view);
     void ConfigButtonAttr(UIView& view, int16_t x, int16_t y, int16_t width, int16_t height);
     void SetUpButtons(int16_t xEnd, int16_t yEnd, int16_t xMiddle, int16_t yMiddle);
+    void SetUpChildren();
     UIWaterfallList* waterfallList_ = nullptr;
     int16_t horMargin_ = 0;
     int16_t verMargin_ = 0;
@@ -46,6 +47,8 @@ private:
     UIButton* modifyVerMarginButton_ = nullptr;
     bool isIncreaseBorderRadius_ = true;
     UIButton* modifyBorderRadiusButton_ = nullptr;
+    bool isImageMode_ = true;
+    UIButton* modifyModeButton_ = nullptr;
 };
 }
 #endif // UI_TEST_WATERFALL_LIST_H
\ No newline at end of file
index ec59ffc..f81ece0 100644 (file)
@@ -69,6 +69,9 @@ UIView::UIView()
 
 UIView::~UIView()
 {
+#if ENABLE_ROTATE_INPUT
+    ClearFocus();
+#endif
     ClearBackgroundBlur();
     if (parent_ != nullptr) {
         GRAPHIC_LOGE("UIView::~UIView failed, parent is not nullptr! Need to remove from parent component first");
index 090a2bd..43ed8fc 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "components/root_view.h"
 #include "gfx_utils/graphic_log.h"
+#include "gfx_utils/vector.h"
 
 namespace OHOS {
 UIViewGroup::UIViewGroup()
@@ -239,6 +240,35 @@ void UIViewGroup::GetTargetView(const Point& point, UIView** last)
     }
 }
 
+static void CalculatedHexagonalRegion(Polygon polygon, Graphic::Vector<Point>& vertexes)
+{
+    vertexes.PushBack({(polygon[0].x_ + polygon[1].x_) / 2, (polygon[0].y_ + polygon[1].y_) / 2});
+    vertexes.PushBack({polygon[1].x_ + (polygon[2].x_ - polygon[1].x_) * 1 / 3,
+        polygon[1].y_ + (polygon[2].y_ - polygon[1].y_) * 1 / 3});
+    vertexes.PushBack({polygon[1].x_ + (polygon[2].x_ - polygon[1].x_) * 2 / 3,
+        polygon[1].y_ + (polygon[2].y_ - polygon[1].y_) * 2 / 3});
+    vertexes.PushBack({(polygon[2].x_ + polygon[3].x_) / 2, (polygon[2].y_ + polygon[3].y_) / 2});
+    vertexes.PushBack({polygon[3].x_ + (polygon[0].x_ - polygon[3].x_) * 1 / 3,
+        polygon[3].y_ + (polygon[0].y_ - polygon[3].y_) * 1 / 3});
+    vertexes.PushBack({polygon[3].x_ + (polygon[0].x_ - polygon[3].x_) * 2 / 3,
+        polygon[3].y_ + (polygon[0].y_ - polygon[3].y_) * 2 / 3});
+}
+static bool CalculatedPointInRegion(Point point, Graphic::Vector<Point>& vertexes)
+{
+    bool isInPolygon = false;
+    int j = 0;
+    for (int i = 0; i < vertexes.Size(); i++) {
+        int16_t sx = vertexes[i].x;
+        int16_t sy = vertexes[i].y;
+        j = (i + 1) % vertexes.Size();
+        int16_t tx = vertexes[j].x;
+        int16_t ty = vertexes[j].y;
+        if (((point.y > sy) && (point.y <= ty)) || ((point.y > ty) && (point.y <= sy))) {
+            isInPolygon ^= (sx + (tx - sx) * (point.y - sy) / (ty - sy) > point.x);
+        }
+    }
+    return isInPolygon;
+}
 void UIViewGroup::GetTargetView(const Point& point, UIView** current, UIView** target)
 {
     if ((current == nullptr) || (target == nullptr)) {
@@ -269,7 +299,15 @@ void UIViewGroup::GetTargetView(const Point& point, UIView** current, UIView** t
         if (!view->IsViewGroup()) {
             rect = view->GetRect();
             if (rect.IsContains(point)) {
-                view->GetTargetView(point, current, target);
+                bool isInPolygon = true;
+                if (view->GetParent()->GetViewType() == UI_ICOSAHEDRON_VIEW) {
+                    Graphic::Vector<Point> vertex(6); // 6: point number
+                    CalculatedHexagonalRegion(view->GetTransformMap().GetPolygon(), vertex);
+                    isInPolygon = CalculatedPointInRegion(point, vertex);
+                }
+                if (isInPolygon) {
+                    view->GetTargetView(point, current, target);
+                }
             }
         } else {
             UIViewGroup* viewGroup = static_cast<UIViewGroup*>(view);
index 3c8b029..eb3b843 100644 (file)
@@ -27,10 +27,11 @@ constexpr int16_t ROTATE_INPUT_THRESHOLD = 1;
 #else
 constexpr int16_t ROTATE_INPUT_THRESHOLD = 10;
 #endif
-}
+}  // namespace
 
 namespace OHOS {
-RotateInputDevice::RotateInputDevice() : rotateStart_(false), threshold_(ROTATE_INPUT_THRESHOLD), cachedRotation_(0) {}
+RotateInputDevice::RotateInputDevice() : rotateStart_(false), threshold_(ROTATE_INPUT_THRESHOLD), cachedRotation_(0)
+{}
 
 void RotateInputDevice::DispatchEvent(const DeviceData& data)
 {
@@ -56,33 +57,37 @@ void RotateInputDevice::DispatchEvent(const DeviceData& data)
     }
 #endif
 
-    UIView* view = FocusManager::GetInstance()->GetFocusedView();
-    if (view == nullptr) {
-        return;
-    }
-
-    UIView* par = view;
-    while (par->GetParent() != nullptr) {
-        if (!par->IsVisible()) {
+    UIView *view = FocusManager::GetInstance()->GetFocusedView();
+    if (view != nullptr) {
+        UIView *par = view;
+        while (par->GetParent() != nullptr) {
+            if (!par->IsVisible()) {
+                return;
+            }
+            par = par->GetParent();
+        }
+        if (par->GetViewType() != UI_ROOT_VIEW) {
             return;
         }
-        par = par->GetParent();
-    }
-    if (par->GetViewType() != UI_ROOT_VIEW) {
-        return;
     }
     if (MATH_ABS(data.rotate) < threshold_ && !rotateStart_ && !cachedToRotate) {
         return;
     }
     if (data.rotate == 0 && rotateStart_) {
-        view->OnRotateEndEvent(0);
+        if (view != nullptr) {
+            view->OnRotateEndEvent(0);
+        }
         rotateStart_ = false;
         return;
     }
     if (!rotateStart_) {
-        view->OnRotateStartEvent(data.rotate);
+        if (view != nullptr) {
+            view->OnRotateStartEvent(data.rotate);
+        }
+    }
+    if (view != nullptr) {
+        view->OnRotateEvent(data.rotate);
     }
-    view->OnRotateEvent(data.rotate);
     rotateStart_ = true;
 }
 } // namespace OHOS
index 477065f..fefb1cc 100644 (file)
@@ -72,6 +72,14 @@ void UIFont::SetFont(BaseFont* font)
     }
 }
 
+bool UIFont::TryToFreeFontCache()
+{
+    if (instance_ == nullptr) {
+        return false;
+    }
+    return instance_->TryToFreeFontCache();
+}
+
 bool UIFont::GetGlyphPathData(uint32_t unicode, uint8_t shapingFont, GlyphPathData& data)
 {
     bool ret = false;
index 1527516..4c36db7 100644 (file)
@@ -204,7 +204,7 @@ uint16_t UIFontVector::GetEmojiWidth(uint32_t unicode, uint8_t fontId)
 {
     ImageInfo info;
     if (!GetEmoji(unicode, info)) {
-        return 0;
+        return INVALID_RET_VALUE;
     }
     uint8_t old = GetBaseFontId();
     SetBaseFontId(fontId);
index 87fcdeb..c532a50 100644 (file)
@@ -348,6 +348,18 @@ public:
         }
     }
 
+    void ClearBlurView(UIView* view)
+    {
+        if (blurView_ == view) {
+            blurView_ = nullptr;
+        }
+    }
+
+    UIView* GetBlurView()
+    {
+        return blurView_;
+    }
+
     void SetSnapshotFlag(bool flag)
     {
         isSnapshot_ = flag;
@@ -358,13 +370,6 @@ public:
         return isSnapshot_;
     }
 
-    void ClearBlurView(UIView* view)
-    {
-        if (blurView_ == view) {
-            blurView_ = nullptr;
-        }
-    }
-
     void Add(UIView* view) override
     {
         appView_.Add(view);
index 8f903f7..89e3f18 100644 (file)
@@ -127,6 +127,7 @@ enum UIViewType : uint8_t {
     UI_TRANSFORM_LIST,
     UI_COVER_FLOW_2,
     UI_WATERFALL_LIST,
+    UI_SPHERE_VIEW,
     UI_NUMBER_MAX
 };
 
index 56a67f3..5373506 100644 (file)
@@ -88,6 +88,11 @@ public:
         return false;
     }
 
+    virtual bool TryToFreeFontCache()
+    {
+        return false;
+    }
+
     /**
      * @brief Get bitmap for specific unicode
      *
index 8589c31..96dcb20 100644 (file)
@@ -143,6 +143,12 @@ public:
      */
     bool GetGlyphPathData(uint32_t unicode, uint8_t shapingFont, GlyphPathData& data);
 
+    /**
+     * @brief Try to free mem used for font cache by LRU rule. This is only applicable for UIFontHWVector.
+     *
+     */
+    bool TryToFreeFontCache();
+
     /**
      * @brief Get bitmap for specific unicode
      *
index 41e6252..8d7899f 100644 (file)
@@ -27,6 +27,7 @@
 #include "media_thread_adapt.h"\r
 #include "msg_center_protocol.h"\r
 #include "cmsis_os2.h"\r
+#include "audio_capturer.h"\r
 \r
 #ifdef __cplusplus\r
 extern "C" {\r
@@ -440,6 +441,13 @@ JSIValue AudioCapturerModule::Stop(const JSIValue thisVal, const JSIValue *args,
     return JSI::CreateBoolean(0);\r
 }\r
 \r
+void AudioCapturerModule::ExceptionStop(void)\r
+{\r
+    if (g_sample.needStop == false) {\r
+        g_sample.needStop = true;\r
+    }\r
+}\r
+\r
 void InitAudioCapturerModule(JSIValue exports)\r
 {\r
     JSI::SetModuleAPI(exports, "Start", AudioCapturerModule::Start);\r
index 96041d0..6d1c917 100644 (file)
@@ -10,7 +10,6 @@
 \r
 #include <cstdint>\r
 #include "jsi.h"\r
-#include "audio_capturer.h"\r
 \r
 #ifdef __cplusplus\r
 extern "C" {\r
@@ -45,6 +44,11 @@ public:
      * Stop\r
      */\r
     static JSIValue Stop(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);\r
+\r
+    /**\r
+     handle exception\r
+     */\r
+    static void ExceptionStop(void);\r
 };\r
 \r
 void InitAudioCapturerModule(JSIValue exports);\r
index 4afc7de..b0a66c8 100644 (file)
@@ -146,7 +146,7 @@ AudioSession AudioServiceAcquireAudioSessionId(void)
 
 bool AudioServiceSetVolume(AudioStreamType streamType, int32_t volume)
 {
-    CHK_FAILED_RETURN(g_audioSVCInited, true, AUDIO_NO_INIT, "Audio Service not init");
+    CHK_FAILED_RETURN(g_audioSVCInited, true, false, "Audio Service not init");
     if (volume < VOLUME_MIN || volume > VOLUME_MAX) {
         return false;
     }
@@ -193,7 +193,7 @@ int32_t AudioServiceGetMaxVolume(AudioStreamType streamType)
 
 bool AudioServiceMute(AudioStreamType streamType)
 {
-    CHK_FAILED_RETURN(g_audioSVCInited, true, AUDIO_NO_INIT, "Audio Service not init");
+    CHK_FAILED_RETURN(g_audioSVCInited, true, false, "Audio Service not init");
     int32_t ret = StreamMgrSetMute(streamType, true);
     if (ret != AUDIO_SUCCESS) {
         return false;
@@ -203,7 +203,7 @@ bool AudioServiceMute(AudioStreamType streamType)
 
 bool AudioServiceUnMute(AudioStreamType streamType)
 {
-    CHK_FAILED_RETURN(g_audioSVCInited, true, AUDIO_NO_INIT, "Audio Service not init");
+    CHK_FAILED_RETURN(g_audioSVCInited, true, false, "Audio Service not init");
     int32_t ret = StreamMgrSetMute(streamType, false);
     if (ret != AUDIO_SUCCESS) {
         return false;
@@ -213,37 +213,37 @@ bool AudioServiceUnMute(AudioStreamType streamType)
 
 bool AudioServiceIsMute(AudioStreamType streamType)
 {
-    CHK_FAILED_RETURN(g_audioSVCInited, true, AUDIO_NO_INIT, "Audio Service not init");
+    CHK_FAILED_RETURN(g_audioSVCInited, true, false, "Audio Service not init");
     return StreamMgrIsMute(streamType);
 }
 
 bool AudioServiceSetMasterMute(bool isMute)
 {
-    CHK_FAILED_RETURN(g_audioSVCInited, true, AUDIO_NO_INIT, "Audio Service not init");
+    CHK_FAILED_RETURN(g_audioSVCInited, true, false, "Audio Service not init");
     return StreamMgrSetMasterMute(isMute);
 }
 
 bool AudioServiceIsMasterMute(void)
 {
-    CHK_FAILED_RETURN(g_audioSVCInited, true, AUDIO_NO_INIT, "Audio Service not init");
+    CHK_FAILED_RETURN(g_audioSVCInited, true, false, "Audio Service not init");
     return StreamMgrIsMasterMute();
 }
 
 bool AudioServiceSetMicrophoneMute(bool isMute)
 {
-    CHK_FAILED_RETURN(g_audioSVCInited, true, AUDIO_NO_INIT, "Audio Service not init");
+    CHK_FAILED_RETURN(g_audioSVCInited, true, false, "Audio Service not init");
     return StreamMgrSetMicrophoneMute(isMute);
 }
 
 bool AudioServiceIsMicrophoneMute(void)
 {
-    CHK_FAILED_RETURN(g_audioSVCInited, true, AUDIO_NO_INIT, "Audio Service not init");
+    CHK_FAILED_RETURN(g_audioSVCInited, true, false, "Audio Service not init");
     return StreamMgrIsMicrophoneMute();
 }
 
 bool AudioServiceSetRingerMode(AudioRingMode mode)
 {
-    CHK_FAILED_RETURN(g_audioSVCInited, true, AUDIO_NO_INIT, "Audio Service not init");
+    CHK_FAILED_RETURN(g_audioSVCInited, true, false, "Audio Service not init");
     return StreamMgrSetRingerMode(mode);
 }
 
index 2cb89f0..70b90c0 100644 (file)
@@ -343,7 +343,7 @@ static int32_t LoadAudioAdapter(const struct AudioAdapterDescriptor *descs, int3
                 ALOGE("Adapter name:%s InitAllPorts failed", (desc == NULL) ? "unknow" : desc->adapterName);\r
                 manager->UnloadAdapter(manager, adapter);\r
                 g_audioHalDesc.audioAdapterDesc[adapterIndex].audioAdapter = NULL;\r
-                continue;\r
+                return AUDIO_ERROR;\r
             }\r
             g_audioHalDesc.audioAdapterDesc[adapterIndex].desc = desc;\r
             adapterIndex++;\r
index 7afbb4a..f54edea 100644 (file)
@@ -55,6 +55,10 @@ typedef struct {
 \r
 static InterruptMgrContext g_interruptMgrCtx;\r
 \r
+static AudioStreamType g_notSupportHandleException[] = {\r
+    AUDIO_STREAM_VOICE_ASSISTANT,\r
+};\r
+\r
 static int64_t GetNowTimeUs(void)\r
 {\r
     struct timeval tv;\r
@@ -524,7 +528,7 @@ bool InterruptMgrCreateStream(AudioSession sessionID, const AudioStreamDescripto
         ALOGD("CreateStream interruptEl->isInterrupted:%d", interruptEl->isInterrupted);\r
         ALOGD("CreateStream interruptEl->sessionID:%d", interruptEl->sessionID);\r
         ALOGD("CreateStream interruptEl->streamType:0x%x", interruptEl->streamType);\r
-        if (!interruptEl->isInterrupted && interruptEl->sessionID == sessionID &&\r
+        if (interruptEl->sessionID == sessionID &&\r
             interruptEl->streamType == streamDesc->streamType) {\r
             /* 先把 streamDesc copy 到 streamDesc 中 */\r
             interruptEl->routedStreamDesc.streamDesc = *streamDesc;\r
@@ -889,6 +893,17 @@ int32_t InterruptMgrRemove(const InterruptElement *interruptEl)
     }\r
     return ret;\r
 }\r
+static bool CheckStreamTypeSupportHandleException(AudioStreamType streamType)\r
+{\r
+    for (uint32_t i = 0; i < sizeof(g_notSupportHandleException) /\r
+        sizeof(g_notSupportHandleException[0]); i++) {\r
+        if (g_notSupportHandleException[i] == streamType) {\r
+            return false;\r
+        }\r
+    }\r
+    return true;\r
+}\r
+\r
 static void InterruptMgrHandleExceptionInner(List *list, bool isOutPut)\r
 {\r
     int64_t nowTimeUs = GetNowTimeUs();\r
@@ -915,7 +930,8 @@ static void InterruptMgrHandleExceptionInner(List *list, bool isOutPut)
         ALOGI("interruptToCreateTimeOutException:%d destroyToDeactiveTimeOutException:%d sessionID:%u streamType:0x%x",\r
             interruptToCreateTimeOutException, destroyToDeactiveTimeOutException, interruptEl->sessionID,\r
             interruptEl->streamType);\r
-        if (interruptToCreateTimeOutException || destroyToDeactiveTimeOutException) {\r
+        if ((interruptToCreateTimeOutException || destroyToDeactiveTimeOutException) &&\r
+            CheckStreamTypeSupportHandleException(interruptEl->streamType)) {\r
             /* 栈顶 是 后台流,说明是被打断的应用 重新获取 interrupt,需要回调打断结束的信息 */\r
             ResumeInterruptStream(interruptEl, list, isOutPut);\r
             it = ListIterErase(list, it);\r
index 3c87f92..6e6cced 100644 (file)
@@ -751,9 +751,12 @@ int32_t SetTrackMute(uintptr_t handle, bool mute)
     TrackHandleContext *context = (TrackHandleContext *)handle;
     CHK_NULL_RETURN(context, AUDIO_ERROR, "track handle is NULL");
     // 状态
-    if (context->state == IDLE || context->state == STOP) {
+    if (context->state == STOP) {
         ALOGE("track[%d] state is wrong, mute fail", context->streamId);
         return AUDIO_BAD_STATE;
+    } else if (context->state == IDLE) {
+        context->mute = mute;
+        return AUDIO_SUCCESS;
     }
     // 调南向
     int32_t ret = context->render->volume.SetMute((AudioHandle)context->render, mute);
index c100f52..4e4a3f6 100644 (file)
@@ -67,6 +67,10 @@ endif()
         false
     )
 
+    set(AUTO_ADD_PATH
+        false
+    )
+
     set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib/media/${BOARD}_${APPLICATION})
 
     build_component()
index c51fbbd..7332621 100644 (file)
@@ -43,7 +43,7 @@ const uint32_t GET_BUFFER_TIMEOUT_MS = 0u;
 const uint32_t RENDER_FULL_SLEEP_TIME_US = 10000u;\r
 // 1. waiting app response playback complete callback event\r
 // 2. waiting interval time for loop playback\r
-const uint32_t RENDER_EOS_SLEEP_TIME_US = 1000000u;\r
+const uint32_t RENDER_EOS_SLEEP_TIME_US = 3000000u;\r
 const uint32_t WAIT_BUFFER_EMPTY_SLEEP_TIME_US = 1000000u;\r
 const uint32_t DECODER_DEFAULT_WIDTH = 1920;\r
 const uint32_t DECODER_DEFAULT_HEIGHT = 1080;\r
@@ -1101,6 +1101,11 @@ void PlayerControl::GetRenderFullSleepThresholdTime(AudioCodecFormat codecFormat
 \r
 void PlayerControl::DataSchPreProcess(PlayerControl *play, bool *isContinue)\r
 {\r
+    if (play->hasRenderAudioEos_) {\r
+        int32_t info = PLAYERCONTROL_ERROR_AUD_PLAY_FAIL;\r
+        play->EventCallback(PLAYERCONTROL_EVENT_ERROR, &info);\r
+        MEDIA_ERR_LOG("player waiting for the EOS callback timed out.");\r
+    }\r
     play->DoSeekIfNeed();\r
 \r
     play->renderSleepTime_ = 0;\r
@@ -1956,8 +1961,7 @@ int32_t PlayerControl::AyncSeek(int64_t seekTime)
 {\r
     CHECK_NULL_RETURN(playerSource_, HI_FAILURE, "playerSource_ nullptr");\r
     int64_t seekTimeInMs = seekTime;\r
-    int32_t ret = DecoderAndSinkReset();\r
-    CHECK_FAILED_RETURN(ret, HI_SUCCESS, ret, "DecoderAndSinkReset failed");\r
+    int32_t ret = 0;\r
     ClearCachePacket();\r
     if (fmtFileInfo_.s32UsedVideoStreamIndex != HI_DEMUXER_NO_MEDIA_STREAM) {\r
         ret = playerSource_->Seek(fmtFileInfo_.s32UsedVideoStreamIndex, seekTimeInMs, FORMAT_SEEK_MODE_BACKWARD_KEY);\r
index e0f8174..a5c6d2a 100644 (file)
@@ -508,6 +508,7 @@ JSIValue AudioModule::StreamTypeSetter(const JSIValue thisVal, const JSIValue *a
     }
     double streamType = JSI::ValueToNumber(args[0]);
     g_streamType = (AudioStreamType)streamType;
+    AudioPlayer::GetInstance()->SetStreamType(g_streamType);
     return JSI::CreateBoolean(true);
 }
 
index 5df5ed0..be612b5 100644 (file)
@@ -314,6 +314,10 @@ bool AudioPlayer::Play()
         MEDIA_ERR_LOG("audio src is required.");
         return false;
     }
+    if (player_->SetAudioStreamType(streamType_) != 0) {
+        MEDIA_ERR_LOG("fail to SetAudioStreamType streamType = %x.", streamType_);
+        return false;
+    }
     if (player_->Play() != 0) {
         MEDIA_ERR_LOG("fail to play audio.");
         return false;
@@ -515,11 +519,15 @@ bool AudioPlayer::SetVolume(double volume)
 
 bool AudioPlayer::SetStreamType(AudioStreamType streamType)
 {
+    streamType_ = streamType;
+    if (player_ == NULL || player_->IsPlaying()) {
+        MEDIA_ERR_LOG("player is NULL or not playing!");
+        return false;
+    }
     if (player_->SetAudioStreamType(streamType) != 0) {
         MEDIA_ERR_LOG("fail to SetAudioStreamType streamType = %x.", streamType);
         return false;
     }
-    streamType_ = streamType;
     return true;
 }
 
index 4f5290b..12c8222 100644 (file)
@@ -699,6 +699,7 @@ static void PlayerStreamExit(SampleParam *sampleParam)
     sampleParam->taskAlive.store(false);\r
     if (!sampleParam->testSample.isStop) {\r
         MediaThreadSetDetach(sampleParam->playTask, true);\r
+               sampleParam->playTask = nullptr;\r
     }\r
 }\r
 \r
index 139a4d5..b3fd209 100644 (file)
@@ -192,27 +192,40 @@ static int32_t VideoPlay(MediaVideoPlay *videoPlay)
         return MEDIA_ERR;\r
     }\r
     videoPlay->player_->SetPlayerCallback(callback);\r
-    int32_t ret = videoPlay->player_->Play();\r
-    if (ret != 0) {\r
-        MEDIA_ERR_LOG("play failed\n");\r
-        (void)videoPlay->player_->Reset();\r
-        (void)videoPlay->player_->Release();\r
-        return MEDIA_ERR;\r
-    }\r
-    videoPlay->player_->EnableSingleLooping(videoPlay->isLoop_);\r
+    int32_t ret = 0;\r
     MediaMutexLock(videoPlay->mutex_);\r
-    videoPlay->isPlayed_ = true;\r
-    if (videoPlay->button_ != nullptr) {\r
-        videoPlay->button_->SetText("Pause");\r
+    if (!videoPlay->isPause_) {\r
+        ret = videoPlay->player_->Play(); \r
+        if (ret != 0) {\r
+            goto EXIT;\r
+        }\r
+        videoPlay->player_->EnableSingleLooping(videoPlay->isLoop_);\r
+        if (videoPlay->button_ != nullptr) {\r
+            videoPlay->button_->SetText("Pause");\r
+        }\r
     }\r
+    videoPlay->isPlayed_ = true;\r
     while (!videoPlay->isPlaybackCompleted_ &&\r
         !videoPlay->isPlaybackStopped_ &&\r
         !videoPlay->interruptHintStop_ &&\r
         !videoPlay->playError_) {\r
         MediaThreadCondWait(videoPlay->cond_, videoPlay->mutex_);\r
+        if (videoPlay->isResume_) {\r
+            ret = videoPlay->player_->Play();\r
+            if (ret != 0) {\r
+                goto EXIT;\r
+            }\r
+            videoPlay->isResume_ = false;\r
+        }\r
     }\r
     MediaMutexUnLock(videoPlay->mutex_);\r
     return 0;\r
+EXIT:\r
+    MEDIA_ERR_LOG("play failed\n");\r
+    (void)videoPlay->player_->Reset();\r
+    (void)videoPlay->player_->Release();\r
+    MediaMutexUnLock(videoPlay->mutex_);\r
+    return MEDIA_ERR;\r
 }\r
 \r
 static void VideoStopAndExit(MediaVideoPlay *videoPlay)\r
@@ -419,6 +432,7 @@ void MediaVideoPlay::ResetVideoPlayState(void)
     isSyncExitMode_ = true;\r
     isPause_ = false;\r
     isPlayed_ = false;\r
+    isResume_ = false;\r
 }\r
 \r
 int32_t MediaVideoPlay::StartVideoPlay(void)\r
@@ -427,6 +441,13 @@ int32_t MediaVideoPlay::StartVideoPlay(void)
         MEDIA_INFO_LOG("video play is not stop, can not start!");\r
         return MEDIA_OK;\r
     }\r
+\r
+    // prepare buffers which are used to playing video\r
+    LiteSurface* liteSurface = dynamic_cast<LiteSurface*>(surface_);\r
+    if (liteSurface != nullptr) {\r
+        liteSurface->PrepareBuffers();\r
+    }\r
+\r
     isEntered_ = true;\r
     ResetVideoPlayState();\r
     MediaThreadattr attr = { "VideoPlayThread", 0x2000, THREAD_SCHED_INVALID, 0, true };\r
@@ -446,15 +467,17 @@ int32_t MediaVideoPlay::StartVideoPlay(void)
 int32_t MediaVideoPlay::PauseVideoPlay(void)\r
 {\r
     MediaMutexLock(mutex_);\r
-    if (player_ == nullptr) {\r
-        MEDIA_ERR_LOG("can not pause play");\r
+    if (!isEntered_ ||isPlaybackStopped_ ||\r
+        isPlaybackCompleted_ || interruptHintStop_ ||\r
+        isPause_) {\r
+        MEDIA_ERR_LOG("current state is invaild, can not pause play");\r
         MediaMutexUnLock(mutex_);\r
         return MEDIA_ERR;\r
     }\r
-    if (isPlaybackStopped_ || isPlaybackCompleted_ || interruptHintStop_) {\r
-        MEDIA_ERR_LOG("current state is stop, can not pause play");\r
+    isPause_ = true;\r
+    if (player_ == nullptr || !isPlayed_ ) {\r
         MediaMutexUnLock(mutex_);\r
-        return MEDIA_ERR;\r
+        return MEDIA_OK;\r
     }\r
     int32_t ret = player_->Pause();\r
     if (ret != MEDIA_OK) {\r
@@ -462,7 +485,6 @@ int32_t MediaVideoPlay::PauseVideoPlay(void)
         MediaMutexUnLock(mutex_);\r
         return MEDIA_ERR;\r
     }\r
-    isPause_ = true;\r
     MediaMutexUnLock(mutex_);\r
     return ret;\r
 }\r
@@ -470,40 +492,69 @@ int32_t MediaVideoPlay::PauseVideoPlay(void)
 int32_t MediaVideoPlay::ResumeVideoPlay(void)\r
 {\r
     MediaMutexLock(mutex_);\r
-    if (player_ == nullptr) {\r
-        MEDIA_ERR_LOG("can not resume play");\r
+    if (!isEntered_ || isPlaybackStopped_ ||\r
+        isPlaybackCompleted_ || interruptHintStop_ ||\r
+        !isPause_) {\r
+        MEDIA_ERR_LOG("current state is invaild, can not resume play");\r
         MediaMutexUnLock(mutex_);\r
         return MEDIA_ERR;\r
     }\r
-    if (isPlaybackStopped_ || isPlaybackCompleted_ || interruptHintStop_) {\r
-        MEDIA_ERR_LOG("current state is stop, can not resume play");\r
+    isPause_ = false;\r
+    if (player_ == nullptr || !isPlayed_) {\r
+        MediaMutexUnLock(mutex_);\r
+        return MEDIA_OK;\r
+    }\r
+    isResume_ = true;\r
+    MediaThreadCondSignal(cond_);\r
+    MediaMutexUnLock(mutex_);\r
+    return MEDIA_OK;\r
+}\r
+\r
+int32_t MediaVideoPlay::GetDumpInfo(PlayerDebugInfo *playerInfo)\r
+{\r
+    MediaMutexLock(mutex_);\r
+    if (player_ == nullptr) {\r
+        MEDIA_ERR_LOG("can not get dump info!");\r
         MediaMutexUnLock(mutex_);\r
         return MEDIA_ERR;\r
     }\r
-    int32_t ret = player_->Play();\r
+    int32_t ret = player_->DumpInfo(playerInfo);\r
     if (ret != MEDIA_OK) {\r
-        MEDIA_ERR_LOG("resume failed");\r
+        MEDIA_ERR_LOG("get dump info failed");\r
         MediaMutexUnLock(mutex_);\r
         return ret;\r
     }\r
-    isPause_ = false;\r
     MediaMutexUnLock(mutex_);\r
     return ret;\r
 }\r
 \r
-int32_t MediaVideoPlay::GetDumpInfo(PlayerDebugInfo *playerInfo)\r
+int32_t MediaVideoPlay::SeekVideoPlay(int64_t mSeconds)\r
 {\r
     MediaMutexLock(mutex_);\r
     if (player_ == nullptr) {\r
-        MEDIA_ERR_LOG("can not get dump info!");\r
+        MEDIA_ERR_LOG("can not seek!");\r
         MediaMutexUnLock(mutex_);\r
         return MEDIA_ERR;\r
     }\r
-    int32_t ret = player_->DumpInfo(playerInfo);\r
+    int32_t ret = player_->Rewind(mSeconds, PLAYER_SEEK_CLOSEST_SYNC);\r
     if (ret != MEDIA_OK) {\r
-        MEDIA_ERR_LOG("get dump info failed");\r
+        MEDIA_ERR_LOG("video player seek failed!");\r
+    }\r
+    MediaMutexUnLock(mutex_);\r
+    return ret;\r
+}\r
+\r
+int32_t MediaVideoPlay::GetCurrentPosition(int64_t *currentPosition)\r
+{\r
+    MediaMutexLock(mutex_);\r
+    if (player_ == nullptr) {\r
+        MEDIA_ERR_LOG("can not get current play position!");\r
         MediaMutexUnLock(mutex_);\r
-        return ret;\r
+        return MEDIA_ERR;\r
+    }\r
+    int32_t ret = player_->GetCurrentTime(*currentPosition);\r
+    if (ret != MEDIA_OK) {\r
+        MEDIA_ERR_LOG("video player get current play position failed!");\r
     }\r
     MediaMutexUnLock(mutex_);\r
     return ret;\r
index 07d07f3..d1e689a 100644 (file)
@@ -35,6 +35,8 @@ public:
     int32_t PauseVideoPlay(void);\r
     int32_t ResumeVideoPlay(void);\r
     int32_t GetDumpInfo(PlayerDebugInfo *playerInfo);\r
+    int32_t SeekVideoPlay(int64_t mSeconds);\r
+    int32_t GetCurrentPosition(int64_t *currentPosition);\r
     void SetVideoPlayLoop(bool isLoop);\r
     void SetSyncExitMode(bool isSyncExitMode);\r
     bool IsSyncExitMode(void);\r
@@ -50,6 +52,7 @@ public:
     MediaThreadCondHandle cond_ = nullptr;\r
     MediaThreadIdHandle threadHandle_ = nullptr;\r
     UILabelButton *button_ = nullptr;\r
+    bool isResume_ = false;\r
     bool isPause_ = false;\r
     bool isPlayed_ = false;\r
     bool isLoop_ = true;\r
index ba0ba9c..259abc3 100644 (file)
@@ -47,6 +47,8 @@ extern "C" {
 
 #define CAST_SND_PORT_NUM 1
 
+#define BT_DETACH_FAIL_RETRY_TIMES 3
+
 #define MAX_KEY_STR_LEN 10
 
 #define MAX_BUF_LEN 1024
@@ -1322,19 +1324,37 @@ static int32_t AudioSDKStopInternal(const SubPortTrackContext *portTrackCtx)
     return MEDIA_HAL_OK;
 }
 
+#if defined(BT_HAL_SUPPORT) && defined(SUPPORT_BREDR)
+static int32_t BtDetachHandle(const SubPortTrackContext *portTrackCtx, bt_audio_port_params portParam)
+{
+    int32_t count = 0;
+    td_u32 btRet = MEDIA_HAL_OK;
+    while (count < BT_DETACH_FAIL_RETRY_TIMES) {
+        btRet = bt_detach_audio_port(portTrackCtx->btStreamHandle, &portParam);
+        if (btRet == MEDIA_HAL_OK) {
+            MEDIA_HAL_LOGI(MODULE_NAME, "bt detach audio port success!");
+            return MEDIA_HAL_OK;
+        }
+        count++;
+        MEDIA_HAL_LOGE(MODULE_NAME, "bt detach audio port retry ret = %x, count: %d", count, btRet);
+    }
+    return MEDIA_HAL_ERR;
+}
+#endif
+
 static int32_t BluetoothDetachInternal(const SubPortTrackContext *portTrackCtx)
 {
+    int32_t ret = MEDIA_HAL_OK;
 #if defined(BT_HAL_SUPPORT) && defined(SUPPORT_BREDR)
     if (portTrackCtx->isHandlePublicResource) {
         bt_audio_port_params portParam = {};
         portParam.port_type = A2DP;
         portParam.share_mem_id = portTrackCtx->outputAdpHandle;
-        td_u32 btRet = bt_detach_audio_port(portTrackCtx->btStreamHandle, &portParam);
-        CHK_FAILED_NO_RETURN(btRet, MEDIA_HAL_OK, "bt detach audio port failed");
+        ret = BtDetachHandle(portTrackCtx, portParam);
     }
 #endif
     MEDIA_HAL_LOGD(MODULE_NAME, "success");
-    return MEDIA_HAL_OK;
+    return ret;
 }
 
 static int32_t AudioSDKDetachInternal(const SubPortTrackContext *portTrackCtx)
@@ -2586,15 +2606,15 @@ static int32_t BluetoothAttach(SubPortContext *portCtx, SubPortTrackContext *por
 
 static int32_t BluetoothDetach(const SubPortContext *portCtx, const SubPortTrackContext *portTrackCtx)
 {
+    int32_t ret = MEDIA_HAL_OK;
 #if defined(BT_HAL_SUPPORT) && defined(SUPPORT_BREDR)
     bt_audio_port_params portParam = {};
     portParam.port_type = A2DP;
     portParam.share_mem_id = portCtx->outputAdpHandle;
-    td_u32 btRet = bt_detach_audio_port(portTrackCtx->btStreamHandle, &portParam);
-    CHK_FAILED_RETURN(btRet, MEDIA_HAL_OK, MEDIA_HAL_ERR, "bt detach audio port failed");
+    ret = BtDetachHandle(portTrackCtx, portParam);
 #endif
     MEDIA_HAL_LOGD(MODULE_NAME, "success");
-    return MEDIA_HAL_OK;
+    return ret;
 }
 
 static int32_t SingletonResourceStartInternal(const SubPortContext *portCtx, SubPortTrackContext *portTrackCtx)
index cfcab08..7202631 100644 (file)
@@ -67,6 +67,10 @@ set(MAIN_COMPONENT
     false\r
 )\r
 \r
+set(AUTO_ADD_PATH\r
+    false\r
+)\r
+\r
 set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib/media/${BOARD}_${APPLICATION}/${OS})\r
 \r
 build_component()\r
index 9b83059..d56b3f2 100644 (file)
@@ -504,7 +504,6 @@ static int32_t CheckParam(SubPortTrackInContext *portTrackInCtx, uint8_t *buffer
         MEDIA_HAL_LOGE(MODULE_NAME, "memcpy_s failed");
         return MEDIA_HAL_ERR;
     }
-
     int64_t sec = 0;
     int64_t nsec = 0;
     int32_t ret = MediaHalConvertUSecToSecAndNSec(audioStream.pts, &sec, &nsec);
index 05ceec5..41afbba 100644 (file)
@@ -46,6 +46,10 @@ set(MAIN_COMPONENT
     false\r
 )\r
 \r
+set(AUTO_ADD_PATH\r
+    false\r
+)\r
+\r
 set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib/media/${BOARD}_${APPLICATION}/${OS})\r
 \r
 build_component()\r
index 97b40f4..76a5c13 100644 (file)
@@ -68,6 +68,10 @@ set(MAIN_COMPONENT
     false\r
 )\r
 \r
+set(AUTO_ADD_PATH\r
+    false\r
+)\r
+\r
 set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib/media/${BOARD}_${APPLICATION}/${OS})\r
 \r
 build_component()\r
index 93e14b5..aa66f00 100644 (file)
@@ -13,6 +13,7 @@ set(PUBLIC_HEADER
 )
 
 set(PRIVATE_HEADER
+    ${CMAKE_CURRENT_SOURCE_DIR}/include
     ${CMAKE_SOURCE_DIR}/drivers/drivers/driver/audio/include
 )
 
@@ -37,5 +38,7 @@ set(WHOLE_LINK
 set(MAIN_COMPONENT
     false
 )
-
+set(AUTO_ADD_PATH
+    false
+)
 build_component()
index 0db1fa1..10e081b 100644 (file)
@@ -13,6 +13,7 @@ set(PUBLIC_HEADER
 )
 
 set(PRIVATE_HEADER
+    ${CMAKE_CURRENT_SOURCE_DIR}/include
     ${CMAKE_SOURCE_DIR}/drivers/drivers/driver/audio/include
 )
 
@@ -38,4 +39,8 @@ set(MAIN_COMPONENT
     false
 )
 
+set(AUTO_ADD_PATH
+    false
+)
+
 build_component()
index 762672d..fb9cf6a 100644 (file)
@@ -13,6 +13,7 @@ set(PUBLIC_HEADER
 )
 
 set(PRIVATE_HEADER
+    ${CMAKE_CURRENT_SOURCE_DIR}/include
     ${CMAKE_SOURCE_DIR}/drivers/drivers/driver/audio/source/include
     ${CMAKE_SOURCE_DIR}/drivers/drivers/driver/audio/source/drv/include
     ${CMAKE_SOURCE_DIR}/drivers/drivers/driver/audio/source/core/common/include
@@ -40,4 +41,8 @@ set(MAIN_COMPONENT
     false
 )
 
+set(AUTO_ADD_PATH
+    false
+)
+
 build_component()
index 03865a5..f17a6dd 100644 (file)
@@ -13,6 +13,7 @@ set(PUBLIC_HEADER
 )
 
 set(PRIVATE_HEADER
+    ${CMAKE_CURRENT_SOURCE_DIR}/include
        ${CMAKE_SOURCE_DIR}/middleware/utils/common_headers/drivers/gpu
        ${CMAKE_SOURCE_DIR}/middleware/chips/brandy/dfx/include
        ${CMAKE_SOURCE_DIR}/middleware/services/gpu/drv/include
@@ -40,4 +41,8 @@ set(MAIN_COMPONENT
     false
 )
 
+set(AUTO_ADD_PATH
+    false
+)
+
 build_component()
index 86351c9..24df0d4 100644 (file)
@@ -13,6 +13,7 @@ set(PUBLIC_HEADER
 )
 
 set(PRIVATE_HEADER
+    ${CMAKE_CURRENT_SOURCE_DIR}/include
     ${CMAKE_SOURCE_DIR}/include/middleware/utils
     ${CMAKE_SOURCE_DIR}/middleware/utils/nv/nv_storage_lib
     ${CMAKE_SOURCE_DIR}/middleware/utils/nv/nv_storage_app
@@ -40,4 +41,8 @@ set(MAIN_COMPONENT
     false
 )
 
+set(AUTO_ADD_PATH
+    false
+)
+
 build_component()
index c23cf2f..b1961b0 100644 (file)
@@ -13,6 +13,7 @@ set(PUBLIC_HEADER
 )
 
 set(PRIVATE_HEADER
+    ${CMAKE_CURRENT_SOURCE_DIR}/include
     ${CMAKE_SOURCE_DIR}/middleware/utils/update/inner_include
 )
 
@@ -38,4 +39,8 @@ set(MAIN_COMPONENT
     false
 )
 
+set(AUTO_ADD_PATH
+    false
+)
+
 build_component()
index cfc45a7..d490116 100644 (file)
@@ -43,6 +43,8 @@
 #ifdef CFG_DRIVERS_NANDFLASH
 #include "nandflash_config.h"
 #endif
+#include "preserve.h"
+#include "exception_dump.h"
 
 #define NON_OS_ENTER_MAX_NUM 8
 #define MAX_STR_LEN  64
@@ -286,6 +288,7 @@ void panic_deal(panic_id_t origin, uint32_t code, uint32_t caller)
     nand_driver_init(SPEED_SLOW);
     set_trans_type(TRANS_BY_CPU_SINGLE_LINE);
 #if defined(SAVE_EXC_INFO) && (CONFIG_DFX_SUPPORT_FILE_SYSTEM == DFX_YES)
+    dump_all_to_file();
     save_preserve_file_to_fs();
 #endif
 #endif
index 8ae1a8d..965c4c5 100644 (file)
@@ -118,6 +118,8 @@ void save_preserve_file_fs(void);
 void save_btram_file_to_fs(void);
 
 void save_btrace_file_to_fs(void);
+
+void save_preserve_file_to_fs(void);
 #endif
 /**
  * @}
index 9a69c8c..a639a28 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-auto-ota-cli/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-auto-ota-cli/libx_vfs_private.a differ
index f242a63..81da18b 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-auto-ota-ser/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-auto-ota-ser/libx_vfs_private.a differ
index 814210a..90cd1c0 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd230-r/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd230-r/libx_vfs_private.a differ
index 30cef40..3af2531 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd230/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd230/libx_vfs_private.a differ
index 814210a..90cd1c0 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-lt22-r/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-lt22-r/libx_vfs_private.a differ
index 30cef40..3af2531 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-lt22/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-lt22/libx_vfs_private.a differ
index 814210a..90cd1c0 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-r/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-r/libx_vfs_private.a differ
diff --git a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-u8-r/libx_vfs_private.a b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-u8-r/libx_vfs_private.a
new file mode 100644 (file)
index 0000000..90cd1c0
Binary files /dev/null and b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-u8-r/libx_vfs_private.a differ
diff --git a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-u8/libx_vfs_private.a b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-u8/libx_vfs_private.a
new file mode 100644 (file)
index 0000000..3af2531
Binary files /dev/null and b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-u8/libx_vfs_private.a differ
index 814210a..90cd1c0 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-w9-r/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-w9-r/libx_vfs_private.a differ
index 30cef40..3af2531 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-w9/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-w9/libx_vfs_private.a differ
index 30cef40..3af2531 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-native-js/libx_vfs_private.a differ
index 4150308..fbd8507 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-target1-r/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-target1-r/libx_vfs_private.a differ
index aca09f5..68cd64f 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-target1/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-target1/libx_vfs_private.a differ
index cbe84bd..f8270f1 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-target3-r/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-target3-r/libx_vfs_private.a differ
index 195b522..8d5a93d 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-target3/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-target3/libx_vfs_private.a differ
index 6312401..f0b10fa 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-target4-r/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-target4-r/libx_vfs_private.a differ
index 8d53d79..e7f061d 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-target4/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-target4/libx_vfs_private.a differ
index cacbfe1..87aa51b 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-target5-r/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-target5-r/libx_vfs_private.a differ
index 145ef37..81f6726 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-target5/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-target5/libx_vfs_private.a differ
index 70d8f47..97e0837 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-xts-r/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-xts-r/libx_vfs_private.a differ
index 5a8e9fa..ebe05dc 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-xts/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-xts/libx_vfs_private.a differ
index f0d211e..1df93e5 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/testsuite-brandy-sdk/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/testsuite-brandy-sdk/libx_vfs_private.a differ
index a2b0921..910c73b 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-auto-ota-cli/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-auto-ota-cli/libfs_yaffs2.a differ
index 29f78ce..de04817 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-auto-ota-ser/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-auto-ota-ser/libfs_yaffs2.a differ
index 5702adb..d02a595 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd230-r/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd230-r/libfs_yaffs2.a differ
index d8ea349..0afcd56 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd230/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd230/libfs_yaffs2.a differ
index 5702adb..d02a595 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-lt22-r/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-lt22-r/libfs_yaffs2.a differ
index d8ea349..0afcd56 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-lt22/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-lt22/libfs_yaffs2.a differ
index 5702adb..d02a595 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-r/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-r/libfs_yaffs2.a differ
diff --git a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-u8-r/libfs_yaffs2.a b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-u8-r/libfs_yaffs2.a
new file mode 100644 (file)
index 0000000..d02a595
Binary files /dev/null and b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-u8-r/libfs_yaffs2.a differ
diff --git a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-u8/libfs_yaffs2.a b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-u8/libfs_yaffs2.a
new file mode 100644 (file)
index 0000000..0afcd56
Binary files /dev/null and b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-u8/libfs_yaffs2.a differ
index 5702adb..d02a595 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-w9-r/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-w9-r/libfs_yaffs2.a differ
index d8ea349..0afcd56 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-w9/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-w9/libfs_yaffs2.a differ
index d8ea349..0afcd56 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js/libfs_yaffs2.a differ
index 55f51b2..31c392d 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-target1-r/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-target1-r/libfs_yaffs2.a differ
index 0d4a77c..73f31e0 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-target1/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-target1/libfs_yaffs2.a differ
index 548842c..0ac8232 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-target3-r/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-target3-r/libfs_yaffs2.a differ
index 2ca681e..6168839 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-target3/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-target3/libfs_yaffs2.a differ
index f82ffff..4912837 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-target4-r/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-target4-r/libfs_yaffs2.a differ
index 224049d..34f078d 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-target4/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-target4/libfs_yaffs2.a differ
index e9e4ba9..e7711cd 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-target5-r/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-target5-r/libfs_yaffs2.a differ
index b8fb6fb..5a189d3 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-target5/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-target5/libfs_yaffs2.a differ
index 22f84d3..0ae61a1 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-xts-r/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-xts-r/libfs_yaffs2.a differ
index ae19d6a..2a92401 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-xts/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-xts/libfs_yaffs2.a differ
index 3663426..a208c1c 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/testsuite-brandy-sdk/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/testsuite-brandy-sdk/libfs_yaffs2.a differ
index 673d8e8..8fefb41 100644 (file)
@@ -1,11 +1,11 @@
 set(COMPONENT_NAME "i18n")
 
 set(PUBLIC_HEADER
-    ${CMAKE_CURRENT_SOURCE_DIR}/frameworks/i18n/include
-    ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/kits/i18n/include
 )
 
 set(PRIVATE_HEADER
+    ${CMAKE_CURRENT_SOURCE_DIR}/frameworks/i18n/include
+    ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/kits/i18n/include
 )
 
 set(SOURCES
index 9b7c38f..3c16268 100644 (file)
@@ -3,10 +3,10 @@ set(MODULE_NAME "ohos")
 set(AUTO_DEF_FILE_ID TRUE)
 
 set(PUBLIC_HEADER
-    ${CMAKE_CURRENT_SOURCE_DIR}/include
 )
 
 set(PRIVATE_HEADER
+    ${CMAKE_CURRENT_SOURCE_DIR}/include
     ${ROOT_DIR}/open_source/openharmony/foundation/ace/ace_engine_lite/interfaces/base
     ${ROOT_DIR}/open_source/mbedtls/mbedtls_v3.6.0/include
     ${ROOT_DIR}/open_source/openharmony/third_party/cJSON
@@ -52,4 +52,8 @@ set(PRIVATE_DEFINES
     MBEDTLS_ALLOW_PRIVATE_ACCESS
 )
 
+set(AUTO_ADD_PATH
+    false
+)
+
 build_component()
index 892af1d..f2f4e74 100644 (file)
@@ -44,6 +44,8 @@ extern "C" {
 #endif
 
 typedef bool (*TryToFreeImgCallback)(void);
+typedef bool (*TryToFreeFontCacheCallback)(void);
+
 /**
  * @brief Defines pointers to the memory driver functions.
  */
@@ -143,6 +145,8 @@ typedef struct {
     int32_t (*InvalidateCache)(BufferHandle* handle);
 
     void (*RegisterTryToFreeImgCallback)(TryToFreeImgCallback callback);
+
+    void (*RegisterTryToFreeFontCacheCallback)(TryToFreeFontCacheCallback callback);
 } GrallocFuncs;
 
 /**
index af06f6a..e9e6882 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-auto-ota-cli/libams.a and b/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-auto-ota-cli/libams.a differ
index 687c70a..0e42f4d 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-auto-ota-ser/libams.a and b/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-auto-ota-ser/libams.a differ
index acde21e..41ab313 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-fd230/libams.a and b/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-fd230/libams.a differ
index acde21e..41ab313 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-lt22/libams.a and b/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-lt22/libams.a differ
diff --git a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-u8/libams.a b/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-u8/libams.a
new file mode 100644 (file)
index 0000000..41ab313
Binary files /dev/null and b/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-u8/libams.a differ
index acde21e..41ab313 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-w9/libams.a and b/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-w9/libams.a differ
index acde21e..41ab313 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js/libams.a and b/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js/libams.a differ
index 05db491..8f65cd1 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-xts/libams.a and b/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-xts/libams.a differ
index 156b370..9317060 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-auto-ota-cli/libace.a and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-auto-ota-cli/libace.a differ
index 59c8f2f..56918f0 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-auto-ota-ser/libace.a and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-auto-ota-ser/libace.a differ
index 04b5b74..619e8fb 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-fd230/libace.a and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-fd230/libace.a differ
index 04b5b74..619e8fb 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-lt22/libace.a and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-lt22/libace.a differ
diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-u8/libace.a b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-u8/libace.a
new file mode 100644 (file)
index 0000000..619e8fb
Binary files /dev/null and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-u8/libace.a differ
index 04b5b74..619e8fb 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-w9/libace.a and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-w9/libace.a differ
index 04b5b74..619e8fb 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js/libace.a and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js/libace.a differ
index f1f1a1a..5ea6a40 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-xts/libace.a and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-xts/libace.a differ
index 1615474..662cfb3 100644 (file)
@@ -256,7 +256,7 @@ bool ViewOnSwipeListener::OnDrag(UIView& view, const DragEvent& event)
 {
     UNUSED(view);
     UNUSED(event);
-    HILOG_DEBUG(HILOG_MODULE_ACE, "OnDrag received");
+    // HILOG_DEBUG(HILOG_MODULE_ACE, "OnDrag received");
     return isStopPropagation_;
 }
 
index 46303e3..6d35188 100644 (file)
@@ -71,13 +71,19 @@ public:
         direction_ = direction;
     }
 
+    void DeleteItem(const UIView *uiView);
+
+    uint8_t GetDirection()
+    {
+        return direction_;
+    }
+
 private:
     bool GenerateListItems(const JSValue descriptors, int16_t size);
     int16_t CalculateItemIndex(int16_t itemIndex) const;
     JSValue GetElement(int16_t listItemsIndex, int16_t index, bool &isFor) const;
     bool AddForDescriptorToList(JSValue descriptorOrElement, int16_t listItemsIndex) const;
     void InsertItem(JSValue nativeElement, UIView *uiView);
-    void DeleteItem(const UIView *uiView);
     void BuildItemViewTree(const JSValue element) const;
     ListItemValue *listItems_;
     ViewNativePair *headNode_;
index 7c39599..579042c 100644 (file)
@@ -25,11 +25,15 @@ namespace OHOS {
 namespace ACELite {
 const char * const ListComponent::FUNC_SCROLLTO = "scrollTo";
 const char * const ListComponent::INDEX_SCROLLTO = "index";
+const char * const ListComponent::FUNC_SCROLLTO_END = "scrollToEnd";
+static uint16_t itemslenght = 0;
+
 ListComponent::ListComponent(JSValue options, JSValue children, AppStyleManager *styleManager)
     : Component(options, children, styleManager)
 {
     SetComponentName(K_LIST);
     RegisterNamedFunction(FUNC_SCROLLTO, ListScrollTo);
+    RegisterNamedFunction(FUNC_SCROLLTO_END, ListScrollToEnd);
     list_.SetIntercept(true);
 #ifdef FEATURE_ROTATION_API
     RegisterNamedFunction(FUNC_ROTATION_NAME, HandleRotationRequest);
@@ -153,6 +157,8 @@ void ListComponent::OnViewAttached()
     adapter_.SetDirection(list_.GetDirection());
     // Step4. add children to list dynamically.
     list_.SetAdapter(&adapter_);
+    // init compute list height
+    ComputeListLength();
 }
 
 bool ListComponent::UpdateForView()
@@ -178,6 +184,8 @@ bool ListComponent::UpdateForView()
 
     // refresh the list, load new child dynamically in list.
     list_.RefreshList();
+    // refresh list , recompute list height
+    ComputeListLength();
     return true;
 }
 
@@ -196,5 +204,37 @@ JSValue ListComponent::ListScrollTo(const JSValue func, const JSValue dom,
     }
     return UNDEFINED;
 }
-} // namespace ACELite
-} // namespace OHOS
+
+void ListComponent::ComputeListLength()
+{
+    itemslenght = 0;
+    for (uint16_t index = 0; index < adapter_.GetCount(); index++) {
+        UIView *view = adapter_.GetView(nullptr, index);
+        if (view != nullptr) {
+            if (adapter_.GetDirection() == UIList::VERTICAL) {
+                itemslenght += view->GetHeightWithMargin();
+            } else {
+                itemslenght += view->GetWidthWithMargin();
+            }
+            adapter_.DeleteItem(view);
+        } else {
+            HILOG_ERROR(HILOG_MODULE_ACE, "List compent: ComputeListLength  item view is null ");
+        }
+    }
+}
+
+JSValue ListComponent::ListScrollToEnd(
+    const JSValue func, const JSValue dom, const JSValue args[], const jerry_length_t size)
+{
+    UIList *list = reinterpret_cast<UIList *>(ComponentUtils::GetViewFromBindingObject(dom));
+    if (list != nullptr) {
+        if (itemslenght > list->GetHeight()) {
+            uint16_t listlenght = itemslenght - list->GetHeight();
+            list->ScrollBy(-listlenght);
+        }
+    }
+    return UNDEFINED;
+}
+
+}  // namespace ACELite
+}  // namespace OHOS
index 80dd7d2..41c3bc2 100644 (file)
@@ -46,7 +46,10 @@ private:
     ListEventListener listEventListener_;
     static const char * const FUNC_SCROLLTO;
     static const char * const INDEX_SCROLLTO;
+    static const char * const FUNC_SCROLLTO_END;
     static JSValue ListScrollTo(const JSValue func, const JSValue dom, const JSValue args[], const jerry_length_t size);
+    static JSValue ListScrollToEnd(const JSValue func, const JSValue dom, const JSValue args[], const jerry_length_t size);
+    void ComputeListLength();
 };
 } // namespace ACELite
 } // namespace OHOS
index c166a79..4bf1759 100644 (file)
@@ -324,7 +324,8 @@ static void ExecuteSendMsgToJS(void *data)
     HILOG_INFO(HILOG_MODULE_ACE, "ExecuteSendMsgToJS type = %d flag = %d", type, flag);
     if (!flag) {
         if ((!CheckIsJsValueFunction(fail)) || (!CheckIsJsValueDefined(context))) {
-            HILOG_ERROR(HILOG_MODULE_ACE, "Error in ExecuteSendMsgToJS. Invalid params detected!");
+            HILOG_ERROR(HILOG_MODULE_ACE, "ExecuteSendMsgToJS Callback or Context is nullptr!");
+            OHOS::ACELite::JSI::ReleaseValue(dataInfo);
             AdapterFree(msgBody);
             return;
         }
@@ -333,7 +334,8 @@ static void ExecuteSendMsgToJS(void *data)
         OHOS::ACELite::JSI::ReleaseValue(dataInfo);
     } else {
         if ((!CheckIsJsValueDefined(context)) || (!CheckIsJsValueFunction(success))) {
-            HILOG_ERROR(HILOG_MODULE_ACE, "Error in ExecuteSendMsgToJS. Invalid params detected!");
+            HILOG_ERROR(HILOG_MODULE_ACE, "ExecuteSendMsgToJS Callback or Context is nullptr!");
+            OHOS::ACELite::JSI::ReleaseValue(dataInfo);
             AdapterFree(msgBody);
             return;
         }
@@ -638,7 +640,7 @@ JSIValue BaiduMapComponentModule::poi_nearby_search(const JSIValue thisVal, cons
 {
     HILOG_INFO(HILOG_MODULE_ACE, "poi_nearby_search");
     char *data = JSI::JsonStringify(args[0]);
-    HILOG_INFO(HILOG_MODULE_ACE, "poi_nearby_search : %s \n", data);
+    HILOG_INFO(HILOG_MODULE_ACE, "poi_nearby_search : %s", data);
     // success Callback & failed Callback
     ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_POI);
     poi_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
@@ -658,7 +660,7 @@ JSIValue BaiduMapComponentModule::route_riding_search(const JSIValue thisVal, co
 {
     HILOG_INFO(HILOG_MODULE_ACE, "route_riding_search");
     char *data = JSI::JsonStringify(args[0]);
-    HILOG_INFO(HILOG_MODULE_ACE, "route_riding_search : %s \n", data);
+    HILOG_INFO(HILOG_MODULE_ACE, "route_riding_search : %s", data);
     // success Callback & failed Callback
     ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_RIDING_SEARCH);
     route_riding_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
@@ -680,7 +682,7 @@ JSIValue BaiduMapComponentModule::route_walking_search(const JSIValue thisVal, c
 {
     HILOG_INFO(HILOG_MODULE_ACE, "route_walking_search");
     char *data = JSI::JsonStringify(args[0]);
-    HILOG_INFO(HILOG_MODULE_ACE, "route_walking_search : %s \n", data);
+    HILOG_INFO(HILOG_MODULE_ACE, "route_walking_search : %s", data);
     // success Callback & failed Callback
     ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_WALKING_SEARCH);
     route_walking_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
@@ -702,7 +704,7 @@ JSIValue BaiduMapComponentModule::route_transit_search(const JSIValue thisVal, c
 {
     HILOG_INFO(HILOG_MODULE_ACE, "route_transit_search");
     char *data = JSI::JsonStringify(args[0]);
-    HILOG_INFO(HILOG_MODULE_ACE, "route_transit_search : %s \n", data);
+    HILOG_INFO(HILOG_MODULE_ACE, "route_transit_search : %s", data);
     // success Callback & failed Callback
     ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_TRANSIT_SEARCH);
     route_transit_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
@@ -724,7 +726,7 @@ JSIValue BaiduMapComponentModule::auth_license(const JSIValue thisVal, const JSI
 {
     HILOG_INFO(HILOG_MODULE_ACE, "auth_license");
     char *data = JSI::JsonStringify(args[0]);
-    HILOG_INFO(HILOG_MODULE_ACE, "auth_license : %s \n", data);
+    HILOG_INFO(HILOG_MODULE_ACE, "auth_license : %s", data);
     // success Callback & failed Callback
     ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_AUTH_LICENSE);
     auth_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
@@ -745,7 +747,7 @@ JSIValue BaiduMapComponentModule::getGeolocation(const JSIValue thisVal, const J
 {
     HILOG_INFO(HILOG_MODULE_ACE, "getGeolocation");
     char *data = JSI::JsonStringify(args[0]);
-    HILOG_INFO(HILOG_MODULE_ACE, "getGeolocation : %s \n", data);
+    HILOG_INFO(HILOG_MODULE_ACE, "getGeolocation : %s", data);
     ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GEO_LOCATION);
     geo_location_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
     OHOS::ACELite::JSIValue Callback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
@@ -762,7 +764,7 @@ JSIValue BaiduMapComponentModule::naviInit(const JSIValue thisVal, const JSIValu
 {
     HILOG_INFO(HILOG_MODULE_ACE, "naviInit");
     char *data = JSI::JsonStringify(args[0]);
-    HILOG_INFO(HILOG_MODULE_ACE, "naviInit : %s \n", data);
+    HILOG_INFO(HILOG_MODULE_ACE, "naviInit : %s", data);
     // success Callback & failed Callback
     ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_INIT);
     nav_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
@@ -934,7 +936,7 @@ JSIValue BaiduMapComponentModule::poi_sug_search(const JSIValue thisVal, const J
 {
     HILOG_INFO(HILOG_MODULE_ACE, "poi_sug_search");
     char *data = JSI::JsonStringify(args[0]);
-    HILOG_INFO(HILOG_MODULE_ACE, "poi_sug_search : %s \n", data);
+    HILOG_INFO(HILOG_MODULE_ACE, "poi_sug_search : %s", data);
 
     ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_POI_SUG_SEARCH);
     poi_sug_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
@@ -1033,7 +1035,7 @@ JSIValue BaiduMapComponentModule::Geocode_search(const JSIValue thisVal, const J
 {
     HILOG_INFO(HILOG_MODULE_ACE, "Geocode_search");
     char *data = JSI::JsonStringify(args[0]);
-    HILOG_INFO(HILOG_MODULE_ACE, "Geocode_search : %s \n", data);
+    HILOG_INFO(HILOG_MODULE_ACE, "Geocode_search : %s", data);
     // success Callback & failed Callback
     ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GEOCODE_SEARCH);
     geocode_search_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
@@ -1054,7 +1056,7 @@ JSIValue BaiduMapComponentModule::Regeocode_search(const JSIValue thisVal, const
 {
     HILOG_INFO(HILOG_MODULE_ACE, "Regeocode_search");
     char *data = JSI::JsonStringify(args[0]);
-    HILOG_INFO(HILOG_MODULE_ACE, "Regeocode_search : %s \n", data);
+    HILOG_INFO(HILOG_MODULE_ACE, "Regeocode_search : %s", data);
     // success Callback & failed Callback
     ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REGEOCODE_SEARCH);
     regeocode_search_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
@@ -1078,7 +1080,7 @@ JSIValue BaiduMapComponentModule::Destroy_page(const JSIValue thisVal, const JSI
 {
     HILOG_INFO(HILOG_MODULE_ACE, "Destroy_page");
     char *data = JSI::JsonStringify(args[0]);
-    HILOG_INFO(HILOG_MODULE_ACE, "Destroy_page : %s \n", data);
+    HILOG_INFO(HILOG_MODULE_ACE, "Destroy_page : %s", data);
     msg_center_vector_navi_req_destroy_page(
         MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_DESTROY_PAGE, data, strlen(data));
     ace_free(data);
@@ -1092,7 +1094,7 @@ JSIValue BaiduMapComponentModule::onBTConnect(const JSIValue thisVal, const JSIV
 {
     HILOG_INFO(HILOG_MODULE_ACE, "onBTConnect");
     char *data = JSI::JsonStringify(args[0]);
-    HILOG_INFO(HILOG_MODULE_ACE, "onBTConnect : %s \n", data);
+    HILOG_INFO(HILOG_MODULE_ACE, "onBTConnect : %s", data);
     // success Callback & failed Callback
     ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_BT_CONNECTED);
     bt_connect_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
@@ -1111,7 +1113,7 @@ JSIValue BaiduMapComponentModule::NaviDestroy(const JSIValue thisVal, const JSIV
 {
     HILOG_INFO(HILOG_MODULE_ACE, "exitNavigation");
     char *data = JSI::JsonStringify(args[0]);
-    HILOG_INFO(HILOG_MODULE_ACE, "exitNavigation : %s \n", data);
+    HILOG_INFO(HILOG_MODULE_ACE, "exitNavigation : %s", data);
     msg_center_vector_navi_req_destroy_from_watch(
         MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_DESTROY_FROM_WATCH, data, strlen(data));
     ace_free(data);
@@ -1124,11 +1126,11 @@ JSIValue BaiduMapComponentModule::NaviDestroy(const JSIValue thisVal, const JSIV
 JSIValue BaiduMapComponentModule::StopAnswer(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
 {
     HILOG_INFO(HILOG_MODULE_ACE, "StopAnswer");
-    char *data = JSI::JsonStringify(args[0]);
-    HILOG_INFO(HILOG_MODULE_ACE, "StopAnswer : %s \n", data);
-    msg_center_xiaodu_send_stop_answer(MSGCENTER_CMD_XIAODU, MSGCENTER_TYPE_ID_XIAODU_SEND_JS_EXIT, data, strlen(data));
-    ace_free(data);
-    return JSI::CreateBoolean(true);
+    uint8_t data = (uint8_t)JSI::GetNumberProperty(args[0], "data");
+    HILOG_INFO(HILOG_MODULE_ACE, "StopAnswer : %d", data);
+    uint32_t ret = msg_center_xiaodu_send_stop_answer(
+            MSGCENTER_CMD_XIAODU, MSGCENTER_TYPE_ID_XIAODU_SEND_JS_EXIT, &data, sizeof(data));
+    return (ret == ERRCODE_SUCC) ? JSI::CreateBoolean(true) : JSI::CreateBoolean(false);
 }
 
 JSIValue BaiduMapComponentModule::MapInit(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
index 4f3a16e..3fc7f1d 100644 (file)
@@ -157,6 +157,7 @@ JSIValue DisplayModule::GetMode(const JSIValue thisVal, const JSIValue *args, ui
     } else {\r
         FailCallBack(thisVal, args[0], ret);\r
     }\r
+    JSI::ReleaseValue(result);\r
     return JSI::CreateUndefined();\r
 }\r
 \r
@@ -209,6 +210,7 @@ JSIValue DisplayModule::GetValue(const JSIValue thisVal, const JSIValue *args, u
     } else {\r
         FailCallBack(thisVal, args[0], ret);\r
     }\r
+    JSI::ReleaseValue(result);\r
     return JSI::CreateUndefined();\r
 }\r
 \r
index 7c68d87..eb3e40a 100644 (file)
@@ -51,12 +51,13 @@ JSIValue LocationModule::GetSupportCoordTypes(const JSIValue thisVal, const JSIV
     JSIValue result = JSI::CreateString(coordType);\r
     JSIValue rltArray = JSI::CreateArray(1);\r
     JSI::SetPropertyByIndex(rltArray, 0, result);\r
+    JSI::ReleaseValue(result);\r
     return rltArray;\r
 }\r
 \r
 JSIValue LocationModule::Unsubscribe(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)\r
 {\r
-    return JSI::CreateUndefined();;\r
+    return JSI::CreateUndefined();\r
 }\r
 \r
 JSIValue LocationModule::Subscribe(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)\r
@@ -74,7 +75,8 @@ JSIValue LocationModule::GetLocation(const JSIValue thisVal, const JSIValue *arg
     return ExecuteAsyncWork(thisVal, args, argsNum, ExecuteGetLocation);\r
 }\r
 \r
-JSIValue LocationModule::ExecuteAsyncWork(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum, AsyncWorkHandler ExecuteFunc)\r
+JSIValue LocationModule::ExecuteAsyncWork(\r
+    const JSIValue thisVal, const JSIValue *args, uint8_t argsNum, AsyncWorkHandler ExecuteFunc)\r
 {\r
     JSIValue undefValue = JSI::CreateUndefined();\r
     if ((args == nullptr) || (argsNum == 0) || (JSI::ValueIsUndefined(args[0]))) {\r
@@ -100,9 +102,9 @@ void LocationModule::ExecuteSubscribe(void* data)
     JSIValue args = params->args;\r
     JSIValue thisVal = params->thisVal;\r
     JSIValue result = JSI::CreateObject();\r
-    char* coordType = JSI::GetStringProperty(args, COORD_TYPES_NAME);\r
-    if ( true )\r
-    {\r
+    char *coordType = JSI::GetStringProperty(args, COORD_TYPES_NAME);\r
+    // This is the sample code which should be replaced by gnss API.\r
+    if (true) {\r
         JSI::SetNumberProperty(result, LONGITUDE_NAME, LONGITUDE);\r
         JSI::SetNumberProperty(result, LATITUDE_NAME, LATITUDE);\r
         JSI::SetNumberProperty(result, ALTITUDE_NAME, ALTITUDE);\r
@@ -112,7 +114,7 @@ void LocationModule::ExecuteSubscribe(void* data)
     } else {\r
         FailCallBack(thisVal, args, -1);\r
     }\r
-\r
+    JSI::ReleaseString(coordType);\r
     JSI::ReleaseValueList(args, thisVal, result, ARGS_END);\r
     delete params;\r
 }\r
@@ -133,7 +135,7 @@ void LocationModule::ExecuteGetLocationType(void* data)
     JSI::SetNamedProperty(result, "types", typeArray);\r
     SuccessCallBack(thisVal, args, result);\r
 \r
-    JSI::ReleaseValueList(args, thisVal, result, ARGS_END);\r
+    JSI::ReleaseValueList(args, thisVal, result, typeArray, LocationType, ARGS_END);\r
     delete params;\r
 }\r
 \r
@@ -154,7 +156,7 @@ void LocationModule::ExecuteGetLocation(void* data)
     JSI::SetNumberProperty(result, ACCURACY_NAME, ACCURACY);\r
     JSI::SetNumberProperty(result, TIME_NAME, static_cast<double>(TIME));\r
     SuccessCallBack(thisVal, args, result);\r
-\r
+    JSI::ReleaseString(coordType);\r
     JSI::ReleaseValueList(args, thisVal, result, ARGS_END);\r
     delete params;\r
 }\r
index 6019eed..6c47db1 100644 (file)
@@ -30,11 +30,12 @@ typedef struct : public OHOS::HeapBase {
 
 namespace OHOS {
 namespace ACELite {
-
-OHOS::ACELite::JSIValue key_successCallback = nullptr;
-OHOS::ACELite::JSIValue key_callbackContext = nullptr;
-OHOS::ACELite::JSIValue rotate_successCallback = nullptr;
-OHOS::ACELite::JSIValue rotate_callbackContext = nullptr;
+KeyNotifyCallback KeyInputModule::notifyCallback_ = nullptr;
+OHOS::ACELite::JSIValue keyCallback = nullptr;
+OHOS::ACELite::JSIValue rotateCallback = nullptr;
+OHOS::ACELite::JSIValue context = nullptr;
+OHOS::ACELite::JSIValue onClickCallback = nullptr;
+OHOS::ACELite::JSIValue onPressCallback = nullptr;
 
 static bool CheckIsJsValueDefined(OHOS::ACELite::JSIValue jsValue)
 {
@@ -94,16 +95,33 @@ static void ExecuteSendKeyMsgToJS(void *data)
 
     char *msgBody = params->msgBody;
     uint16_t status = params->status;
-    OHOS::ACELite::JSIValue callback = key_successCallback;
-    OHOS::ACELite::JSIValue context = key_callbackContext;
-
     OHOS::ACELite::JSIValue dataInfo = OHOS::ACELite::JSI::CreateObject();
-    OHOS::ACELite::JSI::SetStringProperty(dataInfo, "button", msgBody);
-    OHOS::ACELite::JSI::SetNumberProperty(dataInfo, "status", status);
-    OHOS::ACELite::JSIValue callbackArgv[OHOS::ACELite::ARGC_ONE] = {dataInfo};
-    OHOS::ACELite::JSI::CallFunction(callback, context, callbackArgv, OHOS::ACELite::ARGC_ONE);
-    OHOS::ACELite::JSI::ReleaseValue(dataInfo);
+    OHOS::ACELite::JSI::SetStringProperty(dataInfo, "keyName", msgBody);
+
+    switch (status) {
+        case InputDevice::STATE_PRESS:
+            if (onPressCallback != nullptr && context != nullptr) {
+                OHOS::ACELite::JSIValue callbackArgv[OHOS::ACELite::ARGC_ONE] = {dataInfo};
+                OHOS::ACELite::JSI::CallFunction(onPressCallback, context, callbackArgv, OHOS::ACELite::ARGC_ONE);
+            }
+            break;
+        case InputDevice::STATE_RELEASE:
+            if (onClickCallback != nullptr && context != nullptr) {
+                OHOS::ACELite::JSIValue callbackArgv[OHOS::ACELite::ARGC_ONE] = {dataInfo};
+                OHOS::ACELite::JSI::CallFunction(onClickCallback, context, callbackArgv, OHOS::ACELite::ARGC_ONE);
+            }
+            break;
+        default:
+            break;
+    }
 
+    if (keyCallback != nullptr && context != nullptr) {
+        OHOS::ACELite::JSI::SetNumberProperty(dataInfo, "status", status);
+        OHOS::ACELite::JSIValue callbackArgv[OHOS::ACELite::ARGC_ONE] = {dataInfo};
+        OHOS::ACELite::JSI::CallFunction(keyCallback, context, callbackArgv, OHOS::ACELite::ARGC_ONE);
+    }
+
+    OHOS::ACELite::JSI::ReleaseValue(dataInfo);
     AdapterFree(msgBody);
     delete params;
     params = nullptr;
@@ -120,99 +138,233 @@ static void ExecuteSendRotateMsgToJS(void *data)
     int16_t rotate = params->rotate;
     delete params;
     params = nullptr;
-    OHOS::ACELite::JSIValue callback = rotate_successCallback;
-    OHOS::ACELite::JSIValue context = rotate_callbackContext;
     OHOS::ACELite::JSIValue dataInfo = OHOS::ACELite::JSI::CreateObject();
     OHOS::ACELite::JSI::SetNumberProperty(dataInfo, "rotate", rotate);
     OHOS::ACELite::JSIValue callbackArgv[OHOS::ACELite::ARGC_ONE] = {dataInfo};
-    OHOS::ACELite::JSI::CallFunction(callback, context, callbackArgv, OHOS::ACELite::ARGC_ONE);
+    OHOS::ACELite::JSI::CallFunction(rotateCallback, context, callbackArgv, OHOS::ACELite::ARGC_ONE);
     OHOS::ACELite::JSI::ReleaseValue(dataInfo);
     return;
 }
 
-JSIValue KeyInputModule::setKeyListener(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
+JSIValue KeyInputModule::SetKeyListener(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
 {
-    ReleaseJsValue(key_callbackContext);
-    ReleaseJsValue(key_successCallback);
+    bool ret = false;
+    ReleaseKeyCallback();
     if (argsNum > 0) {
-        key_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
-        key_successCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
-        KeyListener::GetInstance()->SetRegister(true);
+        context = OHOS::ACELite::JSI::AcquireValue(thisVal);
+        keyCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
+        if ((!JSI::ValueIsUndefined(keyCallback)) && JSI::ValueIsFunction(keyCallback)) {
+            ret = true;
+        } else {
+            HILOG_DEBUG(HILOG_MODULE_ACE, "setKeyListener: unset listener.");
+        }
     } else {
-        key_callbackContext = nullptr;
-        key_successCallback = nullptr;
+        HILOG_ERROR(HILOG_MODULE_ACE, "setKeyListener failed, argsNum is %d.", argsNum);
     }
-    return JSI::CreateBoolean(true);
+    return JSI::CreateBoolean(ret);
+}
+
+void KeyInputModule::ReleaseKeyCallback()
+{
+    ReleaseJsValue(keyCallback);
+    keyCallback = nullptr;
+    return;
 }
 
-JSIValue KeyInputModule::setRotateListener(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
+JSIValue KeyInputModule::SetRotateListener(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
 {
-    ReleaseJsValue(rotate_successCallback);
-    ReleaseJsValue(rotate_callbackContext);
+    bool ret = false;
+    ReleaseRotateCallbacks();
     if (argsNum > 0) {
-        rotate_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
-        rotate_successCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
-        RotateListener::GetInstance()->SetRegister(true);
+        context = OHOS::ACELite::JSI::AcquireValue(thisVal);
+        rotateCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
+        if ((!JSI::ValueIsUndefined(rotateCallback)) && JSI::ValueIsFunction(rotateCallback)) {
+            RotateListener::GetInstance()->SetRegister(true);
+            ret = true;
+            // you could enable rotary encoder's driver here.
+        } else {
+            HILOG_DEBUG(HILOG_MODULE_ACE, "setRotateListener: unset listener.");
+            // you could disable rotary encoder's driver here.
+        }
     } else {
-        key_callbackContext = nullptr;
-        key_successCallback = nullptr;
+        HILOG_ERROR(HILOG_MODULE_ACE, "setRotateListener failed, argsNum is %d.", argsNum);
+        // you could disable rotary encoder's driver here.
     }
-    return JSI::CreateBoolean(true);
+    return JSI::CreateBoolean(ret);
 }
 
-void KeyInputModule::OnDestroy()
+void KeyInputModule::ReleaseRotateCallbacks()
 {
-    OHOS::ACELite::KeyListener::GetInstance()->SetRegister(false);
     OHOS::ACELite::RotateListener::GetInstance()->SetRegister(false);
+    ReleaseJsValue(rotateCallback);
+    rotateCallback = nullptr;
+    return;
+}
+
+void OHOS::ACELite::KeyInputModule::SetNotifyKeyListener(KeyNotifyCallback callback)
+{
+    notifyCallback_ = callback;
+}
+
+KeyNotifyCallback OHOS::ACELite::KeyInputModule::GetNotifyKeyListener(void)
+{
+    return notifyCallback_;
+}
+
+void KeyInputModule::DefineProperty(
+    JSIValue target, const char *propName, JSIFunctionHandler getter, JSIFunctionHandler setter)
+{
+    JSPropertyDescriptor descriptor;
+    descriptor.getter = getter;
+    descriptor.setter = setter;
+    JSI::DefineNamedProperty(target, propName, descriptor);
+}
+
+JSIValue KeyInputModule::OnClickSetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
+{
+    bool ret = false;
+    if (argsNum > 0) {
+        context = OHOS::ACELite::JSI::AcquireValue(thisVal);
+        onClickCallback = OHOS::ACELite::JSI::AcquireValue(args[0]);
+        if (JSI::ValueIsUndefined(onClickCallback) || !JSI::ValueIsFunction(onClickCallback)) {
+            ReleaseOnClickCallbacks();
+        } else {
+            ret = true;
+        }
+    } else {
+        HILOG_ERROR(HILOG_MODULE_ACE, "OnClickSetter failed, argsNum is %d.", argsNum);
+    }
+    return JSI::CreateBoolean(ret);
+}
+
+JSIValue KeyInputModule::OnClickGetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
+{
+    return (onClickCallback == nullptr) ? JSI::CreateUndefined() : onClickCallback;
+}
+
+void KeyInputModule::ReleaseOnClickCallbacks()
+{
+    ReleaseJsValue(onClickCallback);
+    onClickCallback = nullptr;
+    return;
+}
+
+JSIValue KeyInputModule::OnPressSetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
+{
+    bool ret = false;
+    if (argsNum > 0) {
+        context = OHOS::ACELite::JSI::AcquireValue(thisVal);
+        onPressCallback = OHOS::ACELite::JSI::AcquireValue(args[0]);
+        if (JSI::ValueIsUndefined(onPressCallback) || !JSI::ValueIsFunction(onPressCallback)) {
+            ReleaseOnPressCallbacks();
+        } else {
+            ret = true;
+        }
+    } else {
+        HILOG_ERROR(HILOG_MODULE_ACE, "OnPressSetter failed, argsNum is %d.", argsNum);
+    }
+    return JSI::CreateBoolean(ret);
+}
+
+JSIValue KeyInputModule::OnPressGetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
+{
+    return (onPressCallback == nullptr) ? JSI::CreateUndefined() : onPressCallback;
+}
+
+void KeyInputModule::ReleaseOnPressCallbacks()
+{
+    ReleaseJsValue(onPressCallback);
+    onPressCallback = nullptr;
+    return;
+}
+
+void KeyInputModule::OnDestroy()
+{
+    // you could disable rotary encoder's driver here.
+    ReleaseKeyCallback();
+    ReleaseRotateCallbacks();
+    ReleaseOnClickCallbacks();
+    ReleaseOnPressCallbacks();
+    ReleaseJsValue(context);
+    context = nullptr;
 }
 
 void InitKeyInputModule(JSIValue exports)
 {
-    JSI::SetModuleAPI(exports, "setKeyListener", KeyInputModule::setKeyListener);
-    JSI::SetModuleAPI(exports, "setRotateListener", KeyInputModule::setRotateListener);
+    JSI::SetModuleAPI(exports, "setKeyListener", KeyInputModule::SetKeyListener);
+    JSI::SetModuleAPI(exports, "setRotateListener", KeyInputModule::SetRotateListener);
+
+    KeyInputModule::DefineProperty(exports, "onClick", KeyInputModule::OnClickGetter, KeyInputModule::OnClickSetter);
+    KeyInputModule::DefineProperty(exports, "onPress", KeyInputModule::OnPressGetter, KeyInputModule::OnPressSetter);
     JSI::SetOnDestroy(exports, KeyInputModule::OnDestroy);
 }
 
 }  // namespace ACELite
 }  // namespace OHOS
 
+bool OHOS::ACELite::KeyListener::HasRegister()
+{
+    if (keyCallback != nullptr || onClickCallback != nullptr || onPressCallback != nullptr) {
+        return true;
+    }
+    return false;
+}
+
+void OHOS::ACELite::KeyListener::SendToJS(const KeyEvent &event)
+{
+    if (!OHOS::ACELite::KeyListener::HasRegister()) {
+        return;
+    }
+
+    char *type = "UNKNOWN";
+    switch (event.GetKeyId()) {
+        case static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_POWER):
+            type = "POWER";
+            break;
+        case static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_FUNC):
+            type = "FUNCTION";
+            break;
+        default:
+            break;
+    }
+    int32_t ret = KeySendMsgToJS(type, event.GetState());
+    if (ret != 0) {
+        HILOG_ERROR(HILOG_MODULE_ACE, "KeyListener: OnKeyEvent send event error");
+    }
+}
+
 void OHOS::ACELite::KeyListener::OnKeyEvent(const KeyEvent &event)
 {
-    if (OHOS::ACELite::KeyListener::hasRegister()) {
-        char *type;
-        switch (event.GetKeyId()) {
-            case static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_POWER):
-                type = "POWER";
-                break;
-            default:
-                type = "UNKNOWN";
-                break;
-        }
-        int32_t ret = KeySendMsgToJS(type, event.GetState());
-        if (ret != 0) {
-            HILOG_ERROR(HILOG_MODULE_ACE, "KeyListener: OnKeyEvent send event error");
-        }
-    } else {
-        switch (event.GetState()) {
-            case InputDevice::STATE_PRESS:
-                isPress_ = true;
-                break;
-            case InputDevice::STATE_LONG_PRESS:
-                isLongPress_ = true;
-                OnKeyLongPress(event);
-                break;
-            case InputDevice::STATE_RELEASE:
-                onRelease(event);
-                break;
-            default:
-                break;
+    // Prioritize handling notification events
+    KeyNotifyCallback notifyCallback = KeyInputModule::GetNotifyKeyListener();
+    if (notifyCallback != nullptr) {
+        // If the upper layer does not notify, continue executing the JS event
+        if (notifyCallback(event.GetKeyId(), event.GetState())) {
+            return;
         }
     }
+    switch (event.GetState()) {
+        case InputDevice::STATE_PRESS:
+            isPress_ = true;
+            SendToJS(event);
+            break;
+        case InputDevice::STATE_LONG_PRESS:
+            isLongPress_ = true;
+            OnKeyLongPress(event);
+            break;
+        case InputDevice::STATE_RELEASE:
+            OnRelease(event);
+            break;
+        default:
+            break;
+    }
 }
 
-void OHOS::ACELite::KeyListener::onRelease(const KeyEvent &event)
+void OHOS::ACELite::KeyListener::OnRelease(const KeyEvent &event)
 {
-    if (isPress_ && !isLongPress_) {
+    if (OHOS::ACELite::KeyListener::HasRegister()) {
+        SendToJS(event);
+    } else if (isPress_ && !isLongPress_) {
         if (event.GetKeyId() == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_POWER)) {
             JsAppContext::GetInstance()->TerminateAbility();
         }
@@ -233,11 +385,12 @@ void OHOS::ACELite::KeyListener::OnKeyLongPress(const KeyEvent &event)
 
 void OHOS::ACELite::RotateListener::OnRotateEvent(const RotateEvent &event)
 {
-    if (OHOS::ACELite::RotateListener::hasRegister()) {
-        int ret = RotateSendMsgToJS(event.GetRotate());
-        if (ret != 0) {
-            HILOG_ERROR(HILOG_MODULE_ACE, "RotateListener: OnRotateEvent send event error");
-        }
+    if (!OHOS::ACELite::RotateListener::HasRegister()) {
+        return;
+    }
+    int ret = RotateSendMsgToJS(event.GetRotate());
+    if (ret != 0) {
+        HILOG_ERROR(HILOG_MODULE_ACE, "RotateListener: OnRotateEvent send event error");
     }
 }
 
index 76d595a..1f4fd1d 100644 (file)
@@ -13,6 +13,7 @@
 #include "events/rotate_event.h"
 #include "dock/input_device.h"
 #include "common/key_code.h"
+typedef bool (*KeyNotifyCallback)(uint16_t keyID, uint8_t state);
 
 namespace OHOS {
 namespace ACELite {
@@ -20,9 +21,23 @@ class KeyInputModule : public MemoryHeap {
 public:
     KeyInputModule() = default;
     ~KeyInputModule() = default;
-    static JSIValue setKeyListener(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
-    static JSIValue setRotateListener(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
+    static JSIValue SetKeyListener(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
+    static JSIValue SetRotateListener(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
+    static void SetNotifyKeyListener(KeyNotifyCallback callback);
+    static KeyNotifyCallback GetNotifyKeyListener(void);
+    static void DefineProperty(JSIValue target, const char *propName, JSIFunctionHandler getter, JSIFunctionHandler setter);
+    static JSIValue OnClickGetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
+    static JSIValue OnClickSetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
+    static JSIValue OnPressGetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
+    static JSIValue OnPressSetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
     static void OnDestroy();
+
+private:
+    static KeyNotifyCallback notifyCallback_;
+    static void ReleaseKeyCallback();
+    static void ReleaseRotateCallbacks();
+    static void ReleaseOnClickCallbacks();
+    static void ReleaseOnPressCallbacks();
 };
 
 void InitKeyInputModule(JSIValue exports);
@@ -37,21 +52,15 @@ public:
 
     void OnKeyEvent(const KeyEvent &event);
 
-    bool hasRegister()
-    {
-        return isRegister_;
-    }
-    void SetRegister(bool isRegister)
-    {
-        isRegister_ = isRegister;
-    }
+    bool HasRegister();
+
+    void SendToJS(const KeyEvent &event);
 
 private:
-    KeyListener() : isRegister_(false), isPress_(false), isLongPress_(false){};
+    KeyListener() : isPress_(false), isLongPress_(false){};
     ~KeyListener() = default;
-    void onRelease(const KeyEvent &event);
+    void OnRelease(const KeyEvent &event);
     void OnKeyLongPress(const KeyEvent &event);
-    bool isRegister_;
     bool isPress_;
     bool isLongPress_;
 };
@@ -66,7 +75,7 @@ public:
 
     void OnRotateEvent(const RotateEvent &event);
 
-    bool hasRegister()
+    bool HasRegister()
     {
         return isRegister_;
     }
index 1fb1af0..215ef4d 100644 (file)
@@ -353,6 +353,21 @@ bool CJSONParser::ChangeLanguageFileName()
         languageFile = nullptr;
     } else {
         ACE_FREE(languageFile_);
+        char *fullPath = RelocateJSSourceFilePath(filePath_, languageFile);
+        if (!IsFileExisted(fullPath)) {
+            ACE_FREE(fullPath);
+            // If there is no specified language file, base.json will be used by default
+            fullPath = RelocateJSSourceFilePath(filePath_, "base.json");
+            ACE_FREE(languageFile);
+            if (IsFileExisted(fullPath)) {
+                // If there is no specified language file, base.json will be used by default
+                languageFile = StringUtil::Copy("base.json");
+            } else {
+                // If there is no specified language file base.json , en-US.json will be used by default
+                languageFile = StringUtil::Copy("en-US.json");
+            }
+        }
+        ACE_FREE(fullPath);
         languageFile_ = languageFile;
     }
     return true;
index 1847cd5..f8c3e9c 100644 (file)
@@ -89,6 +89,7 @@ void SensorModule::ExecuteSubscribeStepCounter(void* data)
     JSIValue result = JSI::CreateObject();\r
     uint32_t steps = DEFAULT_STEPS;\r
     JSI::SetNumberProperty(result, STEPS, static_cast<double>(steps));\r
+    // This is the sample code which should be replaced by gnss API.\r
     if (true) {\r
         SuccessCallBack(thisVal, args, result, false);\r
     } else {\r
@@ -109,6 +110,7 @@ void SensorModule::ExecuteSubscribeBarometer(void* data)
     JSIValue result = JSI::CreateObject();\r
     uint32_t pressure = DEFAULT_PRESSURE;\r
     JSI::SetNumberProperty(result, PRESSURE, static_cast<double>(pressure));\r
+    // This is the sample code which should be replaced by gnss API.\r
     if (true) {\r
         SuccessCallBack(thisVal, args, result, false);\r
     } else {\r
@@ -129,6 +131,7 @@ void SensorModule::ExecuteSubscribeHeartRate(void* data)
     JSIValue result = JSI::CreateObject();\r
     uint32_t heartRate = DEFAULT_HEARTRATE;\r
     JSI::SetNumberProperty(result, HEARTRATE, static_cast<double>(heartRate));\r
+    // This is the sample code which should be replaced by gnss API.\r
     if (true) {\r
         SuccessCallBack(thisVal, args, result, false);\r
     } else {\r
@@ -149,6 +152,7 @@ void SensorModule::ExecuteSubscribeOnBodyState(void* data)
     JSIValue result = JSI::CreateObject();\r
     bool value = DEFAULT_ISONBODY;\r
     JSI::SetBooleanProperty(result, ISONBODY, static_cast<double>(value));\r
+    // This is the sample code which should be replaced by gnss API.\r
     if (true) {\r
         SuccessCallBack(thisVal, args, result, false);\r
     } else {\r
@@ -169,6 +173,7 @@ void SensorModule::ExecuteGetOnBodyState(void* data)
     JSIValue result = JSI::CreateObject();\r
     bool value = DEFAULT_ISONBODY;\r
     JSI::SetBooleanProperty(result, ISONBODY, static_cast<double>(value));\r
+    // This is the sample code which should be replaced by gnss API.\r
     if (true) {\r
         SuccessCallBack(thisVal, args, result, true);\r
     } else {\r
@@ -194,11 +199,13 @@ void SensorModule::ExecuteSubscribeAccelerometer(void* data)
     JSI::SetNumberProperty(result, "x", static_cast<double>(coordinate_x));\r
     JSI::SetNumberProperty(result, "y", static_cast<double>(coordinate_y));\r
     JSI::SetNumberProperty(result, "z", static_cast<double>(coordinate_x));\r
+    // This is the sample code which should be replaced by gnss API.\r
     if (true) {\r
         SuccessCallBack(thisVal, args, result, false);\r
     } else {\r
         FailCallBack(thisVal, args, -1, false);\r
     }\r
+    JSI::ReleaseString(interval);\r
     JSI::ReleaseValueList(args, thisVal, result, ARGS_END);\r
     delete params;\r
 }\r
@@ -219,16 +226,19 @@ void SensorModule::ExecuteSubscribeGyroscope(void* data)
     JSI::SetNumberProperty(result, "x", static_cast<double>(coordinate_x));\r
     JSI::SetNumberProperty(result, "y", static_cast<double>(coordinate_y));\r
     JSI::SetNumberProperty(result, "z", static_cast<double>(coordinate_x));\r
+    // This is the sample code which should be replaced by gnss API.\r
     if (true) {\r
         SuccessCallBack(thisVal, args, result, false);\r
     } else {\r
         FailCallBack(thisVal, args, -1, false);\r
     }\r
+    JSI::ReleaseString(interval);\r
     JSI::ReleaseValueList(args, thisVal, result, ARGS_END);\r
     delete params;\r
 }\r
 \r
-JSIValue SensorModule::ExecuteAsyncWork(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum, AsyncWorkHandler ExecuteFunc)\r
+JSIValue SensorModule::ExecuteAsyncWork(\r
+    const JSIValue thisVal, const JSIValue *args, uint8_t argsNum, AsyncWorkHandler ExecuteFunc)\r
 {\r
     JSIValue undefValue = JSI::CreateUndefined();\r
     if ((args == nullptr) || (argsNum == 0) || (JSI::ValueIsUndefined(args[0]))) {\r
index ff05e1c..987ced5 100644 (file)
@@ -34,7 +34,8 @@ JSIValue VibratorModule::Vibrate(const JSIValue thisVal, const JSIValue *args, u
     return ExecuteAsyncWork(thisVal, args, argsNum, ExecuteVibrate);\r
 }\r
 \r
-JSIValue VibratorModule::ExecuteAsyncWork(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum, AsyncWorkHandler ExecuteFunc)\r
+JSIValue VibratorModule::ExecuteAsyncWork(\r
+    const JSIValue thisVal, const JSIValue *args, uint8_t argsNum, AsyncWorkHandler ExecuteFunc)\r
 {\r
     JSIValue undefValue = JSI::CreateUndefined();\r
     if ((args == nullptr) || (argsNum == 0) || (JSI::ValueIsUndefined(args[0]))) {\r
@@ -67,7 +68,7 @@ void VibratorModule::ExecuteVibrate(void* data)
     } else {\r
         FailCallBack(thisVal, args, -1);\r
     }\r
-\r
+    JSI::ReleaseString(mode);\r
     JSI::ReleaseValueList(args, thisVal, result, ARGS_END);\r
     delete params;\r
 }\r
index 82a3822..9427630 100644 (file)
@@ -18,6 +18,7 @@ set(PRIVATE_HEADER
     ${ROOT_DIR}/open_source/openharmony/foundation/ace/ace_engine_lite/interfaces/base
     ${ROOT_DIR}/open_source/openharmony/base/global/resmgr_lite/frameworks/resmgr_lite/include
     ${ROOT_DIR}/open_source/openharmony/base/global/resmgr_lite/interfaces/innerkits/include
+    ${ROOT_DIR}/open_source/openharmony/base/security/appverify/include
     ${ROOT_DIR}/application/wearable/ohos_deps
     ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/src/utils/innerkits
     ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/include
@@ -90,6 +91,10 @@ set(MAIN_COMPONENT
     false
 )
 
+set(AUTO_ADD_PATH
+    false
+)
+
 set(PUBLIC_DEFINES
 )
 
@@ -177,6 +182,10 @@ set(MAIN_COMPONENT
     false
 )
 
+set(AUTO_ADD_PATH
+    false
+)
+
 set(PUBLIC_DEFINES
 )
 
index d31affb..bf4d76f 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-auto-ota-cli/libbms.a and b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-auto-ota-cli/libbms.a differ
index f39f40f..a2b70c3 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-auto-ota-ser/libbms.a and b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-auto-ota-ser/libbms.a differ
index fefcdf2..f1d031d 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-fd230/libbms.a and b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-fd230/libbms.a differ
index fefcdf2..f1d031d 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-lt22/libbms.a and b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-lt22/libbms.a differ
diff --git a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-u8/libbms.a b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-u8/libbms.a
new file mode 100644 (file)
index 0000000..f1d031d
Binary files /dev/null and b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-u8/libbms.a differ
index fefcdf2..f1d031d 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-w9/libbms.a and b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-w9/libbms.a differ
index fefcdf2..f1d031d 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js/libbms.a and b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js/libbms.a differ
index ea35faa..6cfb8f2 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-xts/libbms.a and b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-xts/libbms.a differ
index 78c3d95..11b26a6 100644 (file)
@@ -216,6 +216,9 @@ enum AppexecfwkErrors {
     /** Failed to parse the label of the ability. */
     ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ABILITY_LABEL_ERROR,
 
+    /** Failed to parse the srcPath of the ability. */
+    ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ABILITY_SRCPATH_ERROR,
+
     /** Failed to parse the description of the ability. */
     ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ABILITY_DESCRIPTION_ERROR,
 
index 3ca3154..c2553c2 100644 (file)
@@ -100,6 +100,7 @@ const char PROFILE_KEY_MODULE_ABLLITY_DESCRIPTION[] = "description";
 const char PROFILE_KEY_MODULE_ABILITY_LABEL[] = "label";
 const char PROFILE_KEY_MODULE_ABILITY_ICON[] = "icon";
 const char PROFILE_KEY_MODULE_ABILITY_TYPE[] = "type";
+const char PROFILE_KEY_MODULE_ABILITY_SRCPATH[] = "srcPath";
 const char PROFILE_KEY_MODULE_ABILITY_LAUNCHTYPE[] = "launchType";
 const char PROFILE_KEY_MODULE_ABILITY_VISIBLE[] = "visible";
 const char PROFILE_KEY_MODULE_ABILITY_DEVICE_CAP[] = "deviceCapability";
@@ -157,7 +158,13 @@ const char JSON_PATH[] = APP_BASE_DIR"user/ace/etc/bundles/";
 const char JSON_PATH_NO_SLASH_END[] = APP_BASE_DIR"user/ace/etc/bundles";
 // store bundle permissions for IAM
 const char PERMISSIONS_PATH[] = APP_BASE_DIR"user/ace/etc/permissions";
+// Original IDE version
 const char ASSET_JS_PATH[] = "/assets/js/default";
+// IDE version 5.0 and above
+const char ASSET_JS_PATH_MAIN[] = "/assets/js/MainAbility";
+// IDE version below 5.0
+const char ASSET_JS_PATH_DEFAULT[] = "/assets/js/default";
+const char ASSET_PATH[] = "/assets/js/";
 const char ICON_NAME[] = "/icon.bin";
 const char SMALL_ICON_NAME[] = "/icon_small.bin";
 const char DEFAULT_ICON_SETTING[] = "$media:icon";
@@ -172,7 +179,7 @@ const uint8_t LONG_LENGTH = 8;
 const uint16_t MAX_INT = 256;
 const uint8_t MAX_VERSION_NAME_LEN = 20;
 const uint8_t MAX_LABLE_LEN = 30;
-const uint8_t MAX_THIRD_BUNDLE_NUMBER = 30;
+const uint8_t MAX_THIRD_BUNDLE_NUMBER = 60;
 
 struct SignatureInfo {
     char *bundleName;
@@ -227,6 +234,7 @@ struct BundleProfile {
     char *vendor;
     char *label;
     char *iconPath;
+    char *srcPath;
     ProfileVersion profileVersion;
     ProfileApiVersion profileApiVersion;
     ModuleInfo moduleInfo;
index 7afeaf5..0e9fd02 100644 (file)
@@ -69,7 +69,7 @@ private:
     uint8_t SwitchErrorCode(int32_t errorCode);
     uint8_t AddBundleResList(const char *bundleName, uint32_t labelId, uint32_t iconId);
     uint8_t MoveRawFileToDataPath(const BundleInfo *bundleInfo);
-    uint8_t TransformJsToBc(const char *codePath, InstallRecord &record);
+    uint8_t TransformJsToBc(const char *codePath, InstallRecord &record, char *jsPath);
 };
 
 #define FREE_PRO_RESOURCE(fp, permissions, bundleInfo) \
index d9f5eec..de9e3c9 100644 (file)
@@ -105,7 +105,7 @@ private:
     void APP_QueryAppInfo(const char *appDir, AppInfoList *list);
     void APP_InsertAppInfo(char *filePath, AppInfoList *list);
     void APP_FreeAllAppInfo(const AppInfoList *list);
-    void InstallPreBundle(List<ToBeInstalledApp *> systemPathList, InstallerCallback installerCallback);
+    void InstallPreBundle(List<ToBeInstalledApp *> &systemPathList, InstallerCallback installerCallback);
 
     GtBundleInstaller *installer_;
     BundleMap *bundleMap_;
index 96041d0..6d1c917 100644 (file)
@@ -10,7 +10,6 @@
 \r
 #include <cstdint>\r
 #include "jsi.h"\r
-#include "audio_capturer.h"\r
 \r
 #ifdef __cplusplus\r
 extern "C" {\r
@@ -45,6 +44,11 @@ public:
      * Stop\r
      */\r
     static JSIValue Stop(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);\r
+\r
+    /**\r
+     handle exception\r
+     */\r
+    static void ExceptionStop(void);\r
 };\r
 \r
 void InitAudioCapturerModule(JSIValue exports);\r
index e1a1184..eeff068 100644 (file)
@@ -56,6 +56,10 @@ set(MAIN_COMPONENT
     false
 )
 
+set(AUTO_ADD_PATH
+    false
+)
+
 build_component()
 
 install_sdk(${CMAKE_CURRENT_SOURCE_DIR} "*")
index 251087f..1dfc9c9 100644 (file)
Binary files a/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-auto-ota-cli/libjerryscript.a and b/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-auto-ota-cli/libjerryscript.a differ
index 19c5beb..04b6781 100644 (file)
Binary files a/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-auto-ota-ser/libjerryscript.a and b/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-auto-ota-ser/libjerryscript.a differ
index 6c78627..36966a2 100644 (file)
Binary files a/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-fd230/libjerryscript.a and b/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-fd230/libjerryscript.a differ
index 6c78627..36966a2 100644 (file)
Binary files a/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-lt22/libjerryscript.a and b/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-lt22/libjerryscript.a differ
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-u8/libjerryscript.a b/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-u8/libjerryscript.a
new file mode 100644 (file)
index 0000000..36966a2
Binary files /dev/null and b/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-u8/libjerryscript.a differ
index 6c78627..36966a2 100644 (file)
Binary files a/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-w9/libjerryscript.a and b/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-w9/libjerryscript.a differ
index 6c78627..36966a2 100644 (file)
Binary files a/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js/libjerryscript.a and b/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js/libjerryscript.a differ
index 22d2243..6b2fc57 100644 (file)
Binary files a/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-xts/libjerryscript.a and b/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-xts/libjerryscript.a differ
index 4398320..2f6f235 100644 (file)
@@ -71,19 +71,29 @@ int GetFullPath(const char* uri, char* fullPath, int len)
 JSIValue ExecuteAsyncWork(const JSIValue thisVal, const JSIValue* args,\r
     uint8_t argsNum, AsyncWorkHandler ExecuteFunc, bool flag = false)\r
 {\r
-    JSIValue undefValue = JSI::CreateUndefined();\r
-    if (!NativeapiCommon::IsValidJSIValue(args, argsNum)) {\r
-        return undefValue;\r
-    }\r
-    FuncParams* params = new(std::nothrow) FuncParams();\r
-    if (params == nullptr) {\r
-        return undefValue;\r
+    JSIValue retValue = JSI::CreateUndefined();\r
+\r
+    if (args != nullptr && argsNum > 0 && NativeapiCommon::IsValidJSIValue(args, argsNum)) {\r
+        FuncParams* params = new(std::nothrow) FuncParams();\r
+        if (params != nullptr) {\r
+            params->thisVal = JSI::AcquireValue(thisVal);\r
+            params->args = JSI::AcquireValue(args[0]);\r
+            params->flag = flag;\r
+\r
+            bool isSuccess = JsAsyncWork::DispatchAsyncWork(ExecuteFunc, reinterpret_cast<void *>(params));\r
+            if (!isSuccess) {\r
+                JSI::ReleaseValue(params->thisVal);\r
+                JSI::ReleaseValue(params->args);\r
+                delete params;\r
+                retValue = JSI::CreateErrorWithCode(-1, "Async work dispatch failed");\r
+            }\r
+        } else {\r
+            retValue = JSI::CreateErrorWithCode(-1, "Failed to allocate FuncParams");\r
+        }\r
+    } else {\r
+        retValue = JSI::CreateErrorWithCode(-1, "Invalid arguments");\r
     }\r
-    params->thisVal = JSI::AcquireValue(thisVal);\r
-    params->args = JSI::AcquireValue(args[0]);\r
-    params->flag = flag;\r
-    JsAsyncWork::DispatchAsyncWork(ExecuteFunc, reinterpret_cast<void *>(params));\r
-    return undefValue;\r
+    return retValue;\r
 }\r
 \r
 void ExecuteCopyFile(void* data)\r
index b7c4676..2e4c009 100644 (file)
@@ -99,21 +99,31 @@ int DeleteValueInner(const char* dataPath, const char* key)
 }\r
 \r
 JSIValue ExecuteAsyncWork(const JSIValue thisVal, const JSIValue* args,\r
-    uint8_t argsNum, AsyncWorkHandler ExecuteFunc, bool flag)\r
+    uint8_t argsNum, AsyncWorkHandler ExecuteFunc, bool flag = false)\r
 {\r
-    JSIValue undefValue = JSI::CreateUndefined();\r
-    if (!NativeapiCommon::IsValidJSIValue(args, argsNum)) {\r
-        return undefValue;\r
-    }\r
-    FuncParams* params = new(std::nothrow) FuncParams();\r
-    if (params == nullptr) {\r
-        return undefValue;\r
+    JSIValue retValue = JSI::CreateUndefined();\r
+\r
+    if (args != nullptr && argsNum > 0 && NativeapiCommon::IsValidJSIValue(args, argsNum)) {\r
+        FuncParams* params = new(std::nothrow) FuncParams();\r
+        if (params != nullptr) {\r
+            params->thisVal = JSI::AcquireValue(thisVal);\r
+            params->args = JSI::AcquireValue(args[0]);\r
+            params->flag = flag;\r
+\r
+            bool isSuccess = JsAsyncWork::DispatchAsyncWork(ExecuteFunc, reinterpret_cast<void *>(params));\r
+            if (!isSuccess) {\r
+                JSI::ReleaseValue(params->thisVal);\r
+                JSI::ReleaseValue(params->args);\r
+                delete params;\r
+                retValue = JSI::CreateErrorWithCode(-1, "Async work dispatch failed");\r
+            }\r
+        } else {\r
+            retValue = JSI::CreateErrorWithCode(-1, "Failed to allocate FuncParams");\r
+        }\r
+    } else {\r
+        retValue = JSI::CreateErrorWithCode(-1, "Invalid arguments");\r
     }\r
-    params->thisVal = JSI::AcquireValue(thisVal);\r
-    params->args = JSI::AcquireValue(args[0]);\r
-    params->flag = flag;\r
-    JsAsyncWork::DispatchAsyncWork(ExecuteFunc, reinterpret_cast<void *>(params));\r
-    return undefValue;\r
+    return retValue;\r
 }\r
 \r
 void ExecuteGet(void* data)\r
index 7702abc..bd9a03a 100644 (file)
@@ -13,6 +13,7 @@
 #include "bts_le_gap.h"
 #include "bts_feature.h"
 #include "bts_a2dp_source.h"
+#include "bts_spp.h"
 #include "bts_br_gap.h"
 #include "bts_avrcp_controller.h"
 #include "sample_common.h"
@@ -68,6 +69,7 @@ typedef enum {
     BTSRV_SAMPLE_GAP_SET_INQUIRY_PARAM,         /* 35 设置inquiry参数 */
     BTSRV_SAMPLE_GAP_SET_SERVICE_TASK_PRIORITY, /* 36 设置BT_SERVICE_TASK优先级 */
     BTSRV_SAMPLE_GAP_SET_FLOW_LIMIT,            /* 37 设置流控限制字节数 */
+    BTSRV_SAMPLE_GAP_SET_SPP_WRITE_RETRY_MAX,   /* 38 设置spp写入重试最大次数 */
 } btsrv_gap_sample_cmd_id;
 
 typedef enum {
@@ -1231,6 +1233,17 @@ static void btsrv_sample_cmd_set_flow_limit(const char **params, int32_t params_
     bts_sample_log("bts set flow limit ret:0x%x limit:%d\n", ret, flow_limit);
 }
 
+static void btsrv_sample_cmd_set_spp_write_retry_max(const char **params, int32_t params_cnt)
+{
+    if (params_cnt != 1) { /* 1:参数个数 */
+        bts_sample_log("params_cnt error! need one param!\n");
+        return;
+    }
+    uint32_t retry_max = (uint32_t)atoi(params[0]);
+    errcode_t ret = spp_write_retry_times_config(retry_max);
+    bts_sample_log("bts set spp write retry max ret:0x%x max:%u\n", ret, retry_max);
+}
+
 btsrv_sample_cmd_hdl_info g_btsrv_gap_sample_hdls[] = {
     /* 0 */
     { BTSRV_SAMPLE_GAP_ENABLE_BLE,  btsrv_sample_cmd_enable_ble },
@@ -1286,6 +1299,7 @@ btsrv_sample_cmd_hdl_info g_btsrv_gap_sample_hdls[] = {
     { BTSRV_SAMPLE_GAP_SET_INQUIRY_PARAM, btsrv_sample_cmd_set_filter_device_class },
     { BTSRV_SAMPLE_GAP_SET_SERVICE_TASK_PRIORITY, btsrv_sample_cmd_set_service_task_priority},
     { BTSRV_SAMPLE_GAP_SET_FLOW_LIMIT, btsrv_sample_cmd_set_flow_limit},
+    { BTSRV_SAMPLE_GAP_SET_SPP_WRITE_RETRY_MAX, btsrv_sample_cmd_set_spp_write_retry_max},
 };
 
 void btsrv_gap_sample_cmd(uint32_t cmd_id, const char **params, int32_t params_cnt)
diff --git a/code/sdk/tools/bin/xts_tools/PCID.json b/code/sdk/tools/bin/xts_tools/PCID.json
new file mode 100644 (file)
index 0000000..5f364f7
--- /dev/null
@@ -0,0 +1,9 @@
+{
+       "api_version":  0,
+       "manufacturer_id":      0,
+       "system_type":  "mini",
+       "syscap":       {
+               "os":   ["SystemCapability.Developtools.Syscap", "SystemCapability.Security.Cipher", "SystemCapability.Security.Huks.Core", "SystemCapability.Security.Huks.Extension"],
+               "private":      []
+       }
+}
diff --git a/code/sdk/tools/bin/xts_tools/PCID.sc b/code/sdk/tools/bin/xts_tools/PCID.sc
new file mode 100644 (file)
index 0000000..fea83e0
Binary files /dev/null and b/code/sdk/tools/bin/xts_tools/PCID.sc differ
diff --git a/code/sdk/tools/bin/xts_tools/syscap_tool_bin/syscap_tool b/code/sdk/tools/bin/xts_tools/syscap_tool_bin/syscap_tool
new file mode 100644 (file)
index 0000000..f32ca1a
Binary files /dev/null and b/code/sdk/tools/bin/xts_tools/syscap_tool_bin/syscap_tool differ
diff --git a/jsapp/keyinput_sample/.gitignore b/jsapp/keyinput_sample/.gitignore
new file mode 100644 (file)
index 0000000..82dc42b
--- /dev/null
@@ -0,0 +1,15 @@
+*.iml\r
+.gradle\r
+/local.properties\r
+/.idea/caches\r
+/.idea/libraries\r
+/.idea/modules.xml\r
+/.idea/workspace.xml\r
+/.idea/navEditor.xml\r
+/.idea/assetWizardSettings.xml\r
+.DS_Store\r
+/build\r
+/captures\r
+.externalNativeBuild\r
+/entry/.preview\r
+.cxx\r
diff --git a/jsapp/keyinput_sample/build.gradle b/jsapp/keyinput_sample/build.gradle
new file mode 100644 (file)
index 0000000..5e5275d
--- /dev/null
@@ -0,0 +1,38 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.\r
+apply plugin: 'com.huawei.ohos.app'\r
+\r
+//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#ZH-CN_TOPIC_0000001154985555__section1112183053510\r
+ohos {\r
+    compileSdkVersion 5\r
+    defaultConfig {\r
+        compatibleSdkVersion 5\r
+    }\r
+}\r
+       \r
+buildscript {\r
+    repositories {\r
+        maven {\r
+            url 'https://repo.huaweicloud.com/repository/maven/'\r
+        }\r
+        maven {\r
+            url 'https://developer.huawei.com/repo/'\r
+        }\r
+               jcenter()\r
+    }\r
+    dependencies {\r
+        classpath 'com.huawei.ohos:hap:2.4.4.2'\r
+        classpath 'com.huawei.ohos:decctest:1.2.4.0'\r
+    }\r
+}\r
+\r
+allprojects {\r
+    repositories {\r
+        maven {\r
+            url 'https://repo.huaweicloud.com/repository/maven/'\r
+        }\r
+        maven {\r
+            url 'https://developer.huawei.com/repo/'\r
+        }\r
+               jcenter()\r
+    }\r
+}\r
diff --git a/jsapp/keyinput_sample/entry/.gitignore b/jsapp/keyinput_sample/entry/.gitignore
new file mode 100644 (file)
index 0000000..3543521
--- /dev/null
@@ -0,0 +1 @@
+/build\r
diff --git a/jsapp/keyinput_sample/entry/build.gradle b/jsapp/keyinput_sample/entry/build.gradle
new file mode 100644 (file)
index 0000000..e61770f
--- /dev/null
@@ -0,0 +1,25 @@
+apply plugin: 'com.huawei.ohos.hap'\r
+apply plugin: 'com.huawei.ohos.decctest'\r
+//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#ZH-CN_TOPIC_0000001154985555__section1112183053510\r
+ohos {\r
+    compileSdkVersion 5\r
+    defaultConfig {\r
+        compatibleSdkVersion 5\r
+    }\r
+    buildTypes {\r
+        release {\r
+            proguardOpt {\r
+                proguardEnabled false\r
+                rulesFiles 'proguard-rules.pro'\r
+            }\r
+        }\r
+    }\r
+    \r
+}\r
+\r
+dependencies {\r
+    testImplementation 'junit:junit:4.13'\r
+}\r
+decc {\r
+    supportType = ['html','xml']\r
+}\r
diff --git a/jsapp/keyinput_sample/entry/proguard-rules.pro b/jsapp/keyinput_sample/entry/proguard-rules.pro
new file mode 100644 (file)
index 0000000..f7666e4
--- /dev/null
@@ -0,0 +1 @@
+# config module specific ProGuard rules here.
\ No newline at end of file
diff --git a/jsapp/keyinput_sample/entry/src/main/config.json b/jsapp/keyinput_sample/entry/src/main/config.json
new file mode 100644 (file)
index 0000000..e3933c9
--- /dev/null
@@ -0,0 +1,40 @@
+{\r
+  "app": {\r
+    "bundleName": "com.example.keyinput_sample",\r
+    "vendor": "example",\r
+    "version": {\r
+      "code": 1000000,\r
+      "name": "1.0.0"\r
+    }\r
+  },\r
+  "deviceConfig": {},\r
+  "module": {\r
+    "deviceType": [\r
+      "liteWearable"\r
+    ],\r
+    "distro": {\r
+      "deliveryWithInstall": true,\r
+      "moduleName": "entry",\r
+      "moduleType": "entry"\r
+    },\r
+    "abilities": [\r
+      {\r
+        "name": "default",\r
+        "icon": "$media:icon",\r
+        "label": "$string:entry_MainAbility",\r
+        "type": "page"\r
+      }\r
+    ],\r
+    "js": [\r
+      {\r
+        "pages": [\r
+          "pages/index/index",\r
+          "pages/keyinput/keyinput",\r
+          "pages/list_scrollToEnd/list_scrollToEnd",\r
+          "pages/rotation/rotation"\r
+        ],\r
+        "name": "default"\r
+      }\r
+    ]\r
+  }\r
+}
\ No newline at end of file
diff --git a/jsapp/keyinput_sample/entry/src/main/js/default/app.js b/jsapp/keyinput_sample/entry/src/main/js/default/app.js
new file mode 100644 (file)
index 0000000..6d060ff
--- /dev/null
@@ -0,0 +1,8 @@
+export default {
+    onCreate() {
+        console.info("Application onCreate");
+    },
+    onDestroy() {
+        console.info("Application onDestroy");
+    }
+};
diff --git a/jsapp/keyinput_sample/entry/src/main/js/default/i18n/en-US.json b/jsapp/keyinput_sample/entry/src/main/js/default/i18n/en-US.json
new file mode 100644 (file)
index 0000000..e63c70d
--- /dev/null
@@ -0,0 +1,6 @@
+{
+  "strings": {
+    "hello": "Hello",
+    "world": "World"
+  }
+}
\ No newline at end of file
diff --git a/jsapp/keyinput_sample/entry/src/main/js/default/i18n/zh-CN.json b/jsapp/keyinput_sample/entry/src/main/js/default/i18n/zh-CN.json
new file mode 100644 (file)
index 0000000..de6ee57
--- /dev/null
@@ -0,0 +1,6 @@
+{
+  "strings": {
+    "hello": "您好",
+    "world": "世界"
+  }
+}
\ No newline at end of file
diff --git a/jsapp/keyinput_sample/entry/src/main/js/default/pages/index/index.css b/jsapp/keyinput_sample/entry/src/main/js/default/pages/index/index.css
new file mode 100644 (file)
index 0000000..8d369c9
--- /dev/null
@@ -0,0 +1,42 @@
+.container {
+    width: 100%;
+    height: 100%;
+    justify-content: center;
+    align-items: center;
+    display: flex;
+    flex-direction: column;
+}
+
+.title {
+    width: 200px;
+    font-size: 30px;
+    text-align: center;
+}
+
+.listcontainer{
+    width: 80%;
+    height: 60%;
+    justify-content: center;
+    align-items: center;
+    background-color: black;
+    flex-direction: column;
+}
+
+.listitem{
+    width: 100%;
+    height: 80px;
+    flex-direction: column;
+    background-color: black;
+    justify-content: center;
+}
+
+.btn{
+    width: 100%;
+    height: 70px;
+    font-size: 24px;
+    text-align:center;
+    text-align-vertical: center;
+    color: black;
+    background-color: grey;
+}
+
diff --git a/jsapp/keyinput_sample/entry/src/main/js/default/pages/index/index.hml b/jsapp/keyinput_sample/entry/src/main/js/default/pages/index/index.hml
new file mode 100644 (file)
index 0000000..41b2076
--- /dev/null
@@ -0,0 +1,7 @@
+<div class="container" onswipe="swipe">
+    <list class="listcontainer">
+        <list-item class="listitem" for="{{pages}}">
+            <text class="btn"  on:click="onClick($item.path)">{{$item.title}}</text>
+        </list-item>
+    </list>
+</div>
diff --git a/jsapp/keyinput_sample/entry/src/main/js/default/pages/index/index.js b/jsapp/keyinput_sample/entry/src/main/js/default/pages/index/index.js
new file mode 100644 (file)
index 0000000..8a875e6
--- /dev/null
@@ -0,0 +1,30 @@
+import app from "@system.app"
+import router from '@system.router';
+
+export default {
+    data: {
+        pages: [
+            {
+                title: "keyinput Listener",
+                path: "pages/keyinput/keyinput"
+            },
+            {
+                title: "List scrollToEnd",
+                path: "pages/list_scrollToEnd/list_scrollToEnd"
+            }
+        ]
+    },
+    onShow() {
+
+    },
+    onClick(item){
+        router.replace({
+            uri:item,
+        })
+    },
+    swipe(e){
+        if (e.direction == "right" && e.distance > 200) {
+            app.terminate()
+        }
+    }
+}
diff --git a/jsapp/keyinput_sample/entry/src/main/js/default/pages/keyinput/keyinput.css b/jsapp/keyinput_sample/entry/src/main/js/default/pages/keyinput/keyinput.css
new file mode 100644 (file)
index 0000000..3ef4e82
--- /dev/null
@@ -0,0 +1,12 @@
+.container {
+    width: 454px;
+    height: 454px;
+    justify-content: center;
+    align-items: center;
+}
+
+.title {
+    width: 200px;
+    font-size: 30px;
+    text-align: center;
+}
diff --git a/jsapp/keyinput_sample/entry/src/main/js/default/pages/keyinput/keyinput.hml b/jsapp/keyinput_sample/entry/src/main/js/default/pages/keyinput/keyinput.hml
new file mode 100644 (file)
index 0000000..cd062ec
--- /dev/null
@@ -0,0 +1,5 @@
+<div class="container" onswipe="swipe">
+    <text class="title">
+        register KeyListener & RotateListener
+    </text>
+</div>
diff --git a/jsapp/keyinput_sample/entry/src/main/js/default/pages/keyinput/keyinput.js b/jsapp/keyinput_sample/entry/src/main/js/default/pages/keyinput/keyinput.js
new file mode 100644 (file)
index 0000000..60c9e5f
--- /dev/null
@@ -0,0 +1,31 @@
+import key from '@system.keyinput';
+import router from '@system.router';
+
+function Rotatecallback(data) {
+    console.info("Rotatecallback : " + JSON.stringify(data))
+}
+
+export default {
+    data: {
+        Test:"Test"
+    },
+    onShow() {
+        let that = this
+        key.setKeyListener({
+            "callback": function(data){
+                console.info("Keycallback data : "+JSON.stringify(data)+" Test : "+that.Test)
+            }
+        })
+        key.setRotateListener({
+            "callback": Rotatecallback
+        })
+    },
+    swipe(e){
+        console.info(" swipe "+JSON.stringify(e))
+        if (e.direction == "right") {
+            router.replace({
+                uri: 'pages/index/index',
+            })
+        }
+    }
+}
diff --git a/jsapp/keyinput_sample/entry/src/main/js/default/pages/list_scrollToEnd/list_scrollToEnd.css b/jsapp/keyinput_sample/entry/src/main/js/default/pages/list_scrollToEnd/list_scrollToEnd.css
new file mode 100644 (file)
index 0000000..7a53bdd
--- /dev/null
@@ -0,0 +1,37 @@
+.container {
+    width: 100%;
+    height: 100%;
+    justify-content: center;
+    align-items: center;
+    display: flex;
+    flex-direction: column;
+}
+
+.listcontainer{
+    width: 80%;
+    height: 60%;
+    justify-content: center;
+    align-items: center;
+    background-color: pink;
+    flex-direction: column;
+}
+
+.listitem{
+    width: 100%;
+    flex-direction: column;
+    background-color: green;
+}
+
+.btn{
+    width: 100%;
+    font-size: 24px;
+    text-align:left;
+    color: black;
+    background-color: grey;
+}
+
+.title {
+    width: 200px;
+    font-size: 30px;
+    text-align: center;
+}
diff --git a/jsapp/keyinput_sample/entry/src/main/js/default/pages/list_scrollToEnd/list_scrollToEnd.hml b/jsapp/keyinput_sample/entry/src/main/js/default/pages/list_scrollToEnd/list_scrollToEnd.hml
new file mode 100644 (file)
index 0000000..412c997
--- /dev/null
@@ -0,0 +1,9 @@
+<div class="container" onswipe="swipe">
+    <div style="height: 20%;width: 100%;"></div>
+    <list class="listcontainer" ref="list" on:click="scrollToEnd" if="{{isShow}}">
+        <list-item class="listitem" for="{{todolist}}">
+            <text class="btn" >{{$item}}</text>
+        </list-item>
+    </list>
+    <div style="height: 20%;width: 100%;"></div>
+</div>
diff --git a/jsapp/keyinput_sample/entry/src/main/js/default/pages/list_scrollToEnd/list_scrollToEnd.js b/jsapp/keyinput_sample/entry/src/main/js/default/pages/list_scrollToEnd/list_scrollToEnd.js
new file mode 100644 (file)
index 0000000..d243142
--- /dev/null
@@ -0,0 +1,39 @@
+import router from '@system.router';
+
+export default {
+    data: {
+        isShow:true,
+        todolist: [
+                "add list item 1",
+        ],
+        listid:0,
+        scrollid:0
+    },
+    onShow() {
+        this.listid = setInterval(() => {
+            if (this.todolist[0].length < 1050) {
+                console.info(" this.todolist[0].length < 1050 ")
+                let temp = this.todolist[0] + "add list item 1";
+                this.todolist[0] = temp;
+                this.todolist = this.todolist;
+            } else {
+                console.info(" this.todolist[0].length > 1050 ")
+            }
+        }, 2500)
+        this.scrollid = setInterval(() => {
+            const list = this.$refs.list;
+            list.scrollToEnd(this.code);
+        }, 1000)
+    },
+    swipe(e) {
+        if (e.direction == "right" && e.distance > 200) {
+            router.replace({
+                uri: 'pages/index/index',
+            })
+        }
+    },
+    onHide(){
+        clearInterval(this.listid);
+        clearInterval(this.scrollid);
+    }
+}
diff --git a/jsapp/keyinput_sample/entry/src/main/js/default/pages/rotation/rotation.css b/jsapp/keyinput_sample/entry/src/main/js/default/pages/rotation/rotation.css
new file mode 100644 (file)
index 0000000..77816c9
--- /dev/null
@@ -0,0 +1,9 @@
+.container {
+    width: 100%;
+    height: 100%;
+    justify-content: center;
+    align-items: center;
+    display: flex;
+    flex-direction: row;
+}
+
diff --git a/jsapp/keyinput_sample/entry/src/main/js/default/pages/rotation/rotation.hml b/jsapp/keyinput_sample/entry/src/main/js/default/pages/rotation/rotation.hml
new file mode 100644 (file)
index 0000000..8384a9e
--- /dev/null
@@ -0,0 +1,20 @@
+<div class="container" onswipe="swipe">
+    <picker-view style=" height : 60%; width : 25%;" type="text" range="{{picker_data}}" ref="pickerview"  on:click="fun_pickerview"/>
+    <list style="width: 25%; height: 60%;" ref="list" on:click="fun_list">
+        <list-item style="width: 100%; height: 150px;" for="{{todolist}}">
+            <text style="width: 100%; height: 150px; ">{{$item.title}}  111</text>
+        </list-item>
+    </list>
+    <swiper style="width: 25%; height: 60%; flex-direction: row;" ref="swiper" on:click="fun_swiper">
+        <div style="width: 100%; height: 100%; background-color: #007dff; ">
+            <text>1</text>
+        </div>
+        <div style="width: 100%; height: 100%; background-color: #ff7500;">
+            <text>2</text>
+        </div>
+        <div style="width: 100%; height: 100%; background-color: #41ba41;">
+            <text>3</text>
+        </div>
+    </swiper>
+    <slider style=" height : 60%; width : 25%; background-color: red;" ref="slider" on:click="fun_slider"></slider>
+</div>
diff --git a/jsapp/keyinput_sample/entry/src/main/js/default/pages/rotation/rotation.js b/jsapp/keyinput_sample/entry/src/main/js/default/pages/rotation/rotation.js
new file mode 100644 (file)
index 0000000..e90911f
--- /dev/null
@@ -0,0 +1,78 @@
+import router from '@system.router';
+
+export default {
+    data: {
+        picker_data: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30"],
+        todolist: [
+            {
+                title: 'aaa',
+            },
+            {
+                title: 'bbb'
+            },
+            {
+                title: 'ccc'
+            },
+            {
+                title: 'ddd'
+            },
+            {
+                title: 'eee'
+            },
+            {
+                title: 'fff'
+            },
+            {
+                title: 'ggg'
+            },
+            {
+                title: 'hhh'
+            },
+            {
+                title: 'iii'
+            },
+            {
+                title: 'jjj'
+            },
+            {
+                title: 'kkk'
+            },
+        ],
+    },
+    fun_list() {
+        console.info("fun_list")
+        const list = this.$refs.list;
+        list.rotation({
+            "focus": true
+        })
+    },
+    fun_pickerview() {
+        console.info("fun_pickerview")
+        const pickerview = this.$refs.pickerview;
+        pickerview.rotation({
+            "focus": true
+        })
+    },
+    fun_swiper() {
+        console.info("fun_pickerview")
+        const swiper = this.$refs.swiper;
+        swiper.rotation({
+            "focus": true
+        })
+    },
+    fun_slider() {
+        console.info("fun_slider")
+        const slider = this.$refs.slider;
+        slider.rotation({
+            "focus": true
+        })
+    },
+    swipe(e) {
+        if (e.direction == "right" && e.distance > 200) {
+            router.replace({
+                uri: 'pages/index/index',
+            })
+        }
+    }
+}
+
diff --git a/jsapp/keyinput_sample/entry/src/main/resources/base/element/string.json b/jsapp/keyinput_sample/entry/src/main/resources/base/element/string.json
new file mode 100644 (file)
index 0000000..2be18c1
--- /dev/null
@@ -0,0 +1,8 @@
+{\r
+  "string": [\r
+    {\r
+      "name": "entry_MainAbility",\r
+      "value": "entry_MainAbility"\r
+    }\r
+  ]\r
+}\r
diff --git a/jsapp/keyinput_sample/entry/src/main/resources/base/media/icon.png b/jsapp/keyinput_sample/entry/src/main/resources/base/media/icon.png
new file mode 100644 (file)
index 0000000..ce307a8
Binary files /dev/null and b/jsapp/keyinput_sample/entry/src/main/resources/base/media/icon.png differ
diff --git a/jsapp/keyinput_sample/entry/src/main/resources/base/media/icon_small.png b/jsapp/keyinput_sample/entry/src/main/resources/base/media/icon_small.png
new file mode 100644 (file)
index 0000000..0ed5fea
Binary files /dev/null and b/jsapp/keyinput_sample/entry/src/main/resources/base/media/icon_small.png differ
diff --git a/jsapp/keyinput_sample/gradle.properties b/jsapp/keyinput_sample/gradle.properties
new file mode 100644 (file)
index 0000000..3966a04
--- /dev/null
@@ -0,0 +1,13 @@
+# Project-wide Gradle settings.\r
+# IDE (e.g. DevEco Studio) users:\r
+# Gradle settings configured through the IDE *will override*\r
+# any settings specified in this file.\r
+# For more details on how to configure your build environment visit\r
+# http://www.gradle.org/docs/current/userguide/build_environment.html\r
+# Specifies the JVM arguments used for the daemon process.\r
+# The setting is particularly useful for tweaking memory settings.\r
+# If the Chinese output is garbled, please configure the following parameter.\r
+# This function is enabled by default when the DevEco Studio builds the hap/app,if you need disable gradle parallel,you should set org.gradle.parallel false.\r
+# more information see https://docs.gradle.org/current/userguide/performance.html\r
+# org.gradle.parallel=false\r
+# org.gradle.jvmargs=-Dfile.encoding=GBK
\ No newline at end of file
diff --git a/jsapp/keyinput_sample/gradle/wrapper/gradle-wrapper.jar b/jsapp/keyinput_sample/gradle/wrapper/gradle-wrapper.jar
new file mode 100644 (file)
index 0000000..490fda8
Binary files /dev/null and b/jsapp/keyinput_sample/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/jsapp/keyinput_sample/gradle/wrapper/gradle-wrapper.properties b/jsapp/keyinput_sample/gradle/wrapper/gradle-wrapper.properties
new file mode 100644 (file)
index 0000000..f59159e
--- /dev/null
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://repo.huaweicloud.com/gradle/gradle-6.3-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/jsapp/keyinput_sample/gradlew b/jsapp/keyinput_sample/gradlew
new file mode 100644 (file)
index 0000000..2fe81a7
--- /dev/null
@@ -0,0 +1,183 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+    echo "$*"
+}
+
+die () {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+  NONSTOP* )
+    nonstop=true
+    ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=`expr $i + 1`
+    done
+    case $i in
+        0) set -- ;;
+        1) set -- "$args0" ;;
+        2) set -- "$args0" "$args1" ;;
+        3) set -- "$args0" "$args1" "$args2" ;;
+        4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Escape application args
+save () {
+    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+    echo " "
+}
+APP_ARGS=`save "$@"`
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+exec "$JAVACMD" "$@"
diff --git a/jsapp/keyinput_sample/gradlew.bat b/jsapp/keyinput_sample/gradlew.bat
new file mode 100644 (file)
index 0000000..62bd9b9
--- /dev/null
@@ -0,0 +1,103 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem      https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/jsapp/keyinput_sample/settings.gradle b/jsapp/keyinput_sample/settings.gradle
new file mode 100644 (file)
index 0000000..28d595f
--- /dev/null
@@ -0,0 +1 @@
+include ':entry'\r
diff --git a/patch_615_1029_to_1127.txt b/patch_615_1029_to_1127.txt
new file mode 100644 (file)
index 0000000..1ce62f5
--- /dev/null
@@ -0,0 +1,93 @@
+【补丁名称】patch_615_1029_to_1127\r
+【基础版本】b615 + 0906 + 1009 + 1029\r
+【修复问题】\r
+BT合入内容:\r
+1、新增需求:提供配置SPP数传重试次数的功能。\r
+\r
+PLT合入内容\r
+1、 问题描述:解决客户打开双击宏后,概率性单击按键上报双击事件问题。\r
+    测试建议:powerkey双击场景验证,库上默认没有打开双击宏\r
+2、 问题描述:gettimeofday底层调用接口修改,删除冗余算法。。\r
+    测试建议:不同步时间的情况下,压测系统时间误差\r
+3、 代码优化:低功耗流程优化\r
+    测试建议:压测深睡场景\r
+4、 维测优化:panic函数流程中增加trace&mem导出\r
+\r
+AUDIO&MEDIA合入内容\r
+1、 问题描述:概率性初始化失败,导致音频播放失败。\r
+    测试场景:媒体初始化加载某一个插件失败以后,再进行媒体的初始化\r
+2、 问题描述:手表连接蓝牙耳机播放蓝牙音乐时来电,挂断后会导致音乐无法恢复。\r
+    测试场景:蓝牙sink音乐+来电铃声+蓝牙通话,通话打断音乐以后,通话结束以后,音乐恢复\r
+3、 问题描述:视频表盘弹窗概率性出现视频黑帧\r
+    测试场景:视频表盘场景,视频还未完全起播就灭屏;视频表盘+视频弹窗场景\r
+4、 问题描述:蓝牙通话的场景,来电铃声的时候需要静音通话,有时候静音无效。\r
+    测试场景:蓝牙通话的场景,来电铃声的时候需要静音通话,有时候静音无效\r
+5、 需求描述:实现音视频播放时进度条拖动需求\r
+    测试场景:音视频播放的时候,都可以调用seek接口进行跳转\r
+6、 问题描述:解决音乐播放完DSP无法进入低功耗的问题\r
+    测试场景:本地音乐播放\r
+7、 问题描述:JS敲木鱼设置音量不生效\r
+    测试场景:js敲木鱼的音频播放,在播放前进行音量和流类型的设置,在真正播放的时候生效\r
+8、 问题描述:  不停推送微信消息会出现音频播放失败的问题\r
+    测试场景,在播放蓝牙sink音乐的时候,不停的推送微信消息\r
+9、 问题描述:录音打断sink音乐,结束录音后sink音乐无法恢复。\r
+    测试场景:先播放蓝牙sink音乐再起小度语音会打断sink音乐,小度语音退出以后,sink音乐会恢复\r
+\r
+GUI合入内容\r
+1、 新增需求:AOD离线表盘\r
+    测试建议:通过工具制作AOD离线表盘,上板测验\r
+2、 新增需求:球形菜单\r
+    测试建议:NativeJS示例页面,点击进入球形菜单,滑动,点击按钮测试,参照ui_test_sphere_view.cpp\r
+3、 新增需求:蜂窝瀑布流支持UITransformGroup\r
+    测试建议:NativeJS示例页面,点击进入蜂窝表盘/瀑布列表,点击底部中间位置切换模式,退出再重新进入页面,图标上有叠加其他元素,并且正常响应拖动和点击操作。参照ui_test_hexagons_list.cpp\r
+4、 新增需求:Slice跟手转场\r
+    测试建议:NativeJS,进入设置界面后,右滑跟手返回前一页面,参照SettingPresenter.cpp以及限制\r
+5、 问题描述:解决视频特定场景的停播问题\r
+    测试建议:图形内存严重不足时起播视频,视频起播后调用Stop后重新设置视频源再起播\r
+6、 问题描述:解决CrossView上下滑动高斯模糊消失问题\r
+    测试建议:一级表盘界面,向一个方向拖动一段距离后,快速反向滑动然后松手,确认反向拉出的界面是否有正常的高斯模糊效果\r
+7、 问题描述:解决地图相关的显示和内存问题\r
+    测试建议:测试地图业务\r
+8、 问题描述:解决局部视频滑动以及亮灭屏后显示问题\r
+    测试建议:在一级卡片中播放位于非[0,0]的局部视频,测试左右滑动和量灭屏\r
+9、 问题描述:解决UIRollerView移除最后一个控件后挂死问题\r
+    测试建议:NativeJS示例页面,点击进入滚筒后点击页面底部,反复点击remove至到控件被全部移除\r
+OHOS合入内容\r
+1、 新增需求:JS应用名支持动态切换语言。\r
+    测试建议:使用AT命令测试切换语言场景:AT^OHOSFWK_CHANGE_LANGUAGE=en-US,退出applist,再进入后应用名切换为中文。\r
+2、 新增需求:兼容IDE5.0和2.1版本安装包。\r
+    安装不同版本IDE(IDE5.0和2.1)编译出的安装包,测试安装是否正常。\r
+3、 新增需求:添加一个AT命令用于切换语言。\r
+    测试建议:使用AT命令切换语言AT^OHOSFWK_CHANGE_LANGUAGE=en-US\r
+4、 新增需求:增加最大应用数量,从30修改为60\r
+5、 新增需求:List 滑动到底部功能添加,以及滑动底部功能js sample代码,示例代码:jsapp/keyinput_sample\r
+6、 代码优化:听书新增streamType API;文心一言设置getApp获取回调,item高度自适应\r
+7、 代码优化:swiper滑动频繁触发OnDrag原生日志影响流畅度,屏蔽OnDrag原生日志\r
+8、 代码优化:rotate focus获取焦点,再隐藏控件挂死问题 。示例代码:jsapp/keyinput_sample\r
+9、 新增需求:keyinput 模块,扩展社区标准接口onClick, onPress\r
+10、XTS认证易用性优化\r
+    developtools_syscap_codec仓 归档syscap_tool工具\r
+    测试建议:linux 执行命令验证syscap_tool工具的可使用性 \r
+    参考 :https://gitee.com/openharmony/developtools_syscap_codec下使用示例\r
+    例如:./syscap_tool -Pei pcid.json -o path/\r
+11、新增需求:支持跑马灯功能,跑马灯文本支持旋转功能合\r
+    测试建议:使用jsapp.zip的marqueesample源码编译出bin,板端安装应用进行测试\r
+12、新增需求: 新增支持点击power键正常关闭notify。\r
+    测试建议:js应用下 闹钟notifyshowing时 点击power键正常关闭notify。参考代码:application\wearable\service\msg_center\src\msg_center_customer.cpp\r
+13、代码优化:js安装命令解决内存泄露\r
+    开发建议:客户参考js安装回调ReceiveCallback中,调用AdapterFree\r
+\r
+【修改影响】NA\r
+\r
+【使用方法】\r
+    1、合入0906补丁\r
+    2、合入1009补丁\r
+    3、合入1029补丁 \r
+    4、合入1127补丁(包含1029到1127所有调试补丁)\r
+\r
+【自测情况】\r
+    自验证范围:\r
+       全功能冒烟\r
+    自验证target:\r
+       Native-js、target3 rc版本\r
+【是否合入版本】根据测试结果确定\r