patch_650_base_to_0423 补丁合入提交 ,界面可能有问题需要修改
authorluozheng <1732036298@qq.com>
Tue, 13 May 2025 08:30:44 +0000 (16:30 +0800)
committerluozheng <1732036298@qq.com>
Tue, 13 May 2025 08:30:44 +0000 (16:30 +0800)
508 files changed:
code/sdk/application/brandy/brandy_standard/thread_pri_init.c
code/sdk/application/brandy/brandy_standard/thread_pri_init.h
code/sdk/application/wearable/fd230/nativeabilityfwk/include/PageTransitionMgr.h
code/sdk/application/wearable/fd230/nativeabilityfwk/src/Ability.cpp
code/sdk/application/wearable/fd230/nativeapp/CMakeLists.txt
code/sdk/application/wearable/fd230/nativeapp/brandy-auto-ota-cli/libuikit_fwk.a
code/sdk/application/wearable/fd230/nativeapp/brandy-auto-ota-ser/libuikit_fwk.a
code/sdk/application/wearable/fd230/nativeapp/brandy-native-js-fd230/libuikit_fwk.a
code/sdk/application/wearable/fd230/nativeapp/brandy-native-js-xts/libuikit_fwk.a
code/sdk/application/wearable/fd230/nativeapp/brandy-native-js/libuikit_fwk.a
code/sdk/application/wearable/fd230/nativeapp/brandy-xts/libuikit_fwk.a
code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/NativeRegisterManager.h
code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/NativeRegisterManager.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/alipay/src/AlipayPresenter.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/applist/src/ApplistModel.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/applist/src/ApplistView.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothModel.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/callerlog/src/CallerLogModel.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/DialBinParserManager.h
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/DialBinParserV3.h [new file with mode: 0644]
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/DialBinTypes.h
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/MainViewSample.h
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialArcLabelView.h
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialDataBase.h
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialDigitalImgView.h
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialLabelView.h
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialModelTime.h
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialOHDataType.h [new file with mode: 0644]
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialOHSliceId.h [new file with mode: 0644]
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialOptionImgView.h
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialSequenceContainer.h [new file with mode: 0644]
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialStaticImgView.h
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialTimePublisher.h [new file with mode: 0644]
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialViewContainer.h [new file with mode: 0644]
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialViewGroup.h
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/ModelDialDataFactory.h
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/WatchInterface.h [new file with mode: 0644]
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/MainViewSample.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialArcLabelView.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialDigitalImgView.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialLabelView.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialModelTime.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialOptionImgView.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialSequenceContainer.cpp [new file with mode: 0644]
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialStaticImgView.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialTimePublisher.cpp [new file with mode: 0644]
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialViewContainer.cpp [new file with mode: 0644]
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialViewGroup.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/ModelDialDataFactory.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/WatchInterface.cpp [new file with mode: 0644]
code/sdk/application/wearable/fd230/nativeapp/nativeui/offlinevoice/src/VocassistPresenter.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/player/src/PlayersModel.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/player/src/PlayersPresenter.cpp
code/sdk/application/wearable/fd230/service/CMakeLists.txt
code/sdk/application/wearable/fd230/service/app_store/app_store.cpp
code/sdk/application/wearable/fd230/service/app_store/app_store.h
code/sdk/application/wearable/fd230/service/dial_market/CMakeLists.txt [new file with mode: 0644]
code/sdk/application/wearable/fd230/service/dial_market/dial_market.h [new file with mode: 0644]
code/sdk/application/wearable/fd230/service/msg_center/CMakeLists.txt
code/sdk/application/wearable/fd230/service/msg_center/brandy-auto-ota-cli/libmsg_center.a
code/sdk/application/wearable/fd230/service/msg_center/brandy-auto-ota-ser/libmsg_center.a
code/sdk/application/wearable/fd230/service/msg_center/brandy-native-js-fd230/libmsg_center.a
code/sdk/application/wearable/fd230/service/msg_center/brandy-native-js-xts/libmsg_center.a
code/sdk/application/wearable/fd230/service/msg_center/brandy-native-js/libmsg_center.a
code/sdk/application/wearable/fd230/service/msg_center/brandy-xts/libmsg_center.a
code/sdk/application/wearable/fd230/service/msg_center/include/msg_center_customer.h
code/sdk/application/wearable/fd230/service/msg_center/include/msg_center_protocol.h
code/sdk/application/wearable/fd230/service/msg_center/src/notify/ketinput/include/NotifyOnKeyListener.h [new file with mode: 0644]
code/sdk/application/wearable/fd230/service/msg_center/src/notify/ketinput/src/NotifyOnKeyListener.cpp [new file with mode: 0644]
code/sdk/application/wearable/fd230/service/power_manager/src/actions/display_action.c
code/sdk/application/wearable/fd230/service/xiaodu_voice/xiaodu_voice.cpp
code/sdk/application/wearable/fd230/xts/nativeapp/brandy-native-js-xts/libuikit_fwk.a
code/sdk/application/wearable/fd230/xts/service/msg_center/brandy-native-js-xts/libmsg_center.a
code/sdk/application/wearable/nativeabilityfwk/include/PageTransitionMgr.h
code/sdk/application/wearable/nativeabilityfwk/src/Ability.cpp
code/sdk/application/wearable/nativeapp/CMakeLists.txt
code/sdk/application/wearable/nativeapp/brandy-auto-ota-cli/libuikit_fwk.a
code/sdk/application/wearable/nativeapp/brandy-auto-ota-ser/libuikit_fwk.a
code/sdk/application/wearable/nativeapp/brandy-native-js-fd230/libuikit_fwk.a
code/sdk/application/wearable/nativeapp/brandy-native-js/libuikit_fwk.a
code/sdk/application/wearable/nativeapp/brandy-xts/libuikit_fwk.a
code/sdk/application/wearable/nativeapp/nativelauncher/include/NativeRegisterManager.h
code/sdk/application/wearable/nativeapp/nativelauncher/include/UiConfig.h
code/sdk/application/wearable/nativeapp/nativelauncher/src/NativeRegisterManager.cpp
code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/applist/src/ApplistView.cpp
code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/BluetoothModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/callerlog/src/CallerLogModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/key/src/KeyInputListener.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/include/DialBinParserManager.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/DialBinParserV3.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/main/include/DialBinTypes.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialArcLabelView.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialDataBase.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialDigitalImgView.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialLabelView.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialModelTime.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialOHDataType.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialOHSliceId.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialOptionImgView.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialSequenceContainer.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialStaticImgView.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialTimePublisher.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialViewContainer.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialViewGroup.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/ModelDialDataFactory.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/WatchInterface.h [new file with mode: 0644]
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/MainViewSample.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/DialModelTime.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialOptionImgView.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialSequenceContainer.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialStaticImgView.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialTimePublisher.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialViewContainer.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialViewGroup.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/ModelDialDataFactory.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/WatchInterface.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/makephone/src/MainCallingPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/src/VocassistPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersView.cpp
code/sdk/application/wearable/nativeapp/nativeui/rebootdevice/src/RebootView.cpp
code/sdk/application/wearable/nativeapp/nativeui/set_dial/src/SetDialModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/videocard/include/VideoCard.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/videocard/src/VideoCard.cpp [new file with mode: 0644]
code/sdk/application/wearable/service/CMakeLists.txt
code/sdk/application/wearable/service/app_store/app_store.cpp
code/sdk/application/wearable/service/app_store/app_store.h
code/sdk/application/wearable/service/dial_market/CMakeLists.txt [new file with mode: 0644]
code/sdk/application/wearable/service/dial_market/dial_market.h [new file with mode: 0644]
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/libmsg_center.a
code/sdk/application/wearable/service/msg_center/brandy-xts/libmsg_center.a
code/sdk/application/wearable/service/msg_center/include/msg_center_customer.h
code/sdk/application/wearable/service/msg_center/include/msg_center_protocol.h
code/sdk/application/wearable/service/msg_center/src/notify/ketinput/include/NotifyOnKeyListener.h [new file with mode: 0644]
code/sdk/application/wearable/service/msg_center/src/notify/ketinput/src/NotifyOnKeyListener.cpp [new file with mode: 0644]
code/sdk/application/wearable/service/power_manager/src/actions/display_action.c
code/sdk/application/wearable/service/xiaodu_voice/xiaodu_voice.cpp
code/sdk/application/wstp/at_service/app/app_at_process.c
code/sdk/application/wstp/at_service/app/app_cmd_manager.c
code/sdk/application/wstp/at_service/app/app_msg_manager.h
code/sdk/application/wstp/at_service/graphic/graphic_at_process.h
code/sdk/application/wstp/at_service/graphic/sample/gpu_sample.c
code/sdk/application/wstp/at_service/ohosfwk/ohosfwk_at_process.cpp
code/sdk/bootloader/flashboot/brandy/boot_ulp/boot_ulp.c
code/sdk/build/config/target_config/brandy/config.py
code/sdk/build/config/target_config/brandy/param_sector/param_sector_no_dsp.json [new file with mode: 0644]
code/sdk/build/config/target_config/common_config.py
code/sdk/build/script/cmake_builder.py
code/sdk/drivers/adapter/ohos_3.2/iot_gpio.c
code/sdk/drivers/boards/brandy_evb/board_config/board_evb.h
code/sdk/drivers/boards/brandy_evb/memory_config/include/memory_config_common.h
code/sdk/drivers/boards/brandy_evb/product/product_evb4_standard.h
code/sdk/drivers/boards/brandy_evb/product/product_evb_standard.h
code/sdk/drivers/chips/brandy/clocks_core/drivers/acore/clocks_core.c
code/sdk/drivers/chips/brandy/porting/button/button_porting.c
code/sdk/drivers/drivers/driver/audio/CMakeLists.txt
code/sdk/drivers/drivers/driver/audio/include/soc_uapi_audio_sys.h
code/sdk/drivers/drivers/driver/audio/include/soc_uapi_sound.h
code/sdk/drivers/drivers/driver/audio/source/api/include/mpi_sys.h
code/sdk/drivers/drivers/driver/audio/source/api/sys/mpi_sys.c
code/sdk/drivers/drivers/driver/audio/source/api/sys/uapi_sys.c
code/sdk/drivers/drivers/driver/audio/source/build/configs/brandy/brandy_evb4_liteos_cfg.mak
code/sdk/drivers/drivers/driver/audio/source/build/configs/brandy/brandy_evb4max_liteos_cfg.mak
code/sdk/drivers/drivers/driver/audio/source/build/configs/brandy/brandy_evb4mini_liteos_cfg.mak
code/sdk/drivers/drivers/driver/audio/source/build/configs/brandy/brandy_evb_liteos_cfg.mak
code/sdk/drivers/drivers/driver/audio/source/build/configs/brandy/brandy_fpga_liteos_cfg.mak
code/sdk/drivers/drivers/driver/audio/source/drv/CMakeLists.txt
code/sdk/drivers/drivers/driver/audio/source/drv/aoe/drv_ao.c
code/sdk/drivers/drivers/driver/audio/source/drv/aoe/drv_proc_ao.c
code/sdk/drivers/drivers/driver/audio/source/drv/arch/drv_sap_intf.c
code/sdk/drivers/drivers/driver/audio/source/drv/arch/include/drv_sap_ioctl.h
code/sdk/drivers/drivers/driver/audio/source/drv/arch/include/drv_sap_ioctl_cmd.h
code/sdk/drivers/drivers/driver/audio/source/drv/common/drv_overlay_load_from_file.c [new file with mode: 0644]
code/sdk/drivers/drivers/driver/audio/source/drv/common/drv_overlay_load_from_flash.c
code/sdk/drivers/drivers/driver/audio/source/drv/common/include/drv_overlay_load.h
code/sdk/drivers/drivers/driver/audio/source/drv/include/drv_sys.h
code/sdk/drivers/drivers/driver/audio/source/drv/sys/drv_sys.c
code/sdk/drivers/drivers/driver/audio/source/include/ao_struct.h
code/sdk/drivers/drivers/driver/audio/source/include/sea_aef.h
code/sdk/drivers/drivers/driver/button/button.c
code/sdk/drivers/drivers/driver/ipc/ipc_old/shared/ipc.c
code/sdk/drivers/drivers/driver/lcd/lcd_config.h
code/sdk/drivers/drivers/driver/mipi/shared/mipi_tx.h
code/sdk/drivers/drivers/driver/mmc/core/block.c
code/sdk/drivers/drivers/driver/mmc/host/sdhci/brandy/mmc_sdhci.c
code/sdk/drivers/drivers/driver/mmc/include/soc_mmc.h
code/sdk/include/middleware/services/bts/ble/bts_le_gap.h
code/sdk/include/middleware/services/bts/br/bts_br_gap.h
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/DialBinParser.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/connection_manager.c.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/display_vau.c.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/gt_bundle_manager_service.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/js_router.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/kaleidoscope_utils.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/map_svg_parser.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/particle_cell.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_view.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_cross_view.cpp.xml [new file with mode: 0644]
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_icosahedron_view.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_kaleidoscope_view.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_label_button_ext.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_map_view.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_particle_view.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_slipflow_view.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_transform_group.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/audio/build_hso_cfg/hso_database/xml/base/dsp_core/core_msg_aenc.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hdb/hdbcfg/mss_prim_db.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/bt_ahi_common.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/hci_hlp_ram.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/hfp_ag_ram.c.xml [new file with mode: 0644]
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/hfp_fsm_ram.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/patch_bth.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/sdk_hlp.c.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_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_brandy_service.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/mini/br/libbt_host_sdk.a
code/sdk/kernel/liteos/liteos_v207.1.0/Huawei_LiteOS/targets/brandy_app/include/soc/mmc.h
code/sdk/kernel/osal/CMakeLists.txt
code/sdk/kernel/osal/src/freertos/osal_fileops.c [new file with mode: 0644]
code/sdk/middleware/chips/brandy/dfx/diag_audio.h
code/sdk/middleware/chips/brandy/dfx/include/log_def_gui.h
code/sdk/middleware/chips/brandy/dfx/include/soc_diag_cmd_id.h
code/sdk/middleware/chips/brandy/exception/chip_exception_utils.c
code/sdk/middleware/chips/brandy/exception/chip_exception_utils.h
code/sdk/middleware/chips/brandy/exception/chip_system_time.c
code/sdk/middleware/chips/brandy/exception/chip_system_time.h
code/sdk/middleware/chips/brandy/nv/nv_config/cfg/eng/acore/app.json
code/sdk/middleware/chips/brandy/nv/nv_config/cfg/user/acore/app.json
code/sdk/middleware/chips/brandy/nv/nv_config/include/common.h
code/sdk/middleware/chips/brandy/pm/pm.c
code/sdk/middleware/chips/brandy/pm/pm_adapt/pm_core.c
code/sdk/middleware/chips/brandy/pm/pm_adapt/pm_lp_stub.c
code/sdk/middleware/services/gpu/api/CMakeLists.txt
code/sdk/middleware/services/gpu/api/rm/CMakeLists.txt
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-r/libgfx_rm.a
code/sdk/middleware/services/gpu/api/rm/brandy-native-js-xts-r/libgfx_rm.a
code/sdk/middleware/services/gpu/api/rm/brandy-native-js-xts/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/gmmu/api/inc/soc_gmmu_api.h [new file with mode: 0644]
code/sdk/middleware/services/gpu/api/rm/gmmu/drv/include/drv_gmmu_intf.h [new file with mode: 0644]
code/sdk/middleware/services/gpu/api/rm/gmmu/drv/include/drv_gmmu_ioctl.h [new file with mode: 0644]
code/sdk/middleware/services/gpu/api/rm/gmmu/drv/include/drv_gmmu_struct.h [new file with mode: 0644]
code/sdk/middleware/services/gpu/api/rm/rm/inc/vau_arc.h [new file with mode: 0644]
code/sdk/middleware/services/gpu/api/rm/rm/inc/vau_math.h [new file with mode: 0644]
code/sdk/middleware/services/gpu/api/rm/rm/inc/vau_split_bezier.h [new file with mode: 0644]
code/sdk/middleware/services/gpu/api/rm/rm/inc/vau_stroke_dash.h [new file with mode: 0644]
code/sdk/middleware/services/gpu/api/rm/rm/inc/vau_stroke_path.h [new file with mode: 0644]
code/sdk/middleware/services/gpu/api/rm/testsuite-brandy-sdk/libgfx_rm.a
code/sdk/middleware/services/gpu/api/vau/CMakeLists.txt
code/sdk/middleware/services/gpu/drv/CMakeLists.txt
code/sdk/middleware/services/gpu/drv/vau/CMakeLists.txt
code/sdk/middleware/services/gpu/drv/vau/intf/drv_vau_intf.c
code/sdk/middleware/services/gpu/drv/vau/mem/vau_mem.c
code/sdk/middleware/services/gui/hal/common/include/graphic_hardware_config.h
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-xts/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/include/display_gmmu_internal.h [new file with mode: 0644]
code/sdk/middleware/services/gui/hal/display/src/display_gralloc.c
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/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-xts/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/graphic_hardware_types.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/kaleidoscope_utils.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_card_page.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_cross_view.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_particle_view.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_roller_view.h
code/sdk/middleware/services/gui/uikit/proprietary/include/dfx/dfx_frame_trace.h
code/sdk/middleware/services/gui/uikit/proprietary/include/font/font_global_manager.h
code/sdk/middleware/services/gui/uikit/proprietary/src/service/src/graphic_event_handler.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/ui_list_nested.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/ui_scroll_view_nested.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/dfx/dfx_cmd.cpp
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/dfx/dfx_frame_trace.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/dock/lite_key_device.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/draw/clip_img.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/draw/clip_img.h
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/draw/hw_draw_utils.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/draw/hw_draw_utils.h
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/engines/gfx/lite_m_gfx_engine.h
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/imgdecode/hw_jpeg_decoder.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/utils/frameworks/hals/gralloc_engines.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/utils/frameworks/mem_check.cpp
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_cross/ui_test_cross.cpp
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_cross/ui_test_cross.h
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_draw/ui_test_canvas_ext.cpp
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_draw/ui_test_canvas_ext.h
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_font/ui_test_multi_font.cpp
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_kaleidoscope/ui_test_kaleidoscope.cpp
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_ext/ui_test_list_ext.cpp
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_ext/ui_test_list_ext.h
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_fps/ui_test_list_fps.cpp
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_fps/ui_test_list_fps.h
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_message/ui_test_message.cpp
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_message/ui_test_message.h
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_roller_view/ui_test_roller_view.cpp
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_roller_view/ui_test_roller_view.h
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_transform_list/ui_test_scale_list.cpp
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_waterfall_list/ui_test_waterfall_list.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/animator/animator_manager.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/animator/animator_manager.h
code/sdk/middleware/services/gui/uikit/ui/frameworks/common/text.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/components/text_adapter.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_abstract_scroll.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_circle_progress.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_label.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_list.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_scroll_view.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_swipe_view.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_view.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/core/task_manager.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/dock/pointer_input_device.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/draw/draw_utils.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/engines/gfx/gfx_engine_manager.cpp
code/sdk/middleware/services/gui/uikit/ui/interfaces/innerkits/common/task_manager.h
code/sdk/middleware/services/gui/uikit/ui/interfaces/innerkits/engines/gfx/gfx_engine_manager.h
code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/root_view.h
code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/text_adapter.h
code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_scroll.h
code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_label.h
code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_scroll_view.h
code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_swipe_view.h
code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h
code/sdk/middleware/services/gui/uikit/utils/interfaces/innerkits/graphic_config.h
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/policymanager/src/interrupt_manager.h
code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/policymanager/src/policy_manager.c
code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/streammanager/src/stream_manager.c
code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/streammanager/src/track_handle.c
code/sdk/middleware/services/media/foundation/player/frameworks/player_control/player/liteplayer.cpp
code/sdk/middleware/services/media/foundation/player/frameworks/player_impl.cpp
code/sdk/middleware/services/media/foundation/player/interfaces/kits/player_lite/js/builtin/include/audio_player.h
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/CMakeLists.txt
code/sdk/middleware/services/media/foundation/sample/wrapper/audio_manager_c_wrapper.cpp
code/sdk/middleware/services/media/foundation/sample/wrapper/audio_player_service.cpp
code/sdk/middleware/services/media/foundation/sample/wrapper/audio_player_service.h
code/sdk/middleware/services/media/foundation/sample/wrapper/audio_player_test.cpp
code/sdk/middleware/services/media/hal/audio/plugins/brandy/bluetooth/bluetooth_sub_port.c
code/sdk/middleware/services/media/hal/audio/plugins/brandy/common/src/plugin_common.c
code/sdk/middleware/services/media/hal/audio/plugins/brandy/modem/modem_sub_port.c
code/sdk/middleware/services/media/hal/audio/plugins/brandy/primary/primary_sub_port_in.c
code/sdk/middleware/services/media/hal/format/src/decrypt/src/decrypt_data.c
code/sdk/middleware/utils/dfx/diag_dfx_cmd/diag_gpu_proc/diag_gpu_proc.c
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-r/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-native-js-xts-r/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-native-js-xts/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-r/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-xts-r/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-xts/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/freebsd/liteos/drivers/mmc/core/mmc.c
code/sdk/open_source/freebsd/liteos/drivers/mmc/core/mmc_subr.c
code/sdk/open_source/freebsd/liteos/drivers/mmc/host/sdhci/sdhci.h
code/sdk/open_source/freebsd/liteos/drivers/mmc/host/sdhci/sdhci_init.c
code/sdk/open_source/freebsd/liteos/drivers/mmc/host/sdhci/sdhci_private.h
code/sdk/open_source/openharmony/drivers/peripheral/display/interfaces/include/display_vgu.h
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-xts/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/CMakeLists.txt
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/base/js_fwk_common.h
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-xts/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/canvas_component.cpp
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.cpp
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/picker_view_component.cpp
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/picker_view_component.h
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/slider_component.cpp
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/context/js_timer_list.h
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/network/network_listener.h [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/network/network_module.cpp [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/network/network_module.h [new file with mode: 0644]
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-xts/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/innerkits/bundlemgr_lite/slite/bundle_install_msg.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/player/interfaces/kits/player_lite/js/builtin/include/audio_player.h
code/sdk/open_source/openharmony/test/xts/acts/commonlibrary_lite/file_hal/src/utils_file_reli_test.c
code/sdk/open_source/openharmony/third_party/freetype/src/smooth/ftgrays.c
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-xts/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/file/src/file_impl_hal/file.c
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/brandy_service/service/src/base/connection_manager.h
code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/profiles/include/ble_ams_client.h
code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/profiles/include/ble_ancs_client.h
code/sdk/protocol/bt/host/bt/bts/bt_sample/bt_core/sample_bts_gap.c
code/sdk/protocol/bt/host/bt/bts/sdk/inc/stack_api/stack_gap_if.h
code/sdk/tools/pkg/bin/brandy/bt.bin
code/sdk/tools/pkg/bin/brandy/dsp/max/dsp_main.bin
code/sdk/tools/pkg/bin/brandy/dsp/max/dsp_overlay.bin
code/sdk/tools/pkg/bin/brandy/dsp/mini/dsp_main.bin
code/sdk/tools/pkg/bin/brandy/dsp/mini/dsp_overlay.bin
code/sdk/tools/pkg/bin/brandy/dsp/ultra/dsp_main.bin
code/sdk/tools/pkg/bin/brandy/dsp/ultra/dsp_overlay.bin
code/sdk/tools/pkg/chip_packet/brandy/packet.py
code/sdk/tools/pkg/packet.py

index 137b700..74c3b2c 100644 (file)
@@ -14,6 +14,8 @@
 #endif\r
 #include "cpu_trace.h"\r
 #include "non_os_reboot.h"\r
+#include "memory_config.h"\r
+#include "chip_exception_utils.h"\r
 /* after reboot system emmc need write exc info to the file system from sector */\r
 #if defined(SAVE_EXC_INFO) && defined(CFG_DRIVERS_MMC)\r
 #include "exception.h"\r
@@ -156,9 +158,6 @@ static void sample_gfx_init(void)
     ztw523_host_init_sample();\r
 #endif\r
     uapi_lcd_init();\r
-#ifdef SUPPORT_GPU_GMMU\r
-    drv_gmmu_module_init();\r
-#endif\r
     uapi_vau_module_init();\r
     uapi_dpu_module_init();\r
 #ifdef SUPPORT_GPU_JPEG\r
@@ -199,11 +198,20 @@ static void emmc_init_handle(void)
 }\r
 #endif\r
 \r
-#ifdef CFG_SDIO_EMMC_COEXIST\r
+#ifdef CFG_DRIVERS_SDIO\r
 static void sdio_init(void)\r
 {\r
     init_sdio_pinmux();\r
     sdio_drv_context_init();\r
+\r
+    /* sdio probe失败, NANDFLASH访问异常bugfix */\r
+#ifdef CFG_DRIVERS_NANDFLASH\r
+    clocks_clk_src_t clk_src = (clocks_clk_src_t)hal_clocks_ccrg_module_get_src(HAL_CLOCKS_MODULE_SDIOM);\r
+    if (clk_src == CLOCKS_CLK_SRC_TCXO) {\r
+        dprintf("sdio probe fail, switch sdiom clk to pll\r\n");\r
+        clocks_set_sdio_freq(CLOCKS_SDIO_FREQ_H);\r
+    }\r
+#endif\r
 }\r
 #endif\r
 \r
@@ -306,19 +314,30 @@ static void audio_smartpa_init(void)
 #endif /* DSP_EXIST */\r
 \r
 #if DSP_EXIST == YES\r
+#ifdef CFG_LOAD_FROM_FS\r
+#define DSP_FILE_PATH "/user/dsp/"\r
+#endif\r
 static void audio_init()\r
 {\r
+    int32_t ret;\r
     (void)osDelay(TICK_TEN_MS);\r
     uapi_watchdog_kick();\r
 \r
     audio_smartpa_init();\r
 \r
-    uint32_t ret = (uint32_t)uapi_audio_init();\r
+    ret = uapi_audio_init();\r
     if (ret != 0) {\r
-        PRINT("audio init error:[%d]\r\n", ret);\r
+        PRINT("audio init error:[%x]\r\n", ret);\r
     } else {\r
         PRINT("audio init OK\r\n");\r
     }\r
+\r
+#ifdef CFG_LOAD_FROM_FS\r
+    ret = uapi_audio_set_dsp_file_path(DSP_FILE_PATH, sizeof(DSP_FILE_PATH));\r
+    if (ret != 0) {\r
+        PRINT("audio set dsp file path error:[%x]\r\n", ret);\r
+    }\r
+#endif\r
 }\r
 #endif\r
 \r
@@ -409,9 +428,10 @@ static void thread_main(const void *unused)
 #ifdef CFG_DRIVERS_MMC\r
     emmc_init_handle();\r
 #endif\r
-#ifdef CFG_SDIO_EMMC_COEXIST\r
+#ifdef CFG_DRIVERS_SDIO\r
     sdio_init();\r
 #endif\r
+\r
 #ifdef CFG_DRIVERS_NANDFLASH\r
     nandflash_init_handle();\r
 #endif\r
@@ -425,7 +445,8 @@ static void thread_main(const void *unused)
         PRINT("nmi reboot cause: 0x%x, reason: 0x%x"NEWLINE, cause, get_fault_reason());\r
         // save cputrace memory if chip watchdog reset\r
         hal_cpu_trace_clock_enable();\r
-        panic(PANIC_ASSERT, cause);\r
+        write_fileinfo("/user/exc/hard_watchdog_error.bin", 0, (const uint8_t *)MCPU_TRACE_MEM_REGION_START, CPU_TRACE_MEM_REGION_LENGTH);\r
+        cpu_trace_enable_mcpu_repeat();\r
     }\r
 \r
     uapi_pm_control(PM_DISPLAY_POWER_UP_AND_RUN);\r
index e3b38ca..02b5785 100644 (file)
@@ -28,7 +28,6 @@ typedef enum {
     CLOCK_SOURCE_MAX\r
 } clock_32k_source_t;\r
 \r
-int32_t drv_gmmu_module_init(void);\r
 int32_t uapi_vau_module_init(void);\r
 int32_t uapi_dpu_module_init(void);\r
 void los_vfs_init(void);\r
index ca6c647..6e64f4b 100644 (file)
@@ -29,7 +29,10 @@ public:
         if (parent != nullptr) {
             parent->Remove(this);
         }
-        ImageCacheFree(*const_cast<ImageInfo *>(GetImageInfo()));
+        const ImageInfo* info = GetImageInfo();
+        if (info != nullptr) {
+            ImageCacheFree(*const_cast<ImageInfo*>(info));
+        }
     }
 };
 
index 9fb24f4..96368d1 100644 (file)
@@ -116,7 +116,7 @@ void Ability::ChangeSlice(const uint16_t targetSliceId, TransitionType type,
 #ifdef JS_ENABLE
     ElementName *elementName = OHOS::AbilityMsClient::GetInstance().GetTopAbility();
     if (elementName != nullptr && strcmp(elementName->bundleName, "com.huawei.launcher") != 0) {
-        OHOS::AbilityMsClient::GetInstance().ForceStop(elementName->bundleName, TransitionType::TRANSITION_ZOOM);
+        OHOS::AbilityMsClient::GetInstance().ForceStop(elementName->bundleName, type);
         targetSliceIdFromJS_ = targetSliceId;
         FreeElement(elementName);
         return;
index 813dd07..097cd19 100644 (file)
@@ -2,6 +2,7 @@ set(COMPONENT_NAME "nativelauncher")
 set(MODULE_NAME "app")
 set(AUTO_DEF_FILE_ID TRUE)
 set(NativeApp ${CMAKE_CURRENT_SOURCE_DIR})
+set(UIKIT_ROOT_DIR ${ROOT_DIR}/middleware/services/gui/uikit)
 set(UI_SAMPLE_ROOT ${ROOT_DIR}/middleware/services/gui/uikit/sample/uitest)
 
 set(PUBLIC_HEADER
@@ -93,6 +94,10 @@ set(PRIVATE_HEADER
     ${ROOT_DIR}/open_source/openharmony/foundation/multimedia/utils/include
     ${ROOT_DIR}/open_source/openharmony/utils/native/lite/include
     ${ROOT_DIR}/open_source/openharmony/utils/native/lite/kv_store/innerkits
+    ${ROOT_DIR}/open_source/openharmony/drivers/peripheral/format/interfaces/include
+    ${UIKIT_ROOT_DIR}/proprietary/src/ui/innerkits
+    ${ROOT_DIR}/application/wearable/service/dial_market
+    ${ROOT_DIR}/open_source/openharmony/third_party/cJSON
 
 
     ${ROOT_DIR}/zhihui/UI/CustomUIComponentTool/
@@ -135,6 +140,7 @@ set(SOURCES
 list(REMOVE_ITEM SOURCES
     ${NativeApp}/nativeui/main/src/dial/parser/DialBinParser.cpp
     ${NativeApp}/nativeui/main/src/dial/parser/DialBinParserManager.cpp
+    ${NativeApp}/nativeui/main/src/dial/parser/DialBinParserV3.cpp
 )
 
 if("SUPPORT_ALIPAY_SEC" IN_LIST DEFINES)
@@ -222,6 +228,7 @@ set(COMPONENT_SRC
     ${UIKIT_NATIVE_FWK}/src/TransitionRecord.cpp
     ${UIKIT_NATIVE_DIAL}/src/dial/parser/DialBinParser.cpp
     ${UIKIT_NATIVE_DIAL}/src/dial/parser/DialBinParserManager.cpp
+    ${UIKIT_NATIVE_DIAL}/src/dial/parser/DialBinParserV3.cpp
 )
 
 set(SOURCES
@@ -246,9 +253,11 @@ set(PRIVATE_HEADER
     ${ROOT_DIR}/middleware/services/gui/uikit/ui/frameworks
     ${ROOT_DIR}/application/wearable/nativeapp/nativeui/applist/include/
     ${ROOT_DIR}/open_source/openharmony/drivers/peripheral/display/interfaces/include
+    ${ROOT_DIR}/open_source/openharmony/drivers/peripheral/format/interfaces/include
     ${UIKIT_NATIVE_DIAL}/include/dial
     ${ROOT_DIR}/middleware/services/media/foundation/sample/wrapper
     ${ROOT_DIR}/middleware/services/media/foundation/player/interfaces/kits
+    ${UIKIT_ROOT_DIR}/proprietary/src/ui/innerkits
 )
 
 set(PRIVATE_DEFINES
index 025d433..c530718 100644 (file)
Binary files a/code/sdk/application/wearable/fd230/nativeapp/brandy-auto-ota-cli/libuikit_fwk.a and b/code/sdk/application/wearable/fd230/nativeapp/brandy-auto-ota-cli/libuikit_fwk.a differ
index 4e49f57..410571e 100644 (file)
Binary files a/code/sdk/application/wearable/fd230/nativeapp/brandy-auto-ota-ser/libuikit_fwk.a and b/code/sdk/application/wearable/fd230/nativeapp/brandy-auto-ota-ser/libuikit_fwk.a differ
index 84c02f0..55d7365 100644 (file)
Binary files a/code/sdk/application/wearable/fd230/nativeapp/brandy-native-js-fd230/libuikit_fwk.a and b/code/sdk/application/wearable/fd230/nativeapp/brandy-native-js-fd230/libuikit_fwk.a differ
index 84c02f0..55d7365 100644 (file)
Binary files a/code/sdk/application/wearable/fd230/nativeapp/brandy-native-js-xts/libuikit_fwk.a and b/code/sdk/application/wearable/fd230/nativeapp/brandy-native-js-xts/libuikit_fwk.a differ
index 84c02f0..55d7365 100644 (file)
Binary files a/code/sdk/application/wearable/fd230/nativeapp/brandy-native-js/libuikit_fwk.a and b/code/sdk/application/wearable/fd230/nativeapp/brandy-native-js/libuikit_fwk.a differ
index fc6ad89..2c30eba 100644 (file)
Binary files a/code/sdk/application/wearable/fd230/nativeapp/brandy-xts/libuikit_fwk.a and b/code/sdk/application/wearable/fd230/nativeapp/brandy-xts/libuikit_fwk.a differ
index 343fbac..9225b83 100644 (file)
@@ -50,6 +50,7 @@ public:
     void RegisterNative(const AppItem &nativeAppList, NativeRegisterCallback* native);
     void RegisterSlice(const uint16_t id, SliceProxy* slice);
     void RegisterMenu(const uint16_t id, const char *icon, const char *iconHexagon, const char *label);
+    bool IsSliceIdExist(AppViewId id);
     void RegisterMenuPro(const uint16_t id, const char *iconLarge, const char *iconSmall,const char *iconHexagon, const char *label, uint16_t TextId);
 
 private:
index 7e13cd7..cf1d7b9 100644 (file)
@@ -88,6 +88,16 @@ void NativeRegisterManager::RegisterMenu(const uint16_t id, const char *icon, co
     nativeAppLists_.PushBack(item);
 }
 
+bool NativeRegisterManager::IsSliceIdExist(AppViewId id)
+{
+    for (uint16_t index = 0; index < slices_.Size(); index++) {
+        if (slices_[index].id == static_cast<uint16_t>(id)) {
+            return true;
+        }
+    }
+    return false;
+}
+
 void NativeRegisterManager::RegisterMenuPro(const uint16_t id, const char *iconLarge, const char *iconSmall,
     const char *iconHexagon, const char *label, uint16_t TextId)
 {
index e9fd5bc..a58470e 100644 (file)
@@ -51,8 +51,6 @@ AlipayPresenter *AlipayPresenter::GetInstance()
 \r
 void AlipayPresenter::OnStart()\r
 {\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlipayPresenter OnStart");\r
-    Presenter<AlipayMainView>::OnStart();\r
     alipayMode_->AlipayExitLpm();\r
     if (!alipayMode_->AlipayInitModel()) {\r
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayPresenter::OnStart AlipayInitModel fail.");\r
index c5a7339..03bf44d 100644 (file)
 #include "SetDesktopView.h"
 #include "NativeRegisterManager.h"
 
+
+#ifdef XTS_SUPPORT
+#include "hal_tick.h"
+#ifdef __cplusplus
+#if __cplusplus
+extern "C"
+{
+#endif
+#endif
+#ifdef XTS_SUPPORT
+    extern uint8_t is_xts_test_done(void);
+#endif
+#ifdef __cplusplus
+#if __cplusplus
+}
+#endif
+#endif
+#endif
+
 namespace OHOS {
     #define FOOTBALL_PLANE_MAX_NUM 20
 
@@ -57,6 +76,7 @@ namespace OHOS {
 
     void ApplistModel::ResolvingJSAppItems(void)
     {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ResolvingJSAppItems start\r");
 #ifdef JS_ENABLE
         if (bundleInfos != nullptr) {
             for (uint8_t i = 0; i < bundleLen; i++) {
@@ -87,6 +107,7 @@ namespace OHOS {
 #ifdef JS_ENABLE
         int32_t len = 0;
         uint8_t ret = BundleMsClient::GetInstance().GetBundleInfos(0, &bundleInfos, &len);
+        printf("ResolvingJSAppItems GetBundleInfos ret = %d ,len = %d\r\n", ret, len);
         if ((ret == 0) && (len > 0) && (bundleInfos != nullptr)) {
             bundleLen = len;
             if (len > APP_MAX_NUM - nativeAppNumTotal) {
index 2bfd895..11876d2 100644 (file)
@@ -57,7 +57,6 @@ ApplistView::~ApplistView()
 
 void ApplistView::OnStart()
 {
-    View<ApplistPresenter>::OnStart();
     AppListStyle style = presenter_->GetCurrentStyle();
     if (style == AppListStyle::FOOTBALL_STYLE) {
         FootballStyleOnStart();
@@ -131,8 +130,11 @@ void ApplistView::WaterfallStyleOnStart()
     int16_t blankSize = waterfallList_->GetRelativeRect().GetWidth() > waterfallList_->GetRelativeRect().GetHeight() ?
         waterfallList_->GetRelativeRect().GetWidth() / 2 : waterfallList_->GetRelativeRect().GetHeight() / 2; // 2, half
     waterfallList_->SetThrowDrag(true);
-    waterfallList_->SetReboundSize(imgDistance_ * Sin(60)); // 60, degree
-    waterfallList_->SetScrollBlankSize(0);
+    uint16_t layoutHeight = static_cast<uint16_t>(imgDistance_ * Sin(60));
+    waterfallList_->SetReboundSize(layoutHeight); // 60: degree, row's layout height
+    waterfallList_->SetScrollBlankSize(layoutHeight, UIAbstractScroll::Direction::TOP);
+    waterfallList_->SetScrollBlankSize(Screen::GetInstance().GetHeight() / 2 - layoutHeight, // 2: half
+        UIAbstractScroll::Direction::BOTTOM);
     waterfallList_->RequestFocus();
     waterfallList_->SetRotateFactor(10); // 10, empirical coefficient
     waterfallList_->SetOnRotateListener(presenter_);
@@ -201,7 +203,6 @@ void ApplistView::OnStop()
     } else {
         ListStyleOnStop();
     }
-    FocusManager::GetInstance()->ClearFocus();
     return;
 }
 
index 54e9fb1..ccf1414 100644 (file)
@@ -42,6 +42,7 @@
 #include "dfx_channel.h"\r
 #include "tcxo.h"\r
 #include "ui_service.h"\r
+#include "network/network_listener.h"\r
 #include "font/ui_font_header.h"\r
 \r
 \r
@@ -1180,7 +1181,11 @@ void GapAclStateChangedCallback(const bd_addr_t *bdAddr, gap_acl_state_t state,
             SendMsgToMsgCenterService(BT_DISCONNECTED_TO_MSGCENTER, 0, nullptr, 0);\r
             SendMsgToUIService(BT_DISCONNECTED_TO_UI, 0, nullptr, 0);\r
 \r
-            \r
+            /* ---------------------------------- 补丁合入 ---------------------------------- */\r
+            // send to ace network\r
+            // SetAclConnected(false);\r
+            net_connect_status_change(NETWORK_TYPE_BLUETOOTH, CONNECTION_STATUS_DISCONNECTED);\r
+            /* -------------------------------------------------------------------------- */\r
 \r
             gap_br_set_bt_scan_mode(GAP_SCAN_MODE_CONNECTABLE, 0);\r
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GAP_SCAN_MODE_CONNECTABLE");\r
@@ -1189,6 +1194,12 @@ void GapAclStateChangedCallback(const bd_addr_t *bdAddr, gap_acl_state_t state,
             SendMsgToMsgCenterService(BT_CONNECTED_TO_MSGCENTER, 0, nullptr, 0);\r
             SendMsgToUIService(BT_CONNECTED_TO_UI, 0, nullptr, 0);\r
 \r
+            /* ---------------------------------- 补丁合入 ---------------------------------- */\r
+            // send to ace network\r
+            // SetAclConnected(true);\r
+            net_connect_status_change(NETWORK_TYPE_BLUETOOTH, CONNECTION_STATUS_CONNECTED);\r
+            /* -------------------------------------------------------------------------- */\r
+\r
             uapi_set_ACL_br_address(bdAddr);\r
 \r
             gap_br_set_bt_scan_mode(GAP_SCAN_MODE_NONE, 0);\r
@@ -1314,9 +1325,19 @@ static void BleConnStateChangeCallback(unsigned short connId, bd_addr_t *addr, g
     if (GAP_BLE_STATE_DISCONNECTED == connState) { // restart ble adv when disconnected\r
         /* 通知msg_center,ble状态仍用bt状态,此处不区分 */\r
         SendMsgToMsgCenterService(BT_DISCONNECTED_TO_MSGCENTER, 0, nullptr, 0);\r
+\r
+        /* ---------------------------------- 补丁合入 ---------------------------------- */\r
+        // send to ace network\r
+        net_connect_status_change(NETWORK_TYPE_BLUETOOTH_LE, CONNECTION_STATUS_DISCONNECTED);\r
+        /* -------------------------------------------------------------------------- */\r
     } else {\r
         SendMsgToMsgCenterService(BT_CONNECTED_TO_MSGCENTER, 0, nullptr, 0);\r
         (void)memcpy_s(&g_bd_addr, sizeof(bd_addr_t), addr, sizeof(bd_addr_t));\r
+\r
+        /* ---------------------------------- 补丁合入 ---------------------------------- */\r
+        // send to ace network\r
+        net_connect_status_change(NETWORK_TYPE_BLUETOOTH_LE, CONNECTION_STATUS_CONNECTED);\r
+        /* -------------------------------------------------------------------------- */\r
     }\r
     #endif\r
 }\r
@@ -1373,6 +1394,8 @@ static void BtGattsServiceAddCallback(uint8_t serverId, bt_uuid_t *uuid, uint16_
         memcpy_s(character.chara_uuid.uuid, sizeof(character.chara_uuid.uuid), (char *)&diag_id, sizeof(diag_id));\r
         character.permissions = GATT_ATTRIBUTE_PERMISSION_WRITE | GATT_ATTRIBUTE_PERMISSION_READ;\r
         character.properties = GATT_CHARACTER_PROPERTY_BIT_WRITE | GATT_CHARACTER_PROPERTY_BIT_READ;\r
+        /* -------------------------------- 下方注释为补丁合入不确定是否合入 ------------------------------- */\r
+        // character.properties = GATT_CHARACTER_PROPERTY_BIT_WRITE_NO_RSP | GATT_CHARACTER_PROPERTY_BIT_READ | GATT_CHARACTER_PROPERTY_BIT_NOTIFY;\r
         character.value_len = (uint16_t)sizeof(value);\r
         character.value = (uint8_t *)(&value);\r
 \r
index 511b5a3..7a6e491 100644 (file)
@@ -436,12 +436,12 @@ static void CallModelResumePlayer(void)
 {
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallModelResumePlayer] [ResumePlayer] start");
     usleep(5000); // 延时等待通话释放媒体资源
-    std::shared_ptr<PlayerInterruptListener> PlayerIntrptListener =
-        OHOS::PlayersModel::GetInstance()->GetPlayerIntrptListener();
-    if (PlayerIntrptListener != nullptr && PlayerIntrptListener->IsPaused()) {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallModelResumePlayer] ResumePlayer ");
-        PlayerIntrptListener->ResumePlayer();
-    }
+    // std::shared_ptr<PlayerInterruptListener> PlayerIntrptListener =
+    //     OHOS::PlayersModel::GetInstance()->GetPlayerIntrptListener();
+    // if (PlayerIntrptListener != nullptr && PlayerIntrptListener->IsPaused()) {
+    //     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallModelResumePlayer] ResumePlayer ");
+    //     PlayerIntrptListener->ResumePlayer();
+    // }
 }
 
 static void CallModelPostGraphicEvent(void (*fun)(void))
index 530c39b..50a9e4a 100644 (file)
@@ -23,11 +23,25 @@ public:
 
 class DialBinParserManager {
 public:
-    static DialBinParserManager* GetInstance(void);
-    bool UpdateDial(const std::string& file, FILE* fp, DialViewGroup* group, DisplayState state);
-    bool GetDialPreviewInfo(FILE* fp, DialPreviewInfo* info);
+    static DialBinParserManager *GetInstance(void);
+    bool UpdateDial(const std::string &file, FILE *fp, DialViewGroup *group, DisplayState state);
+    bool GetDialPreviewInfo(FILE *fp, DialPreviewInfo *info);
     bool RegisterParser(const std::string &version, DialBinParserInterface *parser);
 
+    uint8_t GetSupportVersionCnt() const
+    {
+        return cnt_;
+    }
+
+    bool GetVersionByIndex(uint8_t index, std::string &version)
+    {
+        if (index >= cnt_) {
+            return false;
+        }
+        version = parsers_[index].version;
+        return true;
+    }
+
 private:
     DialBinParserManager();
     virtual ~DialBinParserManager();
diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/DialBinParserV3.h b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/DialBinParserV3.h
new file mode 100644 (file)
index 0000000..1d5e2ca
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2025. All rights reserved.
+ * Description: DialBinParserV3
+ * Author:
+ * Create: 2025-02-06
+ */
+
+#ifndef GRAPHIC_LITE_DIAL_BIN_PARSER_V3_H
+#define GRAPHIC_LITE_DIAL_BIN_PARSER_V3_H
+#include "DialBinParserManager.h"
+#include "DialTimePublisher.h"
+#include "components/ui_abstract_progress.h"
+#include "DialViewContainer.h"
+#include "DialOHDataType.h"
+#include "DialOHSliceId.h"
+
+namespace OHOS {
+class DialBinParserV3 : public DialBinParserInterface {
+public:
+    DialBinParserV3();
+    ~DialBinParserV3() override;
+    bool UpdateDial(const std::string& file, FILE* fp, DialViewGroup* group, DisplayState state) override;
+    bool GetDialPreviewInfo(FILE* fp, DialPreviewInfo* info) override;
+
+protected:
+    bool ParseDialHeader(FILE* file);
+    bool ParserDialStaticImg(ContainerInterface &parent);
+    bool ParserDialSequenceImg(ContainerInterface &parent);
+    bool ParserDialRotateImg(ContainerInterface &parent);
+    bool ParserDialOptionImg(ContainerInterface &parent);
+    bool ParserDialDigitalImg(ContainerInterface &parent);
+    bool ParserDialLabel(ContainerInterface &parent);
+    bool ParserDialArcLabel(ContainerInterface &parent);
+    bool ParserDialBoxProgress(ContainerInterface &parent);
+    bool ParserDialArcProgress(ContainerInterface &parent);
+    bool ParserDialVideo(ContainerInterface &parent);
+    bool ParserDialClick(ContainerInterface &parent);
+    bool ParserDialKaleidoscope(ContainerInterface &parent);
+    bool ParserDialContainer(ContainerInterface &parent);
+    bool ParserDialOptions(ContainerInterface &parent);
+
+private:
+    void* MallocAndReadBuf(FILE* file, uint32_t readSize);
+    bool SetProgressType(FILE* fp, UIAbstractProgress* view, DialProgressType data);
+
+    static constexpr uint8_t DIAL_BIN_PARSER_FUNC_NUM = 14; // 14: func max value
+    bool (DialBinParserV3::*funcArray_[DIAL_BIN_PARSER_FUNC_NUM])(ContainerInterface&);
+    void AddToParentWithView(ContainerInterface &parent, uint8_t displayMode, UIView *view);
+    void AddToParentWithDialView(ContainerInterface &parent, uint8_t displayMode,
+        DialView *view, DialOHDataType bindData, bool isPeriodic);
+    struct {
+        uint8_t *viewType;
+        uint8_t dialViewCount;
+        FILE *file;
+        uint8_t curIndex;
+    } curViewType_;
+    bool ParseTimeIntervals(FILE* fp, uint8_t cnt, DialTimePublisher::TimeChangeListener *listener);
+    bool ParseViewType(uint8_t *viewType, uint8_t dialViewCount, FILE *file);
+    bool ParseContainerSubviews(DialViewContainer *container, uint8_t num);
+    bool ParseOptionsSubviews(ContainerInterface &parent);
+
+    DialViewGroup* dialGroup_ = nullptr;
+    std::string file_;
+    uint32_t dirId_ = 0xfef << 20; // 20: offset
+    uint32_t imageOffset_ = 0;
+    DisplayState state_ = DisplayState::NORMAL;
+}; // class DialBinParserV3
+} // namespace OHOS
+
+#endif // GRAPHIC_LITE_DIAL_BIN_PARSER_V3_H
\ No newline at end of file
index d242a3d..3301b3d 100644 (file)
@@ -30,6 +30,9 @@ struct DialPreviewInfo {
     uint32_t imgId;\r
     uint32_t offset;\r
     uint8_t capability;\r
+    uint32_t uuid;\r
+    char protocolVersion[DIAL_VERSION_MAX_LEN];\r
+    char watchVersion[DIAL_VERSION_MAX_LEN];\r
 };\r
 \r
 struct DialRect {\r
index 80269cf..6043be7 100644 (file)
 #include "sleep/include/SleepCardView.h"
 #include "set_card/include/SetMainView.h"
 #include "heartrate/include/HeartRateCardView.h"
+
+#ifdef XTS_SUPPORT
+#include "hal_tick.h"
+#ifdef __cplusplus
+#if __cplusplus
+extern "C"
+{
+#endif
+#endif
+#ifdef XTS_SUPPORT
+    extern uint8_t is_xts_test_done(void);
+#endif
+#ifdef __cplusplus
+#if __cplusplus
+}
+#endif
+#endif
+#endif
+
 namespace OHOS
 {
+    #ifdef XTS_SUPPORT
+    class XTSCallback : public AnimatorCallback
+    {
+    public:
+        explicit XTSCallback(UILabel *XTSlabel) : XTSlabel(XTSlabel) {}
+        ~XTSCallback() {}
+        virtual void Callback(UIView *view)
+        {
+            uint8_t xts_testing = 1;
+#ifdef XTS_SUPPORT
+            xts_testing = is_xts_test_done();
+#endif
+            if (!xts_testing)
+            {
+                // XTS测试进行
+                xts_flag = 1;
+                XTSlabel->SetText("XTS测试进行中\n请勿操作表盘");
+                XTSlabel->SetTextColor(Color::GetColorFromRGBA(0xe6, 0x04, 0x09, 0xff));
+            }
+            else
+            {
+                // XTS测试结束
+                if (xts_flag)
+                {
+                    XTSlabel->SetText("XTS测试结束");
+                    XTSlabel->SetTextColor(Color::GetColorFromRGBA(0x4e, 0xe6, 0x04, 0xff));
+                    xts_flag = 0; // 复位
+                }
+            }
+        }
+    private:
+        uint8_t xts_flag = 0; // 标志位
+        UILabel *XTSlabel{nullptr};
+    };
+    #endif
+
     class MainPresenterSample;
     class MainViewSample : public View<MainPresenterSample>
     {
@@ -121,7 +176,14 @@ namespace OHOS
 
         UIImageView *dialstateicon_{nullptr}; 
         UIImageView *messageicon_{nullptr};    
+
+#ifdef XTS_SUPPORT
+        /* --------------------------------- XTS监测标签 -------------------------------- */
+        UILabel *XTSLabel = nullptr;
+        AnimatorCallback *xtsCallback_ = nullptr;
+        Animator *xtsanimator_ = nullptr;
         /* -------------------------------------------------------------------------- */
+#endif
         UICardPage *recordCard[MAX_CARD]{nullptr};
         bool pageStatus[MAX_CARD]{false};
         UICrossView *mainSwipeGroup{nullptr};
index d3ad91e..43d0dd2 100644 (file)
@@ -8,9 +8,10 @@
 #include <cstdint>
 #include "DialView.h"
 #include "components/ui_arc_label.h"
+#include "font/font_global_manager.h"
 
 namespace OHOS {
-class DialArcLabelView : public UIArcLabel, public DialView {
+class DialArcLabelView : public UIArcLabel, public DialView, public FontGlobalManager::LangChangeListener {
 public:
     DialArcLabelView();
     ~DialArcLabelView() override;
@@ -20,12 +21,15 @@ public:
     void HandleTextData(const std::string* data, uint16_t num) override;
     void HandleFloatData(const float* data, uint16_t num) override;
     void HandleFloatData(float data) override;
+    void SetLang(uint8_t lang);
+    void OnLangChange(uint8_t langId) override;
 
 private:
     void SetTextWithWildcardInner(const char* text);
     static const uint8_t MAX_BUF_SIZE = 255;
     char* text_ = nullptr;
     char dstBuf_[MAX_BUF_SIZE] = {0};
+    uint8_t language_ = FontGlobalManager::INVALID_LANG_ID;
 };
 }
 #endif
index 0774736..d258eec 100644 (file)
@@ -42,10 +42,10 @@ enum class DialDataType {
   DATA_TYPE_STEPS_GOAL_INT,   // 运动步数百分比
   DATA_TYPE_CALORIE_GOAL_INT, // 运动卡路里目标百分比
 
-  DATA_TYPE_MULTI_FLOAT_BASE = 0x2fff, // 多个浮点数据类型基值
+  DATA_TYPE_MULTI_FLOAT_BASE = 0x4000, // 多个浮点数据类型基值
   DATA_TYPE_HOUR_MIN,                  // 时分
 
-  DATA_TYPE_TEXT_BASE = 0x4fff, // 文本数据类型基值
+  DATA_TYPE_TEXT_BASE = 0x2000, // 文本数据类型基值
   DATA_TYPE_WEEK_STR,           // 星期(string)
   DATA_TYPE_DATE_STR,           // 日期(string)
   DATA_TYPE_WEATHER_STR,        // 天气(string)
@@ -58,6 +58,13 @@ enum class DialDataType {
   DATA_TYPE_STEPS_GOAL_STR,     // 运动步数目标(string)
   DATA_TYPE_CALORIE_GOAL_STR,   // 卡路里目标(string)
 
-  DATA_TYPE_MAX = 0x7fff, // 数据类型的最大值
+  DATA_TYPE_SWIVEL_GEAR_ONE = 20,
+  DATA_TYPE_SWIVEL_GEAR_TWO,
+  DATA_TYPE_SWIVEL_GEAR_THREE,
+  DATA_TYPE_SWIVEL_GEAR_FOUR,
+  DATA_TYPE_SWIVEL_GEAR_FIVE,
+  DATA_TYPE_SWIVEL_GEAR_SIX,
+  
+  DATA_TYPE_MAX = 0x6000, // 数据类型的最大值
 };
 #endif
index 2817eab..5b32496 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <cstdint>
 #include "DialView.h"
+#include "DialTimePublisher.h"
 #include "components/ui_image_view.h"
 #include "gfx_utils/graphic_math.h"
 #include "components/ui_view_group.h"
@@ -19,7 +20,7 @@ enum class ImgAlign {
     RIGHT,
 };
 
-class DialDigitalImgView : public UIImageView, public DialView {
+class DialDigitalImgView : public UIImageView, public DialView, public DialTimePublisher::TimeChangeListener {
 public:
     DialDigitalImgView();
     ~DialDigitalImgView() override;
@@ -35,6 +36,7 @@ public:
     void SetAlignPos(Point pos);
     void SetDecimalPrecision(uint8_t precision);
     void SetParent(UIViewGroup* parent);
+    void OnTimeUpdate(const struct tm &curTime) override;
 
 private:
     void SetNumImg(UIImageView* img, const ImageInfo *info);
index 355656e..0a90975 100644 (file)
@@ -8,10 +8,10 @@
 #include <cstdint>
 #include "DialView.h"
 #include "components/ui_label.h"
+#include "font/font_global_manager.h"
 #include "components/ui_label_ext.h"
-
 namespace OHOS {
-class DialLabelView : public UILabel, public DialView {
+class DialLabelView : public UILabel, public DialView, public FontGlobalManager::LangChangeListener {
 public:
     DialLabelView();
     ~DialLabelView() override;
@@ -21,12 +21,15 @@ public:
     void HandleTextData(const std::string* data, uint16_t num) override;
     void HandleFloatData(const float* data, uint16_t num) override;
     void HandleFloatData(float data) override;
+    void SetLang(uint8_t lang);
+    void OnLangChange(uint8_t langId) override;
 
 private:
     void SetTextWithWildcardInner(const char* text);
     static const uint8_t MAX_BUF_SIZE = 255;
     char* text_ = nullptr;
     char dstBuf_[MAX_BUF_SIZE] = {0};
+    uint8_t language_ = FontGlobalManager::INVALID_LANG_ID;
 };
 }
 #endif
index 65067ac..43cd8b0 100644 (file)
@@ -9,27 +9,37 @@
 #define DIAL_MODEL_TIME_H
 
 #include "DialBaseModel.h"
+#include "DialTimePublisher.h"
+#include "gfx_utils/list.h"
 
 namespace OHOS {
-class DialModelTime : public DialBaseModel {
+class DialModelTime : public DialBaseModel, public DialTimePublisher {
 public:
-    DialModelTime() {}
-    ~DialModelTime() override {}
+    DialModelTime()
+    {
+        DialModelTime::SetPublisher(dynamic_cast<DialTimePublisher*>(this));
+    }
+    ~DialModelTime() override
+    {
+        listeners_.Clear();
+    }
     static DialModelTime* GetInstance()
     {
         static DialModelTime instance;
         return &instance;
     }
     bool GetDialFloatData(DialDataType& type, float& out) override;
-    void UpdateTime();
+    void UpdateTime() override;
+    void Register(TimeChangeListener* listener) override;
+    void Unregister(TimeChangeListener* listener) override;
 
 private:
-    struct tm tblock_;
+    struct tm *tblock_;
     uint16_t angleH_ = 0;
     uint16_t angleM_ = 0;
     uint16_t angleS_ = 0;
     float angleMS_ = 0;
-    uint8_t pm_ = 0;
+    List<TimeChangeListener*> listeners_;
 };
 }
 #endif
diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialOHDataType.h b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialOHDataType.h
new file mode 100644 (file)
index 0000000..83f8f0f
--- /dev/null
@@ -0,0 +1,189 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2025. All rights reserved.
+ * Description: DialOHDataType
+ * Author:
+ * Create: 2025-02-15
+ */
+
+#ifndef DIAL_OH_DATATYPE_H
+#define DIAL_OH_DATATYPE_H
+
+#include <unordered_map>
+#include "DialDataBase.h"
+
+namespace OHOS {
+enum class DialOHDataType : int16_t {
+    CLOCK = 1,
+    CLOCK_HIGH_BIT = 2,
+    CLOCK_LOW_BIT = 3,
+    CLOCK_RATIO_12 = 4,
+    CLOCK_RATIO_24 = 5,
+    MINUTES = 6,
+    MINUTES_HIGH_BIT = 7,
+    MINUTES_LOW_BIT = 8,
+    MINUTES_RATIO = 9,
+    SECONDS = 10,
+    SECONDS_HIGH_BIT = 11,
+    SECONDS_LOW_BIT = 12,
+    SECONDS_RATIO = 13,
+    AM_PM = 14,
+    AMPM_TEXT = 15,
+    HOUR_MODE = 16,
+    PREVIOUS_HOUR = 17,
+    NEXT_HOUR = 18,
+    CLOCK_ANGLE = 19,
+    MINUTE_ANGLE = 20,
+    SECONDS_ANGLE = 21,
+    MILLISECOND_ANGLE = 22,
+    PREVIOUS_SECOND = 25,
+    NEXT_SECOND = 26,
+    PREVIOUS_SECOND_PREVIOUS_SECOND = 27,
+    PREVIOUS_MINUTE = 28,
+    NEXT_MINUTE = 29,
+    DUAL_TIME_ZONE_CLOCK = 30,
+    DUAL_TIME_ZONE_CLOCK_HIGH_BIT = 31,
+    DUAL_TIME_ZONE_CLOCK_LOW_BIT = 32,
+    DUAL_TIME_ZONE_CLOCK_RATIO_12 = 33,
+    DUAL_TIME_ZONE_CLOCK_RATIO_24 = 34,
+    DUAL_TIME_ZONE_MINUTES = 35,
+    DUAL_TIME_ZONE_MINUTES_HIGH_BIT = 36,
+    DUAL_TIME_ZONE_MINUTES_LOW_BIT = 37,
+    DUAL_TIME_ZONE_MINUTES_RATIO = 38,
+    DUAL_TIME_ZONE_ABBREVIATION_TEXT = 39,
+    DUAL_TIME_ZONE_TIME_MINUTE_TEXT = 40,
+    DUAL_TIME_ZONE_AMPM = 41,
+    DUAL_TIME_ZONE_AM_PM_TEXT = 42,
+    SUNRISE_SUNSET_PICTURE_SELECTION = 50,
+    SUNRISE_SUNSET_CLOCK_HIGH_BIT = 51,
+    SUNRISE_SUNSET_CLOCK_LOW_BIT = 52,
+    SUNRISE_SUNSET_MINUTES_HIGH_BIT = 53,
+    SUNRISE_SUNSET_MINUTES_LOW_BIT = 54,
+    SUNRISE_TEXT = 55,
+    SUNSET_TEXT = 56,
+    MOONRISE_TEXT = 60,
+    MOONSET_TEXT = 61,
+    DATE = 70,
+    DATE_HIGH_BIT = 71,
+    DATE_LOW_BIT = 72,
+    DATE_OCCUPIES_31_DAYS_RATIO = 73,
+    YESTERDAY = 74,
+    YESTERDAY_DATE_HIGH_BIT = 75,
+    YESTERDAY_DATE_LOW_BIT = 76,
+    TOMORROW = 77,
+    TOMORROW_DATE_HIGH_BIT = 78,
+    TOMORROW_DATE_LOW_BIT = 79,
+    MONTH_DATA = 80,
+    MONTH = 81,
+    MONTH_TEXT = 82,
+    WEEK_DATA = 83,
+    WEEK_RATIO = 84,
+    WEEK_TEXT = 85,
+    TWELVE_DIVISIONS = 86,
+    LUNAR_PHASE = 87,
+    PREVIOUS_MONTH = 88,
+    NEXT_MONTH = 89,
+    LUNAR_MONTH = 90,
+    LUNAR_DATE_HIGH_BIT = 91,
+    LUNAR_DATE_LOW_BIT = 92,
+    CHARGE = 100,
+    CHARGE_ENUMERATION = 102,
+    CHARGE_STATUS_ENUMERATION = 103,
+    CHARGE_RATIO = 104,
+    CHARGING_STATUS = 105,
+    STEPS = 110,
+    STEPS_UNIT_DIGIT = 111,
+    STEPS_TENS_DIGIT = 112,
+    STEPS_HUNDRED_DIGIT = 113,
+    STEPS_THOUSAND_DIGIT = 114,
+    STEPS_TEN_THOUSAND_DIGIT = 115,
+    STEPS_TARGET_ACHIEVEMENT_RATE = 116,
+    STEPS_TARGET_PROGRESS_ENUMERATION = 117,
+    CALORIES = 120,
+    CALORIES_RATIO = 121,
+    CALORIES_TARGET_PROGRESS_ENUMERATION = 122,
+    HEART_RATE = 130,
+    MAXIMUM_HEART_RATE = 131,
+    MINIMUM_HEART_RATE = 132,
+    HEART_RATE_RANGE = 133,
+    HEART_RATE_RATIO = 134,
+    STRESS = 140,
+    STRESS_RATIO = 141,
+    STRESS_LEVEL_TYPE = 142,
+    MODERATE_TO_VIGOROUS_INTENSITY_TIME = 150,
+    MODERATE_TO_VIGOROUS_INTENSITY_TIME_RATIO = 151,
+    STANDING_TIMES = 152,
+    STANDING_TIMES_RATIO = 153,
+    MAXIMUM_OXYGEN_UPTAKE = 160,
+    MAXIMUM_OXYGEN_UPTAKE_RATIO = 161,
+    SLEEP_TEXT = 165,
+    SLEEP_RATIO = 166,
+    SLEEP_TARGET_ACHIEVEMENT_RATE_ENUMERATION = 167,
+    TEMPERATURE = 170,
+    HIGHEST_TEMPERATURE = 171,
+    LOWEST_TEMPERATURE = 172,
+    CURRENT_TEMPERATURE_MINUS_ONE = 173,
+    CURRENT_TEMPERATURE_PLUS_ONE = 174,
+    TEMPERATURE_TYPE = 175,
+    WEATHER_TYPE = 176,
+    TEMPERATURE_RATIO = 177,
+    ATMOSPHERIC_PRESSURE = 180,
+    ATMOSPHERIC_PRESSURE_RATIO = 181,
+    AIR_QUALITY_INDEX = 182,
+    AIR_QUALITY_INDEX_LEVEL = 183,
+    AIR_QUALITY_INDEX_RATIO = 184,
+    ELEVATION = 190,
+    ELEVATION_HEIGHT_DATA = 191,
+    ELEVATION_HEIGHT_UNIT = 192,
+    HEIGHT_RATIO = 193,
+    DISTANCE_TEXT = 194,
+    DISTANCE_DATA = 195,
+    DISTANCE_UNIT = 196,
+    DISTANCE_TARGET_PROGRESS = 197,
+    HIGH_TIDE_TIME_TEXT = 200,
+    LOW_TIDE_TIME_TEXT = 201,
+    BLE_CONNECTION_STATUS = 210,
+    BT_CONNECTION_STATUS = 211,
+    BLOOD_OXYGEN = 220,
+    SYSTOLIC_BLOOD_PRESSURE = 221,
+    DIASTOLIC_BLOOD_PRESSURE = 222,
+    DUAL_LANGUAGE_SYSTEM = 230,
+    SWIVEL_GEAR_POSITIVE = (1 << 12) + 20, // private data, clockwise
+    SWIVEL_GEAR_NEGATIVE, // counterclockwise
+}; // enum class DialOHDataType
+
+struct HashOHDataType {
+    size_t operator()(DialOHDataType data) const
+    {
+        return std::hash<int16_t>()(static_cast<int16_t>(data));
+    }
+};
+
+const std::unordered_map<DialOHDataType, DialDataType, HashOHDataType> g_bindDataConverter = {
+    {DialOHDataType::CLOCK, DialDataType::DATA_TYPE_TIME_HOUR},
+    {DialOHDataType::MINUTES, DialDataType::DATA_TYPE_TIME_MINUTE},
+    {DialOHDataType::SECONDS, DialDataType::DATA_TYPE_TIME_SECOND},
+    {DialOHDataType::MILLISECOND_ANGLE, DialDataType::DATA_TYPE_CLOCK_ANGLE_MS},
+    {DialOHDataType::DATE, DialDataType::DATA_TYPE_TIME_DATE},
+    {DialOHDataType::WEEK_DATA, DialDataType::DATA_TYPE_TIME_WEEK},
+    {DialOHDataType::CHARGE, DialDataType::DATA_TYPE_POWER},
+    {DialOHDataType::STEPS, DialDataType::DATA_TYPE_STEPS},
+    {DialOHDataType::CALORIES, DialDataType::DATA_TYPE_CALORIE},
+    {DialOHDataType::HEART_RATE, DialDataType::DATA_TYPE_HEART_RATE},
+    {DialOHDataType::STRESS, DialDataType::DATA_TYPE_PRESSURE},
+    {DialOHDataType::TEMPERATURE, DialDataType::DATA_TYPE_TEMPERATURE},
+    {DialOHDataType::ELEVATION, DialDataType::DATA_TYPE_AILTITUDE},
+    {DialOHDataType::AIR_QUALITY_INDEX, DialDataType::DATA_TYPE_PM25},
+    {DialOHDataType::CLOCK_ANGLE, DialDataType::DATA_TYPE_CLOCK_ANGLE_H},
+    {DialOHDataType::MINUTE_ANGLE, DialDataType::DATA_TYPE_CLOCK_ANGLE_M},
+    {DialOHDataType::SECONDS_ANGLE, DialDataType::DATA_TYPE_CLOCK_ANGLE_S},
+    {DialOHDataType::MONTH, DialDataType::DATA_TYPE_TIME_MONTH},
+    {DialOHDataType::SWIVEL_GEAR_POSITIVE, DialDataType::DATA_TYPE_SWIVEL_GEAR_ONE},
+    {DialOHDataType::SWIVEL_GEAR_POSITIVE, DialDataType::DATA_TYPE_SWIVEL_GEAR_FOUR},
+    {DialOHDataType::SWIVEL_GEAR_POSITIVE, DialDataType::DATA_TYPE_SWIVEL_GEAR_SIX},
+    {DialOHDataType::SWIVEL_GEAR_NEGATIVE, DialDataType::DATA_TYPE_SWIVEL_GEAR_TWO},
+    {DialOHDataType::SWIVEL_GEAR_NEGATIVE, DialDataType::DATA_TYPE_SWIVEL_GEAR_THREE},
+    {DialOHDataType::SWIVEL_GEAR_NEGATIVE, DialDataType::DATA_TYPE_SWIVEL_GEAR_FIVE},
+};
+} // namespace OHOS
+
+#endif // DIAL_OH_DATATYPE_H
diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialOHSliceId.h b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialOHSliceId.h
new file mode 100644 (file)
index 0000000..f19784a
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2025. All rights reserved.
+ * Description: DialOHSliceId
+ * Author:
+ * Create: 2025-02-15
+ */
+
+
+#ifndef DIALOHSLICEID_H
+#define DIALOHSLICEID_H
+
+#include <unordered_map>
+#include "AppViewIDs.h"
+
+namespace OHOS {
+enum class DialOHSliceId : uint16_t {
+    DUAL_TIME_ZONES = 0,
+    HEART_RATE = 1,
+    STANDING_TIMES = 2,
+    STRESS = 3,
+    MODERATE_TO_VIGOROUS_INTENSITY_TIME = 4,
+    WEATHER = 5,
+    AIR_QUALITY_ONLY_CHINA = 6,
+    ATMOSPHERIC_PRESSURE = 7,
+    ELEVATION_HEIGHT = 8,
+    SUNRISE_SUNSET_TIME = 9,
+    DISTANCE = 10,
+    SLEEP = 11,
+    EXERCISE = 12,
+    PAYMENT_ONLY_CHINA = 13,
+    ALARM_CLOCK = 14,
+    STOPWATCH = 15,
+    TIMER = 16,
+    EXERCISE_RECORD = 17,
+    TRAINING_STATUS = 18,
+    ACTIVITY_RECORD = 19,
+    AEROBIC_EXERCISE = 20,
+    CONTACTS = 21,
+    MUSIC = 22,
+    COMPASS = 23,
+    CALL_LOG = 24,
+    BLOOD_OXYGEN_SATURATION_ONLY_CHINA = 25,
+    ULTRAVIOLET_RAYS_ONLY_CHINA = 26,
+    PHASE_OF_THE_MOON = 27,
+    STAIR_CLIMBING = 28,
+    BLOOD_PRESSURE = 29,
+    MESSAGE_LIST = 30,
+    DIAL = 31,
+    AUDIO_SWITCH = 32,
+}; // enum class DialOHSliceId
+
+struct HashOhSliceId {
+    size_t operator()(DialOHSliceId id) const
+    {
+        return std::hash<uint16_t>()(static_cast<uint16_t>(id));
+    }
+};
+
+const std::unordered_map<DialOHSliceId, AppViewId, HashOhSliceId> g_sliceIdConverter = {
+    {DialOHSliceId::COMPASS, VIEW_COMPASS},
+    {DialOHSliceId::DIAL, VIEW_CALLER_SAMPLE},
+    {DialOHSliceId::ALARM_CLOCK, VIEW_MAIN_ALARM},
+    {DialOHSliceId::AUDIO_SWITCH, VIEW_VOLUME},
+};
+} // namespace OHOS
+#endif // DIALOHSLICEID_H
index 4fa2fbd..dd08a9d 100644 (file)
@@ -7,11 +7,16 @@
 
 #include <cstdint>
 #include "DialView.h"
+#include "DialTimePublisher.h"
 #include "components/ui_image_view.h"
+#include "font/font_global_manager.h"
 
 namespace OHOS {
 
-class DialOptionImgView : public UIImageView, public DialView {
+class DialOptionImgView : public UIImageView,
+                          public DialView,
+                          public FontGlobalManager::LangChangeListener,
+                          public DialTimePublisher::TimeChangeListener {
 public:
     DialOptionImgView();
     ~DialOptionImgView() override;
@@ -20,10 +25,19 @@ public:
 
     bool SetOptionRes(const ImageInfo* src, uint16_t num);
 
+    void SetLang(uint8_t lang);
+    
+    void OnLangChange(uint8_t langId) override;
+
+    void OnTimeUpdate(const struct tm &curTime) override;
+
 private:
     ImageInfo* info_ = nullptr;
     uint16_t infoNum_ = 0;
     int16_t selected_ = -1;
+    uint8_t language_ = FontGlobalManager::INVALID_LANG_ID;
+    bool langVisible_ = true;
+    bool timeVisible_ = true;
 };
 }
 #endif
diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialSequenceContainer.h b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialSequenceContainer.h
new file mode 100644 (file)
index 0000000..f692d1f
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2025. All rights reserved.
+ * Description: DialSequenceContainer
+ * Author:
+ * Create: 2025-03-05
+ */
+
+#ifndef DIAL_SEQUENCE_CONTAINER_H
+#define DIAL_SEQUENCE_CONTAINER_H
+#include "components/ui_view_group.h"
+#include "components/ui_image_animator.h"
+
+namespace OHOS {
+class DialSequenceContainer : public UIViewGroup, public UIImageAnimatorView::AnimatorStopListener {
+public:
+    DialSequenceContainer();
+    ~DialSequenceContainer() override;
+    DialSequenceContainer(const DialSequenceContainer&) = delete;
+    DialSequenceContainer& operator=(const DialSequenceContainer&) = delete;
+    bool AddSequenceRes(uint16_t interval, bool repeat, const ImageAnimatorInfo *imgSrc, uint8_t imgNum);
+    bool OnClickEvent(const ClickEvent& event) override;
+    void Start();
+    void Stop();
+    void Pause();
+    void Resume();
+    void OnAnimatorStop(UIView& view) override;
+
+private:
+    void UpdateCurrentView();
+    UIImageAnimatorView *repeatView_ = nullptr;
+    UIImageAnimatorView *nonCycleView_[3]; // 3: max seqImg num
+    // if curView_ is not null, curView_ must be added into parent.
+    UIImageAnimatorView *curView_ = nullptr;
+    uint8_t nonCycleNum_ = 0;
+    uint8_t loop_ = 0;
+    bool isClick_ = false;
+};  // class DialSequenceContainer
+} // namespace OHOS
+#endif // DIAL_SEQUENCE_CONTAINER_H
\ No newline at end of file
index e1b48a0..733c5ed 100644 (file)
@@ -6,12 +6,29 @@
 #define DIAL_STATIC_IMG_VIEW_H
 
 #include "components/ui_image_view.h"
+#include "font/font_global_manager.h"
+#include "DialTimePublisher.h"
 
 namespace OHOS {
-class DialStaticImgView : public UIImageView {
+class DialStaticImgView : public UIImageView,
+                          public FontGlobalManager::LangChangeListener,
+                          public DialTimePublisher::TimeChangeListener {
 public:
     DialStaticImgView();
     ~DialStaticImgView() override;
+    void SetLang(uint8_t lang);
+    void OnLangChange(uint8_t langId) override;
+    bool SetImgs(const ImageInfo* src, uint8_t num);
+    bool OnClickEvent(const ClickEvent& event) override;
+    void OnTimeUpdate(const struct tm &curTime) override;
+
+private:
+    uint8_t language_ = FontGlobalManager::INVALID_LANG_ID;
+    ImageInfo* info_ = nullptr;
+    uint8_t infoNum_ = 0;
+    int16_t selected_ = -1;
+    bool langVisible_ = true;
+    bool timeVisible_ = true;
 };
 }
 #endif
diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialTimePublisher.h b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialTimePublisher.h
new file mode 100644 (file)
index 0000000..fcdb80c
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2025. All rights reserved.
+ * Description: DialTimePublisher
+ * Author:
+ * Create: 2025-03-04
+ */
+
+#ifndef DIAL_TIME_PUBLISHER_H
+#define DIAL_TIME_PUBLISHER_H
+#include <ctime>
+#include <cstdint>
+
+namespace OHOS {
+class DialTimePublisher {
+public:
+    struct TimeInterval {
+        uint8_t start;
+        uint8_t end;
+    };
+    class TimeChangeListener {
+    public:
+        virtual void OnTimeUpdate(const struct tm &curTime) = 0;
+        void SetTimeInervals(TimeInterval *intervals, uint8_t num);
+        bool IsInTimeInterval(const struct tm &curTime);
+        TimeChangeListener(const TimeChangeListener&) = delete;
+        TimeChangeListener& operator=(const TimeChangeListener&) = delete;
+        TimeChangeListener();
+        virtual ~TimeChangeListener();
+    private:
+        TimeInterval *intervals_ = nullptr;
+        uint8_t num_ = 0;
+    };
+
+    virtual void Register(TimeChangeListener *listener) = 0;
+    virtual void Unregister(TimeChangeListener *listener) = 0;
+    virtual void UpdateTime() = 0;
+    static void SetPublisher(DialTimePublisher *publisher);
+    static DialTimePublisher *GetPublisher();
+    virtual ~DialTimePublisher() {}
+
+private:
+    static DialTimePublisher *publisher_;
+}; // class DialTimePublisher
+} // namespace OHOS
+#endif // DIAL_TIME_PUBLISHER_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialViewContainer.h b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/DialViewContainer.h
new file mode 100644 (file)
index 0000000..0dd421c
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2025. All rights reserved.
+ * Description: DialViewContainer
+ * Author:
+ * Create: 2025-02-06
+ */
+
+#ifndef DIAL_VIEW_CONTAINER_H
+#define DIAL_VIEW_CONTAINER_H
+#include "components/ui_view_group.h"
+#include "gfx_utils/list.h"
+#include "dial/DialView.h"
+#include "dial/DialDataBase.h"
+
+namespace OHOS {
+class ContainerInterface {
+public:
+    virtual void AddView(UIView* view) = 0;
+
+    virtual void AddView(DialDataType type, DialView* view, bool isPeriodic) = 0;
+
+    virtual ~ContainerInterface() {}
+};
+
+class DialViewContainer : public UIViewGroup, public ContainerInterface {
+public:
+    struct SubView {
+        UIView *view;
+        DialView *dialView;
+        DialDataType type;
+        bool isPeriodic;
+    };
+    DialViewContainer(uint8_t dialviewNum, uint16_t dataSize) :
+        dialViewNum_(dialviewNum), dataSize_(dataSize)
+    {
+        SetTouchable(true);
+    }
+    DialViewContainer() {}
+    ~DialViewContainer() override;
+    DialViewContainer(const DialViewContainer&) = delete;
+    DialViewContainer& operator=(const DialViewContainer&) = delete;
+
+    uint8_t GetDialviewNum() const
+    {
+        return dialViewNum_;
+    }
+
+    uint16_t GetDataSize() const
+    {
+        return dataSize_;
+    }
+
+    void AddView(UIView* view) override;
+
+    void AddView(DialDataType type, DialView* view, bool isPeriodic) override;
+
+    ListNode<SubView>* Begin()
+    {
+        return dialViews_.Begin();
+    }
+
+    const ListNode<SubView>* End()
+    {
+        return dialViews_.End();
+    }
+
+    bool HasInvalidBindData() const
+    {
+        return hasInvalidBindData_;
+    }
+
+    bool RemoveSubView(uint8_t index, SubView &subView);
+
+    bool IsInvalidateBindData(uint8_t index);
+
+private:
+    uint8_t dialViewNum_;
+    uint16_t dataSize_;
+    List<SubView> dialViews_;
+    bool hasInvalidBindData_ = false;
+}; // class DialViewContainer
+} // namesapce OHOS
+#endif // DIAL_VIEW_CONTAINER_H
\ No newline at end of file
index f1b5844..92b014e 100644 (file)
@@ -8,16 +8,21 @@
 #include <unordered_map>
 #include "DialDataBase.h"
 #include "components/ui_view_group.h"
+#include "components/ui_image_animator.h"
+#include "components/ui_label.h"
 #include "OnDialDataUpdateListener.h"
 #include "components/ui_card_page.h"
 #include "components/ui_kaleidoscope_view.h"
 #include "gfx_utils/list.h"
+#include "gfx_utils/vector.h"
 #include "DialView.h"
 #include "DialVideoView.h"
 #include "DialBinTypesV2.h"
+#include "DialViewContainer.h"
+#include "DialSequenceContainer.h"
 
 namespace OHOS {
-class DialViewGroup : public UICardPage, public OnDialDataUpdateListener {
+class DialViewGroup : public UICardPage, public OnDialDataUpdateListener, public ContainerInterface {
 public:
     DialViewGroup();
     ~DialViewGroup() override;
@@ -30,12 +35,12 @@ public:
     /**
     * @brief  Add a view which binds with data of a specific type and could be updated periodically.
     */
-    void AddView(DialDataType type, DialView* view, bool isPeriodic = false);
+    void AddView(DialDataType type, DialView* view, bool isPeriodic) override;
 
     /**
-    * @brief  Add a view. If the view is DialVideoView, the second parameter should be true.
+    * @brief  Add a view.
     */
-    void AddView(UIView* view, bool isDialVideoView = false);
+    void AddView(UIView* view) override;
 
     /**
     * @brief  Add a click rect. When the rect is clicked, it will start a js app with the given bundleName.
@@ -112,14 +117,31 @@ public:
     */
     void OnActive(void) override;
 
-    void OnInactive() override;
+    /**
+    * @brief  This function is invoked when the function SetHorCurrentPage() is called.
+    */
+    void OnInactive(void) override;
+
+    /**
+    * @brief  This function is invoked when SetVerCurrentPage is called and horizontal page is covered.
+    */
+    void OnCovered(void) override;
+
+       /**
+    * @brief  This function is invoked when SetVerCurrentPage is called and horizontal page is not covered.
+    */
+    void OnUncovered(void) override;
 
+    void OnPause() override;
+
+    /* -------------------------------------------------------------------------- */
     /*外部接口对表盘进行调用*/
     void StopDial();
     void StartDial();
 
     /*外部接口更新表盘状态*/
     void UpdateStateShow();
+    /* -------------------------------------------------------------------------- */
 
     MediaVideoPlay* GetVideoPlay();
 
@@ -130,7 +152,15 @@ private:
 
 private:
     void ProcessData(DialDataType type, DialView* view);
-    std::unordered_map<int16_t, DialView*> dataTypeMap_;
+    void DoStop(void);
+    void DoStart(void);
+    void DoPause(void);
+    void RecordSpecial(UIView *view);
+    void RecordBindData(DialDataType type, DialView* view, bool isPeriodic);
+    void ClearViews();
+    using Views = Graphic::Vector<DialView*>;
+    std::unordered_map<int16_t, Views*> dataTypeMap_;
+    Graphic::Vector<Views*> viewsMemPool_;
     List<DialDataType> periodicUpdateTypes_;
     List<DialDataType> passiveUpdateTypes_;
     List<UIView*> dialViews_;
@@ -155,6 +185,12 @@ private:
     List<DialClick> dialClicks_;
 
     void ClearDial();
+
+    void SetLableAnimatorState(uint8_t state);
+    void SetImgAnimatorState(uint8_t state);
+    List<UILabel*> rollingLabelList_;
+    List<UIImageAnimatorView*> imgAnimList_;
+    List<DialSequenceContainer*> seqList_;
 };
 }
 #endif
index 33bedbe..30c1d1c 100644 (file)
@@ -11,6 +11,7 @@
 #include <unordered_map>
 #include "DialBaseModel.h"
 #include "DialDataBase.h"
+#include "DialOHDataType.h"
 #include "ModelDialDataFactory.h"
 
 namespace OHOS {
@@ -30,6 +31,8 @@ public:
         models_[static_cast<int16_t>(type)] = model;
     }
 
+    bool IsOHBindDataExist(DialOHDataType type) const;
+    bool IsBindDataExist(DialDataType type) const;
     bool RegisterDialDataListener(DialDataType type, OnDialDataUpdateListener* listener);
     bool UnRegisterDialDataListener(DialDataType type);
     bool GetDialTextData(DialDataType& type, std::string*& out, int16_t& strNum);
diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/WatchInterface.h b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/dial/WatchInterface.h
new file mode 100644 (file)
index 0000000..2938ed4
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2025. All rights reserved.
+ * Description: WatchInterface
+ * Author:
+ * Create: 2025-03-17
+ */
+
+#ifndef WATCH_INTERFACE_H
+#define WATCH_INTERFACE_H
+#include <cstdint>
+#include "format_type.h"
+#include "dial_market.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Get all watch face information
+ * @param[out] info Pointer to store the watch face information
+ * @param[out] num Pointer to store the number of watch faces
+ * @param[in] maxCnt Maximum number of watch faces to retrieve
+ * @return bool Returns true if successful, false otherwise
+ */
+bool GetAllWatchFaceInfo(watch_dial_info *info, uint8_t *num, uint8_t maxCnt);
+
+/**
+ * @brief Get information of a specific watch face by UUID
+ * @param[in] uuid Unique identifier of the watch face
+ * @param[out] watch Pointer to store the watch face information
+ * @return bool Returns true if successful, false otherwise
+ */
+bool GetWatchFaceInfo(uint32_t uuid, watch_dial_info *watch);
+
+/**
+ * @brief Get the capability set of the watch
+ * @param[out] capability Pointer to store the watch capability information
+ * @return bool Returns true if successful, false otherwise
+ */
+bool GetWatchCapability(watch_dev_cap_info *capability);
+
+/**
+ * @brief Get system information
+ * @param[out] sysInfo Pointer to store the system information
+ * @return bool Returns true if successful, false otherwise
+ */
+bool GetWatchSystemInfo(watch_sys_info *sysInfo);
+
+/**
+ * @brief Get information of the currently active watch face
+ * @param[out] watch Pointer to store the watch face information
+ * @return bool Returns true if successful, false otherwise
+ */
+bool GetCurrentWatchFaceInfo(watch_dial_info *watch);
+
+/**
+ * @brief Set the currently active watch face by UUID
+ * @param[in] uuid Unique identifier of the watch face to set as active
+ * @return bool Returns true if successful, false otherwise
+ */
+bool SetCurrentWatchFace(uint32_t uuid);
+
+/**
+ * @brief Uninstall a watch face by UUID
+ * @param[in] uuid Unique identifier of the watch face to uninstall
+ * @return bool Returns true if successful, false otherwise
+ * @note If the UUID corresponds to the currently active watch face, it will switch to the default watch face
+ */
+bool UninstallWatch(uint32_t uuid);
+
+/**
+ * @brief Install a watch face from a specified path
+ * @param[in] path Path to the watch face file
+ * @param[out] uuid Pointer to store the unique identifier of the installed watch face
+ * @return bool Returns true if successful, false otherwise
+ * @note If a watch face with the same UUID already exists, it will be replaced
+ */
+bool InstallWatch(const char *path, uint32_t *uuid);
+
+#ifdef __cplusplus
+}
+#endif
+#endif // WATCH_INTERFACE_H
\ No newline at end of file
index bbeca06..bb5f686 100644 (file)
@@ -167,6 +167,26 @@ namespace OHOS
             delete callback;
             callback = nullptr;
         }
+#ifdef XTS_SUPPORT
+        /* ----------------------------------- XTS ---------------------------------- */
+        if(XTSLabel) 
+        {
+            delete XTSLabel;
+            XTSLabel = nullptr;
+        }
+        if (xtsCallback_ != nullptr)
+        {
+            delete xtsCallback_;
+            xtsCallback_ = nullptr;
+        }
+        if (xtsanimator_ != nullptr)
+        {
+            xtsanimator_->Stop();
+            delete xtsanimator_;
+            xtsanimator_ = nullptr;
+        }
+        /* -------------------------------------------------------------------------- */
+#endif
         g_pMainView = nullptr;
     }
     MainViewSample *MainViewSample::GetInstance(void)
@@ -245,6 +265,26 @@ namespace OHOS
             }
         // }
 
+#ifdef XTS_SUPPORT
+        /* ----------------------------------- XTS ---------------------------------- */
+        if (XTSLabel == nullptr)
+        {
+            XTSLabel = new UILabel();
+        }
+        XTSLabel->SetPosition(130, 273); // widget's left position and top position
+        XTSLabel->Resize(200, 60);       // widget's width and height
+        XTSLabel->SetViewId("label1");   // Set style
+        XTSLabel->SetStyle(STYLE_TEXT_FONT, 30);
+        XTSLabel->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT);
+        XTSLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
+        XTSLabel->SetRollSpeed(0);
+        XTSLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+        mainSwipeGroup->Add(XTSLabel);
+        xtsCallback_ = new XTSCallback(XTSLabel);
+        xtsanimator_ = new Animator(xtsCallback_, XTSLabel, 1000, true);
+        xtsanimator_->Start();
+#endif
+
         AddViewToRootContainer(mainSwipeGroup);
     }
 
index 6704a22..02ce99c 100644 (file)
@@ -129,4 +129,21 @@ void DialArcLabelView::HandleFloatData(float data)
     }
     SetTextWithWildcardInner(tempBuf);
 }
+
+void DialArcLabelView::SetLang(uint8_t lang)
+{
+    language_ = lang;
+    OnLangChange(FontGlobalManager::GetInstance()->GetCurrentLangId());
+}
+
+void DialArcLabelView::OnLangChange(uint8_t langId)
+{
+    if (language_ == FontGlobalManager::INVALID_LANG_ID) {
+        SetVisible(true);
+    } else if (language_ == langId) {
+        SetVisible(true);
+    } else {
+        SetVisible(false);
+    }
+}
 }
\ No newline at end of file
index 6d7bb74..4f31617 100644 (file)
@@ -74,6 +74,18 @@ void DialDigitalImgView::SetParent(UIViewGroup* parent)
     parent_ = parent;
 }
 
+void DialDigitalImgView::OnTimeUpdate(const struct tm &curTime)
+{
+    bool isVisible = false;
+    if (IsInTimeInterval(curTime)) {
+        isVisible = true;
+    }
+    for (uint8_t i = 0; i < imgCnt_; ++i) {
+        imgs_[i]->SetVisible(isVisible);
+    }
+    SetVisible(isVisible);
+}
+
 void DialDigitalImgView::SetDecimalPrecision(uint8_t precision)
 {
     decimalPrecision_ = precision;
@@ -208,6 +220,9 @@ bool DialDigitalImgView::CreateImageViews(float data)
 
 void DialDigitalImgView::HandleFloatData(float data)
 {
+    if (!IsVisible()) {
+        return;
+    }
     if (isValueSet_ && FloatEqual(value_, data)) {
         return;
     }
index 5f1c60b..54a2e90 100644 (file)
@@ -166,4 +166,25 @@ namespace OHOS
         }
         SetTextWithWildcardInner(tempBuf);
     }
+    void DialLabelView::SetLang(uint8_t lang)
+    {
+        language_ = lang;
+        OnLangChange(FontGlobalManager::GetInstance()->GetCurrentLangId());
+    }
+
+    void DialLabelView::OnLangChange(uint8_t langId)
+    {
+        if (language_ == FontGlobalManager::INVALID_LANG_ID)
+        {
+            SetVisible(true);
+        }
+        else if (language_ == langId)
+        {
+            SetVisible(true);
+        }
+        else
+        {
+            SetVisible(false);
+        }
+    }
 }
\ No newline at end of file
index 6dd110f..4d1acc5 100644 (file)
@@ -8,6 +8,7 @@
 #include "sys/time.h"
 #include "RegisterDialModel.h"
 #include "DialModelTime.h"
+#include "components/root_view.h"
 #include "custom_runtime.h"
 #define REGIST_DIAL_MODULE_ANGLE_H(type, func) static OHOS::RegisterDialModel(REGIST_ANGLE_H)(type, func)
 #define REGIST_DIAL_MODULE_ANGLE_M(type, func) static OHOS::RegisterDialModel(REGIST_ANGLE_M)(type, func)
 #define REGIST_DIAL_MODULE_WEEK(type, func) static OHOS::RegisterDialModel(REGIST_WEEK)(type, func)
 #define REGIST_DIAL_MODULE_MOUNTH(type, func) static OHOS::RegisterDialModel(REGIST_MOUNTH)(type, func)
 #define REGIST_DIAL_MODULE_YEAR(type, func) static OHOS::RegisterDialModel(REGIST_YEAR)(type, func)
+#define REGIST_DIAL_MODULE_GEAR_ONE(type, func) static OHOS::RegisterDialModel(REGIST_GEAR_ONE)(type, func)
+#define REGIST_DIAL_MODULE_GEAR_TWO(type, func) static OHOS::RegisterDialModel(REGIST_GEAR_TWO)(type, func)
+#define REGIST_DIAL_MODULE_GEAR_THREE(type, func) static OHOS::RegisterDialModel(REGIST_GEAR_THREE)(type, func)
+#define REGIST_DIAL_MODULE_GEAR_FOUR(type, func) static OHOS::RegisterDialModel(REGIST_GEAR_FOUR)(type, func)
+#define REGIST_DIAL_MODULE_GEAR_FIVE(type, func) static OHOS::RegisterDialModel(REGIST_GEAR_FIVE)(type, func)
+#define REGIST_DIAL_MODULE_GEAR_SIX(type, func) static OHOS::RegisterDialModel(REGIST_GEAR_SIX)(type, func)
 
 REGIST_DIAL_MODULE_ANGLE_H(DialDataType::DATA_TYPE_CLOCK_ANGLE_H, OHOS::DialModelTime::GetInstance());
 REGIST_DIAL_MODULE_ANGLE_M(DialDataType::DATA_TYPE_CLOCK_ANGLE_M, OHOS::DialModelTime::GetInstance());
@@ -35,15 +42,22 @@ REGIST_DIAL_MODULE_WEEK(DialDataType::DATA_TYPE_TIME_WEEK, OHOS::DialModelTime::
 REGIST_DIAL_MODULE_MOUNTH(DialDataType::DATA_TYPE_TIME_MONTH, OHOS::DialModelTime::GetInstance());
 REGIST_DIAL_MODULE_YEAR(DialDataType::DATA_TYPE_TIME_YEAR, OHOS::DialModelTime::GetInstance());
 
+REGIST_DIAL_MODULE_GEAR_ONE(DialDataType::DATA_TYPE_SWIVEL_GEAR_ONE, OHOS::DialModelTime::GetInstance());
+REGIST_DIAL_MODULE_GEAR_TWO(DialDataType::DATA_TYPE_SWIVEL_GEAR_TWO, OHOS::DialModelTime::GetInstance());
+REGIST_DIAL_MODULE_GEAR_THREE(DialDataType::DATA_TYPE_SWIVEL_GEAR_THREE, OHOS::DialModelTime::GetInstance());
+REGIST_DIAL_MODULE_GEAR_FOUR(DialDataType::DATA_TYPE_SWIVEL_GEAR_FOUR, OHOS::DialModelTime::GetInstance());
+REGIST_DIAL_MODULE_GEAR_FIVE(DialDataType::DATA_TYPE_SWIVEL_GEAR_FIVE, OHOS::DialModelTime::GetInstance());
+REGIST_DIAL_MODULE_GEAR_SIX(DialDataType::DATA_TYPE_SWIVEL_GEAR_SIX, OHOS::DialModelTime::GetInstance());
+
 namespace OHOS {
 static constexpr int16_t S_MS_US_TRANS = 1000;      // 1000: seconds, milliseconds, microsecond transform value
-static constexpr uint16_t CIRCLE_IN_DEGREE_UI = 360;   // 360: A full rotation: 360 degrees
 static constexpr uint8_t ONE_MINUTE_IN_SECOND = 60; // 60: 60 seconds per minute
 static constexpr uint8_t ONE_HOUR_IN_MINUTE = 60;   // 60: 60 minutes per hour
 static constexpr uint8_t HALF_DAY_IN_HOUR = 12;     // 60: 12 hours every half day
 
 static uint16_t ConvertHandValueToAngle(int32_t handValue, uint8_t range, int32_t secondHandValue, uint16_t ratio)
 {
+    #ifdef fd230_650
     if ((range == 0) || (ratio == 0)) {
         return 0;
     }
@@ -56,20 +70,45 @@ static uint16_t ConvertHandValueToAngle(int32_t handValue, uint8_t range, int32_
     degree = CIRCLE_IN_DEGREE_UI * degree / (static_cast<uint16_t>(range) * ratio);
 
     return static_cast<uint16_t>(degree % CIRCLE_IN_DEGREE_UI);
+    #endif
+    
+    /* -------------------------------- 0423补丁合入 -------------------------------- */
+    if ((range == 0) || (ratio == 0)) {
+        return 0;
+    }
+    /*
+     * Example: calculate the angle of hour hand
+     * Assume that the time is 5: 30, then range is 12, radio is 60
+     * angle is [(5 * 60  + 30) / (12 * 60)] * 360
+     */
+    int32_t degree = (handValue * ratio + secondHandValue);
+    degree = CIRCLE_IN_DEGREE * degree / (static_cast<uint16_t>(range) * ratio);
+
+    return static_cast<uint16_t>(degree % CIRCLE_IN_DEGREE);
 }
 
 static float ConvertHandSecondValueToAngle(int32_t handValue, uint16_t range)
 {
+    #ifdef fd230_650
     /*
      * Example: calculate the angle of second hand without millisecond handle
      * Assume that the time is 5:30:30, then range is 60
      * angle is (30 / 60) * 360
      */
     return (static_cast<float>(handValue * CIRCLE_IN_DEGREE_UI) / range);
+    #endif
+    /* -------------------------------- 0423补丁合入 -------------------------------- */
+    /*
+     * Example: calculate the angle of second hand without millisecond handle
+     * Assume that the time is 5:30:30, then range is 60
+     * angle is (30 / 60) * 360
+     */
+    return (static_cast<float>(handValue * CIRCLE_IN_DEGREE) / range);
 }
 
 void DialModelTime::UpdateTime()
 {
+#ifdef fd230_650
 #if 0
     struct timeval tv;
     gettimeofday(&tv, NULL);
@@ -101,11 +140,63 @@ void DialModelTime::UpdateTime()
     angleM_ = ConvertHandValueToAngle(tblock_.tm_min, ONE_HOUR_IN_MINUTE, tblock_.tm_sec, ONE_MINUTE_IN_SECOND);
     angleS_ = ConvertHandValueToAngle(tblock_.tm_sec, ONE_MINUTE_IN_SECOND, 0, 1);
     angleMS_ = ConvertHandSecondValueToAngle(realMS, S_MS_US_TRANS * ONE_MINUTE_IN_SECOND);
+
+    #endif
+
+    /* --------------------------------- 0423补丁 --------------------------------- */
+    struct timeval tv;
+    gettimeofday(&tv, nullptr);
+    tblock_ = localtime(&tv.tv_sec);
+    int realMS = tblock_->tm_sec * S_MS_US_TRANS + tv.tv_usec / S_MS_US_TRANS;
+
+    angleH_ = ConvertHandValueToAngle(tblock_->tm_hour, HALF_DAY_IN_HOUR, tblock_->tm_min, ONE_HOUR_IN_MINUTE);
+    angleM_ = ConvertHandValueToAngle(tblock_->tm_min, ONE_HOUR_IN_MINUTE, tblock_->tm_sec, ONE_MINUTE_IN_SECOND);
+    angleS_ = ConvertHandValueToAngle(tblock_->tm_sec, ONE_MINUTE_IN_SECOND, 0, 1);
+    angleMS_ = ConvertHandSecondValueToAngle(realMS, S_MS_US_TRANS * ONE_MINUTE_IN_SECOND);
+    if (tblock_ == nullptr) {
+        return;
+    }
+    for (ListNode<TimeChangeListener*>* node = listeners_.Head(); node != listeners_.End(); node = node->next_) {
+        TimeChangeListener *listener = node->data_;
+        if (listener != nullptr) {
+            listener->OnTimeUpdate(*tblock_);
+        }
+    }
+    RootView::GetInstance()->Invalidate();
+    /* -------------------------------------------------------------------------- */
 }
 
-bool DialModelTime::GetDialFloatData(DialDataType& type, float& out)
+void DialModelTime::Register(TimeChangeListener* listener)
+{
+    if (listener == nullptr) {
+        return;
+    }
+    for (ListNode<TimeChangeListener*>* node = listeners_.Head(); node != listeners_.End(); node = node->next_) {
+        TimeChangeListener *tmp = node->data_;
+        if (tmp == listener) {
+            return;
+        }
+    }
+    listeners_.PushBack(listener);
+}
+
+void DialModelTime::Unregister(TimeChangeListener* listener)
 {
+    if (listener == nullptr) {
+        return;
+    }
+    for (ListNode<TimeChangeListener*>* node = listeners_.Head(); node != listeners_.End(); node = node->next_) {
+        TimeChangeListener *tmp = node->data_;
+        if (tmp == listener) {
+            listeners_.Remove(node);
+            return;
+        }
+    }
+}
 
+bool DialModelTime::GetDialFloatData(DialDataType& type, float& out)
+{
+    #ifdef fd230_650
     UpdateTime();
     
     switch (type) {
@@ -146,5 +237,66 @@ bool DialModelTime::GetDialFloatData(DialDataType& type, float& out)
             return false;
     }
     return true;
+    #endif
+
+    /* --------------------------------- 0423补丁 --------------------------------- */
+    if (tblock_ == nullptr) {
+        UpdateTime();
+    }
+
+    switch (type) {
+        case DialDataType::DATA_TYPE_CLOCK_ANGLE_H:
+            out = static_cast<float>(angleH_);
+            break;
+        case DialDataType::DATA_TYPE_CLOCK_ANGLE_M:
+            out = static_cast<float>(angleM_);
+            break;
+        case DialDataType::DATA_TYPE_CLOCK_ANGLE_S:
+            out = static_cast<float>(angleS_);
+            break;
+        case DialDataType::DATA_TYPE_CLOCK_ANGLE_MS:
+            out = static_cast<float>(angleMS_);
+            break;
+        case DialDataType::DATA_TYPE_TIME_YEAR:
+            out = static_cast<float>(tblock_->tm_year);
+            break;
+        case DialDataType::DATA_TYPE_TIME_MONTH:
+            out = static_cast<float>(tblock_->tm_mon);
+            break;
+        case DialDataType::DATA_TYPE_TIME_WEEK:
+            out = static_cast<float>(tblock_->tm_wday);
+            break;
+        case DialDataType::DATA_TYPE_TIME_DATE:
+            out = static_cast<float>(tblock_->tm_mday);
+            break;
+        case DialDataType::DATA_TYPE_TIME_HOUR:
+            out = static_cast<float>(tblock_->tm_hour);
+            break;
+        case DialDataType::DATA_TYPE_TIME_MINUTE:
+            out = static_cast<float>(tblock_->tm_min);
+            break;
+        case DialDataType::DATA_TYPE_TIME_SECOND:
+            out = static_cast<float>(tblock_->tm_sec);
+            break;
+        case DialDataType::DATA_TYPE_SWIVEL_GEAR_TWO:
+        case DialDataType::DATA_TYPE_SWIVEL_GEAR_THREE:
+        case DialDataType::DATA_TYPE_SWIVEL_GEAR_FIVE: {
+            float coeff = 6.0f;  // 6.0: coeff
+            float accleratedAngle = angleMS_ * coeff - floor(angleMS_ * coeff / CIRCLE_IN_DEGREE) * CIRCLE_IN_DEGREE;
+            out = static_cast<float>(accleratedAngle * -1.0 + CIRCLE_IN_DEGREE);
+            break;
+        }
+        case DialDataType::DATA_TYPE_SWIVEL_GEAR_ONE:
+        case DialDataType::DATA_TYPE_SWIVEL_GEAR_FOUR:
+        case DialDataType::DATA_TYPE_SWIVEL_GEAR_SIX: {
+            float coeff = 6.0f;  // 6.0: coeff
+            float accleratedAngle = angleMS_ * coeff - floor(angleMS_ * coeff / CIRCLE_IN_DEGREE) * CIRCLE_IN_DEGREE;
+            out = static_cast<float>(accleratedAngle);
+            break;
+        }
+        default:
+            return false;
+    }
+    return true;
 }
 }
index 8c78ad4..980d438 100644 (file)
@@ -53,4 +53,32 @@ void DialOptionImgView::HandleFloatData(float data)
     selected_ = selected;
     SetSrc(&info_[selected_]);
 }
+
+void DialOptionImgView::SetLang(uint8_t lang)
+{
+    language_ = lang;
+    OnLangChange(FontGlobalManager::GetInstance()->GetCurrentLangId());
+}
+
+void DialOptionImgView::OnLangChange(uint8_t langId)
+{
+    if (language_ == FontGlobalManager::INVALID_LANG_ID) {
+        langVisible_ = true;
+    } else if (language_ == langId) {
+        langVisible_ = true;
+    } else {
+        langVisible_ = false;
+    }
+    SetVisible(langVisible_ && timeVisible_);
+}
+
+void DialOptionImgView::OnTimeUpdate(const struct tm &curTime)
+{
+    if (IsInTimeInterval(curTime)) {
+        timeVisible_ = true;
+    } else {
+        timeVisible_ = false;
+    }
+    SetVisible(langVisible_ && timeVisible_);
+}
 }
\ No newline at end of file
diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialSequenceContainer.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialSequenceContainer.cpp
new file mode 100644 (file)
index 0000000..4024f46
--- /dev/null
@@ -0,0 +1,228 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2025. All rights reserved.
+ * Description: DialSequenceContainer
+ * Author:
+ * Create: 2025-03-05
+ */
+
+#include "DialSequenceContainer.h"
+
+namespace OHOS {
+DialSequenceContainer::DialSequenceContainer()
+{
+    SetTouchable(true);
+    SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);
+    memset_s(nonCycleView_, sizeof(nonCycleView_), 0, sizeof(nonCycleView_));
+}
+
+DialSequenceContainer::~DialSequenceContainer()
+{
+    if (repeatView_ != nullptr) {
+        delete repeatView_;
+        repeatView_ = nullptr;
+    }
+
+    for (uint8_t i = 0; i < nonCycleNum_; ++i) {
+        delete nonCycleView_[i];
+        nonCycleView_[i] = nullptr;
+    }
+    nonCycleNum_ = 0;
+    curView_ = nullptr;
+}
+
+bool DialSequenceContainer::AddSequenceRes(uint16_t interval, bool repeat,
+    const ImageAnimatorInfo *imgSrc, uint8_t imgNum)
+{
+    if (imgSrc == nullptr || imgNum == 0) {
+        return false;
+    }
+
+    // add animator images to view
+    if (repeat) {
+        if (repeatView_ != nullptr) {
+            GRAPHIC_LOGE("the repeat seq view has existed!");
+            return false;
+        }
+        repeatView_ = new UIImageAnimatorView;
+        repeatView_->SetImageAnimatorSrc(imgSrc, imgNum, interval);
+        repeatView_->SetRepeat(false);
+    } else {
+        if (nonCycleNum_ >= sizeof(nonCycleView_) / sizeof(nonCycleView_[0])) {
+            GRAPHIC_LOGE("non cycle seq views have been exceedeed!");
+            return false;
+        }
+        nonCycleView_[nonCycleNum_] = new UIImageAnimatorView;
+        nonCycleView_[nonCycleNum_]->SetImageAnimatorSrc(imgSrc, imgNum, interval);
+        nonCycleView_[nonCycleNum_]->SetRepeat(false);
+        ++nonCycleNum_;
+    }
+
+    // update rect area
+    Rect rect(GetRelativeRect());
+    for (uint8_t i = 0; i < imgNum; ++i) {
+        rect.JoinRect(rect,
+            Rect(rect.GetX(),
+                rect.GetY(),
+                rect.GetX() + imgSrc[i].width - 1,
+                rect.GetY() + imgSrc[i].height - 1));
+    }
+    rect.JoinRect(rect, GetRelativeRect());
+    SetPosition(rect.GetX(), rect.GetY());
+    SetWidth(rect.GetWidth());
+    SetHeight(rect.GetHeight());
+    Invalidate();
+    
+    return true;
+}
+
+bool DialSequenceContainer::OnClickEvent(const ClickEvent& event)
+{
+    if (curView_ == nullptr) {
+        return false;
+    }
+    uint8_t curState = curView_->GetState();
+    switch (curState) {
+        case Animator::STOP: {
+            if (curView_ == repeatView_) {
+                isClick_ = true;
+            } else {
+                UpdateCurrentView();
+                Start();
+            }
+            break;
+        }
+        case Animator::PAUSE: {
+            return false;
+        }
+        case Animator::RUNNING:
+        case Animator::START: {
+            if (curView_ == repeatView_) {
+                isClick_ = true;
+            }
+            break;
+        }
+        default: {
+            GRAPHIC_LOGE("error state");
+        }
+    }
+    
+    return UIViewGroup::OnClickEvent(event);
+}
+
+void DialSequenceContainer::Start()
+{
+    if (curView_ != nullptr) {
+        curView_->Start();
+        return;
+    }
+
+    UpdateCurrentView();
+    if (curView_ == nullptr) {
+        return;
+    }
+    curView_->Start();
+}
+
+void DialSequenceContainer::Stop()
+{
+    if (curView_ != nullptr) {
+        curView_->Stop();
+        return;
+    }
+
+    UpdateCurrentView();
+    if (curView_ == nullptr) {
+        return;
+    }
+    curView_->Stop();
+}
+
+void DialSequenceContainer::Pause()
+{
+    if (curView_ != nullptr) {
+        curView_->Pause();
+        return;
+    }
+
+    UpdateCurrentView();
+    if (curView_ == nullptr) {
+        return;
+    }
+    curView_->Pause();
+}
+
+void DialSequenceContainer::Resume()
+{
+    if (curView_ != nullptr) {
+        curView_->Resume();
+        return;
+    }
+
+    UpdateCurrentView();
+    if (curView_ == nullptr) {
+        return;
+    }
+    curView_->Resume();
+}
+
+void DialSequenceContainer::OnAnimatorStop(UIView& view)
+{
+    bool isClick = isClick_;
+    isClick_ = false;
+    bool isRepeat = (curView_ == repeatView_);
+    if (isRepeat && isClick) {
+        UpdateCurrentView();
+        Start();
+    } else if (isRepeat && !isClick) {
+        Start();
+    } else {
+        if (repeatView_ != nullptr) {
+            UpdateCurrentView();
+            Start();
+        }
+    }
+}
+
+void DialSequenceContainer::UpdateCurrentView()
+{
+    if (curView_ != nullptr) {
+        if (repeatView_ != nullptr && nonCycleNum_ == 0) {
+            return;
+        } else if (repeatView_ == nullptr && nonCycleNum_ != 0) {
+            Remove(curView_);
+            curView_ = nonCycleView_[loop_];
+            loop_ = (loop_ + 1) % nonCycleNum_;
+            curView_->SetAnimatorStopListener(this);
+            Add(curView_);
+            Invalidate();
+            return;
+        }
+
+        // both repeat and noncycle exist
+        Remove(curView_);
+        if (curView_ == repeatView_) {
+            curView_ = nonCycleView_[loop_];
+            loop_ = (loop_ + 1) % nonCycleNum_;
+        } else {
+            curView_ = repeatView_;
+        }
+        curView_->SetAnimatorStopListener(this);
+        Add(curView_);
+        Invalidate();
+        return;
+    }
+
+    if (repeatView_ != nullptr) {
+        curView_ = repeatView_;
+    } else if (nonCycleNum_ != 0) {
+        curView_ = nonCycleView_[loop_];
+        loop_ = (loop_ + 1) % nonCycleNum_;
+    } else {
+        GRAPHIC_LOGE("sequence img has not been added!");
+        return;
+    }
+    curView_->SetAnimatorStopListener(this);
+    Add(curView_);
+    Invalidate();
+}
+} // namespace OHOS
index dd3126f..ffc87a7 100644 (file)
@@ -10,5 +10,74 @@ DialStaticImgView::DialStaticImgView()
     SetAutoEnable(true);
 }
 
-DialStaticImgView::~DialStaticImgView() {}
+DialStaticImgView::~DialStaticImgView()
+{
+    if (info_ != nullptr) {
+        UIFree(info_);
+        info_ = nullptr;
+    }
+}
+
+void DialStaticImgView::SetLang(uint8_t lang)
+{
+    language_ = lang;
+    OnLangChange(FontGlobalManager::GetInstance()->GetCurrentLangId());
+}
+
+void DialStaticImgView::OnLangChange(uint8_t langId)
+{
+    if (language_ == FontGlobalManager::INVALID_LANG_ID) {
+        langVisible_ = true;
+    } else if (language_ == langId) {
+        langVisible_ = true;
+    } else {
+        langVisible_ = false;
+    }
+    SetVisible(langVisible_ && timeVisible_);
+}
+
+bool DialStaticImgView::SetImgs(const ImageInfo* src, uint8_t num)
+{
+    if (src == nullptr || num == 0) {
+        return false;
+    }
+    if (info_ != nullptr) {
+        UIFree(info_);
+        info_ = nullptr;
+    }
+    uint32_t size = sizeof(ImageInfo) * num;
+    info_ = static_cast<ImageInfo*>(UIMalloc(size));
+    if (info_ == nullptr) {
+        return false;
+    }
+    if (memcpy_s(info_, size, src, size) != EOK) {
+        UIFree(info_);
+        return false;
+    }
+    infoNum_ = num;
+    selected_ = 0;
+    SetSrc(&info_[selected_]);
+    SetTouchable(infoNum_ > 1);
+    return true;
+}
+
+bool DialStaticImgView::OnClickEvent(const ClickEvent& event)
+{
+    if (selected_ < 0 || info_ == nullptr || infoNum_ == 0) {
+        return false;
+    }
+    selected_ = (selected_ + 1) % infoNum_;
+    SetSrc(&info_[selected_]);
+    return true;
+}
+
+void DialStaticImgView::OnTimeUpdate(const struct tm &curTime)
+{
+    if (IsInTimeInterval(curTime)) {
+        timeVisible_ = true;
+    } else {
+        timeVisible_ = false;
+    }
+    SetVisible(langVisible_ && timeVisible_);
+}
 }
\ No newline at end of file
diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialTimePublisher.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialTimePublisher.cpp
new file mode 100644 (file)
index 0000000..cb4539b
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2025. All rights reserved.
+ * Description: DialTimePublisher
+ * Author:
+ * Create: 2025-03-04
+ */
+
+#include "DialTimePublisher.h"
+#include "securec.h"
+#include "gfx_utils/mem_api.h"
+#include "gfx_utils/graphic_log.h"
+
+namespace OHOS {
+DialTimePublisher *DialTimePublisher::publisher_ = nullptr;
+
+void DialTimePublisher::TimeChangeListener::SetTimeInervals(TimeInterval *intervals, uint8_t num)
+{
+    if (intervals == nullptr || num == 0) {
+        return;
+    }
+    if (intervals_ != nullptr) {
+        UIFree(intervals_);
+        intervals_ = nullptr;
+    }
+    num_ = 0;
+
+    intervals_ = static_cast<TimeInterval*>(UIMalloc(sizeof(TimeInterval) * num));
+    if (intervals_ == nullptr) {
+        GRAPHIC_LOGE("failed to malloc!");
+        return;
+    }
+    num_ = num;
+    memcpy_s(intervals_, sizeof(TimeInterval) * num, intervals, sizeof(TimeInterval) * num);
+}
+
+bool DialTimePublisher::TimeChangeListener::IsInTimeInterval(const struct tm &curTime)
+{
+    if (num_ == 0) { // 0-24
+        return true;
+    }
+    for (uint8_t i = 0; i < num_; ++i) {
+        if (intervals_[i].start <= curTime.tm_hour && intervals_[i].end > curTime.tm_hour) {
+            return true;
+        }
+    }
+    return false;
+}
+
+DialTimePublisher::TimeChangeListener::TimeChangeListener()
+{
+    if (DialTimePublisher::GetPublisher() != nullptr) {
+        DialTimePublisher::GetPublisher()->Register(this);
+    }
+}
+
+DialTimePublisher::TimeChangeListener::~TimeChangeListener()
+{
+    if (intervals_ != nullptr) {
+        UIFree(intervals_);
+        intervals_ = nullptr;
+    }
+    num_ = 0;
+    if (DialTimePublisher::GetPublisher() != nullptr) {
+        DialTimePublisher::GetPublisher()->Unregister(this);
+    }
+}
+
+void DialTimePublisher::SetPublisher(DialTimePublisher *publisher)
+{
+    publisher_ = publisher;
+}
+
+DialTimePublisher *DialTimePublisher::GetPublisher()
+{
+    return publisher_;
+}
+} // namespace OHOS
\ No newline at end of file
diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialViewContainer.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialViewContainer.cpp
new file mode 100644 (file)
index 0000000..6db0860
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2025. All rights reserved.
+ * Description: DialViewContainer
+ * Author:
+ * Create: 2025-02-06
+ */
+
+#include "DialViewContainer.h"
+#include "DialDigitalImgView.h"
+
+namespace OHOS {
+DialViewContainer::~DialViewContainer()
+{
+    ListNode<SubView>* viewNode = dialViews_.Head();
+    while (viewNode != dialViews_.End()) {
+        UIViewGroup::Remove(viewNode->data_.view);
+        delete viewNode->data_.view;
+        viewNode = viewNode->next_;
+    }
+    dialViews_.Clear();
+}
+
+void DialViewContainer::AddView(UIView* view)
+{
+    if (view == nullptr) {
+        return;
+    }
+    Add(view);
+    SubView info = {
+        .view = view,
+        .dialView = nullptr,
+    };
+    DialViewContainer *container = dynamic_cast<DialViewContainer*>(view);
+    if (container != nullptr && container->HasInvalidBindData()) {
+        hasInvalidBindData_ = true;
+    }
+    dialViews_.PushBack(info);
+}
+
+void DialViewContainer::AddView(DialDataType type, DialView* view, bool isPeriodic)
+{
+    if (view == nullptr) {
+        return;
+    }
+    UIView *uiView = dynamic_cast<UIView*>(view);
+    if (uiView == nullptr) {
+        return;
+    }
+    Add(uiView);
+    DialDigitalImgView *digital = dynamic_cast<DialDigitalImgView*>(view);
+    if (digital != nullptr) {
+        digital->SetParent(this);
+    }
+    SubView info = {
+        .view = uiView,
+        .dialView = view,
+        .type = type,
+        .isPeriodic = isPeriodic
+    };
+    if (type == DialDataType::DATA_TYPE_MAX) {
+        hasInvalidBindData_ = true;
+    }
+    dialViews_.PushBack(info);
+}
+
+bool DialViewContainer::RemoveSubView(uint8_t index, SubView &subView)
+{
+    if (index >= dialViews_.Size()) {
+        return false;
+    }
+    ListNode<SubView> *it = Begin();
+    for (uint8_t i = 0; i < index; ++i) {
+        it = it->next_;
+    }
+    subView = it->data_;
+    Remove(subView.view);
+    DialDigitalImgView *digital = dynamic_cast<DialDigitalImgView*>(subView.view);
+    if (digital != nullptr) {
+        digital->SetParent(nullptr);
+    }
+    dialViews_.Remove(it);
+    return true;
+}
+
+bool DialViewContainer::IsInvalidateBindData(uint8_t index)
+{
+    if (index >= dialViews_.Size()) {
+        return false;
+    }
+    ListNode<SubView> *it = Begin();
+    for (uint8_t i = 0; i < index; ++i) {
+        it = it->next_;
+    }
+    if (it->data_.dialView != nullptr && it->data_.type == DialDataType::DATA_TYPE_MAX) {
+        return true;
+    }
+    DialViewContainer *container = dynamic_cast<DialViewContainer*>(it->data_.view);
+    if (container != nullptr) {
+        return container->HasInvalidBindData();
+    }
+    return false;
+}
+} // namespace OHOS
\ No newline at end of file
index 0ed3e13..a8bd70a 100644 (file)
 #ifdef SUPPORT_OHOSFWK
 #include "ui_screennotify.h"
 #endif
+#include "DialDigitalImgView.h"
 namespace OHOS
 {
-static DialVideoView *g_video = nullptr;
+    static DialVideoView *g_video = nullptr;
 
     static constexpr const char *DISTURBICON = "user/res/dial_state/disturbicon.bin";
     static constexpr const char *MESSAGEICON = "user/res/dial_state/unread.bin";
@@ -46,13 +47,13 @@ static DialVideoView *g_video = nullptr;
         {
             if (g_video->IsPaused())
             {
-              g_video->ResumePlay();
-            //   printf("恢复视频\n");
+                g_video->ResumePlay();
+                //   printf("恢复视频\n");
             }
             else if (!g_video->IsPlayed())
             {
-              g_video->StartPlay();
-            //   printf("开始播放\n");
+                g_video->StartPlay();
+                //   printf("开始播放\n");
             }
         }
     }
@@ -123,16 +124,18 @@ static DialVideoView *g_video = nullptr;
 
         video_ = nullptr;
 
-        if (dialstateicon_ != nullptr) {
-          delete dialstateicon_;
-          dialstateicon_ = nullptr;
+        if (dialstateicon_ != nullptr)
+        {
+            delete dialstateicon_;
+            dialstateicon_ = nullptr;
         }
 
-        if (messageicon_ != nullptr) {
-          delete messageicon_;
-          messageicon_ = nullptr;
+        if (messageicon_ != nullptr)
+        {
+            delete messageicon_;
+            messageicon_ = nullptr;
         }
-        
+
         if (fp_ != nullptr)
         {
             fclose(fp_);
@@ -185,7 +188,7 @@ static DialVideoView *g_video = nullptr;
                 GRAPHIC_LOGE("cannot open file: %s\n", filePath_.c_str());
                 return;
             }
-            DialBinParserManager::GetInstance()->UpdateDial(filePath_, fp_, this,state_); // 添加主表盘卡片内容
+            DialBinParserManager::GetInstance()->UpdateDial(filePath_, fp_, this, state_); // 添加主表盘卡片内容
             // 添加自定义logo,例如勿扰模式
 
             /*增加手表状态图标*/
@@ -213,7 +216,6 @@ static DialVideoView *g_video = nullptr;
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "DialViewGroup::GetElapseTime %d", elapseTime);
     }
 
-
     void DialViewGroup::ProcessData(DialDataType type, DialView *view)
     {
         int16_t value = static_cast<int16_t>(type) >> 14; // 14: bit shift
@@ -240,22 +242,79 @@ static DialVideoView *g_video = nullptr;
         }
     }
 
-    void DialViewGroup::AddView(UIView *view, bool isDialVideoView)
+    void DialViewGroup::DoStop(void)
     {
-        if (view == nullptr)
+        SetLableAnimatorState(Animator::PAUSE);
+        SetImgAnimatorState(Animator::PAUSE);
+        if (video_ != nullptr && !video_->IsStopped())
         {
-            GRAPHIC_LOGE("Parameter is nullptr.\n");
-            return;
+            video_->StopPlay();
         }
-        dialViews_.PushBack(view);
-        Add(view);
+        if (kaleidoscope_ != nullptr)
+        {
+            kaleidoscope_->StopRotateAnimator();
+            kaleidoscope_->ClearFocus();
+        }
+    }
 
-        if (view->GetViewType() == UI_KALEIDOSCOPE_VIEW)
+    void DialViewGroup::DoStart(void)
+    {
+        SetLableAnimatorState(Animator::START);
+        SetImgAnimatorState(Animator::START);
+        if (video_ != nullptr)
         {
-            kaleidoscope_ = dynamic_cast<UIKaleidoscopeView *>(view);
+            if (video_->IsPaused())
+            {
+                video_->ResumePlay();
+            }
+            else if (!video_->IsPlayed())
+            {
+                video_->StartPlay();
+            }
+        }
+        if (kaleidoscope_ != nullptr)
+        {
+            kaleidoscope_->RequestFocus();
+            kaleidoscope_->StartRotateAnimator();
         }
+    }
 
-        if (isDialVideoView)
+    void DialViewGroup::DoPause(void)
+    {
+        SetLableAnimatorState(Animator::PAUSE);
+        SetImgAnimatorState(Animator::PAUSE);
+        if (kaleidoscope_ != nullptr)
+        {
+            kaleidoscope_->StopRotateAnimator();
+            kaleidoscope_->ClearFocus();
+        }
+        if (video_ != nullptr)
+        {
+            video_->PausePlay();
+        }
+    }
+
+    void DialViewGroup::RecordSpecial(UIView *view)
+    {
+        if (dynamic_cast<UILabel *>(view) != nullptr)
+        {
+            UILabel *label = dynamic_cast<UILabel *>(view);
+            uint8_t mode = label->GetLineBreakMode();
+            if (mode == UILabel::LINE_BREAK_MARQUEE || mode == UILabel::LINE_BREAK_OSCILLATION)
+            {
+                rollingLabelList_.PushBack(label);
+            }
+        }
+        else if (dynamic_cast<UIImageAnimatorView *>(view) != nullptr)
+        {
+            UIImageAnimatorView *imgAnim = dynamic_cast<UIImageAnimatorView *>(view);
+            imgAnimList_.PushBack(imgAnim);
+        }
+        else if (dynamic_cast<UIKaleidoscopeView *>(view) != nullptr)
+        {
+            kaleidoscope_ = dynamic_cast<UIKaleidoscopeView *>(view);
+        }
+        else if (dynamic_cast<UILiteSurfaceView *>(view) != nullptr)
         {
             if (video_ != nullptr)
             {
@@ -263,22 +322,43 @@ static DialVideoView *g_video = nullptr;
                 return;
             }
             video_ = reinterpret_cast<DialVideoView *>(view);
-            g_video = video_;
-#ifdef SUPPORT_OHOSFWK
-            registerNotifyScreenStatus(ScreenStatusNotify);
-#endif
+        }
+        else if (dynamic_cast<DialSequenceContainer *>(view) != nullptr)
+        {
+            DialSequenceContainer *seq = dynamic_cast<DialSequenceContainer *>(view);
+            seqList_.PushBack(seq);
         }
     }
 
-    void DialViewGroup::AddView(DialDataType type, DialView *view, bool isPeriodic)
+    void DialViewGroup::RecordBindData(DialDataType type, DialView *view, bool isPeriodic)
     {
-        if (view == nullptr)
+        if (dynamic_cast<UILabel *>(view) != nullptr)
         {
-            GRAPHIC_LOGE("Parameter is nullptr.\n");
-            return;
+            UILabel *label = dynamic_cast<UILabel *>(view);
+            uint8_t mode = label->GetLineBreakMode();
+            if (mode == UILabel::LINE_BREAK_MARQUEE || mode == UILabel::LINE_BREAK_OSCILLATION)
+            {
+                rollingLabelList_.PushBack(label);
+            }
         }
 
-        dataTypeMap_.insert(std::make_pair(static_cast<int16_t>(type), view));
+        auto it = dataTypeMap_.find(static_cast<int16_t>(type));
+        if (it != dataTypeMap_.end())
+        {
+            it->second->PushBack(view);
+        }
+        else
+        {
+            Views *container = new Views;
+            if (container == nullptr)
+            {
+                GRAPHIC_LOGE("failed to alloc binddata container");
+                return;
+            }
+            container->PushBack(view);
+            dataTypeMap_.insert(std::make_pair(static_cast<int16_t>(type), container));
+            viewsMemPool_.PushBack(container);
+        }
         if (isPeriodic)
         {
             periodicUpdateTypes_.PushBack(type);
@@ -288,9 +368,68 @@ static DialVideoView *g_video = nullptr;
             ModelDialDataFactory::GetInstance().RegisterDialDataListener(type, this);
             passiveUpdateTypes_.PushBack(type);
         }
+    }
+
+    void DialViewGroup::ClearViews()
+    {
+        dataTypeMap_.clear();
+        for (uint16_t i = 0; i < viewsMemPool_.Size(); ++i)
+        {
+            delete viewsMemPool_[i];
+        }
+        viewsMemPool_.Clear();
+    }
+
+    void DialViewGroup::AddView(UIView *view)
+    {
+        if (view == nullptr)
+        {
+            GRAPHIC_LOGE("Parameter is nullptr.\n");
+            return;
+        }
+        dialViews_.PushBack(view);
+        Add(view);
+        DialViewContainer *container = dynamic_cast<DialViewContainer *>(view);
+        if (container != nullptr)
+        {
+            ListNode<DialViewContainer::SubView> *head = container->Begin();
+            for (; head != container->End(); head = head->next_)
+            {
+                DialViewContainer::SubView &subView = head->data_;
+                if (subView.dialView != nullptr)
+                {
+                    RecordBindData(subView.type, subView.dialView, subView.isPeriodic);
+                    ProcessData(subView.type, subView.dialView);
+                }
+                else if (subView.view != nullptr)
+                {
+                    RecordSpecial(subView.view);
+                }
+            }
+        }
+        else
+        {
+            RecordSpecial(view);
+        }
+    }
+
+    void DialViewGroup::AddView(DialDataType type, DialView *view, bool isPeriodic)
+    {
+        if (view == nullptr)
+        {
+            GRAPHIC_LOGE("Parameter is nullptr.\n");
+            return;
+        }
+
+        DialDigitalImgView *digital = dynamic_cast<DialDigitalImgView *>(view);
+        if (digital != nullptr)
+        {
+            digital->SetParent(this);
+        }
+        RecordBindData(type, view, isPeriodic);
         dialViews_.PushBack(dynamic_cast<UIView *>(view));
         Add(dynamic_cast<UIView *>(view));
-               ProcessData(type, view);
+        ProcessData(type, view);
     }
 
     void DialViewGroup::SetPeriod(uint32_t period)
@@ -310,14 +449,17 @@ static DialVideoView *g_video = nullptr;
         return period_;
     }
 
-
     void DialViewGroup::OnDialFloatDataUpdate(DialDataType type, float data)
     {
         auto iter = dataTypeMap_.find(static_cast<int16_t>(type));
         if (iter != dataTypeMap_.end())
         {
-            DialView *view = iter->second;
-            view->HandleFloatData(data);
+            Views *container = iter->second;
+            for (uint16_t i = 0; i < container->Size(); ++i)
+            {
+                DialView *view = (*container)[i];
+                view->HandleFloatData(data);
+            }
         }
     }
 
@@ -326,8 +468,12 @@ static DialVideoView *g_video = nullptr;
         auto iter = dataTypeMap_.find(static_cast<int16_t>(type));
         if (iter != dataTypeMap_.end())
         {
-            DialView *view = iter->second;
-            view->HandleFloatData(data, num);
+            Views *container = iter->second;
+            for (uint16_t i = 0; i < container->Size(); ++i)
+            {
+                DialView *view = (*container)[i];
+                view->HandleFloatData(data, num);
+            }
         }
     }
 
@@ -336,8 +482,12 @@ static DialVideoView *g_video = nullptr;
         auto iter = dataTypeMap_.find(static_cast<int16_t>(type));
         if (iter != dataTypeMap_.end())
         {
-            DialView *view = iter->second;
-            view->HandleTextData(data, num);
+            Views *container = iter->second;
+            for (uint16_t i = 0; i < container->Size(); ++i)
+            {
+                DialView *view = (*container)[i];
+                view->HandleTextData(data, num);
+            }
         }
     }
 
@@ -384,15 +534,16 @@ static DialVideoView *g_video = nullptr;
             DialClick dialClick = node->data_;
             if (dialClick.area.IsContains(point))
             {
-              if (dialClick.isSliceType) {
-                //支付宝需要先判断
+                if (dialClick.isSliceType)
+                {
+                    // 支付宝需要先判断
 #ifdef SUPPORT_ALIPAY_SEC
-                // if(dialClick.sliceId == VIEW_MAIN_ALIPAY && Alipay_is_init()==false)
-                // {
-                //     return false;
-                // }
-#endif       
-                NativeAbility::GetInstance().ChangeSlice(dialClick.sliceId);
+                    // if(dialClick.sliceId == VIEW_MAIN_ALIPAY && Alipay_is_init()==false)
+                    // {
+                    //     return false;
+                    // }
+#endif
+                    NativeAbility::GetInstance().ChangeSlice(dialClick.sliceId);
                 }
                 else
                 {
@@ -409,124 +560,206 @@ static DialVideoView *g_video = nullptr;
 
     void DialViewGroup::ScrollBegin(bool isActive)
     {
-        if (kaleidoscope_ != nullptr)
+        if (isActive)
+        {
+            DoPause();
+        }
+    }
+
+    void DialViewGroup::ScrollEnd(bool isActive)
+    {
+        MainPresenterSample *mainPresenter = MainPresenterSample::GetInstance();
+        if ((mainPresenter == nullptr) || (mainPresenter->GetMainPresenterState() != MainPresenterState::RESUME))
         {
-            if (isActive)
+            return;
+        }
+
+        if (isActive)
+        {
+            DoStart();
+        }
+        else
+        {
+            if (video_ != nullptr && !video_->IsStopped())
             {
-                kaleidoscope_->ClearFocus();
-                kaleidoscope_->StopRotateAnimator();
+                video_->StopPlay();
+            }
+            if (video_ != nullptr)
+            {
+                ClearCache();
             }
-            return;
         }
+    }
 
-        if (video_ == nullptr)
+    void DialViewGroup::CoverBegin(bool isCovered)
+    {
+        if (!isCovered)
+        {
+            DoPause();
+        }
+    }
+
+    void DialViewGroup::CoverEnd(bool isCovered)
+    {
+        MainPresenterSample *mainPresenter = MainPresenterSample::GetInstance();
+        if ((mainPresenter == nullptr) || (mainPresenter->GetMainPresenterState() != MainPresenterState::RESUME))
         {
             return;
         }
-        if (video_->IsPlayed())
+
+        if (!isCovered)
         {
-            video_->PausePlay();
+            DoStart();
         }
     }
 
-    void DialViewGroup::ScrollEnd(bool isActive)
+    void DialViewGroup::OnActive(void)
     {
-        if (kaleidoscope_ != nullptr)
+        MainPresenterSample *mainPresenter = MainPresenterSample::GetInstance();
+        if ((mainPresenter == nullptr) || (mainPresenter->GetMainPresenterState() != MainPresenterState::RESUME))
         {
-            if (isActive)
-            {
-                kaleidoscope_->StartRotateAnimator();
-                kaleidoscope_->RequestFocus();
-            }
             return;
         }
 
-        if (video_ == nullptr)
+        DoStart();
+    }
+
+    void DialViewGroup::OnInactive(void)
+    {
+        DoStop();
+    }
+
+    void DialViewGroup::OnCovered(void)
+    {
+        MainPresenterSample *mainPresenter = MainPresenterSample::GetInstance();
+        if ((mainPresenter == nullptr) || (mainPresenter->GetMainPresenterState() != MainPresenterState::RESUME))
         {
             return;
         }
 
-        if (isActive)
+        DoPause();
+    }
+
+    void DialViewGroup::OnUncovered(void)
+    {
+        MainPresenterSample *mainPresenter = MainPresenterSample::GetInstance();
+        if ((mainPresenter == nullptr) || (mainPresenter->GetMainPresenterState() != MainPresenterState::RESUME))
         {
-            if (video_->IsPaused())
-            {
-                video_->ResumePlay();
-            }
-            else if (!video_->IsPlayed())
-            {
-                video_->StartPlay();
-            }
-            g_video = video_;
+            return;
         }
-        else
+
+        DoStart();
+    }
+
+    void DialViewGroup::OnPause()
+    {
+        DoPause();
+    }
+
+    void DialViewGroup::SetLableAnimatorState(uint8_t state)
+    {
+        if (rollingLabelList_.IsEmpty())
         {
-            if (video_->IsPaused() || video_->IsPlayed())
+            return;
+        }
+
+        ListNode<UILabel *> *node = rollingLabelList_.Begin();
+        while (node != rollingLabelList_.End())
+        {
+            if (node->data_ != nullptr)
             {
-                video_->StopPlay();
+                UILabel *label = node->data_;
+                label->SetAnimState(state);
             }
-            ClearCache();
-            g_video = nullptr;
+            node = node->next_;
         }
     }
 
-    void DialViewGroup::CoverBegin(bool isCovered)
+    void DialViewGroup::SetImgAnimatorState(uint8_t state)
     {
-        if (kaleidoscope_ != nullptr)
+        if (imgAnimList_.IsEmpty() && seqList_.IsEmpty())
         {
-            if (!isCovered)
-            {
-                kaleidoscope_->StopRotateAnimator();
-                kaleidoscope_->ClearFocus();
-            }
             return;
         }
 
-        if (video_ == nullptr)
+        ListNode<UIImageAnimatorView *> *node = imgAnimList_.Begin();
+        while (node != imgAnimList_.End())
         {
-            return;
+            if (node->data_ != nullptr)
+            {
+                UIImageAnimatorView *imgAnim = node->data_;
+                switch (state)
+                {
+                case Animator::PAUSE:
+                    imgAnim->Pause();
+                    break;
+                case Animator::START:
+                    imgAnim->Resume();
+                    break;
+                }
+            }
+            node = node->next_;
         }
 
-        if (video_->IsPlayed())
+        ListNode<DialSequenceContainer *> *it = seqList_.Begin();
+        while (it != seqList_.End())
         {
-            video_->PausePlay();
+            if (it->data_ != nullptr)
+            {
+                switch (state)
+                {
+                case Animator::PAUSE:
+                    it->data_->Pause();
+                    break;
+                case Animator::START:
+                    it->data_->Resume();
+                    break;
+                }
+            }
+            it = it->next_;
         }
     }
 
-    void DialViewGroup::CoverEnd(bool isCovered)
+    MediaVideoPlay *DialViewGroup::GetVideoPlay()
     {
-        if (kaleidoscope_ != nullptr)
+        if (video_ != nullptr)
         {
-            if (!isCovered)
-            {
-                kaleidoscope_->RequestFocus();
-                kaleidoscope_->StartRotateAnimator();
-            }
-            return;
+            return video_->GetVideoPlay();
         }
-        if (video_ == nullptr)
+        return nullptr;
+    }
+
+    void DialViewGroup::StopDial()
+    {
+        #if 0
+        if (MainModel::GetInstance().getVideostate() != false)
         {
             return;
         }
-        if (isCovered)
+        MainModel::GetInstance().setVideostate(true);
+        if (video_ != nullptr)
         {
+            if (!video_->IsStopped())
+            {
+                video_->StopPlay();
+            }
             g_video = nullptr;
         }
-        else
+        else if (kaleidoscope_ != nullptr)
         {
-            if (video_->IsPaused())
-            {
-                video_->ResumePlay();
-            }
-            else if (!video_->IsPlayed())
-            {
-                video_->StartPlay();
-            }
-            g_video = video_;
+            kaleidoscope_->StopRotateAnimator();
+            kaleidoscope_->ClearFocus();
         }
+        #endif
     }
-
-    void DialViewGroup::OnActive(void)
+    void DialViewGroup::StartDial()
     {
+        #if 0
+        if (MainModel::GetInstance().getVideostate() != true)
+        {
+            return;
+        }
+        MainModel::GetInstance().setVideostate(false);
         if (video_ != nullptr)
         {
             if (video_->IsPaused())
@@ -544,84 +777,41 @@ static DialVideoView *g_video = nullptr;
             kaleidoscope_->RequestFocus();
             kaleidoscope_->StartRotateAnimator();
         }
+        #endif
     }
-
-    void DialViewGroup::OnInactive(void)
+    
+    // 更新数据
+    void DialViewGroup::UpdateViewsByPeriodicUpdateData()
     {
-        if (video_ != nullptr)
+        ListNode<DialDataType> *node = periodicUpdateTypes_.Head();
+        while (node != periodicUpdateTypes_.End())
         {
-            if (!video_->IsStopped())
+            DialDataType type = node->data_;
+            auto iter = dataTypeMap_.find(static_cast<int16_t>(type));
+            if (iter != dataTypeMap_.end())
             {
-                video_->StopPlay();
+                Views *container = iter->second;
+                for (uint16_t i = 0; i < container->Size(); ++i)
+                {
+                    ProcessData(type, (*container)[i]);
+                }
             }
-            g_video = nullptr;
+            node = node->next_;
         }
-        else if (kaleidoscope_ != nullptr)
+        if (LowPowerManager::GetInstance()->IsLiteSurfaceInRootView())
         {
-            kaleidoscope_->StopRotateAnimator();
-            kaleidoscope_->ClearFocus();
+            Invalidate();
+        }
+        // ota进行视频暂停
+        if (uapi_dev_runtime_get_transmitting_status() == 1 || uapi_dev_runtime_get_restore_factory_status() == 1)
+        {
+            // 暂停视频
+            StopDial();
+        }
+        else
+        {
+            // 获取视频
+            StartDial();
         }
     }
-void DialViewGroup::StopDial() {
-  if (MainModel::GetInstance().getVideostate() != false) {
-    return;
-  }
-  MainModel::GetInstance().setVideostate(true);
-  if (video_ != nullptr) {
-    if (!video_->IsStopped()) {
-      video_->StopPlay();
-    }
-    g_video = nullptr;
-  } else if (kaleidoscope_ != nullptr) {
-    kaleidoscope_->StopRotateAnimator();
-    kaleidoscope_->ClearFocus();
-  }
-}
-void DialViewGroup::StartDial() {
-  if (MainModel::GetInstance().getVideostate() != true) {
-    return;
-  }
-  MainModel::GetInstance().setVideostate(false);
-  if (video_ != nullptr) {
-    if (video_->IsPaused()) {
-      video_->ResumePlay();
-    } else if (!video_->IsPlayed()) {
-      video_->StartPlay();
-    }
-    g_video = video_;
-  } else if (kaleidoscope_ != nullptr) {
-    kaleidoscope_->RequestFocus();
-    kaleidoscope_->StartRotateAnimator();
-  }
-}
-MediaVideoPlay* DialViewGroup::GetVideoPlay()
-{
-    if (video_ != nullptr) {
-        return video_->GetVideoPlay();
-    }
-    return nullptr;
-}
-//更新数据
-void DialViewGroup::UpdateViewsByPeriodicUpdateData() {
-  ListNode<DialDataType> *node = periodicUpdateTypes_.Head();
-  while (node != periodicUpdateTypes_.End()) {
-    DialDataType type = node->data_;
-    auto iter = dataTypeMap_.find(static_cast<int16_t>(type));
-    if (iter != dataTypeMap_.end()) {
-      ProcessData(type, iter->second);
-    }
-    node = node->next_;
-  }
-  if (LowPowerManager::GetInstance()->IsLiteSurfaceInRootView()) {
-    Invalidate();
-  }
-  // ota进行视频暂停
-  if (uapi_dev_runtime_get_transmitting_status() == 1 || uapi_dev_runtime_get_restore_factory_status() == 1 ) {
-    //暂停视频
-    StopDial();
-  } else {
-    //获取视频
-    StartDial();
-  }
-}
 }
\ No newline at end of file
index 88ce467..81c7106 100644 (file)
@@ -13,7 +13,6 @@ bool ModelDialDataFactory::GetDialTextData(DialDataType& type, std::string*& out
     if (model == nullptr) {
         return false;
     }
-    // printf("type %d strNum %d\r\n",type,strNum);
     return model->GetDialTextData(type, out, strNum);
 }
 
@@ -44,6 +43,24 @@ DialBaseModel* ModelDialDataFactory::GetModuleByType(DialDataType& type)
     return iter->second;
 }
 
+bool ModelDialDataFactory::IsOHBindDataExist(DialOHDataType type) const
+{
+    auto it = g_bindDataConverter.find(type);
+    if (it == g_bindDataConverter.end()) {
+        return false;
+    }
+    return IsBindDataExist(it->second);
+}
+
+bool ModelDialDataFactory::IsBindDataExist(DialDataType type) const
+{
+    auto it = models_.find(static_cast<int16_t>(type));
+    if (it != models_.end() && it->second != nullptr) {
+        return true;
+    }
+    return false;
+}
+
 bool ModelDialDataFactory::RegisterDialDataListener(DialDataType type, OnDialDataUpdateListener* listener)
 {
     DialBaseModel* model = GetModuleByType(type);
diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/WatchInterface.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/WatchInterface.cpp
new file mode 100644 (file)
index 0000000..45e6359
--- /dev/null
@@ -0,0 +1,385 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2025. All rights reserved.
+ * Description: WatchInterface
+ * Author:
+ * Create: 2025-03-17
+ */
+
+#include <string>
+#include "dirent.h"
+#include "DialBinParser.h"
+#include "UiConfig.h"
+#include "WatchInterface.h"
+#include "gfx_utils/vector.h"
+#include "common/screen.h"
+#include "MainModel.h"
+#include "MainViewSample.h"
+#include "SetDialModel.h"
+#include "graphic_service.h"
+#include "NativeAbility.h"
+
+using namespace OHOS;
+namespace {
+struct {
+    Graphic::Vector<std::string> fileNames;      // only for 3.0
+    Graphic::Vector<watch_dial_info> watchInfo;  // only for 3.0
+} g_info;
+
+bool GetActiveWatchPath(std::string &path)
+{
+    if (MainModel::GetInstance().GetDialSetting().dialFlag == 1) {
+        path = MainModel::GetInstance().GetDialSetting().dialFullName;
+        return true;
+    }
+    return false;
+}
+
+bool GetPreviewInfo(const std::string &fileName, DialPreviewInfo &preview)
+{
+    const std::string type(".bin");
+    if (!(fileName.length() > type.length() &&
+            fileName.substr(fileName.length() - type.length(), type.length()) == type)) {
+        return false;
+    }
+    memset_s(&preview, sizeof(preview), 0, sizeof(preview));
+    FILE *file = fopen(fileName.c_str(), "rb");
+    bool isSuccess = false;
+    if (file != nullptr) {
+        isSuccess = DialBinParserManager::GetInstance()->GetDialPreviewInfo(file, &preview);
+        fclose(file);
+    }
+    return isSuccess;
+}
+
+bool ConvertPreview2WatchDialInfo(const DialPreviewInfo &preview, watch_dial_info &info)
+{
+    errno_t ret = strcpy_s(reinterpret_cast<char *>(info.watch_protocol_version),
+        sizeof(info.watch_protocol_version),
+        preview.protocolVersion);
+    if (ret != 0) {
+        GRAPHIC_LOGE("failed to copy protocol version.");
+        return false;
+    }
+
+    ret = strcpy_s(reinterpret_cast<char *>(info.watch_version), sizeof(info.watch_version), preview.watchVersion);
+    if (ret != 0) {
+        GRAPHIC_LOGE("failed to copy watch version.");
+        return false;
+    }
+    info.uuid = preview.uuid;
+    return true;
+}
+
+#define APP_DIAL_PATH  "user/dial/"  //为了编译过加的
+
+bool GetAllWatchInfo()
+{
+    g_info.fileNames.Clear();
+    g_info.watchInfo.Clear();
+    struct dirent *direntp = nullptr;
+
+    
+    // ��Ŀ¼
+    DIR *dirp = opendir(APP_DIAL_PATH);
+    bool isSuccess = true;
+    // �����ļ�
+    DialPreviewInfo info;
+    watch_dial_info watchInfo;
+    std::string activePath;
+    bool isActiveExist = GetActiveWatchPath(activePath);
+    if (dirp != nullptr) {
+        while ((direntp = readdir(dirp)) != nullptr) {
+            std::string fileName = std::string(APP_DIAL_PATH) + std::string("/") + std::string(direntp->d_name);
+            isSuccess = GetPreviewInfo(fileName, info);
+            if (!isSuccess) {
+                continue;
+            }
+
+            const std::string lowestVersion("3.0");
+            std::string curVersion(info.protocolVersion);
+            if (curVersion >= lowestVersion) {
+                isSuccess = ConvertPreview2WatchDialInfo(info, watchInfo);
+                if (!isSuccess) {
+                    break;
+                }
+                watchInfo.install_state = true;
+                watchInfo.is_current_watch = isActiveExist ? (activePath == fileName) : false;
+                g_info.fileNames.PushBack(fileName);
+                g_info.watchInfo.PushBack(watchInfo);
+            }
+        }
+    }
+    // �ر�Ŀ¼
+    closedir(dirp);
+    return isSuccess;
+}
+}  // namespace
+
+bool GetAllWatchFaceInfo(watch_dial_info *info, uint8_t *num, uint8_t maxCnt)
+{
+    if (info == nullptr || num == nullptr) {
+        GRAPHIC_LOGE("para error!");
+        return false;
+    }
+    if (!GetAllWatchInfo()) {
+        GRAPHIC_LOGE("failed to get all watch info.");
+        return false;
+    }
+    if (g_info.watchInfo.Size() > maxCnt) {
+        GRAPHIC_LOGE("mem is not enough.");
+        return false;
+    }
+    *num = g_info.watchInfo.Size();
+    if (*num == 0) {
+        return false;
+    }
+    if (memcpy_s(info,
+            g_info.watchInfo.Size() * sizeof(watch_dial_info),
+            &g_info.watchInfo[0],
+            g_info.watchInfo.Size() * sizeof(watch_dial_info)) != 0) {
+        GRAPHIC_LOGE("copy info error!");
+        return false;
+    }
+    return true;
+}
+
+bool GetWatchFaceInfo(uint32_t uuid, watch_dial_info *watch)
+{
+    if (watch == nullptr) {
+        GRAPHIC_LOGE("para error!");
+        return false;
+    }
+    if (!GetAllWatchInfo()) {
+        GRAPHIC_LOGE("failed to get all watch info.");
+        return false;
+    }
+    for (uint16_t i = 0; i < g_info.watchInfo.Size(); ++i) {
+        if (g_info.watchInfo[i].uuid == uuid) {
+            *watch = g_info.watchInfo[i];
+            return true;
+        }
+    }
+    return false;
+}
+
+bool GetWatchCapability(watch_dev_cap_info *capability)
+{
+    if (capability == nullptr) {
+        GRAPHIC_LOGE("para error!");
+        return false;
+    }
+    capability->kaleidoscope = true;
+    capability->effect_3D = false;
+    capability->interaction = true;
+    capability->video = true;
+    capability->video_format = (1 << CODEC_JPEG);
+    return true;
+}
+
+bool GetWatchSystemInfo(watch_sys_info *sysInfo)
+{
+    if (sysInfo == nullptr) {
+        GRAPHIC_LOGE("para error!");
+        return false;
+    }
+    sysInfo->watch_proto_support_cnt = DialBinParserManager::GetInstance()->GetSupportVersionCnt();
+    for (uint8_t i = 0; i < sysInfo->watch_proto_support_cnt; ++i) {
+        std::string version;
+        bool isSuccess = DialBinParserManager::GetInstance()->GetVersionByIndex(i, version);
+        if (!isSuccess) {
+            return false;
+        }
+        errno_t ret =
+            strcpy_s(sysInfo->watch_protocol_verion[i], sizeof(sysInfo->watch_protocol_verion[i]), version.c_str());
+        if (ret != 0) {
+            GRAPHIC_LOGE("get protocal version error!");
+            return false;
+        }
+    }
+    int ret = sprintf_s(sysInfo->resolution,
+        sizeof(sysInfo->resolution),
+        "%u*%u",
+        Screen::GetInstance().GetWidth(),
+        Screen::GetInstance().GetHeight());
+    if (ret == -1) {
+        GRAPHIC_LOGE("get resolution error!");
+        return false;
+    }
+
+    return true;
+}
+
+bool GetCurrentWatchFaceInfo(watch_dial_info *watch)
+{
+    if (watch == nullptr) {
+        GRAPHIC_LOGE("para error!");
+        return false;
+    }
+    std::string activePath;
+    if (!GetActiveWatchPath(activePath)) {
+        return false;
+    }
+
+    DialPreviewInfo preview;
+    if (!GetPreviewInfo(activePath, preview)) {
+        return false;
+    }
+
+    if (std::string(preview.protocolVersion) < std::string("3.0")) {
+        return false;
+    }
+    if (!ConvertPreview2WatchDialInfo(preview, *watch)) {
+        return false;
+    }
+    watch->install_state = true;
+    watch->is_current_watch = true;
+    return true;
+}
+
+bool SetCurrentWatchFace(uint32_t uuid)
+{
+    if (!GetAllWatchInfo()) {
+        GRAPHIC_LOGE("failed to get all watch info.");
+        return false;
+    }
+    watch_dial_info info;
+    uint16_t index = 0;
+    bool isExists = false;
+    for (uint16_t i = 0; i < g_info.watchInfo.Size(); ++i) {
+        if (uuid == g_info.watchInfo[i].uuid) {
+            isExists = true;
+            info = g_info.watchInfo[i];
+            index = i;
+            break;
+        }
+    }
+    if (!isExists) {
+        GRAPHIC_LOGE("uuid does not exist!");
+        return false;
+    }
+    if (info.is_current_watch) {
+        return true;
+    }
+
+    DialSetting setting = MainModel::GetInstance().GetDialSetting();
+    setting.dialFlag = 1;
+    setting.dialFullName = g_info.fileNames[index];
+    GraphicService::GetInstance()->PostGraphicEvent([setting]() {
+        MainModel::GetInstance().GetDialSetting() = setting;
+        #ifdef fd230_650 
+        MainModel::GetInstance().AddDialSetting(setting);
+        #endif
+        if (NativeAbility::GetInstance().GetCurSliceId() == VIEW_MAIN) {
+            #ifdef fd230_650 
+            MainViewSample::GetInstance()->ReloadWatchFace();
+            #endif
+        }
+    });
+
+    return true;
+}
+
+bool UninstallWatch(uint32_t uuid)
+{
+    if (!GetAllWatchInfo()) {
+        GRAPHIC_LOGE("failed to get all watch info.");
+        return false;
+    }
+    watch_dial_info info;
+    uint16_t index = 0;
+    bool isExists = false;
+    for (uint16_t i = 0; i < g_info.watchInfo.Size(); ++i) {
+        if (uuid == g_info.watchInfo[i].uuid) {
+            isExists = true;
+            info = g_info.watchInfo[i];
+            index = i;
+            break;
+        }
+    }
+    if (!isExists) {
+        GRAPHIC_LOGE("uuid does not exist!");
+        return false;
+    }
+
+    if (info.is_current_watch) {
+        DialSetting setting = MainModel::GetInstance().GetDialSetting();
+        setting.dialFlag = 0;
+        setting.dialId = 0;
+        std::string fileName = g_info.fileNames[index];
+        GraphicService::GetInstance()->PostGraphicEvent([setting, fileName]() {
+            MainModel::GetInstance().GetDialSetting() = setting;
+            #ifdef fd230_650 
+            MainModel::GetInstance().AddDialSetting(setting,0);
+            #endif
+            if (NativeAbility::GetInstance().GetCurSliceId() == VIEW_MAIN) {
+                #ifdef fd230_650 
+                MainViewSample::GetInstance()->ReloadWatchFace();
+                #endif
+            }
+            if (remove(fileName.c_str()) != 0) {
+                GRAPHIC_LOGE("failed to remove file %s", fileName.c_str());
+            }
+        });
+    } else {
+        if (remove(g_info.fileNames[index].c_str()) != 0) {
+            GRAPHIC_LOGE("failed to remove file %s", g_info.fileNames[index].c_str());
+            return false;
+        }
+    }
+    return true;
+}
+
+bool InstallWatch(const char *path, uint32_t *uuid)
+{
+    if (path == nullptr || uuid == nullptr) {
+        GRAPHIC_LOGE("para error!");
+        return false;
+    }
+
+    DialPreviewInfo preview;
+    if (!GetPreviewInfo(std::string(path), preview)) {
+        return false;
+    }
+    if (std::string(preview.protocolVersion) < std::string("3.0")) {
+        return false;
+    }
+    *uuid = preview.uuid;
+
+    if (!GetAllWatchInfo()) {
+        GRAPHIC_LOGE("failed to get all watchinfo!");
+        return false;
+    }
+    for (uint16_t i = 0; i < g_info.watchInfo.Size(); ++i) {
+        const std::string &fileName = g_info.fileNames[i];
+        const watch_dial_info &info = g_info.watchInfo[i];
+        if (!(info.uuid == *uuid && std::string(path) != fileName)) {
+            continue;
+        }
+
+        if (info.is_current_watch) {
+            DialSetting setting = MainModel::GetInstance().GetDialSetting();
+            setting.dialFlag = 1;
+            setting.dialFullName = std::string(path);
+            GraphicService::GetInstance()->PostGraphicEvent([setting, fileName]() {
+                MainModel::GetInstance().GetDialSetting() = setting;
+                #ifdef fd230_650 
+                MainModel::GetInstance().AddDialSetting(setting);
+                #endif
+                if (NativeAbility::GetInstance().GetCurSliceId() == VIEW_MAIN) {
+                    #ifdef fd230_650 
+                    MainViewSample::GetInstance()->ReloadWatchFace();
+                    #endif
+                }
+                if (remove(fileName.c_str()) != 0) {
+                    GRAPHIC_LOGE("failed to remove file %s", fileName.c_str());
+                }
+            });
+        } else {
+            if (remove(fileName.c_str()) != 0) {
+                return false;
+            }
+        }
+    }
+
+    return true;
+}
\ No newline at end of file
index 06ef3c5..7e33d90 100644 (file)
@@ -337,6 +337,8 @@ void PlayersModel::NextSong(int16_t index)
         }
     } else if (playerState == PlayerStates::PLAYER_PAUSED || (playerState == PlayerStates::PLAYER_IDLE)) {
         ret = playerCtr->Reset();
+        AudioManager::GetInstance().DeactivateAudioInterrupt(interrupt);
+        ClearActivateAudioInterrupt();
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Reset, ret:%d", ret);
     }
 }
index e6eabbd..5b32738 100644 (file)
@@ -29,6 +29,7 @@
 #include <custom_save_runtime.h>\r
 #include "NativeRegisterManager.h"\r
 \r
+#include "MainViewSample.h"\r
 \r
 \r
 namespace OHOS\r
@@ -119,7 +120,7 @@ bool JumpView::ChangeBluetoothEarPhoneView(int16_t hideView, int16_t thisView)
             return false;\r
         }\r
         container[thisView] = group;\r
-       RootView::GetInstance()->Add(container[thisView]);\r
+       MainViewSample::GetInstance()->GetRootContainer()->Add(container[thisView]);\r
     }\r
     // 动画开始\r
     bluetoothEarPhoneView->BtAnimatorStart();\r
@@ -143,7 +144,7 @@ bool JumpView::ChangeBluetoothEarListView(int16_t hideView, int16_t thisView)
             return false;\r
         }\r
         container[thisView] = group;\r
-       RootView::GetInstance()->Add(container[thisView]);\r
+       MainViewSample::GetInstance()->GetRootContainer()->Add(container[thisView]);\r
     } else {\r
         // 刷新列表\r
         UIList *scanList = bluetoothEarListView->GetScanUIList();\r
@@ -175,7 +176,7 @@ bool JumpView::ChangeBluetoothView(int16_t hideView, int16_t thisView)
             return false;\r
         }\r
         container[thisView] = group;\r
-       RootView::GetInstance()->Add(container[thisView]);\r
+       MainViewSample::GetInstance()->GetRootContainer()->Add(container[thisView]);\r
     }\r
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "JumpView::ChangeBluetoothView");\r
     BluetoothModel::GetInstance()->SetTagConnectView(false);\r
@@ -200,7 +201,7 @@ bool JumpView::ChangeBluetoothOptionsView(int16_t hideView, int16_t thisView)
             return false;\r
         }\r
         container[thisView] = group;\r
-       RootView::GetInstance()->Add(container[thisView]);\r
+       MainViewSample::GetInstance()->GetRootContainer()->Add(container[thisView]);\r
     }\r
     return true;\r
 }\r
@@ -222,7 +223,7 @@ bool JumpView::ChangeBluetoothDeviceListView(int16_t hideView, int16_t thisView)
             return false;\r
         }\r
         container[thisView] = group;\r
-       RootView::GetInstance()->Add(container[thisView]);\r
+       MainViewSample::GetInstance()->GetRootContainer()->Add(container[thisView]);\r
     } else {\r
         // 刷新列表\r
         UIList *deviceList = bluetoothDeviceListView->GetDeviceUIList();\r
@@ -259,7 +260,7 @@ bool JumpView::ChangeBluetoothReconnectView(int16_t hideView, int16_t thisView)
             return false;\r
         }\r
         container[thisView] = group;\r
-       RootView::GetInstance()->Add(container[thisView]);\r
+       MainViewSample::GetInstance()->GetRootContainer()->Add(container[thisView]);\r
     }\r
     BluetoothModel::GetInstance()->SetTagDisconnectView(true);\r
     BluetoothReconnectView::GetInstance()->RefreshBluetoothNameLabel();\r
@@ -281,7 +282,7 @@ void JumpView::ResetEarListView(int16_t hideView)
     } else if (hideView == TIPSCONNFAILMESSAGEVIEW) {\r
         bluetoothEarListView->SetTitleLabel("扫描完成");\r
         bluetoothEarListView->SetNewEquipmentButtonAdd();\r
-       RootView::GetInstance()->Invalidate();\r
+       MainViewSample::GetInstance()->GetRootContainer()->Invalidate();\r
     }\r
 }\r
 \r
@@ -302,7 +303,7 @@ bool JumpView::ChangeTipsSuccMessageView(int16_t hideView, int16_t thisView)
             return false;\r
         }\r
         container[thisView] = group;\r
-       RootView::GetInstance()->Add(container[thisView]);\r
+       MainViewSample::GetInstance()->GetRootContainer()->Add(container[thisView]);\r
     }\r
     return true;\r
 }\r
@@ -324,7 +325,7 @@ bool JumpView::ChangeTipsConnFailMessageView(int16_t hideView, int16_t thisView)
             return false;\r
         }\r
         container[thisView] = group;\r
-       RootView::GetInstance()->Add(container[thisView]);\r
+       MainViewSample::GetInstance()->GetRootContainer()->Add(container[thisView]);\r
     }\r
     BluetoothReconnectView *bluetoothReconnectView = BluetoothReconnectView::GetInstance();\r
     if (bluetoothReconnectView == nullptr) {\r
@@ -353,7 +354,7 @@ bool JumpView::ChangeTipsFailMessageView(int16_t hideView, int16_t thisView)
             return false;\r
         }\r
         container[thisView] = group;\r
-       RootView::GetInstance()->Add(container[thisView]);\r
+       MainViewSample::GetInstance()->GetRootContainer()->Add(container[thisView]);\r
     }\r
     return true;\r
 }\r
@@ -400,7 +401,7 @@ void JumpView::ChangeView(int16_t hideView, int16_t showView)
     }\r
     container[showView]->SetVisible(true);\r
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "JumpView:: ChangeView end!!!%d", showView);\r
-   RootView::GetInstance()->Invalidate();\r
+   MainViewSample::GetInstance()->GetRootContainer()->Invalidate();\r
     BluetoothModel::GetInstance()->SetCurView(showView);\r
 }\r
 \r
@@ -1057,7 +1058,7 @@ static void Pause(void)
 \r
 void PlayerInterruptListener::PausePlayer(void)\r
 {\r
-    PlayerPostGraphicEvent(Pause);\r
+    Pause();\r
 }\r
 \r
 static void Resume(void)\r
@@ -1101,15 +1102,13 @@ static void Resume(void)
 void PlayerInterruptListener::ResumePlayer(void)\r
 {\r
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[PlayerInterruptListener::ResumePlayer] start");\r
-    usleep(50000); // 确保界面切换完成\r
+    usleep(500000); // 确保界面切换完成\r
     if (NativeAbility::GetInstance().GetCurSliceId() == VIEW_INCOMING_CALL ||\r
         (GetCurrCallState() != HFP_HF_CALL_STATE_FINISHED && GetScoConnectState() == HFP_SCO_STATE_CONNECTED)) {\r
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[PlayerInterruptListener::ResumePlayer] this is in calling");\r
         return; // 通话界面,禁止音乐恢复播放\r
     }\r
-    AudioRelease(); // 适配某些机型不触发SCO\r
-\r
-    PlayerPostGraphicEvent(Resume);\r
+    Resume();\r
 }\r
 \r
 static void Stop(void)\r
@@ -1464,7 +1463,7 @@ void PlayersPresenter::OnClickCancelConnedRequestButton(void)
     pbItermView->ConnectAnimatorStop();\r
     BluetoothModel::GetInstance()->SetConnectionView(nullptr);\r
     bluetoothEarListView->SetNewEquipmentButtonAdd();\r
-   RootView::GetInstance()->Invalidate();\r
+   MainViewSample::GetInstance()->GetRootContainer()->Invalidate();\r
     return;\r
 }\r
 \r
index 124bf11..7b1691b 100644 (file)
@@ -15,3 +15,4 @@ if("CONFIG_SEA_PHS_SUPPORT" IN_LIST DEFINES)
     add_subdirectory_if_exist(smart_voice)
 endif()
 add_subdirectory_if_exist(power_manager)
+add_subdirectory_if_exist(dial_market)
index 9222861..8c6efbe 100644 (file)
@@ -8,7 +8,6 @@
 #include "bundle_install_msg.h"
 #include "bundlems_slite_client.h"
 #include "appexecfwk_errors.h"
-#include "sign_mode.h"
 #include "ui_service.h"
 
 void AppStoreReplyAck(uint8_t cmd_id, uint8_t type, uint32_t ack)
@@ -40,13 +39,10 @@ static void SendMsgToAppStore(CallbackStatus status, const uint8_t resultCode, c
             SendMsgToUIService(JS_UNINSTALL_SUCESS_TO_UI, 0, &bundleData, sizeof(BundleData));
             report.operationResult = UNINSTALL_OK;
         }
-        OHOS::SignMode::GetInstance().SetSignMode(true);
     } else if (resultCode ==  ERR_APPEXECFWK_INSTALL_FAILED_EXCEED_MAX_BUNDLE_NUMBER) {
         report.operationResult = INSTALL_OVER_LIMIT;
-        OHOS::SignMode::GetInstance().SetSignMode(true);
     } else {
         report.operationResult = (status == INSTALL_CALLBACK) ? INSTALL_FAILED : UNINSTALL_FAILED;
-        OHOS::SignMode::GetInstance().SetSignMode(true);
     }
     AdapterFree(installMsg);
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_MSG_CENTER, "SendMsgToAppStore operationResult = %u", report.operationResult);
@@ -79,7 +75,6 @@ errcode_t AppStorePkgOperation(uint8_t cmd_id, uint8_t type, void *usr_data, uin
             if (pkgFullName != nullptr) {
                 (void)sprintf_s(pkgFullName, len, "%s%s", FS_DIR_APP_STORE, (char *)operInfo->pkgName);
                 WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "AppStorePkgOperation install pkgFullName=%s", pkgFullName);
-                OHOS::SignMode::GetInstance().SetSignMode(false);
                 InstallParam installParam = { .installLocation = 1, .keepData = false };
                 ret = OHOS::BundleMsClient::GetInstance().Install(pkgFullName, &installParam, InstallCallbackFunc);
                 free(pkgFullName);
@@ -87,7 +82,6 @@ errcode_t AppStorePkgOperation(uint8_t cmd_id, uint8_t type, void *usr_data, uin
         } else if (operInfo->operationType == PKG_OPERATION_TYPE_UNINSTALL) {
                 StopJsApp((char*)operInfo->pkgName);
                 WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "AppStorePkgOperation uninstall pkgName=%s", operInfo->pkgName);
-                OHOS::SignMode::GetInstance().SetSignMode(false);
                 InstallParam installParam = { .installLocation = 1, .keepData = false };
                 ret = OHOS::BundleMsClient::GetInstance().Uninstall((char*)operInfo->pkgName, &installParam, UninstallCallbackFunc);
         }
@@ -119,6 +113,7 @@ errcode_t AppStoreGetPkgList(uint8_t cmd_id, uint8_t type, void *usr_data, uint1
             (void)strncpy_s((char*)unitInfo[i].pkgName, PKG_NAME_MAX_LENGTH,
                             bundleInfos[i].bundleName, strlen(bundleInfos[i].bundleName));
             WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AppStoreGetPkgList pkgName[%d] = %s", i, unitInfo[i].pkgName);
+            unitInfo[i].versionCode = bundleInfos[i].versionCode;
         }
         ret = msg_center_send_data(MSGCENTER_CMD_APP_STORE, type, infoList, len);
         free(infoList);
index e5b28b3..7bbc93b 100644 (file)
@@ -59,6 +59,7 @@ typedef struct {
 
 typedef struct {
     uint8_t pkgName[PKG_NAME_MAX_LENGTH];
+    int32_t versionCode;
 } PkgUnitInfo;
 
 errcode_t AppStorePkgOperation(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
diff --git a/code/sdk/application/wearable/fd230/service/dial_market/CMakeLists.txt b/code/sdk/application/wearable/fd230/service/dial_market/CMakeLists.txt
new file mode 100644 (file)
index 0000000..058f8dc
--- /dev/null
@@ -0,0 +1,43 @@
+set(COMPONENT_NAME "dial_market")
+
+set(PUBLIC_HEADER
+    ${CMAKE_CURRENT_SOURCE_DIR}/
+)
+
+set(PRIVATE_HEADER
+    ${CMAKE_CURRENT_SOURCE_DIR}/../../ohos_deps
+    ${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/innerkits
+    ${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/kits
+    ${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/kits/gfx_utils
+    ${ROOT_DIR}/open_source/openharmony/base/startup/syspara_lite/include
+    ${ROOT_DIR}/open_source/openharmony/drivers/peripheral/format/interfaces/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/main/include/dial
+)
+
+set(SOURCES
+    ${CMAKE_CURRENT_SOURCE_DIR}/dial_market_msg.cpp
+    ${CMAKE_CURRENT_SOURCE_DIR}/dial_market.cpp
+)
+
+set(COMPONENT_PUBLIC_CCFLAGS
+)
+
+set(COMPONENT_CCFLAGS
+    -std=c++11
+)
+
+set(WHOLE_LINK
+    true
+)
+
+set(PUBLIC_DEFINES
+)
+
+set(PRIVATE_DEFINES
+    APP_PLATFORM_WATCHGT
+    CONFIG_ACELITE_ENABLE
+)
+
+build_component()
+
+
diff --git a/code/sdk/application/wearable/fd230/service/dial_market/dial_market.h b/code/sdk/application/wearable/fd230/service/dial_market/dial_market.h
new file mode 100644 (file)
index 0000000..6110188
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: broadcast service api
+ * Author: CompanyName
+ * Create: 2021-11-11
+ */
+
+#ifndef DIAL_MARKET_H
+#define DIAL_MARKET_H
+
+#include "msg_center_protocol.h"
+
+#ifdef __cplusplus
+#if __cplusplus
+extern "C" {
+#endif
+#endif
+
+#define MAX_CHIP_PLAT_LEN 5
+#define MAX_CHIP_MODEL_LEN 5
+#define MAX_OS_LEN 23
+#define MAX_API_LEVEL_LEN 3
+#define MAX_WATCH_PROTO_VER_LEN 4
+#define MAX_WATCH_INTERNAL_VER 6
+#define MAX_RESOLUTION_LEN 8
+#define MAX_SUPPORT_PROTOCOL 8
+#define MAX_WATCH_CNT 64
+
+typedef enum msg_center_dial_market_type_id {
+    MSGCENTER_TYPE_ID_DM_GET_SYS_INFO       = 0x1,
+    MSGCENTER_TYPE_ID_DM_GET_DEV_CAP        = 0x2,
+    MSGCENTER_TYPE_ID_DM_GET_ONE_WATCH_INFO = 0x3,
+    MSGCENTER_TYPE_ID_DM_INSTALL_WATCH      = 0x4,
+    MSGCENTER_TYPE_ID_DM_UNINSTALL_WATCH    = 0x5,
+    MSGCENTER_TYPE_ID_DM_SET_WATCH          = 0x6,
+    MSGCENTER_TYPE_ID_DM_GET_ALL_WATCH_INFO = 0x7,
+    MSGCENTER_TYPE_ID_DM_GET_CUR_WATCH_INFO = 0x8,
+} msg_center_dial_market_type_id_t;
+
+typedef struct {
+    char chip_platform[MAX_CHIP_PLAT_LEN];
+    char chip_model[MAX_CHIP_MODEL_LEN];
+    char os_version[MAX_OS_LEN];
+    char api_level[MAX_API_LEVEL_LEN];
+    uint8_t watch_proto_support_cnt;
+    char watch_protocol_verion[MAX_SUPPORT_PROTOCOL][MAX_WATCH_PROTO_VER_LEN];
+    char resolution[MAX_RESOLUTION_LEN];
+} watch_sys_info;
+
+typedef struct {
+    uint8_t kaleidoscope;
+    uint8_t effect_3D;
+    uint8_t interaction;
+    uint8_t video;
+    uint16_t video_format; /* 按照CodecFormat做位映射形成能力集 */
+} watch_dev_cap_info;
+
+typedef struct {
+    uint32_t uuid;
+    uint8_t install_state;
+    uint8_t is_current_watch;
+    uint8_t watch_protocol_version[MAX_WATCH_PROTO_VER_LEN];
+    uint8_t watch_version[MAX_WATCH_INTERNAL_VER];
+} watch_dial_info;
+
+errcode_t msg_center_dial_market_get_sys_info(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_dial_market_get_dev_cap(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_dial_market_get_one_watch_info(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_dial_market_install_watch(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_dial_market_uninstall_watch(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_dial_market_set_watch(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_dial_market_get_all_watch_info(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_dial_market_get_cur_watch_info(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+
+#ifdef __cplusplus
+#if __cplusplus
+}
+#endif
+#endif
+#endif /* DIAL_MARKET_H */
index 360c837..1a21912 100644 (file)
@@ -21,24 +21,10 @@ set(PRIVATE_HEADER
     ${ROOT_DIR}/application/wearable/service/xiaodu_navi_vector
     ${ROOT_DIR}/application/wearable/service/xiaodu_navi_vector/libs
     ${ROOT_DIR}/application/wearable/service/msg_center/src/notify/ketinput/include
-    ${ROOT_DIR}/application/wearable/nativeapp/nativelauncher/include
-    ${ROOT_DIR}/application/wearable/nativeabilityfwk/include
-    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/alarm/include
-    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/key/include
-    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/alarmclockmanage/include
-    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/alarmclocktimerconfig/include
-    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/main/include
-    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/callerlog/include
-    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/phoneservice/include
-    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/makephone/include
-    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/player/include
-    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/applist/include
-    ${ROOT_DIR}/open_source/openharmony/foundation/multimedia/player/interfaces/kits
 )
 
 set(SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/src/msg_center.cpp
-    ${CMAKE_CURRENT_SOURCE_DIR}/src/notify/ketinput/src/NotifyOnKeyListener.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/notify/notification_manager.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/msg_center_protocol.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/client/msg_center_client.cpp
@@ -134,6 +120,20 @@ set(PRIVATE_HEADER
     ${ROOT_DIR}/include/middleware/services/bts/common
     ${ROOT_DIR}/application/auto_ota
     ${ROOT_DIR}/application/wearable/service/xiaodu_navi_vector
+    ${ROOT_DIR}/application/wearable/service/msg_center/src/notify/ketinput/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativelauncher/include
+    ${ROOT_DIR}/application/wearable/nativeabilityfwk/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/alarm/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/key/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/alarmclockmanage/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/alarmclocktimerconfig/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/main/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/callerlog/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/phoneservice/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/makephone/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/player/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/applist/include
+    ${ROOT_DIR}/open_source/openharmony/foundation/multimedia/player/interfaces/kits
 )
 
 if("JS_ENABLE" IN_LIST DEFINES)
@@ -144,6 +144,7 @@ set(SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/src/notify/makephone_notification.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/common/msg_center_common.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/common/msg_center_utils.cpp
+    ${CMAKE_CURRENT_SOURCE_DIR}/src/notify/ketinput/src/NotifyOnKeyListener.cpp
 )
 else()
 set(SOURCES
@@ -152,6 +153,7 @@ set(SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/src/msg_center_self_cmd.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/notify/alarm_notification.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/notify/makephone_notification.cpp
+    ${CMAKE_CURRENT_SOURCE_DIR}/src/notify/ketinput/src/NotifyOnKeyListener.cpp
 )
 endif()
 
index f08ef65..f6ea17c 100644 (file)
Binary files a/code/sdk/application/wearable/fd230/service/msg_center/brandy-auto-ota-cli/libmsg_center.a and b/code/sdk/application/wearable/fd230/service/msg_center/brandy-auto-ota-cli/libmsg_center.a differ
index 41ad2ab..c7c253e 100644 (file)
Binary files a/code/sdk/application/wearable/fd230/service/msg_center/brandy-auto-ota-ser/libmsg_center.a and b/code/sdk/application/wearable/fd230/service/msg_center/brandy-auto-ota-ser/libmsg_center.a differ
index 0b1a260..0e24be7 100644 (file)
Binary files a/code/sdk/application/wearable/fd230/service/msg_center/brandy-native-js-fd230/libmsg_center.a and b/code/sdk/application/wearable/fd230/service/msg_center/brandy-native-js-fd230/libmsg_center.a differ
index 0b1a260..0e24be7 100644 (file)
Binary files a/code/sdk/application/wearable/fd230/service/msg_center/brandy-native-js-xts/libmsg_center.a and b/code/sdk/application/wearable/fd230/service/msg_center/brandy-native-js-xts/libmsg_center.a differ
index 0b1a260..0e24be7 100644 (file)
Binary files a/code/sdk/application/wearable/fd230/service/msg_center/brandy-native-js/libmsg_center.a and b/code/sdk/application/wearable/fd230/service/msg_center/brandy-native-js/libmsg_center.a differ
index 9987892..c686df5 100644 (file)
Binary files a/code/sdk/application/wearable/fd230/service/msg_center/brandy-xts/libmsg_center.a and b/code/sdk/application/wearable/fd230/service/msg_center/brandy-xts/libmsg_center.a differ
index 41578ba..79cb07f 100644 (file)
@@ -23,6 +23,7 @@ extern "C" {
 void StartJsApp(char *bundleName);\r
 void StopJsApp(char *bundleName);\r
 void MsgCenterReportBtStatusToJS(uint16_t msgId);\r
+bool MsgCenterNotifyProc(const Topic topic, Request* req);\r
 #endif\r
 \r
 #ifdef __cplusplus\r
index 93961d3..02cf29c 100644 (file)
@@ -61,6 +61,7 @@ typedef enum msg_center_cmd_id {
     MSGCENTER_CMD_PING               = 0x7,\r
     MSGCENTER_CMD_WATCH_CONNECT      = 0x8,\r
     MSGCENTER_CMD_APP_STORE          = 0x9,\r
+    MSGCENTER_CMD_DIAL_MARKET        = 0xa,\r
     MSGCENTER_CMD_MAX\r
 } msg_center_cmd_id_t;\r
 \r
diff --git a/code/sdk/application/wearable/fd230/service/msg_center/src/notify/ketinput/include/NotifyOnKeyListener.h b/code/sdk/application/wearable/fd230/service/msg_center/src/notify/ketinput/include/NotifyOnKeyListener.h
new file mode 100644 (file)
index 0000000..fd6b6bf
--- /dev/null
@@ -0,0 +1,34 @@
+/*\r
+ * Copyright (c) CompanyNameMagicTag 2024-2024. All rights reserved.\r
+ * Description: NotifyOnKeyListener.h\r
+ * Author: g30037431\r
+ * Create: 2024-12-12\r
+ */\r
+\r
+#ifndef KEY_NOTIFY_INPUT_LISTENER_H\r
+#define KEY_NOTIFY_INPUT_LISTENER_H\r
+\r
+#include "components/root_view.h"\r
+#include "events/key_event.h"\r
+#include "ohos_types.h"\r
+\r
+namespace OHOS {\r
+class NotifyOnKeyListener : public RootView::OnKeyActListener {\r
+public:\r
+    static NotifyOnKeyListener* GetInstance();\r
+    bool OnKeyAct(UIView& view, const KeyEvent& event) override;\r
+\r
+private:\r
+    NotifyOnKeyListener() {}\r
+    ~NotifyOnKeyListener() {}\r
+    void OnKeyPress(void);\r
+    void OnKeyLongPress(const KeyEvent& event);\r
+    void OnKeyRelease(const KeyEvent& event);\r
+    void CallVolumeDipSwitchControl(uint8_t status);\r
+    void PlayerVolumeDipSwitchControl(uint8_t status);\r
+private:\r
+    int32 pressFlag{0};\r
+    int32 longPressFlag{0};\r
+};\r
+}\r
+#endif // KEY_NOTIFY_INPUT_LISTENER_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/fd230/service/msg_center/src/notify/ketinput/src/NotifyOnKeyListener.cpp b/code/sdk/application/wearable/fd230/service/msg_center/src/notify/ketinput/src/NotifyOnKeyListener.cpp
new file mode 100644 (file)
index 0000000..bfcc29b
--- /dev/null
@@ -0,0 +1,139 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2024-2024. All rights reserved.
+ * Description: NotifyOnKeyListener.cpp
+ * Author:g30037431
+ * Create: 2024-12-14
+ */
+
+#include "NotifyOnKeyListener.h"
+#include "common/key_code.h"
+#include "AppViewIDs.h"
+#include "View.h"
+#include "KeyInputListener.h"
+#include "VolumeSettingView.h"
+#include "VolumeSettingPresenter.h"
+#include "VolumeSettingView.h"
+#include "wearable_log.h"
+#include "UiConfig.h"
+#include "dock/input_device.h"
+#include "notification_manager.h"
+#include "AlarmPopUpPresenter.h"
+#include "CallerLogModel.h"
+#include "MainCallingPresenter.h"
+#include "ApplistModel.h"
+namespace OHOS {
+static bool IsNotifyCallStatus()
+{
+    uint16_t notifyId = NotificationManager::GetInstance()->GetShowingNotifyId();
+    if (NotificationManager::GetInstance()->HasNotifyShowing() &&
+        (notifyId == TOPIC_EVENT_HFP_WATCH_ACTIVE || notifyId == TOPIC_EVENT_HFP_PHONE_TO_WATCH)) {
+        return true;
+    } else {
+        return false;
+    }
+}
+
+static void PressAlarmNotify()
+{
+    AlarmClockModel::GetInstance()->AlarmGetClockNum();
+    AlarmPopUpPresenter::GetInstance()->DelayAlarmRing();
+    NotificationManager::GetInstance()->StopNotify();
+}
+
+NotifyOnKeyListener *NotifyOnKeyListener::GetInstance()
+{
+    static NotifyOnKeyListener instance;
+    return &instance;
+}
+
+void NotifyOnKeyListener::OnKeyPress(void)
+{
+    pressFlag = 1;  // Short press the logo
+    return;
+}
+
+void NotifyOnKeyListener::OnKeyLongPress(const KeyEvent &event)
+{
+    longPressFlag = 1;  // Long press the logo
+
+    uint16 keyID = event.GetKeyId();
+    if (keyID == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_POWER)) { // Power button
+        NativeAbility::GetInstance().ChangeSlice(VIEW_REBOOT); // Switch to shutdown/restart card
+    } else if (keyID == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_FUNC)) {  // Function buttons
+        // Switch to View System Version Card
+    }
+    return;
+}
+
+void NotifyOnKeyListener::CallVolumeDipSwitchControl(uint8_t status)
+{
+    VolumeSliderEventListener *volumeSliderEventListener = nullptr;
+    if (NotificationManager::GetInstance()->GetVolumeScreenStatus()) {
+        VolumeSettingView *settingView = GetvolumeSetting();
+        if (settingView == nullptr) {
+            return;
+        }
+        volumeSliderEventListener = settingView->GetVolumeEventListener();
+        if (volumeSliderEventListener == nullptr) {
+            return;
+        }
+        volumeSliderEventListener->ChangeVolume(static_cast<VolumeChangeStatus>(status));
+    } else {
+        HonrsViewChange();
+        NotificationManager::GetInstance()->SetVolumeScreenStatus(true);
+    }
+    return;
+}
+
+void NotifyOnKeyListener::OnKeyRelease(const KeyEvent &event)
+{
+    uint16_t currentViewId = NativeAbility::GetInstance().GetCurSliceId();
+    uint16 keyID = event.GetKeyId();
+    uint16_t notifyId = NotificationManager::GetInstance()->GetShowingNotifyId();
+    if (keyID == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_POWER)) {  // Power button
+        if (longPressFlag == 0 && pressFlag == 1 &&
+            NotificationManager::GetInstance()->HasNotifyShowing()) {        // Short press the power button
+            if (NotificationManager::GetInstance()->GetWatchCallStatus()) {  // Call notify
+                CallVolumeDipSwitchControl(VOLUMEUP); // Volume+
+            } else if (notifyId == TOPIC_EVENT_ALARM_RING) {  // Main dial
+                PressAlarmNotify();  // When currently on the alarm notification page, process the alarm first before switching pages
+            }
+        }
+    } else if (keyID == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_FUNC)) {  // Function buttons
+        if (longPressFlag == 0 && pressFlag == 1) {                             // Short press the function key
+            if (NotificationManager::GetInstance()->GetWatchCallStatus()) {     // Volume card
+                CallVolumeDipSwitchControl(VOLUMEDOWN);  // Volume-
+            } else {
+                // Switch to user configured shortcut card
+            }
+        }
+    }
+
+    pressFlag = 0;
+    longPressFlag = 0;
+    return;
+}
+
+bool NotifyOnKeyListener::OnKeyAct(UIView &view, const KeyEvent &event)
+{
+    UNUSED(view);
+    uint8 state = event.GetState();
+
+    switch (state) {
+        case InputDevice::STATE_PRESS:  // Short press
+            OnKeyPress();
+            break;
+#ifdef __LITEOS_M__
+        case InputDevice::STATE_LONG_PRESS:  // Long press
+            OnKeyLongPress(event);
+            break;
+#endif
+        case InputDevice::STATE_RELEASE:  // Release
+            OnKeyRelease(event);
+            break;
+        default:
+            break;
+    }
+    return true;
+}
+}  // namespace OHOS
index 976e3c5..6f45b72 100644 (file)
@@ -16,7 +16,6 @@
 #include "soc_dpu_type.h"\r
 #include "soc_mipi_tx.h"\r
 #include "pmu_ldo.h"\r
-#include "soc_gmmu_api.h"\r
 #include "pm_lp_stub.h"\r
 #include "hal_pmu_ldo.h"\r
 #include "cmsis_os2.h"\r
@@ -151,13 +150,6 @@ static uint32_t action_display_lcd_on()
             POWER_DISPLAY_PRINT_ERR(0, "drv vau resume error ret=%x\r\n", ret);\r
             return ERRCODE_FAIL;\r
         }\r
-#ifdef SUPPORT_GPU_GMMU\r
-        ret = drv_gmmu_resume(NULL);\r
-        if (ret != 0) {\r
-            POWER_DISPLAY_PRINT_ERR(0, "drv gmmu resume error ret=%x\r\n", ret);\r
-            return ERRCODE_FAIL;\r
-        }\r
-#endif\r
         ret = uapi_lcd_init();\r
         if (ret != 0 && ret != EXT_ERR_MIPI_ALREADY_INIT) {\r
             POWER_DISPLAY_PRINT_ERR(0, "LCD init error ret=%x\r\n", ret);\r
@@ -215,13 +207,7 @@ static uint32_t action_display_lcd_off()
         POWER_DISPLAY_PRINT_ERR(0, "drv dpu suspend error ret=%x\r\n", ret);\r
     }\r
 #endif\r
-#ifdef SUPPORT_GPU_GMMU\r
-    ret = drv_gmmu_suspend(NULL);\r
-    if (ret != 0) {\r
-        POWER_DISPLAY_PRINT_ERR(0, "drv gmmu suspend error ret=%x\r\n", ret);\r
-        return ERRCODE_FAIL;\r
-    }\r
-#endif\r
+\r
     ret = uapi_lcd_deinit();\r
     if (ret != 0) {\r
         POWER_DISPLAY_PRINT_ERR(0, "lcd deinit error ret=%x\r\n", ret);\r
@@ -291,6 +277,7 @@ int32_t action_display_execute_entry(uint16_t action_bitmap, uint16_t new_state,
         }\r
         POWER_DISPLAY_PRINT_DEBUG(0, "turn off success.");\r
     }\r
+    sc->press_state = false;\r
     sc->current_state = new_state;\r
 \r
     return ret;\r
index ac4f7ff..6ca6ae7 100644 (file)
@@ -79,7 +79,8 @@ static errcode_t pcm_stream_task_body(void *data)
     for (;;) {\r
         osStatus_t ret = osMessageQueueGet(g_pcm_stream_msg_queue_id, &msg, nullptr, osWaitForever);\r
         if (ret != osOK) {\r
-            continue;\r
+            msg.msg_id = MSGCENTER_TYPE_ID_XIAODU_END_RECORD;\r
+            msg.data = nullptr;\r
         }\r
         if (msg.msg_id == MSGCENTER_TYPE_ID_XIAODU_SEND_PCM_STREAM) {\r
             res = msg_center_xiaodu_send_pcm_stream(MSGCENTER_CMD_XIAODU, MSGCENTER_TYPE_ID_XIAODU_SEND_PCM_STREAM,\r
index 84c02f0..55d7365 100644 (file)
Binary files a/code/sdk/application/wearable/fd230/xts/nativeapp/brandy-native-js-xts/libuikit_fwk.a and b/code/sdk/application/wearable/fd230/xts/nativeapp/brandy-native-js-xts/libuikit_fwk.a differ
index 0b1a260..0e24be7 100644 (file)
Binary files a/code/sdk/application/wearable/fd230/xts/service/msg_center/brandy-native-js-xts/libmsg_center.a and b/code/sdk/application/wearable/fd230/xts/service/msg_center/brandy-native-js-xts/libmsg_center.a differ
index ca6c647..39e6954 100644 (file)
@@ -29,7 +29,10 @@ public:
         if (parent != nullptr) {
             parent->Remove(this);
         }
-        ImageCacheFree(*const_cast<ImageInfo *>(GetImageInfo()));
+        const ImageInfo* info = GetImageInfo();
+        if (info != nullptr) {
+            ImageCacheFree(*const_cast<ImageInfo*>(info));
+        }
     }
 };
 
@@ -80,7 +83,6 @@ public:
     void SyncStopAnimator();
     void AsyncStopAnimator();
     void EndTransition(bool success);
-    void SetRunDirectlyTransition(TransitionCaller caller, TransitionTarget target);
     bool IsCurrentSnapshotEnabled()
     {
         return isCurrentSnapShotEnabled_;
index 9b5ed1d..8be4e97 100644 (file)
@@ -116,7 +116,7 @@ void Ability::ChangeSlice(const uint16_t targetSliceId, TransitionType type,
 #ifdef JS_ENABLE
     ElementName *elementName = OHOS::AbilityMsClient::GetInstance().GetTopAbility();
     if (elementName != nullptr && strcmp(elementName->bundleName, "com.huawei.launcher") != 0) {
-        OHOS::AbilityMsClient::GetInstance().ForceStop(elementName->bundleName, TransitionType::TRANSITION_ZOOM);
+        OHOS::AbilityMsClient::GetInstance().ForceStop(elementName->bundleName, type);
         targetSliceIdFromJS_ = targetSliceId;
         FreeElement(elementName);
         return;
index d84ffc8..852d5a3 100644 (file)
@@ -2,6 +2,7 @@ set(COMPONENT_NAME "nativelauncher")
 set(MODULE_NAME "app")
 set(AUTO_DEF_FILE_ID TRUE)
 set(NativeApp ${CMAKE_CURRENT_SOURCE_DIR})
+set(UIKIT_ROOT_DIR ${ROOT_DIR}/middleware/services/gui/uikit)
 set(UI_SAMPLE_ROOT ${ROOT_DIR}/middleware/services/gui/uikit/sample/uitest)
 
 set(PUBLIC_HEADER
@@ -52,6 +53,8 @@ set(PRIVATE_HEADER
     ${NativeApp}/nativeui/alipay/include/AlipayTrans
     ${NativeApp}/nativeui/restoredefaults/include
 
+    ${NativeApp}/nativeui/videocard/include
+
     ${UI_SAMPLE_ROOT}/components
     ${NativeApp}/../service/smart_voice/smart_voice_service/interfaces/innerkits/native_c/include
     ${NativeApp}/../service/smart_voice/voice_engine_hal/interfaces/innerkits/native_c/include
@@ -91,6 +94,10 @@ set(PRIVATE_HEADER
     ${ROOT_DIR}/open_source/openharmony/foundation/multimedia/utils/include
     ${ROOT_DIR}/open_source/openharmony/utils/native/lite/include
     ${ROOT_DIR}/open_source/openharmony/utils/native/lite/kv_store/innerkits
+    ${ROOT_DIR}/open_source/openharmony/drivers/peripheral/format/interfaces/include
+    ${UIKIT_ROOT_DIR}/proprietary/src/ui/innerkits
+    ${ROOT_DIR}/application/wearable/service/dial_market
+    ${ROOT_DIR}/open_source/openharmony/third_party/cJSON
 )
 
 file(GLOB_RECURSE SOURCES "${NativeApp}/nativeui/*.cpp")
@@ -127,6 +134,7 @@ set(SOURCES
 list(REMOVE_ITEM SOURCES
     ${NativeApp}/nativeui/main/src/dial/parser/DialBinParser.cpp
     ${NativeApp}/nativeui/main/src/dial/parser/DialBinParserManager.cpp
+    ${NativeApp}/nativeui/main/src/dial/parser/DialBinParserV3.cpp
 )
 
 if("SUPPORT_ALIPAY_SEC" IN_LIST DEFINES)
@@ -213,6 +221,7 @@ set(COMPONENT_SRC
     ${UIKIT_NATIVE_FWK}/src/TransitionRecord.cpp
     ${UIKIT_NATIVE_DIAL}/src/dial/parser/DialBinParser.cpp
     ${UIKIT_NATIVE_DIAL}/src/dial/parser/DialBinParserManager.cpp
+    ${UIKIT_NATIVE_DIAL}/src/dial/parser/DialBinParserV3.cpp
 )
 
 set(SOURCES
@@ -237,9 +246,11 @@ set(PRIVATE_HEADER
     ${ROOT_DIR}/middleware/services/gui/uikit/ui/frameworks
     ${ROOT_DIR}/application/wearable/nativeapp/nativeui/applist/include/
     ${ROOT_DIR}/open_source/openharmony/drivers/peripheral/display/interfaces/include
+    ${ROOT_DIR}/open_source/openharmony/drivers/peripheral/format/interfaces/include
     ${UIKIT_NATIVE_DIAL}/include/dial
     ${ROOT_DIR}/middleware/services/media/foundation/sample/wrapper
     ${ROOT_DIR}/middleware/services/media/foundation/player/interfaces/kits
+    ${UIKIT_ROOT_DIR}/proprietary/src/ui/innerkits
 )
 
 set(PRIVATE_DEFINES
index 025d433..c530718 100644 (file)
Binary files a/code/sdk/application/wearable/nativeapp/brandy-auto-ota-cli/libuikit_fwk.a and b/code/sdk/application/wearable/nativeapp/brandy-auto-ota-cli/libuikit_fwk.a differ
index 4e49f57..410571e 100644 (file)
Binary files a/code/sdk/application/wearable/nativeapp/brandy-auto-ota-ser/libuikit_fwk.a and b/code/sdk/application/wearable/nativeapp/brandy-auto-ota-ser/libuikit_fwk.a differ
index 84c02f0..55d7365 100644 (file)
Binary files a/code/sdk/application/wearable/nativeapp/brandy-native-js-fd230/libuikit_fwk.a and b/code/sdk/application/wearable/nativeapp/brandy-native-js-fd230/libuikit_fwk.a differ
index 84c02f0..55d7365 100644 (file)
Binary files a/code/sdk/application/wearable/nativeapp/brandy-native-js/libuikit_fwk.a and b/code/sdk/application/wearable/nativeapp/brandy-native-js/libuikit_fwk.a differ
index fc6ad89..2c30eba 100644 (file)
Binary files a/code/sdk/application/wearable/nativeapp/brandy-xts/libuikit_fwk.a and b/code/sdk/application/wearable/nativeapp/brandy-xts/libuikit_fwk.a differ
index 0a12786..b8d7f19 100644 (file)
@@ -50,6 +50,7 @@ public:
     void RegisterNative(const AppItem &nativeAppList, NativeRegisterCallback* native);
     void RegisterSlice(const uint16_t id, SliceProxy* slice);
     void RegisterMenu(const uint16_t id, const char *icon, const char *iconHexagon, const char *label);
+    bool IsSliceIdExist(AppViewId id);
 
 private:
     NativeRegisterManager() {};
index 0c7c900..ffecde6 100644 (file)
 #include "graphic_config.h"
 
 namespace OHOS {
-    static const int CARD_SETTING_COUNT_MAX = 5;
     typedef enum {
         WATCH_FACE = 0, /* 主表盘枚举值不能修改 */
         HEART_RATE,
         COMPASS,
         ACTIVITY,
         MUSIC_PLAYER,
+        VIDEO_CARD1,
+        VIDEO_CARD2,
+        VIDEO_CARD3,
         MAX_CARD,
     } CardId;
+    static const int CARD_SETTING_COUNT_MAX = MAX_CARD;
 
     typedef enum {
         DIAL_CLOCK = 0,
@@ -372,6 +375,8 @@ namespace OHOS {
     static constexpr const char *PNG_SET_CARD_COMPASS = APP_RES_PATH"/CARD_COMPASS.bin";
     static constexpr const char *PNG_SET_CARD_ACTIVITY = APP_RES_PATH"/CARD_ACTIVITY.bin";
     static constexpr const char *PNG_SET_CARD_PLAYER = APP_RES_PATH"/CARD_PLAYER.bin";
+    static constexpr const char *PNG_SET_CARD_VIDEO = APP_RES_PATH"/noaudio_5_set.bin";
+    static constexpr const char *PNG_PREVIEW_CARD_VIDEO = APP_RES_PATH"/noaudio_05.bin";
 
     static constexpr const char *PNG_SET_DIAL_CLOCK = APP_RES_PATH"/DIAL_CLOCK.bin";
 }
index 9d2459a..6ea82dd 100644 (file)
@@ -87,4 +87,14 @@ void NativeRegisterManager::RegisterMenu(const uint16_t id, const char *icon, co
     }
     nativeAppLists_.PushBack(item);
 }
+
+bool NativeRegisterManager::IsSliceIdExist(AppViewId id)
+{
+    for (uint16_t index = 0; index < slices_.Size(); index++) {
+        if (slices_[index].id == static_cast<uint16_t>(id)) {
+            return true;
+        }
+    }
+    return false;
+}
 } // namespace OHOS
index e9fd5bc..a58470e 100644 (file)
@@ -51,8 +51,6 @@ AlipayPresenter *AlipayPresenter::GetInstance()
 \r
 void AlipayPresenter::OnStart()\r
 {\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlipayPresenter OnStart");\r
-    Presenter<AlipayMainView>::OnStart();\r
     alipayMode_->AlipayExitLpm();\r
     if (!alipayMode_->AlipayInitModel()) {\r
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayPresenter::OnStart AlipayInitModel fail.");\r
index 2bfd895..11876d2 100644 (file)
@@ -57,7 +57,6 @@ ApplistView::~ApplistView()
 
 void ApplistView::OnStart()
 {
-    View<ApplistPresenter>::OnStart();
     AppListStyle style = presenter_->GetCurrentStyle();
     if (style == AppListStyle::FOOTBALL_STYLE) {
         FootballStyleOnStart();
@@ -131,8 +130,11 @@ void ApplistView::WaterfallStyleOnStart()
     int16_t blankSize = waterfallList_->GetRelativeRect().GetWidth() > waterfallList_->GetRelativeRect().GetHeight() ?
         waterfallList_->GetRelativeRect().GetWidth() / 2 : waterfallList_->GetRelativeRect().GetHeight() / 2; // 2, half
     waterfallList_->SetThrowDrag(true);
-    waterfallList_->SetReboundSize(imgDistance_ * Sin(60)); // 60, degree
-    waterfallList_->SetScrollBlankSize(0);
+    uint16_t layoutHeight = static_cast<uint16_t>(imgDistance_ * Sin(60));
+    waterfallList_->SetReboundSize(layoutHeight); // 60: degree, row's layout height
+    waterfallList_->SetScrollBlankSize(layoutHeight, UIAbstractScroll::Direction::TOP);
+    waterfallList_->SetScrollBlankSize(Screen::GetInstance().GetHeight() / 2 - layoutHeight, // 2: half
+        UIAbstractScroll::Direction::BOTTOM);
     waterfallList_->RequestFocus();
     waterfallList_->SetRotateFactor(10); // 10, empirical coefficient
     waterfallList_->SetOnRotateListener(presenter_);
@@ -201,7 +203,6 @@ void ApplistView::OnStop()
     } else {
         ListStyleOnStop();
     }
-    FocusManager::GetInstance()->ClearFocus();
     return;
 }
 
index 699e0b1..abea09a 100644 (file)
@@ -36,7 +36,7 @@
 #include "dfx_channel.h"\r
 #include "tcxo.h"\r
 #include "ui_service.h"\r
-\r
+#include "network/network_listener.h"\r
 namespace OHOS {\r
 \r
 #define BT_SPP_TASK_STACK_SIZE 2048\r
@@ -863,10 +863,16 @@ void GapAclStateChangedCallback(const bd_addr_t *bdAddr, gap_acl_state_t state,
             /* 通知msg_center,ble状态仍用bt状态,此处不区分 */\r
             MsgCenterSendMsg(BT_DISCONNECTED_TO_MSGCENTER, 0, nullptr, 0);\r
             SendMsgToUIService(BT_DISCONNECTED_TO_UI, 0, nullptr, 0);\r
+            // send to ace network\r
+            // SetAclConnected(false);\r
+            net_connect_status_change(NETWORK_TYPE_BLUETOOTH, CONNECTION_STATUS_DISCONNECTED);\r
         } else if (state == GAP_ACL_STATE_CONNECTED) {\r
             (void)memcpy_s(gapAclConnectAddr.addr, BD_ADDR_LEN, bdAddr->addr, BD_ADDR_LEN);\r
             MsgCenterSendMsg(BT_CONNECTED_TO_MSGCENTER, 0, nullptr, 0);\r
             SendMsgToUIService(BT_CONNECTED_TO_UI, 0, nullptr, 0);\r
+            // send to ace network\r
+            // SetAclConnected(true);\r
+            net_connect_status_change(NETWORK_TYPE_BLUETOOTH, CONNECTION_STATUS_CONNECTED);\r
         }\r
         return;\r
     }\r
@@ -962,11 +968,16 @@ static void BleConnStateChangeCallback(unsigned short connId, bd_addr_t *addr, g
         /* 通知msg_center,ble状态仍用bt状态,此处不区分 */\r
         MsgCenterSendMsg(BT_DISCONNECTED_TO_MSGCENTER, 0, nullptr, 0);\r
         msg_center_set_ble_conn_state(GAP_BLE_STATE_DISCONNECTED);\r
+        // send to ace network\r
+        net_connect_status_change(NETWORK_TYPE_BLUETOOTH_LE, CONNECTION_STATUS_DISCONNECTED);\r
     } else {\r
         MsgCenterSendMsg(BT_CONNECTED_TO_MSGCENTER, 0, nullptr, 0);\r
         msg_center_set_ble_conn_state(GAP_BLE_STATE_CONNECTED);\r
         (void)memcpy_s(&g_bd_addr, sizeof(bd_addr_t), addr, sizeof(bd_addr_t));\r
+        // send to ace network\r
+        net_connect_status_change(NETWORK_TYPE_BLUETOOTH_LE, CONNECTION_STATUS_CONNECTED);\r
     }\r
+    // send to ace network\r
 }\r
 \r
 static void BleAdvStartCallback(uint8_t advId, adv_status_t status)\r
@@ -1019,7 +1030,7 @@ static void BtGattsServiceAddCallback(uint8_t serverId, bt_uuid_t *uuid, uint16_
         character.chara_uuid.uuid_len = sizeof(diag_id);\r
         memcpy_s(character.chara_uuid.uuid, sizeof(character.chara_uuid.uuid), (char *)&diag_id, sizeof(diag_id));\r
         character.permissions = GATT_ATTRIBUTE_PERMISSION_WRITE | GATT_ATTRIBUTE_PERMISSION_READ;\r
-        character.properties = GATT_CHARACTER_PROPERTY_BIT_WRITE | GATT_CHARACTER_PROPERTY_BIT_READ | GATT_CHARACTER_PROPERTY_BIT_NOTIFY;\r
+        character.properties = GATT_CHARACTER_PROPERTY_BIT_WRITE_NO_RSP | GATT_CHARACTER_PROPERTY_BIT_READ | GATT_CHARACTER_PROPERTY_BIT_NOTIFY;\r
         character.value_len = (uint16_t)sizeof(value);\r
         character.value = (uint8_t *)(&value);\r
 \r
index 6dc8def..5e9e96d 100644 (file)
@@ -193,12 +193,6 @@ static void CallModelResumePlayer(void)
 {
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallModelResumePlayer] [ResumePlayer] start");
     usleep(5000); // 延时等待通话释放媒体资源
-    std::shared_ptr<PlayerInterruptListener> PlayerIntrptListener =
-        OHOS::PlayersModel::GetInstance()->GetPlayerIntrptListener();
-    if (PlayerIntrptListener != nullptr && PlayerIntrptListener->IsPaused()) {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallModelResumePlayer] ResumePlayer ");
-        PlayerIntrptListener->ResumePlayer();
-    }
 }
 
 static void CallModelPostGraphicEvent(void (*fun)(void))
index 7991cb3..871138f 100644 (file)
@@ -153,7 +153,6 @@ bool KeyInputListener::OnKeyAct(UIView& view, const KeyEvent& event)
     UNUSED(view);
 
     uint8 state = event.GetState();
-
     switch (state) {
         case InputDevice::STATE_PRESS: // 短按
             OnKeyPress();
index 530c39b..50a9e4a 100644 (file)
@@ -23,11 +23,25 @@ public:
 
 class DialBinParserManager {
 public:
-    static DialBinParserManager* GetInstance(void);
-    bool UpdateDial(const std::string& file, FILE* fp, DialViewGroup* group, DisplayState state);
-    bool GetDialPreviewInfo(FILE* fp, DialPreviewInfo* info);
+    static DialBinParserManager *GetInstance(void);
+    bool UpdateDial(const std::string &file, FILE *fp, DialViewGroup *group, DisplayState state);
+    bool GetDialPreviewInfo(FILE *fp, DialPreviewInfo *info);
     bool RegisterParser(const std::string &version, DialBinParserInterface *parser);
 
+    uint8_t GetSupportVersionCnt() const
+    {
+        return cnt_;
+    }
+
+    bool GetVersionByIndex(uint8_t index, std::string &version)
+    {
+        if (index >= cnt_) {
+            return false;
+        }
+        version = parsers_[index].version;
+        return true;
+    }
+
 private:
     DialBinParserManager();
     virtual ~DialBinParserManager();
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/main/include/DialBinParserV3.h b/code/sdk/application/wearable/nativeapp/nativeui/main/include/DialBinParserV3.h
new file mode 100644 (file)
index 0000000..1d5e2ca
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2025. All rights reserved.
+ * Description: DialBinParserV3
+ * Author:
+ * Create: 2025-02-06
+ */
+
+#ifndef GRAPHIC_LITE_DIAL_BIN_PARSER_V3_H
+#define GRAPHIC_LITE_DIAL_BIN_PARSER_V3_H
+#include "DialBinParserManager.h"
+#include "DialTimePublisher.h"
+#include "components/ui_abstract_progress.h"
+#include "DialViewContainer.h"
+#include "DialOHDataType.h"
+#include "DialOHSliceId.h"
+
+namespace OHOS {
+class DialBinParserV3 : public DialBinParserInterface {
+public:
+    DialBinParserV3();
+    ~DialBinParserV3() override;
+    bool UpdateDial(const std::string& file, FILE* fp, DialViewGroup* group, DisplayState state) override;
+    bool GetDialPreviewInfo(FILE* fp, DialPreviewInfo* info) override;
+
+protected:
+    bool ParseDialHeader(FILE* file);
+    bool ParserDialStaticImg(ContainerInterface &parent);
+    bool ParserDialSequenceImg(ContainerInterface &parent);
+    bool ParserDialRotateImg(ContainerInterface &parent);
+    bool ParserDialOptionImg(ContainerInterface &parent);
+    bool ParserDialDigitalImg(ContainerInterface &parent);
+    bool ParserDialLabel(ContainerInterface &parent);
+    bool ParserDialArcLabel(ContainerInterface &parent);
+    bool ParserDialBoxProgress(ContainerInterface &parent);
+    bool ParserDialArcProgress(ContainerInterface &parent);
+    bool ParserDialVideo(ContainerInterface &parent);
+    bool ParserDialClick(ContainerInterface &parent);
+    bool ParserDialKaleidoscope(ContainerInterface &parent);
+    bool ParserDialContainer(ContainerInterface &parent);
+    bool ParserDialOptions(ContainerInterface &parent);
+
+private:
+    void* MallocAndReadBuf(FILE* file, uint32_t readSize);
+    bool SetProgressType(FILE* fp, UIAbstractProgress* view, DialProgressType data);
+
+    static constexpr uint8_t DIAL_BIN_PARSER_FUNC_NUM = 14; // 14: func max value
+    bool (DialBinParserV3::*funcArray_[DIAL_BIN_PARSER_FUNC_NUM])(ContainerInterface&);
+    void AddToParentWithView(ContainerInterface &parent, uint8_t displayMode, UIView *view);
+    void AddToParentWithDialView(ContainerInterface &parent, uint8_t displayMode,
+        DialView *view, DialOHDataType bindData, bool isPeriodic);
+    struct {
+        uint8_t *viewType;
+        uint8_t dialViewCount;
+        FILE *file;
+        uint8_t curIndex;
+    } curViewType_;
+    bool ParseTimeIntervals(FILE* fp, uint8_t cnt, DialTimePublisher::TimeChangeListener *listener);
+    bool ParseViewType(uint8_t *viewType, uint8_t dialViewCount, FILE *file);
+    bool ParseContainerSubviews(DialViewContainer *container, uint8_t num);
+    bool ParseOptionsSubviews(ContainerInterface &parent);
+
+    DialViewGroup* dialGroup_ = nullptr;
+    std::string file_;
+    uint32_t dirId_ = 0xfef << 20; // 20: offset
+    uint32_t imageOffset_ = 0;
+    DisplayState state_ = DisplayState::NORMAL;
+}; // class DialBinParserV3
+} // namespace OHOS
+
+#endif // GRAPHIC_LITE_DIAL_BIN_PARSER_V3_H
\ No newline at end of file
index d242a3d..3301b3d 100644 (file)
@@ -30,6 +30,9 @@ struct DialPreviewInfo {
     uint32_t imgId;\r
     uint32_t offset;\r
     uint8_t capability;\r
+    uint32_t uuid;\r
+    char protocolVersion[DIAL_VERSION_MAX_LEN];\r
+    char watchVersion[DIAL_VERSION_MAX_LEN];\r
 };\r
 \r
 struct DialRect {\r
index 3b33904..05a667c 100644 (file)
@@ -28,6 +28,7 @@
 #include "PullUpDownView.h"
 #include "components/ui_cross_view.h"
 #include "SetCardModel.h"
+#include "VideoCard.h"
 
 namespace OHOS {
 class MainPresenterSample;
@@ -43,6 +44,9 @@ public:
     UICardPage *InitActivityPage(void);
     UICardPage *InitCompassPage(void);
     UICardPage *InitMusicPlayerPage(void);
+    UICardPage *InitVideoCardPage1(void);
+    UICardPage *InitVideoCardPage2(void);
+    UICardPage *InitVideoCardPage3(void);
     void AnimatorStart(int pageIndex);
     void AnimatorStop(void);
     CardId GetHorCurrentCard() const;
@@ -53,6 +57,9 @@ public:
 
     UICardPage* GetViewById(int16_t id) const
     {
+        if (id >= MAX_CARD) {
+            return nullptr;
+        }
         return recordCard[id];
     }
 
@@ -64,9 +71,8 @@ public:
     }
     void SwitchToCard(uint8_t cardId, bool loadAdjacent = true);
     bool IsMainClockPage(void);
-    void SetDragFg(bool continFg);
-    bool GetDragFg(void);
     void SetPage(int16_t page, bool loadAdjacent = true);
+    void ReloadWatchFace();
 
 private:
     PullUpDownView *dropDownView{nullptr};
@@ -81,6 +87,9 @@ private:
     bool pageStatus[MAX_CARD]{false};
     UICrossView *mainSwipeGroup{nullptr};
     ZoomEffect* callback{nullptr};
+    VideoCard *videoCard1{nullptr};
+    VideoCard *videoCard2{nullptr};
+    VideoCard *videoCard3{nullptr};
 
     bool HorizontalViewInit(void);
     void VerticalViewInit(void);
@@ -88,6 +97,7 @@ private:
     void HorViewLoad(void);
     UICardPage *InitWatchOffDial(DialSetting &setting);
     UICardPage *InitWatchDial(DialSetting &setting);
+    UICardPage *InitVideoCardPage(const std::string &video, const std::string &preview);
 };
 } // namespace OHOS
 #endif // MAIN_VIEW_SAMPLE_H
index d3ad91e..43d0dd2 100644 (file)
@@ -8,9 +8,10 @@
 #include <cstdint>
 #include "DialView.h"
 #include "components/ui_arc_label.h"
+#include "font/font_global_manager.h"
 
 namespace OHOS {
-class DialArcLabelView : public UIArcLabel, public DialView {
+class DialArcLabelView : public UIArcLabel, public DialView, public FontGlobalManager::LangChangeListener {
 public:
     DialArcLabelView();
     ~DialArcLabelView() override;
@@ -20,12 +21,15 @@ public:
     void HandleTextData(const std::string* data, uint16_t num) override;
     void HandleFloatData(const float* data, uint16_t num) override;
     void HandleFloatData(float data) override;
+    void SetLang(uint8_t lang);
+    void OnLangChange(uint8_t langId) override;
 
 private:
     void SetTextWithWildcardInner(const char* text);
     static const uint8_t MAX_BUF_SIZE = 255;
     char* text_ = nullptr;
     char dstBuf_[MAX_BUF_SIZE] = {0};
+    uint8_t language_ = FontGlobalManager::INVALID_LANG_ID;
 };
 }
 #endif
index 9a695b9..d9bc68b 100644 (file)
@@ -30,10 +30,17 @@ enum class DialDataType {
     DATA_TYPE_TIME_MONTH,
     DATA_TYPE_TIME_YEAR,
 
-    DATA_TYPE_MULTI_FLOAT_BASE = 0x2fff,
+    DATA_TYPE_SWIVEL_GEAR_ONE = 20,
+    DATA_TYPE_SWIVEL_GEAR_TWO,
+    DATA_TYPE_SWIVEL_GEAR_THREE,
+    DATA_TYPE_SWIVEL_GEAR_FOUR,
+    DATA_TYPE_SWIVEL_GEAR_FIVE,
+    DATA_TYPE_SWIVEL_GEAR_SIX,
 
-    DATA_TYPE_TEXT_BASE = 0x4fff,
+    DATA_TYPE_TEXT_BASE = 0x2000,
 
-    DATA_TYPE_MAX = 0x7fff,
+    DATA_TYPE_MULTI_FLOAT_BASE = 0x4000,
+
+    DATA_TYPE_MAX = 0x6000
 };
 #endif
index 2817eab..5b32496 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <cstdint>
 #include "DialView.h"
+#include "DialTimePublisher.h"
 #include "components/ui_image_view.h"
 #include "gfx_utils/graphic_math.h"
 #include "components/ui_view_group.h"
@@ -19,7 +20,7 @@ enum class ImgAlign {
     RIGHT,
 };
 
-class DialDigitalImgView : public UIImageView, public DialView {
+class DialDigitalImgView : public UIImageView, public DialView, public DialTimePublisher::TimeChangeListener {
 public:
     DialDigitalImgView();
     ~DialDigitalImgView() override;
@@ -35,6 +36,7 @@ public:
     void SetAlignPos(Point pos);
     void SetDecimalPrecision(uint8_t precision);
     void SetParent(UIViewGroup* parent);
+    void OnTimeUpdate(const struct tm &curTime) override;
 
 private:
     void SetNumImg(UIImageView* img, const ImageInfo *info);
index c551313..6e9f2a8 100644 (file)
@@ -8,9 +8,10 @@
 #include <cstdint>
 #include "DialView.h"
 #include "components/ui_label.h"
+#include "font/font_global_manager.h"
 
 namespace OHOS {
-class DialLabelView : public UILabel, public DialView {
+class DialLabelView : public UILabel, public DialView, public FontGlobalManager::LangChangeListener {
 public:
     DialLabelView();
     ~DialLabelView() override;
@@ -20,12 +21,15 @@ public:
     void HandleTextData(const std::string* data, uint16_t num) override;
     void HandleFloatData(const float* data, uint16_t num) override;
     void HandleFloatData(float data) override;
+    void SetLang(uint8_t lang);
+    void OnLangChange(uint8_t langId) override;
 
 private:
     void SetTextWithWildcardInner(const char* text);
     static const uint8_t MAX_BUF_SIZE = 255;
     char* text_ = nullptr;
     char dstBuf_[MAX_BUF_SIZE] = {0};
+    uint8_t language_ = FontGlobalManager::INVALID_LANG_ID;
 };
 }
 #endif
index 7da252b..43cd8b0 100644 (file)
@@ -9,19 +9,29 @@
 #define DIAL_MODEL_TIME_H
 
 #include "DialBaseModel.h"
+#include "DialTimePublisher.h"
+#include "gfx_utils/list.h"
 
 namespace OHOS {
-class DialModelTime : public DialBaseModel {
+class DialModelTime : public DialBaseModel, public DialTimePublisher {
 public:
-    DialModelTime() {}
-    ~DialModelTime() override {}
+    DialModelTime()
+    {
+        DialModelTime::SetPublisher(dynamic_cast<DialTimePublisher*>(this));
+    }
+    ~DialModelTime() override
+    {
+        listeners_.Clear();
+    }
     static DialModelTime* GetInstance()
     {
         static DialModelTime instance;
         return &instance;
     }
     bool GetDialFloatData(DialDataType& type, float& out) override;
-    void UpdateTime();
+    void UpdateTime() override;
+    void Register(TimeChangeListener* listener) override;
+    void Unregister(TimeChangeListener* listener) override;
 
 private:
     struct tm *tblock_;
@@ -29,6 +39,7 @@ private:
     uint16_t angleM_ = 0;
     uint16_t angleS_ = 0;
     float angleMS_ = 0;
+    List<TimeChangeListener*> listeners_;
 };
 }
 #endif
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialOHDataType.h b/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialOHDataType.h
new file mode 100644 (file)
index 0000000..83f8f0f
--- /dev/null
@@ -0,0 +1,189 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2025. All rights reserved.
+ * Description: DialOHDataType
+ * Author:
+ * Create: 2025-02-15
+ */
+
+#ifndef DIAL_OH_DATATYPE_H
+#define DIAL_OH_DATATYPE_H
+
+#include <unordered_map>
+#include "DialDataBase.h"
+
+namespace OHOS {
+enum class DialOHDataType : int16_t {
+    CLOCK = 1,
+    CLOCK_HIGH_BIT = 2,
+    CLOCK_LOW_BIT = 3,
+    CLOCK_RATIO_12 = 4,
+    CLOCK_RATIO_24 = 5,
+    MINUTES = 6,
+    MINUTES_HIGH_BIT = 7,
+    MINUTES_LOW_BIT = 8,
+    MINUTES_RATIO = 9,
+    SECONDS = 10,
+    SECONDS_HIGH_BIT = 11,
+    SECONDS_LOW_BIT = 12,
+    SECONDS_RATIO = 13,
+    AM_PM = 14,
+    AMPM_TEXT = 15,
+    HOUR_MODE = 16,
+    PREVIOUS_HOUR = 17,
+    NEXT_HOUR = 18,
+    CLOCK_ANGLE = 19,
+    MINUTE_ANGLE = 20,
+    SECONDS_ANGLE = 21,
+    MILLISECOND_ANGLE = 22,
+    PREVIOUS_SECOND = 25,
+    NEXT_SECOND = 26,
+    PREVIOUS_SECOND_PREVIOUS_SECOND = 27,
+    PREVIOUS_MINUTE = 28,
+    NEXT_MINUTE = 29,
+    DUAL_TIME_ZONE_CLOCK = 30,
+    DUAL_TIME_ZONE_CLOCK_HIGH_BIT = 31,
+    DUAL_TIME_ZONE_CLOCK_LOW_BIT = 32,
+    DUAL_TIME_ZONE_CLOCK_RATIO_12 = 33,
+    DUAL_TIME_ZONE_CLOCK_RATIO_24 = 34,
+    DUAL_TIME_ZONE_MINUTES = 35,
+    DUAL_TIME_ZONE_MINUTES_HIGH_BIT = 36,
+    DUAL_TIME_ZONE_MINUTES_LOW_BIT = 37,
+    DUAL_TIME_ZONE_MINUTES_RATIO = 38,
+    DUAL_TIME_ZONE_ABBREVIATION_TEXT = 39,
+    DUAL_TIME_ZONE_TIME_MINUTE_TEXT = 40,
+    DUAL_TIME_ZONE_AMPM = 41,
+    DUAL_TIME_ZONE_AM_PM_TEXT = 42,
+    SUNRISE_SUNSET_PICTURE_SELECTION = 50,
+    SUNRISE_SUNSET_CLOCK_HIGH_BIT = 51,
+    SUNRISE_SUNSET_CLOCK_LOW_BIT = 52,
+    SUNRISE_SUNSET_MINUTES_HIGH_BIT = 53,
+    SUNRISE_SUNSET_MINUTES_LOW_BIT = 54,
+    SUNRISE_TEXT = 55,
+    SUNSET_TEXT = 56,
+    MOONRISE_TEXT = 60,
+    MOONSET_TEXT = 61,
+    DATE = 70,
+    DATE_HIGH_BIT = 71,
+    DATE_LOW_BIT = 72,
+    DATE_OCCUPIES_31_DAYS_RATIO = 73,
+    YESTERDAY = 74,
+    YESTERDAY_DATE_HIGH_BIT = 75,
+    YESTERDAY_DATE_LOW_BIT = 76,
+    TOMORROW = 77,
+    TOMORROW_DATE_HIGH_BIT = 78,
+    TOMORROW_DATE_LOW_BIT = 79,
+    MONTH_DATA = 80,
+    MONTH = 81,
+    MONTH_TEXT = 82,
+    WEEK_DATA = 83,
+    WEEK_RATIO = 84,
+    WEEK_TEXT = 85,
+    TWELVE_DIVISIONS = 86,
+    LUNAR_PHASE = 87,
+    PREVIOUS_MONTH = 88,
+    NEXT_MONTH = 89,
+    LUNAR_MONTH = 90,
+    LUNAR_DATE_HIGH_BIT = 91,
+    LUNAR_DATE_LOW_BIT = 92,
+    CHARGE = 100,
+    CHARGE_ENUMERATION = 102,
+    CHARGE_STATUS_ENUMERATION = 103,
+    CHARGE_RATIO = 104,
+    CHARGING_STATUS = 105,
+    STEPS = 110,
+    STEPS_UNIT_DIGIT = 111,
+    STEPS_TENS_DIGIT = 112,
+    STEPS_HUNDRED_DIGIT = 113,
+    STEPS_THOUSAND_DIGIT = 114,
+    STEPS_TEN_THOUSAND_DIGIT = 115,
+    STEPS_TARGET_ACHIEVEMENT_RATE = 116,
+    STEPS_TARGET_PROGRESS_ENUMERATION = 117,
+    CALORIES = 120,
+    CALORIES_RATIO = 121,
+    CALORIES_TARGET_PROGRESS_ENUMERATION = 122,
+    HEART_RATE = 130,
+    MAXIMUM_HEART_RATE = 131,
+    MINIMUM_HEART_RATE = 132,
+    HEART_RATE_RANGE = 133,
+    HEART_RATE_RATIO = 134,
+    STRESS = 140,
+    STRESS_RATIO = 141,
+    STRESS_LEVEL_TYPE = 142,
+    MODERATE_TO_VIGOROUS_INTENSITY_TIME = 150,
+    MODERATE_TO_VIGOROUS_INTENSITY_TIME_RATIO = 151,
+    STANDING_TIMES = 152,
+    STANDING_TIMES_RATIO = 153,
+    MAXIMUM_OXYGEN_UPTAKE = 160,
+    MAXIMUM_OXYGEN_UPTAKE_RATIO = 161,
+    SLEEP_TEXT = 165,
+    SLEEP_RATIO = 166,
+    SLEEP_TARGET_ACHIEVEMENT_RATE_ENUMERATION = 167,
+    TEMPERATURE = 170,
+    HIGHEST_TEMPERATURE = 171,
+    LOWEST_TEMPERATURE = 172,
+    CURRENT_TEMPERATURE_MINUS_ONE = 173,
+    CURRENT_TEMPERATURE_PLUS_ONE = 174,
+    TEMPERATURE_TYPE = 175,
+    WEATHER_TYPE = 176,
+    TEMPERATURE_RATIO = 177,
+    ATMOSPHERIC_PRESSURE = 180,
+    ATMOSPHERIC_PRESSURE_RATIO = 181,
+    AIR_QUALITY_INDEX = 182,
+    AIR_QUALITY_INDEX_LEVEL = 183,
+    AIR_QUALITY_INDEX_RATIO = 184,
+    ELEVATION = 190,
+    ELEVATION_HEIGHT_DATA = 191,
+    ELEVATION_HEIGHT_UNIT = 192,
+    HEIGHT_RATIO = 193,
+    DISTANCE_TEXT = 194,
+    DISTANCE_DATA = 195,
+    DISTANCE_UNIT = 196,
+    DISTANCE_TARGET_PROGRESS = 197,
+    HIGH_TIDE_TIME_TEXT = 200,
+    LOW_TIDE_TIME_TEXT = 201,
+    BLE_CONNECTION_STATUS = 210,
+    BT_CONNECTION_STATUS = 211,
+    BLOOD_OXYGEN = 220,
+    SYSTOLIC_BLOOD_PRESSURE = 221,
+    DIASTOLIC_BLOOD_PRESSURE = 222,
+    DUAL_LANGUAGE_SYSTEM = 230,
+    SWIVEL_GEAR_POSITIVE = (1 << 12) + 20, // private data, clockwise
+    SWIVEL_GEAR_NEGATIVE, // counterclockwise
+}; // enum class DialOHDataType
+
+struct HashOHDataType {
+    size_t operator()(DialOHDataType data) const
+    {
+        return std::hash<int16_t>()(static_cast<int16_t>(data));
+    }
+};
+
+const std::unordered_map<DialOHDataType, DialDataType, HashOHDataType> g_bindDataConverter = {
+    {DialOHDataType::CLOCK, DialDataType::DATA_TYPE_TIME_HOUR},
+    {DialOHDataType::MINUTES, DialDataType::DATA_TYPE_TIME_MINUTE},
+    {DialOHDataType::SECONDS, DialDataType::DATA_TYPE_TIME_SECOND},
+    {DialOHDataType::MILLISECOND_ANGLE, DialDataType::DATA_TYPE_CLOCK_ANGLE_MS},
+    {DialOHDataType::DATE, DialDataType::DATA_TYPE_TIME_DATE},
+    {DialOHDataType::WEEK_DATA, DialDataType::DATA_TYPE_TIME_WEEK},
+    {DialOHDataType::CHARGE, DialDataType::DATA_TYPE_POWER},
+    {DialOHDataType::STEPS, DialDataType::DATA_TYPE_STEPS},
+    {DialOHDataType::CALORIES, DialDataType::DATA_TYPE_CALORIE},
+    {DialOHDataType::HEART_RATE, DialDataType::DATA_TYPE_HEART_RATE},
+    {DialOHDataType::STRESS, DialDataType::DATA_TYPE_PRESSURE},
+    {DialOHDataType::TEMPERATURE, DialDataType::DATA_TYPE_TEMPERATURE},
+    {DialOHDataType::ELEVATION, DialDataType::DATA_TYPE_AILTITUDE},
+    {DialOHDataType::AIR_QUALITY_INDEX, DialDataType::DATA_TYPE_PM25},
+    {DialOHDataType::CLOCK_ANGLE, DialDataType::DATA_TYPE_CLOCK_ANGLE_H},
+    {DialOHDataType::MINUTE_ANGLE, DialDataType::DATA_TYPE_CLOCK_ANGLE_M},
+    {DialOHDataType::SECONDS_ANGLE, DialDataType::DATA_TYPE_CLOCK_ANGLE_S},
+    {DialOHDataType::MONTH, DialDataType::DATA_TYPE_TIME_MONTH},
+    {DialOHDataType::SWIVEL_GEAR_POSITIVE, DialDataType::DATA_TYPE_SWIVEL_GEAR_ONE},
+    {DialOHDataType::SWIVEL_GEAR_POSITIVE, DialDataType::DATA_TYPE_SWIVEL_GEAR_FOUR},
+    {DialOHDataType::SWIVEL_GEAR_POSITIVE, DialDataType::DATA_TYPE_SWIVEL_GEAR_SIX},
+    {DialOHDataType::SWIVEL_GEAR_NEGATIVE, DialDataType::DATA_TYPE_SWIVEL_GEAR_TWO},
+    {DialOHDataType::SWIVEL_GEAR_NEGATIVE, DialDataType::DATA_TYPE_SWIVEL_GEAR_THREE},
+    {DialOHDataType::SWIVEL_GEAR_NEGATIVE, DialDataType::DATA_TYPE_SWIVEL_GEAR_FIVE},
+};
+} // namespace OHOS
+
+#endif // DIAL_OH_DATATYPE_H
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialOHSliceId.h b/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialOHSliceId.h
new file mode 100644 (file)
index 0000000..f19784a
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2025. All rights reserved.
+ * Description: DialOHSliceId
+ * Author:
+ * Create: 2025-02-15
+ */
+
+
+#ifndef DIALOHSLICEID_H
+#define DIALOHSLICEID_H
+
+#include <unordered_map>
+#include "AppViewIDs.h"
+
+namespace OHOS {
+enum class DialOHSliceId : uint16_t {
+    DUAL_TIME_ZONES = 0,
+    HEART_RATE = 1,
+    STANDING_TIMES = 2,
+    STRESS = 3,
+    MODERATE_TO_VIGOROUS_INTENSITY_TIME = 4,
+    WEATHER = 5,
+    AIR_QUALITY_ONLY_CHINA = 6,
+    ATMOSPHERIC_PRESSURE = 7,
+    ELEVATION_HEIGHT = 8,
+    SUNRISE_SUNSET_TIME = 9,
+    DISTANCE = 10,
+    SLEEP = 11,
+    EXERCISE = 12,
+    PAYMENT_ONLY_CHINA = 13,
+    ALARM_CLOCK = 14,
+    STOPWATCH = 15,
+    TIMER = 16,
+    EXERCISE_RECORD = 17,
+    TRAINING_STATUS = 18,
+    ACTIVITY_RECORD = 19,
+    AEROBIC_EXERCISE = 20,
+    CONTACTS = 21,
+    MUSIC = 22,
+    COMPASS = 23,
+    CALL_LOG = 24,
+    BLOOD_OXYGEN_SATURATION_ONLY_CHINA = 25,
+    ULTRAVIOLET_RAYS_ONLY_CHINA = 26,
+    PHASE_OF_THE_MOON = 27,
+    STAIR_CLIMBING = 28,
+    BLOOD_PRESSURE = 29,
+    MESSAGE_LIST = 30,
+    DIAL = 31,
+    AUDIO_SWITCH = 32,
+}; // enum class DialOHSliceId
+
+struct HashOhSliceId {
+    size_t operator()(DialOHSliceId id) const
+    {
+        return std::hash<uint16_t>()(static_cast<uint16_t>(id));
+    }
+};
+
+const std::unordered_map<DialOHSliceId, AppViewId, HashOhSliceId> g_sliceIdConverter = {
+    {DialOHSliceId::COMPASS, VIEW_COMPASS},
+    {DialOHSliceId::DIAL, VIEW_CALLER_SAMPLE},
+    {DialOHSliceId::ALARM_CLOCK, VIEW_MAIN_ALARM},
+    {DialOHSliceId::AUDIO_SWITCH, VIEW_VOLUME},
+};
+} // namespace OHOS
+#endif // DIALOHSLICEID_H
index 4fa2fbd..dd08a9d 100644 (file)
@@ -7,11 +7,16 @@
 
 #include <cstdint>
 #include "DialView.h"
+#include "DialTimePublisher.h"
 #include "components/ui_image_view.h"
+#include "font/font_global_manager.h"
 
 namespace OHOS {
 
-class DialOptionImgView : public UIImageView, public DialView {
+class DialOptionImgView : public UIImageView,
+                          public DialView,
+                          public FontGlobalManager::LangChangeListener,
+                          public DialTimePublisher::TimeChangeListener {
 public:
     DialOptionImgView();
     ~DialOptionImgView() override;
@@ -20,10 +25,19 @@ public:
 
     bool SetOptionRes(const ImageInfo* src, uint16_t num);
 
+    void SetLang(uint8_t lang);
+    
+    void OnLangChange(uint8_t langId) override;
+
+    void OnTimeUpdate(const struct tm &curTime) override;
+
 private:
     ImageInfo* info_ = nullptr;
     uint16_t infoNum_ = 0;
     int16_t selected_ = -1;
+    uint8_t language_ = FontGlobalManager::INVALID_LANG_ID;
+    bool langVisible_ = true;
+    bool timeVisible_ = true;
 };
 }
 #endif
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialSequenceContainer.h b/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialSequenceContainer.h
new file mode 100644 (file)
index 0000000..f692d1f
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2025. All rights reserved.
+ * Description: DialSequenceContainer
+ * Author:
+ * Create: 2025-03-05
+ */
+
+#ifndef DIAL_SEQUENCE_CONTAINER_H
+#define DIAL_SEQUENCE_CONTAINER_H
+#include "components/ui_view_group.h"
+#include "components/ui_image_animator.h"
+
+namespace OHOS {
+class DialSequenceContainer : public UIViewGroup, public UIImageAnimatorView::AnimatorStopListener {
+public:
+    DialSequenceContainer();
+    ~DialSequenceContainer() override;
+    DialSequenceContainer(const DialSequenceContainer&) = delete;
+    DialSequenceContainer& operator=(const DialSequenceContainer&) = delete;
+    bool AddSequenceRes(uint16_t interval, bool repeat, const ImageAnimatorInfo *imgSrc, uint8_t imgNum);
+    bool OnClickEvent(const ClickEvent& event) override;
+    void Start();
+    void Stop();
+    void Pause();
+    void Resume();
+    void OnAnimatorStop(UIView& view) override;
+
+private:
+    void UpdateCurrentView();
+    UIImageAnimatorView *repeatView_ = nullptr;
+    UIImageAnimatorView *nonCycleView_[3]; // 3: max seqImg num
+    // if curView_ is not null, curView_ must be added into parent.
+    UIImageAnimatorView *curView_ = nullptr;
+    uint8_t nonCycleNum_ = 0;
+    uint8_t loop_ = 0;
+    bool isClick_ = false;
+};  // class DialSequenceContainer
+} // namespace OHOS
+#endif // DIAL_SEQUENCE_CONTAINER_H
\ No newline at end of file
index e1b48a0..733c5ed 100644 (file)
@@ -6,12 +6,29 @@
 #define DIAL_STATIC_IMG_VIEW_H
 
 #include "components/ui_image_view.h"
+#include "font/font_global_manager.h"
+#include "DialTimePublisher.h"
 
 namespace OHOS {
-class DialStaticImgView : public UIImageView {
+class DialStaticImgView : public UIImageView,
+                          public FontGlobalManager::LangChangeListener,
+                          public DialTimePublisher::TimeChangeListener {
 public:
     DialStaticImgView();
     ~DialStaticImgView() override;
+    void SetLang(uint8_t lang);
+    void OnLangChange(uint8_t langId) override;
+    bool SetImgs(const ImageInfo* src, uint8_t num);
+    bool OnClickEvent(const ClickEvent& event) override;
+    void OnTimeUpdate(const struct tm &curTime) override;
+
+private:
+    uint8_t language_ = FontGlobalManager::INVALID_LANG_ID;
+    ImageInfo* info_ = nullptr;
+    uint8_t infoNum_ = 0;
+    int16_t selected_ = -1;
+    bool langVisible_ = true;
+    bool timeVisible_ = true;
 };
 }
 #endif
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialTimePublisher.h b/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialTimePublisher.h
new file mode 100644 (file)
index 0000000..fcdb80c
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2025. All rights reserved.
+ * Description: DialTimePublisher
+ * Author:
+ * Create: 2025-03-04
+ */
+
+#ifndef DIAL_TIME_PUBLISHER_H
+#define DIAL_TIME_PUBLISHER_H
+#include <ctime>
+#include <cstdint>
+
+namespace OHOS {
+class DialTimePublisher {
+public:
+    struct TimeInterval {
+        uint8_t start;
+        uint8_t end;
+    };
+    class TimeChangeListener {
+    public:
+        virtual void OnTimeUpdate(const struct tm &curTime) = 0;
+        void SetTimeInervals(TimeInterval *intervals, uint8_t num);
+        bool IsInTimeInterval(const struct tm &curTime);
+        TimeChangeListener(const TimeChangeListener&) = delete;
+        TimeChangeListener& operator=(const TimeChangeListener&) = delete;
+        TimeChangeListener();
+        virtual ~TimeChangeListener();
+    private:
+        TimeInterval *intervals_ = nullptr;
+        uint8_t num_ = 0;
+    };
+
+    virtual void Register(TimeChangeListener *listener) = 0;
+    virtual void Unregister(TimeChangeListener *listener) = 0;
+    virtual void UpdateTime() = 0;
+    static void SetPublisher(DialTimePublisher *publisher);
+    static DialTimePublisher *GetPublisher();
+    virtual ~DialTimePublisher() {}
+
+private:
+    static DialTimePublisher *publisher_;
+}; // class DialTimePublisher
+} // namespace OHOS
+#endif // DIAL_TIME_PUBLISHER_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialViewContainer.h b/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialViewContainer.h
new file mode 100644 (file)
index 0000000..0dd421c
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2025. All rights reserved.
+ * Description: DialViewContainer
+ * Author:
+ * Create: 2025-02-06
+ */
+
+#ifndef DIAL_VIEW_CONTAINER_H
+#define DIAL_VIEW_CONTAINER_H
+#include "components/ui_view_group.h"
+#include "gfx_utils/list.h"
+#include "dial/DialView.h"
+#include "dial/DialDataBase.h"
+
+namespace OHOS {
+class ContainerInterface {
+public:
+    virtual void AddView(UIView* view) = 0;
+
+    virtual void AddView(DialDataType type, DialView* view, bool isPeriodic) = 0;
+
+    virtual ~ContainerInterface() {}
+};
+
+class DialViewContainer : public UIViewGroup, public ContainerInterface {
+public:
+    struct SubView {
+        UIView *view;
+        DialView *dialView;
+        DialDataType type;
+        bool isPeriodic;
+    };
+    DialViewContainer(uint8_t dialviewNum, uint16_t dataSize) :
+        dialViewNum_(dialviewNum), dataSize_(dataSize)
+    {
+        SetTouchable(true);
+    }
+    DialViewContainer() {}
+    ~DialViewContainer() override;
+    DialViewContainer(const DialViewContainer&) = delete;
+    DialViewContainer& operator=(const DialViewContainer&) = delete;
+
+    uint8_t GetDialviewNum() const
+    {
+        return dialViewNum_;
+    }
+
+    uint16_t GetDataSize() const
+    {
+        return dataSize_;
+    }
+
+    void AddView(UIView* view) override;
+
+    void AddView(DialDataType type, DialView* view, bool isPeriodic) override;
+
+    ListNode<SubView>* Begin()
+    {
+        return dialViews_.Begin();
+    }
+
+    const ListNode<SubView>* End()
+    {
+        return dialViews_.End();
+    }
+
+    bool HasInvalidBindData() const
+    {
+        return hasInvalidBindData_;
+    }
+
+    bool RemoveSubView(uint8_t index, SubView &subView);
+
+    bool IsInvalidateBindData(uint8_t index);
+
+private:
+    uint8_t dialViewNum_;
+    uint16_t dataSize_;
+    List<SubView> dialViews_;
+    bool hasInvalidBindData_ = false;
+}; // class DialViewContainer
+} // namesapce OHOS
+#endif // DIAL_VIEW_CONTAINER_H
\ No newline at end of file
index 76ada9f..8c1ed74 100644 (file)
@@ -8,16 +8,21 @@
 #include <unordered_map>
 #include "DialDataBase.h"
 #include "components/ui_view_group.h"
+#include "components/ui_image_animator.h"
+#include "components/ui_label.h"
 #include "OnDialDataUpdateListener.h"
 #include "components/ui_card_page.h"
 #include "components/ui_kaleidoscope_view.h"
 #include "gfx_utils/list.h"
+#include "gfx_utils/vector.h"
 #include "DialView.h"
 #include "DialVideoView.h"
 #include "DialBinTypesV2.h"
+#include "DialViewContainer.h"
+#include "DialSequenceContainer.h"
 
 namespace OHOS {
-class DialViewGroup : public UICardPage, public OnDialDataUpdateListener {
+class DialViewGroup : public UICardPage, public OnDialDataUpdateListener, public ContainerInterface {
 public:
     DialViewGroup();
     ~DialViewGroup() override;
@@ -30,12 +35,12 @@ public:
     /**
     * @brief  Add a view which binds with data of a specific type and could be updated periodically.
     */
-    void AddView(DialDataType type, DialView* view, bool isPeriodic = false);
+    void AddView(DialDataType type, DialView* view, bool isPeriodic) override;
 
     /**
-    * @brief  Add a view. If the view is DialVideoView, the second parameter should be true.
+    * @brief  Add a view.
     */
-    void AddView(UIView* view, bool isDialVideoView = false);
+    void AddView(UIView* view) override;
 
     /**
     * @brief  Add a click rect. When the rect is clicked, it will start a js app with the given bundleName.
@@ -112,13 +117,36 @@ public:
     */
     void OnActive(void) override;
 
-    void OnInactive() override;
+    /**
+    * @brief  This function is invoked when the function SetHorCurrentPage() is called.
+    */
+    void OnInactive(void) override;
+
+    /**
+    * @brief  This function is invoked when SetVerCurrentPage is called and horizontal page is covered.
+    */
+    void OnCovered(void) override;
+
+    /**
+    * @brief  This function is invoked when SetVerCurrentPage is called and horizontal page is not covered.
+    */
+    void OnUncovered(void) override;
+
+    void OnPause() override;
 
     MediaVideoPlay* GetVideoPlay();
 
 private:
     void ProcessData(DialDataType type, DialView* view);
-    std::unordered_map<int16_t, DialView*> dataTypeMap_;
+    void DoStop(void);
+    void DoStart(void);
+    void DoPause(void);
+    void RecordSpecial(UIView *view);
+    void RecordBindData(DialDataType type, DialView* view, bool isPeriodic);
+    void ClearViews();
+    using Views = Graphic::Vector<DialView*>;
+    std::unordered_map<int16_t, Views*> dataTypeMap_;
+    Graphic::Vector<Views*> viewsMemPool_;
     List<DialDataType> periodicUpdateTypes_;
     List<DialDataType> passiveUpdateTypes_;
     List<UIView*> dialViews_;
@@ -141,6 +169,12 @@ private:
     List<DialClick> dialClicks_;
 
     void ClearDial();
+
+    void SetLableAnimatorState(uint8_t state);
+    void SetImgAnimatorState(uint8_t state);
+    List<UILabel*> rollingLabelList_;
+    List<UIImageAnimatorView*> imgAnimList_;
+    List<DialSequenceContainer*> seqList_;
 };
 }
 #endif
index 33bedbe..30c1d1c 100644 (file)
@@ -11,6 +11,7 @@
 #include <unordered_map>
 #include "DialBaseModel.h"
 #include "DialDataBase.h"
+#include "DialOHDataType.h"
 #include "ModelDialDataFactory.h"
 
 namespace OHOS {
@@ -30,6 +31,8 @@ public:
         models_[static_cast<int16_t>(type)] = model;
     }
 
+    bool IsOHBindDataExist(DialOHDataType type) const;
+    bool IsBindDataExist(DialDataType type) const;
     bool RegisterDialDataListener(DialDataType type, OnDialDataUpdateListener* listener);
     bool UnRegisterDialDataListener(DialDataType type);
     bool GetDialTextData(DialDataType& type, std::string*& out, int16_t& strNum);
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/WatchInterface.h b/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/WatchInterface.h
new file mode 100644 (file)
index 0000000..2938ed4
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2025. All rights reserved.
+ * Description: WatchInterface
+ * Author:
+ * Create: 2025-03-17
+ */
+
+#ifndef WATCH_INTERFACE_H
+#define WATCH_INTERFACE_H
+#include <cstdint>
+#include "format_type.h"
+#include "dial_market.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Get all watch face information
+ * @param[out] info Pointer to store the watch face information
+ * @param[out] num Pointer to store the number of watch faces
+ * @param[in] maxCnt Maximum number of watch faces to retrieve
+ * @return bool Returns true if successful, false otherwise
+ */
+bool GetAllWatchFaceInfo(watch_dial_info *info, uint8_t *num, uint8_t maxCnt);
+
+/**
+ * @brief Get information of a specific watch face by UUID
+ * @param[in] uuid Unique identifier of the watch face
+ * @param[out] watch Pointer to store the watch face information
+ * @return bool Returns true if successful, false otherwise
+ */
+bool GetWatchFaceInfo(uint32_t uuid, watch_dial_info *watch);
+
+/**
+ * @brief Get the capability set of the watch
+ * @param[out] capability Pointer to store the watch capability information
+ * @return bool Returns true if successful, false otherwise
+ */
+bool GetWatchCapability(watch_dev_cap_info *capability);
+
+/**
+ * @brief Get system information
+ * @param[out] sysInfo Pointer to store the system information
+ * @return bool Returns true if successful, false otherwise
+ */
+bool GetWatchSystemInfo(watch_sys_info *sysInfo);
+
+/**
+ * @brief Get information of the currently active watch face
+ * @param[out] watch Pointer to store the watch face information
+ * @return bool Returns true if successful, false otherwise
+ */
+bool GetCurrentWatchFaceInfo(watch_dial_info *watch);
+
+/**
+ * @brief Set the currently active watch face by UUID
+ * @param[in] uuid Unique identifier of the watch face to set as active
+ * @return bool Returns true if successful, false otherwise
+ */
+bool SetCurrentWatchFace(uint32_t uuid);
+
+/**
+ * @brief Uninstall a watch face by UUID
+ * @param[in] uuid Unique identifier of the watch face to uninstall
+ * @return bool Returns true if successful, false otherwise
+ * @note If the UUID corresponds to the currently active watch face, it will switch to the default watch face
+ */
+bool UninstallWatch(uint32_t uuid);
+
+/**
+ * @brief Install a watch face from a specified path
+ * @param[in] path Path to the watch face file
+ * @param[out] uuid Pointer to store the unique identifier of the installed watch face
+ * @return bool Returns true if successful, false otherwise
+ * @note If a watch face with the same UUID already exists, it will be replaced
+ */
+bool InstallWatch(const char *path, uint32_t *uuid);
+
+#ifdef __cplusplus
+}
+#endif
+#endif // WATCH_INTERFACE_H
\ No newline at end of file
index ac3c411..dc5b9e3 100644 (file)
@@ -21,6 +21,9 @@ namespace OHOS {
         { COMPASS, PNG_SET_CARD_COMPASS },\r
         { ACTIVITY, PNG_SET_CARD_ACTIVITY },\r
         { MUSIC_PLAYER, PNG_SET_CARD_PLAYER },\r
+        { VIDEO_CARD1, PNG_SET_CARD_VIDEO },\r
+        { VIDEO_CARD2, PNG_SET_CARD_VIDEO },\r
+        { VIDEO_CARD3, PNG_SET_CARD_VIDEO },\r
     };\r
 \r
     const DialInfo dialInfoMap[] = {\r
@@ -82,7 +85,10 @@ namespace OHOS {
                 if (index >= CARD_SETTING_COUNT_MAX) {\r
                     break;\r
                 }\r
-                cardSettings[index++] = (CardId)atoi(setValue);\r
+                int val = atoi(setValue);\r
+                if (val >= 0 && val < CARD_SETTING_COUNT_MAX) {\r
+                    cardSettings[index++] = static_cast<CardId>(val);\r
+                }\r
                 setValue = strtok_s(nullptr, ",", &setBuffer);\r
             }\r
             cardSettingCount = index;\r
@@ -93,6 +99,9 @@ namespace OHOS {
             cardSettings[index++] = COMPASS;\r
             cardSettings[index++] = ACTIVITY;\r
             cardSettings[index++] = MUSIC_PLAYER;\r
+            cardSettings[index++] = VIDEO_CARD1;\r
+            cardSettings[index++] = VIDEO_CARD2;\r
+            cardSettings[index++] = VIDEO_CARD3;\r
             cardSettingCount = index;\r
         }\r
     }\r
index c0d7def..5a0f085 100644 (file)
@@ -81,6 +81,11 @@ void MainPresenterSample::OnPause()
     PageTransitionMgr::GetInstance().SaveSlideBackSnapShotIfNecessary(watchFace);
     watchFace->SetOpaScale(opaScale);
 
+    uint8_t curCardId = view_->GetHorCurrentCard();
+    UICardPage *card = view_->GetViewById(curCardId);
+    if (card != nullptr) {
+        card->OnPause();
+    }
     mainPresenterState_ = MainPresenterState::PAUSE;
 }
 
@@ -173,6 +178,7 @@ void MainPresenterSample::SetPage(int8_t id, bool loadAdjacent)
 
 void MainPresenterSample::SetTaskPeroid(CardId cardId)
 {
+    SetLastRun(0);
     if (cardId == COMPASS) {
         SetPeriod(DEFAULT_TASK_PERIOD);
     } else if (cardId == WATCH_FACE) {
index 3784f1c..b6c8826 100644 (file)
@@ -7,6 +7,7 @@
 #include "wearable_log.h"
 #include "MainViewSample.h"
 #include "graphic_service.h"
+#include "common/image_cache_manager.h"
 
 namespace OHOS {
 static MainViewSample *g_pMainView = nullptr;
@@ -28,6 +29,9 @@ static const MainViewMapper CardMapper[] = {
     {COMPASS, &MainViewSample::InitCompassPage},
     {ACTIVITY, &MainViewSample::InitActivityPage},
     {MUSIC_PLAYER, &MainViewSample::InitMusicPlayerPage},
+    {VIDEO_CARD1, &MainViewSample::InitVideoCardPage1},
+    {VIDEO_CARD2, &MainViewSample::InitVideoCardPage2},
+    {VIDEO_CARD3, &MainViewSample::InitVideoCardPage3},
 };
 
 MainViewSample::MainViewSample()
@@ -66,6 +70,29 @@ MainViewSample::~MainViewSample()
         playersView = nullptr;
     }
 
+    bool hasVideo = false;
+    if (videoCard1 != nullptr) {
+        hasVideo = true;
+        delete videoCard1;
+        videoCard1 = nullptr;
+    }
+
+    if (videoCard2 != nullptr) {
+        hasVideo = true;
+        delete videoCard2;
+        videoCard2 = nullptr;
+    }
+
+    if (videoCard3 != nullptr) {
+        hasVideo = true;
+        delete videoCard3;
+        videoCard3 = nullptr;
+    }
+
+    if (hasVideo) {
+        ImageCacheManager::GetInstance().UnloadSingleRes(PNG_PREVIEW_CARD_VIDEO);
+    }
+
     if (heartRateView != nullptr) {
         delete heartRateView;
         heartRateView = nullptr;
@@ -107,9 +134,6 @@ MainViewSample *MainViewSample::GetInstance(void)
 
 void MainViewSample::OnStart()
 {
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::OnStart");
-    View<MainPresenterSample>::OnStart();
-
     mainSwipeGroup = new UICrossView();
     if (mainSwipeGroup == nullptr) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "mainSwipeGroup new fail");
@@ -311,6 +335,36 @@ UICardPage *MainViewSample::InitMusicPlayerPage(void)
     return playersView;
 }
 
+UICardPage *MainViewSample::InitVideoCardPage1(void)
+{
+    videoCard1 = dynamic_cast<VideoCard*>(InitVideoCardPage(APP_VIDEO_PATH"/noaudio_05.mp4", PNG_PREVIEW_CARD_VIDEO));
+    return videoCard1;
+}
+
+UICardPage *MainViewSample::InitVideoCardPage2(void)
+{
+    videoCard2 = dynamic_cast<VideoCard*>(InitVideoCardPage(APP_VIDEO_PATH"/noaudio_05.mp4", PNG_PREVIEW_CARD_VIDEO));
+    return videoCard2;
+}
+
+UICardPage *MainViewSample::InitVideoCardPage3(void)
+{
+    videoCard3 = dynamic_cast<VideoCard*>(InitVideoCardPage(APP_VIDEO_PATH"/noaudio_05.mp4", PNG_PREVIEW_CARD_VIDEO));
+    return videoCard3;
+}
+
+UICardPage *MainViewSample::InitVideoCardPage(const std::string &video, const std::string &preview)
+{
+    VideoCard *page = new VideoCard;
+    if (page == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "videocard new fail");
+        return nullptr;
+    }
+    page->SetFilePath(video);
+    page->SetPreviewFile(preview);
+    return page;
+}
+
 void MainViewSample::SetPage(int16_t page, bool loadAdjacent)
 {
     if (mainSwipeGroup != nullptr) {
@@ -320,10 +374,37 @@ void MainViewSample::SetPage(int16_t page, bool loadAdjacent)
     if (presenter_ != nullptr) {
         CardId *cardSettings = presenter_->GetCardSettings();
         /* page 与CardId 没有对应关系,需要一次转换 */
-        presenter_->SetTaskPeroid(cardSettings[page]);
+        CardId id = MAX_CARD;
+        for (uint8_t i = 0; i < presenter_->GetCardSettingCount(); ++i) {
+            if (cardSettings[i] < MAX_CARD && recordCard[cardSettings[i]] != nullptr &&
+                recordCard[cardSettings[i]]->GetViewIndex() == page) {
+                id = cardSettings[i];
+            }
+        }
+        presenter_->SetTaskPeroid(id);
     }
 }
 
+void MainViewSample::ReloadWatchFace()
+{
+    if (mainSwipeGroup == nullptr) {
+        return;
+    }
+    mainSwipeGroup->Remove(mainClockView, UISwipeView::HORIZONTAL);
+
+    delete mainClockView;
+    mainClockView = nullptr;
+    recordCard[WATCH_FACE] = InitWatchFacePage();
+    if (recordCard[WATCH_FACE] == nullptr) {
+        GRAPHIC_LOGE("failed to reload main clock");
+        return;
+    }
+    mainSwipeGroup->HorInsert(nullptr, mainClockView);
+
+    SwitchToCard(WATCH_FACE);
+    Draw();
+}
+
 bool MainViewSample::IsMainClockPage(void)
 {
     if (mainSwipeGroup->GetCurrentPageId(0) == mainClockView->GetViewIndex() &&
@@ -339,7 +420,13 @@ CardId MainViewSample::GetHorCurrentCard() const
     CardId *cardSettings = presenter_->GetCardSettings();
     int pageId = mainSwipeGroup->GetCurrentPageId(UISwipeView::HORIZONTAL); // 0: horizontal; 1: vertical
     /* pageId 与CardId 没有对应关系,需要一次转换 */
-    return cardSettings[pageId];
+    for (uint8_t i = 0; i < presenter_->GetCardSettingCount(); ++i) {
+        if (cardSettings[i] < MAX_CARD && recordCard[cardSettings[i]] != nullptr &&
+            recordCard[cardSettings[i]]->GetViewIndex() == pageId) {
+            return cardSettings[i];
+        }
+    }
+    return MAX_CARD;
 }
 
 void MainViewSample::SwitchToCard(uint8_t cardId, bool loadAdjacent)
@@ -350,5 +437,4 @@ void MainViewSample::SwitchToCard(uint8_t cardId, bool loadAdjacent)
         SwitchToClockPage(loadAdjacent);
     }
 }
-
-}
+} // OHOS
index 6704a22..02ce99c 100644 (file)
@@ -129,4 +129,21 @@ void DialArcLabelView::HandleFloatData(float data)
     }
     SetTextWithWildcardInner(tempBuf);
 }
+
+void DialArcLabelView::SetLang(uint8_t lang)
+{
+    language_ = lang;
+    OnLangChange(FontGlobalManager::GetInstance()->GetCurrentLangId());
+}
+
+void DialArcLabelView::OnLangChange(uint8_t langId)
+{
+    if (language_ == FontGlobalManager::INVALID_LANG_ID) {
+        SetVisible(true);
+    } else if (language_ == langId) {
+        SetVisible(true);
+    } else {
+        SetVisible(false);
+    }
+}
 }
\ No newline at end of file
index 6d7bb74..4f31617 100644 (file)
@@ -74,6 +74,18 @@ void DialDigitalImgView::SetParent(UIViewGroup* parent)
     parent_ = parent;
 }
 
+void DialDigitalImgView::OnTimeUpdate(const struct tm &curTime)
+{
+    bool isVisible = false;
+    if (IsInTimeInterval(curTime)) {
+        isVisible = true;
+    }
+    for (uint8_t i = 0; i < imgCnt_; ++i) {
+        imgs_[i]->SetVisible(isVisible);
+    }
+    SetVisible(isVisible);
+}
+
 void DialDigitalImgView::SetDecimalPrecision(uint8_t precision)
 {
     decimalPrecision_ = precision;
@@ -208,6 +220,9 @@ bool DialDigitalImgView::CreateImageViews(float data)
 
 void DialDigitalImgView::HandleFloatData(float data)
 {
+    if (!IsVisible()) {
+        return;
+    }
     if (isValueSet_ && FloatEqual(value_, data)) {
         return;
     }
index b2e41f5..40fd076 100644 (file)
@@ -128,4 +128,21 @@ void DialLabelView::HandleFloatData(float data)
     }
     SetTextWithWildcardInner(tempBuf);
 }
+
+void DialLabelView::SetLang(uint8_t lang)
+{
+    language_ = lang;
+    OnLangChange(FontGlobalManager::GetInstance()->GetCurrentLangId());
+}
+
+void DialLabelView::OnLangChange(uint8_t langId)
+{
+    if (language_ == FontGlobalManager::INVALID_LANG_ID) {
+        SetVisible(true);
+    } else if (language_ == langId) {
+        SetVisible(true);
+    } else {
+        SetVisible(false);
+    }
+}
 }
\ No newline at end of file
index 2af8cd2..aa17d85 100644 (file)
@@ -8,6 +8,7 @@
 #include "sys/time.h"
 #include "RegisterDialModel.h"
 #include "DialModelTime.h"
+#include "components/root_view.h"
 
 #define REGIST_DIAL_MODULE_ANGLE_H(type, func) static OHOS::RegisterDialModel(REGIST_ANGLE_H)(type, func)
 #define REGIST_DIAL_MODULE_ANGLE_M(type, func) static OHOS::RegisterDialModel(REGIST_ANGLE_M)(type, func)
 #define REGIST_DIAL_MODULE_WEEK(type, func) static OHOS::RegisterDialModel(REGIST_WEEK)(type, func)
 #define REGIST_DIAL_MODULE_MOUNTH(type, func) static OHOS::RegisterDialModel(REGIST_MOUNTH)(type, func)
 #define REGIST_DIAL_MODULE_YEAR(type, func) static OHOS::RegisterDialModel(REGIST_YEAR)(type, func)
+#define REGIST_DIAL_MODULE_GEAR_ONE(type, func) static OHOS::RegisterDialModel(REGIST_GEAR_ONE)(type, func)
+#define REGIST_DIAL_MODULE_GEAR_TWO(type, func) static OHOS::RegisterDialModel(REGIST_GEAR_TWO)(type, func)
+#define REGIST_DIAL_MODULE_GEAR_THREE(type, func) static OHOS::RegisterDialModel(REGIST_GEAR_THREE)(type, func)
+#define REGIST_DIAL_MODULE_GEAR_FOUR(type, func) static OHOS::RegisterDialModel(REGIST_GEAR_FOUR)(type, func)
+#define REGIST_DIAL_MODULE_GEAR_FIVE(type, func) static OHOS::RegisterDialModel(REGIST_GEAR_FIVE)(type, func)
+#define REGIST_DIAL_MODULE_GEAR_SIX(type, func) static OHOS::RegisterDialModel(REGIST_GEAR_SIX)(type, func)
 
 REGIST_DIAL_MODULE_ANGLE_H(DialDataType::DATA_TYPE_CLOCK_ANGLE_H, OHOS::DialModelTime::GetInstance());
 REGIST_DIAL_MODULE_ANGLE_M(DialDataType::DATA_TYPE_CLOCK_ANGLE_M, OHOS::DialModelTime::GetInstance());
@@ -35,9 +42,15 @@ REGIST_DIAL_MODULE_WEEK(DialDataType::DATA_TYPE_TIME_WEEK, OHOS::DialModelTime::
 REGIST_DIAL_MODULE_MOUNTH(DialDataType::DATA_TYPE_TIME_MONTH, OHOS::DialModelTime::GetInstance());
 REGIST_DIAL_MODULE_YEAR(DialDataType::DATA_TYPE_TIME_YEAR, OHOS::DialModelTime::GetInstance());
 
+REGIST_DIAL_MODULE_GEAR_ONE(DialDataType::DATA_TYPE_SWIVEL_GEAR_ONE, OHOS::DialModelTime::GetInstance());
+REGIST_DIAL_MODULE_GEAR_TWO(DialDataType::DATA_TYPE_SWIVEL_GEAR_TWO, OHOS::DialModelTime::GetInstance());
+REGIST_DIAL_MODULE_GEAR_THREE(DialDataType::DATA_TYPE_SWIVEL_GEAR_THREE, OHOS::DialModelTime::GetInstance());
+REGIST_DIAL_MODULE_GEAR_FOUR(DialDataType::DATA_TYPE_SWIVEL_GEAR_FOUR, OHOS::DialModelTime::GetInstance());
+REGIST_DIAL_MODULE_GEAR_FIVE(DialDataType::DATA_TYPE_SWIVEL_GEAR_FIVE, OHOS::DialModelTime::GetInstance());
+REGIST_DIAL_MODULE_GEAR_SIX(DialDataType::DATA_TYPE_SWIVEL_GEAR_SIX, OHOS::DialModelTime::GetInstance());
+
 namespace OHOS {
 static constexpr int16_t S_MS_US_TRANS = 1000;      // 1000: seconds, milliseconds, microsecond transform value
-static constexpr uint16_t CIRCLE_IN_DEGREE = 360;   // 360: A full rotation: 360 degrees
 static constexpr uint8_t ONE_MINUTE_IN_SECOND = 60; // 60: 60 seconds per minute
 static constexpr uint8_t ONE_HOUR_IN_MINUTE = 60;   // 60: 60 minutes per hour
 static constexpr uint8_t HALF_DAY_IN_HOUR = 12;     // 60: 12 hours every half day
@@ -79,6 +92,45 @@ void DialModelTime::UpdateTime()
     angleM_ = ConvertHandValueToAngle(tblock_->tm_min, ONE_HOUR_IN_MINUTE, tblock_->tm_sec, ONE_MINUTE_IN_SECOND);
     angleS_ = ConvertHandValueToAngle(tblock_->tm_sec, ONE_MINUTE_IN_SECOND, 0, 1);
     angleMS_ = ConvertHandSecondValueToAngle(realMS, S_MS_US_TRANS * ONE_MINUTE_IN_SECOND);
+    
+    if (tblock_ == nullptr) {
+        return;
+    }
+    for (ListNode<TimeChangeListener*>* node = listeners_.Head(); node != listeners_.End(); node = node->next_) {
+        TimeChangeListener *listener = node->data_;
+        if (listener != nullptr) {
+            listener->OnTimeUpdate(*tblock_);
+        }
+    }
+    RootView::GetInstance()->Invalidate();
+}
+
+void DialModelTime::Register(TimeChangeListener* listener)
+{
+    if (listener == nullptr) {
+        return;
+    }
+    for (ListNode<TimeChangeListener*>* node = listeners_.Head(); node != listeners_.End(); node = node->next_) {
+        TimeChangeListener *tmp = node->data_;
+        if (tmp == listener) {
+            return;
+        }
+    }
+    listeners_.PushBack(listener);
+}
+
+void DialModelTime::Unregister(TimeChangeListener* listener)
+{
+    if (listener == nullptr) {
+        return;
+    }
+    for (ListNode<TimeChangeListener*>* node = listeners_.Head(); node != listeners_.End(); node = node->next_) {
+        TimeChangeListener *tmp = node->data_;
+        if (tmp == listener) {
+            listeners_.Remove(node);
+            return;
+        }
+    }
 }
 
 bool DialModelTime::GetDialFloatData(DialDataType& type, float& out)
@@ -121,6 +173,22 @@ bool DialModelTime::GetDialFloatData(DialDataType& type, float& out)
         case DialDataType::DATA_TYPE_TIME_SECOND:
             out = static_cast<float>(tblock_->tm_sec);
             break;
+        case DialDataType::DATA_TYPE_SWIVEL_GEAR_TWO:
+        case DialDataType::DATA_TYPE_SWIVEL_GEAR_THREE:
+        case DialDataType::DATA_TYPE_SWIVEL_GEAR_FIVE: {
+            float coeff = 6.0f;  // 6.0: coeff
+            float accleratedAngle = angleMS_ * coeff - floor(angleMS_ * coeff / CIRCLE_IN_DEGREE) * CIRCLE_IN_DEGREE;
+            out = static_cast<float>(accleratedAngle * -1.0 + CIRCLE_IN_DEGREE);
+            break;
+        }
+        case DialDataType::DATA_TYPE_SWIVEL_GEAR_ONE:
+        case DialDataType::DATA_TYPE_SWIVEL_GEAR_FOUR:
+        case DialDataType::DATA_TYPE_SWIVEL_GEAR_SIX: {
+            float coeff = 6.0f;  // 6.0: coeff
+            float accleratedAngle = angleMS_ * coeff - floor(angleMS_ * coeff / CIRCLE_IN_DEGREE) * CIRCLE_IN_DEGREE;
+            out = static_cast<float>(accleratedAngle);
+            break;
+        }
         default:
             return false;
     }
index 8c78ad4..980d438 100644 (file)
@@ -53,4 +53,32 @@ void DialOptionImgView::HandleFloatData(float data)
     selected_ = selected;
     SetSrc(&info_[selected_]);
 }
+
+void DialOptionImgView::SetLang(uint8_t lang)
+{
+    language_ = lang;
+    OnLangChange(FontGlobalManager::GetInstance()->GetCurrentLangId());
+}
+
+void DialOptionImgView::OnLangChange(uint8_t langId)
+{
+    if (language_ == FontGlobalManager::INVALID_LANG_ID) {
+        langVisible_ = true;
+    } else if (language_ == langId) {
+        langVisible_ = true;
+    } else {
+        langVisible_ = false;
+    }
+    SetVisible(langVisible_ && timeVisible_);
+}
+
+void DialOptionImgView::OnTimeUpdate(const struct tm &curTime)
+{
+    if (IsInTimeInterval(curTime)) {
+        timeVisible_ = true;
+    } else {
+        timeVisible_ = false;
+    }
+    SetVisible(langVisible_ && timeVisible_);
+}
 }
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialSequenceContainer.cpp b/code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialSequenceContainer.cpp
new file mode 100644 (file)
index 0000000..4024f46
--- /dev/null
@@ -0,0 +1,228 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2025. All rights reserved.
+ * Description: DialSequenceContainer
+ * Author:
+ * Create: 2025-03-05
+ */
+
+#include "DialSequenceContainer.h"
+
+namespace OHOS {
+DialSequenceContainer::DialSequenceContainer()
+{
+    SetTouchable(true);
+    SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);
+    memset_s(nonCycleView_, sizeof(nonCycleView_), 0, sizeof(nonCycleView_));
+}
+
+DialSequenceContainer::~DialSequenceContainer()
+{
+    if (repeatView_ != nullptr) {
+        delete repeatView_;
+        repeatView_ = nullptr;
+    }
+
+    for (uint8_t i = 0; i < nonCycleNum_; ++i) {
+        delete nonCycleView_[i];
+        nonCycleView_[i] = nullptr;
+    }
+    nonCycleNum_ = 0;
+    curView_ = nullptr;
+}
+
+bool DialSequenceContainer::AddSequenceRes(uint16_t interval, bool repeat,
+    const ImageAnimatorInfo *imgSrc, uint8_t imgNum)
+{
+    if (imgSrc == nullptr || imgNum == 0) {
+        return false;
+    }
+
+    // add animator images to view
+    if (repeat) {
+        if (repeatView_ != nullptr) {
+            GRAPHIC_LOGE("the repeat seq view has existed!");
+            return false;
+        }
+        repeatView_ = new UIImageAnimatorView;
+        repeatView_->SetImageAnimatorSrc(imgSrc, imgNum, interval);
+        repeatView_->SetRepeat(false);
+    } else {
+        if (nonCycleNum_ >= sizeof(nonCycleView_) / sizeof(nonCycleView_[0])) {
+            GRAPHIC_LOGE("non cycle seq views have been exceedeed!");
+            return false;
+        }
+        nonCycleView_[nonCycleNum_] = new UIImageAnimatorView;
+        nonCycleView_[nonCycleNum_]->SetImageAnimatorSrc(imgSrc, imgNum, interval);
+        nonCycleView_[nonCycleNum_]->SetRepeat(false);
+        ++nonCycleNum_;
+    }
+
+    // update rect area
+    Rect rect(GetRelativeRect());
+    for (uint8_t i = 0; i < imgNum; ++i) {
+        rect.JoinRect(rect,
+            Rect(rect.GetX(),
+                rect.GetY(),
+                rect.GetX() + imgSrc[i].width - 1,
+                rect.GetY() + imgSrc[i].height - 1));
+    }
+    rect.JoinRect(rect, GetRelativeRect());
+    SetPosition(rect.GetX(), rect.GetY());
+    SetWidth(rect.GetWidth());
+    SetHeight(rect.GetHeight());
+    Invalidate();
+    
+    return true;
+}
+
+bool DialSequenceContainer::OnClickEvent(const ClickEvent& event)
+{
+    if (curView_ == nullptr) {
+        return false;
+    }
+    uint8_t curState = curView_->GetState();
+    switch (curState) {
+        case Animator::STOP: {
+            if (curView_ == repeatView_) {
+                isClick_ = true;
+            } else {
+                UpdateCurrentView();
+                Start();
+            }
+            break;
+        }
+        case Animator::PAUSE: {
+            return false;
+        }
+        case Animator::RUNNING:
+        case Animator::START: {
+            if (curView_ == repeatView_) {
+                isClick_ = true;
+            }
+            break;
+        }
+        default: {
+            GRAPHIC_LOGE("error state");
+        }
+    }
+    
+    return UIViewGroup::OnClickEvent(event);
+}
+
+void DialSequenceContainer::Start()
+{
+    if (curView_ != nullptr) {
+        curView_->Start();
+        return;
+    }
+
+    UpdateCurrentView();
+    if (curView_ == nullptr) {
+        return;
+    }
+    curView_->Start();
+}
+
+void DialSequenceContainer::Stop()
+{
+    if (curView_ != nullptr) {
+        curView_->Stop();
+        return;
+    }
+
+    UpdateCurrentView();
+    if (curView_ == nullptr) {
+        return;
+    }
+    curView_->Stop();
+}
+
+void DialSequenceContainer::Pause()
+{
+    if (curView_ != nullptr) {
+        curView_->Pause();
+        return;
+    }
+
+    UpdateCurrentView();
+    if (curView_ == nullptr) {
+        return;
+    }
+    curView_->Pause();
+}
+
+void DialSequenceContainer::Resume()
+{
+    if (curView_ != nullptr) {
+        curView_->Resume();
+        return;
+    }
+
+    UpdateCurrentView();
+    if (curView_ == nullptr) {
+        return;
+    }
+    curView_->Resume();
+}
+
+void DialSequenceContainer::OnAnimatorStop(UIView& view)
+{
+    bool isClick = isClick_;
+    isClick_ = false;
+    bool isRepeat = (curView_ == repeatView_);
+    if (isRepeat && isClick) {
+        UpdateCurrentView();
+        Start();
+    } else if (isRepeat && !isClick) {
+        Start();
+    } else {
+        if (repeatView_ != nullptr) {
+            UpdateCurrentView();
+            Start();
+        }
+    }
+}
+
+void DialSequenceContainer::UpdateCurrentView()
+{
+    if (curView_ != nullptr) {
+        if (repeatView_ != nullptr && nonCycleNum_ == 0) {
+            return;
+        } else if (repeatView_ == nullptr && nonCycleNum_ != 0) {
+            Remove(curView_);
+            curView_ = nonCycleView_[loop_];
+            loop_ = (loop_ + 1) % nonCycleNum_;
+            curView_->SetAnimatorStopListener(this);
+            Add(curView_);
+            Invalidate();
+            return;
+        }
+
+        // both repeat and noncycle exist
+        Remove(curView_);
+        if (curView_ == repeatView_) {
+            curView_ = nonCycleView_[loop_];
+            loop_ = (loop_ + 1) % nonCycleNum_;
+        } else {
+            curView_ = repeatView_;
+        }
+        curView_->SetAnimatorStopListener(this);
+        Add(curView_);
+        Invalidate();
+        return;
+    }
+
+    if (repeatView_ != nullptr) {
+        curView_ = repeatView_;
+    } else if (nonCycleNum_ != 0) {
+        curView_ = nonCycleView_[loop_];
+        loop_ = (loop_ + 1) % nonCycleNum_;
+    } else {
+        GRAPHIC_LOGE("sequence img has not been added!");
+        return;
+    }
+    curView_->SetAnimatorStopListener(this);
+    Add(curView_);
+    Invalidate();
+}
+} // namespace OHOS
index dd3126f..ffc87a7 100644 (file)
@@ -10,5 +10,74 @@ DialStaticImgView::DialStaticImgView()
     SetAutoEnable(true);
 }
 
-DialStaticImgView::~DialStaticImgView() {}
+DialStaticImgView::~DialStaticImgView()
+{
+    if (info_ != nullptr) {
+        UIFree(info_);
+        info_ = nullptr;
+    }
+}
+
+void DialStaticImgView::SetLang(uint8_t lang)
+{
+    language_ = lang;
+    OnLangChange(FontGlobalManager::GetInstance()->GetCurrentLangId());
+}
+
+void DialStaticImgView::OnLangChange(uint8_t langId)
+{
+    if (language_ == FontGlobalManager::INVALID_LANG_ID) {
+        langVisible_ = true;
+    } else if (language_ == langId) {
+        langVisible_ = true;
+    } else {
+        langVisible_ = false;
+    }
+    SetVisible(langVisible_ && timeVisible_);
+}
+
+bool DialStaticImgView::SetImgs(const ImageInfo* src, uint8_t num)
+{
+    if (src == nullptr || num == 0) {
+        return false;
+    }
+    if (info_ != nullptr) {
+        UIFree(info_);
+        info_ = nullptr;
+    }
+    uint32_t size = sizeof(ImageInfo) * num;
+    info_ = static_cast<ImageInfo*>(UIMalloc(size));
+    if (info_ == nullptr) {
+        return false;
+    }
+    if (memcpy_s(info_, size, src, size) != EOK) {
+        UIFree(info_);
+        return false;
+    }
+    infoNum_ = num;
+    selected_ = 0;
+    SetSrc(&info_[selected_]);
+    SetTouchable(infoNum_ > 1);
+    return true;
+}
+
+bool DialStaticImgView::OnClickEvent(const ClickEvent& event)
+{
+    if (selected_ < 0 || info_ == nullptr || infoNum_ == 0) {
+        return false;
+    }
+    selected_ = (selected_ + 1) % infoNum_;
+    SetSrc(&info_[selected_]);
+    return true;
+}
+
+void DialStaticImgView::OnTimeUpdate(const struct tm &curTime)
+{
+    if (IsInTimeInterval(curTime)) {
+        timeVisible_ = true;
+    } else {
+        timeVisible_ = false;
+    }
+    SetVisible(langVisible_ && timeVisible_);
+}
 }
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialTimePublisher.cpp b/code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialTimePublisher.cpp
new file mode 100644 (file)
index 0000000..cb4539b
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2025. All rights reserved.
+ * Description: DialTimePublisher
+ * Author:
+ * Create: 2025-03-04
+ */
+
+#include "DialTimePublisher.h"
+#include "securec.h"
+#include "gfx_utils/mem_api.h"
+#include "gfx_utils/graphic_log.h"
+
+namespace OHOS {
+DialTimePublisher *DialTimePublisher::publisher_ = nullptr;
+
+void DialTimePublisher::TimeChangeListener::SetTimeInervals(TimeInterval *intervals, uint8_t num)
+{
+    if (intervals == nullptr || num == 0) {
+        return;
+    }
+    if (intervals_ != nullptr) {
+        UIFree(intervals_);
+        intervals_ = nullptr;
+    }
+    num_ = 0;
+
+    intervals_ = static_cast<TimeInterval*>(UIMalloc(sizeof(TimeInterval) * num));
+    if (intervals_ == nullptr) {
+        GRAPHIC_LOGE("failed to malloc!");
+        return;
+    }
+    num_ = num;
+    memcpy_s(intervals_, sizeof(TimeInterval) * num, intervals, sizeof(TimeInterval) * num);
+}
+
+bool DialTimePublisher::TimeChangeListener::IsInTimeInterval(const struct tm &curTime)
+{
+    if (num_ == 0) { // 0-24
+        return true;
+    }
+    for (uint8_t i = 0; i < num_; ++i) {
+        if (intervals_[i].start <= curTime.tm_hour && intervals_[i].end > curTime.tm_hour) {
+            return true;
+        }
+    }
+    return false;
+}
+
+DialTimePublisher::TimeChangeListener::TimeChangeListener()
+{
+    if (DialTimePublisher::GetPublisher() != nullptr) {
+        DialTimePublisher::GetPublisher()->Register(this);
+    }
+}
+
+DialTimePublisher::TimeChangeListener::~TimeChangeListener()
+{
+    if (intervals_ != nullptr) {
+        UIFree(intervals_);
+        intervals_ = nullptr;
+    }
+    num_ = 0;
+    if (DialTimePublisher::GetPublisher() != nullptr) {
+        DialTimePublisher::GetPublisher()->Unregister(this);
+    }
+}
+
+void DialTimePublisher::SetPublisher(DialTimePublisher *publisher)
+{
+    publisher_ = publisher;
+}
+
+DialTimePublisher *DialTimePublisher::GetPublisher()
+{
+    return publisher_;
+}
+} // namespace OHOS
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialViewContainer.cpp b/code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialViewContainer.cpp
new file mode 100644 (file)
index 0000000..6db0860
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2025. All rights reserved.
+ * Description: DialViewContainer
+ * Author:
+ * Create: 2025-02-06
+ */
+
+#include "DialViewContainer.h"
+#include "DialDigitalImgView.h"
+
+namespace OHOS {
+DialViewContainer::~DialViewContainer()
+{
+    ListNode<SubView>* viewNode = dialViews_.Head();
+    while (viewNode != dialViews_.End()) {
+        UIViewGroup::Remove(viewNode->data_.view);
+        delete viewNode->data_.view;
+        viewNode = viewNode->next_;
+    }
+    dialViews_.Clear();
+}
+
+void DialViewContainer::AddView(UIView* view)
+{
+    if (view == nullptr) {
+        return;
+    }
+    Add(view);
+    SubView info = {
+        .view = view,
+        .dialView = nullptr,
+    };
+    DialViewContainer *container = dynamic_cast<DialViewContainer*>(view);
+    if (container != nullptr && container->HasInvalidBindData()) {
+        hasInvalidBindData_ = true;
+    }
+    dialViews_.PushBack(info);
+}
+
+void DialViewContainer::AddView(DialDataType type, DialView* view, bool isPeriodic)
+{
+    if (view == nullptr) {
+        return;
+    }
+    UIView *uiView = dynamic_cast<UIView*>(view);
+    if (uiView == nullptr) {
+        return;
+    }
+    Add(uiView);
+    DialDigitalImgView *digital = dynamic_cast<DialDigitalImgView*>(view);
+    if (digital != nullptr) {
+        digital->SetParent(this);
+    }
+    SubView info = {
+        .view = uiView,
+        .dialView = view,
+        .type = type,
+        .isPeriodic = isPeriodic
+    };
+    if (type == DialDataType::DATA_TYPE_MAX) {
+        hasInvalidBindData_ = true;
+    }
+    dialViews_.PushBack(info);
+}
+
+bool DialViewContainer::RemoveSubView(uint8_t index, SubView &subView)
+{
+    if (index >= dialViews_.Size()) {
+        return false;
+    }
+    ListNode<SubView> *it = Begin();
+    for (uint8_t i = 0; i < index; ++i) {
+        it = it->next_;
+    }
+    subView = it->data_;
+    Remove(subView.view);
+    DialDigitalImgView *digital = dynamic_cast<DialDigitalImgView*>(subView.view);
+    if (digital != nullptr) {
+        digital->SetParent(nullptr);
+    }
+    dialViews_.Remove(it);
+    return true;
+}
+
+bool DialViewContainer::IsInvalidateBindData(uint8_t index)
+{
+    if (index >= dialViews_.Size()) {
+        return false;
+    }
+    ListNode<SubView> *it = Begin();
+    for (uint8_t i = 0; i < index; ++i) {
+        it = it->next_;
+    }
+    if (it->data_.dialView != nullptr && it->data_.type == DialDataType::DATA_TYPE_MAX) {
+        return true;
+    }
+    DialViewContainer *container = dynamic_cast<DialViewContainer*>(it->data_.view);
+    if (container != nullptr) {
+        return container->HasInvalidBindData();
+    }
+    return false;
+}
+} // namespace OHOS
\ No newline at end of file
index ef1979f..8d70537 100644 (file)
 #include "ui_screennotify.h"
 #endif
 #include "MainPresenterSample.h"
+#include "DialDigitalImgView.h"
 
 namespace OHOS {
-static DialVideoView* g_video = nullptr;
-
-#ifdef SUPPORT_OHOSFWK
-static void ScreenStatusNotify(ScreenStatus status)
-{
-    if (g_video == nullptr) {
-        return;
-    }
-    if (status == SCREEN_STATUS_OFF) {
-        g_video->PausePlay();
-    } else if (status == SCREEN_STATUS_ON) {
-        if (g_video->IsPaused()) {
-            g_video->ResumePlay();
-        } else if (!g_video->IsPlayed()) {
-            g_video->StartPlay();
-        }
-    }
-}
-#endif
-
 DialViewGroup::DialViewGroup(void)
 {
     SetTouchable(true);
@@ -43,12 +24,6 @@ DialViewGroup::DialViewGroup(void)
 
 DialViewGroup::~DialViewGroup(void)
 {
-    if (video_ != nullptr) {
-#ifdef SUPPORT_OHOSFWK
-        deregisterNotifyScreenStatus(ScreenStatusNotify);
-#endif
-        g_video = nullptr;
-    }
     if (kaleidoscope_ != nullptr) {
         kaleidoscope_->ClearFocus();
         kaleidoscope_ = nullptr;
@@ -79,7 +54,7 @@ void DialViewGroup::ClearDial()
 
     periodicUpdateTypes_.Clear();
 
-    dataTypeMap_.clear();
+    ClearViews();
 
     ListNode<UIView*>* viewNode = dialViews_.Head();
     while (viewNode != dialViews_.End()) {
@@ -89,6 +64,10 @@ void DialViewGroup::ClearDial()
     }
     dialViews_.Clear();
 
+    rollingLabelList_.Clear();
+    imgAnimList_.Clear();
+    seqList_.Clear();
+
     period_ = DEFAULT_TASK_PERIOD;
 
     video_ = nullptr;
@@ -139,47 +118,151 @@ void DialViewGroup::ProcessData(DialDataType type, DialView* view)
         view->HandleFloatData(floatsData, num);
     }
 }
+void DialViewGroup::DoStop(void)
+{
+    SetLableAnimatorState(Animator::PAUSE);
+    SetImgAnimatorState(Animator::PAUSE);
+    if (video_ != nullptr && !video_->IsStopped()) {
+        video_->StopPlay();
+    }
+    if (kaleidoscope_ != nullptr) {
+        kaleidoscope_->StopRotateAnimator();
+        kaleidoscope_->ClearFocus();
+    }
+}
 
-void DialViewGroup::AddView(UIView* view, bool isDialVideoView)
+void DialViewGroup::DoStart(void)
 {
-    if (view == nullptr) {
-        GRAPHIC_LOGE("Parameter is nullptr.\n");
-        return;
+    SetLableAnimatorState(Animator::START);
+    SetImgAnimatorState(Animator::START);
+    if (video_ != nullptr) {
+        if (video_->IsPaused()) {
+            video_->ResumePlay();
+        } else if (!video_->IsPlayed()) {
+            video_->StartPlay();
+        }
     }
-    dialViews_.PushBack(view);
-    Add(view);
+    if (kaleidoscope_ != nullptr) {
+        kaleidoscope_->RequestFocus();
+        kaleidoscope_->StartRotateAnimator();
+    }
+}
 
-    if (view->GetViewType() == UI_KALEIDOSCOPE_VIEW) {
-        kaleidoscope_ = dynamic_cast<UIKaleidoscopeView*>(view);
+void DialViewGroup::DoPause(void)
+{
+    SetLableAnimatorState(Animator::PAUSE);
+    SetImgAnimatorState(Animator::PAUSE);
+    if (kaleidoscope_ != nullptr) {
+        kaleidoscope_->StopRotateAnimator();
+        kaleidoscope_->ClearFocus();
     }
+    if (video_ != nullptr) {
+        video_->PausePlay();
+    }
+}
 
-    if (isDialVideoView) {
+void DialViewGroup::RecordSpecial(UIView *view)
+{
+    if (dynamic_cast<UILabel*>(view) != nullptr) {
+        UILabel* label = dynamic_cast<UILabel*>(view);
+        uint8_t mode = label->GetLineBreakMode();
+        if (mode == UILabel::LINE_BREAK_MARQUEE || mode == UILabel::LINE_BREAK_OSCILLATION) {
+            rollingLabelList_.PushBack(label);
+        }
+    } else if (dynamic_cast<UIImageAnimatorView*>(view) != nullptr) {
+        UIImageAnimatorView* imgAnim = dynamic_cast<UIImageAnimatorView*>(view);
+        imgAnimList_.PushBack(imgAnim);
+    } else if (dynamic_cast<UIKaleidoscopeView*>(view) != nullptr) {
+        kaleidoscope_ = dynamic_cast<UIKaleidoscopeView*>(view);
+    } else if (dynamic_cast<UILiteSurfaceView*>(view) != nullptr) {
         if (video_ != nullptr) {
             GRAPHIC_LOGE("Already added a video view.\n");
             return;
         }
         video_ = reinterpret_cast<DialVideoView*>(view);
-        g_video = video_;
-#ifdef SUPPORT_OHOSFWK
-        registerNotifyScreenStatus(ScreenStatusNotify);
-#endif
+    } else if (dynamic_cast<DialSequenceContainer*>(view) != nullptr) {
+        DialSequenceContainer *seq = dynamic_cast<DialSequenceContainer*>(view);
+        seqList_.PushBack(seq);
     }
 }
 
-void DialViewGroup::AddView(DialDataType type, DialView* view, bool isPeriodic)
+void DialViewGroup::RecordBindData(DialDataType type, DialView* view, bool isPeriodic)
 {
-    if (view == nullptr) {
-        GRAPHIC_LOGE("Parameter is nullptr.\n");
-        return;
+    if (dynamic_cast<UILabel*>(view) != nullptr) {
+        UILabel* label = dynamic_cast<UILabel*>(view);
+        uint8_t mode = label->GetLineBreakMode();
+        if (mode == UILabel::LINE_BREAK_MARQUEE || mode == UILabel::LINE_BREAK_OSCILLATION) {
+            rollingLabelList_.PushBack(label);
+        }
     }
 
-    dataTypeMap_.insert(std::make_pair(static_cast<int16_t>(type), view));
+    auto it = dataTypeMap_.find(static_cast<int16_t>(type));
+    if (it != dataTypeMap_.end()) {
+        it->second->PushBack(view);
+    } else {
+        Views *container = new Views;
+        if (container == nullptr) {
+            GRAPHIC_LOGE("failed to alloc binddata container");
+            return;
+        }
+        container->PushBack(view);
+        dataTypeMap_.insert(std::make_pair(static_cast<int16_t>(type), container));
+        viewsMemPool_.PushBack(container);
+    }
     if (isPeriodic) {
         periodicUpdateTypes_.PushBack(type);
     } else {
         ModelDialDataFactory::GetInstance().RegisterDialDataListener(type, this);
         passiveUpdateTypes_.PushBack(type);
     }
+}
+
+void DialViewGroup::ClearViews()
+{
+    dataTypeMap_.clear();
+    for (uint16_t i = 0; i < viewsMemPool_.Size(); ++i) {
+        delete viewsMemPool_[i];
+    }
+    viewsMemPool_.Clear();
+}
+
+void DialViewGroup::AddView(UIView* view)
+{
+    if (view == nullptr) {
+        GRAPHIC_LOGE("Parameter is nullptr.\n");
+        return;
+    }
+    dialViews_.PushBack(view);
+    Add(view);
+    DialViewContainer *container = dynamic_cast<DialViewContainer*>(view);
+    if (container != nullptr) {
+        ListNode<DialViewContainer::SubView> *head = container->Begin();
+        for (;head != container->End(); head = head->next_) {
+            DialViewContainer::SubView &subView = head->data_;
+            if (subView.dialView != nullptr) {
+                RecordBindData(subView.type, subView.dialView, subView.isPeriodic);
+                ProcessData(subView.type, subView.dialView);
+            } else if (subView.view != nullptr) {
+                RecordSpecial(subView.view);
+            }
+        }
+    } else {
+        RecordSpecial(view);
+    }
+}
+
+void DialViewGroup::AddView(DialDataType type, DialView* view, bool isPeriodic)
+{
+    if (view == nullptr) {
+        GRAPHIC_LOGE("Parameter is nullptr.\n");
+        return;
+    }
+
+    DialDigitalImgView *digital = dynamic_cast<DialDigitalImgView*>(view);
+    if (digital != nullptr) {
+        digital->SetParent(this);
+    }
+    RecordBindData(type, view, isPeriodic);
     dialViews_.PushBack(dynamic_cast<UIView*>(view));
     Add(dynamic_cast<UIView*>(view));
     ProcessData(type, view);
@@ -206,7 +289,10 @@ void DialViewGroup::UpdateViewsByPeriodicUpdateData()
         DialDataType type = node->data_;
         auto iter = dataTypeMap_.find(static_cast<int16_t>(type));
         if (iter != dataTypeMap_.end()) {
-            ProcessData(type, iter->second);
+            Views *container = iter->second;
+            for (uint16_t i = 0; i < container->Size(); ++i) {
+                ProcessData(type, (*container)[i]);
+            }
         }
         node = node->next_;
     }
@@ -219,8 +305,11 @@ void DialViewGroup::OnDialFloatDataUpdate(DialDataType type, float data)
 {
     auto iter = dataTypeMap_.find(static_cast<int16_t>(type));
     if (iter != dataTypeMap_.end()) {
-        DialView* view = iter->second;
-        view->HandleFloatData(data);
+        Views *container = iter->second;
+        for (uint16_t i = 0; i < container->Size(); ++i) {
+            DialView* view = (*container)[i];
+            view->HandleFloatData(data);
+        }
     }
 }
 
@@ -228,8 +317,11 @@ void DialViewGroup::OnDialFloatDataUpdate(DialDataType type, const float* data,
 {
     auto iter = dataTypeMap_.find(static_cast<int16_t>(type));
     if (iter != dataTypeMap_.end()) {
-        DialView* view = iter->second;
-        view->HandleFloatData(data, num);
+        Views *container = iter->second;
+        for (uint16_t i = 0; i < container->Size(); ++i) {
+            DialView* view = (*container)[i];
+            view->HandleFloatData(data, num);
+        }
     }
 }
 
@@ -237,8 +329,11 @@ void DialViewGroup::OnDialTextDataUpdate(DialDataType type, const std::string* d
 {
     auto iter = dataTypeMap_.find(static_cast<int16_t>(type));
     if (iter != dataTypeMap_.end()) {
-        DialView* view = iter->second;
-        view->HandleTextData(data, num);
+        Views *container = iter->second;
+        for (uint16_t i = 0; i < container->Size(); ++i) {
+            DialView* view = (*container)[i];
+            view->HandleTextData(data, num);
+        }
     }
 }
 
@@ -295,18 +390,9 @@ bool DialViewGroup::OnClickEvent(const ClickEvent& event)
 
 void DialViewGroup::ScrollBegin(bool isActive)
 {
-    if (kaleidoscope_ != nullptr) {
-        if (isActive) {
-            kaleidoscope_->ClearFocus();
-            kaleidoscope_->StopRotateAnimator();
-        }
-        return;
-    }
-
-    if (video_ == nullptr) {
-        return;
+    if (isActive) {
+        DoPause();
     }
-    video_->PausePlay();
 }
 
 void DialViewGroup::ScrollEnd(bool isActive)
@@ -316,111 +402,75 @@ void DialViewGroup::ScrollEnd(bool isActive)
         return;
     }
 
-    if (kaleidoscope_ != nullptr) {
-        if (isActive) {
-            kaleidoscope_->StartRotateAnimator();
-            kaleidoscope_->RequestFocus();
-        }
-        return;
-    }
-
-    if (video_ == nullptr) {
-        return;
-    }
-
     if (isActive) {
-        if (video_->IsPaused()) {
-            video_->ResumePlay();
-        } else if (!video_->IsPlayed()) {
-            video_->StartPlay();
-        }
-        g_video = video_;
+        DoStart();
     } else {
-        if (!video_->IsStopped()) {
+        if (video_ != nullptr && !video_->IsStopped()) {
             video_->StopPlay();
         }
-        ClearCache();
-        g_video = nullptr;
+        if (video_ != nullptr) {
+            ClearCache();
+        }
     }
 }
 
 void DialViewGroup::CoverBegin(bool isCovered)
 {
-    if (kaleidoscope_ != nullptr) {
-        if (!isCovered) {
-            kaleidoscope_->StopRotateAnimator();
-            kaleidoscope_->ClearFocus();
-        }
-        return;
+    if (!isCovered) {
+        DoPause();
     }
+}
 
-    if (video_ == nullptr) {
+void DialViewGroup::CoverEnd(bool isCovered)
+{
+    MainPresenterSample* mainPresenter = MainPresenterSample::GetInstance();
+    if ((mainPresenter == nullptr) || (mainPresenter->GetMainPresenterState() != MainPresenterState::RESUME)) {
         return;
     }
 
-    video_->PausePlay();
+    if (!isCovered) {
+        DoStart();
+    }
 }
 
-void DialViewGroup::CoverEnd(bool isCovered)
+void DialViewGroup::OnActive(void)
 {
     MainPresenterSample* mainPresenter = MainPresenterSample::GetInstance();
     if ((mainPresenter == nullptr) || (mainPresenter->GetMainPresenterState() != MainPresenterState::RESUME)) {
         return;
     }
 
-    if (kaleidoscope_ != nullptr) {
-        if (!isCovered) {
-            kaleidoscope_->RequestFocus();
-            kaleidoscope_->StartRotateAnimator();
-        }
-        return;
-    }
-    if (video_ == nullptr) {
+    DoStart();
+}
+
+void DialViewGroup::OnInactive(void)
+{
+    DoStop();
+}
+
+void DialViewGroup::OnCovered(void)
+{
+    MainPresenterSample* mainPresenter = MainPresenterSample::GetInstance();
+    if ((mainPresenter == nullptr) || (mainPresenter->GetMainPresenterState() != MainPresenterState::RESUME)) {
         return;
     }
-    if (isCovered) {
-        g_video = nullptr;
-    } else {
-        if (video_->IsPaused()) {
-            video_->ResumePlay();
-        } else if (!video_->IsPlayed()) {
-            video_->StartPlay();
-        }
-        g_video = video_;
-    }
+
+    DoPause();
 }
 
-void DialViewGroup::OnActive(void)
+void DialViewGroup::OnUncovered(void)
 {
     MainPresenterSample* mainPresenter = MainPresenterSample::GetInstance();
     if ((mainPresenter == nullptr) || (mainPresenter->GetMainPresenterState() != MainPresenterState::RESUME)) {
         return;
     }
 
-    if (video_ != nullptr) {
-        if (video_->IsPaused()) {
-            video_->ResumePlay();
-        } else if (!video_->IsPlayed()) {
-            video_->StartPlay();
-        }
-        g_video = video_;
-    } else if (kaleidoscope_ != nullptr) {
-        kaleidoscope_->RequestFocus();
-        kaleidoscope_->StartRotateAnimator();
-    }
+    DoStart();
 }
 
-void DialViewGroup::OnInactive(void)
+void DialViewGroup::OnPause()
 {
-    if (video_ != nullptr) {
-        if (!video_->IsStopped()) {
-            video_->StopPlay();
-        }
-        g_video = nullptr;
-    } else if (kaleidoscope_ != nullptr) {
-        kaleidoscope_->StopRotateAnimator();
-        kaleidoscope_->ClearFocus();
-    }
+    DoPause();
 }
 
 MediaVideoPlay* DialViewGroup::GetVideoPlay()
@@ -430,4 +480,58 @@ MediaVideoPlay* DialViewGroup::GetVideoPlay()
     }
     return nullptr;
 }
-}
\ No newline at end of file
+
+void DialViewGroup::SetLableAnimatorState(uint8_t state)
+{
+    if (rollingLabelList_.IsEmpty()) {
+        return;
+    }
+
+    ListNode<UILabel*>* node = rollingLabelList_.Begin();
+    while (node != rollingLabelList_.End()) {
+        if (node->data_ != nullptr) {
+            UILabel* label = node->data_;
+            label->SetAnimState(state);
+        }
+        node = node->next_;
+    }
+}
+
+void DialViewGroup::SetImgAnimatorState(uint8_t state)
+{
+    if (imgAnimList_.IsEmpty() && seqList_.IsEmpty()) {
+        return;
+    }
+
+    ListNode<UIImageAnimatorView*>* node = imgAnimList_.Begin();
+    while (node != imgAnimList_.End()) {
+        if (node->data_ != nullptr) {
+            UIImageAnimatorView* imgAnim = node->data_;
+            switch (state) {
+                case Animator::PAUSE:
+                    imgAnim->Pause();
+                    break;
+                case Animator::START:
+                    imgAnim->Resume();
+                    break;
+            }
+        }
+        node = node->next_;
+    }
+
+    ListNode<DialSequenceContainer*>* it = seqList_.Begin();
+    while (it != seqList_.End()) {
+        if (it->data_ != nullptr) {
+            switch (state) {
+                case Animator::PAUSE:
+                    it->data_->Pause();
+                    break;
+                case Animator::START:
+                    it->data_->Resume();
+                    break;
+            }
+        }
+        it = it->next_;
+    }
+}
+} // namespace OHOS
index d17de5b..81c7106 100644 (file)
@@ -43,6 +43,24 @@ DialBaseModel* ModelDialDataFactory::GetModuleByType(DialDataType& type)
     return iter->second;
 }
 
+bool ModelDialDataFactory::IsOHBindDataExist(DialOHDataType type) const
+{
+    auto it = g_bindDataConverter.find(type);
+    if (it == g_bindDataConverter.end()) {
+        return false;
+    }
+    return IsBindDataExist(it->second);
+}
+
+bool ModelDialDataFactory::IsBindDataExist(DialDataType type) const
+{
+    auto it = models_.find(static_cast<int16_t>(type));
+    if (it != models_.end() && it->second != nullptr) {
+        return true;
+    }
+    return false;
+}
+
 bool ModelDialDataFactory::RegisterDialDataListener(DialDataType type, OnDialDataUpdateListener* listener)
 {
     DialBaseModel* model = GetModuleByType(type);
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/WatchInterface.cpp b/code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/WatchInterface.cpp
new file mode 100644 (file)
index 0000000..c4f9fd1
--- /dev/null
@@ -0,0 +1,370 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2025. All rights reserved.
+ * Description: WatchInterface
+ * Author:
+ * Create: 2025-03-17
+ */
+
+#include <string>
+#include "dirent.h"
+#include "DialBinParser.h"
+#include "UiConfig.h"
+#include "WatchInterface.h"
+#include "gfx_utils/vector.h"
+#include "common/screen.h"
+#include "MainModel.h"
+#include "MainViewSample.h"
+#include "SetDialModel.h"
+#include "graphic_service.h"
+#include "NativeAbility.h"
+
+using namespace OHOS;
+namespace {
+struct {
+    Graphic::Vector<std::string> fileNames;      // only for 3.0
+    Graphic::Vector<watch_dial_info> watchInfo;  // only for 3.0
+} g_info;
+
+bool GetActiveWatchPath(std::string &path)
+{
+    if (MainModel::GetInstance().GetDialSetting().dialFlag == 1) {
+        path = MainModel::GetInstance().GetDialSetting().dialFullName;
+        return true;
+    }
+    return false;
+}
+
+bool GetPreviewInfo(const std::string &fileName, DialPreviewInfo &preview)
+{
+    const std::string type(".bin");
+    if (!(fileName.length() > type.length() &&
+            fileName.substr(fileName.length() - type.length(), type.length()) == type)) {
+        return false;
+    }
+    memset_s(&preview, sizeof(preview), 0, sizeof(preview));
+    FILE *file = fopen(fileName.c_str(), "rb");
+    bool isSuccess = false;
+    if (file != nullptr) {
+        isSuccess = DialBinParserManager::GetInstance()->GetDialPreviewInfo(file, &preview);
+        fclose(file);
+    }
+    return isSuccess;
+}
+
+bool ConvertPreview2WatchDialInfo(const DialPreviewInfo &preview, watch_dial_info &info)
+{
+    errno_t ret = strcpy_s(reinterpret_cast<char *>(info.watch_protocol_version),
+        sizeof(info.watch_protocol_version),
+        preview.protocolVersion);
+    if (ret != 0) {
+        GRAPHIC_LOGE("failed to copy protocol version.");
+        return false;
+    }
+
+    ret = strcpy_s(reinterpret_cast<char *>(info.watch_version), sizeof(info.watch_version), preview.watchVersion);
+    if (ret != 0) {
+        GRAPHIC_LOGE("failed to copy watch version.");
+        return false;
+    }
+    info.uuid = preview.uuid;
+    return true;
+}
+
+bool GetAllWatchInfo()
+{
+    g_info.fileNames.Clear();
+    g_info.watchInfo.Clear();
+    struct dirent *direntp = nullptr;
+
+    // ´ò¿ªÄ¿Â¼
+    DIR *dirp = opendir(APP_DIAL_PATH);
+    bool isSuccess = true;
+    // ±éÀúÎļþ
+    DialPreviewInfo info;
+    watch_dial_info watchInfo;
+    std::string activePath;
+    bool isActiveExist = GetActiveWatchPath(activePath);
+    if (dirp != nullptr) {
+        while ((direntp = readdir(dirp)) != nullptr) {
+            std::string fileName = std::string(APP_DIAL_PATH) + std::string("/") + std::string(direntp->d_name);
+            isSuccess = GetPreviewInfo(fileName, info);
+            if (!isSuccess) {
+                continue;
+            }
+
+            const std::string lowestVersion("3.0");
+            std::string curVersion(info.protocolVersion);
+            if (curVersion >= lowestVersion) {
+                isSuccess = ConvertPreview2WatchDialInfo(info, watchInfo);
+                if (!isSuccess) {
+                    break;
+                }
+                watchInfo.install_state = true;
+                watchInfo.is_current_watch = isActiveExist ? (activePath == fileName) : false;
+                g_info.fileNames.PushBack(fileName);
+                g_info.watchInfo.PushBack(watchInfo);
+            }
+        }
+    }
+    // ¹Ø±ÕĿ¼
+    closedir(dirp);
+    return isSuccess;
+}
+}  // namespace
+
+bool GetAllWatchFaceInfo(watch_dial_info *info, uint8_t *num, uint8_t maxCnt)
+{
+    if (info == nullptr || num == nullptr) {
+        GRAPHIC_LOGE("para error!");
+        return false;
+    }
+    if (!GetAllWatchInfo()) {
+        GRAPHIC_LOGE("failed to get all watch info.");
+        return false;
+    }
+    if (g_info.watchInfo.Size() > maxCnt) {
+        GRAPHIC_LOGE("mem is not enough.");
+        return false;
+    }
+    *num = g_info.watchInfo.Size();
+    if (*num == 0) {
+        return false;
+    }
+    if (memcpy_s(info,
+            g_info.watchInfo.Size() * sizeof(watch_dial_info),
+            &g_info.watchInfo[0],
+            g_info.watchInfo.Size() * sizeof(watch_dial_info)) != 0) {
+        GRAPHIC_LOGE("copy info error!");
+        return false;
+    }
+    return true;
+}
+
+bool GetWatchFaceInfo(uint32_t uuid, watch_dial_info *watch)
+{
+    if (watch == nullptr) {
+        GRAPHIC_LOGE("para error!");
+        return false;
+    }
+    if (!GetAllWatchInfo()) {
+        GRAPHIC_LOGE("failed to get all watch info.");
+        return false;
+    }
+    for (uint16_t i = 0; i < g_info.watchInfo.Size(); ++i) {
+        if (g_info.watchInfo[i].uuid == uuid) {
+            *watch = g_info.watchInfo[i];
+            return true;
+        }
+    }
+    return false;
+}
+
+bool GetWatchCapability(watch_dev_cap_info *capability)
+{
+    if (capability == nullptr) {
+        GRAPHIC_LOGE("para error!");
+        return false;
+    }
+    capability->kaleidoscope = true;
+    capability->effect_3D = false;
+    capability->interaction = true;
+    capability->video = true;
+    capability->video_format = (1 << CODEC_JPEG);
+    return true;
+}
+
+bool GetWatchSystemInfo(watch_sys_info *sysInfo)
+{
+    if (sysInfo == nullptr) {
+        GRAPHIC_LOGE("para error!");
+        return false;
+    }
+    sysInfo->watch_proto_support_cnt = DialBinParserManager::GetInstance()->GetSupportVersionCnt();
+    for (uint8_t i = 0; i < sysInfo->watch_proto_support_cnt; ++i) {
+        std::string version;
+        bool isSuccess = DialBinParserManager::GetInstance()->GetVersionByIndex(i, version);
+        if (!isSuccess) {
+            return false;
+        }
+        errno_t ret =
+            strcpy_s(sysInfo->watch_protocol_verion[i], sizeof(sysInfo->watch_protocol_verion[i]), version.c_str());
+        if (ret != 0) {
+            GRAPHIC_LOGE("get protocal version error!");
+            return false;
+        }
+    }
+    int ret = sprintf_s(sysInfo->resolution,
+        sizeof(sysInfo->resolution),
+        "%u*%u",
+        Screen::GetInstance().GetWidth(),
+        Screen::GetInstance().GetHeight());
+    if (ret == -1) {
+        GRAPHIC_LOGE("get resolution error!");
+        return false;
+    }
+
+    return true;
+}
+
+bool GetCurrentWatchFaceInfo(watch_dial_info *watch)
+{
+    if (watch == nullptr) {
+        GRAPHIC_LOGE("para error!");
+        return false;
+    }
+    std::string activePath;
+    if (!GetActiveWatchPath(activePath)) {
+        return false;
+    }
+
+    DialPreviewInfo preview;
+    if (!GetPreviewInfo(activePath, preview)) {
+        return false;
+    }
+
+    if (std::string(preview.protocolVersion) < std::string("3.0")) {
+        return false;
+    }
+    if (!ConvertPreview2WatchDialInfo(preview, *watch)) {
+        return false;
+    }
+    watch->install_state = true;
+    watch->is_current_watch = true;
+    return true;
+}
+
+bool SetCurrentWatchFace(uint32_t uuid)
+{
+    if (!GetAllWatchInfo()) {
+        GRAPHIC_LOGE("failed to get all watch info.");
+        return false;
+    }
+    watch_dial_info info;
+    uint16_t index = 0;
+    bool isExists = false;
+    for (uint16_t i = 0; i < g_info.watchInfo.Size(); ++i) {
+        if (uuid == g_info.watchInfo[i].uuid) {
+            isExists = true;
+            info = g_info.watchInfo[i];
+            index = i;
+            break;
+        }
+    }
+    if (!isExists) {
+        GRAPHIC_LOGE("uuid does not exist!");
+        return false;
+    }
+    if (info.is_current_watch) {
+        return true;
+    }
+
+    DialSetting setting = MainModel::GetInstance().GetDialSetting();
+    setting.dialFlag = 1;
+    setting.dialFullName = g_info.fileNames[index];
+    GraphicService::GetInstance()->PostGraphicEvent([setting]() {
+        MainModel::GetInstance().GetDialSetting() = setting;
+        MainModel::GetInstance().AddDialSetting(setting);
+        if (NativeAbility::GetInstance().GetCurSliceId() == VIEW_MAIN_SAMPLE) {
+            MainViewSample::GetInstance()->ReloadWatchFace();
+        }
+    });
+
+    return true;
+}
+
+bool UninstallWatch(uint32_t uuid)
+{
+    if (!GetAllWatchInfo()) {
+        GRAPHIC_LOGE("failed to get all watch info.");
+        return false;
+    }
+    watch_dial_info info;
+    uint16_t index = 0;
+    bool isExists = false;
+    for (uint16_t i = 0; i < g_info.watchInfo.Size(); ++i) {
+        if (uuid == g_info.watchInfo[i].uuid) {
+            isExists = true;
+            info = g_info.watchInfo[i];
+            index = i;
+            break;
+        }
+    }
+    if (!isExists) {
+        GRAPHIC_LOGE("uuid does not exist!");
+        return false;
+    }
+
+    if (info.is_current_watch) {
+        DialSetting setting = MainModel::GetInstance().GetDialSetting();
+        setting.dialFlag = 0;
+        setting.dialId = 0;
+        std::string fileName = g_info.fileNames[index];
+        GraphicService::GetInstance()->PostGraphicEvent([setting, fileName]() {
+            MainModel::GetInstance().GetDialSetting() = setting;
+            MainModel::GetInstance().AddDialSetting(setting);
+            if (NativeAbility::GetInstance().GetCurSliceId() == VIEW_MAIN_SAMPLE) {
+                MainViewSample::GetInstance()->ReloadWatchFace();
+            }
+            if (remove(fileName.c_str()) != 0) {
+                GRAPHIC_LOGE("failed to remove file %s", fileName.c_str());
+            }
+        });
+    } else {
+        if (remove(g_info.fileNames[index].c_str()) != 0) {
+            GRAPHIC_LOGE("failed to remove file %s", g_info.fileNames[index].c_str());
+            return false;
+        }
+    }
+    return true;
+}
+
+bool InstallWatch(const char *path, uint32_t *uuid)
+{
+    if (path == nullptr || uuid == nullptr) {
+        GRAPHIC_LOGE("para error!");
+        return false;
+    }
+
+    DialPreviewInfo preview;
+    if (!GetPreviewInfo(std::string(path), preview)) {
+        return false;
+    }
+    if (std::string(preview.protocolVersion) < std::string("3.0")) {
+        return false;
+    }
+    *uuid = preview.uuid;
+
+    if (!GetAllWatchInfo()) {
+        GRAPHIC_LOGE("failed to get all watchinfo!");
+        return false;
+    }
+    for (uint16_t i = 0; i < g_info.watchInfo.Size(); ++i) {
+        const std::string &fileName = g_info.fileNames[i];
+        const watch_dial_info &info = g_info.watchInfo[i];
+        if (!(info.uuid == *uuid && std::string(path) != fileName)) {
+            continue;
+        }
+
+        if (info.is_current_watch) {
+            DialSetting setting = MainModel::GetInstance().GetDialSetting();
+            setting.dialFlag = 1;
+            setting.dialFullName = std::string(path);
+            GraphicService::GetInstance()->PostGraphicEvent([setting, fileName]() {
+                MainModel::GetInstance().GetDialSetting() = setting;
+                MainModel::GetInstance().AddDialSetting(setting);
+                if (NativeAbility::GetInstance().GetCurSliceId() == VIEW_MAIN_SAMPLE) {
+                    MainViewSample::GetInstance()->ReloadWatchFace();
+                }
+                if (remove(fileName.c_str()) != 0) {
+                    GRAPHIC_LOGE("failed to remove file %s", fileName.c_str());
+                }
+            });
+        } else {
+            if (remove(fileName.c_str()) != 0) {
+                return false;
+            }
+        }
+    }
+
+    return true;
+}
\ No newline at end of file
index ba2b91c..db8a0b9 100644 (file)
@@ -33,7 +33,6 @@ MainCallingPresenter::MainCallingPresenter()
 MainCallingPresenter::~MainCallingPresenter()\r
 {\r
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainCallingPresenter::~MainCallingPresenter");\r
-    RootView::GetInstance()->RemoveAll();\r
     if (volumeSetting != nullptr) {\r
         delete volumeSetting;\r
         volumeSetting = nullptr;\r
index 4e44628..e454449 100644 (file)
@@ -297,6 +297,8 @@ void PlayersModel::NextSong(int16_t index)
         }\r
     } else if (playerState == PlayerStates::PLAYER_PAUSED || (playerState == PlayerStates::PLAYER_IDLE)) {\r
         ret = playerCtr->Reset();\r
+        AudioManager::GetInstance().DeactivateAudioInterrupt(interrupt);\r
+        ClearActivateAudioInterrupt();\r
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Reset, ret:%d", ret);\r
     }\r
 }\r
index f7282a2..e595ee3 100644 (file)
@@ -19,6 +19,7 @@
 #include "BluetoothPresenter.h"
 #include "graphic_service.h"
 #include "PhoneService.h"
+#include "MainViewSample.h"
 
 #include "bts_avrcp_controller.h"
 #include "bts_avrcp_target.h"
@@ -108,7 +109,7 @@ bool JumpView::ChangeBluetoothEarPhoneView(int16_t hideView, int16_t thisView)
             return false;
         }
         container[thisView] = group;
-        RootView::GetInstance()->Add(container[thisView]);
+        MainViewSample::GetInstance()->GetRootContainer()->Add(container[thisView]);
     }
     // 动画开始
     bluetoothEarPhoneView->BtAnimatorStart();
@@ -132,7 +133,7 @@ bool JumpView::ChangeBluetoothEarListView(int16_t hideView, int16_t thisView)
             return false;
         }
         container[thisView] = group;
-        RootView::GetInstance()->Add(container[thisView]);
+        MainViewSample::GetInstance()->GetRootContainer()->Add(container[thisView]);
     } else {
         // 刷新列表
         UIList *scanList = bluetoothEarListView->GetScanUIList();
@@ -163,7 +164,7 @@ bool JumpView::ChangeBluetoothView(int16_t hideView, int16_t thisView)
             return false;
         }
         container[thisView] = group;
-        RootView::GetInstance()->Add(container[thisView]);
+        MainViewSample::GetInstance()->GetRootContainer()->Add(container[thisView]);
     }
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "JumpView::ChangeBluetoothView");
     BluetoothModel::GetInstance()->SetTagConnectView(false);
@@ -187,7 +188,7 @@ bool JumpView::ChangeBluetoothOptionsView(int16_t hideView, int16_t thisView)
             return false;
         }
         container[thisView] = group;
-        RootView::GetInstance()->Add(container[thisView]);
+        MainViewSample::GetInstance()->GetRootContainer()->Add(container[thisView]);
     }
     return true;
 }
@@ -209,7 +210,7 @@ bool JumpView::ChangeBluetoothDeviceListView(int16_t hideView, int16_t thisView)
             return false;
         }
         container[thisView] = group;
-        RootView::GetInstance()->Add(container[thisView]);
+        MainViewSample::GetInstance()->GetRootContainer()->Add(container[thisView]);
     } else {
         // 刷新列表
         UIList *deviceList = bluetoothDeviceListView->GetDeviceUIList();
@@ -245,7 +246,7 @@ bool JumpView::ChangeBluetoothReconnectView(int16_t hideView, int16_t thisView)
             return false;
         }
         container[thisView] = group;
-        RootView::GetInstance()->Add(container[thisView]);
+        MainViewSample::GetInstance()->GetRootContainer()->Add(container[thisView]);
     }
     BluetoothModel::GetInstance()->SetTagDisconnectView(true);
     bluetoothReconnectView->RefreshBluetoothNameLabel();
@@ -287,7 +288,7 @@ bool JumpView::ChangeTipsSuccMessageView(int16_t hideView, int16_t thisView)
             return false;
         }
         container[thisView] = group;
-        RootView::GetInstance()->Add(container[thisView]);
+        MainViewSample::GetInstance()->GetRootContainer()->Add(container[thisView]);
     }
     return true;
 }
@@ -309,7 +310,7 @@ bool JumpView::ChangeTipsConnFailMessageView(int16_t hideView, int16_t thisView)
             return false;
         }
         container[thisView] = group;
-        RootView::GetInstance()->Add(container[thisView]);
+        MainViewSample::GetInstance()->GetRootContainer()->Add(container[thisView]);
     }
     if (bluetoothReconnectView == nullptr) {
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "GapAclStateChangedCallback bluetoothReconnectView == nullptr");
@@ -337,7 +338,7 @@ bool JumpView::ChangeTipsFailMessageView(int16_t hideView, int16_t thisView)
             return false;
         }
         container[thisView] = group;
-        RootView::GetInstance()->Add(container[thisView]);
+        MainViewSample::GetInstance()->GetRootContainer()->Add(container[thisView]);
     }
     return true;
 }
@@ -509,10 +510,8 @@ void ButtonOnClickListener::PlayerButtonOnClick()
     if (GetCurrCallNum() != 0 && GetScoConnectState() == HFP_SCO_STATE_CONNECTED) {
         if (state == UICheckBox::UICheckBoxState::SELECTED) {
             playersView->SetPlayerButtonState(UICheckBox::UICheckBoxState::UNSELECTED);
-            playersView->GetPlayerButton()->Invalidate();
         } else {
             playersView->SetPlayerButtonState(UICheckBox::UICheckBoxState::SELECTED);
-            playersView->GetPlayerButton()->Invalidate();
         }
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[PlayerButtonOnClick] calling phone");
         return;
@@ -542,7 +541,7 @@ void ButtonOnClickListener::SoundButtonOnClick()
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "volumeSetting SetUpVolume fail");
             return;
         }
-        RootView::GetInstance()->Add(volumeSettingView);
+        MainViewSample::GetInstance()->GetRootContainer()->Add(volumeSettingView);
     }
     int32_t volume = AudioManager::GetInstance().GetVolume(AUDIO_STREAM_MUSIC);
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "current volume = %d", volume);
@@ -787,7 +786,6 @@ static void Pause(void)
                 PlayersModel::GetInstance()->SetPlayButtonState(false);
             } else {
                 playersView->SetPlayerButtonState(UICheckBox::UICheckBoxState::UNSELECTED);
-                playersView->GetPlayerButton()->Invalidate();
             }
             PlayerIntrptListener->RestFlag();
             PlayerIntrptListener->SetPaused(true);
@@ -798,7 +796,7 @@ static void Pause(void)
 
 void PlayerInterruptListener::PausePlayer(void)
 {
-    PlayerPostGraphicEvent(Pause);
+    Pause();
 }
 
 static void Resume(void)
@@ -829,7 +827,6 @@ static void Resume(void)
                 PlayersModel::GetInstance()->SetPlayButtonState(true);
             } else {
                 playersView->SetPlayerButtonState(UICheckBox::UICheckBoxState::SELECTED);
-                playersView->GetPlayerButton()->Invalidate();
             }
             PlayerIntrptListener->RestFlag();
             PlayerIntrptListener->SetResumed(true);
@@ -841,13 +838,13 @@ static void Resume(void)
 void PlayerInterruptListener::ResumePlayer(void)
 {
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[PlayerInterruptListener::ResumePlayer] start");
-    usleep(50000); // 确保界面切换完成
+    usleep(500000); // 确保界面切换完成
     if (NativeAbility::GetInstance().GetCurSliceId() == VIEW_MAEKPHONE_SAMPLE ||
         (GetCurrCallState() != HFP_HF_CALL_STATE_FINISHED && GetScoConnectState() == HFP_SCO_STATE_CONNECTED)) {
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[PlayerInterruptListener::ResumePlayer] this is in calling");
         return; // 通话界面,禁止音乐恢复播放
     }
-    PlayerPostGraphicEvent(Resume);
+    Resume();
 }
 
 static void Stop(void)
@@ -1359,7 +1356,6 @@ void PlayersPresenter::PlayerbackReset(void)
         return;
     }
     playersView->SetPlayerButtonState(UICheckBox::UICheckBoxState::UNSELECTED);
-    playersView->GetPlayerButton()->Invalidate();
 }
 
 // 播放器按钮复位
@@ -1377,7 +1373,6 @@ void PlayersPresenter::PlayerHeadsetReset(void)
         playersView->SetPlayerButtonState(UICheckBox::UICheckBoxState::UNSELECTED);
     }
 
-    playersView->GetPlayerButton()->Invalidate();
 }
 
 void PlayersPresenter::ShowPlayerListGroup()
index 1b2440b..e318718 100644 (file)
@@ -37,7 +37,6 @@ PlayersView::~PlayersView()
         if (state_ == UICheckBox::UICheckBoxState::SELECTED) {
             PlayersModel::GetInstance()->SetPlayButtonState(true);
         }
-        RootView::GetInstance()->RemoveAll();
         RemoveAll();
         listGroup->RemoveAll();
         delete list;
@@ -242,7 +241,7 @@ void PlayersView::ShowUpListView()
         list->SetAdapter(adapterText);
     }
     listGroup->Add(list);
-    RootView::GetInstance()->Add(listGroup);
+    MainViewSample::GetInstance()->GetRootContainer()->Add(listGroup);
     UIView::OnDragListener *dragListener = (UIView::OnDragListener*)OHOS::PlayerOnDragListener::GetInstance();
     if (dragListener == nullptr) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "PlayersView::OnDragListener fail");
index efce7f8..5d8d437 100644 (file)
@@ -47,7 +47,6 @@ RebootView *RebootView::GetInstance()
 
 void RebootView::OnStart()
 {
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::~OnStart");
     if (RebootModel::GetInstance()->GetSelectView() == REBOOT) {
         ChangeView(REBOOT_MAX, REBOOTVIEW);
     } else if (RebootModel::GetInstance()->GetSelectView() == REBOOTDEVICE) {
index 563e1c7..974954c 100644 (file)
@@ -186,6 +186,7 @@ namespace OHOS {
             }
         }
         dialInfoList.clear();
+        aodDialInfoList.clear();
     }
 
     uint8_t SetDialModel::GetPageIndex(void)
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/videocard/include/VideoCard.h b/code/sdk/application/wearable/nativeapp/nativeui/videocard/include/VideoCard.h
new file mode 100644 (file)
index 0000000..f717fc5
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2023. All rights reserved.
+ */
+
+#ifndef VIDEO_CARD_H
+#define VIDEO_CARD_H
+
+#include <string>
+#include "DialDataBase.h"
+#include "components/ui_view_group.h"
+#include "OnDialDataUpdateListener.h"
+#include "components/ui_card_page.h"
+#include "components/ui_lite_surface_view.h"
+#include "video_play_wrapper.h"
+#include "DialView.h"
+
+namespace OHOS {
+class VideoCard : public UICardPage {
+public:
+    VideoCard(const VideoCard &) = delete;
+    VideoCard &operator=(const VideoCard &) = delete;
+
+    VideoCard();
+
+    ~VideoCard() override;
+
+    /**
+    * @brief  This function is invoked when the function SetHorCurrentPage() is called.
+    */
+    void OnActive(void) override;
+
+    void OnInactive() override;
+
+    void PreLoad(void) override;
+
+    void ScrollBegin(bool isActive) override;
+
+    void ScrollEnd(bool isActive) override;
+
+    void SetFilePath(const std::string &path);
+
+    void SetPreviewFile(const std::string &path);
+
+    void OnPause(void) override;
+
+private:
+    void StopVideo();
+
+    void StartVideo();
+
+    void PauseVideo();
+
+    void Deinit();
+
+    void Init();
+
+    UILiteSurfaceView *surfaceView_ = nullptr;
+    MediaVideoPlay *video_ = nullptr;
+    bool resPreloaded_ = false;
+    bool hasPreview_ = false;
+    std::string path_;
+    std::string previewPath_;
+};
+} // OHOS
+#endif // VIDEO_CARD_H
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/videocard/src/VideoCard.cpp b/code/sdk/application/wearable/nativeapp/nativeui/videocard/src/VideoCard.cpp
new file mode 100644 (file)
index 0000000..4bd5cc7
--- /dev/null
@@ -0,0 +1,183 @@
+#include <cstdio>
+#include <iostream>
+#include "VideoCard.h"
+#include "NativeAbility.h"
+#include "msg_center.h"
+#include "securec.h"
+#include "DialBinParser.h"
+#include "ModelDialDataFactory.h"
+#include "common/low_power_manager.h"
+#include "common/image_cache_manager.h"
+#ifdef SUPPORT_OHOSFWK
+#include "ui_screennotify.h"
+#endif
+#include "MainPresenterSample.h"
+#include "common/graphic_utils.h"
+
+namespace OHOS {
+static constexpr int16_t JPEG_HEIGHT_DIVISOR = 2;
+static constexpr int16_t JPEG_WIDTH_BYTE_ALIGNMENT = 128;
+static constexpr int16_t JPEG_HEIGHT_BYTE_ALIGNMENT = 16;
+static constexpr int16_t BUFFER_QUEUE_SIZE = 3;
+static constexpr int16_t STRIDE_ALIGNMENT_VALUE = 128;
+
+static inline int32_t MediaByteAlign(int16_t value, int16_t align)
+{
+    return (((value) + (align) - 1) & (~((align) - 1)));
+}
+
+VideoCard::VideoCard()
+{
+    SetTouchable(true);
+    SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);
+}
+
+VideoCard::~VideoCard()
+{
+    Deinit();
+}
+
+void VideoCard::OnActive(void)
+{
+    StartVideo();
+}
+
+void VideoCard::OnInactive()
+{
+    StopVideo();
+}
+
+void VideoCard::PreLoad(void)
+{
+    if (!resPreloaded_) {
+        Init();
+        resPreloaded_ = true;
+    }
+}
+
+void VideoCard::ScrollBegin(bool isActive)
+{
+    PauseVideo();
+}
+
+void VideoCard::ScrollEnd(bool isActive)
+{
+    if (isActive) {
+        StartVideo();
+    } else {
+        StopVideo();
+        ClearCache();
+    }
+}
+
+void VideoCard::SetFilePath(const std::string &path)
+{
+    Deinit();
+    path_ = path;
+    resPreloaded_ = false;
+}
+
+void VideoCard::SetPreviewFile(const std::string &path)
+{
+    hasPreview_ = true;
+    previewPath_ = path;
+}
+
+void VideoCard::OnPause(void)
+{
+    PauseVideo();
+}
+
+void VideoCard::StopVideo()
+{
+    if (video_ == nullptr) {
+        return;
+    }
+
+    if (video_->isPlayed_ || video_->isPause_) {
+        video_->StopVideoPlay();
+    }
+}
+
+void VideoCard::StartVideo()
+{
+    if (video_ == nullptr) {
+        return;
+    }
+
+    if (video_->isPause_) {
+        video_->ResumeVideoPlay();
+    } else if (!video_->isPlayed_) {
+        video_->StartVideoPlay();
+    }
+}
+
+void VideoCard::PauseVideo()
+{
+    if (video_ == nullptr) {
+        return;
+    }
+
+    if (video_->isPlayed_) {
+        video_->PauseVideoPlay();
+    }
+}
+void VideoCard::Deinit()
+{
+    Remove(surfaceView_);
+    if (video_ != nullptr) {
+        delete video_;
+        video_ = nullptr;
+    }
+    if (surfaceView_ != nullptr) {
+        delete surfaceView_;
+        surfaceView_ = nullptr;
+    }
+}
+
+void VideoCard::Init()
+{
+    if (surfaceView_ != nullptr || video_ != nullptr) {
+        return;
+    }
+    surfaceView_ = new UILiteSurfaceView;
+    if (surfaceView_ == nullptr) {
+        return;
+    }
+    Rect area = GetRect();
+    int16_t w = area.GetWidth();
+    int16_t h = area.GetHeight();
+    surfaceView_->SetPosition(0, 0, w, h);
+    ColorType color;
+    color.full = 0xff3d3a3c;
+    surfaceView_->SetSurfaceColorkey(color);
+
+    Surface* surface = surfaceView_->GetSurface();
+    surface->SetStrideAlignment(STRIDE_ALIGNMENT_VALUE);
+    surface->SetWidthAndHeight(w, h);
+    surface->SetQueueSize(BUFFER_QUEUE_SIZE);
+    surface->SetFormat(PIXEL_FMT_YCBCR_420_SP);
+
+    // jpeg decoder output buffer size calculation formula
+    int32_t ySize = MediaByteAlign(w, JPEG_WIDTH_BYTE_ALIGNMENT) * h;
+    int32_t uvSize = MediaByteAlign(w, JPEG_WIDTH_BYTE_ALIGNMENT) *
+        MediaByteAlign(h, JPEG_HEIGHT_BYTE_ALIGNMENT) / JPEG_HEIGHT_DIVISOR;
+    int32_t bufferSize = ySize + uvSize;
+    surface->SetSize(bufferSize);
+
+    video_ = new MediaVideoPlay(surface, nullptr, path_, true);
+    if (video_ == nullptr) {
+        delete surfaceView_;
+        surfaceView_ = nullptr;
+        return;
+    }
+    if (hasPreview_) {
+        ImageInfo *imgInfo = ImageCacheManager::GetInstance().LoadSingleRes(previewPath_.c_str());
+        if (imgInfo != nullptr) {
+            surfaceView_->SetPreview(imgInfo);
+        }
+    }
+    Add(surfaceView_);
+    video_->SetSyncExitMode(true);
+}
+} // OHOS
index 124bf11..7b1691b 100644 (file)
@@ -15,3 +15,4 @@ if("CONFIG_SEA_PHS_SUPPORT" IN_LIST DEFINES)
     add_subdirectory_if_exist(smart_voice)
 endif()
 add_subdirectory_if_exist(power_manager)
+add_subdirectory_if_exist(dial_market)
index 9222861..8c6efbe 100644 (file)
@@ -8,7 +8,6 @@
 #include "bundle_install_msg.h"
 #include "bundlems_slite_client.h"
 #include "appexecfwk_errors.h"
-#include "sign_mode.h"
 #include "ui_service.h"
 
 void AppStoreReplyAck(uint8_t cmd_id, uint8_t type, uint32_t ack)
@@ -40,13 +39,10 @@ static void SendMsgToAppStore(CallbackStatus status, const uint8_t resultCode, c
             SendMsgToUIService(JS_UNINSTALL_SUCESS_TO_UI, 0, &bundleData, sizeof(BundleData));
             report.operationResult = UNINSTALL_OK;
         }
-        OHOS::SignMode::GetInstance().SetSignMode(true);
     } else if (resultCode ==  ERR_APPEXECFWK_INSTALL_FAILED_EXCEED_MAX_BUNDLE_NUMBER) {
         report.operationResult = INSTALL_OVER_LIMIT;
-        OHOS::SignMode::GetInstance().SetSignMode(true);
     } else {
         report.operationResult = (status == INSTALL_CALLBACK) ? INSTALL_FAILED : UNINSTALL_FAILED;
-        OHOS::SignMode::GetInstance().SetSignMode(true);
     }
     AdapterFree(installMsg);
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_MSG_CENTER, "SendMsgToAppStore operationResult = %u", report.operationResult);
@@ -79,7 +75,6 @@ errcode_t AppStorePkgOperation(uint8_t cmd_id, uint8_t type, void *usr_data, uin
             if (pkgFullName != nullptr) {
                 (void)sprintf_s(pkgFullName, len, "%s%s", FS_DIR_APP_STORE, (char *)operInfo->pkgName);
                 WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "AppStorePkgOperation install pkgFullName=%s", pkgFullName);
-                OHOS::SignMode::GetInstance().SetSignMode(false);
                 InstallParam installParam = { .installLocation = 1, .keepData = false };
                 ret = OHOS::BundleMsClient::GetInstance().Install(pkgFullName, &installParam, InstallCallbackFunc);
                 free(pkgFullName);
@@ -87,7 +82,6 @@ errcode_t AppStorePkgOperation(uint8_t cmd_id, uint8_t type, void *usr_data, uin
         } else if (operInfo->operationType == PKG_OPERATION_TYPE_UNINSTALL) {
                 StopJsApp((char*)operInfo->pkgName);
                 WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "AppStorePkgOperation uninstall pkgName=%s", operInfo->pkgName);
-                OHOS::SignMode::GetInstance().SetSignMode(false);
                 InstallParam installParam = { .installLocation = 1, .keepData = false };
                 ret = OHOS::BundleMsClient::GetInstance().Uninstall((char*)operInfo->pkgName, &installParam, UninstallCallbackFunc);
         }
@@ -119,6 +113,7 @@ errcode_t AppStoreGetPkgList(uint8_t cmd_id, uint8_t type, void *usr_data, uint1
             (void)strncpy_s((char*)unitInfo[i].pkgName, PKG_NAME_MAX_LENGTH,
                             bundleInfos[i].bundleName, strlen(bundleInfos[i].bundleName));
             WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AppStoreGetPkgList pkgName[%d] = %s", i, unitInfo[i].pkgName);
+            unitInfo[i].versionCode = bundleInfos[i].versionCode;
         }
         ret = msg_center_send_data(MSGCENTER_CMD_APP_STORE, type, infoList, len);
         free(infoList);
index e5b28b3..7bbc93b 100644 (file)
@@ -59,6 +59,7 @@ typedef struct {
 
 typedef struct {
     uint8_t pkgName[PKG_NAME_MAX_LENGTH];
+    int32_t versionCode;
 } PkgUnitInfo;
 
 errcode_t AppStorePkgOperation(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
diff --git a/code/sdk/application/wearable/service/dial_market/CMakeLists.txt b/code/sdk/application/wearable/service/dial_market/CMakeLists.txt
new file mode 100644 (file)
index 0000000..058f8dc
--- /dev/null
@@ -0,0 +1,43 @@
+set(COMPONENT_NAME "dial_market")
+
+set(PUBLIC_HEADER
+    ${CMAKE_CURRENT_SOURCE_DIR}/
+)
+
+set(PRIVATE_HEADER
+    ${CMAKE_CURRENT_SOURCE_DIR}/../../ohos_deps
+    ${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/innerkits
+    ${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/kits
+    ${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/kits/gfx_utils
+    ${ROOT_DIR}/open_source/openharmony/base/startup/syspara_lite/include
+    ${ROOT_DIR}/open_source/openharmony/drivers/peripheral/format/interfaces/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/main/include/dial
+)
+
+set(SOURCES
+    ${CMAKE_CURRENT_SOURCE_DIR}/dial_market_msg.cpp
+    ${CMAKE_CURRENT_SOURCE_DIR}/dial_market.cpp
+)
+
+set(COMPONENT_PUBLIC_CCFLAGS
+)
+
+set(COMPONENT_CCFLAGS
+    -std=c++11
+)
+
+set(WHOLE_LINK
+    true
+)
+
+set(PUBLIC_DEFINES
+)
+
+set(PRIVATE_DEFINES
+    APP_PLATFORM_WATCHGT
+    CONFIG_ACELITE_ENABLE
+)
+
+build_component()
+
+
diff --git a/code/sdk/application/wearable/service/dial_market/dial_market.h b/code/sdk/application/wearable/service/dial_market/dial_market.h
new file mode 100644 (file)
index 0000000..6110188
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: broadcast service api
+ * Author: CompanyName
+ * Create: 2021-11-11
+ */
+
+#ifndef DIAL_MARKET_H
+#define DIAL_MARKET_H
+
+#include "msg_center_protocol.h"
+
+#ifdef __cplusplus
+#if __cplusplus
+extern "C" {
+#endif
+#endif
+
+#define MAX_CHIP_PLAT_LEN 5
+#define MAX_CHIP_MODEL_LEN 5
+#define MAX_OS_LEN 23
+#define MAX_API_LEVEL_LEN 3
+#define MAX_WATCH_PROTO_VER_LEN 4
+#define MAX_WATCH_INTERNAL_VER 6
+#define MAX_RESOLUTION_LEN 8
+#define MAX_SUPPORT_PROTOCOL 8
+#define MAX_WATCH_CNT 64
+
+typedef enum msg_center_dial_market_type_id {
+    MSGCENTER_TYPE_ID_DM_GET_SYS_INFO       = 0x1,
+    MSGCENTER_TYPE_ID_DM_GET_DEV_CAP        = 0x2,
+    MSGCENTER_TYPE_ID_DM_GET_ONE_WATCH_INFO = 0x3,
+    MSGCENTER_TYPE_ID_DM_INSTALL_WATCH      = 0x4,
+    MSGCENTER_TYPE_ID_DM_UNINSTALL_WATCH    = 0x5,
+    MSGCENTER_TYPE_ID_DM_SET_WATCH          = 0x6,
+    MSGCENTER_TYPE_ID_DM_GET_ALL_WATCH_INFO = 0x7,
+    MSGCENTER_TYPE_ID_DM_GET_CUR_WATCH_INFO = 0x8,
+} msg_center_dial_market_type_id_t;
+
+typedef struct {
+    char chip_platform[MAX_CHIP_PLAT_LEN];
+    char chip_model[MAX_CHIP_MODEL_LEN];
+    char os_version[MAX_OS_LEN];
+    char api_level[MAX_API_LEVEL_LEN];
+    uint8_t watch_proto_support_cnt;
+    char watch_protocol_verion[MAX_SUPPORT_PROTOCOL][MAX_WATCH_PROTO_VER_LEN];
+    char resolution[MAX_RESOLUTION_LEN];
+} watch_sys_info;
+
+typedef struct {
+    uint8_t kaleidoscope;
+    uint8_t effect_3D;
+    uint8_t interaction;
+    uint8_t video;
+    uint16_t video_format; /* 按照CodecFormat做位映射形成能力集 */
+} watch_dev_cap_info;
+
+typedef struct {
+    uint32_t uuid;
+    uint8_t install_state;
+    uint8_t is_current_watch;
+    uint8_t watch_protocol_version[MAX_WATCH_PROTO_VER_LEN];
+    uint8_t watch_version[MAX_WATCH_INTERNAL_VER];
+} watch_dial_info;
+
+errcode_t msg_center_dial_market_get_sys_info(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_dial_market_get_dev_cap(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_dial_market_get_one_watch_info(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_dial_market_install_watch(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_dial_market_uninstall_watch(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_dial_market_set_watch(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_dial_market_get_all_watch_info(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_dial_market_get_cur_watch_info(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+
+#ifdef __cplusplus
+#if __cplusplus
+}
+#endif
+#endif
+#endif /* DIAL_MARKET_H */
index 360c837..1a21912 100644 (file)
@@ -21,24 +21,10 @@ set(PRIVATE_HEADER
     ${ROOT_DIR}/application/wearable/service/xiaodu_navi_vector
     ${ROOT_DIR}/application/wearable/service/xiaodu_navi_vector/libs
     ${ROOT_DIR}/application/wearable/service/msg_center/src/notify/ketinput/include
-    ${ROOT_DIR}/application/wearable/nativeapp/nativelauncher/include
-    ${ROOT_DIR}/application/wearable/nativeabilityfwk/include
-    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/alarm/include
-    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/key/include
-    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/alarmclockmanage/include
-    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/alarmclocktimerconfig/include
-    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/main/include
-    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/callerlog/include
-    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/phoneservice/include
-    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/makephone/include
-    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/player/include
-    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/applist/include
-    ${ROOT_DIR}/open_source/openharmony/foundation/multimedia/player/interfaces/kits
 )
 
 set(SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/src/msg_center.cpp
-    ${CMAKE_CURRENT_SOURCE_DIR}/src/notify/ketinput/src/NotifyOnKeyListener.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/notify/notification_manager.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/msg_center_protocol.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/client/msg_center_client.cpp
@@ -134,6 +120,20 @@ set(PRIVATE_HEADER
     ${ROOT_DIR}/include/middleware/services/bts/common
     ${ROOT_DIR}/application/auto_ota
     ${ROOT_DIR}/application/wearable/service/xiaodu_navi_vector
+    ${ROOT_DIR}/application/wearable/service/msg_center/src/notify/ketinput/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativelauncher/include
+    ${ROOT_DIR}/application/wearable/nativeabilityfwk/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/alarm/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/key/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/alarmclockmanage/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/alarmclocktimerconfig/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/main/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/callerlog/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/phoneservice/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/makephone/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/player/include
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/applist/include
+    ${ROOT_DIR}/open_source/openharmony/foundation/multimedia/player/interfaces/kits
 )
 
 if("JS_ENABLE" IN_LIST DEFINES)
@@ -144,6 +144,7 @@ set(SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/src/notify/makephone_notification.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/common/msg_center_common.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/common/msg_center_utils.cpp
+    ${CMAKE_CURRENT_SOURCE_DIR}/src/notify/ketinput/src/NotifyOnKeyListener.cpp
 )
 else()
 set(SOURCES
@@ -152,6 +153,7 @@ set(SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/src/msg_center_self_cmd.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/notify/alarm_notification.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/notify/makephone_notification.cpp
+    ${CMAKE_CURRENT_SOURCE_DIR}/src/notify/ketinput/src/NotifyOnKeyListener.cpp
 )
 endif()
 
index f08ef65..f6ea17c 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 41ad2ab..c7c253e 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 0b1a260..0e24be7 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 0b1a260..0e24be7 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 9987892..c686df5 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 41578ba..79cb07f 100644 (file)
@@ -23,6 +23,7 @@ extern "C" {
 void StartJsApp(char *bundleName);\r
 void StopJsApp(char *bundleName);\r
 void MsgCenterReportBtStatusToJS(uint16_t msgId);\r
+bool MsgCenterNotifyProc(const Topic topic, Request* req);\r
 #endif\r
 \r
 #ifdef __cplusplus\r
index 93961d3..02cf29c 100644 (file)
@@ -61,6 +61,7 @@ typedef enum msg_center_cmd_id {
     MSGCENTER_CMD_PING               = 0x7,\r
     MSGCENTER_CMD_WATCH_CONNECT      = 0x8,\r
     MSGCENTER_CMD_APP_STORE          = 0x9,\r
+    MSGCENTER_CMD_DIAL_MARKET        = 0xa,\r
     MSGCENTER_CMD_MAX\r
 } msg_center_cmd_id_t;\r
 \r
diff --git a/code/sdk/application/wearable/service/msg_center/src/notify/ketinput/include/NotifyOnKeyListener.h b/code/sdk/application/wearable/service/msg_center/src/notify/ketinput/include/NotifyOnKeyListener.h
new file mode 100644 (file)
index 0000000..fd6b6bf
--- /dev/null
@@ -0,0 +1,34 @@
+/*\r
+ * Copyright (c) CompanyNameMagicTag 2024-2024. All rights reserved.\r
+ * Description: NotifyOnKeyListener.h\r
+ * Author: g30037431\r
+ * Create: 2024-12-12\r
+ */\r
+\r
+#ifndef KEY_NOTIFY_INPUT_LISTENER_H\r
+#define KEY_NOTIFY_INPUT_LISTENER_H\r
+\r
+#include "components/root_view.h"\r
+#include "events/key_event.h"\r
+#include "ohos_types.h"\r
+\r
+namespace OHOS {\r
+class NotifyOnKeyListener : public RootView::OnKeyActListener {\r
+public:\r
+    static NotifyOnKeyListener* GetInstance();\r
+    bool OnKeyAct(UIView& view, const KeyEvent& event) override;\r
+\r
+private:\r
+    NotifyOnKeyListener() {}\r
+    ~NotifyOnKeyListener() {}\r
+    void OnKeyPress(void);\r
+    void OnKeyLongPress(const KeyEvent& event);\r
+    void OnKeyRelease(const KeyEvent& event);\r
+    void CallVolumeDipSwitchControl(uint8_t status);\r
+    void PlayerVolumeDipSwitchControl(uint8_t status);\r
+private:\r
+    int32 pressFlag{0};\r
+    int32 longPressFlag{0};\r
+};\r
+}\r
+#endif // KEY_NOTIFY_INPUT_LISTENER_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/service/msg_center/src/notify/ketinput/src/NotifyOnKeyListener.cpp b/code/sdk/application/wearable/service/msg_center/src/notify/ketinput/src/NotifyOnKeyListener.cpp
new file mode 100644 (file)
index 0000000..bfcc29b
--- /dev/null
@@ -0,0 +1,139 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2024-2024. All rights reserved.
+ * Description: NotifyOnKeyListener.cpp
+ * Author:g30037431
+ * Create: 2024-12-14
+ */
+
+#include "NotifyOnKeyListener.h"
+#include "common/key_code.h"
+#include "AppViewIDs.h"
+#include "View.h"
+#include "KeyInputListener.h"
+#include "VolumeSettingView.h"
+#include "VolumeSettingPresenter.h"
+#include "VolumeSettingView.h"
+#include "wearable_log.h"
+#include "UiConfig.h"
+#include "dock/input_device.h"
+#include "notification_manager.h"
+#include "AlarmPopUpPresenter.h"
+#include "CallerLogModel.h"
+#include "MainCallingPresenter.h"
+#include "ApplistModel.h"
+namespace OHOS {
+static bool IsNotifyCallStatus()
+{
+    uint16_t notifyId = NotificationManager::GetInstance()->GetShowingNotifyId();
+    if (NotificationManager::GetInstance()->HasNotifyShowing() &&
+        (notifyId == TOPIC_EVENT_HFP_WATCH_ACTIVE || notifyId == TOPIC_EVENT_HFP_PHONE_TO_WATCH)) {
+        return true;
+    } else {
+        return false;
+    }
+}
+
+static void PressAlarmNotify()
+{
+    AlarmClockModel::GetInstance()->AlarmGetClockNum();
+    AlarmPopUpPresenter::GetInstance()->DelayAlarmRing();
+    NotificationManager::GetInstance()->StopNotify();
+}
+
+NotifyOnKeyListener *NotifyOnKeyListener::GetInstance()
+{
+    static NotifyOnKeyListener instance;
+    return &instance;
+}
+
+void NotifyOnKeyListener::OnKeyPress(void)
+{
+    pressFlag = 1;  // Short press the logo
+    return;
+}
+
+void NotifyOnKeyListener::OnKeyLongPress(const KeyEvent &event)
+{
+    longPressFlag = 1;  // Long press the logo
+
+    uint16 keyID = event.GetKeyId();
+    if (keyID == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_POWER)) { // Power button
+        NativeAbility::GetInstance().ChangeSlice(VIEW_REBOOT); // Switch to shutdown/restart card
+    } else if (keyID == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_FUNC)) {  // Function buttons
+        // Switch to View System Version Card
+    }
+    return;
+}
+
+void NotifyOnKeyListener::CallVolumeDipSwitchControl(uint8_t status)
+{
+    VolumeSliderEventListener *volumeSliderEventListener = nullptr;
+    if (NotificationManager::GetInstance()->GetVolumeScreenStatus()) {
+        VolumeSettingView *settingView = GetvolumeSetting();
+        if (settingView == nullptr) {
+            return;
+        }
+        volumeSliderEventListener = settingView->GetVolumeEventListener();
+        if (volumeSliderEventListener == nullptr) {
+            return;
+        }
+        volumeSliderEventListener->ChangeVolume(static_cast<VolumeChangeStatus>(status));
+    } else {
+        HonrsViewChange();
+        NotificationManager::GetInstance()->SetVolumeScreenStatus(true);
+    }
+    return;
+}
+
+void NotifyOnKeyListener::OnKeyRelease(const KeyEvent &event)
+{
+    uint16_t currentViewId = NativeAbility::GetInstance().GetCurSliceId();
+    uint16 keyID = event.GetKeyId();
+    uint16_t notifyId = NotificationManager::GetInstance()->GetShowingNotifyId();
+    if (keyID == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_POWER)) {  // Power button
+        if (longPressFlag == 0 && pressFlag == 1 &&
+            NotificationManager::GetInstance()->HasNotifyShowing()) {        // Short press the power button
+            if (NotificationManager::GetInstance()->GetWatchCallStatus()) {  // Call notify
+                CallVolumeDipSwitchControl(VOLUMEUP); // Volume+
+            } else if (notifyId == TOPIC_EVENT_ALARM_RING) {  // Main dial
+                PressAlarmNotify();  // When currently on the alarm notification page, process the alarm first before switching pages
+            }
+        }
+    } else if (keyID == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_FUNC)) {  // Function buttons
+        if (longPressFlag == 0 && pressFlag == 1) {                             // Short press the function key
+            if (NotificationManager::GetInstance()->GetWatchCallStatus()) {     // Volume card
+                CallVolumeDipSwitchControl(VOLUMEDOWN);  // Volume-
+            } else {
+                // Switch to user configured shortcut card
+            }
+        }
+    }
+
+    pressFlag = 0;
+    longPressFlag = 0;
+    return;
+}
+
+bool NotifyOnKeyListener::OnKeyAct(UIView &view, const KeyEvent &event)
+{
+    UNUSED(view);
+    uint8 state = event.GetState();
+
+    switch (state) {
+        case InputDevice::STATE_PRESS:  // Short press
+            OnKeyPress();
+            break;
+#ifdef __LITEOS_M__
+        case InputDevice::STATE_LONG_PRESS:  // Long press
+            OnKeyLongPress(event);
+            break;
+#endif
+        case InputDevice::STATE_RELEASE:  // Release
+            OnKeyRelease(event);
+            break;
+        default:
+            break;
+    }
+    return true;
+}
+}  // namespace OHOS
index 976e3c5..6f45b72 100644 (file)
@@ -16,7 +16,6 @@
 #include "soc_dpu_type.h"\r
 #include "soc_mipi_tx.h"\r
 #include "pmu_ldo.h"\r
-#include "soc_gmmu_api.h"\r
 #include "pm_lp_stub.h"\r
 #include "hal_pmu_ldo.h"\r
 #include "cmsis_os2.h"\r
@@ -151,13 +150,6 @@ static uint32_t action_display_lcd_on()
             POWER_DISPLAY_PRINT_ERR(0, "drv vau resume error ret=%x\r\n", ret);\r
             return ERRCODE_FAIL;\r
         }\r
-#ifdef SUPPORT_GPU_GMMU\r
-        ret = drv_gmmu_resume(NULL);\r
-        if (ret != 0) {\r
-            POWER_DISPLAY_PRINT_ERR(0, "drv gmmu resume error ret=%x\r\n", ret);\r
-            return ERRCODE_FAIL;\r
-        }\r
-#endif\r
         ret = uapi_lcd_init();\r
         if (ret != 0 && ret != EXT_ERR_MIPI_ALREADY_INIT) {\r
             POWER_DISPLAY_PRINT_ERR(0, "LCD init error ret=%x\r\n", ret);\r
@@ -215,13 +207,7 @@ static uint32_t action_display_lcd_off()
         POWER_DISPLAY_PRINT_ERR(0, "drv dpu suspend error ret=%x\r\n", ret);\r
     }\r
 #endif\r
-#ifdef SUPPORT_GPU_GMMU\r
-    ret = drv_gmmu_suspend(NULL);\r
-    if (ret != 0) {\r
-        POWER_DISPLAY_PRINT_ERR(0, "drv gmmu suspend error ret=%x\r\n", ret);\r
-        return ERRCODE_FAIL;\r
-    }\r
-#endif\r
+\r
     ret = uapi_lcd_deinit();\r
     if (ret != 0) {\r
         POWER_DISPLAY_PRINT_ERR(0, "lcd deinit error ret=%x\r\n", ret);\r
@@ -291,6 +277,7 @@ int32_t action_display_execute_entry(uint16_t action_bitmap, uint16_t new_state,
         }\r
         POWER_DISPLAY_PRINT_DEBUG(0, "turn off success.");\r
     }\r
+    sc->press_state = false;\r
     sc->current_state = new_state;\r
 \r
     return ret;\r
index ac4f7ff..6ca6ae7 100644 (file)
@@ -79,7 +79,8 @@ static errcode_t pcm_stream_task_body(void *data)
     for (;;) {\r
         osStatus_t ret = osMessageQueueGet(g_pcm_stream_msg_queue_id, &msg, nullptr, osWaitForever);\r
         if (ret != osOK) {\r
-            continue;\r
+            msg.msg_id = MSGCENTER_TYPE_ID_XIAODU_END_RECORD;\r
+            msg.data = nullptr;\r
         }\r
         if (msg.msg_id == MSGCENTER_TYPE_ID_XIAODU_SEND_PCM_STREAM) {\r
             res = msg_center_xiaodu_send_pcm_stream(MSGCENTER_CMD_XIAODU, MSGCENTER_TYPE_ID_XIAODU_SEND_PCM_STREAM,\r
index d3f4738..b12ef21 100644 (file)
@@ -75,7 +75,6 @@
 #include "lpc_core.h"\r
 #include "diag_msg.h"\r
 #include "pmu_ldo.h"\r
-#include "soc_gmmu_api.h"\r
 #include "pinctrl.h"\r
 #include "non_os_reboot.h"\r
 #include "km.h"\r
@@ -1178,13 +1177,6 @@ uint32_t mcu_pm_lcd_on(uint8_t *para, uint32_t para_len)
         wstp_print("drv vau resume error ret=%x\r\n", ret);\r
         return ERRCODE_FAIL;\r
     }\r
-#ifdef SUPPORT_GPU_GMMU\r
-    ret = drv_gmmu_resume(NULL);\r
-    if (ret != 0) {\r
-        wstp_print("drv gmmu resume error ret=%x\r\n", ret);\r
-        return ERRCODE_FAIL;\r
-    }\r
-#endif\r
     ret = uapi_lcd_init();\r
     if (ret != 0 && ret != EXT_ERR_MIPI_ALREADY_INIT) {\r
         wstp_print("LCD init error ret=%x\r\n", ret);\r
@@ -1674,13 +1666,6 @@ uint32_t mcu_pm_lcd_off(uint8_t *para, uint32_t para_len)
         wstp_print("drv dpu suspend error ret=%x\r\n", ret);\r
         return ERRCODE_FAIL;\r
     }\r
-#endif\r
-#ifdef SUPPORT_GPU_GMMU\r
-    ret = drv_gmmu_suspend(NULL);\r
-    if (ret != 0) {\r
-        wstp_print("drv gmmu suspend error ret=%x\r\n", ret);\r
-        return ERRCODE_FAIL;\r
-    }\r
 #endif\r
     ret = uapi_lcd_deinit();\r
     if (ret != 0) {\r
@@ -1716,7 +1701,8 @@ uint32_t mcu_pm_remove_vote(uint8_t *para, uint32_t para_len)
     unused(para_len);\r
 \r
     uint8_t cnt = pm_veto_get_id_cnt(PM_ID_DEBUG);\r
-    if (cnt == 1) {\r
+    if (cnt > 0) {\r
+        wstp_print("MCU remove pm_id_debug vote\r\n");\r
         uapi_pm_remove_sleep_veto(PM_ID_DEBUG);\r
     } else {\r
         wstp_print("MCU has delete pm_id_debug vote\r\n");\r
@@ -2704,6 +2690,36 @@ static uint32_t mcu_sched_statistis_stop(uint8_t *para, uint32_t para_len)
 }\r
 #endif\r
 \r
+#ifdef CFG_DRIVERS_SDIO\r
+typedef enum {\r
+    SDIO_TEST_READ_BYTE = 1,\r
+    SDIO_TEST_RESET,\r
+\r
+    SDIO_TEST_BUTT,\r
+} SDIO_TEST_CASE_T;\r
+\r
+static uint32_t mcu_sdio_test(uint8_t *para, uint32_t para_len)\r
+{\r
+    unused(para_len);\r
+    char *ptr = (char *)para;\r
+    uint32_t inputpara = strtoul(ptr, NULL, 0);\r
+\r
+    wstp_print("enter mcu_sdio_test input %u \r\n", inputpara);\r
+    switch (inputpara) {\r
+        case SDIO_TEST_READ_BYTE:\r
+            mmc_test_sdio_read_byte();\r
+            break;\r
+        case SDIO_TEST_RESET:\r
+            mmc_test_sdio_reset();\r
+            break;\r
+        default:\r
+            break;\r
+    }\r
+\r
+    return ERRCODE_SUCC;\r
+}\r
+#endif\r
+\r
 static const app_process_table g_app_funcs[] = {\r
     { RESET,                mcu_os_sys_reset },\r
     { FSTEST,               mcu_fs_test },\r
@@ -2810,6 +2826,9 @@ static const app_process_table g_app_funcs[] = {
     { SCHEDSTART,          mcu_sched_statistis_start },\r
     { SCHEDSTOP,           mcu_sched_statistis_stop  },\r
 #endif\r
+#ifdef CFG_DRIVERS_SDIO\r
+    { SDIOTEST,            mcu_sdio_test},\r
+#endif\r
 };\r
 \r
 void app_at_process(uint8_t *data, uint32_t data_len)\r
index 4552897..0b2dc24 100644 (file)
@@ -1023,6 +1023,19 @@ static uint32_t app_sched_statistis_stop(uint8_t *para, uint32_t para_len, char
 }\r
 #endif\r
 \r
+#ifdef CFG_DRIVERS_SDIO\r
+static uint32_t app_sdio_test(uint8_t *para, uint32_t para_len, char *str_cmd)\r
+{\r
+    unused(str_cmd);\r
+    if (para == NULL) {\r
+        return ERRCODE_FAIL;\r
+    }\r
+\r
+    app_pkg_msg_send(SDIOTEST, DIAG_CONTROL_FALSE, para, para_len);\r
+    return ERRCODE_SUCC;\r
+}\r
+#endif\r
+\r
 static const at_cmd_table_t g_app_cmd[] = {\r
 /* 无参数无特殊处理AT命令 */\r
     { "AT^HEAPINFO",     parse_heap_info_handle,            "" },\r
@@ -1154,6 +1167,9 @@ static const at_cmd_table_t g_app_cmd[] = {
     { "AT^SCHEDSTART", app_sched_statistis_start,   "" },\r
     { "AT^SCHEDSTOP",  app_sched_statistis_stop,   "" },\r
 #endif\r
+#ifdef CFG_DRIVERS_SDIO\r
+    { "AT^SDIOTEST",  app_sdio_test,   "" },\r
+#endif\r
 };\r
 \r
 at_cmd_table_t *get_app_cmd_table(uint32_t *cmd_count)\r
index f073668..4456e83 100644 (file)
@@ -116,6 +116,7 @@ typedef enum {
     PERFSTOP            = 0x55,\r
     SCHEDSTART          = 0x56,\r
     SCHEDSTOP           = 0x57,\r
+    SDIOTEST            = 0x58,\r
     MSG_ID_MAX_BUTT,\r
 } app_msg_id;\r
 \r
index 9da2ab0..e0ba960 100644 (file)
@@ -33,16 +33,7 @@ extern "C" {
 #define GRAPHIC_MAX_PARAM_LEN 128\r
 \r
 typedef int32_t (*GraphicProcessFunc)(commu_inter_info_t *cmd);\r
-typedef int32_t (*pfn_gmmu_suspend)(void);\r
-typedef int32_t (*pfn_gmmu_resume)(void);\r
 \r
-typedef struct {\r
-    pfn_gmmu_suspend suspend;\r
-    pfn_gmmu_resume  resume;\r
-} drv_gmmu_export_func;\r
-\r
-int32_t drv_gmmu_module_init(void);\r
-void drv_gmmu_module_exit(void);\r
 int32_t uapi_vau_module_init(void);\r
 void uapi_vau_module_exit(void);\r
 int32_t uapi_dpu_module_init(void);\r
index c17e911..55382c6 100644 (file)
@@ -32,7 +32,6 @@
 
 extern td_s32 vau_dfx_proc_read(int argc, const char *argv[]);
 extern td_s32 jpeg_dfx_proc_read(int argc, const char *argv[]);
-extern td_s32 gmmu_dfx_print_proc_info(int argc, const char *argv[]);
 
 static td_void wstp_draw_box(ext_rect *rect, td_u32 stride, td_char *mem_start, td_u32 color, td_u32 bpp)
 {
@@ -359,10 +358,6 @@ td_void wstp_gpu_sample_process(int argc, char *argv[])
     } else if (strcmp((char *)argv[0], "jpeg_proc") == 0) {\r
 #ifdef SUPPORT_GPU_JPEG\r
         jpeg_dfx_proc_read(argc - 1, argv + 1);\r
-#endif\r
-    } else if (strcmp((char *)argv[0], "gmmu_proc") == 0) {\r
-#ifdef SUPPORT_GPU_GMMU\r
-        gmmu_dfx_print_proc_info(argc - 1, argv + 1);\r
 #endif\r
     } else {\r
 #ifdef SUPPORT_GPU_TEST
index 31c0986..54163c3 100644 (file)
 #include "ability_manager.h"
 #include "js_fwk_common.h"
 #include "global.h"
-#include "gt_bundle_manager_service.h"
+#include "msg_center_customer.h"
 #include "ApplistModel.h"
 #include "bundle_manager.h"
+#include <unistd.h>
 #ifdef SUPPORT_AT_LOCATION
 #include "location_sample.h"
 #include <cmsis_os.h>
 #ifdef SUPPORT_AT_SENSOR
 #include "sensor_sample.h"
 #endif
+#include <msg_center.h>
 
 #define ARRAY_COUNT(array) (sizeof(array) / sizeof(array[0]))
-#define OHOSFWK_MAX_ARGC            8
-#define OHOSFWK_MAX_ARGV_LEN        64
+#define OHOSFWK_MAX_ARGC 8
+#define OHOSFWK_MAX_ARGV_LEN 64
 
-#define OHOSFWK_SUCCESS             0
-#define OHOSFWK_FAILED              (-1)
+#define OHOSFWK_SUCCESS 0
+#define OHOSFWK_FAILED (-1)
 
 static void ReceiveCallback(const uint8_t resultCode, const void *resultMessage)
 {
@@ -62,8 +64,8 @@ static void ReceiveCallback(const uint8_t resultCode, const void *resultMessage)
     AdapterFree(installMsg);
 }
 
-static int ConvertCmdToParam(uint8_t *para, uint32_t paraLen,
-        uint8_t argv[OHOSFWK_MAX_ARGC][OHOSFWK_MAX_ARGV_LEN], uint32_t* argc)
+static int ConvertCmdToParam(
+    uint8_t *para, uint32_t paraLen, uint8_t argv[OHOSFWK_MAX_ARGC][OHOSFWK_MAX_ARGV_LEN], uint32_t *argc)
 {
     uint32_t pos = 0;
     *argc = 0;
@@ -107,7 +109,7 @@ static uint32_t OhosfwkATCmdAmExitJsApp(uint8_t *para, uint32_t paraLen, char *s
 static uint32_t OhosfwkATCmdBmInstall(uint8_t *para, uint32_t paraLen, char *strCommonCmd)
 {
     unused(strCommonCmd);
-    uint8_t argv[OHOSFWK_MAX_ARGC][OHOSFWK_MAX_ARGV_LEN] = { 0 };
+    uint8_t argv[OHOSFWK_MAX_ARGC][OHOSFWK_MAX_ARGV_LEN] = {0};
     uint32_t argc = 0;
 
     int ret = ConvertCmdToParam(para, paraLen, argv, &argc);
@@ -120,11 +122,11 @@ static uint32_t OhosfwkATCmdBmInstall(uint8_t *para, uint32_t paraLen, char *str
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "OHOSFWK ATCMD Installing Package Failed\n");
         return ERRCODE_FAIL;
     }
-    InstallParam installParam = { .installLocation = 1, .keepData = true };
-    if (strcmp("rmdata", (char*)argv[1]) == 0) {
+    InstallParam installParam = {.installLocation = 1, .keepData = true};
+    if (strcmp("rmdata", (char *)argv[1]) == 0) {
         installParam.keepData = false;
     }
-    OHOS::BundleMsClient::GetInstance().Install((char*)argv[0], &installParam, ReceiveCallback);
+    OHOS::BundleMsClient::GetInstance().Install((char *)argv[0], &installParam, ReceiveCallback);
 
     return ERRCODE_SUCC;
 }
@@ -132,22 +134,22 @@ static uint32_t OhosfwkATCmdBmInstall(uint8_t *para, uint32_t paraLen, char *str
 static uint32_t OhosfwkATCmdBmUninstall(uint8_t *para, uint32_t paraLen, char *strCommonCmd)
 {
     unused(strCommonCmd);
-    uint8_t argv[OHOSFWK_MAX_ARGC][OHOSFWK_MAX_ARGV_LEN] = { 0 };
+    uint8_t argv[OHOSFWK_MAX_ARGC][OHOSFWK_MAX_ARGV_LEN] = {0};
     uint32_t argc = 0;
- 
+
     int ret = ConvertCmdToParam(para, paraLen, argv, &argc);
     if (ret != OHOSFWK_SUCCESS) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "OHOSFWK ATCMD Convert Command Failed\n");
         return ERRCODE_FAIL;
     }
- 
+
     if (argc != 1) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "OHOSFWK ATCMD Uninstalling Package Failed\n");
         return ERRCODE_FAIL;
     }
- 
+
     char *bundleName = (char *)argv[0];
-    ElementName* topAbility = OHOS::AbilityMsClient::GetInstance().GetTopAbility();
+    ElementName *topAbility = OHOS::AbilityMsClient::GetInstance().GetTopAbility();
 
     if ((topAbility != nullptr) && (strcmp(topAbility->bundleName, bundleName) == 0)) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "js app is active, first need terminate");
@@ -155,7 +157,7 @@ static uint32_t OhosfwkATCmdBmUninstall(uint8_t *para, uint32_t paraLen, char *s
         OHOS::AbilityMsClient::GetInstance().TerminateAbility(token);
     }
 
-    InstallParam installParam = { .installLocation = 1, .keepData = false };
+    InstallParam installParam = {.installLocation = 1, .keepData = false};
     OHOS::BundleMsClient::GetInstance().Uninstall(bundleName, &installParam, ReceiveCallback);
     FreeElement(topAbility);
     return ERRCODE_SUCC;
@@ -164,7 +166,7 @@ static uint32_t OhosfwkATCmdBmUninstall(uint8_t *para, uint32_t paraLen, char *s
 static uint32_t OhosfwkATCmdBmSet(uint8_t *para, uint32_t paraLen, char *strCommonCmd)
 {
     unused(strCommonCmd);
-    uint8_t argv[OHOSFWK_MAX_ARGC][OHOSFWK_MAX_ARGV_LEN] = { 0 };
+    uint8_t argv[OHOSFWK_MAX_ARGC][OHOSFWK_MAX_ARGV_LEN] = {0};
     uint32_t argc = 0;
 
     int ret = ConvertCmdToParam(para, paraLen, argv, &argc);
@@ -192,7 +194,7 @@ static uint32_t OhosfwkATCmdBmSet(uint8_t *para, uint32_t paraLen, char *strComm
 static uint32_t OhosfwkATCmdAmChangeNativeSlice(uint8_t *para, uint32_t paraLen, char *strCommonCmd)
 {
     unused(strCommonCmd);
-    uint8_t argv[OHOSFWK_MAX_ARGC][OHOSFWK_MAX_ARGV_LEN] = { 0 };
+    uint8_t argv[OHOSFWK_MAX_ARGC][OHOSFWK_MAX_ARGV_LEN] = {0};
     uint32_t argc = 0;
     int ret = ConvertCmdToParam(para, paraLen, argv, &argc);
     if (ret != OHOSFWK_SUCCESS) {
@@ -212,7 +214,7 @@ static uint32_t OhosfwkATCmdAmChangeNativeSlice(uint8_t *para, uint32_t paraLen,
 static uint32_t OhosfwkATCmdAmStartJsApp(uint8_t *para, uint32_t paraLen, char *strCommonCmd)
 {
     unused(strCommonCmd);
-    uint8_t argv[OHOSFWK_MAX_ARGC][OHOSFWK_MAX_ARGV_LEN] = { 0 };
+    uint8_t argv[OHOSFWK_MAX_ARGC][OHOSFWK_MAX_ARGV_LEN] = {0};
     uint32_t argc = 0;
 
     int ret = ConvertCmdToParam(para, paraLen, argv, &argc);
@@ -248,9 +250,9 @@ static uint32_t OhosfwkATCmdDfxJsMemoryInfo(uint8_t *para, uint32_t paraLen, cha
 static uint32_t OhosfwkATCmdBmGetAppInfo(uint8_t *para, uint32_t paraLen, char *strCommonCmd)
 {
     unused(strCommonCmd);
-    uint8_t argv[OHOSFWK_MAX_ARGC][OHOSFWK_MAX_ARGV_LEN] = { 0 };
+    uint8_t argv[OHOSFWK_MAX_ARGC][OHOSFWK_MAX_ARGV_LEN] = {0};
     uint32_t argc = 0;
- 
+
     int ret = ConvertCmdToParam(para, paraLen, argv, &argc);
     if (ret != OHOSFWK_SUCCESS) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "OHOSFWK ATCMD Convert Command Failed\n");
@@ -268,39 +270,39 @@ static uint32_t OhosfwkATCmdBmGetAppInfo(uint8_t *para, uint32_t paraLen, char *
     if (ret != OHOSFWK_SUCCESS) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "failed to get bundleInfo!");
     } else {
-        WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "\n"
-        "-----------------AppInfo----------------\n"
-        "bundleName: %s\n"
-        "appId: %s\n"
-        "label: %s\n"
-        "versionCode: %d\n"
-        "targetApi: %d\n"
-        "isSystemApp: %s\n"
-        "compatibleApi: %d\n"
-        "versionName: %s\n"
-        "vendor: %s\n"
-        "numOfModule: %d",
-        bundleInfo.bundleName,
-        bundleInfo.appId,
-        bundleInfo.label,
-        bundleInfo.versionCode,
-        bundleInfo.targetApi,
-        bundleInfo.isSystemApp ? "true" : "false",
-        bundleInfo.compatibleApi,
-        bundleInfo.versionName,
-        bundleInfo.vendor,
-        bundleInfo.numOfModule
-        );
-
-        WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "\n"
-        "bigIconPath: %s\n"
-        "codePath: %s\n"
-        "dataPath: %s\n"
-        "--------------AppInfo End---------------\n",
-        bundleInfo.bigIconPath,
-        bundleInfo.codePath,
-        bundleInfo.dataPath
-        );
+        WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP,
+            "\n"
+            "-----------------AppInfo----------------\n"
+            "bundleName: %s\n"
+            "appId: %s\n"
+            "label: %s\n"
+            "versionCode: %d\n"
+            "targetApi: %d\n"
+            "isSystemApp: %s\n"
+            "compatibleApi: %d\n"
+            "versionName: %s\n"
+            "vendor: %s\n"
+            "numOfModule: %d",
+            bundleInfo.bundleName,
+            bundleInfo.appId,
+            bundleInfo.label,
+            bundleInfo.versionCode,
+            bundleInfo.targetApi,
+            bundleInfo.isSystemApp ? "true" : "false",
+            bundleInfo.compatibleApi,
+            bundleInfo.versionName,
+            bundleInfo.vendor,
+            bundleInfo.numOfModule);
+
+        WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP,
+            "\n"
+            "bigIconPath: %s\n"
+            "codePath: %s\n"
+            "dataPath: %s\n"
+            "--------------AppInfo End---------------\n",
+            bundleInfo.bigIconPath,
+            bundleInfo.codePath,
+            bundleInfo.dataPath);
     }
     return ERRCODE_SUCC;
 }
@@ -317,31 +319,46 @@ static uint32_t OhosfwkATCmdBmGetAppList(uint8_t *para, uint32_t paraLen, char *
     if (ret != OHOSFWK_SUCCESS) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Get bundleInfos Failed\n");
         return ERRCODE_FAIL;
-    }else {
-            WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "\n"
+    } else {
+        WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP,
+            "\n"
             "----------------- AppList Start --------------------\n");
         for (int32_t i = 0; i < count; i++) {
-            
+
             WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP,
-            "App:%d-----------------\n" 
-            "label:            %s\n"
-            "bundleName:       %s\n",
-            i+1,
-            bundleInfos[i].bundleName, 
-            bundleInfos[i].label
-            );
+                "App:%d-----------------\n"
+                "label:            %s\n"
+                "bundleName:       %s\n",
+                i + 1,
+                bundleInfos[i].bundleName,
+                bundleInfos[i].label);
         }
-            WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "\n"
+        WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP,
+            "\n"
             "----------------- AppList End -----------------------\n");
     }
     return ERRCODE_SUCC;
 }
 
+void ScanPackagesResultCallback(const uint8_t resultCode, const void* resultMessage)
+{
+    if (resultCode == 0) {
+        WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "Scan Packages Succeeded.\n");
+        OHOS::ApplistModel::GetInstance().SetInitFlag(false);
+        WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "Set InitFlag false Succeeded\n");
+    } else {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Scan Packages Failed.\n");
+        if (resultMessage != nullptr) {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[ERROR] %s\n", reinterpret_cast<const char *>(resultMessage));
+        }
+    }
+}
+
 static uint32_t OhosfwkATCmdChangeLanguage(uint8_t *para, uint32_t paraLen, char *strCommonCmd)
 {
     unused(strCommonCmd);
 
-    uint8_t argv[OHOSFWK_MAX_ARGC][OHOSFWK_MAX_ARGV_LEN] = { 0 };
+    uint8_t argv[OHOSFWK_MAX_ARGC][OHOSFWK_MAX_ARGV_LEN] = {0};
     uint32_t argc = 0;
     int ret = ConvertCmdToParam(para, paraLen, argv, &argc);
 
@@ -360,18 +377,46 @@ 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);
+    ScanPackages(ScanPackagesResultCallback);
 
-    if (scanResult) {
-        WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "Scan Packages Succeeded");
-    } else {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Scan Packages Failed");
+    return ERRCODE_SUCC;
+}
+
+static uint32_t OhosfwkATStartNotify(uint8_t *para, uint32_t paraLen, char *strCommonCmd)
+{
+    WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "in OhosfwkATStartNotify para:%s\n", para);
+    uint8_t argv[OHOSFWK_MAX_ARGC][OHOSFWK_MAX_ARGV_LEN] = {0};
+    uint32_t argc = 0;
+    int ret = ConvertCmdToParam(para, paraLen, argv, &argc);
+    if (ret != OHOSFWK_SUCCESS) {
         return ERRCODE_FAIL;
     }
-
-    OHOS::ApplistModel::GetInstance().SetInitFlag(false);
-    WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "Set InitFlag false Succeeded");
-
+    uint32_t times = 1;
+    uint32_t msleepTime = 500;
+    if (argc == 2) {
+        char *strtimes = (char *)argv[1];
+        times = atoi(strtimes);
+    } else if (argc == 3) {
+        char *strtimes = (char *)argv[1];
+        times = atoi(strtimes);
+        char *strMsleepTime = (char *)argv[2];
+        msleepTime = atoi(strMsleepTime);
+    } else if (argc < 1) {
+        return ERRCODE_FAIL;
+    }
+    char *topicstr = (char *)argv[0];
+    uint16_t topicId = atoi(topicstr);
+    times = ((msleepTime * times) > 60000) ? 1 : times;
+    for (uint32_t i = 0; i < times; i++) {
+        ret = MsgCenterNotifyProc(topicId, nullptr);
+        if (ret != true) {
+            WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "times:%d faild\n", i);
+            return ERRCODE_FAIL;
+        }
+        if (i != times - 1) {
+            usleep(1000 * msleepTime);
+        }
+    }
     return ERRCODE_SUCC;
 }
 
@@ -393,7 +438,7 @@ static uint32_t OhosfwkATCmdLocation(uint8_t *para, uint32_t paraLen, char *strC
 {
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "in OhosfwkATCmdLocation para:%s\n", para);
     unused(strCommonCmd);
-    uint8_t argv[OHOSFWK_MAX_ARGC][OHOSFWK_MAX_ARGV_LEN] = { 0 };
+    uint8_t argv[OHOSFWK_MAX_ARGC][OHOSFWK_MAX_ARGV_LEN] = {0};
     uint32_t argc = 0;
 
     int ret = ConvertCmdToParam(para, paraLen, argv, &argc);
@@ -463,18 +508,19 @@ static uint32_t OhosfwkATCmdSensor(uint8_t *para, uint32_t paraLen, char *strCom
 }
 #endif
 static const at_cmd_table_t g_ohosfwk_cmd[] = {
-    { (char *)"AT^OHOSFWK_AM_EXIT_JSAPP",      OhosfwkATCmdAmExitJsApp, (char *)"00 00 00 00" },
-    { (char *)"AT^OHOSFWK_BM_INSTALL",         OhosfwkATCmdBmInstall,   (char *)"00 00 00 01" },
-    { (char *)"AT^OHOSFWK_BM_SET",             OhosfwkATCmdBmSet,       (char *)"00 00 00 02" },
-    { (char *)"AT^OHOSFWK_BM_UNINSTALL",       OhosfwkATCmdBmUninstall, (char *)"00 00 00 03" },
-    { (char *)"AT^OHOSFWK_AM_CHANGENATIVESLICE", OhosfwkATCmdAmChangeNativeSlice, (char *)"00 00 00 04" },
-    { (char *)"AT^OHOSFWK_AM_START_JS_APP",    OhosfwkATCmdAmStartJsApp, (char *)"00 00 00 05" },
-    { (char *)"AT^OHOSFWK_DFX_JS_MEMORY_INFO",    OhosfwkATCmdDfxJsMemoryInfo, (char *)"00 00 00 06" },
-    { (char *)"AT^OHOSFWK_CHANGE_LANGUAGE",    OhosfwkATCmdChangeLanguage, (char *)"00 00 00 07" },
-    { (char *)"AT^OHOSFWK_BM_GET_APPINFO",     OhosfwkATCmdBmGetAppInfo, (char *)"00 00 00 10" },
-    { (char *)"AT^OHOSFWK_BM_GET_APPLIST",     OhosfwkATCmdBmGetAppList, (char *)"00 00 00 11" },
+    {(char *)"AT^OHOSFWK_AM_EXIT_JSAPP", OhosfwkATCmdAmExitJsApp, (char *)"00 00 00 00"},
+    {(char *)"AT^OHOSFWK_BM_INSTALL", OhosfwkATCmdBmInstall, (char *)"00 00 00 01"},
+    {(char *)"AT^OHOSFWK_BM_SET", OhosfwkATCmdBmSet, (char *)"00 00 00 02"},
+    {(char *)"AT^OHOSFWK_BM_UNINSTALL", OhosfwkATCmdBmUninstall, (char *)"00 00 00 03"},
+    {(char *)"AT^OHOSFWK_AM_CHANGENATIVESLICE", OhosfwkATCmdAmChangeNativeSlice, (char *)"00 00 00 04"},
+    {(char *)"AT^OHOSFWK_AM_START_JS_APP", OhosfwkATCmdAmStartJsApp, (char *)"00 00 00 05"},
+    {(char *)"AT^OHOSFWK_DFX_JS_MEMORY_INFO", OhosfwkATCmdDfxJsMemoryInfo, (char *)"00 00 00 06"},
+    {(char *)"AT^OHOSFWK_CHANGE_LANGUAGE", OhosfwkATCmdChangeLanguage, (char *)"00 00 00 07"},
+    {(char *)"AT^OHOSFWK_BM_GET_APPINFO", OhosfwkATCmdBmGetAppInfo, (char *)"00 00 00 10"},
+    {(char *)"AT^OHOSFWK_BM_GET_APPLIST", OhosfwkATCmdBmGetAppList, (char *)"00 00 00 11"},
+    {(char *)"AT^OHOSFWK_MSG_START_NOTIFY", OhosfwkATStartNotify, (char *)"00 00 00 12"},
 #ifdef SUPPORT_AT_LOCATION
-    { (char *)"AT^OHOSFWK_LOCATION",    OhosfwkATCmdLocation, (char *)"00 00 00 08" },
+    {(char *)"AT^OHOSFWK_LOCATION", OhosfwkATCmdLocation, (char *)"00 00 00 08"},
 #endif
 #ifdef SUPPORT_AT_SENSOR
     {(char *)"AT^OHOSFWK_SENSOR", OhosfwkATCmdSensor, (char *)"00 00 00 09"},
index 20390f4..48e7935 100644 (file)
@@ -23,18 +23,19 @@ static uint32_t g_clock_ulp_ssb = 3276800;
 #define RCXO_32K_SEL_MASK       12\r
 #define CALIBRATION_CYCLE_MUL   0x200\r
 #define CALIBRATION_CLOCK_MUL   100\r
+#define ULP_LOCK_REG            0x5702c510\r
 \r
 calendar_regs_t *g_calendar_reg = SSB_CALENDAR_BASE_ADDR;\r
 \r
 static uint64_t uapi_ulp_systick_get_count(void)\r
 {\r
     uint64_t count = 0;\r
-\r
+    writew(ULP_LOCK_REG, 0x1);\r
     count = (uint64_t)readw(ULP_SYSTICK_VAL3) << 48U;\r
     count |= (uint64_t)readw(ULP_SYSTICK_VAL2) << 32U;\r
     count |= (uint64_t)readw(ULP_SYSTICK_VAL1) << 16U;\r
     count |= (uint64_t)readw(ULP_SYSTICK_VAL0);\r
-\r
+    writew(ULP_LOCK_REG, 0x0);\r
     return count;\r
 }\r
 \r
index 53c85ca..97f89fb 100644 (file)
@@ -150,7 +150,7 @@ target = {
                     'CONFIG_ZDIAG_AUDIO_PROC_SUPPORT', 'CONFIG_ZDIAG_AUDIO_DUMP_SUPPORT', 'CONFIG_ZDIAG_AUDIO_PROBE_SUPPORT', 'CONFIG_SEA_PHS_SUPPORT',
                     'SUPPORT_BLE', 'SUPPORT_BREDR', 'ENABLE_UIKIT', 'SUPPORT_GPU_JPEG', 'SUPPORT_GPU_GMMU', 'SUPPORT_GPU_OPENVG', 'CONFIG_DIAG_GPU_PROC_SUPPORT',
                     'SW_UART_DEBUG', 'SAVE_EXC_INFO', 'HASH_MEM_COPY', 'JS_ENABLE', 'CONFIG_LOW_POWER_TEST', 'SUPPORT_OHOSFWK',
-                    'ENABLE_ECC', 'XTS_SUPPORT', 'SUPPORT_ALIPAY_SEC'],
+                    'ENABLE_ECC', 'XTS_SUPPORT', 'SUPPORT_ALIPAY_SEC','SUPPORT_RC_CALIBRATION'],
         'ram_component': ["algorithm", "dfx_port_brandy", "dfx_update", 'dfx_nv', "osal", "arch_port", "-:testsuite",
                           "liteos_port", 'lcd', 'qspi_display', 'dfx_file_operation',
                           'psram', 'hal_mipi', 'mipi_tx', 'non_os', 'touch',
diff --git a/code/sdk/build/config/target_config/brandy/param_sector/param_sector_no_dsp.json b/code/sdk/build/config/target_config/brandy/param_sector/param_sector_no_dsp.json
new file mode 100644 (file)
index 0000000..9f83d6e
--- /dev/null
@@ -0,0 +1,58 @@
+{
+   "Partition_Tbl":{
+      "image_id" : "0x4B87A52D",
+      "stru_ver" : "0x00010000",
+      "version"  : "0x00000000",
+      "param_info_description" : [
+         "Address Constraints: flash type must fill with relative address, RAM regions must fill with absolute address.",
+         "Item ID Constraints: ssb type:                       0x00 ~ 0x0F, Relative address, Size",
+         "                     root public key and signature:  0x10 ~ 0x1F, Relative address, Size",
+         "                     firmware on flash:              0x20 ~ 0x2F, Relative address, Size",
+         "                     data on flash:                  0x30 ~ 0x3F, Relative address, Size",
+
+         "Fixed item id:  0x00: ssb",
+         "                0x01: ssb_backup",
+         "                0x10: configure RootPubKey",
+         "                0x11: signature certificate",
+         "                0x12: ssb image signature",
+         "                0x13: signature certificate backup",
+         "                0x14: ssb image backup signature",
+         "                0x15: algorithm signature",
+         "                0x16: recovery signature",
+         "                0x17: bt_image signature",
+         "                0x18: dsp_main_image signature",
+         "                0x19: dsp_overlay_image signature",
+         "                0x1A: acpu_image signature",
+         "                0x20: recovery",
+         "                0x21: bt_image",
+         "                0x22: dsp_main_image",
+         "                0x23: dsp_overlay_image",
+         "                0x24: acpu_image",
+         "                0x30: nv_data",
+         "                0x31: fota_data"
+      ],
+      "param_info" : [
+         ["0x00", "0x00000000", "0x00020000"],
+         ["0x01", "0x00020000", "0x00020000"],
+         ["0x10", "0x00040000", "0x00001000"],
+         ["0x11", "0x00041000", "0x00001000"],
+         ["0x12", "0x00042000", "0x00001000"],
+         ["0x13", "0x00043000", "0x00001000"],
+         ["0x14", "0x00044000", "0x00001000"],
+         ["0x15", "0x00045000", "0x00001000"],
+         ["0x16", "0x00046000", "0x00001000"],
+         ["0x17", "0x00047000", "0x00001000"],
+         ["0x18", "0xFFFFFFFF", "0x00000000"],
+         ["0x19", "0xFFFFFFFF", "0x00000000"],
+         ["0x1a", "0x0004A000", "0x00001000"],
+         ["0x20", "0x00050000", "0x00040000"],
+         ["0x21", "0x00090000", "0x00070000"],
+         ["0x22", "0xFFFFFFFF", "0x00000000"],
+         ["0x23", "0xFFFFFFFF", "0x00000000"],
+         ["0x24", "0x00100000", "0x006F9000"],
+         ["0x30", "0x007F9000", "0x00004000"],
+         ["0x31", "0x007FD000", "0x00003000"]
+      ]
+   },
+   "Output_file_prefix":"AIoT"
+}
index fb050ca..80b3676 100644 (file)
@@ -84,7 +84,7 @@ component_set = {
               'plugin_demuxer_mjpeg', 'plugin_protocol_https', 'audio_port_common', 'plugin_demuxer_raw'],
     'media_target4': ['audio_manager', 'audio_service', 'audio_stream', 'audio_utils', 'media_common', 'audio_hw',
               'audio_primary_port', 'audio_bluetooth_port', 'audio_modem_port', 'media_hal_common',
-              'audio_port_common', 'media_sample_wrapper'],
+              'audio_port_common', 'media_sample_wrapper', 'audio_decrypt'],
     'gpu': ['gfx_rm', 'gpu'],
     'gpu_test': ['test_gpu'],
     'graphic_uikit': ['cjson_static', 'display_gfx', 'display_gralloc', 'display_layer', 'graphic_input', 'graphic_service',
index 04fa336..26326bc 100644 (file)
@@ -186,7 +186,10 @@ class CMakeBuilder(BuildEnvironment):
             if "CFG_FLASH_SIZE=16" in defines:
                 self.pack_fwpkg(env.get('chip'), target, "0x1000000")
             else:
-                self.pack_fwpkg(env.get('chip'), target, "0x800000")
+                if "CFG_LOAD_FROM_FS" in defines:
+                    self.pack_fwpkg(env.get('chip'), target, "0x800000", "True")
+                else:
+                    self.pack_fwpkg(env.get('chip'), target, "0x800000")
         
         if not run_custom_cmd(env, target, 'build_post'):
             self.print_build_result(target, 1)
@@ -394,11 +397,11 @@ class CMakeBuilder(BuildEnvironment):
                 print(f"ERROR! :{bin1} is not same with {bin2}")
                 sys.exit(1)
     
-    def pack_fwpkg(self, chip, target_name, flash_size):
+    def pack_fwpkg(self, chip, target_name, flash_size, no_dsp="False"):
         # bin packet all in one
         packet_script_path = os.path.join(pkg_tools_path, 'packet.py')
         print("packet ing...")
-        errcode = exec_shell([self.python_path, packet_script_path, chip, target_name, flash_size], None, True)
+        errcode = exec_shell([self.python_path, packet_script_path, chip, target_name, flash_size, no_dsp], None, True)
         if errcode != 0:
             print("packet error!")
             self.print_build_result(target_name, errcode)
index f40ea0d..d456099 100644 (file)
@@ -85,6 +85,9 @@ unsigned int IoTGpioGetInputVal(unsigned int id, IotGpioValue *val)
 static void GpioCallbackFunc(pin_t id, uintptr_t arg)\r
 {\r
     unused(arg);\r
+    if (id >= PIN_NONE) {\r
+        return;\r
+    }\r
     if (g_iot_gpio_callback[id].func) {\r
         g_iot_gpio_callback[id].func(g_iot_gpio_callback[id].arg);\r
     }\r
@@ -105,6 +108,9 @@ unsigned int IoTGpioRegisterIsrFunc(unsigned int id, IotGpioIntType intType, Iot
     } else {\r
         return IOT_FAILURE;\r
     }\r
+    if (id >= PIN_NONE) {\r
+        return IOT_FAILURE;\r
+    }\r
     g_iot_gpio_callback[id].func = func;\r
     g_iot_gpio_callback[id].arg = arg;\r
     if (uapi_gpio_register_isr_func((pin_t)id, trigger, (gpio_callback_t)GpioCallbackFunc) != ERRCODE_SUCC) {\r
@@ -115,6 +121,9 @@ unsigned int IoTGpioRegisterIsrFunc(unsigned int id, IotGpioIntType intType, Iot
 \r
 unsigned int IoTGpioUnregisterIsrFunc(unsigned int id)\r
 {\r
+    if (id >= PIN_NONE) {\r
+        return IOT_FAILURE;\r
+    }\r
     if (uapi_gpio_unregister_isr_func((pin_t)id) != ERRCODE_SUCC) {\r
         return IOT_FAILURE;\r
     }\r
index f1a7063..d73f6b8 100644 (file)
@@ -46,12 +46,21 @@ const hal_pio_config_t g_pio_function_config[PIN_MAX_NUMBER] = {
     { 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
 
+#ifndef CFG_DRIVERS_SDIO
     { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },    // S_HGPIO0 sdio
     { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },    // S_HGPIO1
     { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },    // S_HGPIO2
     { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },    // S_HGPIO3
     { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },    // S_HGPIO4
     { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE },    // S_HGPIO5
+#else
+    { HAL_PIO_FUNC_SDIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },    // S_HGPIO0 sdio
+    { HAL_PIO_FUNC_SDIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },    // S_HGPIO1
+    { HAL_PIO_FUNC_SDIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },    // S_HGPIO2
+    { HAL_PIO_FUNC_SDIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },    // S_HGPIO3
+    { HAL_PIO_FUNC_SDIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },    // S_HGPIO4
+    { HAL_PIO_FUNC_SDIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_UP, HAL_PIO_IE_ENBALE },    // S_HGPIO5
+#endif
 #if (defined CFG_DRIVERS_NANDFLASH)
     { HAL_PIO_FUNC_QSPI1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_ENBALE },   // S_HGPIO6
     { HAL_PIO_FUNC_QSPI1, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_ENBALE },   // S_HGPIO7
index ea5ae13..03a326d 100644 (file)
  *  分区表配置:\r
  *   16M:build\config\target_config\brandy\param_sector\param_sector_16M.json\r
  *   8M:build\config\target_config\brandy\param_sector\param_sector.json\r
+ *   8M no_dsp:build\config\target_config\brandy\param_sector\param_sector_no_dsp.json\r
  *  打包脚本:\r
  *  tools\pkg\chip_packet\brandy\packet.py\r
 */\r
index f4f0e77..5d7028e 100644 (file)
 #define HIFI0_CODEC_PAGES                   448
 #define APP_IMAGE_PAGES                     2048
 #else
+#if defined(CFG_LOAD_FROM_FS)
+#define DTB_IMAGE_PAGES                     0
+#define RECOVERY_IMAGE_PAGES                64
+#define RESERVE_IMAGE_PAGES                 0
+#define BT_IMAGE_PAGES                      112
+#define HIFI0_IMAGE_PAGES                   0
+#define HIFI0_CODEC_PAGES                   0
+#define APP_IMAGE_PAGES                     1785
+#else
 #define DTB_IMAGE_PAGES                     0
 #define RECOVERY_IMAGE_PAGES                64
 #define RESERVE_IMAGE_PAGES                 0
@@ -42,6 +51,7 @@
 #define HIFI0_CODEC_PAGES                   320
 #define APP_IMAGE_PAGES                     1353
 #endif
+#endif
 #define NV_IMAGE_PAGES                      4
 #define FOTA_IMAGE_PAGES                    3
 #define FOTA_IMAGE_START                    0x770000
 #define SND_PORT_AEF_TYPE                                      0x180 // 参考 soc_uapi_aef.h 中 UAPI_AEF_TYPE_SMARTPA 枚举
 #endif
 #define SND_PORT_AEF_ENABLE                            true // true代表开启aef算法,false代表关闭aef算法
+
+#define OPUS_ENC_BIT_RATE                                      16000 // opus编码码率
+#define MP3_ENC_BIT_RATE                                       16000 // mp3编码码率
 /**
  * @}
  */
index 0ee13ad..bd94392 100644 (file)
 #define SND_PORT_AEF_TYPE                                      0x180 // 参考 soc_uapi_aef.h 中 UAPI_AEF_TYPE_SMARTPA 枚举
 #endif
 #define SND_PORT_AEF_ENABLE                            true // true代表开启aef算法,false代表关闭aef算法
+
+#define OPUS_ENC_BIT_RATE                                      16000 // opus编码码率
+#define MP3_ENC_BIT_RATE                                       16000 // mp3编码码率
 /**
  * @}
  */
index ded098e..fa0f84a 100644 (file)
@@ -257,7 +257,6 @@ uint16_t get_sdiom_freq_level(clocks_clk_src_t src)
 
 static void mcu_clocks_set_freq(system_mcu_core_clk_cfg_t sys_mcu_clks)
 {
-    uint16_t level = CLOCKS_SDIO_FREQ_32M;
     clocks_clk_src_t mcu_core_clk = sys_mcu_clks.mcu_clk.clk_src;
     uint8_t mcu_clk_div = sys_mcu_clks.mcu_clk.clk_div;
     clocks_clk_src_t psram_clk = sys_mcu_clks.psram_clk.clk_src;
@@ -266,23 +265,23 @@ static void mcu_clocks_set_freq(system_mcu_core_clk_cfg_t sys_mcu_clks)
     uint8_t mem_clk_div = sys_mcu_clks.mem_clk.clk_div;
     clocks_clk_src_t flash_clk = sys_mcu_clks.flash_clk.clk_src;
     uint8_t flash_clk_div = sys_mcu_clks.flash_clk.clk_div;
-    clocks_clk_src_t sdiom_clk = sys_mcu_clks.sdiom_clk.clk_src;
-    uint8_t sdiom_clk_div = sys_mcu_clks.sdiom_clk.clk_div;
     clocks_clk_src_t gpu_clk = sys_mcu_clks.gpu_clk.clk_src;
     uint8_t gpu_clk_div = sys_mcu_clks.gpu_clk.clk_div;
     clocks_clk_src_t spi_clk = sys_mcu_clks.spi_clk.clk_src;
     uint8_t spi_clk_div = sys_mcu_clks.spi_clk.clk_div;
+    clocks_clk_src_t sdiom_clk = sys_mcu_clks.sdiom_clk.clk_src;
+    uint8_t sdiom_clk_div = sys_mcu_clks.sdiom_clk.clk_div;
 
     mcu_clock_set_freq(mcu_core_clk, mcu_clk_div);
     uint32_t irq_status = osal_irq_lock();
     system_ccrg_clock_config(CLOCKS_CCRG_MODULE_XIP_OPI, psram_clk, psram_clk_div);
     system_ccrg_clock_config(CLOCKS_CCRG_MODULE_MEM_BUS, mem_clk, mem_clk_div);
     system_ccrg_clock_config(CLOCKS_CCRG_MODULE_XIP_QSPI, flash_clk, flash_clk_div);
-#ifdef CFG_DRIVERS_MMC
-    level = get_sdiom_freq_level(sdiom_clk);
-    if (g_sdiom_handler != NULL) { g_sdiom_handler(level); }
-#else
-    system_ccrg_clock_config(CLOCKS_CCRG_MODULE_SDIOM, sdiom_clk, sdiom_clk_div);
+    /* NANDFLASH对SDIOM有依赖,如果不配置的话,sdiom会固定选择PLL时钟源,功耗有损失 */
+#ifdef CFG_DRIVERS_NANDFLASH
+    if (is_sdio_working() == false) {
+        system_ccrg_clock_config(CLOCKS_CCRG_MODULE_SDIOM, sdiom_clk, sdiom_clk_div);
+    }
 #endif
     system_ccrg_clock_config(CLOCKS_CCRG_MODULE_GPU, gpu_clk, gpu_clk_div);
     system_ccrg_clock_config(CLOCKS_CCRG_MODULE_MCU_PERP_SPI, spi_clk, spi_clk_div);
index 6b7abcb..8cf61c4 100644 (file)
@@ -19,6 +19,7 @@
 bool  g_startup_finish_flag = false;\r
 uint16_t g_ulp_wkup_flag = 0;\r
 static uint32_t g_clock_ulp = 3276800;\r
+static uint8_t g_button_vetoed = 0;\r
 \r
 void set_startup_finish_flag(void)\r
 {\r
@@ -353,6 +354,25 @@ static void porting_button_remove_veto(uint8_t id)
     }\r
 }\r
 \r
+/*porting_button_add_veto和porting_button_remove_veto为补丁合入*/\r
+#if 0\r
+static void porting_button_add_veto(void)\r
+{\r
+    if (g_button_vetoed == 0) {\r
+        uapi_pm_add_sleep_veto(PM_ID_BUTTON);\r
+        g_button_vetoed = 1;\r
+    }\r
+}\r
+\r
+static void porting_button_remove_veto(void)\r
+{\r
+    if (g_button_vetoed == 1) {\r
+        uapi_pm_remove_sleep_veto(PM_ID_BUTTON);\r
+        g_button_vetoed = 0;\r
+    }\r
+}\r
+#endif\r
+\r
 button_peripheral_api g_brandy_button_api = {\r
     .button_pmu_pwr_cfg = porting_button_pmu_pwr_cfg,\r
     .button_check_interrupt = porting_button_check_int,\r
index e04be0d..c64d6a4 100644 (file)
@@ -20,4 +20,29 @@ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/source/CMakeLists.txt)
 elseif(EXISTS ${BIN_DIR}/${PROJECT_CHIP_DIR}/libs/audio/CMakeLists.txt)
     set(PUBLIC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/include)
     add_subdirectory(${BIN_DIR}/${PROJECT_CHIP_DIR}/libs/audio audio)
+else()
+    set(PUBLIC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/include)
+    set(AUDIO_LIST "audio_api" "audio_core" "audio_drv" "audio_sample" "audio_vendor")
+
+    set(COMPONENT_LIST ${AUDIO_LIST})
+    set(AUDIO_LIB_LIST)
+
+    set(SAP_BOARD ${BOARD})
+    # Switch audio libs dir for brandy evb4
+    if("BRANDY_PRODUCT_EVB4" IN_LIST DEFINES)
+        string(APPEND SAP_BOARD "4")
+    endif()
+
+    set(LIBRARY_OUTPUT_PATH ${BIN_DIR}/${CHIP}/libs/audio/${SAP_BOARD}_${APPLICATION}/${OS})
+    foreach(COMPONENT ${COMPONENT_LIST})
+        set(COMPONENT_NAME ${COMPONENT})
+        if (NOT ${COMPONENT_NAME} IN_LIST TARGET_COMPONENT)
+            continue()
+        endif()
+        find_library(LIBS${COMPONENT_NAME} "lib${COMPONENT_NAME}.a" ${LIBRARY_OUTPUT_PATH})
+        set(AUDIO_LIB_LIST ${AUDIO_LIB_LIST} ${LIBS${COMPONENT_NAME}})
+        build_component()
+    endforeach()
+
+    target_link_libraries(${TARGET_NAME} PRIVATE -Wl,--whole-archive  ${AUDIO_LIB_LIST} -Wl,--no-whole-archive )
 endif()
index 088fa00..d85100e 100644 (file)
@@ -140,6 +140,19 @@ td_s32 uapi_audio_set_tws_role(uapi_audio_tws_role tws_role);
  */
 td_s32 uapi_audio_set_dsp_log_level(td_u32 log_level);
 
+/**
+ * @if Eng
+ * @brief  Set DSP binary file path.
+ * @retval SUCCESS Success.
+ * @retval FAILURE Failure.
+ * @else
+ * @brief  设置DSP二进制文件路径
+ * @retval SUCCESS 成功
+ * @retval FAILURE 失败
+ * @endif
+ */
+td_s32 uapi_audio_set_dsp_file_path(const td_char *file_path, td_u32 len);
+
 /**
  * @}
  */
index 61fe062..298c129 100644 (file)
@@ -265,6 +265,9 @@ typedef enum {
     UAPI_SND_AEF_PROFILE_MUSIC,
     UAPI_SND_AEF_PROFILE_VOIP,
     UAPI_SND_AEF_PROFILE_RINGTONE,
+       UAPI_SND_AEF_PROFILE_EXT0,
+    UAPI_SND_AEF_PROFILE_EXT1,
+    UAPI_SND_AEF_PROFILE_EXT2,
     UAPI_SND_AEF_PROFILE_VOIP_CAT1,
     UAPI_SND_AEF_PROFILE_MAX,
 } uapi_snd_aef_profile;
index a7b6c2e..d1348c6 100644 (file)
@@ -33,6 +33,8 @@ td_s32 mpi_audio_set_tws_role(audio_tws_role tws_role);
 
 td_s32 mpi_audio_set_dsp_log_level(td_u32 log_level);
 
+td_s32 mpi_audio_set_dsp_file_path(const td_char *file_path, td_u32 len);
+
 #ifdef __cplusplus
 #if __cplusplus
 }
index 50b8148..1b44dfe 100644 (file)
@@ -28,7 +28,7 @@ extern "C" {
 #define mpi_sys_check_inited()         \
     do {                               \
         if (g_mpi_sys_init_cnt == 0) { \
-            return ERR_ADEC_NOT_INIT;  \
+            return ERR_SYS_NOT_INIT;   \
         }                              \
     } while (0)
 
@@ -293,6 +293,28 @@ td_s32 mpi_audio_set_dsp_log_level(td_u32 log_level)
     return AUDIO_SUCCESS;
 }
 
+td_s32 mpi_audio_set_dsp_file_path(const td_char *file_path, td_u32 len)
+{
+    td_s32 ret;
+    sap_drv_str drv_str;
+
+    mpi_sys_check_inited();
+    mpi_sys_lock();
+
+    audio_api_time_consum_stat();
+
+    drv_str.str = file_path;
+    drv_str.len = len;
+    ret = audio_ioctl(g_mpi_sys_fd, CMD_IOCTL_SYS_SET_DSP_FILE_PATH, (td_void *)&drv_str);
+    if (ret != AUDIO_SUCCESS) {
+        mpi_sys_unlock();
+        return ret;
+    }
+
+    mpi_sys_unlock();
+    return AUDIO_SUCCESS;
+}
+
 #ifdef __cplusplus
 #if __cplusplus
 }
index 763d3c8..4cecd29 100644 (file)
@@ -93,6 +93,11 @@ td_s32 uapi_audio_set_dsp_log_level(td_u32 log_level)
     return mpi_audio_set_dsp_log_level(log_level);
 }
 
+td_s32 uapi_audio_set_dsp_file_path(const td_char *file_path, td_u32 len)
+{
+    return mpi_audio_set_dsp_file_path(file_path, len);
+}
+
 #ifdef __cplusplus
 #if __cplusplus
 }
index 1cb3f51..162e4b1 100644 (file)
@@ -152,6 +152,7 @@ CFG_SAP_AW88166_I2C_ADDR=0x34
 CFG_SAP_SEA_SEE_1MIC_SUPPORT=y
 CFG_SAP_SEA_SEE_1MIC_WNR_SUPPORT=y
 CFG_SAP_SEA_SEE_1MIC_NNSPK_SUPPORT=y
+CFG_SAP_SEA_SEE_1MIC_EQ_SUPPORT=y
 # CFG_SAP_SEA_SEE_1MIC_PROTECT_SUPPORT is not set
 # CFG_SAP_SEA_SEE_2MIC_SUPPORT is not set
 # CFG_SAP_SEA_VQE_DEF_SUPPORT is not set
index 2e4d1a1..66c1fb3 100644 (file)
@@ -152,6 +152,7 @@ CFG_SAP_AW88166_I2C_ADDR=0x34
 CFG_SAP_SEA_SEE_1MIC_SUPPORT=y
 CFG_SAP_SEA_SEE_1MIC_WNR_SUPPORT=y
 CFG_SAP_SEA_SEE_1MIC_NNSPK_SUPPORT=y
+CFG_SAP_SEA_SEE_1MIC_EQ_SUPPORT=y
 # CFG_SAP_SEA_SEE_1MIC_PROTECT_SUPPORT is not set
 # CFG_SAP_SEA_SEE_2MIC_SUPPORT is not set
 # CFG_SAP_SEA_VQE_DEF_SUPPORT is not set
index 58ae193..034e320 100644 (file)
@@ -152,6 +152,7 @@ CFG_SAP_AW88166_I2C_ADDR=0x34
 CFG_SAP_SEA_SEE_1MIC_SUPPORT=y
 # CFG_SAP_SEA_SEE_1MIC_WNR_SUPPORT is not set
 # CFG_SAP_SEA_SEE_1MIC_NNSPK_SUPPORT is not set
+# CFG_SAP_SEA_SEE_1MIC_EQ_SUPPORT is not set
 # CFG_SAP_SEA_SEE_1MIC_PROTECT_SUPPORT is not set
 # CFG_SAP_SEA_SEE_2MIC_SUPPORT is not set
 # CFG_SAP_SEA_VQE_DEF_SUPPORT is not set
index 624e9e1..25c2b4c 100644 (file)
@@ -152,6 +152,7 @@ CFG_SAP_AW88166_I2C_ADDR=0x34
 CFG_SAP_SEA_SEE_1MIC_SUPPORT=y
 CFG_SAP_SEA_SEE_1MIC_WNR_SUPPORT=y
 CFG_SAP_SEA_SEE_1MIC_NNSPK_SUPPORT=y
+CFG_SAP_SEA_SEE_1MIC_EQ_SUPPORT=y
 # CFG_SAP_SEA_SEE_1MIC_PROTECT_SUPPORT is not set
 # CFG_SAP_SEA_SEE_2MIC_SUPPORT is not set
 # CFG_SAP_SEA_VQE_DEF_SUPPORT is not set
index be995a5..b7170bd 100644 (file)
@@ -152,6 +152,7 @@ CFG_SAP_AW88166_I2C_ADDR=0x34
 CFG_SAP_SEA_SEE_1MIC_SUPPORT=y
 CFG_SAP_SEA_SEE_1MIC_WNR_SUPPORT=y
 CFG_SAP_SEA_SEE_1MIC_NNSPK_SUPPORT=y
+CFG_SAP_SEA_SEE_1MIC_EQ_SUPPORT=y
 # CFG_SAP_SEA_SEE_1MIC_PROTECT_SUPPORT is not set
 # CFG_SAP_SEA_SEE_2MIC_SUPPORT is not set
 # CFG_SAP_SEA_VQE_DEF_SUPPORT is not set
index 52f8d9e..b0636bd 100644 (file)
@@ -70,20 +70,20 @@ set(COMPONENT_SRC ${COMPONENT_SRC}
 )\r
 endif()\r
 \r
-if("${CHIP}" STREQUAL "brandy")\r
-install_sdk(${CMAKE_CURRENT_SOURCE_DIR}/dpm "*")\r
-endif()\r
-\r
-if("${CFG_SAP_DRV_OVERLAY_LOAD_FROM}" STREQUAL "flash")\r
+if("CFG_LOAD_FROM_FS" IN_LIST DEFINES)\r
+set(COMPONENT_SRC ${COMPONENT_SRC}\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/common/drv_overlay_load_from_file.c\r
+)\r
+else()\r
 set(COMPONENT_SRC ${COMPONENT_SRC}\r
     ${CMAKE_CURRENT_SOURCE_DIR}/common/drv_overlay_load_from_flash.c\r
 )\r
 endif()\r
 \r
-if("${CFG_SAP_DRV_OVERLAY_LOAD_FROM}" STREQUAL "file")\r
-set(COMPONENT_SRC ${COMPONENT_SRC}\r
-    ${CMAKE_CURRENT_SOURCE_DIR}/common/drv_overlay_load_from_file.c\r
-)\r
+if("${CHIP}" STREQUAL "brandy")\r
+install_sdk(${CMAKE_CURRENT_SOURCE_DIR}/dpm "*")\r
+install_sdk(${CMAKE_CURRENT_SOURCE_DIR}/common "drv_overlay_load_from_file.c")\r
+install_sdk(${CMAKE_CURRENT_SOURCE_DIR}/common "drv_overlay_load_from_flash.c")\r
 endif()\r
 #===================================================================================\r
 set(COMPONENT_INC\r
index daaf315..05c8185 100644 (file)
@@ -630,6 +630,9 @@ static td_s32 ao_get_aef_param_bin_by_profile(ao_aef_profile aef_profile, td_u8
         {AO_AEF_PROFILE_MUSIC, "aef_music.bin"},
         {AO_AEF_PROFILE_VOIP, "aef_voip.bin"},
         {AO_AEF_PROFILE_RINGTONE, "aef_ringtone.bin"},
+        {AO_AEF_PROFILE_EXT0, "aef_ext0.bin"},
+        {AO_AEF_PROFILE_EXT1, "aef_ext1.bin"},
+        {AO_AEF_PROFILE_EXT2, "aef_ext2.bin"},
     };
     const td_u32 item_cnt = (td_u32)(sizeof(aef_profile_bin_name) / sizeof(aef_profile_bin_name[0]));
 
index ce9e23c..805a011 100644 (file)
@@ -102,7 +102,10 @@ static const aef_profile_name_item g_aef_profile_name_list[] = {
     {AO_AEF_PROFILE_NONE, "none"},
     {AO_AEF_PROFILE_MUSIC, "music"},
     {AO_AEF_PROFILE_VOIP, "voip"},
-    {AO_AEF_PROFILE_RINGTONE, "RINGTONE"},
+    {AO_AEF_PROFILE_RINGTONE, "ringtone"},
+    {AO_AEF_PROFILE_EXT0, "ext0"},
+    {AO_AEF_PROFILE_EXT1, "ext1"},
+    {AO_AEF_PROFILE_EXT2, "ext2"},
 };
 
 static const td_char *drv_ao_proc_aef_profile_name(ao_aef_profile profile)
index e1bcd63..5775f6a 100644 (file)
@@ -79,6 +79,7 @@ static drv_audio_osal_ioctl_cmd g_sap_sys_cmd_list[CMD_SYS_ID_MAX] = {
     [CMD_SYS_SET_TWS_MODE] = {CMD_IOCTL_SYS_SET_TWS_MODE, sap_ioctl_sys_set_tws_mode},
     [CMD_SYS_SET_TWS_ROLE] = {CMD_IOCTL_SYS_SET_TWS_ROLE, sap_ioctl_sys_set_tws_role},
     [CMD_SYS_SET_DSP_LOG_LEVEL] = {CMD_IOCTL_SYS_SET_DSP_LOG_LEVEL, sap_ioctl_sys_set_dsp_log_level},
+    [CMD_SYS_SET_DSP_FILE_PATH] = {CMD_IOCTL_SYS_SET_DSP_FILE_PATH, sap_ioctl_sys_set_dsp_file_path},
 };
 
 static drv_audio_osal_fileops g_sap_sys_fops = {
index 20d4186..5490e6a 100644 (file)
@@ -75,6 +75,11 @@ typedef struct {
     td_u32 value;
 } sap_drv_u32;
 
+typedef struct {
+    td_char *str;
+    td_u32 len;
+} sap_drv_str;
+
 typedef struct {
     td_handle track;
     td_s64 pts; /* us */
@@ -365,6 +370,7 @@ typedef struct {
 #define CMD_IOCTL_SYS_SET_TWS_MODE _IOW(DEV_ID_SAP_SYS, CMD_SYS_SET_TWS_MODE, td_u8)
 #define CMD_IOCTL_SYS_SET_TWS_ROLE _IOW(DEV_ID_SAP_SYS, CMD_SYS_SET_TWS_ROLE, td_u8)
 #define CMD_IOCTL_SYS_SET_DSP_LOG_LEVEL _IOW(DEV_ID_SAP_SYS, CMD_SYS_SET_DSP_LOG_LEVEL, td_u32)
+#define CMD_IOCTL_SYS_SET_DSP_FILE_PATH _IOW(DEV_ID_SAP_SYS, CMD_SYS_SET_DSP_FILE_PATH, sap_drv_str)
 
 #define CMD_IOCTL_ADP_INIT _IOWR(DEV_ID_SAP_ADP, CMD_ADP_INIT, sap_adp_init)
 #define CMD_IOCTL_ADP_DEINIT _IO(DEV_ID_SAP_ADP, CMD_ADP_DEINIT)
index fc0d8a0..a012786 100644 (file)
@@ -19,6 +19,7 @@ enum {
     CMD_SYS_SET_TWS_MODE,
     CMD_SYS_SET_TWS_ROLE,
     CMD_SYS_SET_DSP_LOG_LEVEL,
+    CMD_SYS_SET_DSP_FILE_PATH,
 
     CMD_SYS_ID_MAX,
 };
diff --git a/code/sdk/drivers/drivers/driver/audio/source/drv/common/drv_overlay_load_from_file.c b/code/sdk/drivers/drivers/driver/audio/source/drv/common/drv_overlay_load_from_file.c
new file mode 100644 (file)
index 0000000..2f48994
--- /dev/null
@@ -0,0 +1,345 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2020-2020. All rights reserved.
+ * Description: header file for audio input
+ * Author: audio
+ */
+
+#include "securec.h"
+#include "mem_addr.h"
+#include "audio_osal.h"
+#include "audio_debug.h"
+#include "drv_audio_osal.h"
+#include "drv_overlay_load.h"
+#include "core_overlay_info.h"
+
+#ifdef __cplusplus
+#if __cplusplus
+extern "C" {
+#endif
+#endif
+
+#define MAX_PATH_LENGTH 64
+
+static const td_char *g_dsp_main_file = "dsp_main.bin";
+static const td_char *g_dsp_lib_file = "dsp_overlay.bin";
+static td_char g_dsp_file_path[MAX_PATH_LENGTH] = {0};
+
+td_s32 overlay_set_dsp_file_path(const char *file_path, td_u32 len)
+{
+    td_s32 ret;
+    td_u32 dsp_main_file_length = strlen(g_dsp_main_file);
+    td_u32 dsp_lib_file_length = strlen(g_dsp_lib_file);
+    td_u32 max_file_length = (dsp_main_file_length > dsp_lib_file_length) ? dsp_main_file_length : dsp_lib_file_length;
+
+    if (len + max_file_length >= MAX_PATH_LENGTH) {
+        sap_err_log_u32(len);
+        sap_err_log_info("file path is too long");
+        return ERR_SYS_MEM_OVERLOAD;
+    }
+
+    ret = memcpy_s(g_dsp_file_path, MAX_PATH_LENGTH - 1, file_path, len);
+    if (ret != EOK) {
+        sap_err_log_fun(memcpy_s, ret);
+        return ERR_SYS_MEM_COPY;
+    }
+
+    return AUDIO_SUCCESS;
+}
+
+static td_s32 overlay_load_elf(audio_core_id core_id, td_void *flip)
+{
+    td_u32 i, sec_cnt;
+    td_bool tcm_flag;
+    td_u32 phys_addr;
+    td_u32 *virt_addr = TD_NULL;
+    td_char *sec_buf = TD_NULL;
+    struct {
+        td_u32 addr;
+        td_u32 size;
+    } sec_hdr;
+
+    if (drv_audio_osal_klib_fread((td_char *)&sec_cnt, sizeof(sec_cnt), flip) != sizeof(sec_cnt)) {
+        return ERR_SYS_NOT_AVAILABLE;
+    }
+
+    for (i = 0; i < sec_cnt; i++) {
+        if (drv_audio_osal_klib_fread((td_char *)&sec_hdr, sizeof(sec_hdr), flip) != sizeof(sec_hdr)) {
+            return ERR_SYS_NOT_AVAILABLE;
+        }
+
+        if (is_4byte_aligned(sec_hdr.addr) != TD_TRUE || is_4byte_aligned(sec_hdr.size) != TD_TRUE) {
+            audio_log_err("addr=%#x/size=%#x, not aligned to 4 bytes", sec_hdr.addr, sec_hdr.size);
+            return ERR_SYS_VERIFY_FAIL;
+        }
+
+        phys_addr = drv_overlay_map_addr(core_id, sec_hdr.addr, &tcm_flag);
+        virt_addr = audio_osal_address_map((td_ulong)phys_addr, sec_hdr.size);
+        if (virt_addr == TD_NULL) {
+            return ERR_SYS_MEM_EXCEPTION;
+        }
+
+        if (tcm_flag) {
+            /* Load IRAM/DRAM with 32bit operation */
+            sec_buf = audio_osal_malloc_aligned(sec_hdr.size, sizeof(td_u32));
+            if (sec_buf == TD_NULL) {
+                audio_osal_address_unmap((td_ulong)phys_addr, virt_addr);
+                return ERR_SYS_MEM_ALLOC;
+            }
+            if (drv_audio_osal_klib_fread((td_char *)sec_buf, sec_hdr.size, flip) != sec_hdr.size) {
+                audio_osal_free_aligned(sec_buf);
+                audio_osal_address_unmap((td_ulong)phys_addr, virt_addr);
+                return ERR_SYS_NOT_AVAILABLE;
+            }
+            drv_overlay_copy_section(virt_addr, (const td_u32 *)sec_buf, sec_hdr.size);
+            audio_osal_free_aligned(sec_buf);
+        } else {
+            if (drv_audio_osal_klib_fread((td_char *)virt_addr, sec_hdr.size, flip) != sec_hdr.size) {
+                audio_osal_address_unmap((td_ulong)phys_addr, virt_addr);
+                return ERR_SYS_NOT_AVAILABLE;
+            }
+        }
+
+        audio_osal_dcache_region_wb((td_ulong)phys_addr, virt_addr, sec_hdr.size);
+        audio_osal_address_unmap((td_ulong)phys_addr, virt_addr);
+    }
+
+    return AUDIO_SUCCESS;
+}
+
+static td_s32 overlay_get_file_from_flash(const char *file, td_u32 flash_addr, td_u32 flash_len)
+{
+#ifdef SAP_FLASH_FIRMWARE_SUPPORT
+    td_void *flip = TD_NULL;
+
+    audio_log_warn("save %#x %#x to %s\n", flash_addr, flash_len, file);
+    flip = drv_audio_osal_klib_fopen(file, DRV_AUDIO_OSAL_O_RDWR | DRV_AUDIO_OSAL_O_CREAT, 0777);  /* 0777: priv mode */
+    if (flip == TD_NULL) {
+        audio_log_err("open %s failed\n", file);
+        return ERR_SYS_OPEN_FAILED;
+    }
+
+    if (drv_audio_osal_klib_fwrite((td_char *)flash_addr, flash_len, flip) != flash_len) {
+        audio_log_err("Write %s failed\n", file);
+        return ERR_SYS_MEM_COPY;
+    }
+
+    audio_log_warn("Save %s Success.\n", file);
+    drv_audio_osal_klib_fclose(flip);
+#endif
+    audio_unused(file);
+    audio_unused(flash_addr);
+    audio_unused(flash_len);
+    return AUDIO_SUCCESS;
+}
+
+static td_void *overlay_open_file(const char *file, td_u32 flash_addr, td_u32 flash_len)
+{
+    td_s32 ret;
+    td_void *flip = TD_NULL;
+    td_char full_path[MAX_PATH_LENGTH] = {0};
+
+    ret = snprintf_s(full_path, MAX_PATH_LENGTH - 1, MAX_PATH_LENGTH - 1, "%s%s", g_dsp_file_path, file);
+    if (ret < 0) {
+        sap_err_log_s32(ret);
+        return ERR_SYS_MEM_COPY;
+    }
+
+    flip = drv_audio_osal_klib_fopen(full_path, DRV_AUDIO_OSAL_O_RDONLY, 0);
+    if (flip == TD_NULL) {
+        ret = overlay_get_file_from_flash(full_path, flash_addr, flash_len);
+        if (ret != AUDIO_SUCCESS) {
+            sap_err_log_fun(overlay_get_file_from_flash, ret);
+            return TD_NULL;
+        }
+
+        flip = drv_audio_osal_klib_fopen(full_path, DRV_AUDIO_OSAL_O_RDONLY, 0);
+        if (flip == TD_NULL) {
+            sap_err_log_fun(drv_audio_osal_klib_fopen, ERR_SYS_OPEN_FAILED);
+            return TD_NULL;
+        }
+    }
+
+    return flip;
+}
+
+static td_s32 overlay_update_section_list(audio_core_id core_id, td_void *flip)
+{
+    td_u32 i;
+    td_u32 sec_cnt;
+    td_bool tcm_flag;
+    struct {
+        td_u32 addr;
+        td_u32 size;
+    } sec_hdr;
+
+    drv_overlay_clear_section_list();
+
+    drv_audio_osal_klib_fseek(0, SEEK_SET, flip);
+    if (drv_audio_osal_klib_fread((td_char *)&sec_cnt, sizeof(sec_cnt), flip) != sizeof(sec_cnt)) {
+        return ERR_SYS_NOT_AVAILABLE;
+    }
+
+    for (i = 0; i < sec_cnt; i++) {
+        if (drv_audio_osal_klib_fread((td_char *)&sec_hdr, sizeof(sec_hdr), flip) != sizeof(sec_hdr)) {
+            return ERR_SYS_NOT_AVAILABLE;
+        }
+
+        (td_void)drv_overlay_map_addr(core_id, sec_hdr.addr, &tcm_flag);
+        drv_overlay_add_section_item(core_id, sec_hdr.addr, sec_hdr.size);
+
+        drv_audio_osal_klib_fseek(sec_hdr.size, SEEK_CUR, flip);
+    }
+
+    return AUDIO_SUCCESS;
+}
+
+static td_s32 overlay_unpack_lib(const td_char *lib_name, td_void *flip, td_u32 *lib_size)
+{
+    td_u32 i, sec_cnt = 0;
+    struct {
+        td_char name[OVERLAY_NAME_LEN];
+        td_u32 size;
+    } sec_hdr;
+
+    if (drv_audio_osal_klib_fread((td_char *)&sec_cnt, sizeof(td_u32), flip) != sizeof(td_u32)) {
+        sap_err_log_fun(drv_audio_osal_klib_fread, AUDIO_FAILURE);
+        return ERR_SYS_NOT_AVAILABLE;
+    }
+
+    for (i = 0; i < sec_cnt; i++) {
+        if (drv_audio_osal_klib_fread((td_char *)&sec_hdr, sizeof(sec_hdr), flip) != sizeof(sec_hdr)) {
+            sap_err_log_fun(drv_audio_osal_klib_fread, AUDIO_FAILURE);
+            return ERR_SYS_NOT_AVAILABLE;
+        }
+
+        sap_trace_log_str(sec_hdr.name);
+        if (audio_osal_strncmp(sec_hdr.name, sizeof(sec_hdr.name), lib_name, sizeof(sec_hdr.name)) == 0) {
+            sap_warn_log_str(sec_hdr.name);
+            if (lib_size == TD_NULL) {
+                return ERR_SYS_NULL_PTR;
+            }
+            *lib_size = sec_hdr.size;
+            return AUDIO_SUCCESS;
+        }
+
+        if (drv_audio_osal_klib_fseek(sec_hdr.size, OSAL_SEEK_CUR, flip) < 0) {
+            sap_err_log_fun(drv_audio_osal_klib_fseek, AUDIO_FAILURE);
+            return ERR_SYS_NOT_AVAILABLE;
+        }
+    }
+
+    return ERR_SYS_NOT_SUPPORTED;
+}
+
+td_s32 drv_overlay_get_lib(const td_char *lib_name, td_u8 *lib_buf, td_u32 *lib_buf_size)
+{
+    td_s32 ret;
+    td_u32 lib_size;
+    td_u8 *lib = TD_NULL;
+    td_void *flip = TD_NULL;
+
+    sys_check_null_ptr_return(lib_name);
+    sys_check_null_ptr_return(lib_buf);
+    sys_check_null_ptr_return(lib_buf_size);
+
+    flip = overlay_open_file(g_dsp_lib_file, FLASH_DSP_OVERLAY_ADDR, FLASH_DSP_OVERLAY_SIZE);
+    if (flip == TD_NULL) {
+        sap_err_log_fun(overlay_open_file, flip);
+        return ERR_SYS_OPEN_FAILED;
+    }
+
+    ret = overlay_unpack_lib(lib_name, flip, &lib_size);
+    if (ret != AUDIO_SUCCESS) {
+        sap_err_log_fun(overlay_unpack_lib, ret);
+        goto out0;
+    }
+
+    if (lib_size > *lib_buf_size) { /* input buf size check */
+        sap_err_log_str(lib_size);
+        ret = ERR_SYS_BUF_OVERFLOW;
+        goto out0;
+    }
+
+    if (drv_audio_osal_klib_fread((td_char *)lib_buf, lib_size, flip) != lib_size) {
+        ret = ERR_SYS_NOT_AVAILABLE;
+        goto out0;
+    }
+
+    *lib_buf_size = lib_size; /* output buf actual data size */
+
+out0:
+    drv_audio_osal_klib_fclose(flip);
+    return ret;
+}
+
+td_s32 drv_overlay_load_main_program(audio_core_id core_id)
+{
+    td_s32 ret;
+    td_void *flip = TD_NULL;
+
+    flip = overlay_open_file(g_dsp_main_file, FLASH_DSP_MAIN_ADDR, FLASH_DSP_MAIN_SIZE);
+    if (flip == TD_NULL) {
+        return ERR_SYS_OPEN_FAILED;
+    }
+
+    ret = overlay_load_elf(core_id, flip);
+    if (ret != AUDIO_SUCCESS) {
+        sap_err_log_fun(overlay_load_elf, ret);
+        drv_audio_osal_klib_fclose(flip);
+        return ret;
+    }
+
+    overlay_update_section_list(core_id, flip);
+    drv_audio_osal_klib_fclose(flip);
+
+    return AUDIO_SUCCESS;
+}
+
+td_s32 drv_overlay_load_lib_program(audio_core_id core_id, audio_lib_id type, td_u32 index)
+{
+    td_s32 ret;
+    td_u32 lib_size;
+    const td_char *lib_name = TD_NULL;
+    td_void *flip = TD_NULL;
+
+    if (type >= AUDIO_LIB_MAX) {
+        sap_err_log_s32(type);
+        return ERR_SYS_INVALID_PARAM;
+    }
+
+    lib_name = drv_overlay_find_and_reset_lib(core_id, type, index);
+    if (lib_name == TD_NULL) {
+        sap_err_log_fun(drv_overlay_find_and_reset_lib, lib_name);
+        return ERR_SYS_NOT_SUPPORTED;
+    }
+
+    flip = overlay_open_file(g_dsp_lib_file, FLASH_DSP_OVERLAY_ADDR, FLASH_DSP_OVERLAY_SIZE);
+    if (flip == TD_NULL) {
+        sap_err_log_fun(overlay_open_file, flip);
+        return ERR_SYS_OPEN_FAILED;
+    }
+
+    ret = overlay_unpack_lib(lib_name, flip, &lib_size);
+    if (ret != AUDIO_SUCCESS) {
+        sap_err_log_fun(overlay_unpack_lib, ret);
+        drv_audio_osal_klib_fclose(flip);
+        return ret;
+    }
+
+    ret = overlay_load_elf(core_id, flip);
+    if (ret != AUDIO_SUCCESS) {
+        sap_err_log_fun(overlay_load_elf, ret);
+        drv_audio_osal_klib_fclose(flip);
+        return ret;
+    }
+
+    drv_audio_osal_klib_fclose(flip);
+    audio_unused(core_id);
+    return AUDIO_SUCCESS;
+}
+
+#ifdef __cplusplus
+#if __cplusplus
+}
+#endif
+#endif
index 508b9eb..dd235f1 100644 (file)
@@ -39,6 +39,13 @@ extern "C" {
 #endif
 #endif
 
+td_s32 overlay_set_dsp_file_path(const char *file_path, td_u32 len)
+{
+    audio_unused(file_path);
+    audio_unused(len);
+    return AUDIO_SUCCESS;
+}
+
 static td_s32 overlay_load_elf(audio_core_id core_id, const td_u8 *lib, td_u32 size)
 {
     td_u32 i, sec_cnt;
index b4448ce..6fdfbd0 100644 (file)
@@ -23,6 +23,8 @@ static inline td_void drv_overlay_copy_section(td_u32 *to, const td_u32 *from, t
     }
 }
 
+td_s32 overlay_set_dsp_file_path(const char *file_path, td_u32 len);
+
 td_u32 drv_overlay_map_addr(audio_core_id core_id, td_u32 addr, td_bool *tcm_flag);
 
 td_s32 drv_overlay_add_section_item(audio_core_id core_id, td_u32 addr, td_u32 size);
index b0d040f..b5f0453 100644 (file)
@@ -35,6 +35,8 @@ td_s32 sap_ioctl_sys_set_tws_role(td_u32 cmd, td_void *arg, td_void *file);
 \r
 td_s32 sap_ioctl_sys_set_dsp_log_level(td_u32 cmd, td_void *arg, td_void *file);\r
 \r
+td_s32 sap_ioctl_sys_set_dsp_file_path(td_u32 cmd, td_void *arg, td_void *file);\r
+\r
 td_s32 drv_msg_sys_module_init(audio_core_id core_id);\r
 \r
 td_s32 sys_read_proc(td_void *file, td_void *private);\r
index 77973d0..00ae1e7 100644 (file)
@@ -226,24 +226,6 @@ static td_s32 drv_sys_init(audio_core_id drv_cid, audio_core_id core_cid)
         return ret;
     }
 
-#if (SAP_CHIP_TYPE != socmn1)
-    hal_dsp_set_power_on(core_cid, TD_TRUE);
-
-    ret = drv_sys_load_image(core_cid);
-    if (ret != AUDIO_SUCCESS) {
-        sap_err_log_fun(drv_sys_load_image, ret);
-        drv_sap_msg_stop(core_cid);
-        hal_dsp_reset(core_cid);
-        hal_dsp_deinit(core_cid);
-        drv_ipc_deinit(drv_cid, core_cid);
-        return ret;
-    }
-
-    drv_overlay_backup_tcm(core_cid);
-
-    hal_dsp_set_power_on(core_cid, TD_FALSE);
-#endif
-
     audio_func_exit();
     return AUDIO_SUCCESS;
 }
@@ -427,6 +409,11 @@ static td_s32 drv_sys_set_state(audio_core_id core_cid, audio_sys_state state)
     return AUDIO_SUCCESS;
 }
 
+static td_s32 drv_sys_set_dsp_file_path(const td_char *file_path, td_u32 len)
+{
+    return overlay_set_dsp_file_path(file_path, len);
+}
+
 td_s32 sap_ioctl_sys_init(td_u32 cmd, td_void *arg, td_void *file)
 {
     td_s32 ret;
@@ -569,6 +556,15 @@ td_s32 sap_ioctl_sys_set_dsp_log_level(td_u32 cmd, td_void *arg, td_void *file)
     return drv_msg_sys_set_dsp_log_level(log_level);
 }
 
+td_s32 sap_ioctl_sys_set_dsp_file_path(td_u32 cmd, td_void *arg, td_void *file)
+{
+    sap_drv_str *drv_str = (sap_drv_str *)arg;
+    audio_unused(cmd);
+    audio_unused(file);
+
+    return drv_sys_set_dsp_file_path(drv_str->str, drv_str->len);
+}
+
 static td_s32 drv_msg_sys_active(audio_core_id to)
 {
     return drv_sys_set_state(to, AUDIO_SYS_ACTIVE);
index bb6b27a..ed848de 100644 (file)
@@ -189,6 +189,9 @@ typedef enum {
     AO_AEF_PROFILE_MUSIC,
     AO_AEF_PROFILE_VOIP,
     AO_AEF_PROFILE_RINGTONE,
+    AO_AEF_PROFILE_EXT0,
+    AO_AEF_PROFILE_EXT1,
+    AO_AEF_PROFILE_EXT2,
 
     AO_AEF_PROFILE_MAX,
 } ao_aef_profile;
index d1f16b7..c20d046 100644 (file)
@@ -22,6 +22,7 @@ extern "C" {
 #define AUDIO_BIN_LEN      320  // half of fft length
 #define AUDIO_INPUT_FS    16000  // input samplerate
 #define AUDIO_PROCESS_FS  16000  // process samplerate
+#define AUDIO_EQ_BAND_NUM  20
 
 #define AUDIO_VQE_VERSION_LEN 64         // 版本号字符串长度
 #define AUDIO_VQE_48K_SAMPLERATE 48000   // 48000采样率定义
@@ -385,8 +386,9 @@ typedef struct tag_param_struct {
        // AGC使能开关; 范围:{0,1}; 默认值:1; 错误码:-58;
     td_u8 agc_enable;
     td_u8 fmp_enable;
+    td_u8 eq_enable;
     // 保留位
-    td_u8 reserve4[AUDIO_VQE_COM_PAD_2];
+    td_u8 reserve4;
 
        // ####### AEC参数
     // 非线性开关; 范围:{0,1}; 默认值:1; 错误码:-231;
@@ -513,6 +515,9 @@ typedef struct tag_param_struct {
     td_s8 comfort_intensity;       /* noise compensation level, 1-10, default:3 */
     td_s8 mode2;                   /* no-echo_area, 0->headset, 1->handsfree, 2->headphone */
     td_s8 fmp_reserved[5];         /* reserved */
+
+    /* eq */
+    td_s8 eq_band_gain[AUDIO_EQ_BAND_NUM];
 } audio_vqe_param_struct;
 
 
index 21e79e7..0f6e94d 100644 (file)
@@ -58,7 +58,6 @@ bool g_timer_is_running = false;
 bool g_gpio_timer_is_running = false;
 msg_send_callback_t g_msg_send_cb = NULL;
 pin_t g_gpio_key_record = 0;
-uint8_t g_buttom_vetoed = 0;
 
 static const char* g_state_str[PRESSED_MAX] = {
     "BUTTON_PRESSED",
@@ -156,10 +155,7 @@ static void button_irq_callback(pin_t pin)
     button_api->button_clear_interrupt(pin);
     button_press_state_t press_state = button_get_press_state(pin);
     button_send_msg(BUTTON_PWREN_ID, press_state);
-    if (g_buttom_vetoed == 0) {
-        button_api->button_add_veto();
-        g_buttom_vetoed = 1;
-    }
+    button_api->button_add_veto();
     button_timer_start_check_released();
 }
 
@@ -256,10 +252,7 @@ static void button_check_released_timer_callback(uint32_t data)
     button_press_state_t press_state;
     press_state = button_get_press_state(PIN_NONE);
     if (press_state == 1) {
-        if (g_buttom_vetoed == 1) {
-            button_api->button_remove_veto();
-            g_buttom_vetoed = 0;
-        }
+        button_api->button_remove_veto();
         button_send_msg(1, RELEASED);
     } else {
         button_timer_start_check_released();
index 1b09891..4266853 100644 (file)
@@ -16,6 +16,7 @@
 #include "systick_porting.h"
 #include "watchdog_porting.h"
 #include "watchdog.h"
+#include "preserve.h"
 #if !defined(BUILD_APPLICATION_SSB) && !defined(UNIT_TEST)
 #include "cpu_trace.h"
 #ifdef BUILD_APPLICATION_STANDARD
@@ -116,6 +117,10 @@ static inline void ipc_to_bcore_timeout_proc(cores_t dst)
     if (dst == CORES_BT_CORE) {
         g_ipc_to_bcore_continuous_fail_nums++;
         if (g_ipc_to_bcore_continuous_fail_nums > IPC_CONTINUOUS_FAIL_MAX) {
+#if defined SAVE_EXC_INFO
+            save_btram_file_to_fs();
+            save_btrace_file_to_fs();
+#endif
             panic(PANIC_BT_STS_ABNORMAL, __LINE__);
         }
     }
index 458077e..99305c7 100644 (file)
 #include "soc_mipi_tx.h"\r
 #include "debug_print.h"\r
 \r
+#ifdef BUILD_RECOVERY_IMAGE\r
+#define lcd_err(x, ...)\r
+#define lcd_print(fmt, ...)\r
+#else\r
 #define lcd_err(x, ...) \\r
     do { \\r
         PRINT("%s(%d): "x, __FUNCTION__, __LINE__, ##__VA_ARGS__); \\r
@@ -21,7 +25,7 @@
     do {                                \\r
         PRINT(fmt, ##__VA_ARGS__);     \\r
     } while (0)\r
-\r
+#endif\r
 #define DEFAULT_BRIGHTNESS 255\r
 \r
 typedef enum {\r
index f8af2ca..0690e07 100644 (file)
         PRINT(fmt, ##__VA_ARGS__);     \
     } while (0)
 
+#ifdef BUILD_RECOVERY_IMAGE
+#define mipi_tx_err(x, ...)
+#else
 #define mipi_tx_err(x, ...) \
     do { \
         PRINT(x, ##__VA_ARGS__); \
     } while (0)
+#endif
 
 #define mipi_tx_check_null_ptr_return(ptr) \
     do { \
index 514dcd3..029e452 100644 (file)
@@ -36,6 +36,8 @@
 #include "mmc_private.h"
 #include "mmcreg.h"
 #include "pm_veto.h"
+#include "clocks_config.h"
+#include "clocks_core.h"
 
 static uint32_t part_node_cnt = 0;
 #ifdef CONFIG_DRIVERS_MMC_RW_IN_EXC
@@ -49,14 +51,21 @@ static dpal_spinlock rw_spinlock;
 #define BLOCK_MSLEEP10 10
 
 struct mmcsd_part *g_local_part[MAX_PART_COUNT];
-static void mmc_init_before_handler(void)
+static void mmc_clk_set_before_handler(void)
 {
-    if (!mmc_get_sleep_init_flag() && mmc_get_first_init_flag()) {
-        emmc_recovery_init();
-        mmc_set_sleep_init_flag(true);
+    system_freq_t sys_freq = get_system_freq();
+    system_mcu_core_clk_cfg_t mcu_freq = clocks_system_mcu_freq_get(sys_freq.system_mcu_freq);
+    /* 当mcu处于高频模式下,尝试emmc使用前切到高频模式。是否真正切换,还依赖emmc卡的能力能支持高频模式 */
+    if (mcu_freq.mcu_clk.clk_src == CLOCKS_CLK_SRC_PLL) {
+        mmc_set_internal_clk(CLOCKS_SDIO_FREQ_H);
     }
 }
 
+static void mmc_clk_set_after_handler(void)
+{
+    mmc_set_internal_clk(CLOCKS_SDIO_FREQ_50M);
+}
+
 static inline void set_local_part_node(struct mmcsd_part *part, int index)
 {
     g_local_part[index] = part;
@@ -200,7 +209,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, FAR u_char *buffer,
         mmc_err("failed to find mmc device!\n");
         return (-EINVAL);
     }
-    mmc_init_before_handler();
+    mmc_clk_set_before_handler();
     uapi_pm_add_sleep_veto(PM_ID_STORAGE);
     dpal_atomic_inc(&part->atom_reqs);
     if (part->part_status != PART_NORMAL) {
@@ -222,6 +231,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, FAR u_char *buffer,
 out:
     dpal_atomic_dec(&part->atom_reqs);
     uapi_pm_remove_sleep_veto(PM_ID_STORAGE);
+    mmc_clk_set_after_handler();
     return ((ret == 0) ? -EAGAIN : (ssize_t)ret);
 }
 
@@ -237,7 +247,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode, FAR const u_char *buffer,
         mmc_err("failed to find mmc device!\n");
         return (-EINVAL);
     }
-    mmc_init_before_handler();
+    mmc_clk_set_before_handler();
     uapi_pm_add_sleep_veto(PM_ID_STORAGE);
     dpal_atomic_inc(&part->atom_reqs);
     if (part->part_status != PART_NORMAL) {
@@ -259,6 +269,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode, FAR const u_char *buffer,
 out:
     dpal_atomic_dec(&part->atom_reqs);
     uapi_pm_remove_sleep_veto(PM_ID_STORAGE);
+    mmc_clk_set_after_handler();
     return ((ret == 0) ? -EAGAIN : (ssize_t)ret);
 }
 
@@ -387,7 +398,7 @@ static int mmcsd_geometry(FAR struct inode *inode, FAR struct geometry *geometry
     }
     sc = part->sc;
     dev = sc->dev;
-    mmc_init_before_handler();
+    mmc_clk_set_before_handler();
     uapi_pm_add_sleep_veto(PM_ID_STORAGE);
     dpal_atomic_inc(&part->atom_reqs);
     if (part->part_status != PART_NORMAL) {
@@ -406,6 +417,7 @@ static int mmcsd_geometry(FAR struct inode *inode, FAR struct geometry *geometry
     geometry->geo_sectorsize = (size_t)mmc_get_sector_size(dev);
     dpal_atomic_dec(&part->atom_reqs);
     uapi_pm_remove_sleep_veto(PM_ID_STORAGE);
+    mmc_clk_set_after_handler();
     return (ENOERR);
 }
 
@@ -434,7 +446,7 @@ static int mmcsd_ioctl(FAR struct inode *inode, int cmd, unsigned long arg)
     struct mmc_ivars *ivar = device_get_ivars(dev);
     uint32_t au_reg_value;
 
-    mmc_init_before_handler();
+    mmc_clk_set_before_handler();
     uapi_pm_add_sleep_veto(PM_ID_STORAGE);
     dpal_atomic_inc(&part->atom_reqs);
     if (part->part_status != PART_NORMAL) {
@@ -457,6 +469,7 @@ static int mmcsd_ioctl(FAR struct inode *inode, int cmd, unsigned long arg)
     }
     dpal_atomic_dec(&part->atom_reqs);
     uapi_pm_remove_sleep_veto(PM_ID_STORAGE);
+    mmc_clk_set_after_handler();
     return (ENOERR);
 }
 
@@ -636,7 +649,7 @@ static ssize_t mmc_rw(int index, char *buffer, uint32_t start_sector, uint32_t n
     uint32_t sector_now = nsectors;
     uint32_t sector_count;
     ssize_t ret;
-    mmc_init_before_handler();
+    mmc_clk_set_before_handler();
     uapi_pm_add_sleep_veto(PM_ID_STORAGE);
     do {
         sector_count = (sector_now >= MMC_RAW_WRITE_MAX_SECTOR) ? MMC_RAW_WRITE_MAX_SECTOR : sector_now;
@@ -651,6 +664,7 @@ static ssize_t mmc_rw(int index, char *buffer, uint32_t start_sector, uint32_t n
         buffer += sector_count << 9; /* every sector size is 512 (1 << 9) */
     } while (sector_now != 0);
     uapi_pm_remove_sleep_veto(PM_ID_STORAGE);
+    mmc_clk_set_after_handler();
     return ((ssize_t)nsectors);
 }
 
index 1c0f7d7..7b1b31f 100644 (file)
@@ -32,6 +32,9 @@
 #include "sdhci_private.h"
 #include "hci_helper.h"
 #include "mmc_adapt.h"
+#include "mmcvar.h"
+#include "mmc_private.h"
+#include "sdio.h"
 #include "chip_core_definition.h"
 #include "common_def.h"
 #include "clocks_switch.h"
 #define EMMC_SAVE_BUS_TIMING_MMC_DDR52  4
 #define EMMC_SAVE_BUS_TIMING_MMC_HS400  7
 #define EMMC_CMD0_RESET_WAIT_TIME       900
-#define PM_EMMC_CCLK_DIV_REG      0x52000100
-#define PM_SD_HOST_CCLK_DIV_REG   0x52000110
+
 #define RC_CLK_VALUE              49152000
 #define XO_CLK_VALUE              32000000
 #define XO_DLL2_CLK_VALUE         64000000
 #define PLL_CLK_VALUE             884736000
-#define PM_SDIOM_CLK_REG          0x55000628
-#define PM_EMMC_DIV_REG           0x52000120
+
+#ifndef SDHCI_ERR_INT_STAT_EN
+#define        SDHCI_ERR_INT_STAT_EN 0x36
+#endif
+
+#ifndef SDHCI_ERR_INT_SIGNAL_EN
+#define        SDHCI_ERR_INT_SIGNAL_EN 0x3A
+#endif
+#ifndef SDHCI_MBIU_CTRL
+#define SDHCI_MBIU_CTRL                        0x510
+#endif
 
 typedef struct {
     uint16_t sdiom_clk_reg;
-    uint16_t emmc_cclk_reg;
-    uint16_t emmc_div_reg;
+    uint16_t clk_div1_reg; // EMMC_CCLK_DIV or SD_HOST_CCLK_DIV
+    uint16_t clk_div2_reg;     // EMMC_DIV or SDIO_HOST_CKDIV
     uint16_t sd_bus_reg;
     uint16_t mbiu_ctrl;
     uint32_t timing;
     uint32_t bus_width;
     uint32_t at_ctrl;
     uint32_t at_stat;
+    uint16_t clk_ctrl;
+    uint16_t power_ctrl;
     uint16_t host_ctrl1;
     uint16_t host_ctrl2;
+    uint32_t int_en;        // int & err_int
+    uint32_t int_sig_en;    // int_sig & err_int_sig
 } mmc_save_info_t;
 
-static mmc_save_info_t g_mmc_cur_info = { 0 };
+typedef enum {
+    SDIOM_SEL_LP_MODE,        // 功耗优先, 两路mmc需求不一致选低的
+    SDIOM_SEL_PERF_MODE,      // 性能优先,两路mmc需求不一致选高的
+    SDIOM_SEL_MODE_MAX,
+} sdiom_select_mode_t;
+uint8_t g_sdiom_sel_mode = SDIOM_SEL_LP_MODE;
+
+uint32_t  g_sdiom_cfg_clk[MAX_MMC_NUM] = {0, 0};
+system_sdio_freq_t  g_sdiom_mmc_sel[MAX_MMC_NUM] = {CLOCKS_SDIO_FREQ_MAX, CLOCKS_SDIO_FREQ_MAX};
+system_sdio_freq_t  g_sdiom_cur_sel = CLOCKS_SDIO_FREQ_MAX;
+
+
+static mmc_save_info_t g_mmc_cur_info[MAX_MMC_NUM] = { {0}, {0} };
 bool g_mmc_sleep_inited = false;
 bool g_mmc_inited = false;
-static enum mmc_bus_timing g_max_timing = bus_timing_normal;
+static enum mmc_bus_timing g_max_timing[MAX_MMC_NUM] = {bus_timing_normal, bus_timing_normal};
+
+uint32_t g_clk_div1_reg[MAX_MMC_NUM] = {EMMC_CCLK_DIV_REG, SD_HOST_CCLK_DIV_REG};
+uint32_t g_clk_div2_reg[MAX_MMC_NUM] = {EMMC_DIV_REG, SDIO_HOST_CCLK_DIV_REG};
+uint32_t g_tunning_coarse_mode[MAX_MMC_NUM] = {EMMC_TUNING_COARSE_MODE, SDIO_TUNING_COARSE_MODE};
+uint32_t g_tunning_bm0_reg[MAX_MMC_NUM] = {EMMC_TUNING_BM0_REG, SD_HOST_TUNING_BM0_REG};
+uint32_t g_tunning_bm0_value[MAX_MMC_NUM] = {EMMC_TUNING_BM0_VAL, SDIO_TUNING_BM0_VAL};
+uint32_t g_tunning_bm1_reg[MAX_MMC_NUM] = {EMMC_TUNING_BM1_REG, SD_HOST_TUNING_BM1_REG};
+uint32_t g_tunning_bm1_value[MAX_MMC_NUM] = {EMMC_TUNING_BM1_VAL, SDIO_TUNING_BM1_VAL};
+
+uint32_t mmc_get_clock_value(uint32_t id);
 
 void mmc_set_first_init_flag(bool flag)
 {
@@ -100,47 +137,177 @@ bool mmc_get_sleep_init_flag(void)
     return g_mmc_sleep_inited;
 }
 
-mmc_save_info_t* sdhci_get_save_info(void)
+/*
+ * 函 数 名  : mmc_sdhci_suspend
+ * 功能描述  : 低功耗suspend接口, 保存所有mmc slot工作必须的寄存器
+ */
+void mmc_sdhci_suspend(void)
 {
-    return &g_mmc_cur_info;
+    int32_t i;
+    struct hci_softc *sc = NULL;
+
+    for (i = 0; i < MAX_MMC_NUM; i++) {
+        sc = get_mmc_resource(i);
+        if (sc == NULL || sc->slot == NULL || ((struct sdhci_slot*)sc->slot)->dev == NULL) {
+            continue;
+        }
+
+        reg16_setbit(g_clk_div1_reg[i], 0); // clk en
+        g_mmc_cur_info[i].timing = regw_getbits(sc->base, SDHCI_HOST_CONTROL2, 0x0, LEN_3BIT); // for speed mode
+        g_mmc_cur_info[i].at_ctrl = hci_readl(sc, SDHCI_AUTO_TUNING_CTRL);
+        g_mmc_cur_info[i].at_stat = regw_getbits(sc->base, SDHCI_AUTO_TUNING_STATUS, 0x0, LEN_8BIT); // for phase
+        if (reg8_getbit(sc->base + SDHCI_HOST_CONTROL, EXT_DAT_XFER_BIT) == 1) {
+            g_mmc_cur_info[i].bus_width = EMMC_SAVE_BUS_WIDTH_8BIT;
+        } else {
+            if (reg8_getbit(sc->base + SDHCI_HOST_CONTROL, 0x1) == 1) {
+                g_mmc_cur_info[i].bus_width = EMMC_SAVE_BUS_WIDTH_4BIT;
+            } else {
+                g_mmc_cur_info[i].bus_width = EMMC_SAVE_BUS_WIDTH_1BIT;
+            }
+        }
+        g_mmc_cur_info[i].sdiom_clk_reg = readw(SDIOM_CR_REG);
+        g_mmc_cur_info[i].clk_div1_reg = readw(g_clk_div1_reg[i]);
+        g_mmc_cur_info[i].clk_div2_reg = readw(g_clk_div2_reg[i]);
+        g_mmc_cur_info[i].sd_bus_reg = readw(SDIO_BUS_CGDIV_REG);
+        g_mmc_cur_info[i].mbiu_ctrl = hci_readw(sc, SDHCI_MBIU_CTRL);
+        g_mmc_cur_info[i].clk_ctrl = hci_readw(sc, SDHCI_CLOCK_CONTROL);
+        g_mmc_cur_info[i].power_ctrl = hci_readb(sc, SDHCI_POWER_CONTROL);
+        g_mmc_cur_info[i].host_ctrl1 = hci_readb(sc, SDHCI_HOST_CONTROL);
+        g_mmc_cur_info[i].host_ctrl2 = hci_readw(sc, SDHCI_HOST_CONTROL2);
+        g_mmc_cur_info[i].int_en = hci_readl(sc, SDHCI_INT_ENABLE);
+        g_mmc_cur_info[i].int_sig_en = hci_readl(sc, SDHCI_SIGNAL_ENABLE);
+#if MMC_BOARD_DEBUG_ON
+        PRINT("mmc%d save sdiom=0x%x, clk_div1=0x%x, clk_div2=0x%x, timing=%d, phase=%d, bus_width=%d\r\n",
+              i, g_mmc_cur_info[i].sdiom_clk_reg, g_mmc_cur_info[i].clk_div1_reg, g_mmc_cur_info[i].clk_div2_reg,
+              g_mmc_cur_info[i].timing, g_mmc_cur_info[i].at_stat, g_mmc_cur_info[i].bus_width);
+        PRINT("mmc%d save clk_ctrl=0x%x, power_ctrl=0x%x, host_ctrl1=0x%x, host_ctrl2=0x%x\r\n",
+              i, g_mmc_cur_info[i].clk_ctrl, g_mmc_cur_info[i].power_ctrl, g_mmc_cur_info[i].host_ctrl1,
+              g_mmc_cur_info[i].host_ctrl2);
+        PRINT("mmc%d save int_en=0x%x, sig_en=0x%x\r\n", i, g_mmc_cur_info[i].int_en, g_mmc_cur_info[i].int_sig_en);
+#endif
+        reg16_clrbit(g_clk_div1_reg[i], 0); // clk disable
+    }
+    mmc_set_sleep_init_flag(false);
 }
 
-void emmc_save_info(void)
+/*
+ * 函 数 名  : mmc_sdhci_resume
+ * 功能描述  : 低功耗resume接口, 恢复所有mmc slot工作必须的寄存器
+ */
+void mmc_sdhci_resume(void)
 {
-    uint32_t tmp_div;
-    if (!mmc_get_sleep_init_flag()) {
-        return;
-    }
-    reg16_setbit(PM_EMMC_CCLK_DIV_REG, 0);
-    g_mmc_cur_info.timing = regw_getbits(HOST_CTRL2, 0, 0x0, LEN_3BIT); // for speed mode
-    g_mmc_cur_info.at_ctrl = readl(AT_CTRL);
-    g_mmc_cur_info.at_stat = regw_getbits(AT_STAT, 0, 0x0, LEN_8BIT); // for phase
-    if (reg8_getbit(HOST_CTRL1, EXT_DAT_XFER_BIT) == 1) {
-        g_mmc_cur_info.bus_width = EMMC_SAVE_BUS_WIDTH_8BIT;
-    } else {
-        if (reg8_getbit(HOST_CTRL1, 0x1) == 1) {
-            g_mmc_cur_info.bus_width = EMMC_SAVE_BUS_WIDTH_4BIT;
-        } else {
-            g_mmc_cur_info.bus_width = EMMC_SAVE_BUS_WIDTH_1BIT;
+    int32_t i;
+    struct hci_softc *sc;
+
+    for (i = 0; i < MAX_MMC_NUM; i++) {
+        sc = get_mmc_resource(i);
+        if (sc == NULL || sc->slot == NULL || ((struct sdhci_slot*)sc->slot)->dev == NULL) {
+            continue;
+        }
+#if MMC_BOARD_DEBUG_ON
+        PRINT("mmc%d resume all saved reg\r\n", i);
+#endif
+        writew(SDIOM_CR_REG, g_mmc_cur_info[i].sdiom_clk_reg);
+        writew(g_clk_div1_reg[i], g_mmc_cur_info[i].clk_div1_reg);
+        writew(g_clk_div2_reg[i], g_mmc_cur_info[i].clk_div2_reg);
+        writew(SDIO_BUS_CGDIV_REG, g_mmc_cur_info[i].sd_bus_reg);
+        reg16_setbit(sc->base + SDHCI_CLOCK_CONTROL, 0x0); // offset:2c bit0 internal clk en
+        reg16_setbit(sc->base + SDHCI_CLOCK_CONTROL, 0x3); // offset:2c bit3 pll enable
+        reg16_setbit(sc->base + SDHCI_CLOCK_CONTROL, 0x2); // offset:2c bit2 sd clk enable
+        while (reg16_getbit(sc->base + SDHCI_CLOCK_CONTROL, 0x1) != 1) { ; } // wait clock is stability
+
+        hci_writeb(sc, SDHCI_TIMEOUT_CONTROL, 0xe);
+        hci_writew(sc, SDHCI_CLOCK_CONTROL, g_mmc_cur_info[i].clk_ctrl);
+        hci_writeb(sc, SDHCI_POWER_CONTROL, g_mmc_cur_info[i].power_ctrl);
+        hci_writeb(sc, SDHCI_HOST_CONTROL, g_mmc_cur_info[i].host_ctrl1);
+        hci_writew(sc, SDHCI_HOST_CONTROL2, g_mmc_cur_info[i].host_ctrl2);
+        hci_writel(sc, SDHCI_INT_ENABLE, g_mmc_cur_info[i].int_en);
+        hci_writel(sc, SDHCI_SIGNAL_ENABLE, g_mmc_cur_info[i].int_sig_en);
+
+        hci_writew(sc, SDHCI_MBIU_CTRL, g_mmc_cur_info[i].mbiu_ctrl);
+        writew(g_tunning_bm0_reg[i], g_tunning_bm0_value[i]);
+        writew(g_tunning_bm1_reg[i], g_tunning_bm1_value[i]);
+        hci_writel(sc, SDHCI_AUTO_TUNING_CTRL, g_mmc_cur_info[i].at_ctrl);
+        reg16_setbits(sc->base + SDHCI_AUTO_TUNING_STATUS, 0, LEN_8BIT, g_mmc_cur_info[i].at_stat);
+        // The fixed clock is less than or equal to 52 MHz, and the tuning clock is not used.
+        if (mmc_get_clock_value(i) <= SDIOM_SRC_CLK_FREQ_LVL_50M_VAL) {
+            reg16_clrbit(sc->base + SDHCI_HOST_CONTROL2, SAMPLE_CLK_SEL_BIT);
         }
     }
-    g_mmc_cur_info.sdiom_clk_reg = readw(SDIOM_CR_REG);
-    g_mmc_cur_info.emmc_cclk_reg = readw(EMMC_CCLK_DIV_REG);
-    g_mmc_cur_info.emmc_div_reg = readw(EMMC_DIV_REG);
-    g_mmc_cur_info.sd_bus_reg = readw(SDIO_BUS_CGDIV_REG);
-    g_mmc_cur_info.mbiu_ctrl = readw(MBIIU_CTRL);
-    g_mmc_cur_info.host_ctrl1 = readb(HOST_CTRL1);
-    g_mmc_cur_info.host_ctrl2 = readw(HOST_CTRL2);
-
-#if EMMC_BOARD_DEBUG_ON
-    PRINT("emmc save sdiom_reg=%x, emmc_cclk_reg=%x, emmc_div_reg=%x, timing=%d, phase=%d, bus_width=%d\r\n",
-          g_mmc_cur_info.sdiom_clk_reg, g_mmc_cur_info.emmc_cclk_reg, g_mmc_cur_info.emmc_div_reg,
-          g_mmc_cur_info.timing, g_mmc_cur_info.at_stat, g_mmc_cur_info.bus_width);
+    mmc_set_sleep_init_flag(true);
+}
+
+#ifdef CFG_DRIVERS_SDIO
+/*
+ * 函 数 名  : mmc_sdhci_sdio_reset
+ * 功能描述  : sdio slave设备上下电重启后,调用本接口恢复连接
+ * 参数      :func:slave设备驱动中保存的sdio_func指针
+ */
+void mmc_sdhci_sdio_reset(struct sdio_func* func)
+{
+    struct mmc_softc *mmc_sc = device_get_parent(func->sc->dev);
+#ifdef DPALCFG_DRIVERS_SDIO
+    sdio_reset_comm(func);
 #endif
-    reg16_clrbit(PM_EMMC_CCLK_DIV_REG, 0);
-    mmc_set_sleep_init_flag(false);
+    sdio_en_func(func);
+    mmc_sc->card_init_status = MMC_CARD_INIT;
+}
+
+struct sdio_func* mmc_get_sdio_func(int fn)
+{
+    struct hci_softc *sc = NULL;
+    struct mmc_softc *mmc_sc;
+
+    sc = get_mmc_resource(1);
+    if (sc == NULL || sc->slot == NULL || ((struct sdhci_slot*)sc->slot)->dev == NULL) {
+        return NULL;
+    }
+    mmc_sc = device_get_softc(((struct sdhci_slot*)sc->slot)->dev);
+    if (mmc_sc == NULL || mmc_sc->child_list[0] == NULL) {
+        return NULL;
+    }
+    device_t child = mmc_sc->child_list[0];
+    uint16_t manf_id = (uint16_t)mmc_get_cis_manid(child);
+    uint16_t device_id = (uint16_t)mmc_get_cis_proid(child);
+
+    dprintf("%s manf_id: 0x%x, device_id: 0x%x\r\n", __FUNCTION__, manf_id, device_id);
+    return sdio_get_func(fn, manf_id, device_id);
 }
 
+int mmc_test_sdio_read_byte(void)
+{
+    uint32_t addr = 0x0;
+    int err;
+    uint8_t byte;
+
+    struct sdio_func* func = mmc_get_sdio_func(1);
+    if (func == NULL) {
+        return -ENODEV;
+    }
+    // 读CCCR寄存器
+    for (addr = 0; addr < 0x10; addr++) {
+        byte = sdio_func0_read_byte(func, addr, &err);
+        dprintf("%s func0 address: 0x%x, result: 0x%x, err = %d\r\n", __FUNCTION__, addr, byte, err);
+    }
+    // 读func1地址
+    for (addr = 0; addr < 0x10; addr++) {
+        byte = sdio_read_byte(func, addr, &err);
+        dprintf("%s func1 address: 0x%x, result: 0x%x, err = %d\r\n", __FUNCTION__, addr, byte, err);
+    }
+
+    return err;
+}
+
+void mmc_test_sdio_reset(void)
+{
+    struct sdio_func* func = mmc_get_sdio_func(1);
+    if (func == NULL) {
+        return;
+    }
+    mmc_sdhci_sdio_reset(func);
+}
+#endif
+
 void emmc_send_cmd1(uint32_t args, uint16_t cmd, uint32_t *resp)
 {
     uint16_t rd_data = 0;
@@ -220,7 +387,7 @@ void emmc_send_cmd(uint32_t args, uint16_t cmd, uint8_t flag, uint32_t *resp)
     if (cnt == RETRY_CNT2) { PRINT("cmd=%x ERR INT=%x\r\n", cmd, readw(ERROR_INT_STAT)); }
     reg16_setbit(NORMAL_INT_STAT, 0x0);
     *resp = readl(RESP01);
-#if EMMC_BOARD_DEBUG_ON
+#if MMC_BOARD_DEBUG_ON
     PRINT("CMD=%x, arg=%x, resp=%x\r\n", cmd, args, *resp);
 #endif
 }
@@ -243,7 +410,7 @@ void emmc_send_cmd_r2(uint32_t args, uint16_t cmd, uint32_t *resp)
     resp[1] = readl(RESP23); // 1 for responese 71-40 bits of the Response Field
     resp[2] = readl(RESP45); // 2 for responese 103-72 bits of the Response Field
     resp[3] = readl(RESP67); // 3 for responese 135-104 bits of the Response Field
-#if EMMC_BOARD_DEBUG_ON
+#if MMC_BOARD_DEBUG_ON
     PRINT("CMD-r2=%x, arg=%x, resp:%x %x %x %x\r\n", cmd, args, resp[0], resp[1], resp[2], resp[3]); // 2,3 fro resp
 #endif
 }
@@ -296,42 +463,19 @@ void emmc_set_timing_and_buswidth(uint32_t bus_width, uint32_t timing)
     if (width_flag == 1) { emmc_send_cmd6(width_args, CMD6_INDEX, &resp); }
     if (timing_flag == 1) { emmc_send_cmd6(timing_args, CMD6_INDEX, &resp); }
 
-#if EMMC_BOARD_DEBUG_ON
-    PRINT("timing=%x width_args=%x tuning=%x \r\n", timing, width_args, g_mmc_cur_info.at_stat);
+#if MMC_BOARD_DEBUG_ON
+    PRINT("timing=%x width_args=%x tuning=%x \r\n", timing, width_args, g_mmc_cur_info[0].at_stat);
 #endif
 }
 
-static void emmc_reg_init(void)
-{
-    writew(PERI_EMMC_CRG_RST_CTL, 0);
-    writew(PERI_EMMC_CRG_RST_CTL, SOFT_RST_GLB_SDIO_DERESET);
-    init_emmc_pinmux();
-
-    // set emmc clk 400k
-    writew(SDIOM_CR_REG, 0x3);
-    writew(EMMC_CCLK_DIV_REG, 0x5507);
-    writew(EMMC_DIV_REG, 0x13);
-    reg16_setbit(CLK_CTRL, 0x0); // offset:2c bit0 internal clk en
-    reg16_setbit(CLK_CTRL, 0x3); // offset:2c bit3 pll enable
-    reg16_setbit(CLK_CTRL, 0x2); // offset:2c bit2 sd clk enable
-    while (reg16_getbit(CLK_CTRL, 0x1) != 1) { ; } // wait clock is stability
-    writeb(TOUT_CTRL, 0xe);
-
-    writeb(PWR_CTRL, POWR_ON_1_8V); // pwr ctrl, 1.8v
-    writew(NORMAL_INT_STAT_EN, NORMAL_ERR_INT_EN); // normal int enable
-    writew(ERROR_INT_STAT_EN, NORMAL_ERR_INT_EN); // normal signal enable
-    writew(NORMAL_INT_SIGNAL_EN, ALL_NORMAL_ERR_INT); // error int enable
-    writew(ERROR_INT_SIGNAL_EN, ALL_NORMAL_ERR_INT); // error signal enable
-    reg16_setbit(EMMC_CTRL, 0x0); // set emmc
-}
-
-uint32_t emmc_get_clock_value(void)
+uint32_t mmc_get_clock_value(uint32_t id)
 {
-    uint8_t clk_flag = (readw(PM_SDIOM_CLK_REG) & 0xE) >> 0x1;
+    uint8_t clk_flag = (readw(SDIOM_CR_REG) & 0xE) >> 0x1;
     uint32_t source_clk_val = XO_CLK_VALUE;
     uint16_t div1 = 1;
     uint16_t div2 = 1;
     uint16_t div3 = 1;
+
     if (clk_flag == 0x1) {
         source_clk_val = XO_CLK_VALUE;
     } else if (clk_flag == 0x2) {
@@ -341,105 +485,20 @@ uint32_t emmc_get_clock_value(void)
     } else { // rc or no defined
         source_clk_val = RC_CLK_VALUE;
     }
-    if (reg16_getbit(PM_SDIOM_CLK_REG, 0x4) == 1) {
-        div1 = regw_getbits(PM_SDIOM_CLK_REG, 0, 0x5, 0x4);
+    if (reg16_getbit(SDIOM_CR_REG, 0x4) == 1) {
+        div1 = regw_getbits(SDIOM_CR_REG, 0, 0x5, 0x4);
     }
-    if (reg16_getbit(PM_EMMC_CCLK_DIV_REG, 0x1) == 1) {
-        div2 = regw_getbits(PM_EMMC_CCLK_DIV_REG, 0, 0x4, 0x8);
+    if (reg16_getbit(g_clk_div1_reg[id], 0x1) == 1) {
+        div2 = regw_getbits(g_clk_div1_reg[id], 0, 0x4, 0x8);
     }
-    if (reg16_getbit(PM_EMMC_DIV_REG, 0x0) == 1) {
-        div3 = regw_getbits(PM_EMMC_DIV_REG, 0, 0x4, 0x3);
+    if (reg16_getbit(g_clk_div2_reg[id], 0x0) == 1) {
+        div3 = regw_getbits(g_clk_div2_reg[id], 0, 0x4, 0x3);
     }
-#if EMMC_BOARD_DEBUG_ON
-    PRINT(" value =%lu, div1=%d div2=%d, div3=%d\r\n", source_clk_val, div1, div2, div3);
+#if MMC_BOARD_DEBUG_ON
+    PRINT("clk_flag=%d, value=%lu, div1=%d div2=%d, div3=%d\r\n", clk_flag, source_clk_val, div1, div2, div3);
 #endif
     return (source_clk_val / div1 / div2 / div3);
 }
-static void emmc_recovery_register(void)
-{
-    // set emmc clk 400k
-    writew(SDIOM_CR_REG, 0x3);
-    writew(EMMC_CCLK_DIV_REG, 0x5507);
-    writew(EMMC_DIV_REG, 0x13);
-    reg16_setbit(CLK_CTRL, 0x0); // offset:2c bit0 internal clk en
-    reg16_setbit(CLK_CTRL, 0x3); // offset:2c bit3 pll enable
-    reg16_setbit(CLK_CTRL, 0x2); // offset:2c bit2 sd clk enable
-    while (reg16_getbit(CLK_CTRL, 0x1) != 1) { ; } // wait clock is stability
-    writeb(TOUT_CTRL, 0xe);
-
-    writeb(PWR_CTRL, POWR_ON_1_8V); // pwr ctrl, 1.8v
-    writew(NORMAL_INT_STAT_EN, NORMAL_ERR_INT_EN); // normal int enable
-    writew(ERROR_INT_STAT_EN, NORMAL_ERR_INT_EN); // normal signal enable
-    writew(NORMAL_INT_SIGNAL_EN, ALL_NORMAL_ERR_INT); // error int enable
-    writew(ERROR_INT_SIGNAL_EN, ALL_NORMAL_ERR_INT); // error signal enable
-    reg16_setbit(EMMC_CTRL, 0x0); // set emmc
-    writeb(HOST_CTRL1, g_mmc_cur_info.host_ctrl1);
-    writew(HOST_CTRL2, g_mmc_cur_info.host_ctrl2);
-    writew(SDIOM_CR_REG, g_mmc_cur_info.sdiom_clk_reg);
-    writew(EMMC_CCLK_DIV_REG, g_mmc_cur_info.emmc_cclk_reg);
-    writew(EMMC_DIV_REG, g_mmc_cur_info.emmc_div_reg);
-    writew(SDIO_BUS_CGDIV_REG, g_mmc_cur_info.sd_bus_reg);
-    writew(MBIIU_CTRL, g_mmc_cur_info.mbiu_ctrl);
-    writew(EMMC_TUNING_BM0_REG, EMMC_TUNING_BM0_VAL);
-    writew(EMMC_TUNING_BM1_REG, EMMC_TUNING_BM1_VAL);
-    writel(AT_CTRL, g_mmc_cur_info.at_ctrl);
-    reg16_setbits(AT_STAT, 0, LEN_8BIT, g_mmc_cur_info.at_stat);
-    // The fixed clock is less than or equal to 52 MHz, and the tuning clock is not used.
-    if (emmc_get_clock_value() <= SDIOM_SRC_CLK_FREQ_LVL_50M_VAL) {
-        reg16_clrbit(HOST_CTRL2, SAMPLE_CLK_SEL_BIT);
-    }
-}
-void emmc_recovery_init(void)
-{
-    uint32_t irq_sts = osal_irq_lock();
-    uint64_t time1 = uapi_tcxo_get_us();
-    uint64_t time9 = 0;
-#ifdef EMMC_RECOVERY_WITH_REENUME
-    uint32_t args = 0;
-    uint32_t resp = 0;
-    uint32_t resp_r2[4] = { 0 };
-    uint32_t flag = 1;
-    mmc_save_info_t* ptr_mmc = sdhci_get_save_info();
-    uint32_t timing = ptr_mmc->timing;
-    uint32_t bus_width = ptr_mmc->bus_width;
-
-    emmc_reg_init();
-    tcxo_port_delay_us(1200); // wait 1200 cnt (1ms)
-    emmc_send_cmd(0x0, CMD0_INDEX, 0, &resp); // cmd0
-    tcxo_port_delay_us(1000); // wait 1000 cnt (900us) ok
-    resp = 0;
-    emmc_send_cmd1(CMD1_ARGS, CMD1_INDEX, &resp);
-    emmc_send_cmd_r2(0x0, CMD2_INDEX, resp_r2); // cmd2
-    emmc_send_cmd(CMD3_ARGS, CMD3_INDEX, 1, &resp); // cmd3
-    emmc_send_cmd_r2(CMD9_ARGS, CMD9_INDEX, resp_r2); // cmd9
-    emmc_send_cmd(CMD7_ARGS, CMD7_INDEX, 1, &resp); // cmd7
-    emmc_set_timing_and_buswidth(bus_width, timing);
-    // recovery for clock and phase
-    writeb(HOST_CTRL1, g_mmc_cur_info.host_ctrl1);
-    writew(HOST_CTRL2, g_mmc_cur_info.host_ctrl2);
-    writew(SDIOM_CR_REG, g_mmc_cur_info.sdiom_clk_reg);
-    writew(EMMC_CCLK_DIV_REG, g_mmc_cur_info.emmc_cclk_reg);
-    writew(EMMC_DIV_REG, g_mmc_cur_info.emmc_div_reg);
-    writew(SDIO_BUS_CGDIV_REG, g_mmc_cur_info.sd_bus_reg);
-    writew(MBIIU_CTRL, g_mmc_cur_info.mbiu_ctrl);
-    writew(EMMC_TUNING_BM0_REG, EMMC_TUNING_BM0_VAL);
-    writew(EMMC_TUNING_BM1_REG, EMMC_TUNING_BM1_VAL);
-    writel(AT_CTRL, g_mmc_cur_info.at_ctrl);
-    reg16_setbits(AT_STAT, 0, LEN_8BIT, g_mmc_cur_info.at_stat);
-    // The fixed clock is less than or equal to 52 MHz, and the tuning clock is not used.
-    if (emmc_get_clock_value() <= SDIOM_SRC_CLK_FREQ_LVL_50M_VAL) {
-        reg16_clrbit(HOST_CTRL2, SAMPLE_CLK_SEL_BIT);
-    }
-#else
-    emmc_recovery_register();
-#endif
-    time9 = uapi_tcxo_get_us();
-    osal_irq_restore(irq_sts);
-#if EMMC_BOARD_DEBUG_ON
-    PRINT("OK~  time1=%llu tim9=%llu, time=%llu\r\n", time1, time9, time9-time1);
-#endif
-    reg16_clrbit(PM_EMMC_CCLK_DIV_REG, 0);
-}
 
 static void hal_mmc_set_preset_val(struct hci_softc *sc, bool en)
 {
@@ -471,7 +530,7 @@ static int mmc_voltage_switch(struct hci_softc *sc, uint32_t vccq)
             break;
     }
 
-#if (EMMC_BOARD_DEBUG_ON)
+#if (MMC_BOARD_DEBUG_ON)
     device_printf(sc->dev, "vccq:[%u], pwr:[%u].\n", vccq, pwr);
 #endif
 
@@ -499,45 +558,73 @@ static void mmc_set_sd_bus_clk_div(uint32_t div_reg, uint32_t freq_div)
     DPAL_WRITE_UINT16(value, div_reg);
 }
 
-static void mmc_set_sdiom_src_clk(uint32_t cfg_clock, uint32_t *freq_div, uint32_t *second_freq_div)
+static void mmc_calc_sdiom_clk_div(system_sdio_freq_t freq_level, uint32_t cfg_clock,
+                                   uint32_t *freq_div, uint32_t *second_freq_div)
 {
-    system_sdio_freq_t sdiom_freq_level;
+    uint32_t sdiom_freq_val[CLOCKS_SDIO_FREQ_MAX] = {
+        SDIOM_SRC_CLK_LOW_FREQ_VAL, SDIOM_SRC_CLK_FREQ_LVL_50M_VAL,
+        SDIOM_SRC_CLK_FREQ_LVL_64M_VAL, SDIOM_SRC_CLK_HIGH_FREQ_LVL_VAL
+    };
     *second_freq_div = 1;
+    if (cfg_clock <= sdiom_freq_val[freq_level]) {
+        *freq_div = sdiom_freq_val[freq_level] / cfg_clock;
+        if (freq_level == CLOCKS_SDIO_FREQ_32M || freq_level == CLOCKS_SDIO_FREQ_H) {
+            if (sdiom_freq_val[freq_level] % cfg_clock != 0) { *freq_div += 1; }
+        }
+    } else {
+        *freq_div = 1;
+    }
+
+    if (*freq_div > 0xFF) {
+        dprintf("%s, div:[%u] error\r\n", __FUNCTION__, *freq_div);
+        freq_level = CLOCKS_SDIO_FREQ_32M;
+        *freq_div = 1;
+    }
+#if (MMC_BOARD_DEBUG_ON)
+    dprintf("clk_level[%u], freq_div[%u], second_freq_div[%u], sdiom_freq_val[%u], cfg_clock[%u]!\n",
+        freq_level, *freq_div, *second_freq_div, sdiom_freq_val[freq_level], cfg_clock);
+#endif
+}
 
+static system_sdio_freq_t mmc_select_sdiom_src_clk(struct hci_softc *sc, uint32_t cfg_clock)
+{
+    uint32_t co_num = (sc->num == 0) ? 1 : 0;  // 同时钟源共存的另外一个mmc
+    system_sdio_freq_t freq_level;
+
+    g_sdiom_cfg_clk[sc->num] = cfg_clock;
     if (cfg_clock <= SDIOM_SRC_CLK_LOW_FREQ_VAL) {
-        sdiom_freq_level = CLOCKS_SDIO_FREQ_32M;
-        *freq_div = SDIOM_SRC_CLK_LOW_FREQ_VAL / cfg_clock;
-        if (SDIOM_SRC_CLK_LOW_FREQ_VAL % cfg_clock != 0) { *freq_div += 1; }
+        freq_level = CLOCKS_SDIO_FREQ_32M;
+#ifndef CFG_DRIVERS_NANDFLASH
     } else if (cfg_clock <= SDIOM_SRC_CLK_FREQ_LVL_50M_VAL) {
-        sdiom_freq_level = CLOCKS_SDIO_FREQ_50M;
-        *freq_div = 1;
+        freq_level = CLOCKS_SDIO_FREQ_50M;
     } else if (cfg_clock == SDIOM_SRC_CLK_FREQ_LVL_64M_VAL) {
-        sdiom_freq_level = CLOCKS_SDIO_FREQ_64M;
-        *freq_div = 1;
+        freq_level = CLOCKS_SDIO_FREQ_64M;
     } else if (cfg_clock <= SDIOM_SRC_CLK_HIGH_FREQ_LVL_VAL) {
-        sdiom_freq_level = CLOCKS_SDIO_FREQ_H;
-        *freq_div = SDIOM_SRC_CLK_HIGH_FREQ_LVL_VAL / cfg_clock;
-        if (SDIOM_SRC_CLK_HIGH_FREQ_LVL_VAL % cfg_clock != 0) { *freq_div += 1; }
+        freq_level = CLOCKS_SDIO_FREQ_H;
     } else {
-        sdiom_freq_level = CLOCKS_SDIO_FREQ_32M;
-        *freq_div = 1;
+        freq_level = CLOCKS_SDIO_FREQ_H;
     }
-    if (!clocks_set_sdio_freq(sdiom_freq_level)) {
-#if (EMMC_BOARD_DEBUG_ON)
-        dprintf("%s, sdiom_freq_level:[%u] error\r\n", __FUNCTION__, sdiom_freq_level);
-#endif
+#else   // NANDFLASH + SDIO共存场景, 固定选高频
+    } else {
+        freq_level = CLOCKS_SDIO_FREQ_H;
     }
+#endif
+    /* 记录下原始的选择 */
+    g_sdiom_mmc_sel[sc->num] = freq_level;
 
-#if (EMMC_BOARD_DEBUG_ON)
-    if (*freq_div > 0xFF) {
-        dprintf("%s, div:[%u] error\r\n", __FUNCTION__, *freq_div);
+    /* 根据同router的另外一个mmc确定最终的选择 */
+    if (g_sdiom_mmc_sel[co_num] != CLOCKS_SDIO_FREQ_MAX) {
+        if (g_sdiom_sel_mode == SDIOM_SEL_LP_MODE) {
+            freq_level = (g_sdiom_mmc_sel[co_num] > freq_level) ? freq_level : g_sdiom_mmc_sel[co_num];
+        } else {
+            freq_level = (g_sdiom_mmc_sel[co_num] > freq_level) ? g_sdiom_mmc_sel[co_num] : freq_level;
+        }
     }
-    dprintf("clk_level:[%u], freq_div:[%u], second_freq_div:[%u], cfg_clock: [%u]!\n",
-        sdiom_freq_level, *freq_div, *second_freq_div, cfg_clock);
-#endif
+
+    return freq_level;
 }
 
-static void mmc_set_first_level_clk_div(uint32_t div_reg, uint32_t freq_div)
+static void emmc_host_set_first_level_clk_div(uint32_t div_reg, uint32_t freq_div)
 {
     uint16_t value;
 
@@ -549,7 +636,7 @@ static void mmc_set_first_level_clk_div(uint32_t div_reg, uint32_t freq_div)
     value &= ~SDIO_EMMC_DIV_NUM_MASK;
     value |= (uint16_t)(freq_div << SDIO_EMMC_DIV_NUM_POST_SHIFT);
     value |= EMMC_CARD_CLK_INV_SET;
-#if (EMMC_BOARD_DEBUG_ON)
+#if (MMC_BOARD_DEBUG_ON)
     dprintf("%s, freq_div:[%u]  value:[%x]!\n", __FUNCTION__, freq_div, value);
 #endif
     // 当0x52000100的bit13设置emmc cclk tuning coarse mode后,soc要求其分频系数必须大于等于2
@@ -563,9 +650,11 @@ static void mmc_set_first_level_clk_div(uint32_t div_reg, uint32_t freq_div)
     DPAL_WRITE_UINT16(value, div_reg);
     value |= EMMC_EMMC_CCLK_EN;
     DPAL_WRITE_UINT16(value, div_reg);
+
+    tcxo_port_delay_us(60); // wait 60us
 }
 
-static void mmc_set_second_level_clk_div(uint32_t div_reg, uint32_t freq_div)
+static void emmc_host_set_second_level_clk_div(uint32_t div_reg, uint32_t freq_div)
 {
     uint16_t value;
 
@@ -587,7 +676,26 @@ static void mmc_set_second_level_clk_div(uint32_t div_reg, uint32_t freq_div)
     DPAL_WRITE_UINT16(value, div_reg);
 }
 
-static void mmc_host_set_first_level_clk_div(uint32_t div_reg, uint32_t freq_div)
+static void emmc_host_set_clk_div(system_sdio_freq_t sdiom_freq_level, uint32_t real_clock)
+{
+    uint32_t freq_div = 1;
+    uint32_t sec_freq_div = 1;
+
+    if (real_clock == 0) {
+        return;
+    }
+    /* 根据所选的sdiom时钟源和目标时钟频率,计算分频比 */
+    mmc_calc_sdiom_clk_div(sdiom_freq_level, real_clock, &freq_div, &sec_freq_div);
+    if (real_clock <= SDIOM_SRC_CLK_FREQ_LVL_50M_VAL) {
+        reg16_clrbit(EMMC_CCLK_DIV_REG, EMMC_TUNING_COARSE_MODE_BIT);
+    } else {
+        reg16_setbit(EMMC_CCLK_DIV_REG, EMMC_TUNING_COARSE_MODE_BIT);
+    }
+    emmc_host_set_first_level_clk_div(EMMC_CCLK_DIV_REG, freq_div);
+    emmc_host_set_second_level_clk_div(EMMC_DIV_REG, sec_freq_div);
+}
+
+static void sdio_host_set_first_level_clk_div(uint32_t div_reg, uint32_t freq_div)
 {
     uint16_t value;
     value = DPAL_GET_UINT16(div_reg);
@@ -598,6 +706,7 @@ static void mmc_host_set_first_level_clk_div(uint32_t div_reg, uint32_t freq_div
     DPAL_WRITE_UINT16(value, div_reg);
     value &= ~SDIO_EMMC_DIV_NUM_MASK;
     value |= (uint16_t)(freq_div << SDIO_EMMC_DIV_NUM_POST_SHIFT);
+    value |= SDIO_HOST_CARD_CLK_INV_SET;
     DPAL_WRITE_UINT16(value, div_reg);
     value |= SDIO_CCLK_ORI_DIV_EN;
     DPAL_WRITE_UINT16(value, div_reg);
@@ -607,9 +716,13 @@ static void mmc_host_set_first_level_clk_div(uint32_t div_reg, uint32_t freq_div
     DPAL_WRITE_UINT16(value, div_reg);
 
     value = DPAL_GET_UINT16(div_reg);
+#if (MMC_BOARD_DEBUG_ON)
+    dprintf("%s, freq_div:[%u],value:[%x]!\n", __FUNCTION__, freq_div, value);
+#endif
+    tcxo_port_delay_us(60); // wait 60us
 }
 
-static void mmc_host_set_second_level_clk_div(uint32_t div_reg, uint32_t freq_div)
+static void sdio_host_set_second_level_clk_div(uint32_t div_reg, uint32_t freq_div)
 {
     uint16_t value;
 
@@ -622,34 +735,61 @@ static void mmc_host_set_second_level_clk_div(uint32_t div_reg, uint32_t freq_di
     DPAL_WRITE_UINT16(value, div_reg);
 }
 
-unsigned int mmc_set_clock_with_way2(struct hci_softc *sc, unsigned int cfg_clock)
+static void sdio_host_set_clk_div(system_sdio_freq_t sdiom_freq_level, uint32_t real_clock)
 {
-    uint32_t first_freq_div = 0;
-    uint32_t freq_div = 0;
-    uint32_t second_freq_div = 0;
+    uint32_t freq_div = 1;
     uint32_t sec_freq_div = 1;
+
+    if (real_clock == 0) {
+        return;
+    }
+    /* 根据所选的sdiom时钟源和目标时钟频率,计算分频比 */
+    mmc_calc_sdiom_clk_div(sdiom_freq_level, real_clock, &freq_div, &sec_freq_div);
+    if (real_clock <= SDIOM_SRC_CLK_FREQ_LVL_50M_VAL) {
+        reg16_clrbit(SD_HOST_CCLK_DIV_REG, SDIO_TUNING_COARSE_MODE_BIT);
+    } else {
+        reg16_setbit(SD_HOST_CCLK_DIV_REG, SDIO_TUNING_COARSE_MODE_BIT);
+    }
+    sdio_host_set_first_level_clk_div(SD_HOST_CCLK_DIV_REG, freq_div);
+    sdio_host_set_second_level_clk_div(SDIO_HOST_CCLK_DIV_REG, sec_freq_div);
+}
+
+unsigned int mmc_set_clock_with_way2(struct hci_softc *sc, unsigned int cfg_clock)
+{
+    system_sdio_freq_t sdiom_freq_level;
     uint32_t real_clock = cfg_clock;
+    uint32_t change = true;
     if (cfg_clock > sc->caps.max_clk) {
-#if EMMC_BOARD_DEBUG_ON
-        dprintf("%s, clock:[%u] is greater than the max_clk:[%u]!\n", __FUNCTION__, cfg_clock, sc->caps.max_clk);
-#endif
         real_clock = sc->caps.max_clk;
     }
-    mmc_set_sdiom_src_clk(real_clock, &freq_div, &sec_freq_div);
+#if MMC_BOARD_DEBUG_ON
+    dprintf("mmc%d cfg_clock[%u],max_clk:[%u],real_clock:[%u]\n", sc->num, cfg_clock, sc->caps.max_clk, real_clock);
+#endif
+    sdiom_freq_level = mmc_select_sdiom_src_clk(sc, real_clock);
+    if (!clocks_set_sdio_freq(sdiom_freq_level)) {
+        return 0;
+    }
+    change = (sdiom_freq_level != g_sdiom_cur_sel) ? true : false;
     if (sc->num == 0) {
-        first_freq_div = EMMC_CCLK_DIV_REG;
-        second_freq_div = EMMC_DIV_REG;
-        mmc_set_first_level_clk_div(first_freq_div, freq_div);
-        mmc_set_second_level_clk_div(second_freq_div, sec_freq_div);
+        emmc_host_set_clk_div(sdiom_freq_level, real_clock);
+        if (change == true) {
+#if (MMC_BOARD_DEBUG_ON)
+            dprintf("%s, sdiom change, update mmc1, cfg_clk[%d]\r\n", __FUNCTION__, g_sdiom_cfg_clk[1]);
+#endif
+            sdio_host_set_clk_div(sdiom_freq_level, g_sdiom_cfg_clk[1]); // 源时钟有切换,另一路mmc要重配
+        }
 #ifdef DPALCFG_DRIVERS_SDIO
     } else if (sc->num == 1) {
-        first_freq_div = SD_HOST_CCLK_DIV_REG;
-        second_freq_div = SDIO_HOST_CCLK_DIV_REG;
-        mmc_host_set_first_level_clk_div(first_freq_div, freq_div);
-        mmc_host_set_second_level_clk_div(second_freq_div, sec_freq_div);
+        sdio_host_set_clk_div(sdiom_freq_level, real_clock);
+        if (change == true) {
+#if (MMC_BOARD_DEBUG_ON)
+            dprintf("%s, sdiom change, update mmc0, cfg_clk[%d]\r\n", __FUNCTION__, g_sdiom_cfg_clk[0]);
+#endif
+            emmc_host_set_clk_div(sdiom_freq_level, g_sdiom_cfg_clk[0]); // 源时钟有切换,另一路mmc要重配
+        }
 #endif
     }
-
+    g_sdiom_cur_sel = sdiom_freq_level;
     mmc_set_sd_bus_clk_div(SDIO_BUS_CGDIV_REG, 1);
 
     return 0;
@@ -679,18 +819,18 @@ static uint32_t sdhci_get_config_clock(struct hci_softc *sc, uint32_t clock)
 {
     uint32_t actual_clock = clock;
     if (clock > sc->caps.max_clk) {
-#if EMMC_BOARD_DEBUG_ON
+#if MMC_BOARD_DEBUG_ON
         dprintf("%s, clock:[%u] is greater than the max_clk:[%u]!\n", __FUNCTION__, clock, sc->caps.max_clk);
 #endif
         actual_clock = sc->caps.max_clk;
     }
-    switch (g_max_timing) {
+    switch (g_max_timing[sc->num]) {
         case bus_timing_mmc_hs:
         case bus_timing_uhs_sdr50:
         case bus_timing_uhs_ddr50:
         case bus_timing_mmc_ddr52:
         case bus_timing_sd_hs:
-            if (actual_clock >= SDIOM_SRC_CLK_FREQ_LVL_50M_VAL) {
+            if (actual_clock >= SDIOM_SRC_CLK_FREQ_LVL_49M_VAL) {
                 actual_clock = SDIOM_SRC_CLK_FREQ_LVL_49M_VAL;
             }
             break;
@@ -700,7 +840,7 @@ static uint32_t sdhci_get_config_clock(struct hci_softc *sc, uint32_t clock)
     return actual_clock;
 }
 
-uint32_t sdhci_set_clock(struct hci_softc *sc, uint32_t clock)
+uint32_t mmc_sdhci_set_clock(struct hci_softc *sc, uint32_t clock)
 {
     unsigned int ret;
     static uint8_t inited = false;
@@ -710,14 +850,11 @@ uint32_t sdhci_set_clock(struct hci_softc *sc, uint32_t clock)
         return clock;
     }
     actual_clk = sdhci_get_config_clock(sc, clock);
-#if EMMC_BOARD_DEBUG_ON
-    dprintf("%s, clk:%u,a_clk:%u,resource:[0x%x]!\n", __FUNCTION__, clock, actual_clk, DPAL_GET_UINT16(SDIOM_CR_REG));
+#if MMC_BOARD_DEBUG_ON
+    dprintf("mmc%d clk:%u,a_clk:%u,max_timing[%d],resource:[0x%x]!\n", sc->num,
+            clock, actual_clk, g_max_timing[sc->num], DPAL_GET_UINT16(SDIOM_CR_REG));
 #endif
-    if (actual_clk <= SDIOM_SRC_CLK_FREQ_LVL_50M_VAL) {
-        reg16_clrbit(BRANDY_EXTERNAL_EMMC_CCLK_DIV, EMMC_TUNING_COARSE_MODE_BIT);
-    } else {
-        reg16_setbit(BRANDY_EXTERNAL_EMMC_CCLK_DIV, EMMC_TUNING_COARSE_MODE_BIT);
-    }
+
     ret = hal_mmc_set_soc_clock(sc, actual_clk);
     if (ret != 0) {
         device_printf(sc->dev, "set clock fail!\n");
@@ -730,36 +867,61 @@ uint32_t sdhci_set_clock(struct hci_softc *sc, uint32_t clock)
         hci_writeb(sc, SDHCI_AXI_MBIIU_CTRL, val);
         inited = true;
     }
-#ifdef CFG_SDIO_EMMC_COEXIST
-    if (sc->num == 0) {
-#endif
+
     // After the tuning phase value is configured, the tuning clk function is automatically enabled.
     if (actual_clk > SDIOM_SRC_CLK_FREQ_LVL_50M_VAL) {
-        reg16_clrbit(HOST_CTRL2, SAMPLE_CLK_SEL_BIT);
-        reg16_clrbit(AT_CTRL, 0x4); // 0x4 means SW_TUNE_EN
-        dpal_writel(sc->tuning_phase, AT_STAT);
-        reg16_setbit(HOST_CTRL2, SAMPLE_CLK_SEL_BIT);
+        reg16_clrbit(sc->base + SDHCI_HOST_CONTROL2, SAMPLE_CLK_SEL_BIT);
+        hci_clearl(sc, SDHCI_AUTO_TUNING_CTRL, SDHCI_SW_TUNING_EN);  //  bit4
+        hci_writel(sc, SDHCI_AUTO_TUNING_STATUS, sc->tuning_phase);
+        reg16_setbit(sc->base + SDHCI_HOST_CONTROL2, SAMPLE_CLK_SEL_BIT);
         // The fixed clock is less than or equal to 52 MHz, and the tuning clock is not used.
     } else {
-        reg16_clrbit(HOST_CTRL2, SAMPLE_CLK_SEL_BIT);
-    }
-#ifdef CFG_SDIO_EMMC_COEXIST
+        reg16_clrbit(sc->base + SDHCI_HOST_CONTROL2, SAMPLE_CLK_SEL_BIT);
     }
+
+#if MMC_BOARD_DEBUG_ON
+    dprintf("%s,clk_src=0x%X, at_ctrl=0x%X, at_stat=0x%X, host2_ctrl=0x%X, tuning_phase=0x%X\r\n",
+            __FUNCTION__, readw(SDIOM_CR_REG), hci_readl(sc, SDHCI_AUTO_TUNING_CTRL),
+            hci_readl(sc, SDHCI_AUTO_TUNING_STATUS), hci_readw(sc, SDHCI_HOST_CONTROL2), sc->tuning_phase);
 #endif
-#if EMMC_BOARD_DEBUG_ON
-    dprintf("%s,clk_src=0x%X, at_ctrl=0x%X, at_stat=0x%X, host2_ctrl=0x%X, tuning_phase=0x%X\r\n", __FUNCTION__,
-            readw(SDIOM_CR_REG), readw(AT_CTRL), readw(AT_STAT), readw(HOST_CTRL2), sc->tuning_phase);
-#endif
+    tcxo_port_delay_us(60); // wait 60us
     return actual_clk;
 }
 
+uint8_t is_sdio_working(void)
+{
+    struct hci_softc *sc = get_mmc_resource(1);
+
+    if (sc == NULL || sc->slot == NULL) {
+        return false;
+    }
+    struct mmc_softc *mmc_sc = device_get_softc(((struct sdhci_slot*)sc->slot)->dev);
+    if (mmc_sc == NULL || mmc_sc->child_count == 0) {
+        return false;
+    }
+
+    return (mmc_sc->card_init_status == MMC_CARD_INIT) ?  true : false;
+}
 void mmc_set_internal_clk(uint16_t clk_level)
 {
+    /* sdio和emmc共存情况下, 外部不能更改emmc的时钟源 */
+    if (is_sdio_working() == true) {
+        return;
+    }
+
     struct hci_softc *sc = get_mmc_resource(0);
     uint32_t g_sdiom_val[CLOCKS_SDIO_FREQ_MAX] = {
         CLOCKS_SDIO_FREQ_32M_VAL, CLOCKS_SDIO_FREQ_50M_VAL, CLOCKS_SDIO_FREQ_64M_VAL, CLOCKS_SDIO_FREQ_H_VAL };
-    clocks_clk_cfg_t sdio_freq = clocks_system_sdio_freq_get(clk_level);
-    sdhci_set_clock(sc, g_sdiom_val[clk_level]);
+
+    static uint16_t cur_level = CLOCKS_SDIO_FREQ_MAX;
+    if (clk_level == cur_level) {
+        return;
+    }
+    cur_level = clk_level;
+#if MMC_BOARD_DEBUG_ON
+    dprintf("%s, clk_level %d\r\n", __FUNCTION__, clk_level);
+#endif
+    mmc_sdhci_set_clock(sc, g_sdiom_val[clk_level]);
 }
 
 static void sdhci_set_drv_phase(uint32_t host_id, uint32_t phase)
@@ -806,14 +968,14 @@ static void sdhci_subplatform_init(const struct hci_softc *sc, hci_caps *cfg_inf
         device_printf(sc->dev, "LOSCFG_DRIVERS_EMMC selected\n");
         cfg_info->caps |= HCI_SLOTTYPE_EMBEDDED;
         cfg_info->caps |= HCI_CAN_DO_8BITBUS;
-        cfg_info->quirks |= SDHCI_QUIRK_SIG_1V8_ONLY; /* signal 1.2V unsupported */
+        cfg_info->quirks |= SDHCI_QUIRK_SIG_1V8_ONLY;
 #ifdef DPALCFG_DRIVERS_SDIO
     } else if (sc->num == 1) { /* SDIO device */
-         // brandyæ\9c\80é«\98é¢\91ç\8e\87æ\9c\89é\99\90å\88
-        cfg_info->max_clk = SDIOM_SRC_CLK_FREQ_LVL_49M_VAL;
+         // brandyæ\9c\80é«\98é¢\91ç\8e\87æ\8c\89æ\9c\80é«\98è\83½å\8a\9bé\85\8dç½®
+        cfg_info->max_clk = SDIOM_SRC_CLK_FREQ_LVL_98M_VAL;
         cfg_info->min_clk = CONFIG_MMC1_CCLK_MIN;
         cfg_info->caps |= HCI_SLOTTYPE_SDIO;
-        cfg_info->quirks |= SDHCI_QUIRK_SIG_3V3_ONLY; /* signal 1.2V 1.8V unsupported */
+        cfg_info->quirks |= SDHCI_QUIRK_SIG_1V8_ONLY;
         cfg_info->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
         cfg_info->caps &= ~HCI_CAN_VDD_180;
         cfg_info->caps &= ~HCI_CAN_DO_8BITBUS;
@@ -838,6 +1000,10 @@ static void sdhci_platform_init(struct hci_softc *sc)
     cfg_info->caps2 &= ~HCI_CAN_MMC_HS400ES;
 
     sdhci_subplatform_init(sc, cfg_info);
+#if MMC_BOARD_DEBUG_ON
+    dprintf("%s, hci_caps:caps[0x%x],caps2[0x%x],quirks[0x%x],max_clk[0x%x],min_clk[0x%x]\r\n", __FUNCTION__,
+            cfg_info->caps, cfg_info->caps2, cfg_info->quirks, cfg_info->min_clk);
+#endif
 }
 
 
@@ -899,19 +1065,22 @@ static void sdhci_en_drv_dll_sample(struct hci_softc *sc, uint32_t en)
 {
     uint16_t val = 0;
 
-#if EMMC_BOARD_DEBUG_ON
+#if MMC_BOARD_DEBUG_ON
     dprintf("%s, en:[%u]\r\n", __FUNCTION__, en);
 #endif
-
+    if (sc->num >= MAX_MMC_NUM) {
+        dprintf("%s, sc->num:[%u]\r\n", __FUNCTION__, sc->num);
+        return;
+    }
     if (en != 0) {
         hci_setl(sc, SDHCI_AUTO_TUNING_CTRL, SDHCI_SW_TUNING_EN);
 
-        val = DPAL_GET_UINT16(EMMC_CCLK_DIV_REG);
-        val |= EMMC_TUNING_COARSE_MODE;
-        DPAL_WRITE_UINT16(val, EMMC_CCLK_DIV_REG);
+        val = DPAL_GET_UINT16(g_clk_div1_reg[sc->num]);
+        val |= g_tunning_coarse_mode[sc->num];
+        DPAL_WRITE_UINT16(val, g_clk_div1_reg[sc->num]);
 
-        DPAL_WRITE_UINT16(EMMC_TUNING_BM0_VAL, EMMC_TUNING_BM0_REG);
-        DPAL_WRITE_UINT16(EMMC_TUNING_BM1_VAL, EMMC_TUNING_BM1_REG);
+        DPAL_WRITE_UINT16(g_tunning_bm0_value[sc->num], g_tunning_bm0_reg[sc->num]);
+        DPAL_WRITE_UINT16(g_tunning_bm1_value[sc->num], g_tunning_bm1_reg[sc->num]);
     } else {
         hci_clearl(sc, SDHCI_AUTO_TUNING_CTRL, SDHCI_SW_TUNING_EN);
     }
@@ -934,9 +1103,9 @@ static void sdhci_set_mmc_io_driver(const struct hci_softc *sc, uint32_t host_id
     unused(timing);
 }
 
-static bool sdhci_judge_dll_sample(uint32_t timing)
+static bool sdhci_judge_dll_sample(struct hci_softc *sc, uint32_t timing)
 {
-    if (g_max_timing < timing) { g_max_timing = timing; }
+    if (g_max_timing[sc->num] < timing) { g_max_timing[sc->num] = timing; }
     if (timing == bus_timing_mmc_hs || timing == bus_timing_sd_hs || timing == bus_timing_normal ||
         timing == bus_timing_uhs_sdr25) {
         return false;
@@ -990,10 +1159,10 @@ static void sdhci_set_phase(struct hci_softc *sc, uint32_t timing)
             phase = 0;
         }
     }
-    en_flag = sdhci_judge_dll_sample(timing);
-#if EMMC_BOARD_DEBUG_ON
-    device_printf(sc->dev, "timing:%u, g_max_timing =%u, phase:0x%x, drv_phase:0x%x, en_flag:%d \n", timing,
-                  g_max_timing, phase, drv_phase, en_flag);
+    en_flag = sdhci_judge_dll_sample(sc, timing);
+#if MMC_BOARD_DEBUG_ON
+    device_printf(sc->dev, "%s timing:%u, g_max_timing =%u, phase:0x%x, drv_phase:0x%x, en_flag:%d \n", __FUNCTION__,
+                  timing, g_max_timing[sc->num], phase, drv_phase, en_flag);
 #endif
     sdhci_set_drv_phase(sc->num, drv_phase);
     sdhci_en_drv_dll_sample(sc, en_flag);
@@ -1030,11 +1199,13 @@ void mmc_dump_regs(struct hci_softc *sc)
 
 void mmc_ext_clk_switch(struct hci_softc *sc, bool enable)
 {
-    unused(sc);
-    if (enable) {
-        reg16_setbit(BRANDY_EXTERNAL_EMMC_CCLK_DIV, 0);
-    } else {
-        reg16_clrbit(BRANDY_EXTERNAL_EMMC_CCLK_DIV, 0);
+    /* sdio slave主动发消息可能需要时钟, master不关时钟 */
+    if (sc->num == 0) {
+        if (enable) {
+            reg16_setbit(g_clk_div1_reg[sc->num], 0);
+        } else {
+            reg16_clrbit(g_clk_div1_reg[sc->num], 0);
+        }
     }
 }
 
@@ -1044,7 +1215,7 @@ void init_slot_methods(int slot, hci_slot_ops *slot_ops)
 
     slot_ops->pre_clock = sdhci_pre_set_clock;
     slot_ops->post_clock = sdhci_post_clock;
-    slot_ops->set_clock = sdhci_set_clock;
+    slot_ops->set_clock = mmc_sdhci_set_clock;
     slot_ops->extra_init = sdhci_extra_init;
     slot_ops->slot_init = sdhci_slot_init;
     slot_ops->set_phase = sdhci_set_phase;
index 7753089..9cd6c83 100644 (file)
@@ -37,7 +37,9 @@ extern "C" {
 #endif /* __cplusplus */
 #endif /* __cplusplus */
 
-#define EMMC_BOARD_DEBUG_ON 0
+#ifndef MMC_BOARD_DEBUG_ON
+#define MMC_BOARD_DEBUG_ON 0
+#endif
 
 #define GLB_CTL_M_RB_BASE 0x57000000
 #define M_CTL_RB_BASE 0x52000000
@@ -75,7 +77,6 @@ extern "C" {
 #define BRANDY_EMMC_REG_END 0x52063FFF
 // emmc external clk EMMC_CCLK_DIV
 #define BRANDY_EXTERNAL_EMMC_CCLK_DIV     0x52000100
-#define EMMC_TUNING_COARSE_MODE_BIT       0xD
 
 #define PERI_EMMC_CRG_RST_CTL (GLB_CTL_M_RB_BASE + 0xc8)
 #define SOFT_RST_GLB_SDIO_CRG_N BIT(0)
@@ -155,31 +156,41 @@ extern "C" {
 #define CMD6_INDEX              0x61b
 
 #define EMMC_CCLK_DIV_REG (M_CTL_RB_BASE + 0x0100)
-#define EMMC_CCLK_ORI_DIV_NUM_MASK 0x0FF0
-#define EMMC_CCLK_ORI_DIV_NUM_2 0x20
+#define     EMMC_TUNING_COARSE_MODE_BIT     (13)
+#define     EMMC_TUNING_COARSE_MODE         BIT(13)
+
+#define     EMMC_CCLK_ORI_DIV_NUM_MASK 0x0FF0
+#define     EMMC_CCLK_ORI_DIV_NUM_2 0x20
 #define EMMC_TUNING_BM0_REG (M_CTL_RB_BASE + 0x104)
 #define EMMC_TUNING_BM1_REG (M_CTL_RB_BASE + 0x108)
-#define SD_HOST_CCLK_DIV_REG (M_CTL_RB_BASE + 0x0110)
-#define SDIO_HOST_CCLK_DIV_REG (M_CTL_RB_BASE + 0x014C)
+#define     EMMC_TUNING_BM0_VAL (0x4244)
+#define     EMMC_TUNING_BM1_VAL (0x777)
 
-#define SDIO_HOST_CLKEN BIT(0)
-#define SDIO_CCLK_ORI_DIV_EN BIT(1)
-#define SDIO_CCLK_ORI_LOAD_DIV_EN BIT(2)
-#define SDIO_HOST_DIV_EN BIT(0)
-#define SDIO_HOST_DIV_SHFIT 1
-#define SDIO_HOST_DIV_MASK 0xE
+#define SD_HOST_CCLK_DIV_REG (M_CTL_RB_BASE + 0x0110)
+#define     SDIO_HOST_CLKEN             BIT(0)
+#define     SDIO_CCLK_ORI_DIV_EN        BIT(1)
+#define     SDIO_CCLK_ORI_LOAD_DIV_EN   BIT(2)
+#define     SDIO_TUNING_COARSE_MODE_BIT (3)
+#define     SDIO_TUNING_COARSE_MODE     BIT(SDIO_TUNING_COARSE_MODE_BIT)
+#define     SDIO_HOST_CARD_CLK_INV_SET  BIT(13)
+
+#define SD_HOST_TUNING_BM0_REG (M_CTL_RB_BASE + 0x114)
+#define SD_HOST_TUNING_BM1_REG (M_CTL_RB_BASE + 0x118)
+#define     SDIO_TUNING_BM0_VAL (0x4244)
+#define     SDIO_TUNING_BM1_VAL (0x777)
 
 #define EMMC_DIV_REG (M_CTL_RB_BASE + 0x0120)
 #define SDIO_BUS_CGDIV_REG (M_CTL_RB_BASE + 0x0124)
-#define SD_BUS_CLKEN BIT(0)
-#define SD_BUS_DIV_EN BIT(1)
-#define SD_BUS_LOAD_DIV_EN BIT(8)
-#define SD_BUS_DIV_NUM_MASK 0xF8 // bit3---bit7
-#define SD_BUS_DIV_NUM_POST_SHIFT 3
+#define     SD_BUS_CLKEN BIT(0)
+#define     SD_BUS_DIV_EN BIT(1)
+#define     SD_BUS_LOAD_DIV_EN BIT(8)
+#define     SD_BUS_DIV_NUM_MASK 0xF8 // bit3---bit7
+#define     SD_BUS_DIV_NUM_POST_SHIFT 3
 
-#define EMMC_TUNING_BM0_VAL (0x4244)
-#define EMMC_TUNING_BM1_VAL (0x777)
-#define EMMC_TUNING_COARSE_MODE BIT(13)
+#define SDIO_HOST_CCLK_DIV_REG (M_CTL_RB_BASE + 0x014C)
+#define     SDIO_HOST_DIV_EN BIT(0)
+#define     SDIO_HOST_DIV_SHFIT 1
+#define     SDIO_HOST_DIV_MASK 0xE
 
 #define DWC_MSHC_PTR_VENDOR1 0x500
 #define SDHCI_MSHC_CTRL (DWC_MSHC_PTR_VENDOR1 + 0x08)
@@ -273,11 +284,13 @@ void init_emmc_pinmux(void);
 
 void sdio_drv_context_init(void);
 void init_sdio_pinmux(void);
+uint8_t is_sdio_working(void);
 void mmc_set_internal_clk(uint16_t clk_level);
 void mmc_set_first_init_flag(bool flag);
 bool mmc_get_first_init_flag(void);
 void mmc_set_sleep_init_flag(bool flag);
 bool mmc_get_sleep_init_flag(void);
+
 #ifdef __cplusplus
 #if __cplusplus
 }
index 124bebf..8c04fb6 100644 (file)
@@ -306,9 +306,13 @@ typedef struct {
  */
 typedef struct {
     uint32_t min_interval;     /*!< @if Eng Min interval[N * 0.625ms]
-                                    @else   最小的广播间隔[N * 0.625ms] @endif */
+                                            The value range: 0x0020 to 0x4000
+                                    @else   最小的广播间隔[N * 0.625ms]
+                                            可取值范围: 0x0020 to 0x4000 @endif */
     uint32_t max_interval;     /*!< @if Eng Max interval[N * 0.625ms]
-                                    @else   最大的广播间隔[N * 0.625ms] @endif */
+                                            The value range: 0x0020 to 0x4000
+                                    @else   最大的广播间隔[N * 0.625ms]
+                                            可取值范围: 0x0020 to 0x4000 @endif */
     uint8_t adv_type;          /*!< @if Eng Advertising type { @ref gap_ble_adv_type_t }
                                     @else   广播类型 { @ref gap_ble_adv_type_t } @endif */
     bd_addr_t own_addr;       /*!< @if Eng own address
index 83ba6e5..d37cf26 100644 (file)
@@ -1381,6 +1381,29 @@ typedef void (*gap_read_remote_rssi_event_callback)(const bd_addr_t *bd_addr, in
  */
 typedef void (*gap_is_accept_conn_on_safe_mode_callback)(const bd_addr_t *bd_addr, bool *res);
 
+/**
+ * @if Eng
+ * @brief Callback function for a new connection is rejected.
+ * @par   When registered, this callback notifys application a connect request is rejected.
+ * @attention NULL
+ * @param  [in] bd_addr #const bd_addr_t *, the address of the remote device.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_gap.h
+ * @see  gap_call_backs_t
+ * @else
+ * @brief  通知上层应用有个新的连接请求被拒绝了。
+ * @par    注册该回调函数之后,bluetooth调用该回调函数通知上层应用有个新的连接请求被拒绝了。
+ * @attention 无
+ * @param  [in] 远端设备地址。
+ * @retval #void  无返回值。
+ * @par 依赖:
+ * @li  bts_gap.h
+ * @see  gap_call_backs_t
+ * @endif
+ */
+typedef void (*gap_connect_rejection_report_callback)(const bd_addr_t *bd_addr);
+
 /**
  * @if Eng
  * @brief Struct of GAP callback functions.
@@ -1479,6 +1502,26 @@ errcode_t gap_reconnect_media_device(const bd_addr_t *addr);
  */
 errcode_t gap_bt_set_flow_limit(uint16_t flow_limit);
 
+/**
+ * @if Eng
+ * @brief Register callback function for connection rejected event notification.
+ * @par   Register callback function for connection rejected event notification.
+ * @attention NULL
+ * @param  [in] func #gap_connect_rejection_report_callback, a pointer to the callback func.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_br_gap.h
+ * @else
+ * @brief  注册拒绝新手机连接事件上报回调函数。
+ * @par    注册拒绝新手机连接事件上报回调函数。
+ * @attention 无
+ * @param  [in] 指向回调函数的指针。
+ * @retval #void 无
+ * @par 依赖:
+ * @li  bts_br_gap.h
+ * @endif
+ */
+void gap_register_br_connect_rejection_report_callback(gap_connect_rejection_report_callback func);
 /**
  * @}
  */
index 96db38f..5d00528 100644 (file)
@@ -51,5 +51,5 @@
                        <MSG STRUCTURE="diag_log_msg0" NAME="malloc or read fail! @DialBinParser.cpp(882),ERROR" ID="0xb8d01b92" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="Parser dial option image fail, file is nullptr! @DialBinParser.cpp(906),ERROR" ID="0xb8d01c52" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="malloc or read fail! @DialBinParser.cpp(919),ERROR" ID="0xb8d01cba" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="load img fail! file: %s resId: %x @DialBinParser.cpp(929),ERROR" ID="0xb8d01d0a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="load img fail! file: %s resId: %x @DialBinParser.cpp(935),ERROR" ID="0xb8d01d3a" />
                        </MSG_LOG>
\ No newline at end of file
index 367088e..c50fc81 100644 (file)
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="osal_mutex_init in g_connect_list_lock failed @connection_manager.c(126),ERROR" ID="0xd80603f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="osal_mutex_init in g_ble_conn_list_lock failed @connection_manager.c(131),ERROR" ID="0xd806041a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="create timer error! ret: %x @connection_manager.c(206),ERROR" ID="0xd8060672" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="start timer error! ret: %x @connection_manager.c(214),ERROR" ID="0xd80606b2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="start timer success! @connection_manager.c(219),INFO" ID="0xd80606dd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="already in discovery @connection_manager.c(238),WARNING" ID="0xd8060773" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="already in discovery @connection_manager.c(250),WARNING" ID="0xd80607d3" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="start discovery fail ret: %x @connection_manager.c(264),ERROR" ID="0xd8060842" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="discovery started @connection_manager.c(272),INFO" ID="0xd8060885" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="reconnect phone con_hdl:0x%x, result: %08x @connection_manager.c(405),INFO" ID="0xd8060cad" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="exist connect phone reject! @connection_manager.c(433),INFO" ID="0xd8060d8d" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="osal_mutex_init in g_connect_list_lock failed @connection_manager.c(127),ERROR" ID="0xd80603fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="osal_mutex_init in g_ble_conn_list_lock failed @connection_manager.c(132),ERROR" ID="0xd8060422" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="create timer error! ret: %x @connection_manager.c(207),ERROR" ID="0xd806067a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="start timer error! ret: %x @connection_manager.c(215),ERROR" ID="0xd80606ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="start timer success! @connection_manager.c(220),INFO" ID="0xd80606e5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="already in discovery @connection_manager.c(239),WARNING" ID="0xd806077b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="already in discovery @connection_manager.c(251),WARNING" ID="0xd80607db" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="start discovery fail ret: %x @connection_manager.c(265),ERROR" ID="0xd806084a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="discovery started @connection_manager.c(273),INFO" ID="0xd806088d" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="reconnect phone con_hdl:0x%x, result: %08x @connection_manager.c(406),INFO" ID="0xd8060cb5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="exist connect phone reject! @connection_manager.c(434),INFO" ID="0xd8060d95" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @connection_manager.c(454),ERROR" ID="0xd8060e32" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @connection_manager.c(458),ERROR" ID="0xd8060e52" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="send msg fail. %x @connection_manager.c(464),ERROR" ID="0xd8060e82" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="create acl cfm ret = %08x @connection_manager.c(472),INFO" ID="0xd8060ec5" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="dev_hdl: 0x%08x cod: 0x%x link_type: 0x%x @connection_manager.c(501),INFO" ID="0xd8060fad" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="already exist conn_node @connection_manager.c(511),INFO" ID="0xd8060ffd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="accept not paired earbuds. @connection_manager.c(520),INFO" ID="0xd8061045" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="exist same type conn node. @connection_manager.c(524),INFO" ID="0xd8061065" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="add conn info error! @connection_manager.c(531),ERROR" ID="0xd806109a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_disconnect_acl_by_handle ret: %x @connection_manager.c(538),INFO" ID="0xd80610d5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @connection_manager.c(546),ERROR" ID="0xd8061112" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="get addr fail @connection_manager.c(553),ERROR" ID="0xd806114a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @connection_manager.c(558),ERROR" ID="0xd8061172" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="send msg fail. %x @connection_manager.c(564),ERROR" ID="0xd80611a2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="connect exist conn_node @connection_manager.c(580),INFO" ID="0xd8061225" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="exist same type conn_node, disconnect. @connection_manager.c(585),INFO" ID="0xd806124d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="find remote node fail @connection_manager.c(593),WARNING" ID="0xd806128b" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="add conn info error! @connection_manager.c(600),ERROR" ID="0xd80612c2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="create acl ret = %08x @connection_manager.c(612),WARNING" ID="0xd8061323" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="acl is connected @connection_manager.c(620),INFO" ID="0xd8061365" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: %08x @connection_manager.c(629),INFO" ID="0xd80613ad" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="not exist conn node. @connection_manager.c(632),INFO" ID="0xd80613c5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="is phone=0x%x @connection_manager.c(635),INFO" ID="0xd80613dd" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="status error dev_hdl: %x status: %d @connection_manager.c(638),WARNING" ID="0xd80613f3" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_disconnect_acl_by_handle ret: %x @connection_manager.c(678),INFO" ID="0xd8061535" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="send msg connecting @connection_manager.c(710),INFO" ID="0xd8061635" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @connection_manager.c(714),ERROR" ID="0xd8061652" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @connection_manager.c(718),ERROR" ID="0xd8061672" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="send msg fail. %x @connection_manager.c(724),ERROR" ID="0xd80616a2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="send msg connecting success! @connection_manager.c(727),INFO" ID="0xd80616bd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="stop timer @connection_manager.c(732),INFO" ID="0xd80616e5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="stop timer success! @connection_manager.c(740),INFO" ID="0xd8061725" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="start timer @connection_manager.c(745),INFO" ID="0xd806174d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @connection_manager.c(755),ERROR" ID="0xd806179a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="create timer error! ret: %x @connection_manager.c(760),ERROR" ID="0xd80617c2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="start timer error! ret: %x @connection_manager.c(766),ERROR" ID="0xd80617f2" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="start timer success! try to reconnect %d times interval %dms @connection_manager.c(771),INFO" ID="0xd806181d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x reason: %08x @connection_manager.c(803),INFO" ID="0xd806191d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="no conn record dev_hdl: %08x @connection_manager.c(812),WARNING" ID="0xd8061963" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="rmt device class=0x%x is phone: 0x%x @connection_manager.c(822),INFO" ID="0xd80619b5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="get addr fail @connection_manager.c(835),WARNING" ID="0xd8061a1b" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="get remote dev addr failed. dev_hdl: %x @connection_manager.c(849),WARNING" ID="0xd8061a8b" />
-                       <MSG STRUCTURE="diag_log_msg6" NAME="addr: ****%02x%02x%02x%02x dev_hdl: %08x gap_remove_pair ret(bool): %d @connection_manager.c(858),INFO" ID="0xd8061ad5" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="error dev_hdl: %x pair_ret: %x disconn_ret: %x @connection_manager.c(867),WARNING" ID="0xd8061b1b" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: %08x @connection_manager.c(874),INFO" ID="0xd8061b55" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="conn node is null dev_hdl: %x @connection_manager.c(878),INFO" ID="0xd8061b75" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="status error dev_hdl: %x status: %d @connection_manager.c(884),INFO" ID="0xd8061ba5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: %08x @connection_manager.c(898),INFO" ID="0xd8061c15" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="get addr fail @connection_manager.c(906),WARNING" ID="0xd8061c53" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="rmt device is phone @connection_manager.c(913),INFO" ID="0xd8061c8d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="rmt device is not phone @connection_manager.c(916),INFO" ID="0xd8061ca5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="node not exist @connection_manager.c(927),INFO" ID="0xd8061cfd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="success @connection_manager.c(935),INFO" ID="0xd8061d3d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="add remote list error! @connection_manager.c(989),WARNING" ID="0xd8061eeb" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="descovery result @connection_manager.c(1015),INFO" ID="0xd8061fbd" />
-                       <MSG STRUCTURE="diag_log_msg5" NAME="found device addr: ****%02x%02x%02x%02x name: %s @connection_manager.c(1024),INFO" ID="0xd8062005" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="gap_get_device_name failed @connection_manager.c(1026),INFO" ID="0xd8062015" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="get device name fail @connection_manager.c(1051),WARNING" ID="0xd80620db" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="unhandled msg id: %d @connection_manager.c(1120),WARNING" ID="0xd8062303" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="set discovery status to stop @connection_manager.c(1138),INFO" ID="0xd8062395" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="unhandled msg id: %d @connection_manager.c(1209),WARNING" ID="0xd80625cb" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="show conn list: @connection_manager.c(1230),INFO" ID="0xd8062675" />
-                       <MSG STRUCTURE="diag_log_msg7" NAME="| %-4s | %-32s | %-12s | %-16s | %-16s | %-8s | %-8s | @connection_manager.c(1232),INFO" ID="0xd8062685" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="remote is null @connection_manager.c(1240),ERROR" ID="0xd80626c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="addr memcpy_s fail @connection_manager.c(1243),ERROR" ID="0xd80626da" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="name memcpy_s fail @connection_manager.c(1246),ERROR" ID="0xd80626f2" />
-                       <MSG STRUCTURE="diag_log_msg10" NAME="| %-4d | %-32s | ****%02x%02x%02x%02x | %-16d | %-16d | %-8d | %-8d | @connection_manager.c(1251),INFO" ID="0xd806271d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="show conn list end! @connection_manager.c(1256),INFO" ID="0xd8062745" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="show ble conn list: @connection_manager.c(1264),INFO" ID="0xd8062785" />
-                       <MSG STRUCTURE="diag_log_msg9" NAME="| %-4s | %-12s | %-10s | %-8s | %-12s | %-12s | %-12s | %-12s  | %-48s | @connection_manager.c(1269),INFO" ID="0xd80627ad" />
-                       <MSG STRUCTURE="diag_log_msg11" NAME="| %-4d | %02x******%02x%02x | %-10d | %-8d | %-12d | %-12d | %-12d | %-12d | %-48s | @connection_manager.c(1282),INFO" ID="0xd8062815" />
-                       <MSG STRUCTURE="diag_log_msg8" NAME="| %-4s | %-12s | %-10s | %-8s | %-12s | %-12s | %-12s | %-12s  | @connection_manager.c(1289),INFO" ID="0xd806284d" />
-                       <MSG STRUCTURE="diag_log_msg10" NAME="| %-4d | %02x******%02x%02x | %-10d | %-8d | %-12d | %-12d | %-12d | %-12d | @connection_manager.c(1295),INFO" ID="0xd806287d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="show ble conn list end! @connection_manager.c(1303),INFO" ID="0xd80628bd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="show link mode: @connection_manager.c(1315),INFO" ID="0xd806291d" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="| %-4s | %-32s | %-12s | %-16s | @connection_manager.c(1317),INFO" ID="0xd806292d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="remote is null @connection_manager.c(1326),ERROR" ID="0xd8062972" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="addr memcpy_s fail @connection_manager.c(1329),ERROR" ID="0xd806298a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="name memcpy_s fail @connection_manager.c(1332),ERROR" ID="0xd80629a2" />
-                       <MSG STRUCTURE="diag_log_msg7" NAME="| %-4d | %-32s | ****%02x%02x%02x%02x | %-16s | @connection_manager.c(1340),INFO" ID="0xd80629e5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="show link mode end! @connection_manager.c(1345),INFO" ID="0xd8062a0d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="set scan mode old=%d new=%d @connection_manager.c(1407),INFO" ID="0xd8062bfd" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_set_discovery_mode ret: %x @connection_manager.c(1418),INFO" ID="0xd8062c55" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="btsdk_set_discovery_mode mode: %x ret: %x @connection_manager.c(1429),INFO" ID="0xd8062cad" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="already in discovery @connection_manager.c(1451),INFO" ID="0xd8062d5d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="bt is not enabled @connection_manager.c(1464),WARNING" ID="0xd8062dc3" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="discovery already stopped @connection_manager.c(1469),WARNING" ID="0xd8062deb" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_stop_device_discovery ret=0x%x @connection_manager.c(1474),INFO" ID="0xd8062e15" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="discovery stopped @connection_manager.c(1477),INFO" ID="0xd8062e2d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="not start bt @connection_manager.c(1503),INFO" ID="0xd8062efd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="param id null @connection_manager.c(1507),INFO" ID="0xd8062f1d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="exist connect audio device @connection_manager.c(1513),INFO" ID="0xd8062f4d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="gap_br_cancel_discovery fail @connection_manager.c(1518),INFO" ID="0xd8062f75" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_disconnect_acl_by_handle ret: %x @connection_manager.c(1554),INFO" ID="0xd8063095" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] gatt client add conn node memcpy fail. @connection_manager.c(1621),ERROR" ID="0xd80632aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="btsrv connect state change cbk arg NULL! @connection_manager.c(1635),ERROR" ID="0xd806331a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="connect state update memcpy fail. @connection_manager.c(1640),ERROR" ID="0xd8063342" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="connect node is null. @connection_manager.c(1656),ERROR" ID="0xd80633c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble smp paired keys cbk param error @connection_manager.c(1675),ERROR" ID="0xd806345a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="paired keys malloc fail. @connection_manager.c(1681),ERROR" ID="0xd806348a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="paired keys malloc fail. @connection_manager.c(1686),ERROR" ID="0xd80634b2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="pair keys notify, keys addr memcpy fail. @connection_manager.c(1691),ERROR" ID="0xd80634da" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="pair keys notify, keys memcpy fail. @connection_manager.c(1698),ERROR" ID="0xd8063512" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble smp paired complete cbk param error @connection_manager.c(1715),ERROR" ID="0xd806359a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="connect param update incomes arg is NULL! @connection_manager.c(1726),ERROR" ID="0xd80635f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="connect param update, conn_node not found. @connection_manager.c(1733),ERROR" ID="0xd806362a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="connect param update,connect_params NULL. @connection_manager.c(1739),ERROR" ID="0xd806365a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="connect param update, addr memcpy fail. @connection_manager.c(1745),ERROR" ID="0xd806368a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="connect param update done ret:%d. @connection_manager.c(1754),INFO" ID="0xd80636d5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="gap_ble_connect_remote_device not start bt @connection_manager.c(1763),INFO" ID="0xd806371d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="gap_ble_connect_remote_device param id null @connection_manager.c(1767),INFO" ID="0xd806373d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][INFO] addr memcpy to param fail. @connection_manager.c(1773),INFO" ID="0xd806376d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv]addr memcpy fail. @connection_manager.c(1791),INFO" ID="0xd80637fd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="addr memcpy_s fail @connection_manager.c(1809),ERROR" ID="0xd806388a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read remote device rssi, conn_node not found. @connection_manager.c(1830),ERROR" ID="0xd8063932" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read remote device rssi fail @connection_manager.c(1835),ERROR" ID="0xd806395a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="conn_node not found. @connection_manager.c(1850),ERROR" ID="0xd80639d2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="auto reconnect is enabled, close it first. @connection_manager.c(1874),ERROR" ID="0xd8063a92" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @connection_manager.c(1879),ERROR" ID="0xd8063aba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @connection_manager.c(1883),ERROR" ID="0xd8063ada" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="send msg fail. %x @connection_manager.c(1890),ERROR" ID="0xd8063b12" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="send msg connecting success! @connection_manager.c(1894),INFO" ID="0xd8063b35" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="already exist conn_node @connection_manager.c(512),INFO" ID="0xd8061005" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="accept not paired earbuds. @connection_manager.c(521),INFO" ID="0xd806104d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="exist same type conn node. @connection_manager.c(525),INFO" ID="0xd806106d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="add conn info error! @connection_manager.c(532),ERROR" ID="0xd80610a2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_disconnect_acl_by_handle ret: %x @connection_manager.c(539),INFO" ID="0xd80610dd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @connection_manager.c(546),ERROR" ID="0xd8061112" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @connection_manager.c(559),ERROR" ID="0xd806117a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="get addr fail @connection_manager.c(566),ERROR" ID="0xd80611b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @connection_manager.c(571),ERROR" ID="0xd80611da" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="send msg fail. %x @connection_manager.c(577),ERROR" ID="0xd806120a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="connect exist conn_node @connection_manager.c(593),INFO" ID="0xd806128d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="exist same type conn_node, disconnect. @connection_manager.c(598),INFO" ID="0xd80612b5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="find remote node fail @connection_manager.c(606),WARNING" ID="0xd80612f3" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="add conn info error! @connection_manager.c(613),ERROR" ID="0xd806132a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="create acl ret = %08x @connection_manager.c(625),WARNING" ID="0xd806138b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="acl is connected @connection_manager.c(633),INFO" ID="0xd80613cd" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: %08x @connection_manager.c(642),INFO" ID="0xd8061415" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="not exist conn node. @connection_manager.c(645),INFO" ID="0xd806142d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="is phone=0x%x @connection_manager.c(648),INFO" ID="0xd8061445" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="status error dev_hdl: %x status: %d @connection_manager.c(651),WARNING" ID="0xd806145b" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_disconnect_acl_by_handle ret: %x @connection_manager.c(691),INFO" ID="0xd806159d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="send msg connecting @connection_manager.c(723),INFO" ID="0xd806169d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @connection_manager.c(727),ERROR" ID="0xd80616ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @connection_manager.c(731),ERROR" ID="0xd80616da" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="send msg fail. %x @connection_manager.c(737),ERROR" ID="0xd806170a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="send msg connecting success! @connection_manager.c(740),INFO" ID="0xd8061725" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="stop timer @connection_manager.c(745),INFO" ID="0xd806174d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="stop timer success! @connection_manager.c(753),INFO" ID="0xd806178d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="start timer @connection_manager.c(758),INFO" ID="0xd80617b5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @connection_manager.c(768),ERROR" ID="0xd8061802" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="create timer error! ret: %x @connection_manager.c(773),ERROR" ID="0xd806182a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="start timer error! ret: %x @connection_manager.c(779),ERROR" ID="0xd806185a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="start timer success! try to reconnect %d times interval %dms @connection_manager.c(784),INFO" ID="0xd8061885" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x reason: %08x @connection_manager.c(816),INFO" ID="0xd8061985" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="no conn record dev_hdl: %08x @connection_manager.c(825),WARNING" ID="0xd80619cb" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="rmt device class=0x%x is phone: 0x%x @connection_manager.c(835),INFO" ID="0xd8061a1d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="get addr fail @connection_manager.c(848),WARNING" ID="0xd8061a83" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="get remote dev addr failed. dev_hdl: %x @connection_manager.c(862),WARNING" ID="0xd8061af3" />
+                       <MSG STRUCTURE="diag_log_msg6" NAME="addr: ****%02x%02x%02x%02x dev_hdl: %08x gap_remove_pair ret(bool): %d @connection_manager.c(871),INFO" ID="0xd8061b3d" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="error dev_hdl: %x pair_ret: %x disconn_ret: %x @connection_manager.c(880),WARNING" ID="0xd8061b83" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: %08x @connection_manager.c(887),INFO" ID="0xd8061bbd" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="conn node is null dev_hdl: %x @connection_manager.c(891),INFO" ID="0xd8061bdd" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="status error dev_hdl: %x status: %d @connection_manager.c(897),INFO" ID="0xd8061c0d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: %08x @connection_manager.c(911),INFO" ID="0xd8061c7d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="get addr fail @connection_manager.c(919),WARNING" ID="0xd8061cbb" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="rmt device is phone @connection_manager.c(926),INFO" ID="0xd8061cf5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="rmt device is not phone @connection_manager.c(929),INFO" ID="0xd8061d0d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="node not exist @connection_manager.c(940),INFO" ID="0xd8061d65" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="success @connection_manager.c(948),INFO" ID="0xd8061da5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="add remote list error! @connection_manager.c(1002),WARNING" ID="0xd8061f53" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="descovery result @connection_manager.c(1028),INFO" ID="0xd8062025" />
+                       <MSG STRUCTURE="diag_log_msg5" NAME="found device addr: ****%02x%02x%02x%02x name: %s @connection_manager.c(1037),INFO" ID="0xd806206d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="gap_get_device_name failed @connection_manager.c(1039),INFO" ID="0xd806207d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="get device name fail @connection_manager.c(1064),WARNING" ID="0xd8062143" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="unhandled msg id: %d @connection_manager.c(1139),WARNING" ID="0xd806239b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="set discovery status to stop @connection_manager.c(1157),INFO" ID="0xd806242d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="unhandled msg id: %d @connection_manager.c(1228),WARNING" ID="0xd8062663" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="show conn list: @connection_manager.c(1249),INFO" ID="0xd806270d" />
+                       <MSG STRUCTURE="diag_log_msg7" NAME="| %-4s | %-32s | %-12s | %-16s | %-16s | %-8s | %-8s | @connection_manager.c(1251),INFO" ID="0xd806271d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="remote is null @connection_manager.c(1259),ERROR" ID="0xd806275a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="addr memcpy_s fail @connection_manager.c(1262),ERROR" ID="0xd8062772" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="name memcpy_s fail @connection_manager.c(1265),ERROR" ID="0xd806278a" />
+                       <MSG STRUCTURE="diag_log_msg10" NAME="| %-4d | %-32s | ****%02x%02x%02x%02x | %-16d | %-16d | %-8d | %-8d | @connection_manager.c(1270),INFO" ID="0xd80627b5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="show conn list end! @connection_manager.c(1275),INFO" ID="0xd80627dd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="show ble conn list: @connection_manager.c(1283),INFO" ID="0xd806281d" />
+                       <MSG STRUCTURE="diag_log_msg9" NAME="| %-4s | %-12s | %-10s | %-8s | %-12s | %-12s | %-12s | %-12s  | %-48s | @connection_manager.c(1288),INFO" ID="0xd8062845" />
+                       <MSG STRUCTURE="diag_log_msg11" NAME="| %-4d | %02x******%02x%02x | %-10d | %-8d | %-12d | %-12d | %-12d | %-12d | %-48s | @connection_manager.c(1301),INFO" ID="0xd80628ad" />
+                       <MSG STRUCTURE="diag_log_msg8" NAME="| %-4s | %-12s | %-10s | %-8s | %-12s | %-12s | %-12s | %-12s  | @connection_manager.c(1308),INFO" ID="0xd80628e5" />
+                       <MSG STRUCTURE="diag_log_msg10" NAME="| %-4d | %02x******%02x%02x | %-10d | %-8d | %-12d | %-12d | %-12d | %-12d | @connection_manager.c(1314),INFO" ID="0xd8062915" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="show ble conn list end! @connection_manager.c(1322),INFO" ID="0xd8062955" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="show link mode: @connection_manager.c(1334),INFO" ID="0xd80629b5" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="| %-4s | %-32s | %-12s | %-16s | @connection_manager.c(1336),INFO" ID="0xd80629c5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="remote is null @connection_manager.c(1345),ERROR" ID="0xd8062a0a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="addr memcpy_s fail @connection_manager.c(1348),ERROR" ID="0xd8062a22" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="name memcpy_s fail @connection_manager.c(1351),ERROR" ID="0xd8062a3a" />
+                       <MSG STRUCTURE="diag_log_msg7" NAME="| %-4d | %-32s | ****%02x%02x%02x%02x | %-16s | @connection_manager.c(1359),INFO" ID="0xd8062a7d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="show link mode end! @connection_manager.c(1364),INFO" ID="0xd8062aa5" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="set scan mode old=%d new=%d @connection_manager.c(1426),INFO" ID="0xd8062c95" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_set_discovery_mode ret: %x @connection_manager.c(1437),INFO" ID="0xd8062ced" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="btsdk_set_discovery_mode mode: %x ret: %x @connection_manager.c(1448),INFO" ID="0xd8062d45" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="already in discovery @connection_manager.c(1470),INFO" ID="0xd8062df5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="bt is not enabled @connection_manager.c(1483),WARNING" ID="0xd8062e5b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="discovery already stopped @connection_manager.c(1488),WARNING" ID="0xd8062e83" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_stop_device_discovery ret=0x%x @connection_manager.c(1493),INFO" ID="0xd8062ead" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="discovery stopped @connection_manager.c(1496),INFO" ID="0xd8062ec5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="not start bt @connection_manager.c(1522),INFO" ID="0xd8062f95" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="param id null @connection_manager.c(1526),INFO" ID="0xd8062fb5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="exist connect audio device @connection_manager.c(1532),INFO" ID="0xd8062fe5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="gap_br_cancel_discovery fail @connection_manager.c(1537),INFO" ID="0xd806300d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_disconnect_acl_by_handle ret: %x @connection_manager.c(1573),INFO" ID="0xd806312d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] gatt client add conn node memcpy fail. @connection_manager.c(1640),ERROR" ID="0xd8063342" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="btsrv connect state change cbk arg NULL! @connection_manager.c(1654),ERROR" ID="0xd80633b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="connect state update memcpy fail. @connection_manager.c(1659),ERROR" ID="0xd80633da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="connect node is null. @connection_manager.c(1675),ERROR" ID="0xd806345a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble smp paired keys cbk param error @connection_manager.c(1694),ERROR" ID="0xd80634f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="paired keys malloc fail. @connection_manager.c(1700),ERROR" ID="0xd8063522" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="paired keys malloc fail. @connection_manager.c(1705),ERROR" ID="0xd806354a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="pair keys notify, keys addr memcpy fail. @connection_manager.c(1710),ERROR" ID="0xd8063572" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="pair keys notify, keys memcpy fail. @connection_manager.c(1717),ERROR" ID="0xd80635aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble smp paired complete cbk param error @connection_manager.c(1734),ERROR" ID="0xd8063632" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="connect param update incomes arg is NULL! @connection_manager.c(1745),ERROR" ID="0xd806368a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="connect param update, conn_node not found. @connection_manager.c(1752),ERROR" ID="0xd80636c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="connect param update,connect_params NULL. @connection_manager.c(1758),ERROR" ID="0xd80636f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="connect param update, addr memcpy fail. @connection_manager.c(1764),ERROR" ID="0xd8063722" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="connect param update done ret:%d. @connection_manager.c(1773),INFO" ID="0xd806376d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="gap_ble_connect_remote_device not start bt @connection_manager.c(1782),INFO" ID="0xd80637b5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="gap_ble_connect_remote_device param id null @connection_manager.c(1786),INFO" ID="0xd80637d5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][INFO] addr memcpy to param fail. @connection_manager.c(1792),INFO" ID="0xd8063805" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv]addr memcpy fail. @connection_manager.c(1810),INFO" ID="0xd8063895" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="addr memcpy_s fail @connection_manager.c(1828),ERROR" ID="0xd8063922" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read remote device rssi, conn_node not found. @connection_manager.c(1849),ERROR" ID="0xd80639ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read remote device rssi fail @connection_manager.c(1854),ERROR" ID="0xd80639f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="conn_node not found. @connection_manager.c(1869),ERROR" ID="0xd8063a6a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="auto reconnect is enabled, close it first. @connection_manager.c(1893),ERROR" ID="0xd8063b2a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @connection_manager.c(1898),ERROR" ID="0xd8063b52" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @connection_manager.c(1902),ERROR" ID="0xd8063b72" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="send msg fail. %x @connection_manager.c(1909),ERROR" ID="0xd8063baa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="send msg connecting success! @connection_manager.c(1913),INFO" ID="0xd8063bcd" />
                        </MSG_LOG>
\ No newline at end of file
index 50d8583..eb9dbcf 100644 (file)
@@ -4,48 +4,48 @@
                        <MSG STRUCTURE="diag_log_msg0" NAME="unsupported color format @display_vau.c(138),ERROR" ID="0xcb200452" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="blend type %d is not supported yet, use BLEND_SRCOVER instead @display_vau.c(169),WARNING" ID="0xcb20054b" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="AllocMem failed. @display_vau.c(182),ERROR" ID="0xcb2005b2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="DispMalloc failed due to handle limit. @display_vau.c(191),ERROR" ID="0xcb2005fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="uapi_vau_wait_for_done failed. @display_vau.c(256),ERROR" ID="0xcb200802" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VauSurface failed @display_vau.c(299),ERROR" ID="0xcb20095a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="uapi_vau_render failure, ret = 0x%x! @display_vau.c(326),ERROR" ID="0xcb200a32" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="uapi_vau_parse_cmp_header failed @display_vau.c(348),ERROR" ID="0xcb200ae2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="unsupported color format @display_vau.c(366),ERROR" ID="0xcb200b72" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Blend type of each image must be same when blitting them together. @display_vau.c(423),ERROR" ID="0xcb200d3a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ConvertVGUImg2VauSurface failed @display_vau.c(427),ERROR" ID="0xcb200d5a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="uapi_vau_compose failure, ret = 0x%x! @display_vau.c(473),ERROR" ID="0xcb200eca" />
-                       <MSG STRUCTURE="diag_log_msg14" NAME="src[%d] w:%u h:%u str:%u fmt:%d cmp:%d rect:[%d,%d,%u,%u] outRect:[%d,%d,%u,%u] @display_vau.c(480),ERROR" ID="0xcb200f02" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="DispMalloc for dstSurface failed! @display_vau.c(537),ERROR" ID="0xcb2010ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="1st render error!!!! @display_vau.c(552),ERROR" ID="0xcb201142" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="2nd render error!!!! @display_vau.c(576),ERROR" ID="0xcb201202" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="invalid cmd num: 0. @display_vau.c(592),ERROR" ID="0xcb201282" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="VGUPathAppendData with invalid path. @display_vau.c(597),ERROR" ID="0xcb2012aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="invalid cmd num: 0. @display_vau.c(613),ERROR" ID="0xcb20132a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="VGUPathAppendData with invalid path. @display_vau.c(618),ERROR" ID="0xcb201352" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="%s: %d memcpy_s failed @display_vau.c(627),ERROR" ID="0xcb20139a" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="%s: %d memcpy_s for cmd failed. @display_vau.c(637),ERROR" ID="0xcb2013ea" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="%s: %d memcpy_s failed @display_vau.c(647),ERROR" ID="0xcb20143a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="Invalid gradient type: %d @display_vau.c(716),ERROR" ID="0xcb201662" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Invalid VGUFillRule. @display_vau.c(734),ERROR" ID="0xcb2016f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="HandlePaintStyle failed. @display_vau.c(739),ERROR" ID="0xcb20171a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Invalid Cap Style! @display_vau.c(759),ERROR" ID="0xcb2017ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Invalid Join Style! @display_vau.c(780),ERROR" ID="0xcb201862" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="HandlePaintStyle failed. @display_vau.c(794),ERROR" ID="0xcb2018d2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="uapi_vau_render failure, ret = 0x%x! @display_vau.c(977),ERROR" ID="0xcb201e8a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="uapi_vau_render failure, ret = 0x%x! @display_vau.c(1044),ERROR" ID="0xcb2020a2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderPath with invalid path. @display_vau.c(1176),ERROR" ID="0xcb2024c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="One of fill and stroke in path attr should be set! @display_vau.c(1181),ERROR" ID="0xcb2024ea" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%d] DispMalloc for tmpTarget1 failed @display_vau.c(1213),ERROR" ID="0xcb2025ea" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%d] DispMalloc for tmpTarget2 failed @display_vau.c(1221),ERROR" ID="0xcb20262a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%d] RenderPathInternal failed @display_vau.c(1227),ERROR" ID="0xcb20265a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%d] RenderPatternInternal failed @display_vau.c(1232),ERROR" ID="0xcb202682" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%d] BlendToSurface failed @display_vau.c(1237),ERROR" ID="0xcb2026aa" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%d] BlendToSurface failed @display_vau.c(1242),ERROR" ID="0xcb2026d2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%d] RenderPathInternal failed @display_vau.c(1269),ERROR" ID="0xcb2027aa" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%d] BlendImgToSurface failed @display_vau.c(1273),ERROR" ID="0xcb2027ca" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="g_hdlLast %lld has not been destroyed, destroy now. @display_vau.c(1319),ERROR" ID="0xcb20293a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="uapi_vau_submit failure, ret = 0x%x! @display_vau.c(1326),ERROR" ID="0xcb202972" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="gFuncs is null @display_vau.c(1338),ERROR" ID="0xcb2029d2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memset_s gFuncs failed @display_vau.c(1344),ERROR" ID="0xcb202a02" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="VGU initializes successfully @display_vau.c(1363),INFO" ID="0xcb202a9d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="VGU uninitializes successfully @display_vau.c(1372),INFO" ID="0xcb202ae5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="DispMalloc failed due to handle limit. @display_vau.c(190),ERROR" ID="0xcb2005f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="uapi_vau_wait_for_done failed. @display_vau.c(255),ERROR" ID="0xcb2007fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VauSurface failed @display_vau.c(298),ERROR" ID="0xcb200952" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="uapi_vau_render failure, ret = 0x%x! @display_vau.c(325),ERROR" ID="0xcb200a2a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="uapi_vau_parse_cmp_header failed @display_vau.c(347),ERROR" ID="0xcb200ada" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="unsupported color format @display_vau.c(365),ERROR" ID="0xcb200b6a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Blend type of each image must be same when blitting them together. @display_vau.c(422),ERROR" ID="0xcb200d32" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ConvertVGUImg2VauSurface failed @display_vau.c(426),ERROR" ID="0xcb200d52" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="uapi_vau_compose failure, ret = 0x%x! @display_vau.c(477),ERROR" ID="0xcb200eea" />
+                       <MSG STRUCTURE="diag_log_msg14" NAME="src[%d] w:%u h:%u str:%u fmt:%d cmp:%d rect:[%d,%d,%u,%u] outRect:[%d,%d,%u,%u] @display_vau.c(484),ERROR" ID="0xcb200f22" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="DispMalloc for dstSurface failed! @display_vau.c(541),ERROR" ID="0xcb2010ea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="1st render error!!!! @display_vau.c(556),ERROR" ID="0xcb201162" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="2nd render error!!!! @display_vau.c(580),ERROR" ID="0xcb201222" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="invalid cmd num: 0. @display_vau.c(596),ERROR" ID="0xcb2012a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="VGUPathAppendData with invalid path. @display_vau.c(601),ERROR" ID="0xcb2012ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="invalid cmd num: 0. @display_vau.c(617),ERROR" ID="0xcb20134a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="VGUPathAppendData with invalid path. @display_vau.c(622),ERROR" ID="0xcb201372" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="%s: %d memcpy_s failed @display_vau.c(631),ERROR" ID="0xcb2013ba" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="%s: %d memcpy_s for cmd failed. @display_vau.c(641),ERROR" ID="0xcb20140a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="%s: %d memcpy_s failed @display_vau.c(651),ERROR" ID="0xcb20145a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="Invalid gradient type: %d @display_vau.c(720),ERROR" ID="0xcb201682" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Invalid VGUFillRule. @display_vau.c(738),ERROR" ID="0xcb201712" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="HandlePaintStyle failed. @display_vau.c(743),ERROR" ID="0xcb20173a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Invalid Cap Style! @display_vau.c(763),ERROR" ID="0xcb2017da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Invalid Join Style! @display_vau.c(784),ERROR" ID="0xcb201882" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="HandlePaintStyle failed. @display_vau.c(798),ERROR" ID="0xcb2018f2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="uapi_vau_render failure, ret = 0x%x! @display_vau.c(981),ERROR" ID="0xcb201eaa" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="uapi_vau_render failure, ret = 0x%x! @display_vau.c(1048),ERROR" ID="0xcb2020c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderPath with invalid path. @display_vau.c(1185),ERROR" ID="0xcb20250a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="One of fill and stroke in path attr should be set! @display_vau.c(1190),ERROR" ID="0xcb202532" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%d] DispMalloc for tmpTarget1 failed @display_vau.c(1222),ERROR" ID="0xcb202632" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%d] DispMalloc for tmpTarget2 failed @display_vau.c(1230),ERROR" ID="0xcb202672" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%d] RenderPathInternal failed @display_vau.c(1237),ERROR" ID="0xcb2026aa" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%d] RenderPatternInternal failed @display_vau.c(1242),ERROR" ID="0xcb2026d2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%d] BlendToSurface failed @display_vau.c(1247),ERROR" ID="0xcb2026fa" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%d] BlendToSurface failed @display_vau.c(1252),ERROR" ID="0xcb202722" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%d] RenderPathInternal failed @display_vau.c(1279),ERROR" ID="0xcb2027fa" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%d] BlendImgToSurface failed @display_vau.c(1283),ERROR" ID="0xcb20281a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="g_hdlLast %lld has not been destroyed, destroy now. @display_vau.c(1329),ERROR" ID="0xcb20298a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="uapi_vau_submit failure, ret = 0x%x! @display_vau.c(1336),ERROR" ID="0xcb2029c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="gFuncs is null @display_vau.c(1348),ERROR" ID="0xcb202a22" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memset_s gFuncs failed @display_vau.c(1354),ERROR" ID="0xcb202a52" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="VGU initializes successfully @display_vau.c(1373),INFO" ID="0xcb202aed" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="VGU uninitializes successfully @display_vau.c(1382),INFO" ID="0xcb202b35" />
                        </MSG_LOG>
\ No newline at end of file
index 36ff0e5..9b33e8b 100644 (file)
                        <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] InstallAllSystemBundle InitAllAppInfo fail, list is nullptr @gt_bundle_manager_service.cpp(318),ERROR" ID="0xe04409f2" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="VINCENTSS::GtManagerService::ScanPackages = %s @gt_bundle_manager_service.cpp(376),INFO" ID="0xe0440bc5" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] ScanSystemApp InitAllAppInfo fail, list is nullptr @gt_bundle_manager_service.cpp(419),ERROR" ID="0xe0440d1a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] memset fail when initialize bundle name! @gt_bundle_manager_service.cpp(489),ERROR" ID="0xe0440f4a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] failed to copy bundle name! @gt_bundle_manager_service.cpp(494),ERROR" ID="0xe0440f72" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] malloc fail when reload third app! @gt_bundle_manager_service.cpp(504),ERROR" ID="0xe0440fc2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] strcat fail when reload third app! @gt_bundle_manager_service.cpp(509),ERROR" ID="0xe0440fea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] app path is not dir when reload third app! @gt_bundle_manager_service.cpp(515),ERROR" ID="0xe044101a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] app path is not third bundle path! @gt_bundle_manager_service.cpp(521),INFO" ID="0xe044104d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] third bundle reload number is to MAX_THIRD_BUNDLE_NUMBER! @gt_bundle_manager_service.cpp(528),INFO" ID="0xe0441085" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] parse bundle attr fail! @gt_bundle_manager_service.cpp(574),ERROR" ID="0xe04411f2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] reload bundle info fail!, isSystemApp is %d @gt_bundle_manager_service.cpp(689),ERROR" ID="0xe044158a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] get installRecord fail when restart! @gt_bundle_manager_service.cpp(745),ERROR" ID="0xe044174a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] TransformJsToBcWhenRestart jsEngineVer_ is nullptr! @gt_bundle_manager_service.cpp(752),ERROR" ID="0xe0441782" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] create string object fail when restart! @gt_bundle_manager_service.cpp(760),ERROR" ID="0xe04417c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] add js engine version record fail when restart! @gt_bundle_manager_service.cpp(775),ERROR" ID="0xe044183a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] refresh js engine version fail when restart! @gt_bundle_manager_service.cpp(783),ERROR" ID="0xe044187a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] transform js to bc, result is %d @gt_bundle_manager_service.cpp(810),INFO" ID="0xe0441955" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] delete byte code, result is %d @gt_bundle_manager_service.cpp(813),INFO" ID="0xe044196d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] add transform result record fail when restart! @gt_bundle_manager_service.cpp(826),ERROR" ID="0xe04419d2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] refresh transform result record fail when restart! @gt_bundle_manager_service.cpp(832),ERROR" ID="0xe0441a02" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] memset fail when initialize bundle name! @gt_bundle_manager_service.cpp(504),ERROR" ID="0xe0440fc2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] failed to copy bundle name! @gt_bundle_manager_service.cpp(513),ERROR" ID="0xe044100a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] malloc fail when reload third app! @gt_bundle_manager_service.cpp(528),ERROR" ID="0xe0441082" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] strcat fail when reload third app! @gt_bundle_manager_service.cpp(537),ERROR" ID="0xe04410ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] app path is not dir when reload third app! @gt_bundle_manager_service.cpp(547),ERROR" ID="0xe044111a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] app path is not third bundle path! @gt_bundle_manager_service.cpp(553),INFO" ID="0xe044114d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] third bundle reload number is to MAX_THIRD_BUNDLE_NUMBER! @gt_bundle_manager_service.cpp(560),INFO" ID="0xe0441185" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] parse bundle attr fail! @gt_bundle_manager_service.cpp(611),ERROR" ID="0xe044131a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] reload bundle info fail!, isSystemApp is %d @gt_bundle_manager_service.cpp(726),ERROR" ID="0xe04416b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] get installRecord fail when restart! @gt_bundle_manager_service.cpp(782),ERROR" ID="0xe0441872" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] TransformJsToBcWhenRestart jsEngineVer_ is nullptr! @gt_bundle_manager_service.cpp(789),ERROR" ID="0xe04418aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] create string object fail when restart! @gt_bundle_manager_service.cpp(797),ERROR" ID="0xe04418ea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] add js engine version record fail when restart! @gt_bundle_manager_service.cpp(812),ERROR" ID="0xe0441962" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] refresh js engine version fail when restart! @gt_bundle_manager_service.cpp(820),ERROR" ID="0xe04419a2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] transform js to bc, result is %d @gt_bundle_manager_service.cpp(847),INFO" ID="0xe0441a7d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] delete byte code, result is %d @gt_bundle_manager_service.cpp(850),INFO" ID="0xe0441a95" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] add transform result record fail when restart! @gt_bundle_manager_service.cpp(863),ERROR" ID="0xe0441afa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] refresh transform result record fail when restart! @gt_bundle_manager_service.cpp(869),ERROR" ID="0xe0441b2a" />
                        </MSG_LOG>
\ No newline at end of file
index d6361bb..5b59b0c 100644 (file)
@@ -1,9 +1,9 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="replace async failed with null input parameter @js_router.cpp(31),ERROR" ID="0xe11600fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="router is replacing, can not handle the new request @js_router.cpp(43),ERROR" ID="0xe116015a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc state machine memory heap failed. @js_router.cpp(48),ERROR" ID="0xe1160182" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="dispatch replacing request failed @js_router.cpp(64),ERROR" ID="0xe1160202" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="replace sync failed, new sm should be prepared @js_router.cpp(78),ERROR" ID="0xe1160272" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="the whole application is in background, move to HIDE state directly @js_router.cpp(94),DBG" ID="0xe11602f6" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="no SM when performing show @js_router.cpp(110),ERROR" ID="0xe1160372" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="no SM when performing background @js_router.cpp(122),ERROR" ID="0xe11603d2" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="replace async failed with null input parameter @js_router.cpp(32),ERROR" ID="0xe1160102" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="router is replacing, can not handle the new request @js_router.cpp(44),ERROR" ID="0xe1160162" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc state machine memory heap failed. @js_router.cpp(49),ERROR" ID="0xe116018a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="dispatch replacing request failed @js_router.cpp(65),ERROR" ID="0xe116020a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="replace sync failed, new sm should be prepared @js_router.cpp(79),ERROR" ID="0xe116027a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="the whole application is in background, move to HIDE state directly @js_router.cpp(97),DBG" ID="0xe116030e" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="no SM when performing show @js_router.cpp(113),ERROR" ID="0xe116038a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="no SM when performing background @js_router.cpp(125),ERROR" ID="0xe11603ea" />
                        </MSG_LOG>
\ No newline at end of file
index 36429c1..f6f2241 100644 (file)
@@ -1,26 +1,26 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for data failed. @kaleidoscope_utils.cpp(31),ERROR" ID="0xcb4200fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="kaleidoscopeInfo_ is not nullptr @kaleidoscope_utils.cpp(48),ERROR" ID="0xcb420182" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc for kaleidoscopeInfo_ failed! @kaleidoscope_utils.cpp(54),ERROR" ID="0xcb4201b2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc for data failed. @kaleidoscope_utils.cpp(66),ERROR" ID="0xcb420212" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="dst-&gt;info.data is nullptr @kaleidoscope_utils.cpp(78),ERROR" ID="0xcb420272" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="size does not match: src[%u, %u], dst[%u, %u]. @kaleidoscope_utils.cpp(85),ERROR" ID="0xcb4202aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc for sectorPath cmds failed. @kaleidoscope_utils.cpp(101),ERROR" ID="0xcb42032a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc for sectorPath data failed. @kaleidoscope_utils.cpp(106),ERROR" ID="0xcb420352" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc for imgPath cmds failed. @kaleidoscope_utils.cpp(114),ERROR" ID="0xcb420392" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc for imgPath data failed. @kaleidoscope_utils.cpp(129),ERROR" ID="0xcb42040a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc for partialInfo_ failed. @kaleidoscope_utils.cpp(152),ERROR" ID="0xcb4204c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc for partial info data failed. @kaleidoscope_utils.cpp(164),ERROR" ID="0xcb420522" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="src or src-&gt;data is null. @kaleidoscope_utils.cpp(217),ERROR" ID="0xcb4206ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc for imgInfo_ failed. @kaleidoscope_utils.cpp(224),ERROR" ID="0xcb420702" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy imgInfo_ failed. @kaleidoscope_utils.cpp(230),ERROR" ID="0xcb420732" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="InitKaleidoscopeInfo failed. @kaleidoscope_utils.cpp(236),ERROR" ID="0xcb420762" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="InitInnerPath failed. @kaleidoscope_utils.cpp(243),ERROR" ID="0xcb42079a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="InitPartialInfo failed. @kaleidoscope_utils.cpp(251),ERROR" ID="0xcb4207da" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ConstructPartial failed. UpdateImageInfoIfNecessary failed. @kaleidoscope_utils.cpp(325),ERROR" ID="0xcb420a2a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="kaleidoscopeInfo_ or partialInfo_ is nullptr. @kaleidoscope_utils.cpp(426),ERROR" ID="0xcb420d52" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="kaleidoscopeInfo_ or kaleidoscopeInfo_-&gt;info.data is nullptr. @kaleidoscope_utils.cpp(449),ERROR" ID="0xcb420e0a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ConstructPartial failed. @kaleidoscope_utils.cpp(456),ERROR" ID="0xcb420e42" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="UpdateKaleidoscopeImgInfo failed, because isInternalMem_ is false. @kaleidoscope_utils.cpp(465),ERROR" ID="0xcb420e8a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="UpdateKaleidoscopeImgInfo failed, because addr is nullptr. @kaleidoscope_utils.cpp(470),ERROR" ID="0xcb420eb2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="UpdateKaleidoscopeImgInfo failed, because kaleidoscopeInfo_ is nullptr. @kaleidoscope_utils.cpp(475),ERROR" ID="0xcb420eda" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for data failed. @kaleidoscope_utils.cpp(32),ERROR" ID="0xcb440102" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="kaleidoscopeInfo_ is not nullptr @kaleidoscope_utils.cpp(68),ERROR" ID="0xcb440222" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc for kaleidoscopeInfo_ failed! @kaleidoscope_utils.cpp(74),ERROR" ID="0xcb440252" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc for data failed. @kaleidoscope_utils.cpp(87),ERROR" ID="0xcb4402ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="dst-&gt;info.data is nullptr @kaleidoscope_utils.cpp(100),ERROR" ID="0xcb440322" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="size does not match: src[%u, %u], dst[%u, %u]. @kaleidoscope_utils.cpp(107),ERROR" ID="0xcb44035a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc for sectorPath cmds failed. @kaleidoscope_utils.cpp(123),ERROR" ID="0xcb4403da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc for sectorPath data failed. @kaleidoscope_utils.cpp(128),ERROR" ID="0xcb440402" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc for imgPath cmds failed. @kaleidoscope_utils.cpp(136),ERROR" ID="0xcb440442" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc for imgPath data failed. @kaleidoscope_utils.cpp(151),ERROR" ID="0xcb4404ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc for partialInfo_ failed. @kaleidoscope_utils.cpp(174),ERROR" ID="0xcb440572" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc for partial info data failed. @kaleidoscope_utils.cpp(186),ERROR" ID="0xcb4405d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="src or src-&gt;data is null. @kaleidoscope_utils.cpp(240),ERROR" ID="0xcb440782" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc for imgInfo_ failed. @kaleidoscope_utils.cpp(247),ERROR" ID="0xcb4407ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy imgInfo_ failed. @kaleidoscope_utils.cpp(253),ERROR" ID="0xcb4407ea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="InitKaleidoscopeInfo failed. @kaleidoscope_utils.cpp(259),ERROR" ID="0xcb44081a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="InitInnerPath failed. @kaleidoscope_utils.cpp(266),ERROR" ID="0xcb440852" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="InitPartialInfo failed. @kaleidoscope_utils.cpp(274),ERROR" ID="0xcb440892" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ConstructPartial failed. UpdateImageInfoIfNecessary failed. @kaleidoscope_utils.cpp(352),ERROR" ID="0xcb440b02" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="kaleidoscopeInfo_ or partialInfo_ is nullptr. @kaleidoscope_utils.cpp(452),ERROR" ID="0xcb440e22" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="kaleidoscopeInfo_ or kaleidoscopeInfo_-&gt;info.data is nullptr. @kaleidoscope_utils.cpp(475),ERROR" ID="0xcb440eda" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ConstructPartial failed. @kaleidoscope_utils.cpp(482),ERROR" ID="0xcb440f12" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="UpdateKaleidoscopeImgInfo failed, because isInternalMem_ is false. @kaleidoscope_utils.cpp(491),ERROR" ID="0xcb440f5a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="UpdateKaleidoscopeImgInfo failed, because addr is nullptr. @kaleidoscope_utils.cpp(496),ERROR" ID="0xcb440f82" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="UpdateKaleidoscopeImgInfo failed, because kaleidoscopeInfo_ is nullptr. @kaleidoscope_utils.cpp(501),ERROR" ID="0xcb440faa" />
                        </MSG_LOG>
\ No newline at end of file
index 96e4372..6335574 100644 (file)
@@ -1,33 +1,38 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="unsupported BlendMode: %u. @lite_m_gfx_engine.cpp(75),ERROR" ID="0xcb10025a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="unsupported color format: %d @lite_m_gfx_engine.cpp(119),ERROR" ID="0xcb1003ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUCap failed! Invalid Capstyle! @lite_m_gfx_engine.cpp(132),ERROR" ID="0xcb100422" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(163),ERROR" ID="0xcb10051a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Fill operation failed. @lite_m_gfx_engine.cpp(194),ERROR" ID="0xcb100612" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="font weight %u was not support @lite_m_gfx_engine.cpp(306),ERROR" ID="0xcb100992" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="VGUPathAppendData failed. @lite_m_gfx_engine.cpp(347),ERROR" ID="0xcb100ada" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="VGUPathSetData failed. @lite_m_gfx_engine.cpp(358),ERROR" ID="0xcb100b32" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(385),ERROR" ID="0xcb100c0a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderPath failed. Sync previous task. @lite_m_gfx_engine.cpp(397),ERROR" ID="0xcb100c6a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(418),ERROR" ID="0xcb100d12" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderPath failed. Sync previous task. @lite_m_gfx_engine.cpp(430),ERROR" ID="0xcb100d72" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(446),ERROR" ID="0xcb100df2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderPath failed. Sync previous task. @lite_m_gfx_engine.cpp(473),ERROR" ID="0xcb100eca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(496),ERROR" ID="0xcb100f82" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderPath failed. Sync previous task. @lite_m_gfx_engine.cpp(509),ERROR" ID="0xcb100fea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(619),ERROR" ID="0xcb10135a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(646),ERROR" ID="0xcb101432" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderBlur failed! @lite_m_gfx_engine.cpp(668),ERROR" ID="0xcb1014e2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderBlit failed! @lite_m_gfx_engine.cpp(735),ERROR" ID="0xcb1016fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="DrawTransform failed. Software can only process uncompressed data. @lite_m_gfx_engine.cpp(770),ERROR" ID="0xcb101812" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="vguFuncs_ is null! @lite_m_gfx_engine.cpp(825),ERROR" ID="0xcb1019ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="InitVgu or RenderClearRect is null! @lite_m_gfx_engine.cpp(829),ERROR" ID="0xcb1019ea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="VGUPathInit, VGUPathAppendData, VGUPathClear or RenderPath is nullptr! @lite_m_gfx_engine.cpp(836),ERROR" ID="0xcb101a22" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="VGUPathInit, VGUPathAppendData, VGUPathClear or RenderPath is nullptr! @lite_m_gfx_engine.cpp(842),ERROR" ID="0xcb101a52" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="InitVgu failed! @lite_m_gfx_engine.cpp(847),ERROR" ID="0xcb101a7a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="vguFuncs_ is null! @lite_m_gfx_engine.cpp(858),INFO" ID="0xcb101ad5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="DeinitVgu failed! @lite_m_gfx_engine.cpp(863),ERROR" ID="0xcb101afa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="AllocBuffer failed. @lite_m_gfx_engine.cpp(882),ERROR" ID="0xcb101b92" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="unsupported PixelFormat: %d @lite_m_gfx_engine.cpp(909),ERROR" ID="0xcb101c6a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="bufferInfo_ is not inited. @lite_m_gfx_engine.cpp(1014),ERROR" ID="0xcb101fb2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="set value: %d @lite_m_gfx_engine.cpp(1068),DBG" ID="0xcb102166" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="unsupported BlendMode: %u. @lite_m_gfx_engine.cpp(76),ERROR" ID="0xcb100262" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="unsupported color format: %d @lite_m_gfx_engine.cpp(120),ERROR" ID="0xcb1003c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUCap failed! Invalid Capstyle! @lite_m_gfx_engine.cpp(133),ERROR" ID="0xcb10042a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(173),ERROR" ID="0xcb10056a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Fill operation failed. @lite_m_gfx_engine.cpp(204),ERROR" ID="0xcb100662" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="open image path failed. @lite_m_gfx_engine.cpp(320),ERROR" ID="0xcb100a02" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for cmd failed. @lite_m_gfx_engine.cpp(421),ERROR" ID="0xcb100d2a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="font weight %u was not support @lite_m_gfx_engine.cpp(477),ERROR" ID="0xcb100eea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="VGUPathAppendData failed. @lite_m_gfx_engine.cpp(518),ERROR" ID="0xcb101032" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="VGUPathSetData failed. @lite_m_gfx_engine.cpp(529),ERROR" ID="0xcb10108a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(549),ERROR" ID="0xcb10112a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderPath failed. Sync previous task. @lite_m_gfx_engine.cpp(561),ERROR" ID="0xcb10118a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(582),ERROR" ID="0xcb101232" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderPath failed. Sync previous task. @lite_m_gfx_engine.cpp(594),ERROR" ID="0xcb101292" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(610),ERROR" ID="0xcb101312" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderPath failed. Sync previous task. @lite_m_gfx_engine.cpp(637),ERROR" ID="0xcb1013ea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(660),ERROR" ID="0xcb1014a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderPath failed. Sync previous task. @lite_m_gfx_engine.cpp(673),ERROR" ID="0xcb10150a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(787),ERROR" ID="0xcb10189a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(814),ERROR" ID="0xcb101972" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderBlur failed! @lite_m_gfx_engine.cpp(836),ERROR" ID="0xcb101a22" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderBlit failed! @lite_m_gfx_engine.cpp(903),ERROR" ID="0xcb101c3a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="DrawTransform failed. Software can only process uncompressed data. @lite_m_gfx_engine.cpp(938),ERROR" ID="0xcb101d52" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for cmd failed. @lite_m_gfx_engine.cpp(1019),ERROR" ID="0xcb101fda" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="vguFuncs_ is null! @lite_m_gfx_engine.cpp(1048),ERROR" ID="0xcb1020c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="InitVgu or RenderClearRect is null! @lite_m_gfx_engine.cpp(1052),ERROR" ID="0xcb1020e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="VGUPathInit, VGUPathAppendData, VGUPathClear or RenderPath is nullptr! @lite_m_gfx_engine.cpp(1059),ERROR" ID="0xcb10211a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="VGUPathInit, VGUPathAppendData, VGUPathClear or RenderPath is nullptr! @lite_m_gfx_engine.cpp(1065),ERROR" ID="0xcb10214a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="InitVgu failed! @lite_m_gfx_engine.cpp(1070),ERROR" ID="0xcb102172" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="vguFuncs_ is null! @lite_m_gfx_engine.cpp(1081),INFO" ID="0xcb1021cd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="DeinitVgu failed! @lite_m_gfx_engine.cpp(1086),ERROR" ID="0xcb1021f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="AllocBuffer failed. @lite_m_gfx_engine.cpp(1105),ERROR" ID="0xcb10228a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="unsupported PixelFormat: %d @lite_m_gfx_engine.cpp(1132),ERROR" ID="0xcb102362" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="bufferInfo_ is not inited. @lite_m_gfx_engine.cpp(1237),ERROR" ID="0xcb1026aa" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="set value: %d @lite_m_gfx_engine.cpp(1291),DBG" ID="0xcb10285e" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for cmd failed. @lite_m_gfx_engine.cpp(1333),ERROR" ID="0xcb1029aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Obtain RoundRect Path failed. @lite_m_gfx_engine.cpp(1383),ERROR" ID="0xcb102b3a" />
                        </MSG_LOG>
\ No newline at end of file
index 009013e..f47f970 100644 (file)
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="list node create fail! @local_device_manager.c(127),ERROR" ID="0xd80803fa" />
-                       <MSG STRUCTURE="diag_log_msg6" NAME="generate addr: ****%02x%02x%02x%02x name: %s sp-ret: %d @local_device_manager.c(253),INFO" ID="0xd80807ed" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="local dev info write error! ret 0x%x @local_device_manager.c(278),ERROR" ID="0xd80808b2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="deinit bt stack @local_device_manager.c(309),INFO" ID="0xd80809ad" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(385),ERROR" ID="0xd8080c0a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] ble gap conn state change fail. @local_device_manager.c(412),ERROR" ID="0xd8080ce2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] ble gap conn addr memcpy fail. @local_device_manager.c(421),ERROR" ID="0xd8080d2a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble smp can not find connect node by handle @local_device_manager.c(450),ERROR" ID="0xd8080e12" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] ble gap conn addr memcpy fail. @local_device_manager.c(459),ERROR" ID="0xd8080e5a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(482),ERROR" ID="0xd8080f12" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble enable err,B core may be not calibration end and not notify A Core  @local_device_manager.c(508),ERROR" ID="0xd8080fe2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt init err ret = %08x @local_device_manager.c(540),ERROR" ID="0xd80810e2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="unhandled msg id %x @local_device_manager.c(626),WARNING" ID="0xd8081393" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="unhandled msg id %x @local_device_manager.c(649),WARNING" ID="0xd808144b" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="inquiry complete @local_device_manager.c(657),INFO" ID="0xd808148d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl:0x%08x @local_device_manager.c(664),INFO" ID="0xd80814c5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl:0x%08x @local_device_manager.c(678),INFO" ID="0xd8081535" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="btsrv_connection_request_ind_callback: memecpy error @local_device_manager.c(692),ERROR" ID="0xd80815a2" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="addr:****%02x%02x%02x%02x @local_device_manager.c(697),INFO" ID="0xd80815cd" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl:0x%08x @local_device_manager.c(707),INFO" ID="0xd808161d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s errr @local_device_manager.c(722),ERROR" ID="0xd8081692" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc errr @local_device_manager.c(736),ERROR" ID="0xd8081702" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s errr @local_device_manager.c(742),ERROR" ID="0xd8081732" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc errr @local_device_manager.c(771),ERROR" ID="0xd808181a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s errr @local_device_manager.c(777),ERROR" ID="0xd808184a" />
-                       <MSG STRUCTURE="diag_log_msg8" NAME="conn_hdl: %08x event: %04x role: %x result: %x dev_hdl: %x svc_hdl: %x svc_class: %x duration: %d @local_device_manager.c(791),INFO" ID="0xd80818bd" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="received_bytes: %d sent_bytes: %d @local_device_manager.c(796),INFO" ID="0xd80818e5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="unhandled service class 0x%x @local_device_manager.c(822),WARNING" ID="0xd80819b3" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x num_value: %06d @local_device_manager.c(845),INFO" ID="0xd8081a6d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: 0x%08x @local_device_manager.c(852),INFO" ID="0xd8081aa5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: 0x%08x @local_device_manager.c(859),INFO" ID="0xd8081add" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x num_value: %06d @local_device_manager.c(865),INFO" ID="0xd8081b0d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x reason: %x @local_device_manager.c(879),INFO" ID="0xd8081b7d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="white_list_size:%d  @local_device_manager.c(885),INFO" ID="0xd8081bad" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="transmit_power_level:%d  @local_device_manager.c(890),INFO" ID="0xd8081bd5" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="register err id: %x ret: %x @local_device_manager.c(921),ERROR" ID="0xd8081cca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="bt enable err,B core may be not calibration end and not notify A Core  @local_device_manager.c(961),ERROR" ID="0xd8081e0a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt_init err ret = %08x @local_device_manager.c(988),ERROR" ID="0xd8081ee2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="buff is't long enough, need length:%d. @local_device_manager.c(1095),ERROR" ID="0xd808223a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="get local name memcpy fail. @local_device_manager.c(1099),ERROR" ID="0xd808225a" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="name: %s, length: %d @local_device_manager.c(1108),INFO" ID="0xd80822a5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="failed: bt not enabled @local_device_manager.c(1123),INFO" ID="0xd808231d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="local name null or length not match, len: %d @local_device_manager.c(1127),INFO" ID="0xd808233d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="returns error ret: %x @local_device_manager.c(1133),WARNING" ID="0xd808236b" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="set result name: &quot;%s&quot; name_len: %d get_re: %x @local_device_manager.c(1139),INFO" ID="0xd808239d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="gap_remove_all_pairs fail @local_device_manager.c(1199),ERROR" ID="0xd808257a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="gap ble remove all pairs fail @local_device_manager.c(1205),ERROR" ID="0xd80825aa" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="diable_bt_ret(errcode_t): %x @local_device_manager.c(1212),INFO" ID="0xd80825e5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="disable_ble_ret(errcode_t): %x @local_device_manager.c(1217),INFO" ID="0xd808260d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="set discovery data pointer is null. @local_device_manager.c(1248),ERROR" ID="0xd8082702" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="adv_id(%d) advertising, please stop first. @local_device_manager.c(1266),ERROR" ID="0xd8082792" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="adv data alloc faild, length:%d @local_device_manager.c(1279),ERROR" ID="0xd80827fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap_ble_set_adv_data adv data memcpy_s fail @local_device_manager.c(1283),ERROR" ID="0xd808281a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="scan rsp data alloc faild, length:%d @local_device_manager.c(1292),ERROR" ID="0xd8082862" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap_ble_set_adv_data scan rsp data memcpy_s fail @local_device_manager.c(1296),ERROR" ID="0xd8082882" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="adv_id(%d) advertising, please stop first. @local_device_manager.c(1335),ERROR" ID="0xd80829ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap ble set adv param memcpy_s fail @local_device_manager.c(1347),ERROR" ID="0xd8082a1a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap ble set adv param memcpy_s fail @local_device_manager.c(1361),ERROR" ID="0xd8082a8a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap set sec param error param NULL @local_device_manager.c(1383),ERROR" ID="0xd8082b3a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap set sec param error param NULL @local_device_manager.c(1388),ERROR" ID="0xd8082b62" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="bt has page scanning enabled. @local_device_manager.c(1412),ERROR" ID="0xd8082c22" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="bt has an ACL connection. @local_device_manager.c(1418),ERROR" ID="0xd8082c52" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[CTKD] please set ble secure connection enable,current_sc=%d. @local_device_manager.c(1435),ERROR" ID="0xd8082cda" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BT] flow limit range is [3072-10240] bytes. @local_device_manager.c(1453),ERROR" ID="0xd8082d6a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap set adv data memcpy_s fail @local_device_manager.c(1472),ERROR" ID="0xd8082e02" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap set scan rsp data memcpy_s fail @local_device_manager.c(1479),ERROR" ID="0xd8082e3a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] btsrv_gap_set_adv_param memcpy_s fail @local_device_manager.c(1498),ERROR" ID="0xd8082ed2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap set adv param memcpy_s fail @local_device_manager.c(1503),ERROR" ID="0xd8082efa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt malloc fail @local_device_manager.c(1541),ERROR" ID="0xd808302a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt memcpy fail @local_device_manager.c(1546),ERROR" ID="0xd8083052" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt memcpy fail @local_device_manager.c(1552),ERROR" ID="0xd8083082" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt malloc fail @local_device_manager.c(1563),ERROR" ID="0xd80830da" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt memcpy fail @local_device_manager.c(1568),ERROR" ID="0xd8083102" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap adv set terminated cbk param error @local_device_manager.c(1588),ERROR" ID="0xd80831a2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble enable cbk param error @local_device_manager.c(1599),ERROR" ID="0xd80831fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble read remote rssi cbk param error @local_device_manager.c(1610),ERROR" ID="0xd8083252" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble conn param update cbk param error @local_device_manager.c(1626),ERROR" ID="0xd80832d2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap conn param malloc fail @local_device_manager.c(1640),ERROR" ID="0xd8083342" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="ble conn param update cbk interval:%x, latency:%x, timeout:%x @local_device_manager.c(1647),INFO" ID="0xd808337d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(1681),ERROR" ID="0xd808348a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="adv id(%d) is discoverying, please stop first. @local_device_manager.c(1685),ERROR" ID="0xd80834aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="adv param alloc fail @local_device_manager.c(1694),ERROR" ID="0xd80834f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(1727),ERROR" ID="0xd80835fa" />
-                       <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(1733),ERROR" ID="0xd808362a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="mc sdk ble stop adv atb failed  @local_device_manager.c(1739),ERROR" ID="0xd808365a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="scanning in process, please stop first. @local_device_manager.c(1773),ERROR" ID="0xd808376a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="scanning already stopped. @local_device_manager.c(1806),ERROR" ID="0xd8083872" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble stop extern scan ret: %#x @local_device_manager.c(1810),INFO" ID="0xd8083895" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set phy node == NULL @local_device_manager.c(1833),ERROR" ID="0xd808394a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set phy memcpy fail @local_device_manager.c(1838),ERROR" ID="0xd8083972" />
-                       <MSG STRUCTURE="diag_log_msg5" NAME="ble general set phy hdl:%x all:%x rx:%x tx:%x op:%x. @local_device_manager.c(1846),INFO" ID="0xd80839b5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble set phy ret: %#x @local_device_manager.c(1849),ERROR" ID="0xd80839ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set data length node == NULL @local_device_manager.c(1870),ERROR" ID="0xd8083a72" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set data length memcpy fail @local_device_manager.c(1876),ERROR" ID="0xd8083aa2" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="ble general set len hdl:%x maxoct:%x maxtime:%x @local_device_manager.c(1883),INFO" ID="0xd8083add" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble set len ret: %#x @local_device_manager.c(1886),ERROR" ID="0xd8083af2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bts sert log type levle:%x @local_device_manager.c(1904),INFO" ID="0xd8083b85" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="g_bts_feature_bitmap bt_auto_reconnect_closed:%d. @local_device_manager.c(1925),ERROR" ID="0xd8083c2a" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="list node create fail! @local_device_manager.c(129),ERROR" ID="0xd808040a" />
+                       <MSG STRUCTURE="diag_log_msg6" NAME="generate addr: ****%02x%02x%02x%02x name: %s sp-ret: %d @local_device_manager.c(255),INFO" ID="0xd80807fd" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="local dev info write error! ret 0x%x @local_device_manager.c(280),ERROR" ID="0xd80808c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="deinit bt stack @local_device_manager.c(311),INFO" ID="0xd80809bd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(387),ERROR" ID="0xd8080c1a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] ble gap conn state change fail. @local_device_manager.c(414),ERROR" ID="0xd8080cf2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] ble gap conn addr memcpy fail. @local_device_manager.c(423),ERROR" ID="0xd8080d3a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble smp can not find connect node by handle @local_device_manager.c(452),ERROR" ID="0xd8080e22" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] ble gap conn addr memcpy fail. @local_device_manager.c(461),ERROR" ID="0xd8080e6a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(484),ERROR" ID="0xd8080f22" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble enable err,B core may be not calibration end and not notify A Core  @local_device_manager.c(510),ERROR" ID="0xd8080ff2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt init err ret = %08x @local_device_manager.c(542),ERROR" ID="0xd80810f2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="unhandled msg id %x @local_device_manager.c(628),WARNING" ID="0xd80813a3" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="unhandled msg id %x @local_device_manager.c(651),WARNING" ID="0xd808145b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="inquiry complete @local_device_manager.c(659),INFO" ID="0xd808149d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl:0x%08x @local_device_manager.c(666),INFO" ID="0xd80814d5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl:0x%08x @local_device_manager.c(680),INFO" ID="0xd8081545" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="btsrv_connection_request_ind_callback: memecpy error @local_device_manager.c(694),ERROR" ID="0xd80815b2" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="addr:****%02x%02x%02x%02x @local_device_manager.c(699),INFO" ID="0xd80815dd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="btsrv connection reject notify callback: memecpy error @local_device_manager.c(711),ERROR" ID="0xd808163a" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="addr:****%02x%02x%02x%02x @local_device_manager.c(716),INFO" ID="0xd8081665" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl:0x%08x @local_device_manager.c(726),INFO" ID="0xd80816b5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s errr @local_device_manager.c(741),ERROR" ID="0xd808172a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc errr @local_device_manager.c(755),ERROR" ID="0xd808179a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s errr @local_device_manager.c(761),ERROR" ID="0xd80817ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc errr @local_device_manager.c(790),ERROR" ID="0xd80818b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s errr @local_device_manager.c(796),ERROR" ID="0xd80818e2" />
+                       <MSG STRUCTURE="diag_log_msg8" NAME="conn_hdl: %08x event: %04x role: %x result: %x dev_hdl: %x svc_hdl: %x svc_class: %x duration: %d @local_device_manager.c(810),INFO" ID="0xd8081955" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="received_bytes: %d sent_bytes: %d @local_device_manager.c(815),INFO" ID="0xd808197d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="unhandled service class 0x%x @local_device_manager.c(841),WARNING" ID="0xd8081a4b" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x num_value: %06d @local_device_manager.c(864),INFO" ID="0xd8081b05" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: 0x%08x @local_device_manager.c(871),INFO" ID="0xd8081b3d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: 0x%08x @local_device_manager.c(878),INFO" ID="0xd8081b75" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x num_value: %06d @local_device_manager.c(884),INFO" ID="0xd8081ba5" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x reason: %x @local_device_manager.c(898),INFO" ID="0xd8081c15" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="white_list_size:%d  @local_device_manager.c(904),INFO" ID="0xd8081c45" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="transmit_power_level:%d  @local_device_manager.c(909),INFO" ID="0xd8081c6d" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="register err id: %x ret: %x @local_device_manager.c(941),ERROR" ID="0xd8081d6a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="bt enable err,B core may be not calibration end and not notify A Core  @local_device_manager.c(981),ERROR" ID="0xd8081eaa" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt_init err ret = %08x @local_device_manager.c(1008),ERROR" ID="0xd8081f82" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="buff is't long enough, need length:%d. @local_device_manager.c(1115),ERROR" ID="0xd80822da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="get local name memcpy fail. @local_device_manager.c(1119),ERROR" ID="0xd80822fa" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="name: %s, length: %d @local_device_manager.c(1128),INFO" ID="0xd8082345" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="failed: bt not enabled @local_device_manager.c(1143),INFO" ID="0xd80823bd" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="local name null or length not match, len: %d @local_device_manager.c(1147),INFO" ID="0xd80823dd" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="returns error ret: %x @local_device_manager.c(1153),WARNING" ID="0xd808240b" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="set result name: &quot;%s&quot; name_len: %d get_re: %x @local_device_manager.c(1159),INFO" ID="0xd808243d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="gap_remove_all_pairs fail @local_device_manager.c(1219),ERROR" ID="0xd808261a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="gap ble remove all pairs fail @local_device_manager.c(1225),ERROR" ID="0xd808264a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="diable_bt_ret(errcode_t): %x @local_device_manager.c(1232),INFO" ID="0xd8082685" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="disable_ble_ret(errcode_t): %x @local_device_manager.c(1237),INFO" ID="0xd80826ad" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="set discovery data pointer is null. @local_device_manager.c(1268),ERROR" ID="0xd80827a2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="adv_id(%d) advertising, please stop first. @local_device_manager.c(1286),ERROR" ID="0xd8082832" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="adv data alloc faild, length:%d @local_device_manager.c(1299),ERROR" ID="0xd808289a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap_ble_set_adv_data adv data memcpy_s fail @local_device_manager.c(1303),ERROR" ID="0xd80828ba" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="scan rsp data alloc faild, length:%d @local_device_manager.c(1312),ERROR" ID="0xd8082902" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap_ble_set_adv_data scan rsp data memcpy_s fail @local_device_manager.c(1316),ERROR" ID="0xd8082922" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] invalid interval param. @local_device_manager.c(1349),ERROR" ID="0xd8082a2a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="adv_id(%d) advertising, please stop first. @local_device_manager.c(1361),ERROR" ID="0xd8082a8a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap ble set adv param memcpy_s fail @local_device_manager.c(1373),ERROR" ID="0xd8082aea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap ble set adv param memcpy_s fail @local_device_manager.c(1387),ERROR" ID="0xd8082b5a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap set sec param error param NULL @local_device_manager.c(1409),ERROR" ID="0xd8082c0a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap set sec param error param NULL @local_device_manager.c(1414),ERROR" ID="0xd8082c32" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="bt has page scanning enabled. @local_device_manager.c(1438),ERROR" ID="0xd8082cf2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="bt has an ACL connection. @local_device_manager.c(1444),ERROR" ID="0xd8082d22" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[CTKD] please set ble secure connection enable,current_sc=%d. @local_device_manager.c(1461),ERROR" ID="0xd8082daa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BT] flow limit range is [3072-51200] bytes. @local_device_manager.c(1479),ERROR" ID="0xd8082e3a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap set adv data memcpy_s fail @local_device_manager.c(1498),ERROR" ID="0xd8082ed2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap set scan rsp data memcpy_s fail @local_device_manager.c(1505),ERROR" ID="0xd8082f0a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] btsrv_gap_set_adv_param memcpy_s fail @local_device_manager.c(1524),ERROR" ID="0xd8082fa2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap set adv param memcpy_s fail @local_device_manager.c(1529),ERROR" ID="0xd8082fca" />
+                       <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 ext adv rpt memcpy fail @local_device_manager.c(1578),ERROR" ID="0xd8083152" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt malloc fail @local_device_manager.c(1589),ERROR" ID="0xd80831aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt memcpy fail @local_device_manager.c(1594),ERROR" ID="0xd80831d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap adv set terminated cbk param error @local_device_manager.c(1614),ERROR" ID="0xd8083272" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble enable cbk param error @local_device_manager.c(1625),ERROR" ID="0xd80832ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble read remote rssi cbk param error @local_device_manager.c(1636),ERROR" ID="0xd8083322" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble conn param update cbk param error @local_device_manager.c(1652),ERROR" ID="0xd80833a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap conn param malloc fail @local_device_manager.c(1666),ERROR" ID="0xd8083412" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="ble conn param update cbk interval:%x, latency:%x, timeout:%x @local_device_manager.c(1673),INFO" ID="0xd808344d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(1707),ERROR" ID="0xd808355a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="adv id(%d) is discoverying, please stop first. @local_device_manager.c(1711),ERROR" ID="0xd808357a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="adv param alloc fail @local_device_manager.c(1720),ERROR" ID="0xd80835c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(1753),ERROR" ID="0xd80836ca" />
+                       <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(1759),ERROR" ID="0xd80836fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="mc sdk ble stop adv atb failed  @local_device_manager.c(1765),ERROR" ID="0xd808372a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="scanning in process, please stop first. @local_device_manager.c(1799),ERROR" ID="0xd808383a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="scanning already stopped. @local_device_manager.c(1832),ERROR" ID="0xd8083942" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble stop extern scan ret: %#x @local_device_manager.c(1836),INFO" ID="0xd8083965" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set phy node == NULL @local_device_manager.c(1859),ERROR" ID="0xd8083a1a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set phy memcpy fail @local_device_manager.c(1864),ERROR" ID="0xd8083a42" />
+                       <MSG STRUCTURE="diag_log_msg5" NAME="ble general set phy hdl:%x all:%x rx:%x tx:%x op:%x. @local_device_manager.c(1872),INFO" ID="0xd8083a85" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble set phy ret: %#x @local_device_manager.c(1875),ERROR" ID="0xd8083a9a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set data length node == NULL @local_device_manager.c(1896),ERROR" ID="0xd8083b42" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set data length memcpy fail @local_device_manager.c(1902),ERROR" ID="0xd8083b72" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="ble general set len hdl:%x maxoct:%x maxtime:%x @local_device_manager.c(1909),INFO" ID="0xd8083bad" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble set len ret: %#x @local_device_manager.c(1912),ERROR" ID="0xd8083bc2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bts sert log type levle:%x @local_device_manager.c(1930),INFO" ID="0xd8083c55" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="g_bts_feature_bitmap bt_auto_reconnect_closed:%d. @local_device_manager.c(1951),ERROR" ID="0xd8083cfa" />
                        </MSG_LOG>
\ No newline at end of file
index 450f0ad..3eb448a 100644 (file)
@@ -1,72 +1,72 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="set svg faild, path len is 0 @map_svg_parser.cpp(54),ERROR" ID="0xcb5001b2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Invalid file path. @map_svg_parser.cpp(67),ERROR" ID="0xcb50021a" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="File(%s) can not open. errno: %d @map_svg_parser.cpp(73),ERROR" ID="0xcb50024a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read map header faild @map_svg_parser.cpp(78),ERROR" ID="0xcb500272" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="parser map success @map_svg_parser.cpp(97),DBG" ID="0xcb50030e" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="parser map failed @map_svg_parser.cpp(104),DBG" ID="0xcb500346" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map header faild @map_svg_parser.cpp(113),ERROR" ID="0xcb50038a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="The remaining data is insufficient. The read ends. @map_svg_parser.cpp(118),WARNING" ID="0xcb5003b3" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="parser map success @map_svg_parser.cpp(153),DBG" ID="0xcb5004ce" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(160),ERROR" ID="0xcb500502" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map node array faild! @map_svg_parser.cpp(167),ERROR" ID="0xcb50053a" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="read map node array faild, readLen:%d, realReadLen:%d @map_svg_parser.cpp(174),ERROR" ID="0xcb500572" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(187),ERROR" ID="0xcb5005da" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read map node faild.The data length is less than the read length! @map_svg_parser.cpp(193),ERROR" ID="0xcb50060a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map node array faild! @map_svg_parser.cpp(198),ERROR" ID="0xcb500632" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="memcpy_s map node array faild, nodeLen: 0x%x @map_svg_parser.cpp(205),ERROR" ID="0xcb50066a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(215),ERROR" ID="0xcb5006ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc path style array faild! @map_svg_parser.cpp(222),ERROR" ID="0xcb5006f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s path style array faild @map_svg_parser.cpp(229),ERROR" ID="0xcb50072a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(242),ERROR" ID="0xcb500792" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read path style faild.The data length is less than the read length! @map_svg_parser.cpp(248),ERROR" ID="0xcb5007c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc path style array faild! @map_svg_parser.cpp(254),ERROR" ID="0xcb5007f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s path style array faild @map_svg_parser.cpp(261),ERROR" ID="0xcb50082a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for buffer failed. @map_svg_parser.cpp(275),ERROR" ID="0xcb50089a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for buffer failed. @map_svg_parser.cpp(284),ERROR" ID="0xcb5008e2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(295),ERROR" ID="0xcb50093a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(302),ERROR" ID="0xcb500972" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read map path array faild @map_svg_parser.cpp(312),ERROR" ID="0xcb5009c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="alloc path faild @map_svg_parser.cpp(319),ERROR" ID="0xcb5009fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read path cmd faild @map_svg_parser.cpp(325),ERROR" ID="0xcb500a2a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read path data faild @map_svg_parser.cpp(331),ERROR" ID="0xcb500a5a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(342),ERROR" ID="0xcb500ab2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(349),ERROR" ID="0xcb500aea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map path array faild @map_svg_parser.cpp(358),ERROR" ID="0xcb500b32" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="alloc path faild @map_svg_parser.cpp(368),ERROR" ID="0xcb500b82" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s path cmd faild @map_svg_parser.cpp(373),ERROR" ID="0xcb500baa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s path data faild @map_svg_parser.cpp(380),ERROR" ID="0xcb500be2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(415),ERROR" ID="0xcb500cfa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(422),ERROR" ID="0xcb500d32" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read map text array faild @map_svg_parser.cpp(432),ERROR" ID="0xcb500d82" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path cmd faild @map_svg_parser.cpp(439),ERROR" ID="0xcb500dba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read text faild @map_svg_parser.cpp(445),ERROR" ID="0xcb500dea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc text offset faild @map_svg_parser.cpp(453),ERROR" ID="0xcb500e2a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read text offset faild @map_svg_parser.cpp(459),ERROR" ID="0xcb500e5a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(470),ERROR" ID="0xcb500eb2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(477),ERROR" ID="0xcb500eea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(486),ERROR" ID="0xcb500f32" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path cmd faild @map_svg_parser.cpp(495),ERROR" ID="0xcb500f7a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s text faild @map_svg_parser.cpp(499),ERROR" ID="0xcb500f9a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc text offset faild @map_svg_parser.cpp(509),ERROR" ID="0xcb500fea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s text offset faild @map_svg_parser.cpp(514),ERROR" ID="0xcb501012" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(548),ERROR" ID="0xcb501122" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(555),ERROR" ID="0xcb50115a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read map image array faild @map_svg_parser.cpp(560),ERROR" ID="0xcb501182" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(568),ERROR" ID="0xcb5011c2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(597),ERROR" ID="0xcb5012aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(604),ERROR" ID="0xcb5012e2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(609),ERROR" ID="0xcb50130a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(617),ERROR" ID="0xcb50134a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(649),ERROR" ID="0xcb50144a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(656),ERROR" ID="0xcb501482" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read map road array faild @map_svg_parser.cpp(661),ERROR" ID="0xcb5014aa" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(671),ERROR" ID="0xcb5014fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(678),ERROR" ID="0xcb501532" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(683),ERROR" ID="0xcb50155a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(702),ERROR" ID="0xcb5015f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(709),ERROR" ID="0xcb50162a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read map poi array faild @map_svg_parser.cpp(714),ERROR" ID="0xcb501652" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(724),ERROR" ID="0xcb5016a2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(731),ERROR" ID="0xcb5016da" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(736),ERROR" ID="0xcb501702" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="set svg faild, path len is 0 @map_svg_parser.cpp(54),ERROR" ID="0xcb5401b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Invalid file path. @map_svg_parser.cpp(67),ERROR" ID="0xcb54021a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="File(%s) can not open. errno: %d @map_svg_parser.cpp(73),ERROR" ID="0xcb54024a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read map header faild @map_svg_parser.cpp(78),ERROR" ID="0xcb540272" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="parser map success @map_svg_parser.cpp(97),DBG" ID="0xcb54030e" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="parser map failed @map_svg_parser.cpp(104),DBG" ID="0xcb540346" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map header faild @map_svg_parser.cpp(113),ERROR" ID="0xcb54038a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="The remaining data is insufficient. The read ends. @map_svg_parser.cpp(118),WARNING" ID="0xcb5403b3" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="parser map success @map_svg_parser.cpp(153),DBG" ID="0xcb5404ce" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(160),ERROR" ID="0xcb540502" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map node array faild! @map_svg_parser.cpp(167),ERROR" ID="0xcb54053a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="read map node array faild, readLen:%d, realReadLen:%d @map_svg_parser.cpp(174),ERROR" ID="0xcb540572" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(187),ERROR" ID="0xcb5405da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read map node faild.The data length is less than the read length! @map_svg_parser.cpp(193),ERROR" ID="0xcb54060a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map node array faild! @map_svg_parser.cpp(198),ERROR" ID="0xcb540632" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="memcpy_s map node array faild, nodeLen: 0x%x @map_svg_parser.cpp(205),ERROR" ID="0xcb54066a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(215),ERROR" ID="0xcb5406ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc path style array faild! @map_svg_parser.cpp(222),ERROR" ID="0xcb5406f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s path style array faild @map_svg_parser.cpp(229),ERROR" ID="0xcb54072a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(242),ERROR" ID="0xcb540792" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read path style faild.The data length is less than the read length! @map_svg_parser.cpp(248),ERROR" ID="0xcb5407c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc path style array faild! @map_svg_parser.cpp(254),ERROR" ID="0xcb5407f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s path style array faild @map_svg_parser.cpp(261),ERROR" ID="0xcb54082a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for buffer failed. @map_svg_parser.cpp(275),ERROR" ID="0xcb54089a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for buffer failed. @map_svg_parser.cpp(284),ERROR" ID="0xcb5408e2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(295),ERROR" ID="0xcb54093a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(302),ERROR" ID="0xcb540972" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read map path array faild @map_svg_parser.cpp(312),ERROR" ID="0xcb5409c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="alloc path faild @map_svg_parser.cpp(319),ERROR" ID="0xcb5409fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read path cmd faild @map_svg_parser.cpp(325),ERROR" ID="0xcb540a2a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read path data faild @map_svg_parser.cpp(331),ERROR" ID="0xcb540a5a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(342),ERROR" ID="0xcb540ab2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(349),ERROR" ID="0xcb540aea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map path array faild @map_svg_parser.cpp(358),ERROR" ID="0xcb540b32" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="alloc path faild @map_svg_parser.cpp(368),ERROR" ID="0xcb540b82" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s path cmd faild @map_svg_parser.cpp(373),ERROR" ID="0xcb540baa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s path data faild @map_svg_parser.cpp(380),ERROR" ID="0xcb540be2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(415),ERROR" ID="0xcb540cfa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(422),ERROR" ID="0xcb540d32" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read map text array faild @map_svg_parser.cpp(432),ERROR" ID="0xcb540d82" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path cmd faild @map_svg_parser.cpp(439),ERROR" ID="0xcb540dba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read text faild @map_svg_parser.cpp(445),ERROR" ID="0xcb540dea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc text offset faild @map_svg_parser.cpp(453),ERROR" ID="0xcb540e2a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read text offset faild @map_svg_parser.cpp(459),ERROR" ID="0xcb540e5a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(470),ERROR" ID="0xcb540eb2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(477),ERROR" ID="0xcb540eea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(486),ERROR" ID="0xcb540f32" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path cmd faild @map_svg_parser.cpp(495),ERROR" ID="0xcb540f7a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s text faild @map_svg_parser.cpp(499),ERROR" ID="0xcb540f9a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc text offset faild @map_svg_parser.cpp(509),ERROR" ID="0xcb540fea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s text offset faild @map_svg_parser.cpp(514),ERROR" ID="0xcb541012" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(548),ERROR" ID="0xcb541122" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(555),ERROR" ID="0xcb54115a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read map image array faild @map_svg_parser.cpp(560),ERROR" ID="0xcb541182" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(568),ERROR" ID="0xcb5411c2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(597),ERROR" ID="0xcb5412aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(604),ERROR" ID="0xcb5412e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(609),ERROR" ID="0xcb54130a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(617),ERROR" ID="0xcb54134a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(649),ERROR" ID="0xcb54144a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(656),ERROR" ID="0xcb541482" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read map road array faild @map_svg_parser.cpp(661),ERROR" ID="0xcb5414aa" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(671),ERROR" ID="0xcb5414fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(678),ERROR" ID="0xcb541532" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(683),ERROR" ID="0xcb54155a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(702),ERROR" ID="0xcb5415f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(709),ERROR" ID="0xcb54162a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read map poi array faild @map_svg_parser.cpp(714),ERROR" ID="0xcb541652" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(724),ERROR" ID="0xcb5416a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(731),ERROR" ID="0xcb5416da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(736),ERROR" ID="0xcb541702" />
                        </MSG_LOG>
\ No newline at end of file
index 96f2355..7728e64 100644 (file)
@@ -1,5 +1,5 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="src is nullptr! @particle_cell.cpp(44),ERROR" ID="0xcb780162" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy imageInfo_ failed. @particle_cell.cpp(49),ERROR" ID="0xcb78018a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ABS(range) is out of range @particle_cell.cpp(116),INFO" ID="0xcb7803a5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Particle cell's parent should be UIParticleView! @particle_cell.cpp(257),ERROR" ID="0xcb78080a" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="src is nullptr! @particle_cell.cpp(44),ERROR" ID="0xcb7c0162" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy imageInfo_ failed. @particle_cell.cpp(49),ERROR" ID="0xcb7c018a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ABS(range) is out of range @particle_cell.cpp(116),INFO" ID="0xcb7c03a5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Particle cell's parent should be UIParticleView! @particle_cell.cpp(257),ERROR" ID="0xcb7c080a" />
                        </MSG_LOG>
\ No newline at end of file
index e4dfd6b..eadc53d 100644 (file)
                        <MSG STRUCTURE="diag_log_msg0" NAME="memcpy for data failed. @ui_canvas_ext.cpp(131),ERROR" ID="0xcaec041a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="can only set matrix after beginning any path. @ui_canvas_ext.cpp(145),ERROR" ID="0xcaec048a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="Index out of range. @ui_canvas_ext.cpp(153),ERROR" ID="0xcaec04ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="HandleStyleAndPattern failed. UpdateImageInfoIfNecessary failed. @ui_canvas_ext.cpp(274),ERROR" ID="0xcaec0892" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Image is invalid! @ui_canvas_ext.cpp(340),ERROR" ID="0xcaec0aa2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="path or paint or matrix is nullptr. @ui_canvas_ext.cpp(390),ERROR" ID="0xcaec0c32" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for cmd failed. @ui_canvas_ext.cpp(455),ERROR" ID="0xcaec0e3a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for cmd failed. @ui_canvas_ext.cpp(492),ERROR" ID="0xcaec0f62" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for cmd failed. @ui_canvas_ext.cpp(526),ERROR" ID="0xcaec1072" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Sector is not supported currently @ui_canvas_ext.cpp(542),WARNING" ID="0xcaec10f3" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="startAngle and endAngle can not be smaller than 0. @ui_canvas_ext.cpp(550),ERROR" ID="0xcaec1132" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="endAngle should not be equal to startAngle @ui_canvas_ext.cpp(554),ERROR" ID="0xcaec1152" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="realpath fail:  %s @ui_canvas_ext.cpp(595),ERROR" ID="0xcaec129a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="new svgdata obj failed @ui_canvas_ext.cpp(607),ERROR" ID="0xcaec12fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="OverlayOpacity Failed!!! @ui_canvas_ext.cpp(632),ERROR" ID="0xcaec13c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="can only set matrix after beginning any path. @ui_canvas_ext.cpp(719),ERROR" ID="0xcaec167a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="index error @ui_canvas_ext.cpp(723),ERROR" ID="0xcaec169a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read data fail. @ui_canvas_ext.cpp(786),ERROR" ID="0xcaec1892" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc path fail. @ui_canvas_ext.cpp(804),ERROR" ID="0xcaec1922" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc path fail. @ui_canvas_ext.cpp(809),ERROR" ID="0xcaec194a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="open %s fail @ui_canvas_ext.cpp(825),ERROR" ID="0xcaec19ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="HandleStyleAndPattern failed. UpdateImageInfoIfNecessary failed. @ui_canvas_ext.cpp(280),ERROR" ID="0xcaec08c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Image is invalid! @ui_canvas_ext.cpp(346),ERROR" ID="0xcaec0ad2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="path or paint or matrix is nullptr. @ui_canvas_ext.cpp(396),ERROR" ID="0xcaec0c62" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for cmd failed. @ui_canvas_ext.cpp(461),ERROR" ID="0xcaec0e6a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for cmd failed. @ui_canvas_ext.cpp(498),ERROR" ID="0xcaec0f92" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for cmd failed. @ui_canvas_ext.cpp(532),ERROR" ID="0xcaec10a2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="realpath fail:  %s @ui_canvas_ext.cpp(607),ERROR" ID="0xcaec12fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="new svgdata obj failed @ui_canvas_ext.cpp(619),ERROR" ID="0xcaec135a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="OverlayOpacity Failed!!! @ui_canvas_ext.cpp(644),ERROR" ID="0xcaec1422" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="can only set matrix after beginning any path. @ui_canvas_ext.cpp(731),ERROR" ID="0xcaec16da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="index error @ui_canvas_ext.cpp(735),ERROR" ID="0xcaec16fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read data fail. @ui_canvas_ext.cpp(798),ERROR" ID="0xcaec18f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc path fail. @ui_canvas_ext.cpp(816),ERROR" ID="0xcaec1982" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc path fail. @ui_canvas_ext.cpp(821),ERROR" ID="0xcaec19aa" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="open %s fail @ui_canvas_ext.cpp(837),ERROR" ID="0xcaec1a2a" />
                        </MSG_LOG>
\ No newline at end of file
index 84ce807..020c30b 100644 (file)
@@ -1,5 +1,3 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="add faild, Input parameter error. @ui_coverflow_view.cpp(97),ERROR" ID="0xcb44030a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="remove faild, Input parameter error. @ui_coverflow_view.cpp(138),ERROR" ID="0xcb440452" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="UICoverflowView calls TYPE_THREE vibrator @ui_coverflow_view.cpp(339),INFO" ID="0xcb440a9d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="UICoverflowView calls TYPE_ONE vibrator @ui_coverflow_view.cpp(342),INFO" ID="0xcb440ab5" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="add faild, Input parameter error. @ui_coverflow_view.cpp(96),ERROR" ID="0xcb460302" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="remove faild, Input parameter error. @ui_coverflow_view.cpp(137),ERROR" ID="0xcb46044a" />
                        </MSG_LOG>
\ No newline at end of file
index 6692b10..7d8f1b6 100644 (file)
@@ -1,8 +1,8 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="add failed, view is nullptr @ui_coverflow_view2.cpp(53),ERROR" ID="0xcb4601aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="add failed, the view type is not support, only suppot UITransformGroup. @ui_coverflow_view2.cpp(58),ERROR" ID="0xcb4601d2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="insert failed, view is nullptr @ui_coverflow_view2.cpp(76),ERROR" ID="0xcb460262" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="add failed, the view type is not support, only suppot UITransformGroup. @ui_coverflow_view2.cpp(81),ERROR" ID="0xcb46028a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="remove failed, view is nullptr @ui_coverflow_view2.cpp(104),ERROR" ID="0xcb460342" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="remove failed, the view type is not support, only suppot UITransformGroup. @ui_coverflow_view2.cpp(109),ERROR" ID="0xcb46036a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="remove failed, view parent is nullptr @ui_coverflow_view2.cpp(115),ERROR" ID="0xcb46039a" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="add failed, view is nullptr @ui_coverflow_view2.cpp(53),ERROR" ID="0xcb4801aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="add failed, the view type is not support, only suppot UITransformGroup. @ui_coverflow_view2.cpp(58),ERROR" ID="0xcb4801d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="insert failed, view is nullptr @ui_coverflow_view2.cpp(76),ERROR" ID="0xcb480262" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="add failed, the view type is not support, only suppot UITransformGroup. @ui_coverflow_view2.cpp(81),ERROR" ID="0xcb48028a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="remove failed, view is nullptr @ui_coverflow_view2.cpp(104),ERROR" ID="0xcb480342" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="remove failed, the view type is not support, only suppot UITransformGroup. @ui_coverflow_view2.cpp(109),ERROR" ID="0xcb48036a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="remove failed, view parent is nullptr @ui_coverflow_view2.cpp(115),ERROR" ID="0xcb48039a" />
                        </MSG_LOG>
\ No newline at end of file
diff --git a/code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_cross_view.cpp.xml b/code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_cross_view.cpp.xml
new file mode 100644 (file)
index 0000000..2cf8d0c
--- /dev/null
@@ -0,0 +1,6 @@
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="Vertical current view is nullptr! @ui_cross_view.cpp(115),DBG" ID="0xcb4e039e" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="vBlankIndex_ is invalid: %d, or vBlankView is nullptr @ui_cross_view.cpp(119),DBG" ID="0xcb4e03be" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Horizontal current view is nullptr! @ui_cross_view.cpp(150),DBG" ID="0xcb4e04b6" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="horizontal current container is nullptr. @ui_cross_view.cpp(538),ERROR" ID="0xcb4e10d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="horizontal current page is nullptr or it is not coverable. @ui_cross_view.cpp(543),ERROR" ID="0xcb4e10fa" />
+                       </MSG_LOG>
\ No newline at end of file
index 306511b..382f041 100644 (file)
@@ -1,8 +1,7 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="Can not add view other than UIImageView or UITransfromGroup. @ui_hexagons_list.cpp(73),ERROR" ID="0xcb36024a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="insertView is nullptr! @ui_hexagons_list.cpp(92),ERROR" ID="0xcb3602e2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Can not insert view other than UIImageView or UITransfromGroup. @ui_hexagons_list.cpp(105),ERROR" ID="0xcb36034a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="don't support scale when rebound mode is normal @ui_hexagons_list.cpp(230),ERROR" ID="0xcb360732" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="scale value %f is invalid @ui_hexagons_list.cpp(235),ERROR" ID="0xcb36075a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Scale coefficient is same, don't scale and invalidate item. @ui_hexagons_list.cpp(495),DBG" ID="0xcb360f7e" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="parameter is not valid, distance_:%u size:%d @ui_hexagons_list.cpp(638),ERROR" ID="0xcb3613f2" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="Can not add view other than UIImageView or UITransfromGroup. @ui_hexagons_list.cpp(73),ERROR" ID="0xcb38024a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="insertView is nullptr! @ui_hexagons_list.cpp(92),ERROR" ID="0xcb3802e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Can not insert view other than UIImageView or UITransfromGroup. @ui_hexagons_list.cpp(105),ERROR" ID="0xcb38034a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="don't support scale when rebound mode is normal @ui_hexagons_list.cpp(230),ERROR" ID="0xcb380732" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="scale value %f is invalid @ui_hexagons_list.cpp(235),ERROR" ID="0xcb38075a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="parameter is not valid, distance_: %u, size: %d @ui_hexagons_list.cpp(639),ERROR" ID="0xcb3813fa" />
                        </MSG_LOG>
\ No newline at end of file
index 116feac..fb9539f 100644 (file)
@@ -1,2 +1,2 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="A maximum of 20 records can be added. @ui_icosahedron_view.cpp(108),ERROR" ID="0xcb4c0362" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="A maximum of 20 records can be added. @ui_icosahedron_view.cpp(108),ERROR" ID="0xcb500362" />
                        </MSG_LOG>
\ No newline at end of file
index ff156f1..2b0896b 100644 (file)
@@ -1,4 +1,4 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="buffer is nil @ui_kaleidoscope_view.cpp(46),ERROR" ID="0xcb400172" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="Fmt not support: %d @ui_kaleidoscope_view.cpp(55),ERROR" ID="0xcb4001ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Init KaleidoscopeUtils failed. @ui_kaleidoscope_view.cpp(62),ERROR" ID="0xcb4001f2" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="buffer is nil @ui_kaleidoscope_view.cpp(46),ERROR" ID="0xcb420172" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="Fmt not support: %d @ui_kaleidoscope_view.cpp(55),ERROR" ID="0xcb4201ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Init KaleidoscopeUtils failed. @ui_kaleidoscope_view.cpp(62),ERROR" ID="0xcb4201f2" />
                        </MSG_LOG>
\ No newline at end of file
index 16ce6bf..a8328b5 100644 (file)
@@ -1,2 +1,2 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="new TextExt failed @ui_label_button_ext.cpp(40),ERROR" ID="0xcaf20142" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="new TextExt failed @ui_label_button_ext.cpp(41),ERROR" ID="0xcaf2014a" />
                        </MSG_LOG>
\ No newline at end of file
index 1616369..72307b6 100644 (file)
@@ -1,3 +1,3 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="pois_ malloc fail @ui_map_view.cpp(79),ERROR" ID="0xcb4e027a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="roads_ malloc fail @ui_map_view.cpp(130),ERROR" ID="0xcb4e0412" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="pois_ malloc fail @ui_map_view.cpp(79),ERROR" ID="0xcb52027a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="roads_ malloc fail @ui_map_view.cpp(130),ERROR" ID="0xcb520412" />
                        </MSG_LOG>
\ No newline at end of file
index 1d4e077..250a2e9 100644 (file)
@@ -1,2 +1,2 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="new ParticleCell failed. Return nullptr! @ui_particle_view.cpp(176),ERROR" ID="0xcb760582" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="new ParticleCell failed. Return nullptr! @ui_particle_view.cpp(176),ERROR" ID="0xcb7a0582" />
                        </MSG_LOG>
\ No newline at end of file
index e83f049..c49070a 100644 (file)
@@ -1,13 +1,13 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="width and height can not set 0 @ui_roller_view.cpp(146),ERROR" ID="0xcb4a0492" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="RollerItemInfo is nullptr! @ui_roller_view.cpp(193),ERROR" ID="0xcb4a060a" />
-                       <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="0xcb4a076a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="name is empty! @ui_roller_view.cpp(280),ERROR" ID="0xcb4a08c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Should remove an item in DISPLAY mode @ui_roller_view.cpp(285),ERROR" ID="0xcb4a08ea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="RollerItemInfo is null! @ui_roller_view.cpp(466),ERROR" ID="0xcb4a0e92" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Cannot set align item when mode is about to change. @ui_roller_view.cpp(535),ERROR" ID="0xcb4a10ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Should SetCurrentItem in DISPLAY mode. @ui_roller_view.cpp(539),ERROR" ID="0xcb4a10da" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="Cannot find an item with name: %s @ui_roller_view.cpp(554),ERROR" ID="0xcb4a1152" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Cannot set mode when AlignAnim is running @ui_roller_view.cpp(649),ERROR" ID="0xcb4a144a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="mode is already set. @ui_roller_view.cpp(654),ERROR" ID="0xcb4a1472" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Cannot Set mode during transition or cannot set TRANSITION mode. @ui_roller_view.cpp(659),ERROR" ID="0xcb4a149a" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="width and height can not set 0 @ui_roller_view.cpp(147),ERROR" ID="0xcb4c049a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="RollerItemInfo is nullptr! @ui_roller_view.cpp(194),ERROR" ID="0xcb4c0612" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Already add an item with the same name. Remove it before adding this. @ui_roller_view.cpp(238),ERROR" ID="0xcb4c0772" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="name is empty! @ui_roller_view.cpp(281),ERROR" ID="0xcb4c08ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Should remove an item in DISPLAY mode @ui_roller_view.cpp(286),ERROR" ID="0xcb4c08f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="RollerItemInfo is null! @ui_roller_view.cpp(467),ERROR" ID="0xcb4c0e9a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Cannot set align item when mode is about to change. @ui_roller_view.cpp(556),ERROR" ID="0xcb4c1162" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Should SetCurrentItem in DISPLAY mode. @ui_roller_view.cpp(560),ERROR" ID="0xcb4c1182" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="Cannot find an item with name: %s @ui_roller_view.cpp(575),ERROR" ID="0xcb4c11fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Cannot set mode when AlignAnim is running @ui_roller_view.cpp(673),ERROR" ID="0xcb4c150a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="mode is already set. @ui_roller_view.cpp(678),ERROR" ID="0xcb4c1532" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Cannot Set mode during transition or cannot set TRANSITION mode. @ui_roller_view.cpp(683),ERROR" ID="0xcb4c155a" />
                        </MSG_LOG>
\ No newline at end of file
index 09fbb6b..d7bf5b1 100644 (file)
@@ -1,3 +1,3 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="add failed, view is nullptr @ui_slipflow_view.cpp(60),ERROR" ID="0xcb4801e2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="remove faild, Input parameter error. @ui_slipflow_view.cpp(135),ERROR" ID="0xcb48043a" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="add failed, view is nullptr @ui_slipflow_view.cpp(60),ERROR" ID="0xcb4a01e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="remove faild, Input parameter error. @ui_slipflow_view.cpp(135),ERROR" ID="0xcb4a043a" />
                        </MSG_LOG>
\ No newline at end of file
index 959e202..641ec43 100644 (file)
@@ -1,5 +1,5 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="Failed to create the child control. The control of this [%d] cannot be copied. @ui_transform_group.cpp(35),WARNING" ID="0xcb64011b" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="add failed, the view type %d is not support @ui_transform_group.cpp(49),ERROR" ID="0xcb64018a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="add failed, the view type %d is not support @ui_transform_group.cpp(63),ERROR" ID="0xcb6401fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Cannot find target child! @ui_transform_group.cpp(103),ERROR" ID="0xcb64033a" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="Failed to create the child control. The control of this [%d] cannot be copied. @ui_transform_group.cpp(35),WARNING" ID="0xcb68011b" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="add failed, the view type %d is not support @ui_transform_group.cpp(49),ERROR" ID="0xcb68018a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="add failed, the view type %d is not support @ui_transform_group.cpp(63),ERROR" ID="0xcb6801fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Cannot find target child! @ui_transform_group.cpp(103),ERROR" ID="0xcb68033a" />
                        </MSG_LOG>
\ No newline at end of file
index 882e081..1dab667 100644 (file)
@@ -1,6 +1,6 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="Can not add view other than UIImageView or UITransfromGroup. @ui_waterfall_list.cpp(55),ERROR" ID="0xcb3c01ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="insertView is nullptr! @ui_waterfall_list.cpp(74),ERROR" ID="0xcb3c0252" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Can not insert view other than UIImageView or UITransfromGroup. @ui_waterfall_list.cpp(87),ERROR" ID="0xcb3c02ba" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="scale value %f is invalid @ui_waterfall_list.cpp(271),ERROR" ID="0xcb3c087a" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="parameter is not valid, distance_:%u size:%d @ui_waterfall_list.cpp(430),ERROR" ID="0xcb3c0d72" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="Can not add view other than UIImageView or UITransfromGroup. @ui_waterfall_list.cpp(54),ERROR" ID="0xcb3e01b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="insertView is nullptr! @ui_waterfall_list.cpp(73),ERROR" ID="0xcb3e024a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Can not insert view other than UIImageView or UITransfromGroup. @ui_waterfall_list.cpp(86),ERROR" ID="0xcb3e02b2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="scale value %f is invalid @ui_waterfall_list.cpp(281),ERROR" ID="0xcb3e08ca" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="parameter is not valid, distance_: %u, size: %d @ui_waterfall_list.cpp(445),ERROR" ID="0xcb3e0dea" />
                        </MSG_LOG>
\ No newline at end of file
index e1843bf..616c20f 100644 (file)
@@ -4,11 +4,11 @@
                        <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_aenc_stop Failed, Error Code: [0x%08X] @core_msg_aenc.c(83),ERROR" ID="0x985c029a" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_aenc_get_attr Failed, Error Code: [0x%08X] @core_msg_aenc.c(100),ERROR" ID="0x985c0322" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Error Code: [0x%08X] @core_msg_aenc.c(109),ERROR" ID="0x985c036a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_aenc_set_attr Failed, Error Code: [0x%08X] @core_msg_aenc.c(136),ERROR" ID="0x985c0442" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_aenc_set_bypass Failed, Error Code: [0x%08X] @core_msg_aenc.c(158),ERROR" ID="0x985c04f2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call connector_open Failed, Error Code: [0x%08X] @core_msg_aenc.c(175),ERROR" ID="0x985c057a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_aenc_get_proc_info Failed, Error Code: [0x%08X] @core_msg_aenc.c(200),ERROR" ID="0x985c0642" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_aenc_get_lib_type Failed, Error Code: [0x%08X] @core_msg_aenc.c(217),ERROR" ID="0x985c06ca" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_aenc_set_param Failed, Error Code: [0x%08X] @core_msg_aenc.c(234),ERROR" ID="0x985c0752" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]msg_data-&gt;cmd = %u @core_msg_aenc.c(261),ERROR" ID="0x985c082a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_aenc_set_attr Failed, Error Code: [0x%08X] @core_msg_aenc.c(141),ERROR" ID="0x985c046a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_aenc_set_bypass Failed, Error Code: [0x%08X] @core_msg_aenc.c(163),ERROR" ID="0x985c051a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call connector_open Failed, Error Code: [0x%08X] @core_msg_aenc.c(180),ERROR" ID="0x985c05a2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_aenc_get_proc_info Failed, Error Code: [0x%08X] @core_msg_aenc.c(205),ERROR" ID="0x985c066a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_aenc_get_lib_type Failed, Error Code: [0x%08X] @core_msg_aenc.c(222),ERROR" ID="0x985c06f2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_aenc_set_param Failed, Error Code: [0x%08X] @core_msg_aenc.c(239),ERROR" ID="0x985c077a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]msg_data-&gt;cmd = %u @core_msg_aenc.c(266),ERROR" ID="0x985c0852" />
                        </MSG_LOG>
\ No newline at end of file
index eccf3bb..88fd9bb 100644 (file)
                        <MSG STRUCTURE="diag_log_msg4" NAME="[INFO][LLD]lld_rpa_init:init_filt_policy=0x%x,own_addr_type=0x%x,ral_ptr=0x%x, ral_en=0x%x @lld_rpa_ram.c(77),INFO" ID="0x8a4e026d" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="DSP0 power off @pm_control.c(168),INFO" ID="0xa0560545" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[HFP][GetServiceInfo] connection_number=0x%x, status=0x%x @hfp_fsm_ram.c(292),INFO" ID="0x8be20925" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[T%x][TIMEOUT]SLC NOT ESTABLISHED, TIMER=0x%x @hfp_fsm_ram.c(572),WARNING" ID="0x8be211e3" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[T%x][TIMEOUT]RING OR DIAL, TIMER=0x%x @hfp_fsm_ram.c(578),WARNING" ID="0x8be21213" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[T%x][TIMEOUT]AT CMD, LAST_CMD=0x%x, TIMER=0x%x @hfp_fsm_ram.c(583),WARNING" ID="0x8be2123b" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[T%x][TIMEOUT]SLC NOT ESTABLISHED, TIMER=0x%x @hfp_fsm_ram.c(573),WARNING" ID="0x8be211eb" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[T%x][TIMEOUT]RING OR DIAL, TIMER=0x%x @hfp_fsm_ram.c(579),WARNING" ID="0x8be2121b" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[T%x][TIMEOUT]AT CMD, LAST_CMD=0x%x, TIMER=0x%x @hfp_fsm_ram.c(584),WARNING" ID="0x8be21243" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][LLM]llm_per_adv_create_sync is pending or starting @llm_per.c(93),WARNING" ID="0x898602eb" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="[LLD][INFO]lld_a2dp_sco_20dbm_check:conhdl=0x%x, txpwrlev=0x%x, ackrate=%d, last_rssi_delta=%d @lld_pwr_ctrl.c(285),INFO" ID="0x89ee08ed" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[LLD][INFO]lld_a2dp_sco_20dbm_check:reason_20dbm=0x%x, locper=%d @lld_pwr_ctrl.c(288),INFO" ID="0x89ee0905" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[INFO][LLC]llc_channel_map_instant_exec:dummy=%d,opcode=%d @llc_llcp.c(3663),INFO" ID="0x8838727d" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][LLC]llcp_channel_map_req_handler:llc_env_ptr is null @llc_llcp.c(3693),WARNING" ID="0x8838736b" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="smp_pair_new_patch @patch_bth.c(52),INFO" ID="0x8d5401a5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[AVDTP][GET_SEP_FAIL] Can not get sep info @patch_bth.c(156),WARNING" ID="0x8d5404e3" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[STACK][RECV_RING_STOP] @patch_bth.c(244),INFO" ID="0x8d5407a5" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[ATT_GATT] att error rsp opcode:0x%x handle:%d error:0x%x @patch_bth.c(277),ERROR" ID="0x8d5408aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SMP]PAIRING_REQ_RECV @patch_bth.c(506),ERROR" ID="0x8d540fd2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[AVDTP][GET_SEP_FAIL] Can not get sep info @patch_bth.c(157),WARNING" ID="0x8d5404eb" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[STACK][RECV_RING_STOP] @patch_bth.c(245),INFO" ID="0x8d5407ad" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[ATT_GATT] att error rsp opcode:0x%x handle:%d error:0x%x @patch_bth.c(278),ERROR" ID="0x8d5408b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SMP]PAIRING_REQ_RECV @patch_bth.c(507),ERROR" ID="0x8d540fda" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="ble add ble white list fail: %d @bt_mpc_adpt_gap.c(53),ERROR" ID="0x8dd401aa" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="ble add ble white list params err! len = %d @bt_mpc_adpt_gap.c(57),ERROR" ID="0x8dd401ca" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="ble remove all ble white list fail: %d @bt_mpc_adpt_gap.c(72),ERROR" ID="0x8dd40242" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc read remote rssi: %d @bt_mpc_adpt_gap.c(524),ERROR" ID="0x8dd41062" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc read remote rssi err! len = %d @bt_mpc_adpt_gap.c(527),ERROR" ID="0x8dd4107a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ECC]release semaphore fail @ecc_p256.c(1857),INFO" ID="0x89463a0d" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI] remove remote exceed upper limit %d addr:%02x:%02x:xx:xx:xx:%02x! @hci_hlp_ram.c(524),ERROR" ID="0x8ba81062" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[HCI]memcpy_s&#160;error @hci_hlp_ram.c(544),ERROR" ID="0x8ba81102" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[HCI] hci_merged_remote_node! @hci_hlp_ram.c(392),ERROR" ID="0x8ba80c42" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI] remove remote exceed upper limit %d addr:%02x:%02x:xx:xx:xx:%02x! @hci_hlp_ram.c(555),ERROR" ID="0x8ba8115a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[HCI]memcpy_s&#160;error @hci_hlp_ram.c(575),ERROR" ID="0x8ba811fa" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="rx_phy is %d @patch_llc.c(19),INFO" ID="0x8a5e009d" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_reserve.c(141),ERROR" ID="0x8dee046a" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[productline cali]productline_cali_start_tx, freq=%d, @bt_productline.c(41),INFO" ID="0x88fc014d" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ERROR][CTE]llcp_cte_req_handler: LLCP_CTE_REQ Received! But current version software DO NOT support this feature. @llc_llcp_ram.c(636),ERROR" ID="0x896613e2" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ERROR][CTE]llcp_cte_rsp_handler: LLCP_SUPP_RSP Received! But current version software DO NOT support this feature. @llc_llcp_ram.c(700),ERROR" ID="0x896615e2" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[GAP][to_expire] wait_handle2 to_expire @hdlmgnt.c(428),INFO" ID="0x8ac80d65" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[HFP]hfp_ag_bcs: HFP_AG_WAIT4_BCSCMD not set, ignore this command. @hfp_ag_ram.c(1154),ERROR" ID="0x8d7a2412" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[HCI]CURRENT_LINK_MODE=0x%x, ACL Data Will be pend! @hci_link_br.c(220),INFO" ID="0x8bdc06e5" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[HCI] create connection addr:%02x******%02x%02x @hci_link_br.c(260),ERROR" ID="0x8bdc0822" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[HCI][CONN_COMPLETE] LINK_STATUS=0x%x, EVENT_STATUS=0x%x, CONN_HDL=0x%x @hci_link_br.c(497),ERROR" ID="0x8bdc0f8a" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[BTH][QOS]release ipc:%u fsm_tx:%u. @sdk_hlp.c(129),ERROR" ID="0x8b7a040a" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[BTH][QOS]release hci_rx:%u hci_qos:%u. @sdk_hlp.c(130),ERROR" ID="0x8b7a0412" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[SDK][GAP] CTKD BR link key report, addr=0x%02x:**:**:**:0x%02x:0x%02x @sdk_hlp.c(906),WARNING" ID="0x8b7a1c53" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[SDK][GAP] paired phone exist, dev_handle=0x%x @sdk_hlp.c(912),WARNING" ID="0x8b7a1c83" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="hlp_link_key_req_cbk no source addr:0x%x @sdk_hlp.c(1007),INFO" ID="0x8b7a1f7d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="hlp_connection_ev_cbk_dis_conn hdl:0x%x status:%d @sdk_hlp.c(2162),INFO" ID="0x8b7a4395" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[SDK] connect event cbk connected: %d, reason: %d link_type:%d! @sdk_hlp.c(2184),ERROR" ID="0x8b7a4442" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[SDK] connect event cbk cap:%d addr:%02x******%02x%02x @sdk_hlp.c(2199),ERROR" ID="0x8b7a44ba" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[SDK] connect event cbk status:%d dev_hdl:0x%x @sdk_hlp.c(2202),ERROR" ID="0x8b7a44d2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[SDK][GAP] paired phone exist, dev_handle=0x%x @sdk_hlp.c(913),WARNING" ID="0x8b7a1c8b" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="hlp_link_key_req_cbk no source addr:0x%x @sdk_hlp.c(1012),INFO" ID="0x8b7a1fa5" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="hlp_connection_ev_cbk_dis_conn hdl:0x%x status:%d @sdk_hlp.c(2167),INFO" ID="0x8b7a43bd" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[SDK] connect event cbk connected: %d, reason: %d link_type:%d! @sdk_hlp.c(2189),ERROR" ID="0x8b7a446a" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[SDK] connect event cbk cap:%d addr:%02x******%02x%02x @sdk_hlp.c(2204),ERROR" ID="0x8b7a44e2" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[SDK] connect event cbk status:%d dev_hdl:0x%x @sdk_hlp.c(2207),ERROR" ID="0x8b7a44fa" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="gdk message post, failed retry later. @gdk_msg.c(46),ERROR" ID="0x8cb40172" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="gdk message timer cback @gdk_msg.c(74),DBG" ID="0x8cb40256" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="gdk message add itor_msgid:0x%x, itor_ts:0x%lld @gdk_msg.c(107),DBG" ID="0x8cb4035e" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][LLD]lld_ext_create_con_req_opt:2m fail @lld_con.c(1218),WARNING" ID="0x89702613" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][LLD]lld_ext_create_con_req_opt:coded fail @lld_con.c(1232),WARNING" ID="0x89702683" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[INFO][LLD]lld_ext_con_start_by_phy_opt:elt_scan=0x%x, elt_connect=0x%x, aux_init_elt=0x%x @lld_con.c(1323),INFO" ID="0x8970295d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk get remote device address failed! dev_hdl = 0x%x @bt_ahi_common.c(97),ERROR" ID="0x8c9e030a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="btsrv passkey req ind callback dev_hdl = 0x%x @bt_ahi_common.c(162),INFO" ID="0x8c9e0515" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="get remote device address failed! dev_hdl = 0x%x @bt_ahi_common.c(92),ERROR" ID="0x8c9e02e2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk get remote device address failed! dev_hdl = 0x%x @bt_ahi_common.c(109),ERROR" ID="0x8c9e036a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="remote device address copy failed! @bt_ahi_common.c(122),ERROR" ID="0x8c9e03d2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="btsrv passkey req ind callback dev_hdl = 0x%x @bt_ahi_common.c(185),INFO" ID="0x8c9e05cd" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="[INFO][LLD]lld_bis_elt_ready:elt=0x%x,elt_ts=0x%x,intv=%d,duration_min=%d @patch_lld_bis.c(46),INFO" ID="0x8a5a0175" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[INFO]hci_dbg_meta_evt_pkupk:in=%d,*in=%d @hci_msg.c(1958),INFO" ID="0x88d03d35" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[LOW_POWER]des is error ,des:0x%x,%s,%d @hal_cpu_hifi.c(69),INFO" ID="0xa028022d" />
index 2b0480e..92c1641 100644 (file)
@@ -1,3 +1,5 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="btsdk get remote device address failed! dev_hdl = 0x%x @bt_ahi_common.c(97),ERROR" ID="0x8c9e030a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="btsrv passkey req ind callback dev_hdl = 0x%x @bt_ahi_common.c(162),INFO" ID="0x8c9e0515" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="get remote device address failed! dev_hdl = 0x%x @bt_ahi_common.c(92),ERROR" ID="0x8c9e02e2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk get remote device address failed! dev_hdl = 0x%x @bt_ahi_common.c(109),ERROR" ID="0x8c9e036a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="remote device address copy failed! @bt_ahi_common.c(122),ERROR" ID="0x8c9e03d2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="btsrv passkey req ind callback dev_hdl = 0x%x @bt_ahi_common.c(185),INFO" ID="0x8c9e05cd" />
                        </MSG_LOG>
\ No newline at end of file
index fb8a3f0..5d296f9 100644 (file)
@@ -1,3 +1,4 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg4" NAME="[HCI] remove remote exceed upper limit %d addr:%02x:%02x:xx:xx:xx:%02x! @hci_hlp_ram.c(524),ERROR" ID="0x8ba81062" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[HCI]memcpy_s&#160;error @hci_hlp_ram.c(544),ERROR" ID="0x8ba81102" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[HCI] hci_merged_remote_node! @hci_hlp_ram.c(392),ERROR" ID="0x8ba80c42" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI] remove remote exceed upper limit %d addr:%02x:%02x:xx:xx:xx:%02x! @hci_hlp_ram.c(555),ERROR" ID="0x8ba8115a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[HCI]memcpy_s&#160;error @hci_hlp_ram.c(575),ERROR" ID="0x8ba811fa" />
                        </MSG_LOG>
\ No newline at end of file
diff --git a/code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/hfp_ag_ram.c.xml b/code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/hfp_ag_ram.c.xml
new file mode 100644 (file)
index 0000000..fbf1f82
--- /dev/null
@@ -0,0 +1,2 @@
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[HFP]hfp_ag_bcs: HFP_AG_WAIT4_BCSCMD not set, ignore this command. @hfp_ag_ram.c(1154),ERROR" ID="0x8d7a2412" />
+                       </MSG_LOG>
\ No newline at end of file
index 1b2cf27..b2419da 100644 (file)
@@ -1,5 +1,5 @@
 <MSG_LOG><MSG STRUCTURE="diag_log_msg2" NAME="[HFP][GetServiceInfo] connection_number=0x%x, status=0x%x @hfp_fsm_ram.c(292),INFO" ID="0x8be20925" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[T%x][TIMEOUT]SLC NOT ESTABLISHED, TIMER=0x%x @hfp_fsm_ram.c(572),WARNING" ID="0x8be211e3" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[T%x][TIMEOUT]RING OR DIAL, TIMER=0x%x @hfp_fsm_ram.c(578),WARNING" ID="0x8be21213" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[T%x][TIMEOUT]AT CMD, LAST_CMD=0x%x, TIMER=0x%x @hfp_fsm_ram.c(583),WARNING" ID="0x8be2123b" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[T%x][TIMEOUT]SLC NOT ESTABLISHED, TIMER=0x%x @hfp_fsm_ram.c(573),WARNING" ID="0x8be211eb" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[T%x][TIMEOUT]RING OR DIAL, TIMER=0x%x @hfp_fsm_ram.c(579),WARNING" ID="0x8be2121b" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[T%x][TIMEOUT]AT CMD, LAST_CMD=0x%x, TIMER=0x%x @hfp_fsm_ram.c(584),WARNING" ID="0x8be21243" />
                        </MSG_LOG>
\ No newline at end of file
index fc93e15..282f5e5 100644 (file)
@@ -1,6 +1,6 @@
 <MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="smp_pair_new_patch @patch_bth.c(52),INFO" ID="0x8d5401a5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[AVDTP][GET_SEP_FAIL] Can not get sep info @patch_bth.c(156),WARNING" ID="0x8d5404e3" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[STACK][RECV_RING_STOP] @patch_bth.c(244),INFO" ID="0x8d5407a5" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[ATT_GATT] att error rsp opcode:0x%x handle:%d error:0x%x @patch_bth.c(277),ERROR" ID="0x8d5408aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SMP]PAIRING_REQ_RECV @patch_bth.c(506),ERROR" ID="0x8d540fd2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[AVDTP][GET_SEP_FAIL] Can not get sep info @patch_bth.c(157),WARNING" ID="0x8d5404eb" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[STACK][RECV_RING_STOP] @patch_bth.c(245),INFO" ID="0x8d5407ad" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[ATT_GATT] att error rsp opcode:0x%x handle:%d error:0x%x @patch_bth.c(278),ERROR" ID="0x8d5408b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SMP]PAIRING_REQ_RECV @patch_bth.c(507),ERROR" ID="0x8d540fda" />
                        </MSG_LOG>
\ No newline at end of file
index a8b8232..b484efd 100644 (file)
@@ -6,10 +6,10 @@
                        <MSG STRUCTURE="diag_log_msg2" NAME="[BTH][QOS]release ipc:%u fsm_tx:%u. @sdk_hlp.c(129),ERROR" ID="0x8b7a040a" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[BTH][QOS]release hci_rx:%u hci_qos:%u. @sdk_hlp.c(130),ERROR" ID="0x8b7a0412" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[SDK][GAP] CTKD BR link key report, addr=0x%02x:**:**:**:0x%02x:0x%02x @sdk_hlp.c(906),WARNING" ID="0x8b7a1c53" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[SDK][GAP] paired phone exist, dev_handle=0x%x @sdk_hlp.c(912),WARNING" ID="0x8b7a1c83" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="hlp_link_key_req_cbk no source addr:0x%x @sdk_hlp.c(1007),INFO" ID="0x8b7a1f7d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="hlp_connection_ev_cbk_dis_conn hdl:0x%x status:%d @sdk_hlp.c(2162),INFO" ID="0x8b7a4395" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[SDK] connect event cbk connected: %d, reason: %d link_type:%d! @sdk_hlp.c(2184),ERROR" ID="0x8b7a4442" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[SDK] connect event cbk cap:%d addr:%02x******%02x%02x @sdk_hlp.c(2199),ERROR" ID="0x8b7a44ba" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[SDK] connect event cbk status:%d dev_hdl:0x%x @sdk_hlp.c(2202),ERROR" ID="0x8b7a44d2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[SDK][GAP] paired phone exist, dev_handle=0x%x @sdk_hlp.c(913),WARNING" ID="0x8b7a1c8b" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="hlp_link_key_req_cbk no source addr:0x%x @sdk_hlp.c(1012),INFO" ID="0x8b7a1fa5" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="hlp_connection_ev_cbk_dis_conn hdl:0x%x status:%d @sdk_hlp.c(2167),INFO" ID="0x8b7a43bd" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[SDK] connect event cbk connected: %d, reason: %d link_type:%d! @sdk_hlp.c(2189),ERROR" ID="0x8b7a446a" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[SDK] connect event cbk cap:%d addr:%02x******%02x%02x @sdk_hlp.c(2204),ERROR" ID="0x8b7a44e2" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[SDK] connect event cbk status:%d dev_hdl:0x%x @sdk_hlp.c(2207),ERROR" ID="0x8b7a44fa" />
                        </MSG_LOG>
\ No newline at end of file
index 4464517..807cef0 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 11b9eba..02ddfb2 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 1d31253..91cdef9 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 3369daf..bacaa3c 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 7be9c94..7cc5f9f 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 bdfb016..3df28f9 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 9a77e7d..8a914dc 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 a2335f2..79cb1c3 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 785f859..58a913f 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 3cd1b9a..1abdef2 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 1406c4a..6ba40df 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 4528831..2a62b43 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 a220bf2..1dd7bc7 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 3742933..86e6cd3 100644 (file)
@@ -71,7 +71,7 @@ elseif(${OS} STREQUAL "freertos")
         ${CMAKE_CURRENT_SOURCE_DIR}/src/${src_sub}/osal_device.c
         ${CMAKE_CURRENT_SOURCE_DIR}/src/${src_sub}/osal_drvbox.c
         ${CMAKE_CURRENT_SOURCE_DIR}/src/${src_sub}/osal_event.c
-        # ${CMAKE_CURRENT_SOURCE_DIR}/src/${src_sub}/osal_fileops.c
+        ${CMAKE_CURRENT_SOURCE_DIR}/src/${src_sub}/osal_fileops.c
         ${CMAKE_CURRENT_SOURCE_DIR}/src/${src_sub}/osal_interrupt.c
         # ${CMAKE_CURRENT_SOURCE_DIR}/src/${src_sub}/osal_math.c
         ${CMAKE_CURRENT_SOURCE_DIR}/src/${src_sub}/osal_msgqueue.c
diff --git a/code/sdk/kernel/osal/src/freertos/osal_fileops.c b/code/sdk/kernel/osal/src/freertos/osal_fileops.c
new file mode 100644 (file)
index 0000000..d7b73c0
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2022. All rights reserved.
+ */
+
+#include <FreeRTOS.h>
+#include <fcntl.h>
+#include <fs/fs.h>
+#include <fs/file.h>
+#include <unistd.h>
+#include <portable.h>
+
+#include "soc_osal.h"
+#include "osal_inner.h"
+
+void *osal_klib_fopen(const char *filename, int flags, int mode)
+{
+    int *filp = NULL;
+    int fd = open(filename, flags, mode);
+    if (fd < 0) {
+        osal_log("open failed! fd = %d, errno = %d\n", fd, get_errno());
+        return NULL;
+    } else {
+        filp = (int *)pvPortMalloc(sizeof(int));
+        if (filp == NULL) {
+            osal_log("pvPortMalloc failed!\n");
+            close(fd);
+            return NULL;
+        }
+        *filp = fd;
+    }
+    return (void *)filp;
+}
+
+void osal_klib_fclose(void *filp)
+{
+    if (filp == NULL) {
+        osal_log("parameter invalid!\n");
+        return;
+    }
+    close(*(int *)filp);
+    vPortFree(filp);
+}
+
+int osal_klib_fwrite(const char *buf, unsigned long size, void *filp)
+{
+    if (filp == NULL) {
+        osal_log("parameter invalid!\n");
+        return OSAL_FAILURE;
+    }
+    return write(*(int *)filp, buf, size);
+}
+
+int osal_klib_fread(char *buf, unsigned long size, void *filp)
+{
+    if (filp == NULL) {
+        osal_log("parameter invalid!\n");
+        return OSAL_FAILURE;
+    }
+    return read(*(int *)filp, buf, size);
+}
+
+int osal_klib_fseek(long long offset, int whence, void *filp)
+{
+    int ret;
+    off_t res;
+    if (filp == NULL || offset > INT32_MAX) {
+        osal_log("parameter invalid!\n");
+        return OSAL_FAILURE;
+    }
+    res = lseek(*(int *)filp, (off_t)offset, whence);
+    ret = (int)res;
+    if (res != (off_t)ret) {
+        ret = OSAL_EOVERFLOW;
+    }
+    return ret;
+}
\ No newline at end of file
index f703ca6..2494da2 100644 (file)
@@ -12,7 +12,7 @@
 #include "errcode.h"\r
 #include "diag.h"\r
 \r
-#define NV_AUDIO_VQE_PARAM_SIZE 48\r
+#define NV_AUDIO_VQE_PARAM_SIZE 53\r
 \r
 typedef struct {\r
     uint32_t size;\r
index 54d3e0c..4a2f4b5 100644 (file)
@@ -411,6 +411,7 @@ typedef enum {
     IMAGE_CACHE_MANAGER_CPP,
     DISPLAY_VAU_C,
     DISPLAY_GRALLOC_C,
+    DISPLAY_GMMU_C,
     MEM_POOL_LOS_C,
     DISPLAY_LAYER_C,
     CUBE_ROTATE_VIEW_CPP,
@@ -431,6 +432,7 @@ typedef enum {
     UI_COVERFLOW_VIEW2_CPP,
     UI_SLIPFLOW_VIEW_CPP,
     UI_ROLLER_VIEW_CPP,
+    UI_CROSS_VIEW_CPP,
     UI_ICOSAHEDRON_VIEW_CPP,
     UI_MAP_VIEW_CPP,
     MAP_SVG_PARSER_CPP,
@@ -454,6 +456,11 @@ typedef enum {
     UI_LIST_NESTED_CPP,
     UI_PARTICLE_VIEW_CPP,
     PARTICLE_CELL_CPP,
+    VIDEOCARD_CPP,
+    DIALBINPARSERV3_CPP,
+    DIALTIMEPUBLISHER_CPP,
+    DIALSEQUENCECONTAINER_CPP,
+    WATCHINTERFACE_CPP,
     FILE_ID_MAX = 1024,
 } log_file_list_enum_gui_t;
 #endif
index 9af7894..815babf 100644 (file)
 /* gpu cmd [0xa0, 0xaf] */\r
 #define DIAG_CMD_GPU_VAU_PROC          diag_cmd_id_comb(0xa0)\r
 #define DIAG_CMD_GPU_DPU_PROC          diag_cmd_id_comb(0xa1)\r
-#define DIAG_CMD_GPU_GMMU_PROC         diag_cmd_id_comb(0xa2)\r
 #define DIAG_CMD_GPU_JPEG_PROC         diag_cmd_id_comb(0xa3)\r
 #define DIAG_CMD_GPU_DPU_PRINT         diag_cmd_id_comb(0xa4)\r
 \r
index c7bcde5..55fd5ce 100644 (file)
 #include "sys/stat.h"
 #include "fcntl.h"
 #include "unistd.h"
+#include "stdio.h"
+#if defined(BUILD_APPLICATION_STANDARD) && !defined(BUILD_RECOVERY_IMAGE)
+#include "diag_filter.h"
+#endif
 
 #define STATUS_ADDRESS  0x5702C1E8
 #define VBUS_INSERT_POS 4
 #define PWREN_PRESS_POS 3
+#define B_IS_WAKE_UP_REG 0x57000500
+#define B_MAINTENANCE_1 0x59008500
+#define B_MAINTENANCE_2 0x570007a4
+#define B_MAINTENANCE_3 0x570007a0
+#define B_MAINTENANCE_PC_L 0x570007a8
+#define B_MAINTENANCE_PC_H 0x570007ac
 
 bool is_first_power_on(void)
 {
@@ -100,4 +110,22 @@ int32_t write_fileinfo(const char *path, uint32_t offset, const uint8_t *buf, ui
         return -1;
     }
     return len;
+}
+
+void config_maintenance_b_function(void)
+{
+#if defined(BUILD_APPLICATION_STANDARD) && !defined(BUILD_RECOVERY_IMAGE)
+    diag_highest_level_proc(2);
+    while(readw(B_IS_WAKE_UP_REG) != 0) {
+        diag_highest_level_proc(2);
+    }
+    writew(B_MAINTENANCE_1,1);
+    uint8_t before = readb(B_MAINTENANCE_2);
+    before = before | 0x1;
+    writeb(B_MAINTENANCE_2, before);
+    printf("0x59008500 %x \r\n", readw(B_MAINTENANCE_1));
+    printf("0x570007a4 %x \r\n", readw(B_MAINTENANCE_2));
+    printf("0x570007a0 %x \r\n", readw(B_MAINTENANCE_3));
+    printf("0x570007a8 =%x,0x570007ac =%x \r\n", readw(0x570007a8), readw(0x570007ac));
+#endif
 }
\ No newline at end of file
index 003e01a..ffc4f66 100644 (file)
@@ -34,4 +34,10 @@ bool is_pwren_press(void);
  * @return write length
  */
 int32_t write_fileinfo(const char *path, uint32_t offset, const uint8_t *buf, uint32_t size);
+
+/**
+ * @brief Configure B-core maintenance function
+ * @return null
+ */
+void config_maintenance_b_function(void);
 #endif
index 28531fe..02e2775 100644 (file)
@@ -8,34 +8,38 @@
 
 #include "chip_system_time.h"
 
-#define SECONDS_PER_MINUTE      60 /* second per minute */
-#define MINUTES_PER_HOUR        60   /* second per minute */
-#define MSEC_PER_SEC            1000
-#define USEC_PER_MSEC           1000
-#define TZ_ADDRESS              0x5702C014
-#define MAX_TIMEZONE_HOURS      24
-#define TIME_MAX                64
+#define SECONDS_PER_MINUTE 60 /* second per minute */
+#define MINUTES_PER_HOUR 60   /* second per minute */
+#define MSEC_PER_SEC 1000
+#define USEC_PER_MSEC 1000
+#define TZ_ADDRESS 0x5702C014
+#define MAX_TIMEZONE_HOURS 24
+#define TIME_MAX 64
+#define ONE_DAY_MIN 1440
+#define BEIJING_TIMEZONE 480
+#define MIN_INTERVAL 15
+#define CUSTOM_PER_HOUR (60 / MIN_INTERVAL)
 
 void print_time(calendar_t *date)
 {
     printf("CALLENDAR:year = %d, month = %d, day = %d, hour = %d, minute = %d, second = %d \r\n",
-        date->year,
-        date->mon,
-        date->day,
-        date->hour,
-        date->min,
-        date->sec);
+           date->year,
+           date->mon,
+           date->day,
+           date->hour,
+           date->min,
+           date->sec);
 }
 
 void print_time_2(struct tm *date)
 {
     printf("TM:year = %d, month = %d, day = %d, hour = %d, minute = %d, second = %d \r\n",
-        date->tm_year + 1900,
-        date->tm_mon,
-        date->tm_mday,
-        date->tm_hour,
-        date->tm_min,
-        date->tm_sec);
+           date->tm_year,
+           date->tm_mon,
+           date->tm_mday,
+           date->tm_hour,
+           date->tm_min,
+           date->tm_sec);
 }
 
 static uint16_t get_timezone(void)
@@ -50,6 +54,24 @@ static void set_timezone(uint16_t timezone)
     writew(TZ_ADDRESS, tz_zone);
 }
 
+int get_timezone_min(void)
+{
+    uint16_t sdk_zone = get_timezone();
+    if (sdk_zone > (CUSTOM_PER_HOUR * MAX_TIMEZONE_HOURS))
+        return BEIJING_TIMEZONE;
+    int zone = 0;
+    // 东边 1-12H, 西边 13-24H
+    if (sdk_zone > (12 * CUSTOM_PER_HOUR)) // 西边
+    {
+        zone = (sdk_zone - (12 * CUSTOM_PER_HOUR)) * MIN_INTERVAL * (-1);
+    }
+    else // 东边
+    {
+        zone = sdk_zone * MIN_INTERVAL;
+    }
+    return zone;
+}
+
 void save_time(void)
 {
     uint64_t time_sec = get_local_timestamp();
@@ -57,7 +79,7 @@ void save_time(void)
     uapi_calendar_set_timestamp(time_sec);
 }
 
-uint32_t get_current_timestamp(void)
+uint32_t get_current_timestamp(void) // 0时区timestamp
 {
     uint32_t timestamp = 0;
     struct timeval current_time = {0};
@@ -70,22 +92,26 @@ uint32_t get_current_timestamp(void)
     return timestamp;
 }
 
-uint32_t get_local_timestamp(void)
+uint32_t get_local_timestamp(void) // 本地时区timestamp
 {
-    uint32_t timestamp = get_current_timestamp() + get_timezone() * MINUTES_PER_HOUR * SECONDS_PER_MINUTE;
+    uint32_t timestamp = get_current_timestamp() + get_timezone_min() * SECONDS_PER_MINUTE;
     return timestamp;
 }
 
-void get_current_time(struct timeval *tv, struct tm *tm)
+void get_local_time(struct tm *tm)
 {
-    char timebuf[TIME_MAX] = {0};
-    if (gettimeofday(tv, NULL)) {
-        return;
-    }
-    localtime_r(&tv->tv_sec, tm);
+    uint32_t timestamp = get_current_timestamp();
+    localtime_r(&timestamp, tm);
+    tm->tm_year = tm->tm_year + 1900,
+    tm->tm_mon = tm->tm_mon + 1;
+}
+
+void get_current_time(struct tm *tm)
+{
+    uint32_t timestamp = get_current_timestamp() - (get_timezone_min() * 60);
+    localtime_r(&timestamp, tm);
+    tm->tm_year = tm->tm_year + 1900,
     tm->tm_mon = tm->tm_mon + 1;
-    printf("get_current_time tv_tv_sec = %d \r\n", tv->tv_sec);
-    print_time_2(tm);
 }
 
 void restore_time(void)
@@ -97,55 +123,59 @@ void restore_time(void)
     uapi_calendar_get_timestamp(&sec);
     printf("callendar timestamp = %lld \r\n", sec);
     sec = sec / MSEC_PER_SEC;
-    sync_time(sec, get_timezone());
+    // 东边 1-12H, 西边 13-24H, 需在这里转换成 -1到-12
+    uint16_t timezone = get_timezone();
+    int timezone_trans = timezone > (12 * CUSTOM_PER_HOUR) ? ((timezone - (12 * CUSTOM_PER_HOUR)) * (-1)) : timezone;
+    timezone_trans *= MIN_INTERVAL;
+    sync_time(sec, timezone_trans);
 }
 
-uint32_t sync_time(uint32_t timestamp, uint32_t timezone)
+uint32_t sync_time(uint32_t timestamp, int timezone)
 {
     printf("sync time timestamp %d, timezone %d \r\n", timestamp, timezone);
     uint32_t seconds;
-    if (timezone > MAX_TIMEZONE_HOURS) {
+    if (timezone > ONE_DAY_MIN) {
         return ERRCODE_FAIL;
     }
     if (timestamp == 0) {
         return ERRCODE_FAIL;
-    } else if (timestamp <= (timezone * MINUTES_PER_HOUR * SECONDS_PER_MINUTE)) {
-        seconds = 0;
     } else {
-        seconds = timestamp - (timezone * MINUTES_PER_HOUR * SECONDS_PER_MINUTE);
+        seconds = timestamp - (timezone * SECONDS_PER_MINUTE);
     }
-    set_timezone(timezone);
+
+    // 东边1-12H, 西边13-24H
+    uint32_t timezone_trans = (timezone / MIN_INTERVAL) < 0 ? abs(timezone / MIN_INTERVAL) + (12 * CUSTOM_PER_HOUR) : (timezone / MIN_INTERVAL);
+    set_timezone(timezone_trans);
     struct timeval tv = {0};
     struct timezone tzone = {0};
     tv.tv_sec = seconds;
     tv.tv_usec = 0;
     tzone.tz_dsttime = 0;
-    tzone.tz_minuteswest = timezone * MINUTES_PER_HOUR;
+    tzone.tz_minuteswest = timezone;
     return settimeofday(&tv, &tzone);
 }
 
 void test_bandy_time(void)
 {
     struct tm tm;
-    struct timeval tv;
-    uint32_t time = 1716044461;  // 2024-5-18 15:1:1
+    uint32_t time = 1716044461; // 2024-5-18 15:1:1
     printf("--------SYNC TIME----------\r\n");
     get_current_timestamp();
-    get_current_time(&tv, &tm);
-    sync_time(time, 8);
+    get_current_time(&tm);
+    sync_time(time, 480);
     get_current_timestamp();
-    get_current_time(&tv, &tm);
+    get_current_time(&tm);
     printf("--------SAVE TIME----------\r\n");
     get_current_timestamp();
-    get_current_time(&tv, &tm);
+    get_current_time(&tm);
     save_time();
     get_current_timestamp();
-    get_current_time(&tv, &tm);
+    get_current_time(&tm);
     printf("--------RESTORE TIME----------\r\n");
     get_current_timestamp();
-    get_current_time(&tv, &tm);
+    get_current_time(&tm);
     restore_time();
     get_current_timestamp();
-    get_current_time(&tv, &tm);
+    get_current_time(&tm);
 }
-#endif
\ No newline at end of file
+#endif
index d2f2e77..66eb436 100644 (file)
@@ -7,6 +7,11 @@
 #ifndef CHIP_SYSTEM_TIME_H
 #define CHIP_SYSTEM_TIME_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #ifndef BUILD_APPLICATION_SSB
 #include <stdio.h>
 #include <stdint.h>
@@ -38,7 +43,9 @@ uint32_t get_current_timestamp(void);
  * @brief  Get the current system time as a timeval struct and a tm
  * @return void.
  */
-void get_current_time(struct timeval *tv, struct tm *tm);
+void get_current_time(struct tm *tm);
+
+void get_local_time(struct tm *tm);
 
 /**
  * @brief  Restore the system time from the saved non-volatile
@@ -46,17 +53,23 @@ void get_current_time(struct timeval *tv, struct tm *tm);
  */
 void restore_time(void);
 
+/**
+ * @brief  get timezone minute
+ * @return timezone minute.
+ */
+int get_timezone_min(void);
+
 /**
  * @brief  Synchronize the system time with the given timestamp and timezone
  * @return void.
  */
-uint32_t sync_time(uint32_t timestamp, uint32_t timezone);
+uint32_t sync_time(uint32_t timestamp, int timezone);
 
 /**
  * @brief  use for test
  * @return void.
  */
-void test_time(void);
+void test_bandy_time(void);
 
 /**
  * @brief  Get the current system time as a local timestamp with timezone offset
@@ -64,4 +77,8 @@ void test_time(void);
  */
 uint32_t get_local_timestamp(void);
 #endif
-#endif
\ No newline at end of file
+
+#ifdef __cplusplus
+}
+#endif
+#endif
index f9947f2..7b85e99 100644 (file)
             "key_status": "alive",
             "structure_type": "audio_vqe_param_t",
             "attributions": 1,
-            "value": [48, [0, 0, 0, 0, 16843009, 33620225, 16000, 16000,
-                1024, 100, 0, 0, 16842753, 257, 257, 256,
+            "value": [53, [0, 0, 0, 0, 16843009, 33620225, 16000, 16000,
+                1024, 100, 0, 0, 16842753, 65793, 257, 256,
                 16778116, 16844032, 4, 0, 458824, 11796580, 327946, 1310720005,
                 65576964, 1000, 21499085, 67108874, 327680, 655367, 2126009683, 654734439,
                 1, 0, 0, 0, 0, 0, 5308380, 655336,
-                4286447619, 64536, 500, 16384, 3277, 0, 66049, 0]]
+                4286447619, 64536, 500, 16384, 3277, 0, 66049, 0,
+                16711166, 2, 34145024, 33751810, 0]]
         },
         "audio_vqe_kws_param":{
             "key_id": "0x320D",
             "key_status": "alive",
             "structure_type": "audio_vqe_param_t",
             "attributions": 1,
-            "value": [48, [0, 0, 0, 0, 16843009, 33554689, 16000, 16000,
-                1024, 100, 1985229328, 1985229328, 16843009, 257, 257, 256,
+            "value": [53, [0, 0, 0, 0, 16843009, 33554689, 16000, 16000,
+                1024, 100, 1985229328, 1985229328, 16843009, 65793, 257, 256,
                 16778116, 1280, 4, 0, 458824, 11796580, 327690, 13107205,
                 65576964, 1000, 679102459, 67108874, 327680, 655367, 2126009683,
                 654734439, 1, 0, 0, 0, 0, 0, 10551272, 655336, 4286447619, 64536,
-                500, 16384, 3277, 0, 66049, 0]]
+                500, 16384, 3277, 0, 66049, 0,
+                16711166, 2, 34145024, 33751810, 0]]
         }
     }
 }
index c577233..05cb8c9 100644 (file)
             "key_status": "alive",
             "structure_type": "audio_vqe_param_t",
             "attributions": 1,
-            "value": [48, [0, 0, 0, 0, 16843009, 33620225, 16000, 16000,
-                1024, 100, 0, 0, 16842753, 257, 257, 256,
+            "value": [53, [0, 0, 0, 0, 16843009, 33620225, 16000, 16000,
+                1024, 100, 0, 0, 16842753, 65793, 257, 256,
                 16778116, 16844032, 4, 0, 458824, 11796580, 327946, 1310720005,
                 65576964, 1000, 21499085, 67108874, 327680, 655367, 2126009683, 654734439,
                 1, 0, 0, 0, 0, 0, 5308380, 655336,
-                4286447619, 64536, 500, 16384, 3277, 0, 66049, 0]]
+                4286447619, 64536, 500, 16384, 3277, 0, 66049, 0,
+                16711166, 2, 34145024, 33751810, 0]]
         },
         "audio_vqe_kws_param":{
             "key_id": "0x320D",
             "key_status": "alive",
             "structure_type": "audio_vqe_param_t",
             "attributions": 1,
-            "value": [48, [0, 0, 0, 0, 16843009, 33554689, 16000, 16000,
-                1024, 100, 1985229328, 1985229328, 16843009, 257, 257, 256,
+            "value": [53, [0, 0, 0, 0, 16843009, 33554689, 16000, 16000,
+                1024, 100, 1985229328, 1985229328, 16843009, 65793, 257, 256,
                 16778116, 1280, 4, 0, 458824, 11796580, 327690, 13107205,
                 65576964, 1000, 679102459, 67108874, 327680, 655367, 2126009683,
                 654734439, 1, 0, 0, 0, 0, 0, 10551272, 655336, 4286447619, 64536,
-                500, 16384, 3277, 0, 66049, 0]]
+                500, 16384, 3277, 0, 66049, 0,
+                16711166, 2, 34145024, 33751810, 0]]
         }
     }
 }
index 2f3fc7d..e409bf7 100644 (file)
@@ -96,7 +96,7 @@ typedef struct {
 } bth_product_data_config_t;\r
 \r
 /* 3A prams */\r
-#define NV_AUDIO_VQE_PARAM_SIZE 48\r
+#define NV_AUDIO_VQE_PARAM_SIZE 53\r
 typedef struct {\r
     uint32_t size;\r
     uint32_t data[NV_AUDIO_VQE_PARAM_SIZE];\r
index 5c73dc2..150c65d 100644 (file)
@@ -15,6 +15,7 @@
 #include "watchdog_porting.h"
 #include "securec.h"
 #include "pmu_interrupt.h"
+#include "calendar_porting.h"
 
 typedef struct {
     uint32_t           slp_ms;
@@ -169,6 +170,7 @@ void uapi_sys_force_mcu_only_deep_sleep_mode(uint32_t arg)
 
 void uapi_sys_shipmode(uint32_t arg)
 {
+    uapi_calendar_calibration_enable();
     UNUSED(arg);
     uint32_t irq = osal_irq_lock();
     uapi_pm_control(PM_BT_POWER_OFF);
index c5fda75..5c49a66 100644 (file)
@@ -139,6 +139,10 @@ void pm_core_suspend(void)
     uapi_dma_close();
     uapi_dma_deinit();
     display_suspend();
+
+#if defined(CFG_DRIVERS_MMC) || defined(CFG_DRIVERS_SDIO)
+    mmc_sdhci_suspend();
+#endif
     storage_device_suspend();
     opi_psram_suspend();
     qspi0_suspend();
@@ -166,7 +170,9 @@ void pm_core_suspend_min(void)
     uart_h1_suspend();
     uapi_dma_close();
     uapi_dma_deinit();
-
+#if defined(CFG_DRIVERS_MMC) || defined(CFG_DRIVERS_SDIO)
+    mmc_sdhci_suspend();
+#endif
     storage_device_suspend();
     opi_psram_suspend();
     qspi0_suspend();
@@ -213,6 +219,9 @@ void pm_core_resume_min(void)
     clocks_system_resume_clock();
     uapi_dma_init();
     uapi_dma_open();
+#if defined(CFG_DRIVERS_MMC) || defined(CFG_DRIVERS_SDIO)
+    mmc_sdhci_resume();
+#endif
     storage_device_resume();
 
     reg16_setbit(0x520003e4, 0x0); // set mcpu_clken_slp in MSUB_SLP_CFG
@@ -256,6 +265,9 @@ void pm_core_resume(void)
     uapi_dma_init();
     uapi_dma_open();
     cpu_trace_enable_mcpu_repeat();
+#if defined(CFG_DRIVERS_MMC) || defined(CFG_DRIVERS_SDIO)
+    mmc_sdhci_resume();
+#endif
     storage_device_resume();
     display_resume();
     if (non_os_get_nmi_raw_status() == 0x2) {
index 7b33a9e..5ec95f8 100644 (file)
@@ -15,9 +15,7 @@
 #include "i2c_porting.h"
 #include "spi_porting.h"
 #include "uart_porting.h"
-#ifdef CFG_DRIVERS_MMC
 #include "soc_mmc.h"
-#endif
 #include "chip_io.h"
 
 #define UART_SUSPEND_REGS_NUM     8
@@ -68,8 +66,6 @@ void storage_device_suspend(void)
 #ifdef CFG_DRIVERS_NANDFLASH
     reg16_setbit(QSPI1_NANDFLASH_CS0_PAD, PAD_PS_BIT);
     reg16_setbit(QSPI1_NANDFLASH_CS0_PAD, PAD_PE_BIT); // make CS1 to high in deepsleep.
-#elif defined (CFG_DRIVERS_MMC)
-    emmc_save_info();
 #endif
 }
 
@@ -129,10 +125,6 @@ void display_suspend(void)
 #ifndef QSPI_DISPLAY
         ret = drv_dpu_suspend(NULL);
         if (ret != 0) { PRINT("drv dpu suspend ret =%d\n", ret); }
-#endif
-#ifdef SUPPORT_GPU_GMMU
-        ret = drv_gmmu_suspend(NULL);
-        if (ret != 0) { PRINT("drv_gmmu_suspend ret =%d\n", ret); }
 #endif
         lcd_bus_api *bus_api = lcd_get_bus_api();
         ret = bus_api->bus_suspend();
@@ -175,9 +167,6 @@ void display_resume(void)
         (void)drv_jpeg_resume(NULL);
 #endif
         (void)drv_vau_resume(NULL);
-#ifdef SUPPORT_GPU_GMMU
-        (void)drv_gmmu_resume(NULL);
-#endif
         if (g_resume_touch_flag != 0) { touch_resume_for_i2c(); }
     }
 #endif
@@ -199,11 +188,11 @@ void pm_misc_regs_resume(void)
     writel(M_AXI_BRG_LP_CFG0, M_AXI_BRG_LP_DEFAULT_VAL); // M_axi
     writel(EFUSE_CTL_CFG, EFUSE_ALL_ENABLE);    // enable efuse
 #ifdef CFG_DRIVERS_NANDFLASH
-    reg16_clrbit(PM_SD_HOST_CCLK_DIV_REG, 0); // close sd host clock enable.
-    reg16_clrbit(PM_EMMC_CCLK_DIV_REG, 0); // close sd mmc clock enable.
+    reg16_clrbit(EMMC_CCLK_DIV_REG, 0); // close sd mmc clock enable.
 #endif
-#ifdef CFG_DRIVERS_MMC
-    reg16_clrbit(PM_SD_HOST_CCLK_DIV_REG, 0); // close sd host clock enable.
+
+#ifndef CFG_DRIVERS_SDIO
+    reg16_clrbit(SD_HOST_CCLK_DIV_REG, 0); // close sdio host clock enable.
 #endif
     hal_pmu_set_cmu_xo_trim(HAL_PMU_XO_CORE_DS_1_025X);
 }
index 3394049..ab8d0d9 100644 (file)
@@ -6,9 +6,6 @@ add_subdirectory(dpu)
 add_subdirectory(vau)
 add_subdirectory(rm)
 
-if("SUPPORT_GPU_GMMU" IN_LIST DEFINES)
-    add_subdirectory(gmmu)
-endif()
 if("SUPPORT_GPU_OPENVG" IN_LIST DEFINES)
     add_subdirectory(openvg)
 endif()
index c6faaf1..80c61ab 100644 (file)
@@ -1,10 +1,23 @@
 set(COMPONENT_NAME "gfx_rm")\r
 \r
 set(SOURCES\r
-    ${CMAKE_CURRENT_SOURCE_DIR}/src/vau_stroke_dash.c\r
-    ${CMAKE_CURRENT_SOURCE_DIR}/src/vau_arc.c\r
-    ${CMAKE_CURRENT_SOURCE_DIR}/src/vau_stroke_path.c\r
-    ${CMAKE_CURRENT_SOURCE_DIR}/src/vau_math.c\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/rm/src/vau_stroke_dash.c\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/rm/src/vau_arc.c\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/rm/src/vau_stroke_path.c\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/rm/src/vau_math.c\r
+\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/drv/clock/gmmu_clock.c\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/drv/context/gmmu_context.c\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/drv/dev/gmmu_dev.c\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/drv/dfx/gmmu_dfx.c\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/drv/hal/gmmu_hal.c\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/drv/intf/drv_gmmu_intf.c\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/drv/ioctl/gmmu_ioctl.c\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/drv/isr/gmmu_isr.c\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/drv/mem/gmmu_mem.c\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/drv/base/gmmu_comm.c\r
+\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/api/src/soc_gmmu_api.c\r
 )\r
 \r
 set(PUBLIC_HEADER\r
@@ -15,7 +28,23 @@ set(PRIVATE_HEADER
     ${ROOT_DIR}/middleware/utils/common_headers/drivers/gpu\r
     ${ROOT_DIR}/middleware/services/gpu/api/vau/debug\r
     ${ROOT_DIR}/middleware/services/gpu/drv/vau/mem\r
-    ${CMAKE_CURRENT_SOURCE_DIR}/inc\r
+    ${ROOT_DIR}/middleware/services/gpu/drv/comm\r
+    ${ROOT_DIR}/middleware/services/gpu/drv/include/\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/rm/inc\r
+\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/drv/base\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/drv/clock\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/drv/context\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/drv/dev\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/drv/dfx\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/drv/hal\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/drv/include\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/drv/intf\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/drv/ioctl\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/drv/isr\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/drv/mem\r
+\r
+    ${CMAKE_CURRENT_SOURCE_DIR}/gmmu/api/inc\r
 )\r
 \r
 set(PUBLIC_DEFINES\r
index f4bfdaa..c6dbfdd 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 e43cf5e..86859b7 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 fa2aee1..4adaa7e 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 d4ddcbd..deccbf1 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 fa2aee1..4adaa7e 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
index fa2aee1..4adaa7e 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-xts-r/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-xts-r/libgfx_rm.a differ
index d4ddcbd..deccbf1 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-xts/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-xts/libgfx_rm.a differ
index d4ddcbd..deccbf1 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 4bf6cdc..e29c3e3 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 bf6ac5b..350f9fb 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 9ef1e0a..084c2e9 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 47710ae..0c0b185 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 7d97848..3d9e75b 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 0df0a29..0c52ab9 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 94b8bb3..2322484 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 b73c4b2..90be983 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 ed1e9d9..7428413 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
diff --git a/code/sdk/middleware/services/gpu/api/rm/gmmu/api/inc/soc_gmmu_api.h b/code/sdk/middleware/services/gpu/api/rm/gmmu/api/inc/soc_gmmu_api.h
new file mode 100644 (file)
index 0000000..cf46df3
--- /dev/null
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2023. All rights reserved.
+ * Description:   gmmu api interface
+ * Author:
+ * Create:  2021-10-15
+ */
+
+#ifndef SOC_GMMU_API_H
+#define SOC_GMMU_API_H
+
+#include "td_type.h"
+
+#ifdef __cplusplus
+#if __cplusplus
+extern "C" {
+#endif
+#endif
+
+/**
+ * @defgroup gmmu_type gmmu_type
+ * @ingroup  gpu_api
+ * @{
+ */
+
+/*-------------------------------- macro define -------------------------------------------*/
+
+#define GMMU_BUF_CNT 2
+
+/*-------------------------------- struct define ------------------------------------------*/
+
+/**
+ * @if Eng
+ * @brief  Gmmu memory attributes.
+ * @else
+ * @brief  gmmu内存属性
+ * @endif
+ */
+typedef struct gmmu_attr_struct {
+    td_u8 bpp;        /*!< @if Eng Pixel Depth.
+                           @else   像素深度 @endif */
+    td_u32 width;     /*!< @if Eng Memory Width.
+                           @else   内存宽度 @endif */
+    td_u32 height;    /*!< @if Eng Memory height.
+                           @else   内存高度 @endif */
+    td_u8  offset;    /*!< @if Eng Pixel offset for fine tuning lut contours.
+                           @else   像素偏移,用于微调lut轮廓 @endif */
+} *gmmu_attr_ptr;
+
+/**
+ * @if Eng
+ * @brief  gmmu buffer attribute.
+ * @else
+ * @brief  gmmu buffer属性
+ * @endif
+ */
+typedef struct gmmu_buf_struct {
+    td_u32 stride;               /*!< @if Eng Gmmu buffer line spacing.
+                                      @else   gmmu buffer行间距 @endif */
+    td_u32 size;                 /*!< @if Eng Pixel Depth.
+                                      @else   gmmu buffer 大小@endif */
+    td_u32 buffer[GMMU_BUF_CNT]; /*!< @if Eng Pixel Depth.
+                                      @else   gmmu buffer地址 @endif */
+} *gmmu_buf_ptr;
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup gmmu_api gmmu_api
+ * @ingroup  gpu_api
+ * @{
+ */
+
+/*-------------------------------- func declares ------------------------------------------*/
+
+/**
+ * @if Eng
+ * @brief  Initializing the Gmmu Memory.
+ * @param  [in]  Width, height, and pixel depth required for memory initialization.
+ * @retval EXT_SUCCESS   Success.
+ * @retval Other         Failure.
+ * @else
+ * @brief  Gmmu 内存初始化
+ * @param  [in]  gmmu_attr 内存初始化需要的宽高,像素深度信息
+ * @retval EXT_SUCCESS   成功
+ * @retval Other         失败
+ * @endif
+ */
+td_s32  uapi_gmmu_init(const gmmu_attr_ptr gmmu_attr);
+
+/**
+ * @if Eng
+ * @brief  Gmmu Memory Deinitialization.
+ * @else
+ * @brief  Gmmu 内存去初始化
+ * @endif
+ */
+td_void uapi_gmmu_deinit(td_void);
+
+/**
+ * @if Eng
+ * @brief  Gmmu buffer application.
+ * @param  [in]  gmmu_buf Memory information about the gmmu buffer
+ * @else
+ * @brief  Gmmu 内存申请
+ * @param  [in]  gmmu_buf gmmu buffer的内存信息
+ * @endif
+ */
+td_void uapi_gmmu_alloc(gmmu_buf_ptr gmmu_buf);
+
+/**
+ * @if Eng
+ * @brief  Gmmu buffer free.
+ * @param  [in]  gmmu_buf Memory information about the gmmu buffer
+ * @else
+ * @brief  Gmmu 内存释放
+ * @param  [in]  gmmu_buf gmmu buffer的内存信息
+ * @endif
+ */
+td_void uapi_gmmu_free(gmmu_buf_ptr gmmu_buf);
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+#if __cplusplus
+}
+#endif
+#endif
+
+#endif /* SOC_GMMU_API_H */
diff --git a/code/sdk/middleware/services/gpu/api/rm/gmmu/drv/include/drv_gmmu_intf.h b/code/sdk/middleware/services/gpu/api/rm/gmmu/drv/include/drv_gmmu_intf.h
new file mode 100644 (file)
index 0000000..0b0724e
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) @CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: drv gmmu intf
+ */
+
+#ifndef DRV_GRAPHICS_DRV_GMMU_INTF_H
+#define DRV_GRAPHICS_DRV_GMMU_INTF_H
+
+#include "td_type.h"
+
+#ifdef __cplusplus
+#if __cplusplus
+extern "C" {
+#endif
+#endif
+
+/*-------------------------------- macro define -------------------------------------------*/
+
+typedef td_s32 (*pfn_gmmu_suspend)(td_void);
+typedef td_s32 (*pfn_gmmu_resume)(td_void);
+
+/*-------------------------------- struct define ------------------------------------------*/
+
+typedef struct {
+    pfn_gmmu_suspend suspend;
+    pfn_gmmu_resume  resume;
+} drv_gmmu_export_func;
+
+/*-------------------------------- func declares ------------------------------------------*/
+
+td_s32 drv_gmmu_module_init(td_void);
+td_void drv_gmmu_module_exit(td_void);
+
+td_s32 drv_gmmu_suspend(td_void *private_data);
+td_s32 drv_gmmu_resume(td_void *private_data);
+
+#ifdef __cplusplus
+#if __cplusplus
+}
+#endif
+#endif
+
+#endif /* DRV_GRAPHICS_DRV_GMMU_INTF_H */
diff --git a/code/sdk/middleware/services/gpu/api/rm/gmmu/drv/include/drv_gmmu_ioctl.h b/code/sdk/middleware/services/gpu/api/rm/gmmu/drv/include/drv_gmmu_ioctl.h
new file mode 100644 (file)
index 0000000..ed3528a
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) @CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: drv gmmu ioctl
+ */
+
+#ifndef DRV_GRAPHICS_DRV_GMMU_IOCTL_H
+#define DRV_GRAPHICS_DRV_GMMU_IOCTL_H
+
+#include <stdio.h>
+#include "td_base.h"
+#include "drv_gmmu_struct.h"
+
+#ifdef __cplusplus
+#if __cplusplus
+extern "C" {
+#endif
+#endif
+
+/*-------------------------------- macro define -------------------------------------------*/
+
+#define GMMU_DEV_NAME  "/dev/gmmu"
+
+#define DRV_GMMU_CMD_CONFIG  0
+
+td_s32 gmmu_open(const td_char *path_name, td_s32 flags, td_s32 mode);
+td_s32 gmmu_ioctl(td_s32 module_idx, td_ulong ioctl_cmd, td_void *para);
+td_s32 gmmu_close(td_s32 module_idx);
+
+#ifdef __cplusplus
+#if __cplusplus
+}
+#endif
+#endif
+
+#endif /* DRV_GRAPHICS_DRV_GMMU_IOCTL_H */
diff --git a/code/sdk/middleware/services/gpu/api/rm/gmmu/drv/include/drv_gmmu_struct.h b/code/sdk/middleware/services/gpu/api/rm/gmmu/drv/include/drv_gmmu_struct.h
new file mode 100644 (file)
index 0000000..2b10a0f
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) @CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: drv gmmu struct
+ */
+
+#ifndef DRV_GRAPHICS_DRV_GMMU_STRUCT_H
+#define DRV_GRAPHICS_DRV_GMMU_STRUCT_H
+
+#include "td_type.h"
+
+#ifdef __cplusplus
+#if __cplusplus
+extern "C" {
+#endif
+#endif
+
+/*-------------------------------- macro define -------------------------------------------*/
+
+#define DRV_GMMU_MASK   0x0123456789ABCDEF
+
+/*-------------------------------- struct define ------------------------------------------*/
+
+typedef struct {
+    td_u64 mask;
+    td_u8 input_bpp;
+    td_u32 input_width;
+    td_u32 input_height;
+    td_u8 offset;
+    td_u32 output_size;
+    td_u32 output_stride;
+    td_u32 output_addr0;
+    td_u32 output_addr1;
+} drv_gmmu_mgr;
+
+/*-------------------------------- func declares ------------------------------------------*/
+
+#ifdef __cplusplus
+#if __cplusplus
+}
+#endif
+#endif
+
+#endif /* DRV_GRAPHICS_DRV_GMMU_STRUCT_H */
diff --git a/code/sdk/middleware/services/gpu/api/rm/rm/inc/vau_arc.h b/code/sdk/middleware/services/gpu/api/rm/rm/inc/vau_arc.h
new file mode 100644 (file)
index 0000000..7bace23
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) @CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: vau_arc
+ */
+
+#ifndef RM_BASIC_ARC_H
+#define RM_BASIC_ARC_H
+
+#include "soc_vau_type.h"
+
+#ifdef __cplusplus
+#if __cplusplus
+extern "C" {
+#endif
+#endif
+
+#ifndef CIRCLE_TO_BEZIER_H_90_DEG
+#define CIRCLE_TO_BEZIER_H_90_DEG 0.551915024494f
+#endif
+
+typedef struct {
+    float x;
+    float y;
+} float_point;
+
+typedef struct {
+    float rx;
+    float ry;
+    td_float cos_phi;
+    td_float sin_phi;
+    td_float xhalf;
+    td_float yhalf;
+    td_float x1p;
+    td_float y1p;
+    float_point r2;
+    td_float x12p;
+    td_float y12p;
+    td_float cr;
+    td_float dq;
+    td_float pq;
+    td_float sc;
+    td_float cxp;
+    td_float cyp;
+    td_float cx;
+    td_float cy;
+    td_float theta;
+    td_float delta;
+} local_arc_params;
+
+typedef struct {
+    float_point en1;
+    float_point en2;
+    float_point edn1;
+    float_point edn2;
+    td_u8 split_len;
+    td_u8 t_len;
+    td_float alpha;
+    td_float step;
+    td_float alpha_t;
+    td_float theta;
+    td_float delta;
+    float_point r;
+    float_point c;
+    float_point angles;
+    td_float cos_phi;
+    td_float sin_phi;
+    td_float interval;
+} local_bezier_points;
+
+float_point *create_arc_utility(const float_point *center, float r, float start_angle, float angle_extend, int *num);
+float_point *create_arc_cmd(const float_point *start, const float_point *end, unsigned char cmd, float r, int *num);
+void destroy_arc_path(float_point *cubic);
+td_s32 vau_draw_create_arc_fit_path(const ext_vau_path *org, ext_vau_path *fit);
+td_void vau_draw_destroy_arc_fit_path(ext_vau_path *path);
+float_point *create_elliptical_arc_utility(float_point p[2], unsigned char cmd, float_point r, float phi, int *num);
+
+#ifdef __cplusplus
+#if __cplusplus
+}
+#endif
+#endif
+
+#endif /* RM_BASIC_ARC_H */
diff --git a/code/sdk/middleware/services/gpu/api/rm/rm/inc/vau_math.h b/code/sdk/middleware/services/gpu/api/rm/rm/inc/vau_math.h
new file mode 100644 (file)
index 0000000..f038bb7
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) @CompanyNameMagicTag 2022-2022. All rights reserved.
+ * Description : vau math file
+ */
+
+#ifndef API_RM_VAU_MATH_H
+#define API_RM_VAU_MATH_H
+
+#include <math.h>
+#include "td_base.h"
+#include "soc_vau_type.h"
+
+#ifdef __cplusplus
+#if __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+#endif /* __cplusplus */
+
+#define VAU_TRIGO_SHIFT 15
+#ifndef CIRCLE_TO_BEZIER_H_90_DEG
+#define CIRCLE_TO_BEZIER_H_90_DEG 0.551915024494f
+#endif
+
+#define HALF_M_PI (M_PI / 2)
+
+#define deg_to_rad(a) ((a) * M_PI / 180.0f)
+#define rad_to_deg(a) ((a) * 180.0f / M_PI)
+
+#define vau_matrix_x(m, x, y) ((x) * (m)[0][0] + (y) * (m)[0][1] + (m)[0][2])
+#define vau_matrix_y(m, x, y) ((x) * (m)[1][0] + (y) * (m)[1][1] + (m)[1][2])
+
+static inline td_bool double_is_equal(double a, double b)
+{
+    return fabs(a - b) <= 1e-6;
+}
+
+typedef struct {
+    float x;
+    float y;
+} vau_point_float, vau_vector;
+
+td_float vau_math_fabs(td_float x);
+td_float vau_math_fsqrt(td_float x);
+td_float vau_math_inv_fsqrt(td_float x);
+td_s32 vau_math_min(td_s32 a, td_s32 b);
+td_float vau_math_min_f(td_float a, td_float b);
+td_s32 vau_math_max(td_s32 a, td_s32 b);
+td_float vau_math_max_f(td_float a, td_float b);
+td_float vau_math_clamp(td_float value, td_float min_value, td_float max_value);
+td_bool vau_math_float_is_equal(td_float a, td_float b);
+td_bool vau_math_float_is_zero(td_float x);
+td_void vau_matrix_identity(ext_vau_matrix *m);
+td_void vau_matrix_mult(ext_vau_matrix *m, const ext_vau_matrix *m2);
+td_void vau_matrix_trans(ext_vau_matrix *m, float tx, float ty);
+td_void vau_matrix_scale(ext_vau_matrix *m, float sx, float sy);
+td_void vau_matrix_shear(ext_vau_matrix *m, float shx, float shy);
+td_void vau_matrix_rotate(ext_vau_matrix *m, float angle);
+td_void vau_matrix_reflect_x(ext_vau_matrix *m);
+td_void vau_matrix_reflect_y(ext_vau_matrix *m);
+td_void vau_matrix_reflect_o(ext_vau_matrix *m);
+td_s32 vector_dot_product_sign(const vau_vector *v1, const vau_vector *v2);
+td_float fast_inv_sqrt(td_float x);
+bool float_is_nan(float a);
+float vau_circle_to_bezier_h(float rad);
+
+#ifdef __cplusplus
+#if __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* __cplusplus */
+#endif /* API_RM_VAU_MATH_H */
diff --git a/code/sdk/middleware/services/gpu/api/rm/rm/inc/vau_split_bezier.h b/code/sdk/middleware/services/gpu/api/rm/rm/inc/vau_split_bezier.h
new file mode 100644 (file)
index 0000000..05ed6be
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) @CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: render path basic
+ */
+
+#ifndef VAU_SPLIT_BEZIER_H
+#define VAU_SPLIT_BEZIER_H
+
+#include "vau_stroke_dash.h"
+
+#ifdef __cplusplus
+#if __cplusplus
+extern "C" {
+#endif
+#endif
+
+td_u32 cubic_split_agg(const vau_point_float *cubic, vau_point_float *line_points, td_u32 point_num);
+
+#ifdef __cplusplus
+#if __cplusplus
+}
+#endif
+#endif
+
+#endif /* VAU_SPLIT_BEZIER_H */
diff --git a/code/sdk/middleware/services/gpu/api/rm/rm/inc/vau_stroke_dash.h b/code/sdk/middleware/services/gpu/api/rm/rm/inc/vau_stroke_dash.h
new file mode 100644 (file)
index 0000000..9e01086
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) @CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: render path basic
+ */
+
+#ifndef VAU_STROKE_DASH_H
+#define VAU_STROKE_DASH_H
+
+#include "soc_vau_type.h"
+#include "vau_math.h"
+
+#ifdef __cplusplus
+#if __cplusplus
+extern "C" {
+#endif
+#endif
+
+#define VAU_CUBIC_BEZIER_POINT_NUM  4
+
+typedef struct {
+    float x;
+    float y;
+} vau_path_line_to;
+
+typedef struct {
+    float x0; /* ctrl point */
+    float y0; /* ctrl point */
+    float x1; /* end point */
+    float y1; /* end point */
+} vau_path_quad_to;
+
+typedef struct {
+    float x0; /* ctrl point */
+    float y0; /* ctrl point */
+    float x1; /* ctrl point */
+    float y1; /* ctrl point */
+    float x2; /* end point */
+    float y2; /* end point */
+} vau_path_cubic_to;
+
+typedef struct {
+    vau_point_float s;
+    vau_point_float p;
+    vau_point_float o;
+    td_uchar cmd;
+    td_u32 offset;
+    td_u32 data_num;
+    vau_path_line_to line_to;
+    vau_path_quad_to quad_to;
+    vau_path_cubic_to cubic_to;
+    vau_point_float cubic[VAU_CUBIC_BEZIER_POINT_NUM];
+    td_bool rel;
+} local_stroke_dash_path;
+
+td_s32 vau_create_stroke_dash_path(const ext_vau_path *path, const ext_vau_stroke_attr *stroke,
+    ext_vau_path *dash_path);
+td_void vau_destroy_stroke_dash_path(ext_vau_path *dash_path);
+
+#ifdef __cplusplus
+#if __cplusplus
+}
+#endif
+#endif
+
+#endif /* VAU_STROKE_DASH_H */
diff --git a/code/sdk/middleware/services/gpu/api/rm/rm/inc/vau_stroke_path.h b/code/sdk/middleware/services/gpu/api/rm/rm/inc/vau_stroke_path.h
new file mode 100644 (file)
index 0000000..c5ec131
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) @CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: stroke path
+ */
+
+#ifndef STROKE_INC_VAU_STROKE_PATH_H
+#define STROKE_INC_VAU_STROKE_PATH_H
+
+#include "soc_vau_type.h"
+#include "vau_stroke_dash.h"
+
+#ifdef __cplusplus
+#if __cplusplus
+extern "C" {
+#endif
+#endif
+
+typedef enum {
+    EXT_BEZIER_MODE_LINE_AVG,
+    EXT_BEZIER_MODE_BEZIER_4,
+    EXT_BEZIER_MODE_BEZIER_CLOSE,
+    EXT_BEZIER_MODE_BEZIER_MONO,
+    EXT_BEZIER_MODE_BEZIER_ELIA,
+    EXT_BEZIER_MODE_BEZIER_ELIA_4,
+    EXT_BEZIER_MODE_BEZIER_ELIA_CLOSE,
+    EXT_BEZIER_MODE_LINE_FREETYPE,
+    EXT_BEZIER_MODE_LINE_AGG,
+    EXT_BEZIER_MODE_MAX
+} ext_vau_bezier_stroke_split_mode;
+
+typedef struct {
+    vau_vector v;
+    vau_point_float c1;
+    vau_point_float c2;
+    vau_point_float p4;
+    float h;
+    float p1p3;
+    float p1p4;
+    float p3p4;
+    float sin;
+    float cos;
+} local_stroke_add_round;
+
+typedef struct {
+    td_s32 x1;
+    td_s32 y1;
+    td_s32 x2;
+    td_s32 y2;
+} ext_vau_line_fixed;
+
+typedef struct {
+    td_u32 i;
+    float sx;
+    float sy;
+    float px;
+    float py;
+    float ox;
+    float oy;
+    td_uchar cmd;
+    td_u32 offset;
+    td_u32 data_num;
+    vau_path_line_to line_to;
+    vau_path_quad_to quad_to;
+    vau_path_cubic_to cubic_to;
+    ext_vau_line_fixed line_inner;
+    ext_vau_line_fixed line_outer;
+    td_u32 cubic_split_count;
+    vau_point_float p0;
+    vau_point_float p1;
+    vau_point_float left;
+    vau_point_float right;
+    td_bool rel;
+    float width;
+    float half_width;
+    td_bool has_close;
+    td_u32 sub_index;
+    int l_count;
+    int c_count;
+    td_bool add_join;
+    td_bool add_cap;
+    td_s32 ret;
+    float rx;
+    float ry;
+    td_u32 point_num;
+    td_u32 cubic_split_count_out;
+} local_parse_stroke_path;
+
+typedef struct {
+    float miter_limit;
+    float half_width;
+} vau_line_cap_param;
+
+typedef struct {
+    td_bool add_join;
+    td_bool add_cap;
+} vau_join_cap_flag;
+
+td_s32 vau_create_stroke_to_fill_path(const ext_vau_path *path, const ext_vau_stroke_attr *stroke_attr,
+    ext_vau_path *fill_path, ext_vau_fill_attr *fill_attr, ext_vau_bezier_stroke_split_mode mode);
+td_void vau_destroy_stroke_to_fill_path(ext_vau_path *fill_path);
+td_u32 cubic_bezier_subdivision(const vau_point_float *points, vau_point_float *points_subdivision);
+td_void split_cubic_to_line_average(const vau_point_float *cubic, vau_point_float *line_points, td_u32 point_num);
+#ifdef __cplusplus
+#if __cplusplus
+}
+#endif
+#endif
+
+#endif /* STROKE_INC_VAU_STROKE_PATH_H */
index ee6e111..5943d14 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 1215c09..906a9a8 100644 (file)
@@ -16,7 +16,7 @@ set(GPU_SRC_LIST "${GPU_SRC_LIST}" "${vau_api_list}" CACHE INTERNAL "platform sr
 
 set(
     vau_api_header_list
-        ${ROOT_DIR}/middleware/services/gpu/api/rm/inc
+        ${ROOT_DIR}/middleware/services/gpu/api/rm/rm/inc/
         ${CMAKE_CURRENT_SOURCE_DIR}
         ${CMAKE_CURRENT_SOURCE_DIR}/draw
         ${CMAKE_CURRENT_SOURCE_DIR}/matrix
index ced28b7..6641c9f 100644 (file)
@@ -5,9 +5,6 @@ Create: 2021-03-15
 ]]
 add_subdirectory(dpu)
 add_subdirectory(vau)
-if("SUPPORT_GPU_GMMU" IN_LIST DEFINES)
-    add_subdirectory(gmmu)
-endif()
 if("SUPPORT_GPU_JPEG" IN_LIST DEFINES)
     add_subdirectory(jpeg)
 endif()
index c2650e3..f9b1f49 100644 (file)
@@ -35,5 +35,6 @@ set(
         ${CMAKE_CURRENT_SOURCE_DIR}/list
         ${CMAKE_CURRENT_SOURCE_DIR}/mem
         ${CMAKE_CURRENT_SOURCE_DIR}/node
+        ${ROOT_DIR}/middleware/services/gpu/api/rm/gmmu/drv/include
 )
 set(GPU_INC_LIST "${GPU_INC_LIST}" "${vau_drv_header_list}" CACHE INTERNAL "platform src obj list" FORCE)
\ No newline at end of file
index 784391a..15a27a3 100644 (file)
@@ -16,6 +16,7 @@
 #include "vau_pre_process.h"\r
 #include "vau_handle.h"\r
 #include "drv_vau_struct.h"\r
+#include "drv_gmmu_intf.h"\r
 \r
 #define DRV_VAU_IOCTL_CMD_NUM 20\r
 \r
@@ -69,6 +70,10 @@ td_s32 drv_vau_suspend(td_void *private_data)
     drv_vau_set_suspend_flag(TD_TRUE);\r
     vau_dbg("vau suspend ok");\r
 \r
+#ifdef SUPPORT_GPU_GMMU\r
+        (td_void)drv_gmmu_suspend(NULL);\r
+#endif\r
+\r
     return ret;\r
 }\r
 \r
@@ -90,6 +95,10 @@ td_s32 drv_vau_resume(td_void *private_data)
     drv_vau_set_suspend_flag(TD_FALSE);\r
     vau_dbg("vau resume ok");\r
 \r
+#ifdef SUPPORT_GPU_GMMU\r
+        (void)drv_gmmu_resume(NULL);\r
+#endif\r
+\r
     return EXT_SUCCESS;\r
 }\r
 \r
@@ -220,7 +229,13 @@ static td_void vau_unregister_device(td_void)
 td_s32 uapi_vau_module_init(void)\r
 {\r
     td_s32 ret;\r
-\r
+#ifdef SUPPORT_GPU_GMMU\r
+    ret = drv_gmmu_module_init();\r
+    if (ret != EXT_SUCCESS) {\r
+        vau_err("drv_gmmu_module_init failed, ret=%#x!", ret);\r
+        return ret;\r
+    }\r
+#endif\r
     vau_ip_dcmp_tmp();\r
 \r
     ret = vau_mem_init();\r
index 30e6f39..3e55023 100644 (file)
@@ -378,6 +378,7 @@ td_uchar *vau_mem_alloc(vau_mem_type mem_type, td_u32 size)
     osal_spin_lock_irqsave(&(g_mem_info[mem_type].mem_lock), &lockflags);
 
     if (osal_list_empty(&g_mem_free_list_head[mem_type]) != 0) {
+        osal_spin_unlock_irqrestore(&(g_mem_info[mem_type].mem_lock), &lockflags);
         vau_err("mem_free_list[%d] is empty!", mem_type);
         return TD_NULL;
     }
index a6a8cdd..f834f49 100644 (file)
  * @brief Enable JPEG preview which includes decoding jpeg file and cacheing decoded data.
  */
 #ifdef SUPPORT_GPU_JPEG
+#ifdef XTS_SUPPORT
+#define CAPABILITY_HW_JPEG_DECODE                0
+#else
 #define CAPABILITY_HW_JPEG_DECODE                1
+#endif
 #else
 #define CAPABILITY_HW_JPEG_DECODE                0
 #endif
  * @brief Hardware acceleration for drawing cubic bezier curve. Prerequirement is ENABLE_VGU_ENGINE is 1.
  */
 #define CAPABILITY_HWDRAW_CURVE           0
-
+/**
+ * @brief Hardware acceleration for drawing rect. Prerequirement is ENABLE_VGU_ENGINE is 1.
+ */
+#define CAPABILITY_HWDRAW_RECT           0
+/**
+ * @brief Hardware acceleration for filling small size. Prerequirement is ENABLE_VGU_ENGINE is 1.
+ */
+#define CAPABILITY_HWDRAW_SMALL_SIZE    0
 /**
  * @brief Whether open offline dial.
  */
 /**
  * @brief Use double buffer for rendering process.
  */
-
+ 
 #ifndef DOUBLE_BUFFER
 #define DOUBLE_BUFFER                     1
 #endif
index 7329aac..2bde27d 100644 (file)
@@ -10,6 +10,7 @@ set(COMPONENT_NAME "display_gfx")
 set(SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/src/display_vau.c
     ${CMAKE_CURRENT_SOURCE_DIR}/src/yuv_to_rgb.c
+    ${CMAKE_CURRENT_SOURCE_DIR}/src/display_gmmu.c
     ${PROJECT_ROOT_DIR}/hal/common/src/barcode128.c
 )
 
@@ -21,6 +22,7 @@ set(PRIVATE_HEADER
     ${CMAKE_CURRENT_SOURCE_DIR}/include
     ${ROOTDIR}/open_source/openharmony/drivers/peripheral/display/interfaces/include
     ${UIKIT_ROOT_DIR}/proprietary/src/utils/innerkits
+    ${ROOTDIR}/middleware/services/gpu/api/rm/gmmu/api/inc
 )
 
 set(PRIVATE_DEFINES
@@ -84,6 +86,7 @@ set(PRIVATE_HEADER
     ${CMAKE_CURRENT_SOURCE_DIR}/mempool/include
     ${ROOTDIR}/open_source/openharmony/drivers/peripheral/display/interfaces/include
     ${UIKIT_ROOT_DIR}/proprietary/src/utils/innerkits
+    ${ROOTDIR}/middleware/services/gpu/api/rm/gmmu/api/inc
 )
 
 set(PRIVATE_DEFINES
@@ -136,6 +139,7 @@ set(PUBLIC_HEADER
 set(PRIVATE_HEADER
     ${ROOTDIR}/open_source/openharmony/drivers/peripheral/display/interfaces/include
     ${UIKIT_ROOT_DIR}/proprietary/src/utils/innerkits
+    ${ROOTDIR}/middleware/services/gpu/api/rm/gmmu/api/inc
 )
 
 set(PRIVATE_DEFINES
index 1a92aed..97b7192 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 db41b91..f3d611c 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 8606c8a..f157180 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 8606c8a..f157180 100644 (file)
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-native-js-xts/libdisplay_gfx.a and b/code/sdk/middleware/services/gui/hal/display/brandy-native-js-xts/libdisplay_gfx.a differ
index 8606c8a..f157180 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 4db2f00..9a5cb4e 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 c480c01..fdd8ba1 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 96e3ae9..a9ffd5f 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 61aae42..dfaf947 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
diff --git a/code/sdk/middleware/services/gui/hal/display/include/display_gmmu_internal.h b/code/sdk/middleware/services/gui/hal/display/include/display_gmmu_internal.h
new file mode 100644 (file)
index 0000000..4279ac9
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025. All rights reserved.
+*/
+
+#ifndef DISPLAY_GMMU_INTERNAL_H
+#define DISPLAY_GMMU_INTERNAL_H
+#include "display_type.h"
+
+#define INTERNAL_GMMU_BUF_CNT 2
+
+typedef struct {
+    td_u32 stride;                           /* Gmmu buffer line spacing. */
+    td_u32 size;                             /* Gmmu buffer Size. */
+    td_u32 buffer[INTERNAL_GMMU_BUF_CNT];    /* Gmmu buffer Addr. */
+} GmmuBuf;
+
+typedef struct {
+    td_u8 bpp;        /* Pixel Depth. */
+    td_u32 width;     /* Memory Width. */
+    td_u32 height;    /* height. */
+    td_u8  offset;    /* Pixel offset for fine tuning lut contours. */
+} GmmuAttr;
+
+td_s32 GmmuInit(const GmmuAttr *gmmu_attr);
+td_void GmmuAlloc(GmmuBuf *gmmu_buf);
+td_void GmmuFree(GmmuBuf *gmmu_buf);
+td_void GmmuDeinit(td_void);
+
+#endif /* DISPLAY_GMMU_INTERNAL_H */
index fde9329..11a0af6 100644 (file)
 #endif
 #include "mem_pool_los.h"
 #include "mem_pool_types.h"
-#include "soc_gmmu_api.h"
 #include "graphic_hardware_config.h"
+#if ENABLE_GMMU
+#include "display_gmmu_internal.h"
+#endif
 
 #define MAX_MALLOC_SIZE 0x10000000L
 #define FB_COUNT 2
@@ -61,7 +63,7 @@ TryToFreeFontCacheCallback g_tryToFreeFontCacheCallback = NULL;
 
 #if ENABLE_GMMU
 static bool g_gmmuAllocated[FB_COUNT] = {false, false};
-struct gmmu_buf_struct g_gmmuMem = { 0 };
+GmmuBuf g_gmmuMem = { 0 };
 #else
 static AddrInfo FBInfo[FB_COUNT] = {
     {false, MEM_POOL_UI_FB, MEM_POOL_UI_FB_SIZE / 2},
@@ -330,11 +332,11 @@ int32_t GrallocInitialize(GrallocFuncs **funcs)
     *funcs = gFuncs;
 
 #if ENABLE_GMMU
-    struct gmmu_attr_struct gmmuAtr = {LAYER_BPP, RESOLUTION_WIDTH, RESOLUTION_HEIGHT};
-    if (uapi_gmmu_init(&gmmuAtr) != DISPLAY_SUCCESS) {
+    GmmuAttr gmmuAtr = {LAYER_BPP, RESOLUTION_WIDTH, RESOLUTION_HEIGHT};
+    if (GmmuInit(&gmmuAtr) != DISPLAY_SUCCESS) {
         return DISPLAY_FAILURE;
     }
-    uapi_gmmu_alloc(&g_gmmuMem);
+    GmmuAlloc(&g_gmmuMem);
 #endif
     DISP_LOGI("gralloc initialize success\n");
     return DISPLAY_SUCCESS;
@@ -350,8 +352,8 @@ int32_t GrallocUninitialize(GrallocFuncs *funcs)
     DISP_LOGI("gralloc uninitialize success\n");
 
 #if ENABLE_GMMU
-    uapi_gmmu_free(&g_gmmuMem);
-    uapi_gmmu_deinit();
+    GmmuFree(&g_gmmuMem);
+    GmmuDeinit();
 #endif
     return DISPLAY_SUCCESS;
 }
index a5c5311..289f885 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 603f11f..3abe5ed 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 4d0915c..b06968c 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 a865dbb..ecbaad8 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 c5f8710..81ecca5 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 c5f8710..81ecca5 100644 (file)
Binary files a/code/sdk/middleware/services/gui/uikit/brandy-native-js-xts/libuikit_ext.a and b/code/sdk/middleware/services/gui/uikit/brandy-native-js-xts/libuikit_ext.a differ
index c5f8710..81ecca5 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 1fa3226..cad2383 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 33528f5..55fc828 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 4c3e15e..24c067d 100644 (file)
@@ -127,6 +127,10 @@ struct RadialGradient {
 
 /**
  * @brief Sweep gradient params.
+ * @param centerX Indicates the x coordinate of the circle center.
+ * @param centerY Indicates the y coordinate of the circle center.
+ * @param startAngle Indicates the start angle of the sector. Value <b>0</b> indicates the 12-o'clock direction,
+ *                   and <b>90</b> indicates the 3-o'clock direction.
  */
 struct SweepGradient {
     int16_t centerX;
index 7ed170f..1dbb478 100644 (file)
@@ -72,7 +72,8 @@ private:
     Path imgPath_ = {0};
     float thetaVal_ = 0.0f;
     float radius_ = 0.0f;
-    Point point_ = {0, 0};
+    float x_ = 0.0f;
+    float y_ = 0.0f;
     Point startPoint_ = {0, 0};
     bool isInternalMem_ = false;
 
index d7390c1..105b471 100644 (file)
@@ -375,7 +375,7 @@ public:
      * @return Returns index value that relates to a path object. Returns -1 when any error occurs.
      */
     int16_t DrawSector(const Point& center, uint16_t radius,
-        int16_t startAngle, int16_t endAngle, const PaintExt& paint);
+        float startAngle, float endAngle, const PaintExt& paint);
 
     /**
      * @brief Draws an arc.
index 9e90eb0..34a0a76 100644 (file)
@@ -52,7 +52,7 @@ public:
     ~UICardPage() override {}
 
     /* *
-     * @brief This function is invoked when the function SetHorCurrentPage() is called.
+     * @brief This function is invoked when the function SetHorCurrentPage() or Presenter:OnResume() is called.
      * @since 1.0
      * @version 1.0
      */
@@ -114,6 +114,27 @@ public:
      */
     virtual void CoverEnd(bool isCovered) {}
 
+    /* *
+     * @brief This function is invoked when SetVerCurrentPage is called and horizontal page is covered.
+     * @since 1.0
+     * @version 1.0
+     */
+    virtual void OnCovered(void) {}
+
+    /* *
+     * @brief This function is invoked when SetVerCurrentPage is called and horizontal page is not covered.
+     * @since 1.0
+     * @version 1.0
+     */
+    virtual void OnUncovered(void) {}
+
+    /* *
+     * @brief This function is invoked when Presenter::OnPause is called.
+     * @since 1.0
+     * @version 1.0
+     */
+    virtual void OnPause(void) {}
+
     /* *
      * @brief Set coverable state.
      * @since 1.0
index 3ffc31d..114ee72 100644 (file)
@@ -124,6 +124,13 @@ public:
      */
     void SetHorCurrentPage(uint16_t index, bool loadAdjacent = true);
 
+    /* *
+     * @brief Set the current page index of vertical direction.
+     * @since 1.0
+     * @version 1.0
+     */
+    void SetVerCurrentPage(uint16_t index);
+
     /* *
      * @brief Get the current page index of target direction.
      * @since 1.0
@@ -213,11 +220,12 @@ public:
     }
 
     /**
-     * @brief Set background blur radius. Default value is 10.
+     * @brief Set background blur radius. Default value is 10.0f, The effective range is [0.0f ~ 32.0f].
      * @since 1.0
      * @version 1.0
      */
-    void SetBlurRadius(uint16_t radius) {
+    void SetBlurRadius(float radius)
+    {
         blurRadius_ = radius;
     }
 
@@ -232,7 +240,7 @@ public:
 
 private:
     using UIViewGroup::Remove;
-    uint16_t blurRadius_ = 10;
+    float blurRadius_ = 10.0f;
     void UpdateCardPageIndex();
     static constexpr uint16_t INVALID_VIEW_INDEX = 0xff;
     bool loop_ = false;
index f4c7d74..d7e9fb3 100644 (file)
@@ -134,6 +134,11 @@ public:
      */
     void ClearParticles();
 
+    UIViewType GetViewType() const override
+    {
+        return UI_PARTICLE_VIEW;
+    }
+
 private:
     void ProcessParticleCells();
 
index 68fc2e2..4247d37 100644 (file)
@@ -148,6 +148,34 @@ public:
         return onScrollListener_;
     }
 
+    class OnChildStateListener : public HeapBase {
+    public:
+        /**
+        * @brief Callback function when the status of a child control changes.
+        *
+        * @param view Object of the child control whose state changes.
+        *    This object is a control of the UIViewGroup type.
+        *    If roller is in mirror mode, the object will contain two subcomponents.
+        *    The head is normal image,tail is mirror image.
+        *    If there is no mirroring mode,only have normal images.
+        * @param angle Rotation angle of the child control in the current.range: 0-360
+        */
+        virtual bool StateChange(UIView* view, float angle) = 0;
+        virtual ~OnChildStateListener() {}
+    };
+
+    /**
+     * @brief Listens for the change of the angle status of the child control.
+     *
+     * @param Object of class OnChildStateListener.
+     * @since 1.0
+     * @version 1.0
+     */
+    void SetChildStateListener(OnChildStateListener* listener)
+    {
+        onChildStateListener_ = listener;
+    }
+
     /**
      * @brief  Get current mode.
      */
@@ -164,6 +192,17 @@ public:
      */
     void SetCamY(int16_t y);
 
+    /**
+     * @brief Obtains the view name.
+     * @param view Specifies the view to be obtained.
+     */
+    static std::string GetRollerItemName(UIView* view);
+
+    bool IsShowMirrorMode()
+    {
+        return isShowMirrorImg_;
+    }
+
     UIViewType GetViewType() const override
     {
         return UI_ROLLER_VIEW;
@@ -173,6 +212,7 @@ public:
     bool OnDragEvent(const DragEvent& event) override;
     bool OnDragEndEvent(const DragEvent& event) override;
 #if ENABLE_ROTATE_INPUT
+    bool OnRotateStartEvent(const RotateEvent& event) override;
     bool OnRotateEvent(const RotateEvent& event) override;
     bool OnRotateEndEvent(const RotateEvent& event) override;
 #endif
@@ -288,6 +328,7 @@ private:
     static constexpr float TRANSITION_COEFFICIENT = 0.2;
     OnModeChangeListener* onModeChangeListener_ = nullptr;
     OnScrollListener* onScrollListener_ = nullptr;
+    OnChildStateListener* onChildStateListener_ = nullptr;
     float ConvertDistanceToAngle(int16_t distance);
     bool IsInCurrentItemRange(float angle);
     void InitImg(UIView* img);
@@ -336,6 +377,10 @@ private:
     uint16_t itemPadding_ = 0;
     bool needLayout_ = false;
     UIViewGroup* currentItem_ = nullptr;
+#if ENABLE_VIBRATOR
+    UIViewGroup* lastItem_ = nullptr;
+    bool needVibration_ = false;
+#endif
     UIViewGroup* alignItem_ = nullptr;
     bool isShowMirrorImg_;
     float alignAngle_ = 0.0f;
index 9e1d450..bd9f056 100644 (file)
@@ -72,6 +72,9 @@ enum class FrameTraceType {
     HW_DRAW_FLUSH,
     HW_DRAW_WAIT,
     HW_DRAW_ARC_RECT,
+    HW_DRAW_LINE,
+    HW_DRAW_ARC,
+    HW_DRAW_CUBICBEZIER,
     DRAW_MAX
 };
 
index 535456f..28081ff 100644 (file)
@@ -32,15 +32,24 @@ struct FontParam {
 
 class FontGlobalManager : public HeapBase {
 public:
+    class LangChangeListener {
+    public:
+        virtual void OnLangChange(uint8_t langId) = 0;
+        virtual ~LangChangeListener() {}
+    };
     char* GetText(uint16_t textId);
     bool RegisterLanguageInfo(const char** resFile, uint8_t totalLangId, uint8_t defaultLangId);
     void UnRegisterLanguageInfo();
     void SetCurrentLangId(uint8_t langId);
+    uint8_t GetCurrentLangId() const
+    {
+        return currentLangId_;
+    }
     FontParam GetFontParam(uint16_t textId);
     uint8_t GetTotalLangId();
     static FontGlobalManager* GetInstance();
     static constexpr uint16_t INVALID_TEXT_ID = 0xFFFF;
-    static constexpr uint8_t INVALIDE_LANG_ID = 0xFF;
+    static constexpr uint8_t INVALID_LANG_ID = 0xFF;
 
 private:
     void RefreshViews(UIView* rootView);
@@ -51,7 +60,7 @@ private:
     LangBinInfo* GetLangBinInfo();
     bool ReallocStringInfos(uint8_t totalLangId);
     StringsInfo* stringsInfos_ = nullptr;
-    uint8_t currentLangId_ = INVALIDE_LANG_ID; // 0xFF: the max lang id
+    uint8_t currentLangId_ = INVALID_LANG_ID; // 0xFF: the max lang id
     uint8_t totalLangId_ = 0;
 };
 } // namespace OHOS
index eacb142..5513029 100644 (file)
@@ -44,10 +44,10 @@ void GraphicEventHandler::Run()
 \r
 void GraphicEventHandler::PostGraphicEvent(const GraphicEvent& event, bool exitLowPower)\r
 {\r
+    queueMutex_.Lock();\r
     if (exitLowPower) {\r
         LowPowerManager::GetInstance()->ExitLowPower();\r
     }\r
-    queueMutex_.Lock();\r
     eventQueue_.push(event);\r
     pthreadCond_.Signal();\r
     queueMutex_.Unlock();\r
index 9f7f30f..5bbd1cc 100644 (file)
@@ -15,11 +15,19 @@ UIListNested::UIListNested(uint8_t direction) : UIList(direction)
 
 bool UIListNested::OnDragStartEvent(const DragEvent& event)
 {
-    if (reboundSize_ != 0) {
-        for (uint8_t i = 0; i < sizeof(isIntercepts_) / sizeof(bool); ++i) {
-            isIntercepts_[i] = true;
-        }
+    if (reboundSizeTop_ != 0) {
+        isIntercepts_[DragEvent::DIRECTION_TOP_TO_BOTTOM] = true;
+    }
+    if (reboundSizeBottom_ != 0) {
+        isIntercepts_[DragEvent::DIRECTION_BOTTOM_TO_TOP] = true;
+    }
+    if (reboundSizeLeft_ != 0) {
+        isIntercepts_[DragEvent::DIRECTION_LEFT_TO_RIGHT] = true;
+    }
+    if (reboundSizeRight_ != 0) {
+        isIntercepts_[DragEvent::DIRECTION_RIGHT_TO_LEFT] = true;
     }
+
     uint8_t dragDirection;
     if (MATH_ABS(event.GetDeltaX()) >= MATH_ABS(event.GetDeltaY())) {
         dragDirection = HORIZONTAL;
@@ -48,14 +56,14 @@ bool UIListNested::OnDragEvent(const DragEvent& event)
 
     if (direction_ == VERTICAL) {
         outOfBounds[DragEvent::DIRECTION_TOP_TO_BOTTOM] =
-            childrenHead_->GetY() >= scrollBlankSize_ + childrenHead_->GetStyle(STYLE_MARGIN_TOP);
+            childrenHead_->GetY() >= scrollBlankSizeTop_ + childrenHead_->GetStyle(STYLE_MARGIN_TOP);
         outOfBounds[DragEvent::DIRECTION_BOTTOM_TO_TOP] = childrenTail_->GetRelativeRect().GetBottom() <=
-            listHeight - scrollBlankSize_ - childrenTail_->GetStyle(STYLE_MARGIN_BOTTOM);
+            listHeight - scrollBlankSizeBottom_ - childrenTail_->GetStyle(STYLE_MARGIN_BOTTOM);
     } else {
         outOfBounds[DragEvent::DIRECTION_LEFT_TO_RIGHT] =
-            childrenHead_->GetX() >= scrollBlankSize_ + childrenHead_->GetStyle(STYLE_MARGIN_LEFT);
+            childrenHead_->GetX() >= scrollBlankSizeLeft_ + childrenHead_->GetStyle(STYLE_MARGIN_LEFT);
         outOfBounds[DragEvent::DIRECTION_RIGHT_TO_LEFT] = childrenTail_->GetRelativeRect().GetRight() <=
-            listWidth - scrollBlankSize_ - childrenTail_->GetStyle(STYLE_MARGIN_RIGHT);
+            listWidth - scrollBlankSizeRight_ - childrenTail_->GetStyle(STYLE_MARGIN_RIGHT);
     }
 
     bool transfer = false;
@@ -87,13 +95,35 @@ bool UIListNested::OnDragEndEvent(const DragEvent& event)
 
 void UIListNested::SetBoundaryIntercept(uint8_t direction, bool isIntercept)
 {
-    if (direction > DragEvent::DIRECTION_BOTTOM_TO_TOP) {
-        return;
-    }
-    if (reboundSize_ != 0) {
-        GRAPHIC_LOGE("rebound size is not zero!");
-        return;
+    switch (direction) {
+        case DragEvent::DIRECTION_LEFT_TO_RIGHT:
+            if (reboundSizeLeft_ != 0) {
+                GRAPHIC_LOGE("reboundSizeLeft_ is not zero!");
+                return;
+            }
+            break;
+        case DragEvent::DIRECTION_RIGHT_TO_LEFT:
+            if (reboundSizeRight_ != 0) {
+                GRAPHIC_LOGE("reboundSizeRight_ is not zero!");
+                return;
+            }
+            break;
+        case DragEvent::DIRECTION_TOP_TO_BOTTOM:
+            if (reboundSizeTop_ != 0) {
+                GRAPHIC_LOGE("reboundSizeTop_ is not zero!");
+                return;
+            }
+            break;
+        case DragEvent::DIRECTION_BOTTOM_TO_TOP:
+            if (reboundSizeBottom_ != 0) {
+                GRAPHIC_LOGE("reboundSizeBottom_ is not zero!");
+                return;
+            }
+            break;
+        default:
+            return;
     }
+
     uint8_t dragDirection = (direction == DragEvent::DIRECTION_LEFT_TO_RIGHT ||
         direction == DragEvent::DIRECTION_RIGHT_TO_LEFT) ? HORIZONTAL : VERTICAL;
     if (dragDirection != direction_) {
index 25b8f72..6687ff0 100644 (file)
@@ -15,6 +15,19 @@ UIScrollViewNested::UIScrollViewNested(uint8_t direction) : UIScrollView()
 
 bool UIScrollViewNested::OnDragStartEvent(const DragEvent& event)
 {
+    if (reboundSizeTop_ != 0) {
+        isIntercepts_[DragEvent::DIRECTION_TOP_TO_BOTTOM] = true;
+    }
+    if (reboundSizeBottom_ != 0) {
+        isIntercepts_[DragEvent::DIRECTION_BOTTOM_TO_TOP] = true;
+    }
+    if (reboundSizeLeft_ != 0) {
+        isIntercepts_[DragEvent::DIRECTION_LEFT_TO_RIGHT] = true;
+    }
+    if (reboundSizeRight_ != 0) {
+        isIntercepts_[DragEvent::DIRECTION_RIGHT_TO_LEFT] = true;
+    }
+
     uint8_t dragDirection;
     if (MATH_ABS(event.GetDeltaX()) >= MATH_ABS(event.GetDeltaY())) {
         dragDirection = HORIZONTAL;
@@ -40,11 +53,12 @@ bool UIScrollViewNested::OnDragEvent(const DragEvent& event)
     int16_t scrollHeight = GetHeight();
     bool outOfBounds[4] = {false, false, false, false}; // 4: the number of direction
     if (direction_ == VERTICAL) {
-        outOfBounds[DragEvent::DIRECTION_TOP_TO_BOTTOM] = childRect.GetTop() >= scrollBlankSize_;
-        outOfBounds[DragEvent::DIRECTION_BOTTOM_TO_TOP] = childRect.GetBottom() <= scrollHeight - scrollBlankSize_;
+        outOfBounds[DragEvent::DIRECTION_TOP_TO_BOTTOM] = childRect.GetTop() >= scrollBlankSizeTop_;
+        outOfBounds[DragEvent::DIRECTION_BOTTOM_TO_TOP] =
+            childRect.GetBottom() <= scrollHeight - scrollBlankSizeBottom_;
     } else {
-        outOfBounds[DragEvent::DIRECTION_LEFT_TO_RIGHT] = childRect.GetLeft() >= scrollBlankSize_;
-        outOfBounds[DragEvent::DIRECTION_RIGHT_TO_LEFT] = childRect.GetRight() <= scrollWidth - scrollBlankSize_;
+        outOfBounds[DragEvent::DIRECTION_LEFT_TO_RIGHT] = childRect.GetLeft() >= scrollBlankSizeLeft_;
+        outOfBounds[DragEvent::DIRECTION_RIGHT_TO_LEFT] = childRect.GetRight() <= scrollWidth - scrollBlankSizeRight_;
     }
 
     bool transfer = false;
@@ -77,9 +91,35 @@ bool UIScrollViewNested::OnDragEndEvent(const DragEvent& event)
 
 void UIScrollViewNested::SetBoundaryIntercept(uint8_t direction, bool isIntercept)
 {
-    if (direction > DragEvent::DIRECTION_BOTTOM_TO_TOP) {
-        return;
+    switch (direction) {
+        case DragEvent::DIRECTION_LEFT_TO_RIGHT:
+            if (reboundSizeLeft_ != 0) {
+                GRAPHIC_LOGE("reboundSizeLeft_ is not zero!");
+                return;
+            }
+            break;
+        case DragEvent::DIRECTION_RIGHT_TO_LEFT:
+            if (reboundSizeRight_ != 0) {
+                GRAPHIC_LOGE("reboundSizeRight_ is not zero!");
+                return;
+            }
+            break;
+        case DragEvent::DIRECTION_TOP_TO_BOTTOM:
+            if (reboundSizeTop_ != 0) {
+                GRAPHIC_LOGE("reboundSizeTop_ is not zero!");
+                return;
+            }
+            break;
+        case DragEvent::DIRECTION_BOTTOM_TO_TOP:
+            if (reboundSizeBottom_ != 0) {
+                GRAPHIC_LOGE("reboundSizeBottom_ is not zero!");
+                return;
+            }
+            break;
+        default:
+            return;
     }
+
     uint8_t dragDirection = (direction == DragEvent::DIRECTION_LEFT_TO_RIGHT ||
         direction == DragEvent::DIRECTION_RIGHT_TO_LEFT) ? HORIZONTAL : VERTICAL;
     if (dragDirection != direction_) {
index 344e953..d2f908e 100644 (file)
 #include "dfx/dfx_frame_trace.h"
 #include "common/low_power_manager.h"
 #include "common/image_cache_manager.h"
-
+#include "common/input_device_manager.h"
+#include "common/task_manager.h"
+#include "graphic_service_wrapper.h"
+#include "graphic_event_handler.h"
+#include "animator/animator_manager.h"
 #if ENABLE_DEBUG
 #include "common/key_code.h"
 #include "dfx/event_injector.h"
@@ -93,6 +97,15 @@ void DumpState(int argc, char *argv[])
     printf("   NativeRunninng: %d\n", GraphicService::GetInstance()->IsNativeRunning());
     printf("   IsScreenOn: %d\n", GraphicService::GetInstance()->IsScreenOn());
     printf("   GraphicTaskTriggeredCount: %d\n", GraphicService::GetInstance()->GetGraphicTaskTriggeredCount());
+    printf("   LowPower:\n");
+    printf("       Frequence: %d\n", GetFrequence());
+    printf("       Task: total num: %d\n", TaskManager::GetInstance()->GetTotalTaskNum());
+    printf("       Animator: total num: %d, active num: %d\n",
+        AnimatorManager::GetInstance()->GetTotalAnimatorNum(),
+        AnimatorManager::GetInstance()->GetActiveAnimatorNum());
+    printf("       InputEvent Exist: %d\n", InputDeviceManager::GetInstance()->IsEventExist());
+    printf("       PendingFrame: %d\n", LiteMGfxEngine::GetInstance()->HasPendingFrame());
+    printf("       SufaceView Exist: %d\n", LowPowerManager::GetInstance()->IsLiteSurfaceInRootView());
 }
 
 void LeakPanic(int argc, char *argv[])
@@ -378,6 +391,15 @@ void ShowTime(int argc, char *argv[])
     }
 }
 
+void ForceRefresh(int argc, char *argv[])
+{
+    if (argc == 0) {
+        GraphicService::GetInstance()->PostGraphicEvent([]() {  RootView::GetInstance()->Invalidate(); });
+    } else {
+        printf("param err.\n");
+    }
+}
+
 void HideFPS(int argc, char *argv[])
 {
     FPSTask::GetInstance()->HideFPS();
@@ -547,6 +569,7 @@ struct DfxCmd g_dfxCmdList[] = {
     {"hidefps", OHOS::HideFPS},
     {"showfps", OHOS::ShowFPS},
     {"showtime", OHOS::ShowTime},
+    {"refresh", OHOS::ForceRefresh},
 #if ENABLE_MEMORY_CHECK
     {"dumpstate", OHOS::DumpState},
     {"dumpmem", OHOS::DumpMemoryCmd},
@@ -574,7 +597,9 @@ bool ExecUikitDfxByCmdType(int argc, char *argv[])
 
     for (i = 0; i < sizeof(g_dfxCmdList) / sizeof(g_dfxCmdList[0]); i++) {
         if (!strcmp(g_dfxCmdList[i].cmdType, argv[0])) {
-            OHOS::LowPowerManager::GetInstance()->ExitLowPower();
+            if (strcmp(argv[0], "dumpstate") != 0) {
+                OHOS::LowPowerManager::GetInstance()->ExitLowPower();
+            }
             g_dfxCmdList[i].func(argc - 1, &argv[1]);
             return true;
         }
index b3ce83c..d50f6a3 100644 (file)
@@ -89,6 +89,7 @@ static const struct {
     {UI_TRANSFORM_LIST, "UI_TRANSFORM_LIST"},
     {UI_COVER_FLOW_2, "UI_COVER_FLOW_2"},
     {UI_SPHERE_VIEW, "UI_SPHERE_VIEW"},
+    {UI_PARTICLE_VIEW, "UI_PARTICLE_VIEW"},
     {UI_NUMBER_MAX, "UI_NUMBER_MAX"},
 };
 
index 06b7cf6..2201b6b 100644 (file)
@@ -37,6 +37,9 @@ static struct {
     {FrameTraceType::HW_DRAW_FLUSH, "hw_flush"},
     {FrameTraceType::HW_DRAW_WAIT, "hw_wait"},
     {FrameTraceType::HW_DRAW_ARC_RECT, "hw_arc_rect"},
+    {FrameTraceType::HW_DRAW_LINE, "hw_line"},
+    {FrameTraceType::HW_DRAW_ARC, "hw_arc"},
+    {FrameTraceType::HW_DRAW_CUBICBEZIER, "hw_bezier"},
 };
 
 int DfxFrameTrace::evtCnt_ = 0;
@@ -240,11 +243,13 @@ void DfxFrameTrace::ShowEventRecord() const
     printf("Total: E %d, T %d, F %d\n", evtCnt_, tskCnt_, frmCnt_);
     for (EventRecord *it = events_; it != nullptr; it = it->next) {
         EventRecord &evt = *it;
-        printf("\nE %d: %llu\n", evtIndex, GetDuration(evt.startTime, evt.endTime));
+        printf("\nE %d: %llu, (%llu, %llu)\n", evtIndex, GetDuration(evt.startTime, evt.endTime),
+            evt.startTime, evt.endTime);
         taskIndex = 0;
         for (TaskRecord *it1 = evt.tasks; it1 != nullptr; it1 = it1->next) {
             TaskRecord &tsk = *it1;
-            printf(" T %d: %llu\n", taskIndex, GetDuration(tsk.startTime, tsk.endTime));
+            printf(" T %d: %llu, (%llu, %llu)\n", taskIndex, GetDuration(tsk.startTime, tsk.endTime),
+                tsk.startTime, tsk.endTime);
             if (tsk.frameInfo != nullptr) {
                 ShowFrameRecord(tsk.frameInfo);
             }
index 2a72530..9373c86 100644 (file)
@@ -36,11 +36,11 @@ void LiteKeyDevice::DispatchEvent(const DeviceData& data)
     }\r
     KeyEvent event({data.keyId, data.state});\r
     RootView::GetInstance()->OnKeyEvent(event);\r
-    #ifdef SUPPORT_OHOSFWK\r
+#ifdef SUPPORT_OHOSFWK\r
     if (!GraphicService::GetInstance()->IsNativeRunning()) {\r
         OHOS::ACELite::KeyListener::GetInstance()->OnKeyEvent(event);\r
     }\r
-    #endif\r
+#endif\r
 }\r
 \r
 bool LiteKeyDevice::IsEventEmpty()\r
index ca7d64c..13e4801 100644 (file)
@@ -35,7 +35,7 @@ static bool AllocImageInfo(ImageInfo& info, uint16_t width, uint16_t height, Col
 }
 
 void ClipImg::ClipImgByPath(ImageInfo& dstInfo, ImageInfo& srcInfo, const Path* path, Rect* srcImgArea,
-    const Matrix4<float>* pathMatrix, const Matrix4<float>* imgMatrix)
+    const Matrix4<float>* pathMatrix, const Matrix4<float>* imgMatrix, bool isAlphaFF)
 {
     if (path == nullptr || path->cmds == nullptr || path->data == nullptr) {
         return;
@@ -43,7 +43,11 @@ void ClipImg::ClipImgByPath(ImageInfo& dstInfo, ImageInfo& srcInfo, const Path*
 
     uintptr_t handle = LiteMGfxEngine::GetInstance()->InitPath(true);
     LiteMGfxEngine::GetInstance()->SetPathData(handle, path->cmdNum, path->cmds, path->dataNum, path->data);
-    LiteMGfxEngine::GetInstance()->ClipImgByPath(dstInfo, srcInfo, handle, srcImgArea, pathMatrix, imgMatrix);
+    if (isAlphaFF) {
+        LiteMGfxEngine::GetInstance()->ClipImgByPath(dstInfo, srcInfo, handle, srcImgArea, pathMatrix, imgMatrix, true);
+    } else {
+        LiteMGfxEngine::GetInstance()->ClipImgByPath(dstInfo, srcInfo, handle, srcImgArea, pathMatrix, imgMatrix);
+    }
 }
 
 ImageInfo ClipImg::ClipImgByCircle(ImageInfo& srcInfo, Point center, int16_t radius,
index f16b708..5d55adf 100644 (file)
@@ -19,7 +19,7 @@ namespace OHOS {
 class ClipImg : public HeapBase {
 public:
     static void ClipImgByPath(ImageInfo& dstInfo, ImageInfo& srcInfo, const Path* path, Rect* srcImgArea,
-        const Matrix4<float>* pathMatrix, const Matrix4<float>* imgMatrix);
+        const Matrix4<float>* pathMatrix, const Matrix4<float>* imgMatrix, bool isAlphaFF = false);
     static ImageInfo ClipImgByCircle(ImageInfo& srcInfo, Point center, int16_t radius,
         ColorMode mode = RGB888, bool immediatelySync = false);
     static ImageInfo ClipImgByRect(ImageInfo& srcInfo, Rect* srcImgArea, Rect clipArea, ColorMode mode = RGB888);
index 83ac11d..d7feafb 100644 (file)
 #if ENABLE_VGU_ENGINE && CAPABILITY_HWDRAW_PATH
 namespace OHOS {
 constexpr float ARC_TO_BEZIER_90_DEG = 0.551915024494f;
-#define RAD_90_DEG (90 / RADIAN_TO_ANGLE)
-constexpr int16_t DEG_360 = 360;
-constexpr int16_t DEG_90 = 90;
-constexpr int16_t DATA_NUM_PER_BEZIER = 6;
+constexpr int16_t DATA_NUM_PER_BEZ = 6;
+constexpr float PRECISION_ANGLE = 0.01f;
+
+bool HWDrawUtils::AllocBufferForCmd(uint16_t cmdNum, uint8_t*& addr)
+{
+    AllocInfo dataInfo;
+    dataInfo.expectedSize = sizeof(uint8_t) * cmdNum;
+    dataInfo.usage = HBM_USE_ASSIGN_SIZE | HBM_USE_MEM_PATH;
+    GrallocBuffer dataBuffer;
+    if (!GrallocEngines::GetInstance()->AllocBuffer(dataInfo, dataBuffer)) {
+        GRAPHIC_LOGE("Alloc buffer for data failed.");
+        return false;
+    }
+    addr = reinterpret_cast<uint8_t*>(dataBuffer.virAddr);
+    return true;
+}
 
 bool HWDrawUtils::AllocBufferForData(uint16_t dataNum, float*& addr)
 {
@@ -42,119 +54,136 @@ bool HWDrawUtils::AllocBufferForData(uint16_t dataNum, float*& addr)
     return true;
 }
 
-void HWDrawUtils::GetArcControlPoint(float* arcData, const Point& center, float mangicNum, int8_t neg)
+void HWDrawUtils::GetArcControlPoint(float* arcData, float centerX, float centerY, float mangicNum, int8_t neg)
 {
-    arcData[2] = arcData[0] - (neg * mangicNum * (arcData[1] - center.y)); // 2: index
-    arcData[3] = arcData[1] + (neg * mangicNum * (arcData[0] - center.x)); // 3: index
-    arcData[4] = arcData[6] + (neg * mangicNum * (arcData[7] - center.y)); // 4, 6, 7: index
-    arcData[5] = arcData[7] - (neg * mangicNum * (arcData[6] - center.x)); // 5, 7, 6: index
+    arcData[2] = arcData[0] - (neg * mangicNum * (arcData[1] - centerY)); // 2: index
+    arcData[3] = arcData[1] + (neg * mangicNum * (arcData[0] - centerX)); // 3: index
+    arcData[4] = arcData[6] + (neg * mangicNum * (arcData[7] - centerY)); // 4, 6, 7: index
+    arcData[5] = arcData[7] - (neg * mangicNum * (arcData[6] - centerX)); // 5, 7, 6: index
 }
 
-void HWDrawUtils::ConvertCircularDegree(float& angle)
+static float ConvertArcDegree(ArcInfo& arc, uint32_t& quaNum, uint32_t& bezNum)
 {
-    if (angle >= DEG_360) {
-        angle = angle - DEG_360 * (angle / DEG_360);
+    // convert angle in the interface to gpu angle
+    arc.startAngle = arc.startAngle - QUARTER_IN_DEGREE;
+    arc.endAngle = arc.endAngle - QUARTER_IN_DEGREE;
+    float deltaAngle = abs(arc.endAngle - arc.startAngle);
+    if (FloatMore(deltaAngle, CIRCLE_IN_DEGREE, PRECISION_ANGLE)) {
+        arc.startAngle = 0.0f;
+        arc.endAngle = CIRCLE_IN_DEGREE;
+        quaNum = 4; // 4: num of quaerter in circle
+        bezNum = 4; // 4: num of quaerter in circle
+        return 0.0f;
     }
-    if (angle - DEG_90 >= 0) {
-        angle -= DEG_90;
-    } else {
-        angle = DEG_360 - (DEG_90 - angle);
+    int neg = (arc.startAngle < arc.endAngle) ? 1 : -1;
+    uint32_t deltaAngleInt = static_cast<uint32_t>(deltaAngle);
+    if (FloatEqual(deltaAngle - deltaAngleInt, 1.0f, PRECISION_ANGLE)) {
+        deltaAngleInt += 1;
     }
+    quaNum = deltaAngleInt / QUARTER_IN_DEGREE;
+    float remain = deltaAngle - quaNum * QUARTER_IN_DEGREE;
+    bezNum = FloatMore(remain, 0.0f, PRECISION_ANGLE) ? quaNum + 1:  quaNum;
+    return remain;
 }
 
-int8_t HWDrawUtils::GetArcData(float* arcData, const Point& center,
-    uint16_t radius, float startAngle, float endAngle)
+void HWDrawUtils::GetArcData(float* arcData, const ArcInfo& arc, uint32_t quaNum, float remain)
 {
-    int neg = (startAngle < endAngle) ? 1 : -1;
-    float angleExtend = endAngle - startAngle;
-    int loop = static_cast<float>(angleExtend) * neg / DEG_90;
-
-    ConvertCircularDegree(startAngle);
-    float startAngleRad = startAngle / RADIAN_TO_ANGLE;
-    float extendRad = angleExtend / RADIAN_TO_ANGLE;
-    float endAngleRad = startAngleRad + extendRad;
-
-    arcData[0] = center.x + radius * cos(startAngleRad);
-    arcData[1] = center.y + radius * sin(startAngleRad);
-    int8_t bezierSegmentCount = 0;
-    float a = startAngleRad + neg * RAD_90_DEG;
-    for (int i = 0; i < loop; ++i) {
-        arcData[DATA_NUM_PER_BEZIER * bezierSegmentCount + 6] = center.x + radius * cos(a);  // 6: x offset
-        arcData[DATA_NUM_PER_BEZIER * bezierSegmentCount + 7] = center.y + radius * sin(a);  // 7: y offset
-        GetArcControlPoint(&arcData[DATA_NUM_PER_BEZIER * bezierSegmentCount], center, ARC_TO_BEZIER_90_DEG, neg);
-        ++bezierSegmentCount;
-        a += (neg * RAD_90_DEG); // when neg == 1, then clockwise; when neg == -1, counter clockwise
+    Point center = arc.center;
+    int16_t radius = arc.radius;
+    int neg = (arc.startAngle < arc.endAngle) ? 1 : -1;
+
+    arcData[0] = center.x + radius * Sin(QUARTER_IN_DEGREE - arc.startAngle);
+    arcData[1] = center.y + radius * Sin(arc.startAngle);
+    float angle = arc.startAngle;
+    for (uint32_t i = 0; i < quaNum; ++i) {
+        angle += (neg * QUARTER_IN_DEGREE); // when neg == 1, then clockwise; when neg == -1, counter clockwise
+        arcData[DATA_NUM_PER_BEZ * i + 6] = center.x + radius * Sin(QUARTER_IN_DEGREE - angle);  // 6: offset
+        arcData[DATA_NUM_PER_BEZ * i + 7] = center.y + radius * Sin(angle);  // 7: offset
+        GetArcControlPoint(&arcData[DATA_NUM_PER_BEZ * i], center.x, center.y, ARC_TO_BEZIER_90_DEG, neg);
     }
-    a = RAD_90_DEG - (a - endAngleRad) * neg;
 
-    if (a > 1e-5) {
-        arcData[DATA_NUM_PER_BEZIER * bezierSegmentCount + 6] = center.x + radius * cos(endAngleRad); // 6: x offset
-        arcData[DATA_NUM_PER_BEZIER * bezierSegmentCount + 7] = center.y + radius * sin(endAngleRad); // 7: y offset
+    if (FloatMore(remain, 0.0f, PRECISION_ANGLE)) {
+        arcData[DATA_NUM_PER_BEZ * quaNum + 6] = center.x + radius * Sin(QUARTER_IN_DEGREE - arc.endAngle); // 6: offset
+        arcData[DATA_NUM_PER_BEZ * quaNum + 7] = center.y + radius * Sin(arc.endAngle); // 7: offset
         // 4.0: multiplier, 3.0: divider, 2: divider
-        float magicNum = 4.0f / 3.0f * (1 - cos(a / 2)) / sin(a / 2);
-        GetArcControlPoint(&arcData[DATA_NUM_PER_BEZIER * bezierSegmentCount], center, magicNum, neg);
-        ++bezierSegmentCount;
+        float magicNum = 4.0f / 3.0f * (1 - Sin(QUARTER_IN_DEGREE - remain / 2)) / Sin(remain / 2);
+        GetArcControlPoint(&arcData[DATA_NUM_PER_BEZ * quaNum], center.x, center.y, magicNum, neg);
     }
-    return bezierSegmentCount;
 }
 
-void HWDrawUtils::Obtain30DegSectorPath(const ArcInfo& arc, uint8_t* cmd, float* data)
+void HWDrawUtils::Obtain30DegSectorPath(const ArcInfo& arc, float x, float y, uint8_t* cmd, float* data)
 {
-    float startAngle = arc.startAngle;
-    float endAngle = arc.endAngle;
-    float angleExtend = endAngle - startAngle;
+    // convert angle in the interface to gpu angle
+    float startAngle = (arc.startAngle - QUARTER_IN_DEGREE) / RADIAN_TO_ANGLE;
+    // make sure the range is accurate, not use (arc.endAngle - QUARTER_IN_DEGREE) / RADIAN_TO_ANGLE
+    float endAngle = startAngle + (arc.endAngle - arc.startAngle) / RADIAN_TO_ANGLE;
     float neg = (startAngle < endAngle) ? 1 : -1;
 
-    ConvertCircularDegree(startAngle);
-    float startAngleRad = startAngle / RADIAN_TO_ANGLE;
-    float extendRad = static_cast<float>(angleExtend) / RADIAN_TO_ANGLE;
-    float endAngleRad = startAngleRad + extendRad;
-
     cmd[0] = CMD_MOVE_TO;
     cmd[1] = CMD_LINE_TO;
     cmd[2] = CMD_CUBIC_TO; // 2: index
     cmd[3] = CMD_CLOSE; // 3: index
 
-    float a = startAngleRad + neg * RAD_90_DEG;
-    a = RAD_90_DEG - (a - endAngleRad) * neg;
-
-    data[0] = arc.center.x;
-    data[1] = arc.center.y;
-    data[2] = arc.center.x + arc.radius * cos(startAngleRad); // 2: index
-    data[3] = arc.center.y + arc.radius * sin(startAngleRad); // 3: index
-    data[8] = arc.center.x + arc.radius * cos(endAngleRad); // 8: index
-    data[9] = arc.center.y + arc.radius * sin(endAngleRad); // 9: index
-
+    float a = (endAngle - startAngle) * neg;
+    data[0] = x;
+    data[1] = y;
+    data[2] = x + arc.radius * cos(startAngle); // 2: index
+    data[3] = y + arc.radius * sin(startAngle); // 3: index
+    data[8] = x + arc.radius * cos(endAngle); // 8: index
+    data[9] = y + arc.radius * sin(endAngle); // 9: index
     float magicNum = 4.0f / 3.0f * (1 - cos(a / 2)) / sin(a / 2); // 2: divisor
-    GetArcControlPoint(&data[2], arc.center, magicNum, neg); // 2: index
+    GetArcControlPoint(&data[2], x, y, magicNum, neg); // 2: index
 }
 
-bool HWDrawUtils::ObtainArcPath(const ArcInfo& arc, uint32_t& cmdNum, uint8_t*& cmds, uint32_t& dataNum, float*& data)
+bool HWDrawUtils::ObtainArcPath(ArcInfo arc, uint32_t& cmdNum, uint8_t*& cmds, uint32_t& dataNum, float*& data)
 {
-    float startAngle = arc.startAngle;
-    float endAngle = arc.endAngle;
-
-    int16_t num = (abs(endAngle - startAngle) / DEG_90 + 1) * DATA_NUM_PER_BEZIER + 2; // 2: coordinate num
-    AllocInfo cmdInfo;
-    cmdInfo.expectedSize = sizeof(uint8_t) * (num + 1);
-    cmdInfo.usage = HBM_USE_ASSIGN_SIZE | HBM_USE_MEM_PATH;
-    GrallocBuffer cmdBuffer;
-    if (!GrallocEngines::GetInstance()->AllocBuffer(cmdInfo, cmdBuffer)) {
-        GRAPHIC_LOGE("Alloc buffer for cmd failed.");
+    uint32_t quaNum = 0;
+    uint32_t bezNum = 0;
+    float remain = ConvertArcDegree(arc, quaNum, bezNum);
+
+    cmdNum = bezNum + 1;
+    dataNum = bezNum * DATA_NUM_PER_BEZ + 2; // 2: the number of start point path data
+    if (!AllocBufferForCmd(cmdNum, cmds)) {
         return false;
     }
-    cmds = (uint8_t *)cmdBuffer.virAddr;
-    if (!AllocBufferForData(num, data)) {
+    if (!AllocBufferForData(dataNum, data)) {
         GrallocEngines::GetInstance()->FreeBuffer(cmds);
         cmds = nullptr;
         return false;
     }
 
-    int8_t bezierSegmentCount = GetArcData(data, arc.center, arc.radius, startAngle, endAngle);
-    dataNum = DATA_NUM_PER_BEZIER * bezierSegmentCount + 2; // 2: coordinate num
-    cmdNum = bezierSegmentCount + 1;
+    GetArcData(data, arc, quaNum, remain);
     cmds[0] = CMD_MOVE_TO;
-    for (int i = 1; i <= bezierSegmentCount; i++) {
+    for (int i = 1; i < cmdNum; i++) {
+        cmds[i] = CMD_CUBIC_TO;
+    }
+    return true;
+}
+
+bool HWDrawUtils::ObtainSectorPath(ArcInfo arc, uint32_t& cmdNum, uint8_t*& cmds,
+    uint32_t& dataNum, float*& data)
+{
+    uint32_t quaNum = 0;
+    uint32_t bezNum = 0;
+    float remain = ConvertArcDegree(arc, quaNum, bezNum);
+
+    cmdNum = bezNum + 3; // 3: num of cmds, which are assigned in the below code
+    dataNum = bezNum * DATA_NUM_PER_BEZ + 4; // 4: the number of path data, include center and start point
+    if (!AllocBufferForCmd(cmdNum, cmds)) {
+        return false;
+    }
+    if (!AllocBufferForData(dataNum, data)) {
+        GrallocEngines::GetInstance()->FreeBuffer(cmds);
+        cmds = nullptr;
+        return false;
+    }
+    data[0] = arc.center.x;
+    data[1] = arc.center.y;
+    GetArcData(data + 2, arc, quaNum, remain); // 2: offset
+    cmds[0] = CMD_MOVE_TO;
+    cmds[1] = CMD_LINE_TO;
+    cmds[cmdNum - 1] = CMD_CLOSE;
+    for (int i = 2; i < cmdNum - 1; i++) {
         cmds[i] = CMD_CUBIC_TO;
     }
     return true;
@@ -168,15 +197,9 @@ bool HWDrawUtils::ObtainCirclePath(const ArcInfo& arc, uint32_t& cmdNum,
     Point center = arc.center;
 
     cmdNum = 5; // 5: Circle path command number is 5
-    AllocInfo cmdInfo;
-    cmdInfo.expectedSize = sizeof(uint8_t) * cmdNum;
-    cmdInfo.usage = HBM_USE_ASSIGN_SIZE | HBM_USE_MEM_PATH;
-    GrallocBuffer cmdBuffer;
-    if (!GrallocEngines::GetInstance()->AllocBuffer(cmdInfo, cmdBuffer)) {
-        GRAPHIC_LOGE("Alloc buffer for cmd failed.");
+    if (!AllocBufferForCmd(cmdNum, cmds)) {
         return false;
     }
-    cmds = (uint8_t *)cmdBuffer.virAddr;
     dataNum = 26; // Circle path data number is 26
     if (!AllocBufferForData(dataNum, data)) {
         GrallocEngines::GetInstance()->FreeBuffer(cmds);
@@ -222,16 +245,9 @@ bool HWDrawUtils::ObtainCirclePath(const ArcInfo& arc, uint32_t& cmdNum,
 bool HWDrawUtils::ObtainRectPathWithRadius(const Rect& rect, Path& path, int16_t radius)
 {
     path.cmdNum = 10; // 10: Circle path command number is 10
-    AllocInfo cmdInfo;
-    cmdInfo.expectedSize = sizeof(uint8_t) * path.cmdNum;
-    cmdInfo.usage = HBM_USE_ASSIGN_SIZE | HBM_USE_MEM_PATH;
-    GrallocBuffer cmdBuffer;
-    if (!GrallocEngines::GetInstance()->AllocBuffer(cmdInfo, cmdBuffer)) {
-        GRAPHIC_LOGE("Alloc buffer for cmd failed.");
+    if (!AllocBufferForCmd(path.cmdNum, path.cmds)) {
         return false;
     }
-    path.cmds = (uint8_t *)cmdBuffer.virAddr;
-
     path.cmds[0] = CMD_MOVE_TO;
     path.cmds[1] = CMD_LINE_TO;
     path.cmds[2] = CMD_CUBIC_TO;  // 2: cmd index
@@ -288,17 +304,13 @@ void HWDrawUtils::GetFilledRoundRectData(float* data, uint16_t radius, const Rec
     data[32] = x1; // 32: index
     data[33] = y1 + r; // 33: index
 
-    Point center1 = {x1 + r, y2 - r};
-    GetArcControlPoint(&data[2], center1, ARC_TO_BEZIER_90_DEG, -1); // 2: index
+    GetArcControlPoint(&data[2], x1 + r, y2 - r, ARC_TO_BEZIER_90_DEG, -1); // 2: index
 
-    Point center2 = {x2 - r, y2 - r};
-    GetArcControlPoint(&data[10], center2, ARC_TO_BEZIER_90_DEG, -1); // 10: index
+    GetArcControlPoint(&data[10], x2 - r, y2 - r, ARC_TO_BEZIER_90_DEG, -1); // 10: index
 
-    Point center3 = {x2 - r, y1 + r};
-    GetArcControlPoint(&data[18], center3, ARC_TO_BEZIER_90_DEG, -1); // 18: index
+    GetArcControlPoint(&data[18], x2 - r, y1 + r, ARC_TO_BEZIER_90_DEG, -1); // 18: index
 
-    Point center4 = {x1 + r, y1 + r};
-    GetArcControlPoint(&data[26], center4, ARC_TO_BEZIER_90_DEG, -1); // 26: index
+    GetArcControlPoint(&data[26], x1 + r, y1 + r, ARC_TO_BEZIER_90_DEG, -1); // 26: index
 }
 }
 #endif
index e0efe02..86d3b04 100644 (file)
@@ -29,17 +29,18 @@ public:
         static HWDrawUtils instance;
         return &instance;
     }
-    bool ObtainArcPath(const ArcInfo& arc, uint32_t& cmdNum, uint8_t*& cmds, uint32_t& dataNum, float*& data);
+    bool ObtainArcPath(ArcInfo arc, uint32_t& cmdNum, uint8_t*& cmds, uint32_t& dataNum, float*& data);
+    bool ObtainSectorPath(ArcInfo arc, uint32_t& cmdNum, uint8_t*& cmds, uint32_t& dataNum, float*& data);
     bool ObtainCirclePath(const ArcInfo& arc, uint32_t& cmdNum, uint8_t*& cmds, uint32_t& dataNum, float*& data);
+    bool AllocBufferForCmd(uint16_t cmdNum, uint8_t*& addr);
     bool AllocBufferForData(uint16_t dataNum, float*& addr);
-    void Obtain30DegSectorPath(const ArcInfo& arc, uint8_t* cmd, float* data);
+    void Obtain30DegSectorPath(const ArcInfo& arc, float x, float y, uint8_t* cmd, float* data);
     bool ObtainRectPathWithRadius(const Rect& rect, Path& path, int16_t radius);
 private:
     HWDrawUtils() {}
     virtual ~HWDrawUtils() {}
-    int8_t GetArcData(float* arcData, const Point& center, uint16_t radius, float startAngle, float endAngle);
-    void GetArcControlPoint(float* arcData, const Point& center, float mangicNum, int8_t neg);
-    void ConvertCircularDegree(float& angle);
+    void GetArcData(float* arcData, const ArcInfo& arc, uint32_t quaNum, float bezMore);
+    void GetArcControlPoint(float* arcData, float centerX, float centerY, float mangicNum, int8_t neg);
     void GetFilledRoundRectData(float* data, uint16_t radius, const Rect& rect);
 };
 }
index 6bed8ef..4f42d20 100644 (file)
@@ -102,7 +102,7 @@ public:
         const Rect& subRect,
         const BlendOption& blendOption) override;
 
-    void Blur(BufferInfo& dst, uint16_t radius) override;
+    void Blur(BufferInfo& dst, float radius) override;
 
     void Fill(BufferInfo& dst,
         const Rect& fillArea,
@@ -129,7 +129,7 @@ public:
         VGUStrokeAttr* strokeAttr, VGUFillAttr* fillAttr, VGUMatrix3* matrix);
 
     void ClipImgByPath(ImageInfo& dstInfo, ImageInfo& srcInfo, uintptr_t path, Rect* srcImgArea,
-        const Matrix4<float>* pathMatrix, const Matrix4<float>* imgMatrix);
+        const Matrix4<float>* pathMatrix, const Matrix4<float>* imgMatrix, bool isAlphaFF = false);
 
     bool Convert2VGUFormat(const ColorMode& colorMode, VGUPixelFormat& dstColorFmt) const;
     void AddHardwareLayer(IHardwareView* view)
@@ -170,7 +170,10 @@ private:
         ReleasePath();
     }
 
-    void DrawRoundRect(BufferInfo& dst, const Rect& fillArea, const Style& style, const Rect& dirtyRect);
+    void DrawRectWithRound(BufferInfo& dst, const Rect& rect, const Style& style, const Rect& dirtyRect,
+        OpacityType opacity);
+    void DrawRectWithoutRound(BufferInfo& dst, const Rect& rect, const Style& style, const Rect& dirtyRect,
+        OpacityType opacity);
     List<Path*> pathList_ = {};
     void ReleasePath();
 
index 322b4ca..3a2af9a 100644 (file)
@@ -80,7 +80,7 @@ RetCode HWJpegDecoder::CreateDecoder(ImgResDsc& dsc)
     src.vir_buf = reinterpret_cast<td_char *>(filedata_);
     src.phy_buf = reinterpret_cast<td_u32>(src.vir_buf);
     src.size = g_fileLen;
-    dinfo_.scale = JPEG_SCALE_1;
+    dinfo_.scale = JPEG_SCALE_1; // suggest to customize the scaling ratio based on the file name.
     dinfo_.output_yuv420sp = true;
 
     int ret = uapi_jpeg_decomress_create(&dinfo_, &src, true);
@@ -98,9 +98,10 @@ RetCode HWJpegDecoder::GetHeader(ImgResDsc& dsc)
         return RetCode::FAIL;
     }
 
-    dsc.imgInfo.header.width = dinfo_.image_width;
-    dsc.imgInfo.header.height = dinfo_.image_height;
+    dsc.imgInfo.header.width = dinfo_.output_width;
+    dsc.imgInfo.header.height = dinfo_.output_height;
     dsc.imgInfo.header.colorMode = RGB888;
+    dsc.imgInfo.header.compressMode = 0;
     return RetCode::OK;
 }
 
@@ -150,8 +151,8 @@ RetCode HWJpegDecoder::ConvertYUVToRGB(ImgResDsc& dsc, jpeg_dst_struct* dst)
     uint8_t* uvStart = reinterpret_cast<uint8_t*>(dst->vir_buf) + dst->uv_offset;
     uint32_t uvLength = dinfo_.output.size[1];
 
-    uint16_t imgWidth = dinfo_.image_width;
-    uint16_t imgHeight = dinfo_.image_height;
+    uint16_t imgWidth = dinfo_.output_width;
+    uint16_t imgHeight = dinfo_.output_height;
     uint16_t alignedImgWidth = ALIGN_BYTE(imgWidth, BYTE_ALIGNMENT);
     uint32_t rgbSize = alignedImgWidth * imgHeight * 3; // 3: bpp of RGB888
     ImageInfo tempImgInfo = {0};
index aca7b25..e07764d 100644 (file)
@@ -83,7 +83,8 @@ bool GrallocEngines::AllocBuffer(const AllocInfo& info, GrallocBuffer& buffer)
 #endif
 #if ENABLE_MEMORY_CHECK
     if (isMonitorEnabled_) {
-        printf("[Alloc] addr = %p, size = %d, usage = %llu\n", bufferHandle->virAddr, bufferHandle->size, bufferHandle->usage);
+        printf("[Alloc] addr = %p, size = %d, usage = %llu\n",
+            bufferHandle->virAddr, bufferHandle->size, bufferHandle->usage);
     }
 #endif
     if ((info.usage & HBM_USE_MEM_YUV) == HBM_USE_MEM_YUV) {
index 9725426..e368766 100644 (file)
@@ -138,7 +138,12 @@ bool MemCheck::MemAdd(int size, uintptr_t address)
         }
         lock_.Unlock();
 #ifdef __LITEOS__
+#ifdef LOSCFG_BACKTRACE
+        GRAPHIC_LOGE("Mem leak! Check backtrace!");
+        LOS_BackTrace();
+#else
         LOS_Panic("mem leak here!\n");
+#endif
 #endif
     }
 
index a4d3de6..0d9c09e 100644 (file)
 \r
 namespace OHOS {\r
 namespace {\r
-struct FaceInfo {\r
-    const char* name;\r
-    const char* path;\r
-} ;\r
-\r
 static constexpr uint8_t COVERFLOW_MAX_PAGE_NUM = 6;\r
-static FaceInfo g_faceInfo[COVERFLOW_MAX_PAGE_NUM] = {\r
-    {"1 rainbow", RES_PATH"/rainbow.bin"},\r
-    {"2 kaleidoscope", RES_PATH"/kaleidoscope.bin"},\r
-    {"3 planet", RES_PATH"/planet.bin"},\r
-    {"4 rainbow", RES_PATH"/rainbow.bin"},\r
-    {"5 kaleidoscope", RES_PATH"/kaleidoscope.bin"},\r
-    {"6 planet", RES_PATH"/planet.bin"}\r
+const char* g_faceInfo[COVERFLOW_MAX_PAGE_NUM] = {\r
+    RES_PATH"/rainbow.bin",\r
+    RES_PATH"/kaleidoscope.bin",\r
+    RES_PATH"/planet.bin",\r
+    RES_PATH"/rainbow.bin",\r
+    RES_PATH"/kaleidoscope.bin",\r
+    RES_PATH"/planet.bin"\r
 };\r
-const char* addImgPath = RES_PATH"/add.bin";\r
-const char* subImgPath = RES_PATH"/sub.bin";\r
+\r
+static const char* ADD_IMG_PATH = RES_PATH"/add.bin";\r
+static const char* SUB_IMG_PATH = RES_PATH"/sub.bin";\r
 static constexpr uint8_t PAGE_MARGIN = 20;\r
 static constexpr uint16_t PAGE_WIDTH = 250;\r
 static constexpr uint16_t PAGE_HEIGHT = 250;\r
@@ -111,14 +107,14 @@ void UITestCoverflow2::UITestCoverflow2001()
         UIImageView* image = new UIImageView();\r
         image->Resize(IMAGE_WIDTH, IMAGE_HEIGHT);\r
         page->Add(image);\r
-        ImageInfo* src = ImageCacheManager::GetInstance().LoadSingleRes(std::string(g_faceInfo[i].path));\r
+        ImageInfo* src = ImageCacheManager::GetInstance().LoadSingleRes(std::string(g_faceInfo[i]));\r
         image->SetSrc(src);\r
         image->LayoutCenterOfParent();\r
 \r
         UIImageView* imageSub = new UIImageView();\r
         imageSub->SetPosition(200, 0, 50, 50); // 200: x position 50: width and height\r
         page->Add(imageSub);\r
-        src = ImageCacheManager::GetInstance().LoadSingleRes(std::string(subImgPath));\r
+        src = ImageCacheManager::GetInstance().LoadSingleRes(std::string(SUB_IMG_PATH));\r
         imageSub->SetSrc(src);\r
         imageSub->SetTouchable(true);\r
         imageSub->SetOnClickListener(this);\r
@@ -131,7 +127,7 @@ void UITestCoverflow2::UITestCoverflow2001()
 void UITestCoverflow2::CreateAddButton()\r
 {\r
     UITransformGroup* page = new UITransformGroup();\r
-    page->SetPosition(0, 100, PAGE_WIDTH, PAGE_HEIGHT);\r
+    page->SetPosition(0, 100, PAGE_WIDTH, PAGE_HEIGHT); // 100: y\r
 \r
     if (addImage_ == nullptr) {\r
         addImage_ = new UIImageView();\r
@@ -145,7 +141,7 @@ void UITestCoverflow2::CreateAddButton()
     page->Add(addImage_);\r
     addImage_->LayoutCenterOfParent();\r
 \r
-    ImageInfo* src = ImageCacheManager::GetInstance().LoadSingleRes(std::string(addImgPath));\r
+    ImageInfo* src = ImageCacheManager::GetInstance().LoadSingleRes(std::string(ADD_IMG_PATH));\r
     addImage_->SetSrc(src);\r
     coverflow_->Add(page);\r
 }\r
@@ -158,8 +154,7 @@ void UITestCoverflow2::CreateTitleLabel()
     label_->SetPosition(127, 50, 200, 50); // 127 50 200 50: label position\r
     label_->SetTextColor(Color::White());\r
     label_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    lastIndex_ = coverflow_->GetCurrentPage();\r
-    label_->SetText(g_faceInfo[lastIndex_].name);\r
+    label_->SetText("[ITEM_NAME]");\r
     label_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, LABEL_FONT_SIZE);\r
     container_->Add(label_);\r
 }\r
@@ -168,7 +163,7 @@ bool UITestCoverflow2::OnClick(UIView& view, const ClickEvent& event)
 {\r
     if (&view == addImage_) {\r
         UITransformGroup* page = new UITransformGroup();\r
-        page->SetPosition(0, 100, PAGE_WIDTH, PAGE_HEIGHT);\r
+        page->SetPosition(0, 100, PAGE_WIDTH, PAGE_HEIGHT); // 100: y\r
 \r
         UIImageView* image = new UIImageView();\r
         image->Resize(IMAGE_WIDTH, IMAGE_HEIGHT);\r
@@ -180,7 +175,7 @@ bool UITestCoverflow2::OnClick(UIView& view, const ClickEvent& event)
         UIImageView* imageSub = new UIImageView();\r
         imageSub->SetPosition(200, 0, 50, 50); // 200: x position 50: width and height\r
         page->Add(imageSub);\r
-        src = ImageCacheManager::GetInstance().LoadSingleRes(std::string(subImgPath));\r
+        src = ImageCacheManager::GetInstance().LoadSingleRes(std::string(SUB_IMG_PATH));\r
         imageSub->SetSrc(src);\r
         imageSub->SetTouchable(true);\r
         imageSub->SetOnClickListener(this);\r
@@ -218,9 +213,6 @@ bool UITestCoverflow2::OnScroll(uint16_t distance)
     }\r
     if (newCenterIndex != lastIndex_ && newCenterIndex < COVERFLOW_MAX_PAGE_NUM) {\r
         lastIndex_ = newCenterIndex;\r
-        label_->SetText(g_faceInfo[newCenterIndex].name);\r
-    } else if (newCenterIndex >= COVERFLOW_MAX_PAGE_NUM) {\r
-        label_->SetText("");\r
     }\r
 \r
     Rect curViewRect = coverflow_->GetViewByIndex(lastIndex_)->GetOrigRect();\r
index 32b202b..c95805f 100644 (file)
@@ -211,6 +211,22 @@ void UITestCross::VideoPage::CoverEnd(bool isCovered)
     }
 }
 
+void UITestCross::VideoPage::OnCovered()
+{
+    videoPlay_->PauseVideoPlay();
+    animator_->Stop();
+}
+
+void UITestCross::VideoPage::OnUncovered()
+{
+    if (videoPlay_->isPause_) {
+        videoPlay_->ResumeVideoPlay();
+    } else if (!videoPlay_->isPlayed_) {
+        videoPlay_->StartVideoPlay();
+    }
+    animator_->Start();
+}
+
 void UITestCross::VideoPage::StartVideo(void)
 {
     if (videoPlay_ != nullptr && animator_ != nullptr) {
@@ -251,6 +267,8 @@ void UITestCross::SetUp()
     video_->SetStyle(STYLE_BACKGROUND_OPA, OPA_OPAQUE);
     video_->PageInit();
     video_->StartVideo();
+    video_->SetTouchable(true);
+    video_->SetOnClickListener(this);
 #endif
     SetUpPage(&card1_, CROSS_CAT);
     SetUpPage(&card2_, CROSS_DOVE);
@@ -278,6 +296,8 @@ void UITestCross::SetUp()
     down_->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
     down_->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);
     down_->SetViewId("messageView");
+    down_->SetTouchable(true);
+    down_->SetOnClickListener(this);
     UILabel *msg = new UILabel();
     msg->SetPosition(177, 212, 100, 30); // 177, 212, 100, 30: Left, right, width, height.
     msg->SetText("无消息");
@@ -335,4 +355,27 @@ const UIView* UITestCross::GetTestView()
 {
     return container_;
 }
+
+bool UITestCross::OnClick(UIView& view, const ClickEvent& event)
+{
+    if (&view == down_) {
+        static uint16_t pageIndex = 0;
+        container_->SetVerCurrentPage(pageIndex);
+        printf("SetVerCurrentPage: %d", pageIndex);
+        pageIndex++;
+        if (pageIndex > 1) {
+            pageIndex = 0;
+        }
+    } else if (&view == video_) {
+        static uint16_t pageIndexFromCenter = 0;
+        container_->SetVerCurrentPage(pageIndexFromCenter);
+        printf("SetVerCurrentPage: %d", pageIndexFromCenter);
+        if (pageIndexFromCenter == 0) {
+            pageIndexFromCenter = 2; // 2: index
+        } else {
+            pageIndexFromCenter = 0;
+        }
+    }
+    return true;
+}
 }
index 1f07b38..d8535a3 100644 (file)
@@ -21,7 +21,7 @@
 #endif
 
 namespace OHOS {
-class UITestCross : public UITest {
+class UITestCross : public UITest, UIView::OnClickListener {
 public:
     class VideoAnimatorCallback : public AnimatorCallback {
     public:
@@ -44,6 +44,8 @@ public:
         void ScrollEnd(bool isActive) override;
         void CoverBegin(bool isCovered) override;
         void CoverEnd(bool isCovered) override;
+        void OnCovered() override;
+        void OnUncovered() override;
         void PageInit(void);
         void StartVideo(void);
 
@@ -62,6 +64,7 @@ public:
     void SetUp() override;
     void TearDown() override;
     const UIView* GetTestView() override;
+    bool OnClick(UIView& view, const ClickEvent& event) override;
 
 private:
     UICrossView* container_ = nullptr;
index bf56cbe..83db466 100644 (file)
@@ -24,6 +24,34 @@ const static int16_t X_300 = 300;
 const static int16_t WIDTH_100 = 100;
 const static int16_t HEIGHT_50 = 50;
 
+void SectorAnimatorCallback::Callback(UIView *view)
+{
+    UICanvasExt* canvas = dynamic_cast<UICanvasExt*>(view);
+    if (canvas == nullptr) {
+        GRAPHIC_LOGE("callback view is not UICanvasExt");
+        return;
+    }
+    canvas->Clear();
+    sectorAngle_ += angleStep_;
+    sectorRange_ += rangeStep_;
+    if (FloatMore(sectorRange_, CIRCLE_IN_DEGREE)) {
+        sectorRange_ = 1;
+    }
+    if (FloatMore(sectorAngle_, 3600.f)) { // 3600.f: to avoid float overflow
+        sectorAngle_ = -3600.0f; // 3600.f: to avoid float overflow
+    }
+    // 300: x coordinates, 250: y coordinates, 10 ahead degree to avoid boundary problem
+    SweepGradient sweep = {200, 250, static_cast<int16_t>(sectorAngle_ - 10)};
+    PaintExt paint;
+    ColorStop stops[2] = {{0, 0x00FFFF00}, {1, 0xFFFFFF00}};
+    paint.SetStyle(Paint::PaintStyle::FILL_STYLE);
+    paint.SetSweepGradient(sweep, stops, 2); // 2: sweep stops count
+    paint.SetAntialiased(true);
+
+    // 300, 250, 130, sector parameters: x , y, radius
+    canvas->DrawSector({200, 250}, 130, sectorAngle_, sectorAngle_ + sectorRange_, paint);
+}
+
 void UITestCanvasExt::SetUp()
 {
     if (container_ == nullptr) {
@@ -40,13 +68,25 @@ void UITestCanvasExt::SetUp()
     canvas_->SetStyle(STYLE_BACKGROUND_OPA, OPA_OPAQUE);
     container_->Add(canvas_);
 
-    SetUpBtn(add123Btn_, "Add 123", X_300, 0); // 0: Y coordinate
-    SetUpBtn(addSquareBtn_, "Add Square", X_300, 60); // 60: Y coordinate
+    SetUpBtn(addSquareBtn_, "Add Square", X_300, 0); // 0: Y coordinate
+    SetUpBtn(addSectorBtn_, "Add Sector", X_300, 60); // 60: Y coordinate
     SetUpBtn(clearBtn_, "Clear", X_300, 120); // 120: Y coordinate
     SetUpBtn(transBtn_, "Y: +150", X_300, 180); // 180: Y coordinate
     SetUpBtn(scaleBtn_, "Scale 0.5", X_300, 240); // 240: Y coordinate
     SetUpBtn(rotateBtn_, "Rotate 90", X_300, 300); // 300: Y coordinate
     SetUpBtn(matrixBtn_, "Matrix", X_300, 360); // 360: Y coordinate
+    sectorCallBack_ = new SectorAnimatorCallback();
+    if (sectorCallBack_ == nullptr) {
+        GRAPHIC_LOGE("CallBack new fail");
+        return;
+    }
+    sectorAnimator_ = new Animator(sectorCallBack_, canvas_, 0, true);
+    if (sectorAnimator_ == nullptr) {
+        delete sectorCallBack_;
+        sectorCallBack_ = nullptr;
+        GRAPHIC_LOGE("Animator new fail");
+        return;
+    }
 }
 
 void UITestCanvasExt::SetUpBtn(UILabelButton*& btn, const char* text, int16_t x, int16_t y)
@@ -68,9 +108,17 @@ void UITestCanvasExt::SetUpBtn(UILabelButton*& btn, const char* text, int16_t x,
 void UITestCanvasExt::TearDown()
 {
     DeleteChildren(container_);
+    if (sectorCallBack_ != nullptr) {
+        delete sectorCallBack_;
+        sectorCallBack_ = nullptr;
+    }
+    if (sectorAnimator_ != nullptr) {
+        delete sectorAnimator_;
+        sectorAnimator_ = nullptr;
+    }
     container_ = nullptr;
     canvas_ = nullptr;
-    add123Btn_ = nullptr;
+    addSectorBtn_ = nullptr;
     addSquareBtn_ = nullptr;
     clearBtn_ = nullptr;
     transBtn_ = nullptr;
@@ -117,8 +165,10 @@ void UITestCanvasExt::DrawSquare(UICanvasExt* canvas)
 bool UITestCanvasExt::OnClick(UIView& view, const ClickEvent& event)
 {
     if (&view == addSquareBtn_) {
+        sectorAnimator_->Stop();
         DrawSquare(canvas_);
     } else if (&view == clearBtn_) {
+        sectorAnimator_->Stop();
         canvas_->Clear();
     } else if (&view == transBtn_) {
         canvas_->Translate({0, 100}); // 100: y offset
@@ -131,8 +181,8 @@ bool UITestCanvasExt::OnClick(UIView& view, const ClickEvent& event)
             Matrix3<float> mat(1, 0, 0, 0, 1, 0, 0, 50, 1); // 50: Y trans by 50
             canvas_->SetMatrix(mat, matrixIndex_);
         }
-    } else if (&view == add123Btn_) {
-        Draw123(canvas_);
+    } else if (&view == addSectorBtn_) {
+        DrawSector(canvas_);
     }
     return true;
 }
@@ -292,6 +342,13 @@ void UITestCanvasExt::DrawArc(UICanvasExt* canvas)
     canvas->DrawArc({cx, cy}, 40, 540, 630, paint); // 40, 540, 630: radius, startAngle, endAngle
 }
 
+void UITestCanvasExt::DrawSector(UICanvasExt* canvas)
+{
+    if (sectorAnimator_ != nullptr) {
+        sectorAnimator_->Start();
+    }
+}
+
 void UITestCanvasExt::DrawPattern(UICanvasExt* canvas)
 {
     PaintExt paint;
index 6d0bccd..ffe4ca4 100644 (file)
 #include "common/image_cache_manager.h"
 namespace OHOS {
 #if ENABLE_VGU_ENGINE && CAPABILITY_HWDRAW_PATH
+class SectorAnimatorCallback : public AnimatorCallback {
+public:
+    SectorAnimatorCallback() {}
+    ~SectorAnimatorCallback() override {}
+    void Callback(UIView *view) override;
+private:
+    float sectorAngle_ = -3600.0f;
+    float sectorRange_ = 0.0f;
+    float angleStep_ = 4.0f;
+    float rangeStep_ = 4.0f;
+};
+
 class UITestCanvasExt : public UITest, public UIView::OnClickListener {
 public:
     UITestCanvasExt() {}
@@ -43,18 +55,21 @@ private:
     void DrawRect(UICanvasExt* canvas);
     void DrawLine(UICanvasExt* canvas);
     void DrawArc(UICanvasExt* canvas);
+    void DrawSector(UICanvasExt* canvas);
     void SetUpBtn(UILabelButton*& btn, const char* text, int16_t x, int16_t y);
     void DrawPattern(UICanvasExt* canvas);
     int16_t matrixIndex_ = -1;
     UICanvasExt* canvas_ = nullptr;
     UILabelButton* addSquareBtn_ = nullptr;
-    UILabelButton* add123Btn_ = nullptr;
+    UILabelButton* addSectorBtn_ = nullptr;
     UILabelButton* clearBtn_ = nullptr;
     UILabelButton* transBtn_ = nullptr;
     UILabelButton* scaleBtn_ = nullptr;
     UILabelButton* rotateBtn_ = nullptr;
     UILabelButton* matrixBtn_ = nullptr;
     UIScrollView* container_ = nullptr;
+    SectorAnimatorCallback *sectorCallBack_ = nullptr;
+    Animator *sectorAnimator_ = nullptr;
     ImageInfo* img_ = nullptr;
 };
 #endif
index 3d18ce8..9305464 100644 (file)
@@ -117,14 +117,16 @@ void UITestMultiFont::TestArabicAndChinese()
     UILabelExt* label = new UILabelExt();
     label->SetPosition(labelX_, labelY_, WIDTH, HEIGHT);
     label->SetFont("HarmonyOS_Sans_Naskh_Arabic_Light.ttf", DEFAULT_VECTOR_FONT_SIZE);
-    label->SetText("中文和阿拉伯语混排。الأسانسير، علشان القطط ماتاكلش منها. وننساها، ونعود الى أوراقنا موصدين الباب بإحكام.");
+    label->SetText("中文和阿拉伯语混排。"
+        "الأسانسير، علشان القطط ماتاكلش منها. وننساها، ونعود الى أوراقنا موصدين الباب بإحكام.");
     container_->Add(label);
     labelY_ += HEIGHT + GAP_50;
 
     UILabelExt* label1 = new UILabelExt();
     label1->SetPosition(labelX_, labelY_, WIDTH, HEIGHT);
     label1->SetFont("HarmonyOS_Sans_Naskh_Arabic_Light.ttf", DEFAULT_VECTOR_FONT_SIZE);
-    label1->SetText("中文和阿拉伯语混排。الأسانسير، علشان القطط ماتاكلش منها. وننساها، ونعود الى أوراقنا موصدين الباب بإحكام.");
+    label1->SetText("中文和阿拉伯语混排。"
+        "الأسانسير، علشان القطط ماتاكلش منها. وننساها، ونعود الى أوراقنا موصدين الباب بإحكام.");
     label1->SetDirect(TEXT_DIRECT_RTL);
     container_->Add(label1);
     labelY_ += HEIGHT + GAP_50;
@@ -132,7 +134,8 @@ void UITestMultiFont::TestArabicAndChinese()
     UILabelExt* label2 = new UILabelExt();
     label2->SetPosition(labelX_, labelY_, WIDTH, HEIGHT);
     label2->SetFont("HarmonyOS_Sans_Naskh_Arabic_Light.ttf", DEFAULT_VECTOR_FONT_SIZE);
-    label2->SetText("1. تشبع الأكسجين في الدم (SpO2) هو النسبة المئوية للهيموغلوبين المؤكسد (HbO2) في الدم، وهو عامل فسيولوجي مهم للحفاظ على وظائف الجسم الطبيعية.");
+    label2->SetText("1. تشبع الأكسجين في الدم (SpO2) هو النسبة المئوية للهيموغلوبين المؤكسد (HbO2)"
+                    " في الدم، وهو عامل فسيولوجي مهم للحفاظ على وظائف الجسم الطبيعية.");
     label2->SetDirect(TEXT_DIRECT_RTL);
     container_->Add(label2);
     labelY_ += HEIGHT + GAP_50;
@@ -140,7 +143,8 @@ void UITestMultiFont::TestArabicAndChinese()
     UILabelExt* label3 = new UILabelExt();
     label3->SetPosition(labelX_, labelY_, WIDTH, HEIGHT);
     label3->SetFont("HarmonyOS_Sans_Naskh_Arabic_Light.ttf", DEFAULT_VECTOR_FONT_SIZE);
-    label3->SetText("ABCتشبع الأكسجين في الدم (SpO2) هو النسبة المئوية للهيموغلوبين المؤكسد (HbO2) في الدم، وهو عامل فسيولوجي مهم للحفاظ على وظائف الجسم الطبيعية.");
+    label3->SetText("ABCتشبع الأكسجين في الدم (SpO2) هو النسبة المئوية للهيموغلوبين المؤكسد (HbO2)"
+                    " في الدم، وهو عامل فسيولوجي مهم للحفاظ على وظائف الجسم الطبيعية.");
     label3->SetDirect(TEXT_DIRECT_RTL);
     container_->Add(label3);
     labelY_ += HEIGHT + GAP_50;
index 3f528d9..f820733 100644 (file)
@@ -13,7 +13,7 @@ void UITestKaleidoscope::KaleidoscopeAnimator::Callback(UIView* view)
         return;
     }
 
-    kaleidoscopeUtils_->Rotate(0.1f); // 0.1: rotate by 0.1
+    kaleidoscopeUtils_->Rotate(0.02f); // 0.02: rotate by 0.02
     view->Invalidate();
 }
 
@@ -36,7 +36,7 @@ void UITestKaleidoscope::SetUp()
         container_->Add(kaleidoscope_);
         kaleidoscope_->RequestFocus();
         kaleidoscope_->SetRotateEventFactor(0.2f); // 0.2: rotate event factor
-        kaleidoscope_->SetRotateAnimatorValue(0.1f); // 0.1: rotate animator value
+        kaleidoscope_->SetRotateAnimatorValue(0.02f); // 0.02: rotate animator value
         kaleidoscope_->StartRotateAnimator();
         return;
     }
index 68de67d..f2b68b6 100644 (file)
@@ -156,7 +156,6 @@ void UITestListExt::UIListScrollTestFPS()
     }
     list_->SetPosition(0, 0, LIST_WIDTH, LIST_HEIGHT);
     list_->SetAdapter(adapter_);
-    list_->SetScrollStateListener(this);
     list_->SetThrowDrag(true);
     list_->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);
     list_->SetMaxScrollDistance(1000); // 1000: max scroll distance
index 9ff2ec3..c80ea8a 100644 (file)
@@ -24,7 +24,7 @@
 #include "gfx_utils/sys_info.h"
 
 namespace OHOS {
-class UITestListExt : public UITest, UIView::OnClickListener, ListScrollListener {
+class UITestListExt : public UITest {
 public:
     UITestListExt() : data_(nullptr), animator_(nullptr), list_(nullptr), adapter_(nullptr) {}
     ~UITestListExt() override {}
index d9c9e58..9d8a4b1 100644 (file)
@@ -156,7 +156,6 @@ void UITestListFPS::UIListScrollTestFPS()
     }
     list_->SetPosition(0, 0, LIST_WIDTH, LIST_HEIGHT);
     list_->SetAdapter(adapter_);
-    list_->SetScrollStateListener(this);
     list_->SetThrowDrag(true);
     list_->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);
     list_->SetMaxScrollDistance(1000); // 1000: max scroll distance
index 0a64eb5..0512595 100644 (file)
@@ -24,7 +24,7 @@
 #include "gfx_utils/sys_info.h"
 
 namespace OHOS {
-class UITestListFPS : public UITest, UIView::OnClickListener, ListScrollListener {
+class UITestListFPS : public UITest {
 public:
     UITestListFPS() : animator_(nullptr), list_(nullptr), data_(nullptr), adapter_(nullptr) {}
     ~UITestListFPS() override {}
index 5e3b93a..3b84dad 100644 (file)
 #include "animator/easing_equation.h"\r
 \r
 namespace OHOS {\r
+const int8_t TEXT_ARRAY_LEN = 8;\r
+const float MIN_BLUR_VALUE = 0.0f;\r
+const float MAX_BLUR_VALUE = 32.0f;\r
+const float BLUR_MODIFY_STEP = 0.4f;\r
+\r
 void UITestMessage::SetUp()\r
 {\r
     container_ = new UIViewGroup();\r
@@ -28,29 +33,55 @@ void UITestMessage::SetUp()
     img->SetStyle(STYLE_IMAGE_OPA, OPA_OPAQUE);\r
     container_->Add(img);\r
 \r
-    start_ = new UILabelButton();\r
-    start_->SetPosition(180, 360, 120, 60); // 180: x, 360: y, 120: width, 60: height\r
-    start_->SetText("Start");\r
-    start_->SetOnClickListener(this);\r
-    container_->Add(start_);\r
+    msgLabel_ = new UILabel();\r
+    msgLabel_->SetPosition(100, 80, 250, 70); // 100, 80, 250, 70: Left, right, width, height.\r
+    msgLabel_->SetText("Message: comes...");\r
+    msgLabel_->SetStyle(STYLE_BACKGROUND_COLOR, 0xff505050);\r
+    msgLabel_->SetStyle(STYLE_TEXT_COLOR, Color::White().full);\r
+    msgLabel_->SetStyle(STYLE_BORDER_RADIUS, 20); // 20: Radius for label boarder.\r
+    msgLabel_->SetStyle(STYLE_BACKGROUND_OPA, 150); // 150: Opacity for background.\r
+    msgLabel_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 35); // 35: Font size.\r
+    msgLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
+    container_->Add(msgLabel_);\r
+\r
+    add_ = new UILabelButton();\r
+    add_->SetPosition(70, 300, 100, 40); // 70: x, 300: y, 100: width, 40: height\r
+    add_->SetText("Add blur");\r
+    add_->SetOnClickListener(this);\r
+    container_->Add(add_);\r
+\r
+    reduce_ = new UILabelButton();\r
+    reduce_->SetPosition(194, 300, 100, 40); // 194: x, 300: y, 100: width, 40: height\r
+    reduce_->SetText("Reduce blur");\r
+    reduce_->SetOnClickListener(this);\r
+    container_->Add(reduce_);\r
+\r
+    clear_ = new UILabelButton();\r
+    clear_->SetPosition(318, 300, 100, 40); // 318: x, 300: y, 100: width, 40: height\r
+    clear_->SetText("Clear blur");\r
+    clear_->SetOnClickListener(this);\r
+    container_->Add(clear_);\r
 \r
-    label_ = new UILabel();\r
-    label_->SetPosition(100, 80, 250, 70); // 100, 80, 250, 70: Left, right, width, height.\r
-    label_->SetText("Message: comes...");\r
-    label_->SetStyle(STYLE_BACKGROUND_COLOR, 0xff505050);\r
-    label_->SetStyle(STYLE_TEXT_COLOR, Color::White().full);\r
-    label_->SetStyle(STYLE_BORDER_RADIUS, 20); // 20: Radius for label boarder.\r
-    label_->SetStyle(STYLE_BACKGROUND_OPA, 150); // 150: Opacity for background.\r
-    label_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 35); // 35: Font size.\r
-    label_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    container_->Add(label_);\r
+    valueLabel_ = new UILabel();\r
+    valueLabel_->SetPosition(194, 360, 100, 40); // 194, 360, 100, 40: Left, right, width, height.\r
+    valueLabel_->SetText("0.00");\r
+    valueLabel_->SetStyle(STYLE_TEXT_COLOR, Color::Red().full);\r
+    valueLabel_->SetStyle(STYLE_BORDER_OPA, 0); // 20: Radius for label boarder.\r
+    valueLabel_->SetStyle(STYLE_BACKGROUND_OPA, 0); // 150: Opacity for background.\r
+    valueLabel_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30); // 30: Font size.\r
+    valueLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
+    container_->Add(valueLabel_);\r
 }\r
 \r
 void UITestMessage::TearDown()\r
 {\r
-    label_->ClearBackgroundBlur();\r
-    DeleteChildren(container_);\r
-    container_ = nullptr;\r
+    msgLabel_->ClearBackgroundBlur();\r
+    UIViewGroup::RemoveAndDeleteAllRecursively(container_);\r
+    msgLabel_ = nullptr;\r
+    add_ = nullptr;\r
+    reduce_ = nullptr;\r
+    clear_ = nullptr;\r
+    valueLabel_ = nullptr;\r
 }\r
 \r
 const UIView* UITestMessage::GetTestView()\r
@@ -60,13 +91,22 @@ const UIView* UITestMessage::GetTestView()
 \r
 bool UITestMessage::OnClick(UIView& view, const ClickEvent& event)\r
 {\r
-    if (!blur_) {\r
-        label_->SetBackgroundBlur(10); // 10: blurRadius\r
-    } else {\r
-        label_->ClearBackgroundBlur();\r
+    if (&view == add_) {\r
+        blurVaule_ += BLUR_MODIFY_STEP;\r
+    } else if (&view == reduce_) {\r
+        blurVaule_ -= BLUR_MODIFY_STEP;\r
+    } else if (&view == clear_) {\r
+        blurVaule_ = MIN_BLUR_VALUE;\r
     }\r
-    blur_ = !blur_;\r
-\r
+    if (FloatMore(blurVaule_, MAX_BLUR_VALUE)) {\r
+        blurVaule_ = MAX_BLUR_VALUE;\r
+    } else if (FloatLess(blurVaule_, MIN_BLUR_VALUE)) {\r
+        blurVaule_ = MIN_BLUR_VALUE;\r
+    }\r
+    msgLabel_->SetBackgroundBlur(blurVaule_);\r
+    char blurText[TEXT_ARRAY_LEN] = {0};\r
+    snprintf_s(blurText, TEXT_ARRAY_LEN, 4, "%4.1f", blurVaule_); // 4, size of format string\r
+    valueLabel_->SetText(blurText);\r
     return true;\r
 }\r
-}\r
+}
\ No newline at end of file
index c85901b..0bf3180 100644 (file)
@@ -35,9 +35,12 @@ public:
 \r
 private:\r
     UIViewGroup* container_ = nullptr;\r
-    UILabel* label_ = nullptr;\r
-    UILabelButton* start_ = nullptr;\r
-    bool blur_ = false;\r
+    UILabel* msgLabel_ = nullptr;\r
+    UILabelButton* add_ = nullptr;\r
+    UILabelButton* reduce_ = nullptr;\r
+    UILabelButton* clear_ = nullptr;\r
+    UILabel* valueLabel_ = nullptr;\r
+    float blurVaule_ = 0.0f;\r
 };\r
 }\r
-#endif\r
+#endif
\ No newline at end of file
index 12c280a..3ee280d 100644 (file)
@@ -39,6 +39,27 @@ void UITestRollerView::CreateButton(UILabelButton*& button, const char* text, in
     container_->Add(button);
 }
 
+bool UITestRollerView::ChildStateListener::StateChange(UIView* view, float angle)
+{
+    if (view == nullptr) {
+        return true;
+    }
+    UIViewGroup* group = dynamic_cast<UIViewGroup*>(view);
+    UIImageView* head = dynamic_cast<UIImageView*>(group->GetChildrenHead());
+    UIImageView* tail = dynamic_cast<UIImageView*>(group->GetChildrenTail());
+    if (FloatMore(angle, 90.0f) && FloatLess(angle, 270.0f)) { // 90 270: rotate range
+        head->SetStyle(STYLE_IMAGE_OPA, OPA_OPAQUE / 2); // 2: half of opa
+        if (roller_->IsShowMirrorMode()) {
+            tail->SetStyle(STYLE_IMAGE_OPA, 50); // 50: Transparency Value
+        }
+    } else {
+        head->SetStyle(STYLE_IMAGE_OPA, OPA_OPAQUE);
+        if (roller_->IsShowMirrorMode()) {
+            tail->SetStyle(STYLE_IMAGE_OPA, 100); // 100: Transparency Value
+        }
+    }
+    return true;
+}
 void UITestRollerView::CreateNoMirrorRollerView()
 {
     noMirrorRollerView_ = new UIRollerView(false);
@@ -71,6 +92,11 @@ void UITestRollerView::SetUp()
     rollerView_->SetItemSize(150, 150); // 150: item size
     rollerView_->SetThrowDrag(true);
     rollerView_->SetItemPadding(80); // 80: item padding
+    if (stateChangeListener_ == nullptr) {
+        stateChangeListener_ = new ChildStateListener();
+        stateChangeListener_->SetRollerView(rollerView_);
+        rollerView_->SetChildStateListener(stateChangeListener_);
+    }
     container_->Add(rollerView_);
     curRollerView_ = rollerView_;
     for (uint8_t i = 0; i < ITEM_CNT; i++) {
@@ -105,6 +131,7 @@ void UITestRollerView::HideOrShowBtn()
     offMirrorBtn_->SetVisible(isVisible);
     isBtnVisible_ = isVisible;
 }
+
 void UITestRollerView::OnModeChange(UIRollerView* view, RollerViewMode targetMode)
 {
     printf("RollerView Change Mode to %d!\n", targetMode);
@@ -163,6 +190,11 @@ void UITestRollerView::TearDown()
     } else {
         container_->Remove(noMirrorRollerView_);
     }
+
+    if (stateChangeListener_ != nullptr) {
+        delete stateChangeListener_;
+        stateChangeListener_ = nullptr;
+    }
     curRollerView_ = nullptr;
     delete rollerView_;
     delete noMirrorRollerView_;
index 480ae60..8a21f14 100644 (file)
@@ -20,7 +20,20 @@ public:
     const UIView* GetTestView() override;
     bool OnClick(UIView& view, const ClickEvent& event) override;
     void OnModeChange(UIRollerView* view, RollerViewMode targetMode) override;
+
 private:
+    class ChildStateListener : public UIRollerView::OnChildStateListener {
+    public:
+        void SetRollerView(UIRollerView* roller)
+        {
+            roller_ = roller;
+        }
+
+        bool StateChange(UIView* view, float angle) override;
+    private:
+        UIRollerView* roller_ = nullptr;
+    };
+
     void CreateButton(UILabelButton*& button, const char* text, int16_t x, int16_t y);
     void HideOrShowBtn();
     void CreateNoMirrorRollerView();
@@ -35,6 +48,7 @@ private:
     UILabelButton* switchAnimBtn_ = nullptr;
     UILabelButton* switchBtn_ = nullptr;
     UILabelButton* offMirrorBtn_ = nullptr;
+    ChildStateListener* stateChangeListener_ = nullptr;
     bool isBtnVisible_ = false;
 };
 }
index bca76dc..3d8a15f 100644 (file)
@@ -132,7 +132,7 @@ void UITestScaleList::UIScaleListTest()
     list_->SetDragACCLevel(5); // 5: drag acceleration\r
     list_->SetYScrollBarVisible(true);\r
 \r
-    list_->EnableAutoAlign(true);\r
+    list_->EnableAutoAlign(false);\r
     list_->SetSelectPosition(LIST_HEIGHT / 2); // 2: divisor\r
     list_->EnableCrossDragBack(false);\r
     list_->SetElastic(true);\r
@@ -140,6 +140,8 @@ void UITestScaleList::UIScaleListTest()
     list_->SetItemSpace(30); // 30: item space\r
     list_->SetAutoAlignTime(300); // 300: align time\r
     list_->SetScrollBlankSize(LIST_HEIGHT / 2); // 2: divisor\r
+    list_->SetScrollBlankSize(LIST_HEIGHT / 2 - ITEM_HEIGHT / 2, UIAbstractScroll::Direction::BOTTOM);\r
+    list_->SetReboundSize(0, UIAbstractScroll::Direction::BOTTOM);\r
     list_->SetDragFunc(EasingEquation::QuadEaseOut);\r
 }\r
 } // namespace OHOS
\ No newline at end of file
index ec78616..372ac4a 100644 (file)
@@ -139,7 +139,11 @@ void UITestWaterfallList::SetUp()
     waterfallList_->SetImageDistance(imgDistance_);
     waterfallList_->SetImageSizeInCenter(imgSize_);
     waterfallList_->SetScrollBlankSize(0);
-    waterfallList_->SetReboundSize(imgDistance_ * Sin(60)); // 60, degree
+    uint16_t layoutHeight = static_cast<uint16_t>(imgDistance_ * Sin(60)); // 60: degree, row's layout height
+    waterfallList_->SetReboundSize(layoutHeight);
+    waterfallList_->SetScrollBlankSize(layoutHeight, UIAbstractScroll::Direction::TOP);
+    waterfallList_->SetScrollBlankSize(Screen::GetInstance().GetHeight() / 2 - layoutHeight, // 2: half
+        UIAbstractScroll::Direction::BOTTOM);
     waterfallList_->SetThrowDrag(true);
     waterfallList_->LayoutChildren(true);
     waterfallList_->SetRotateFactor(10); // 10, empirical coefficient
index d4c45c7..dbd4e2e 100644 (file)
@@ -83,6 +83,7 @@ void AnimatorManager::AnimatorTask()
     ListNode<Animator*>* pos = list_.Begin();
     Animator* animator = nullptr;
 
+    activeNum_ = 0;
     while (pos != list_.End()) {
         animator = pos->data_;
         if (animator == nullptr) {
@@ -91,9 +92,20 @@ void AnimatorManager::AnimatorTask()
             continue;
         }
         if (animator->GetState() == Animator::START) {
+            activeNum_++;
             animator->Run();
         }
         pos = pos->next_;
     }
 }
+
+uint16_t AnimatorManager::GetTotalAnimatorNum()
+{
+    return list_.Size();
+}
+
+uint16_t AnimatorManager::GetActiveAnimatorNum()
+{
+    return activeNum_;
+}
 } // namespace OHOS
index d605817..3db8503 100644 (file)
@@ -98,6 +98,16 @@ public:
      */
     bool IsActive();
 
+    /**
+     * @brief Get total number of animators.
+     */
+    uint16_t GetTotalAnimatorNum();
+
+    /**
+     * @brief Get number of active animators which was recorded by AnimatorTask().
+     */
+    uint16_t GetActiveAnimatorNum();
+
 protected:
     List<Animator*> list_;
     AnimatorManager() {}
@@ -106,6 +116,7 @@ protected:
     AnimatorManager& operator=(const AnimatorManager&) = delete;
     AnimatorManager(AnimatorManager&&) = delete;
     AnimatorManager& operator=(AnimatorManager&&) = delete;
+    uint16_t activeNum_ = 0;
 };
 } // namespace OHOS
 #endif
index 585ad39..19d9375 100644 (file)
@@ -240,11 +240,11 @@ void Text::Draw(BufferInfo& gfxDstBuffer,
     }
     OpacityType opa = DrawUtils::GetMixOpacity(opaScale, style.textOpa_);
     for (int i = 0; i < lineCount; i++) {
-        if (pos.y > coords.GetBottom()) {
+        if (pos.y > mask.GetBottom() || pos.y > coords.GetBottom()) {
             return;
         }
         int16_t nextLine = pos.y + lineHeight;
-        if (nextLine >= coords.GetTop()) {
+        if (nextLine >= mask.GetTop() && nextLine >= coords.GetTop()) {
             pos.x = LineStartPos(coords, textLine_[i].linePixelWidth);
             LabelLineInfo labelLine{pos, offset, mask, lineHeight, textLine_[i].lineBytes,
                                     0, opa, style, &text_[lineBegin], textLine_[i].lineBytes,
index 1297bee..1f9c9ae 100644 (file)
@@ -59,107 +59,94 @@ void TextAdapter::SetFont(const char* name, uint8_t size)
 
 UIView* TextAdapter::GetView(UIView* inView, int16_t index)
 {
-    UILabel* newView = GetTextView(inView, index);
-    if (newView == nullptr) {
-        return nullptr;
-    }
-    newView->SetLineBreakMode(lineBreakMode_);
-    newView->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
-    if (width_) {
-        newView->SetWidth(width_);
-    }
-    if (height_) {
-        newView->SetHeight(height_);
-    }
-    newView->SetViewIndex(index);
-    newView->UIView::SetStyle(style_);
-    newView->GetHeight();
-    if (clickListener_) {
-        newView->SetOnClickListener(clickListener_);
-        newView->SetTouchable(true);
-    }
-    return newView;
-}
-
-UILabel* TextAdapter::GetTextView(UIView* inView, int16_t index)
-{
-    switch (dataMode_) {
-        case DYNAMIC_TEXT_MODE:
-            return GetDynamicText(inView, index);
-        case CONTINUOUS_INTEGER_MODE:
-            return GetIntegerText(inView, index);
-        default:
+    if (dataMode_ == DYNAMIC_TEXT_MODE) {
+        if (dynamicText_.IsEmpty() || (index > dynamicText_.Size() - 1) || (index < 0)) {
             return nullptr;
-    }
-}
-
-UILabel* TextAdapter::GetDynamicText(UIView* inView, int16_t index)
-{
-    if (dynamicText_.IsEmpty() || (index > dynamicText_.Size() - 1) || (index < 0)) {
+        }
+    } else if (dataMode_ == CONTINUOUS_INTEGER_MODE) {
+        if ((index < 0) || ((integerTextEnd_ - integerTextStart_) < index)) {
+            return nullptr;
+        }
+    } else {
         return nullptr;
     }
 
-    ListNode<const char*>* node = dynamicText_.Begin();
-    for (int16_t i = 0; i < index; i++) {
-        node = node->next_;
+    UILabel* label = nullptr;
+    if (inView == nullptr) {
+        label = CreateUILabel();
+    } else {
+        label = dynamic_cast<UILabel*>(inView);
     }
-    UILabel* newView = CreateUILabel(inView);
-    if (newView != nullptr) {
-        newView->SetText(node->data_);
-        if (fontName_ == nullptr) {
-            newView->SetFontId(fontId_);
-        } else {
-            newView->SetFont(fontName_, fontSize_);
+
+    if (label != nullptr) {
+        if (dataMode_ == DYNAMIC_TEXT_MODE) {
+            ListNode<const char*>* node = dynamicText_.Begin();
+            for (int16_t i = 0; i < index; i++) {
+                node = node->next_;
+            }
+            label->SetText(node->data_);
+        } else if (dataMode_ == CONTINUOUS_INTEGER_MODE) {
+            if (!SetIntegerText(label, index)) {
+                if (label != nullptr && inView == nullptr) {
+                    delete label;
+                }
+                return nullptr;
+            }
         }
-        newView->SetDirect(direct_);
+        label->ReMeasure();
+        label->SetViewIndex(index);
     }
-    return newView;
+    return label;
 }
 
-UILabel* TextAdapter::GetIntegerText(UIView* inView, int16_t index)
+bool TextAdapter::SetIntegerText(UILabel* inView, int16_t index)
 {
-    if ((index < 0) || ((integerTextEnd_ - integerTextStart_) < index)) {
-        return nullptr;
-    }
-    UILabel* newView = CreateUILabel(inView);
-    if (newView != nullptr) {
+    if (inView != nullptr) {
         char buf[BUF_LEN] = {0};
         if (formatter_ != nullptr) {
             if (!formatter_->Format(integerTextStart_ + index, buf, BUF_LEN)) {
-                if (inView == nullptr) {
-                    delete newView;
-                    newView = nullptr;
-                }
-                return nullptr;
+                return false;
             }
         } else {
             if (sprintf_s(buf, sizeof(buf), "%02d", integerTextStart_ + index) < 0) {
-                if (inView == nullptr) {
-                    delete newView;
-                    newView = nullptr;
-                }
-                return nullptr;
+                return false;
             }
         }
 
         buf[BUF_LEN - 1] = '\0';
-        newView->SetText(buf);
-        if (fontName_ == nullptr) {
-            newView->SetFontId(fontId_);
-        } else {
-            newView->SetFont(fontName_, fontSize_);
-        }
-        newView->SetDirect(direct_);
+        inView->SetText(buf);
     }
-    return newView;
+    return true;
 }
 
-UILabel* TextAdapter::CreateUILabel(UIView* inView)
+UILabel* TextAdapter::CreateUILabel()
 {
-    if (inView == nullptr) {
-        return new UILabel();
+    UILabel* newView = new UILabel();
+    if (newView == nullptr) {
+        return nullptr;
     }
-    return static_cast<UILabel*>(inView);
+
+    newView->SetLineBreakMode(lineBreakMode_);
+    newView->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
+    if (width_) {
+        newView->SetWidth(width_);
+    }
+    if (height_) {
+        newView->SetHeight(height_);
+    }
+
+    newView->UIView::SetStyle(style_);
+    if (clickListener_) {
+        newView->SetOnClickListener(clickListener_);
+        newView->SetTouchable(true);
+    }
+    if (fontName_ == nullptr) {
+        newView->SetFontId(fontId_);
+    } else {
+        newView->SetFont(fontName_, fontSize_);
+    }
+    newView->SetDirect(direct_);
+    return newView;
 }
 
 void TextAdapter::ClearDynamicText()
index b1eecd3..c733a71 100644 (file)
@@ -240,7 +240,8 @@ bool UIAbstractScroll::DragThrowAnimator(Point currentPos,
                                          uint8_t dragDirection,
                                          bool dragBack)
 {
-    if (!throwDrag_ && (reboundSize_ == 0)) {
+    if (!throwDrag_ && (reboundSize_ == 0 && reboundSizeTop_ == 0 && reboundSizeBottom_ == 0 &&
+        reboundSizeLeft_ == 0 && reboundSizeRight_ == 0)) {
         return false;
     }
     int16_t dragDistanceX = 0;
@@ -248,7 +249,8 @@ bool UIAbstractScroll::DragThrowAnimator(Point currentPos,
     if (throwDrag_) {
         CalculateDragDistance(currentPos, lastPos, dragDirection, dragDistanceX, dragDistanceY);
     }
-    if (reboundSize_ != 0) {
+    if (reboundSize_ != 0 || reboundSizeTop_ != 0 || reboundSizeBottom_ != 0 ||
+        reboundSizeLeft_ != 0 || reboundSizeRight_ != 0) {
         CalculateReboundDistance(dragDistanceX, dragDistanceY);
     }
 
@@ -281,19 +283,23 @@ void UIAbstractScroll::CalculateDragDistance(Point currentPos,
 {
     if ((direction_ == VERTICAL) || (direction_ == HORIZONTAL_AND_VERTICAL)) {
         dragDistanceY = (currentPos.y - lastPos.y) * DRAG_DISTANCE_COEFFICIENT;
-        if (dragDistanceY > 0 || (dragDistanceY == 0 && dragDirection == DragEvent::DIRECTION_TOP_TO_BOTTOM)) {
-            dragDistanceY += GetMaxDelta() * GetSwipeACCLevel() / DRAG_ACC_FACTOR;
-        } else if (dragDistanceY < 0 || (dragDistanceY == 0 && dragDirection == DragEvent::DIRECTION_BOTTOM_TO_TOP)) {
-            dragDistanceY -= GetMaxDelta() * GetSwipeACCLevel() / DRAG_ACC_FACTOR;
+        if (currentPos.y != lastPos.y) {
+            if (dragDistanceY > 0 || (dragDistanceY == 0 && dragDirection == DragEvent::DIRECTION_TOP_TO_BOTTOM)) {
+                dragDistanceY += GetMaxDelta() * GetSwipeACCLevel() / DRAG_ACC_FACTOR;
+            } else if (dragDistanceY < 0 || (dragDistanceY == 0 && dragDirection == DragEvent::DIRECTION_BOTTOM_TO_TOP)) {
+                dragDistanceY -= GetMaxDelta() * GetSwipeACCLevel() / DRAG_ACC_FACTOR;
+            }
         }
     }
 
     if ((direction_ == HORIZONTAL) || (direction_ == HORIZONTAL_AND_VERTICAL)) {
         dragDistanceX = (currentPos.x - lastPos.x) * DRAG_DISTANCE_COEFFICIENT;
-        if (dragDistanceX > 0 || (dragDistanceX == 0 && dragDirection == DragEvent::DIRECTION_LEFT_TO_RIGHT)) {
-            dragDistanceX += GetMaxDelta() * GetSwipeACCLevel() / DRAG_ACC_FACTOR;
-        } else if (dragDistanceX < 0 || (dragDistanceX == 0 && dragDirection == DragEvent::DIRECTION_RIGHT_TO_LEFT)) {
-            dragDistanceX -= GetMaxDelta() * GetSwipeACCLevel() / DRAG_ACC_FACTOR;
+        if (currentPos.x != lastPos.x) {
+            if (dragDistanceX > 0 || (dragDistanceX == 0 && dragDirection == DragEvent::DIRECTION_LEFT_TO_RIGHT)) {
+                dragDistanceX += GetMaxDelta() * GetSwipeACCLevel() / DRAG_ACC_FACTOR;
+            } else if (dragDistanceX < 0 || (dragDistanceX == 0 && dragDirection == DragEvent::DIRECTION_RIGHT_TO_LEFT)) {
+                dragDistanceX -= GetMaxDelta() * GetSwipeACCLevel() / DRAG_ACC_FACTOR;
+            }
         }
     }
 
index 0d614ce..eab2bb8 100644 (file)
@@ -91,23 +91,19 @@ void UICircleProgress::DrawForegroundGradient(BufferInfo& gfxDstBuffer, const Re
         const Point& point, const uint16_t& radius, const Vector2<float>& angle)
 {
     ArcInfo arcInfo = {point, {0, 0}, radius, angle.x_, angle.y_, nullptr};
-    if (cmd_ == nullptr) {
-        cmd_ = static_cast<uint8_t*>(AllocBufferForPath(MAX_CMD_NUM * sizeof(uint8_t)));
-        if (cmd_ == nullptr) {
-            GRAPHIC_LOGE("AllocBufferForPath failed for cmd.\n");
-            return;
-        }
-    }
-    if (data_ == nullptr) {
-        data_ = static_cast<float*>(AllocBufferForPath(MAX_DATA_NUM * sizeof(float)));
-        if (data_ == nullptr) {
-            GRAPHIC_LOGE("AllocBufferForPath failed for data.\n");
-            GrallocEngines::GetInstance()->FreeBuffer(cmd_);
-            return;
-        }
-    }
 
     arcInfo.radius -= foregroundStyle_->lineWidth_ / 2; // 2: half
+    LiteMGfxEngine::GetInstance()->SyncHwDraw();
+    if (data_ != nullptr) {
+        GrallocEngines::GetInstance()->FreeBuffer(reinterpret_cast<uint8_t*>(data_));
+        data_ = nullptr;
+    }
+    if (cmd_ != nullptr) {
+        GrallocEngines::GetInstance()->FreeBuffer(cmd_);
+        cmd_ = nullptr;
+    }
+    cmdNum_ = 0;
+    dataNum_ = 0;
     if (!HWDrawUtils::GetInstance()->ObtainArcPath(arcInfo, cmdNum_, cmd_, dataNum_, data_)) {
         GRAPHIC_LOGE("ObtainArcPath failed.\n");
         return;
index ce6eacf..567e748 100644 (file)
@@ -16,6 +16,7 @@
 #include <cmath>
 #include "hal_tick.h"
 #include "components/ui_label.h"
+#include "components/root_view.h"
 #include "font/ui_font.h"
 #include "gfx_utils/graphic_log.h"
 #include "themes/theme_manager.h"
@@ -62,6 +63,26 @@ public:
 
     void Callback(UIView* view) override
     {
+        UILabel* label = dynamic_cast<UILabel*>(view);
+        if (label == nullptr) {
+            return;
+        }
+
+        // Check setAnimState_ and Pause or Stop animation if neccessary.
+        if (label->CheckAnimState()) {
+            return;
+        }
+
+        // If not intersected with rootview, pause animator.
+        Rect rect = view->GetRect();
+        Rect rootRect = RootView::GetInstance()->GetRect();
+        if (label != nullptr && !rect.Intersect(rect, rootRect)) {
+            if (label->hasAnimator_ && label->animator_.animator->GetState() == Animator::START) {
+                label->animator_.animator->Pause();
+                return;
+            }
+        }
+
         switch (animatorMode_) {
             case UILabel::LINE_BREAK_MARQUEE:
                 MarqueeCallback(view);
@@ -333,6 +354,16 @@ void UILabel::SetHeight(int16_t height)
         RefreshLabel();
     }
 }
+
+void UILabel::Resize(int16_t width, int16_t height)
+{
+    if (GetWidth() != width || GetHeight() != height) {
+        UIView::SetWidth(width);
+        UIView::SetHeight(height);
+        RefreshLabel();
+    }
+}
+
 void UILabel::RefreshLabel()
 {
     Invalidate();
@@ -345,6 +376,19 @@ void UILabel::RefreshLabel()
 
 void UILabel::ReMeasure()
 {
+    if (setAnimState_ == Animator::START) {
+        if (lineBreakMode_ == LINE_BREAK_OSCILLATION || lineBreakMode_ == LINE_BREAK_MARQUEE) {
+            Rect rect = GetRect();
+            Rect rootRect = RootView::GetInstance()->GetRect();
+            if (rect.Intersect(rect, rootRect)) {
+                if (hasAnimator_ && animator_.animator->GetState() == Animator::PAUSE) {
+                    // resume animator if now intersected with rootview.
+                    animator_.animator->Resume();
+                }
+            }
+        }
+    }
+
     if (!needRefresh_) {
         return;
     }
@@ -362,12 +406,15 @@ void UILabel::ReMeasure()
     switch (lineBreakMode_) {
         case LINE_BREAK_ADAPT:
             Resize(textSize.x, textSize.y);
+            needRefresh_ = false;
             break;
         case LINE_BREAK_STRETCH:
             SetWidth(textSize.x);
+            needRefresh_ = false;
             break;
         case LINE_BREAK_WRAP:
             SetHeight(textSize.y);
+            needRefresh_ = false;
             break;
         case LINE_BREAK_ELLIPSIS:
             labelText_->SetTruncateMode(false);
@@ -412,8 +459,28 @@ std::string UILabel::GetGuiInfo() const
     return res;
 }
 
+bool UILabel::CheckAnimState()
+{
+    if (setAnimState_ == Animator::START) {
+        return false;
+    }
+
+    if (hasAnimator_) {
+        Animator* anim = animator_.animator;
+        if (setAnimState_ == Animator::PAUSE && anim->GetState() == Animator::START) {
+            anim->Pause();
+        } else if (setAnimState_ == Animator::STOP && anim->GetState() != Animator::STOP) {
+            anim->Stop();
+        }
+    }
+    return true;
+}
+
 void UILabel::RemeasureForAnimation(int16_t textWidth, LineBreakMode mode)
 {
+    if (setAnimState_ != Animator::START) {
+        return;
+    }
     int16_t rectWidth = GetWidth();
     if (textWidth > rectWidth) {
         offsetX_ = GetRollStartPos();
@@ -435,7 +502,11 @@ void UILabel::RemeasureForAnimation(int16_t textWidth, LineBreakMode mode)
             animator_.animator = animator;
             hasAnimator_ = true;
         }
-        animator_.animator->Start();
+        if (animator_.animator->GetState() == Animator::PAUSE) {
+            animator_.animator->Resume();
+        } else {
+            animator_.animator->Start();
+        }
     } else {
         offsetX_ = 0;
         labelText_->SetAlign(horAlign_, labelText_->GetVerAlign());
@@ -492,4 +563,36 @@ void UILabel::OnDraw(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea)
                            origContentRect, offsetX_, style, truncateIndex_, opa);
     }
 }
+
+void UILabel::SetAnimState(uint8_t state)
+{
+    if (setAnimState_ == state) {
+        return;
+    }
+
+    switch (state) {
+        case Animator::START:
+            setAnimState_ = Animator::START;
+            break;
+        case Animator::STOP:
+            setAnimState_ = Animator::STOP;
+            break;
+        case Animator::PAUSE:
+            setAnimState_ = Animator::PAUSE;
+            break;
+        default:
+            setAnimState_ = Animator::START;
+            GRAPHIC_LOGE("Invalid state. Set to Animator::START instead!");
+            break;
+    }
+}
+
+uint8_t UILabel::GetAnimRealState()
+{
+    if (!hasAnimator_) {
+        GRAPHIC_LOGE("Do not have animator.");
+        return Animator::STOP;
+    }
+    return animator_.animator->GetState();
+}
 } // namespace OHOS
index 3e75828..75d331a 100644 (file)
@@ -277,9 +277,11 @@ bool UIList::DragXInner(int16_t distance)
     if (distance == 0) {
         return true;
     }
-    int16_t reboundSize = reboundSize_;
+    int16_t reboundSizeLeft = reboundSizeLeft_;
+    int16_t reboundSizeRight = reboundSizeRight_;
     if (isLoopList_ || (scrollAnimator_.GetState() != Animator::STOP)) {
-        reboundSize = 0;
+        reboundSizeLeft = 0;
+        reboundSizeRight = 0;
     }
     bool ret = 0;
     do {
@@ -292,40 +294,41 @@ bool UIList::DragXInner(int16_t distance)
 
     if (distance > 0) {
         if (childrenHead_ != nullptr) {
-            if (isElastic_ && (reboundSize > 0) &&
-                (childrenHead_->GetX() > (scrollBlankSize_ + childrenHead_->GetStyle(STYLE_MARGIN_LEFT)))) {
-                int16_t offset = childrenHead_->GetX() - (scrollBlankSize_ + childrenHead_->GetStyle(STYLE_MARGIN_LEFT));
-                if (offset > reboundSize) {
-                    offset = reboundSize;
+            if (isElastic_ && (reboundSizeLeft > 0) &&
+                (childrenHead_->GetX() > (scrollBlankSizeLeft_ + childrenHead_->GetStyle(STYLE_MARGIN_LEFT)))) {
+                int16_t offset = childrenHead_->GetX() -
+                    (scrollBlankSizeLeft_ + childrenHead_->GetStyle(STYLE_MARGIN_LEFT));
+                if (offset > reboundSizeLeft) {
+                    offset = reboundSizeLeft;
                 }
-                distance = CalculateElasticDragLen(reboundSize, offset, distance);
+                distance = CalculateElasticDragLen(reboundSizeLeft, offset, distance);
             }
 
             if ((childrenHead_->GetX() + distance) >
-                (scrollBlankSize_ + reboundSize + childrenHead_->GetStyle(STYLE_MARGIN_LEFT))) {
-                distance =
-                    scrollBlankSize_ + reboundSize + childrenHead_->GetStyle(STYLE_MARGIN_LEFT) - childrenHead_->GetX();
+                (scrollBlankSizeLeft_ + reboundSizeLeft + childrenHead_->GetStyle(STYLE_MARGIN_LEFT))) {
+                distance = scrollBlankSizeLeft_ + reboundSizeLeft + childrenHead_->GetStyle(STYLE_MARGIN_LEFT) -
+                    childrenHead_->GetX();
             }
         }
     } else {
         if (childrenTail_ != nullptr) {
-            if (isElastic_ && (reboundSize > 0) &&
+            if (isElastic_ && (reboundSizeRight > 0) &&
                 (childrenTail_->GetRelativeRect().GetRight() <
-                (listWidth - scrollBlankSize_ - childrenTail_->GetStyle(STYLE_MARGIN_RIGHT)))) {
-                int16_t offset = (listWidth - scrollBlankSize_ - childrenTail_->GetStyle(STYLE_MARGIN_RIGHT))
+                (listWidth - scrollBlankSizeRight_ - childrenTail_->GetStyle(STYLE_MARGIN_RIGHT)))) {
+                int16_t offset = (listWidth - scrollBlankSizeRight_ - childrenTail_->GetStyle(STYLE_MARGIN_RIGHT))
                     - (childrenTail_->GetRelativeRect().GetRight());
-                if (offset > reboundSize) {
-                    offset = reboundSize;
+                if (offset > reboundSizeRight) {
+                    offset = reboundSizeRight;
                 }
-                distance = CalculateElasticDragLen(reboundSize, offset, distance);
+                distance = CalculateElasticDragLen(reboundSizeRight, offset, distance);
             }
             if (childrenTail_->GetRelativeRect().GetRight() <
-                (listWidth - scrollBlankSize_ - reboundSize - childrenTail_->GetStyle(STYLE_MARGIN_RIGHT))) {
+                (listWidth - scrollBlankSizeRight_ - reboundSizeRight - childrenTail_->GetStyle(STYLE_MARGIN_RIGHT))) {
                 distance = 0;
             } else if ((childrenTail_->GetRelativeRect().GetRight() + distance) <
-                (listWidth - scrollBlankSize_ - reboundSize - childrenTail_->GetStyle(STYLE_MARGIN_RIGHT))) {
-                    distance = listWidth - scrollBlankSize_ - reboundSize - childrenTail_->GetStyle(STYLE_MARGIN_RIGHT)
-                        - childrenTail_->GetRelativeRect().GetRight();
+                (listWidth - scrollBlankSizeRight_ - reboundSizeRight - childrenTail_->GetStyle(STYLE_MARGIN_RIGHT))) {
+                    distance = listWidth - scrollBlankSizeRight_ - reboundSizeRight -
+                        childrenTail_->GetStyle(STYLE_MARGIN_RIGHT) - childrenTail_->GetRelativeRect().GetRight();
             }
         }
     }
@@ -342,9 +345,11 @@ bool UIList::DragYInner(int16_t distance)
     if (distance == 0) {
         return true;
     }
-    int16_t reboundSize = reboundSize_;
+    int16_t reboundSizeTop = reboundSizeTop_;
+    int16_t reboundSizeBottom = reboundSizeBottom_;
     if (isLoopList_ || (scrollAnimator_.GetState() != Animator::STOP)) {
-        reboundSize = 0;
+        reboundSizeTop = 0;
+        reboundSizeBottom = 0;
     }
     bool ret = 0;
     do {
@@ -357,39 +362,42 @@ bool UIList::DragYInner(int16_t distance)
 
     if (distance > 0) {
         if (childrenHead_ != nullptr) {
-            if (isElastic_ && (reboundSize > 0) &&
-                (childrenHead_->GetY() > (scrollBlankSize_ + childrenHead_->GetStyle(STYLE_MARGIN_TOP)))) {
-                int16_t offset = childrenHead_->GetY() - (scrollBlankSize_ + childrenHead_->GetStyle(STYLE_MARGIN_TOP));
-                if (offset > reboundSize) {
-                    offset = reboundSize;
+            if (isElastic_ && (reboundSizeTop > 0) &&
+                (childrenHead_->GetY() > (scrollBlankSizeTop_ + childrenHead_->GetStyle(STYLE_MARGIN_TOP)))) {
+                int16_t offset = childrenHead_->GetY() -
+                    (scrollBlankSizeTop_ + childrenHead_->GetStyle(STYLE_MARGIN_TOP));
+                if (offset > reboundSizeTop) {
+                    offset = reboundSizeTop;
                 }
-                distance = CalculateElasticDragLen(reboundSize, offset, distance);
+                distance = CalculateElasticDragLen(reboundSizeTop, offset, distance);
             }
             if ((childrenHead_->GetY() + distance) >
-                (scrollBlankSize_ + reboundSize + childrenHead_->GetStyle(STYLE_MARGIN_TOP))) {
-                distance =
-                    scrollBlankSize_ + reboundSize + childrenHead_->GetStyle(STYLE_MARGIN_TOP) - childrenHead_->GetY();
+                (scrollBlankSizeTop_ + reboundSizeTop + childrenHead_->GetStyle(STYLE_MARGIN_TOP))) {
+                distance = scrollBlankSizeTop_ + reboundSizeTop + childrenHead_->GetStyle(STYLE_MARGIN_TOP) -
+                    childrenHead_->GetY();
             }
         }
     } else {
         if (childrenTail_ != nullptr) {
-            if (isElastic_ && (reboundSize > 0) &&
+            if (isElastic_ && (reboundSizeBottom > 0) &&
                 (childrenTail_->GetRelativeRect().GetBottom() <
-                (listHeight - scrollBlankSize_ - childrenTail_->GetStyle(STYLE_MARGIN_BOTTOM)))) {
-                int16_t offset = (listHeight - scrollBlankSize_ - childrenTail_->GetStyle(STYLE_MARGIN_BOTTOM))
-                    - (childrenTail_->GetRelativeRect().GetBottom());
-                if (offset > reboundSize) {
-                    offset = reboundSize;
+                (listHeight - scrollBlankSizeBottom_ - childrenTail_->GetStyle(STYLE_MARGIN_BOTTOM)))) {
+                int16_t offset = listHeight - scrollBlankSizeBottom_ - childrenTail_->GetStyle(STYLE_MARGIN_BOTTOM) -
+                    childrenTail_->GetRelativeRect().GetBottom();
+                if (offset > reboundSizeBottom) {
+                    offset = reboundSizeBottom;
                 }
-                distance = CalculateElasticDragLen(reboundSize, offset, distance);
+                distance = CalculateElasticDragLen(reboundSizeBottom, offset, distance);
             }
             if (childrenTail_->GetRelativeRect().GetBottom() <
-                (listHeight - scrollBlankSize_ - reboundSize - childrenTail_->GetStyle(STYLE_MARGIN_BOTTOM))) {
+                (listHeight - scrollBlankSizeBottom_ - reboundSizeBottom -
+                childrenTail_->GetStyle(STYLE_MARGIN_BOTTOM))) {
                 distance = 0;
             } else if ((childrenTail_->GetRelativeRect().GetBottom() + distance) <
-                (listHeight - scrollBlankSize_ - reboundSize - childrenTail_->GetStyle(STYLE_MARGIN_BOTTOM))) {
-                    distance = listHeight - scrollBlankSize_ - reboundSize - childrenTail_->GetStyle(STYLE_MARGIN_BOTTOM)
-                        - childrenTail_->GetRelativeRect().GetBottom();
+                (listHeight - scrollBlankSizeBottom_ - reboundSizeBottom -
+                childrenTail_->GetStyle(STYLE_MARGIN_BOTTOM))) {
+                distance = listHeight - scrollBlankSizeBottom_ - reboundSizeBottom -
+                    childrenTail_->GetStyle(STYLE_MARGIN_BOTTOM) - childrenTail_->GetRelativeRect().GetBottom();
             }
         }
     }
@@ -419,11 +427,20 @@ bool UIList::MoveOffset(int16_t x, int16_t y)
 void UIList::UpdateScrollBar()
 {
     Rect allItemsRect = recycle_.GetAdapterItemsReletiveRect();
-    int16_t totalHeight = allItemsRect.GetHeight() + 2 * scrollBlankSize_; // 2: two blank spaces on both sides
-    int16_t height = GetHeight();
-    yScrollBar_->SetForegroundProportion(static_cast<float>(height) / totalHeight);
-    yScrollBar_->SetScrollProgress(static_cast<float>(scrollBlankSize_ - allItemsRect.GetTop()) /
-                                   (totalHeight - height));
+    if (yScrollBarVisible_) {
+        int16_t totalHeight = allItemsRect.GetHeight() + scrollBlankSizeTop_ + scrollBlankSizeBottom_;
+        int16_t height = GetHeight();
+        yScrollBar_->SetForegroundProportion(static_cast<float>(height) / totalHeight);
+        yScrollBar_->SetScrollProgress(static_cast<float>(scrollBlankSizeTop_ - allItemsRect.GetTop()) /
+                                    (totalHeight - height));
+    }
+    if (xScrollBarVisible_) {
+        int16_t totalWidth = allItemsRect.GetWidth() + scrollBlankSizeLeft_ + scrollBlankSizeRight_;
+        int16_t width = GetWidth();
+        xScrollBar_->SetForegroundProportion(static_cast<float>(width) / totalWidth);
+        xScrollBar_->SetScrollProgress(static_cast<float>(scrollBlankSizeLeft_ - allItemsRect.GetLeft()) /
+                                    (totalWidth - width));
+    }
     RefreshAnimator();
 }
 
@@ -838,30 +855,30 @@ void UIList::CalculateReboundDistance(int16_t& dragDistanceX, int16_t& dragDista
     int16_t right = rect.GetRight();
     int16_t scrollWidth = GetWidth();
     if ((direction_ == VERTICAL) || (direction_ == HORIZONTAL_AND_VERTICAL)) {
-        if (top > scrollBlankSize_) {
-            if ((dragDistanceY + top) > (scrollBlankSize_ + reboundSize_)) {
+        if (top > scrollBlankSizeTop_) {
+            if ((dragDistanceY + top) > (scrollBlankSizeTop_ + reboundSizeTop_)) {
                 dragDistanceY = 0;
             }
-            dragDistanceY += scrollBlankSize_ - (top + dragDistanceY);
+            dragDistanceY += scrollBlankSizeTop_ - (top + dragDistanceY);
         }
-        if (bottom < (scrollHeight - scrollBlankSize_ - 1)) {
-            if ((dragDistanceY + bottom) < (scrollHeight - scrollBlankSize_ - reboundSize_ - 1)) {
+        if (bottom < (scrollHeight - scrollBlankSizeBottom_ - 1)) {
+            if ((dragDistanceY + bottom) < (scrollHeight - scrollBlankSizeBottom_ - reboundSizeBottom_ - 1)) {
                 dragDistanceY = 0;
             }
-            dragDistanceY += scrollHeight - scrollBlankSize_ - 1 - (bottom + dragDistanceY);
+            dragDistanceY += scrollHeight - scrollBlankSizeBottom_ - 1 - (bottom + dragDistanceY);
         }
     } else {
-        if (left > scrollBlankSize_) {
-            if ((dragDistanceX + left) > (scrollBlankSize_ + reboundSize_)) {
+        if (left > scrollBlankSizeLeft_) {
+            if ((dragDistanceX + left) > (scrollBlankSizeLeft_ + reboundSizeLeft_)) {
                 dragDistanceX = 0;
             }
-            dragDistanceX += scrollBlankSize_ - (left + dragDistanceX);
+            dragDistanceX += scrollBlankSizeLeft_ - (left + dragDistanceX);
         }
-        if (right < (scrollWidth - scrollBlankSize_ - 1)) {
-            if ((dragDistanceX + right) < (scrollWidth - scrollBlankSize_ - reboundSize_ - 1)) {
+        if (right < (scrollWidth - scrollBlankSizeRight_ - 1)) {
+            if ((dragDistanceX + right) < (scrollWidth - scrollBlankSizeRight_ - reboundSizeRight_ - 1)) {
                 dragDistanceX = 0;
             }
-            dragDistanceX += scrollWidth - scrollBlankSize_ - 1 - (right + dragDistanceX);
+            dragDistanceX += scrollWidth - scrollBlankSizeRight_ - 1 - (right + dragDistanceX);
         }
     }
 }
@@ -875,6 +892,10 @@ void UIList::FixDistance(int16_t& distanceX, int16_t& distanceY)
         return;
     }
 
+    if (!autoAlign_) {
+        return;
+    }
+
     if (direction_ == VERTICAL) {
         FixVerDistance(distanceY);
     } else {
index 2920622..f00e576 100644 (file)
@@ -32,6 +32,7 @@ UIScrollView::UIScrollView()
 #if ENABLE_VIBRATOR
     totalRotateLen_ = 0;
     lastVibratorRotateLen_ = 0;
+    vibrationLenThreshold_ = DEFAULT_SCROLL_VIEW_VIBRATION_LEN;
 #endif
 #if ENABLE_FOCUS_MANAGER
     focusable_ = true;
@@ -105,11 +106,13 @@ bool UIScrollView::OnRotateEvent(const RotateEvent& event)
     bool lastIsEdge = false;
     Rect childRect = GetAllChildRelativeRect();
     if (direction_ == HORIZONTAL) {
-        if (childRect.GetLeft() - scrollBlankSize_ >= 0 || childRect.GetRight() + scrollBlankSize_ <= GetWidth()) {
+        if (childRect.GetLeft() - scrollBlankSizeLeft_ >= 0 ||
+            childRect.GetRight() + scrollBlankSizeRight_ <= GetWidth()) {
             lastIsEdge = true;
         }
     } else {
-        if (childRect.GetTop() - scrollBlankSize_ >= 0 || childRect.GetBottom() + scrollBlankSize_ <= GetHeight()) {
+        if (childRect.GetTop() - scrollBlankSizeTop_ >= 0 ||
+            childRect.GetBottom() + scrollBlankSizeBottom_ <= GetHeight()) {
             lastIsEdge = true;
         }
     }
@@ -124,19 +127,21 @@ bool UIScrollView::OnRotateEvent(const RotateEvent& event)
     childRect = GetAllChildRelativeRect();
     bool isEdge = false;
     if (direction_ == HORIZONTAL) {
-        if (childRect.GetLeft() - scrollBlankSize_ >= 0 || childRect.GetRight() + scrollBlankSize_ <= GetWidth()) {
+        if (childRect.GetLeft() - scrollBlankSizeLeft_ >= 0 ||
+            childRect.GetRight() + scrollBlankSizeRight_ <= GetWidth()) {
             isEdge = true;
         }
     } else {
-        if (childRect.GetTop() - scrollBlankSize_ >= 0 || childRect.GetBottom() + scrollBlankSize_ <= GetHeight()) {
+        if (childRect.GetTop() - scrollBlankSizeTop_ >= 0 ||
+            childRect.GetBottom() + scrollBlankSizeBottom_ <= GetHeight()) {
             isEdge = true;
         }
     }
     VibratorFunc vibratorFunc = VibratorManager::GetInstance()->GetVibratorFunc();
     if (vibratorFunc != nullptr && !isEdge) {
         uint16_t rotateLen = MATH_ABS(totalRotateLen_ - lastVibratorRotateLen_);
-        if (rotateLen > DEFAULT_SCROLL_VIEW_VIBRATION_LEN) {
-            uint16_t vibrationCnt = rotateLen / DEFAULT_SCROLL_VIEW_VIBRATION_LEN;
+        if (rotateLen > vibrationLenThreshold_) {
+            uint16_t vibrationCnt = rotateLen / vibrationLenThreshold_;
             for (uint16_t i = 0; i < vibrationCnt; i++) {
                 GRAPHIC_LOGI("UIScrollView::OnRotateEvent calls TYPE_ONE vibrator");
                 vibratorFunc(VibratorType::VIBRATOR_TYPE_ONE);
@@ -178,29 +183,31 @@ void UIScrollView::ScrollBy(int16_t xDistance, int16_t yDistance)
 bool UIScrollView::DragXInner(int16_t distance)
 {
     Rect childRect = GetAllChildRelativeRect();
-    int16_t reboundSize = reboundSize_;
+    int16_t reboundSizeLeft = reboundSizeLeft_;
+    int16_t reboundSizeRight = reboundSizeRight_;
     if (scrollAnimator_.GetState() != Animator::STOP) {
-        reboundSize = 0;
+        reboundSizeLeft = 0;
+        reboundSizeRight = 0;
     }
 
-    if (childRect.GetWidth() <= (GetWidth() - (scrollBlankSize_ << 1)) ||
+    if (childRect.GetWidth() <= (GetWidth() - scrollBlankSizeLeft_ - scrollBlankSizeRight_) ||
         !(direction_ == HORIZONTAL || direction_ == HORIZONTAL_AND_VERTICAL)) {
         return false;
     }
 
     if (distance > 0) {
-        if (childRect.GetLeft() > scrollBlankSize_ + reboundSize) {
+        if (childRect.GetLeft() > scrollBlankSizeLeft_ + reboundSizeLeft) {
             distance = 0;
-        } else if ((childRect.GetLeft() + distance) > scrollBlankSize_ + reboundSize) {
-            distance = scrollBlankSize_ - childRect.GetLeft() + reboundSize;
+        } else if ((childRect.GetLeft() + distance) > scrollBlankSizeLeft_ + reboundSizeLeft) {
+            distance = scrollBlankSizeLeft_ - childRect.GetLeft() + reboundSizeLeft;
         }
     } else {
         int16_t childRight = childRect.GetRight();
         int16_t scrollWidth = GetWidth();
-        if (childRight < scrollWidth - (scrollBlankSize_ + reboundSize)) {
+        if (childRight < scrollWidth - (scrollBlankSizeRight_ + reboundSizeRight)) {
             distance = 0;
-        } else if (childRight + distance < scrollWidth - (scrollBlankSize_ + reboundSize)) {
-            distance = scrollWidth - (scrollBlankSize_ + reboundSize) - childRight - 1;
+        } else if (childRight + distance < scrollWidth - (scrollBlankSizeRight_ + reboundSizeRight)) {
+            distance = scrollWidth - (scrollBlankSizeRight_ + reboundSizeRight) - childRight - 1;
         }
     }
 
@@ -210,29 +217,31 @@ bool UIScrollView::DragXInner(int16_t distance)
 bool UIScrollView::DragYInner(int16_t distance)
 {
     Rect childRect = GetAllChildRelativeRect();
-    int16_t reboundSize = reboundSize_;
+    int16_t reboundSizeTop = reboundSizeTop_;
+    int16_t reboundSizeBottom = reboundSizeBottom_;
     if (scrollAnimator_.GetState() != Animator::STOP) {
-        reboundSize = 0;
+        reboundSizeTop = 0;
+        reboundSizeBottom = 0;
     }
 
-    if (childRect.GetHeight() <= (GetHeight() - (scrollBlankSize_ << 1)) ||
+    if (childRect.GetHeight() <= (GetHeight() - scrollBlankSizeTop_ - scrollBlankSizeBottom_) ||
         !(direction_ == VERTICAL || direction_ == HORIZONTAL_AND_VERTICAL)) {
         return false;
     }
 
     if (distance > 0) {
-        if (childRect.GetTop() > scrollBlankSize_ + reboundSize) {
+        if (childRect.GetTop() > scrollBlankSizeTop_ + reboundSizeTop) {
             distance = 0;
-        } else if ((childRect.GetTop() + distance) > scrollBlankSize_ + reboundSize) {
-            distance = scrollBlankSize_ - childRect.GetTop() + reboundSize;
+        } else if ((childRect.GetTop() + distance) > scrollBlankSizeTop_ + reboundSizeTop) {
+            distance = scrollBlankSizeTop_ - childRect.GetTop() + reboundSizeTop;
         }
     } else {
         int16_t childBottom = childRect.GetBottom();
         int16_t scrollHeight = GetHeight();
-        if (childBottom < scrollHeight - (scrollBlankSize_ + reboundSize)) {
+        if (childBottom < scrollHeight - (scrollBlankSizeBottom_ + reboundSizeBottom)) {
                 distance = 0;
-        } else if (childBottom + distance < scrollHeight - (scrollBlankSize_ + reboundSize)) {
-                distance = scrollHeight - (scrollBlankSize_ + reboundSize) - childBottom - 1;
+        } else if (childBottom + distance < scrollHeight - (scrollBlankSizeBottom_ + reboundSizeBottom)) {
+                distance = scrollHeight - (scrollBlankSizeBottom_ + reboundSizeBottom) - childBottom - 1;
         }
     }
 
@@ -261,20 +270,20 @@ void UIScrollView::RefreshScrollBar()
 {
     Rect childrenRect = GetAllChildRelativeRect();
     /* calculate scrollBar's the proportion of foreground */
-    int16_t totalLen = childrenRect.GetHeight() + 2 * scrollBlankSize_; // 2: two blank space on both sizes
-    int16_t len = GetHeight();
     if (yScrollBarVisible_) {
+        int16_t totalLen = childrenRect.GetHeight() + scrollBlankSizeTop_ + scrollBlankSizeBottom_;
+        int16_t len = GetHeight();
         yScrollBar_->SetForegroundProportion(static_cast<float>(len) / totalLen);
         /* calculate scrolling progress */
-        yScrollBar_->SetScrollProgress(static_cast<float>(scrollBlankSize_ - childrenRect.GetTop()) /
+        yScrollBar_->SetScrollProgress(static_cast<float>(scrollBlankSizeTop_ - childrenRect.GetTop()) /
             (totalLen - len));
     }
     if (xScrollBarVisible_) {
         /* so do x-bar */
-        totalLen = childrenRect.GetWidth() + 2 * scrollBlankSize_; // 2: two blank space on both sizes
-        len = GetWidth();
+        int16_t totalLen = childrenRect.GetWidth() + scrollBlankSizeLeft_ + scrollBlankSizeRight_;
+        int16_t len = GetWidth();
         xScrollBar_->SetForegroundProportion(static_cast<float>(len) / totalLen);
-        xScrollBar_->SetScrollProgress(static_cast<float>(scrollBlankSize_ - childrenRect.GetLeft()) /
+        xScrollBar_->SetScrollProgress(static_cast<float>(scrollBlankSizeLeft_ - childrenRect.GetLeft()) /
             (totalLen - len));
     }
     RefreshAnimator();
@@ -289,16 +298,16 @@ void UIScrollView::CalculateReboundDistance(int16_t& dragDistanceX, int16_t& dra
     int16_t left = rect.GetLeft();
     int16_t right = rect.GetRight();
     int16_t scrollWidth = GetWidth();
-    if (scrollBlankSize_ < top) {
-        dragDistanceY = scrollBlankSize_ - top;
+    if (scrollBlankSizeTop_ < top) {
+        dragDistanceY = scrollBlankSizeTop_ - top;
     } else if (bottom < scrollHeight - 1) {
-        dragDistanceY = scrollHeight - scrollBlankSize_ - bottom - 1;
+        dragDistanceY = scrollHeight - scrollBlankSizeBottom_ - bottom - 1;
     }
 
-    if (scrollBlankSize_ < left) {
-        dragDistanceX = scrollBlankSize_ - left;
+    if (scrollBlankSizeLeft_ < left) {
+        dragDistanceX = scrollBlankSizeLeft_ - left;
     } else if (right < scrollWidth - 1) {
-        dragDistanceX = scrollWidth - scrollBlankSize_ - right - 1;
+        dragDistanceX = scrollWidth - scrollBlankSizeRight_ - right - 1;
     }
 }
 
index 7c4348d..c4543df 100644 (file)
@@ -29,6 +29,7 @@ UISwipeView::UISwipeView(uint8_t direction)
 #if ENABLE_VIBRATOR
     lastIndex_ = 0;
     needVibration_ = false;
+    vibrateIndex_ = 0;
 #endif
     direction_ = direction;
     tickTime_ = ANIMATOR_TIME;
@@ -248,6 +249,7 @@ bool UISwipeView::OnRotateStartEvent(const RotateEvent& event)
     }
 #if ENABLE_VIBRATOR
     needVibration_ = true;
+    lastIndex_ = vibrateIndex_;
 #endif
     return UIView::OnRotateStartEvent(event);
 }
@@ -266,13 +268,13 @@ bool UISwipeView::OnRotateEndEvent(const RotateEvent& event)
     }
     RefreshCurrentView(lastRotateLen_, dir);
     if (curView_ == nullptr) {
+#if ENABLE_VIBRATOR
+        needVibration_ = false;
+#endif
         return UIView::OnRotateEndEvent(event);
     }
     SwitchToPage(curIndex_);
     lastRotateLen_ = 0;
-#if ENABLE_VIBRATOR
-    needVibration_ = false;
-#endif
     return UIView::OnRotateEndEvent(event);
 }
 #endif
@@ -348,6 +350,9 @@ void UISwipeView::StopAnimator()
     if (swipeListener_ != nullptr) {
         swipeListener_->OnSwipe(*this);
     }
+#if ENABLE_VIBRATOR
+    needVibration_ = false;
+#endif
 }
 
 void UISwipeView::SortChild()
@@ -478,19 +483,6 @@ void UISwipeView::RefreshCurrentViewInner(int16_t distance,
             }
         }
     }
-#if ENABLE_VIBRATOR
-    VibratorFunc vibratorFunc = VibratorManager::GetInstance()->GetVibratorFunc();
-    if (vibratorFunc != nullptr && needVibration_ && curIndex_ != lastIndex_) {
-        if (!loop_ && (curIndex_ == 0 || curIndex_ == childrenNum_ - 1)) {
-            vibratorFunc(VibratorType::VIBRATOR_TYPE_THREE);
-            GRAPHIC_LOGI("UISwipeView::RefreshCurrentViewInner calls TYPE_THREE vibrator");
-        } else {
-            vibratorFunc(VibratorType::VIBRATOR_TYPE_ONE);
-            GRAPHIC_LOGI("UISwipeView::RefreshCurrentViewInner calls TYPE_ONE vibrator");
-        }
-        lastIndex_ = curIndex_;
-    }
-#endif
 }
 
 void UISwipeView::RefreshCurrentView(int16_t distance, uint8_t dragDirection)
@@ -506,6 +498,9 @@ void UISwipeView::MoveChildByOffset(int16_t xOffset, int16_t yOffset)
 {
     UIViewGroup::MoveChildByOffset(xOffset, yOffset);
     MoveHeadOrTailChild();
+#if ENABLE_VIBRATOR
+    Vibrate();
+#endif
 }
 
 bool UISwipeView::isNeedLoop()
@@ -577,4 +572,58 @@ void UISwipeView::CalculateInvalidate()
         view = view->GetNextSibling();
     }
 }
+
+#if ENABLE_VIBRATOR
+void UISwipeView::Vibrate()
+{
+    UIView* view = childrenHead_;
+    int16_t swipeMid;
+    int16_t (UIView::*pfnGetXOrY)() const;
+    int16_t (UIView::*pfnGetWidthOrHeight)();
+    if (direction_ == HORIZONTAL) {
+        pfnGetXOrY = &UIView::GetX;
+        pfnGetWidthOrHeight = &UIView::GetWidthWithMargin;
+    } else {
+        pfnGetXOrY = &UIView::GetY;
+        pfnGetWidthOrHeight = &UIView::GetHeightWithMargin;
+    }
+    if (alignMode_ == ALIGN_LEFT) {
+        swipeMid = 0;
+    } else if (alignMode_ == ALIGN_RIGHT) {
+        swipeMid = (this->*pfnGetWidthOrHeight)();
+    } else {
+        swipeMid = (this->*pfnGetWidthOrHeight)() / 2;
+    }
+    bool isFind = false;
+    while (view != nullptr) {
+        if ((swipeMid >= (view->*pfnGetXOrY)()) &&
+            (swipeMid <= (view->*pfnGetXOrY)() + (view->*pfnGetWidthOrHeight)()) && !isFind) {
+            vibrateIndex_ = view->GetViewIndex();
+            isFind = true;
+            break;
+        }
+        view = view->GetNextSibling();
+    }
+
+    if (!isFind) {
+        if ((childrenHead_->*pfnGetXOrY)() > swipeMid) {
+            vibrateIndex_ = childrenHead_->GetViewIndex();
+        } else {
+            vibrateIndex_ = childrenTail_->GetViewIndex();
+        }
+    }
+
+    VibratorFunc vibratorFunc = VibratorManager::GetInstance()->GetVibratorFunc();
+    if (vibratorFunc != nullptr && needVibration_ && vibrateIndex_ != lastIndex_) {
+        if (!loop_ && (vibrateIndex_ == 0 || vibrateIndex_ == childrenNum_ - 1)) {
+            vibratorFunc(VibratorType::VIBRATOR_TYPE_THREE);
+            GRAPHIC_LOGI("UISwipeView::Vibrate calls TYPE_THREE vibrator");
+        } else {
+            vibratorFunc(VibratorType::VIBRATOR_TYPE_ONE);
+            GRAPHIC_LOGI("UISwipeView::Vibrate calls TYPE_ONE vibrator");
+        }
+        lastIndex_ = vibrateIndex_;
+    }
+}
+#endif
 } // namespace OHOS
index 8686ab5..50645dd 100644 (file)
@@ -62,7 +62,7 @@ UIView::UIView()
       viewExtraMsg_(nullptr),
       rect_(0, 0, -1, -1),
       visibleRect_(nullptr),
-      blurRadius_(0)
+      blurRadius_(0.0f)
 {
     SetupThemeStyles();
 }
@@ -74,7 +74,7 @@ UIView::~UIView()
 #endif
     ClearBackgroundBlur();
     if (parent_ != nullptr) {
-        GRAPHIC_LOGE("UIView::~UIView failed, parent is not nullptr! Need to remove from parent component first %d",parent_->GetViewType());
+        GRAPHIC_LOGE("UIView::~UIView failed, parent is not nullptr! Need to remove from parent component first");
     }
     if (transMap_ != nullptr) {
         delete transMap_;
@@ -114,7 +114,7 @@ bool UIView::OnPreDraw(Rect& invalidatedArea) const
 
 void UIView::HandleGaussianBlur(BufferInfo& gfxDstBuffer)
 {
-    if (visible_ && (blurRadius_ != 0)) {
+    if (visible_ && (!FloatEqual(blurRadius_, 0.0f))) {
         BufferInfo gfxTargetBuffer = gfxDstBuffer;
         Rect mask = {0, 0, gfxTargetBuffer.width - 1, gfxTargetBuffer.height - 1};
         if (!fullScreenBlur_) {
@@ -471,19 +471,22 @@ void UIView::ResetTransParameter()
     }
 }
 
-void UIView::SetBackgroundBlur(uint16_t radius)
+void UIView::SetBackgroundBlur(float radius)
 {
-    if (RootView::GetInstance()->SetBlurView(this)) {
+    if (FloatEqual(radius, 0.0f)) {
+        RootView::GetInstance()->ClearBlurView(this);
+        blurRadius_ = 0.0f;
+    } else if (RootView::GetInstance()->SetBlurView(this)) {
         blurRadius_ = radius;
-        RootView::GetInstance()->Invalidate();
     }
+    RootView::GetInstance()->Invalidate();
 }
 
 void UIView::ClearBackgroundBlur()
 {
-    if (blurRadius_ != 0) {
+    if (!FloatEqual(blurRadius_, 0.0f)) {
         RootView::GetInstance()->ClearBlurView(this);
-        blurRadius_ = 0;
+        blurRadius_ = 0.0f;
         RootView::GetInstance()->Invalidate();
     }
 }
index c4198fb..60f5984 100644 (file)
@@ -114,6 +114,11 @@ uint32_t TaskManager::GetMinimumCustomerTaskPeriod()
     }
 }
 
+uint16_t TaskManager::GetTotalTaskNum()
+{
+    return list_.Size();
+}
+
 /**
  * @brief TaskManager::ResetTaskHandlerMutex Reset the running flag.
  *
index c4d04f3..9aaa006 100644 (file)
@@ -207,9 +207,11 @@ void PointerInputDevice::DispatchDragStartEvent()
     dragLen_.y += dragStep_.y;
     if (!isDragging_) {
         if ((MATH_ABS(dragLen_.x) >= INDEV_DRAG_LIMIT) || (MATH_ABS(dragLen_.y) >= INDEV_DRAG_LIMIT)) {
-            if ((touchableView_ != nullptr) && !cancelSent_) {
-                DispatchCancelEvent();
-            }
+            // HISI delete begin
+            //if ((touchableView_ != nullptr) && !cancelSent_) {
+            //    DispatchCancelEvent();
+            //}
+            // HISI delete end
             // Send Drag Begin Event.
             DragEvent evt(curPos_, lastPos_, dragLen_);
             UIView* parent = draggableView_->GetParent();
@@ -261,6 +263,7 @@ void PointerInputDevice::DispatchDragEndEvent()
         if (!draggableView_->OnDragEndEvent(evt)) {
             while (parent != nullptr) {
                 DragEvent evtParent(curPos_, lastPos_, dragLen_);
+                evtParent.SetPreLastPoint(dragLastPos_);
                 if (parent->OnDragEndEvent(evtParent)) {
                     break;
                 }
index 2d11481..96df293 100644 (file)
@@ -403,14 +403,17 @@ static void DrawEmoji(BufferInfo &gfxDstBuffer, const ImageInfo &info, const Lab
     if (!mask.Intersect(mask, blendOption.transMap.GetBoxRect())) {
         return;
     }
-    if (!FloatEqual(scaleX, 1.0f) || !FloatEqual(scaleY, 1.0f)) { // to avoid twinkle
+    Matrix4<float> matrix = blendOption.transMap.GetTransformMatrix();
+    if (!(FloatEqual(matrix[0][0], 1) && FloatEqual(matrix[0][1], 0) && FloatEqual(matrix[0][3], 0) &&
+        FloatEqual(matrix[1][0], 0) && FloatEqual(matrix[1][1], 1) && FloatEqual(matrix[1][3], 0) && // 3: pos
+        FloatEqual(matrix[3][3], 1))) { // 3: pos, to avoid twinkle
         mask.SetLeft(mask.GetLeft() + 1);
         mask.SetRight(mask.GetRight() - 1);
         mask.SetTop(mask.GetTop() + 1);
         mask.SetBottom(mask.GetBottom() - 1);
     } else { // to avoid vau error (srcRect is not euqal to dstRect) when no scale
-        int16_t srcLeft = mask.GetLeft() - posX;
-        int16_t srcTop = mask.GetTop() - posY;
+        int16_t srcLeft = mask.GetLeft() - matrix[3][0];
+        int16_t srcTop = mask.GetTop() - matrix[3][1];
         src.rect = {srcLeft, srcTop, srcLeft + mask.GetWidth() - 1, srcTop + mask.GetHeight() - 1};
     }
 
index 31357dc..9c2db2c 100644 (file)
@@ -125,7 +125,7 @@ void BaseGfxEngine::Fill(BufferInfo& dst, const Rect& fillArea, const ColorType
     DrawUtils::GetInstance()->FillAreaWithSoftWare(dst, fillArea, color, opacity);
 }
 
-void BaseGfxEngine::Blur(BufferInfo& dst, uint16_t radius)
+void BaseGfxEngine::Blur(BufferInfo& dst, float radius)
 {
     GRAPHIC_LOGE("Blur not support.");
 }
index ba7c4d3..4216cec 100644 (file)
@@ -75,6 +75,11 @@ public:
      */
     uint32_t GetMinimumCustomerTaskPeriod();
 
+    /**
+     * @brief Get total number of tasks.
+     */
+    uint16_t GetTotalTaskNum();
+
 protected:
     List<Task*> list_; /* the task list */
     bool canTaskRun_;
index 108f3ed..42c1220 100644 (file)
@@ -130,7 +130,7 @@ public:
                       const ColorType color,
                       const OpacityType opacity);
 
-    virtual void Blur(BufferInfo& dst, uint16_t radius);
+    virtual void Blur(BufferInfo& dst, float radius);
 
     virtual uint8_t* AllocBuffer(uint32_t size, uint32_t usage);
 
index 496101f..6db6c05 100644 (file)
@@ -341,6 +341,8 @@ public:
         if (blurView_ == nullptr) {
             blurView_ = view;
             return true;
+        } else if (view == blurView_) {
+            return true;
         } else {
 #ifndef USE_DIAG_LOG
             GRAPHIC_LOGE("BlurView already exists. Can only set once.");
index bd247d1..5acc571 100644 (file)
@@ -254,16 +254,14 @@ public:
         formatter_ = formatter;
     }
 protected:
-    virtual UILabel* GetTextView(UIView* inView, int16_t index);
-    virtual UILabel* CreateUILabel(UIView* inView);
+    virtual UILabel* CreateUILabel();
     uint8_t dataMode_;
 
 private:
     static constexpr uint8_t DYNAMIC_TEXT_MODE = 0;
     static constexpr uint8_t CONTINUOUS_INTEGER_MODE = 3;
     static constexpr uint8_t BUF_LEN = 7;
-    UILabel* GetDynamicText(UIView* inView, int16_t index);
-    UILabel* GetIntegerText(UIView* inView, int16_t index);
+    bool SetIntegerText(UILabel* inView, int16_t index);
     void ClearDynamicText();
     uint8_t fontId_;
     char* fontName_;
index b9fb42f..fc45e4e 100644 (file)
@@ -79,6 +79,14 @@ public:
         return UI_ABSTRACT_SCROLL;
     }
 
+    enum class Direction {
+        ALL,
+        TOP,
+        BOTTOM,
+        LEFT,
+        RIGHT,
+    };
+
     /**
      * @brief Sets the blank size for this scroll view.
      *
@@ -87,38 +95,76 @@ public:
      *              example, the value <b>0</b> indicates that the head node can only scroll downwards the top of the
      *              view and the tail node scroll upwards the bottom; the value <b>10</b> indicates that the head node
      *              can continue scrolling down by 10 pixels after it reaches the top of the view.
+     * @param direction Indicates the direction of blank size to set. Default is ALL. Direction can be specified for UIList and UIScrollView.
      * @since 1.0
      * @version 1.0
      */
-    void SetScrollBlankSize(uint16_t size)
+    void SetScrollBlankSize(uint16_t size, UIAbstractScroll::Direction direction = UIAbstractScroll::Direction::ALL)
     {
-        scrollBlankSize_ = size;
+        switch (direction) {
+            case UIAbstractScroll::Direction::ALL:
+                scrollBlankSize_ = size;
+                scrollBlankSizeTop_ = size;
+                scrollBlankSizeBottom_ = size;
+                scrollBlankSizeLeft_ = size;
+                scrollBlankSizeRight_ = size;
+                break;
+            case UIAbstractScroll::Direction::TOP:
+                scrollBlankSizeTop_ = size;
+                break;
+            case UIAbstractScroll::Direction::BOTTOM:
+                scrollBlankSizeBottom_ = size;
+                break;
+            case UIAbstractScroll::Direction::LEFT:
+                scrollBlankSizeLeft_ = size;
+                break;
+            case UIAbstractScroll::Direction::RIGHT:
+                scrollBlankSizeRight_ = size;
+                break;
+        }
     }
 
     /**
-     * @brief Sets the maximum scroll distance after a finger lifts the screen.
-     *
-     * @param distance Indicates the maximum scroll distance to set. The default value is <b>0</b>, indicating that the
-     *                 scroll distance is not limited.
-     * @since 1.0
-     * @version 1.0
+     * @brief Sets the rebound size in a specific direction.
+     * @param size Indicates the rebound size to set.
+     * @param direction Indicates the direction of rebound size to set. Default is ALL. Direction can be specified for UIList and UIScrollView.
      */
-    void SetMaxScrollDistance(uint16_t distance)
+    void SetReboundSize(uint16_t size, UIAbstractScroll::Direction direction = UIAbstractScroll::Direction::ALL)
     {
-        maxScrollDistance_ = distance;
+        switch (direction) {
+            case UIAbstractScroll::Direction::ALL:
+                reboundSize_ = size;
+                reboundSizeTop_ = size;
+                reboundSizeBottom_ = size;
+                reboundSizeLeft_ = size;
+                reboundSizeRight_ = size;
+                break;
+            case UIAbstractScroll::Direction::TOP:
+                reboundSizeTop_ = size;
+                break;
+            case UIAbstractScroll::Direction::BOTTOM:
+                reboundSizeBottom_ = size;
+                break;
+            case UIAbstractScroll::Direction::LEFT:
+                reboundSizeLeft_ = size;
+                break;
+            case UIAbstractScroll::Direction::RIGHT:
+                reboundSizeRight_ = size;
+                break;
+        }
     }
 
     /**
-     * @brief Sets the rebound size, which is the distance a knob moves after being released when it reaches the end of
-     *        a scrollbar.
+     * @brief Sets the maximum scroll distance after a finger lifts the screen.
      *
-     * @param size Indicates the rebound size to set.
+     * @param distance Indicates the maximum scroll distance to set. The default value is <b>0</b>, indicating that the
+     *                 scroll distance is not limited.
      * @since 1.0
      * @version 1.0
      */
-    void SetReboundSize(uint16_t size)
+    void SetMaxScrollDistance(uint16_t distance)
     {
-        reboundSize_ = size;
+        maxScrollDistance_ = distance;
     }
 
     /**
@@ -459,6 +505,14 @@ protected:
     int16_t CalculateElasticDragLen(int16_t maxLen, int16_t currLen, int16_t dragLen);
 
     uint16_t scrollBlankSize_ = 0;
+    uint16_t scrollBlankSizeTop_ = 0;
+    uint16_t scrollBlankSizeBottom_ = 0;
+    uint16_t scrollBlankSizeLeft_ = 0;
+    uint16_t scrollBlankSizeRight_ = 0;
+    uint16_t reboundSizeTop_ = 0;
+    uint16_t reboundSizeBottom_ = 0;
+    uint16_t reboundSizeLeft_ = 0;
+    uint16_t reboundSizeRight_ = 0;
     uint16_t reboundSize_ = 0;
     int16_t accumulatedSize_ = 0;
     uint16_t elasticTime_ = 200;
index df83008..a739d31 100644 (file)
@@ -415,10 +415,33 @@ public:
      */
     void SetHeight(int16_t height) override;
 
+    /**
+     * @brief Adjusts the size of the view.
+     * @param width Indicates the new width.
+     * @param height Indicates the new height.
+     * @since 1.0
+     * @version 1.0
+     */
+    void Resize(int16_t width, int16_t height) override;
+
     void ReMeasure() override;
 
     std::string GetGuiInfo() const override;
 
+    /**
+     * @brief Set animator state. This may not immediately change the state.
+     *        It is used when label has an animator due to LINE_BREAK_MARQUEE or LINE_BREAK_OSCILLATION mode.
+     *        START: Enable animator. Start or Resume animator if it was mannually stopped or paused.
+     *        STOP: Stop animator. Once set, animator cannot be started automatically.
+     *        PAUSE: Pause animator. Once set, animator cannot be resumed automatically.
+     */
+    void SetAnimState(uint8_t state);
+
+    /**
+     * @brief Get animator's real state.
+     */
+    uint8_t GetAnimRealState();
+
 #if ENABLE_FONT_VECTOR_GLOBAL
     virtual void ForceResetText() {};
 #endif
@@ -452,6 +475,9 @@ private:
     } animator_;
 
     UITextLanguageAlignment horAlign_ = TEXT_ALIGNMENT_LEFT;
+
+    bool CheckAnimState();
+    uint8_t setAnimState_ = Animator::START;
 };
 } // namespace OHOS
 #endif // GRAPHIC_LITE_UI_LABEL_H
index c5039a7..40810e8 100644 (file)
@@ -236,6 +236,16 @@ public:
         scrollListener_ = scrollListener;
     }
 
+    void SetVibrationLenThreshold(uint16_t value)
+    {
+        vibrationLenThreshold_ = value;
+    }
+
+    uint16_t GetVibrationLenThreshold() const
+    {
+        return vibrationLenThreshold_;
+    }
+
 protected:
     void StopAnimator() override;
     bool DragXInner(int16_t distance) override;
@@ -250,6 +260,7 @@ private:
 #if ENABLE_VIBRATOR
     int16_t totalRotateLen_;
     int16_t lastVibratorRotateLen_;
+    uint16_t vibrationLenThreshold_;
 #endif
 };
 } // namespace OHOS
index 89e3f18..02f2943 100644 (file)
@@ -128,6 +128,7 @@ enum UIViewType : uint8_t {
     UI_COVER_FLOW_2,
     UI_WATERFALL_LIST,
     UI_SPHERE_VIEW,
+    UI_PARTICLE_VIEW,
     UI_NUMBER_MAX
 };
 
@@ -1663,7 +1664,13 @@ public:
 
     void ResetTransParameter();
 
-    void SetBackgroundBlur(uint16_t radius);
+    /**
+     * @brief Sets blur radius
+     * @param radius Indicates the blur effect of different degrees, the valid range is [0.0f, 32.0f]
+     * @since 1.0
+     * @version 1.0
+     */
+    void SetBackgroundBlur(float radius);
 
     void ClearBackgroundBlur();
 
@@ -1843,7 +1850,7 @@ protected:
     OnRotateListener* onRotateListener_;
 #endif
     ViewExtraMsg* viewExtraMsg_;
-    uint16_t blurRadius_;
+    float blurRadius_;
 
     uint8_t GetMixOpaScale() const;
     bool IsInvalid(float percent);
index 123a704..18e4bb2 100644 (file)
@@ -111,11 +111,19 @@ namespace OHOS {
  */
 #define ENABLE_STATIC_FONT                0
 
+#ifdef XTS_SUPPORT
+#define ENABLE_JPEG_AND_PNG               1
+#else
 #define ENABLE_JPEG_AND_PNG               0
+#endif
 /**
  * @brief Cache the decoded content for Jpeg and Png image
  */
+#ifdef XTS_SUPPORT
+#define CACHE_JPEG_AND_PNG                1
+#else
 #define CACHE_JPEG_AND_PNG                0
+#endif
 /**
  * @brief Customize the memory area when loading image resources
  */
index 396dba7..b0d37a3 100644 (file)
@@ -697,7 +697,7 @@ static void GetMixWeight(InterruptElement *interruptEl, float materStreamTypeVol
     }\r
 }\r
 \r
-bool InterruptMgrGetActiveStream(AudioStreamStrategy *streamStrategy, bool isOutput)\r
+bool InterruptMgrGetActiveStream(AudioStreamStrategy *streamStrategy, AudioStreamType streamType, bool isOutput)\r
 {\r
     /* 获取流和对应的混音权重 */\r
     ALOGD("isOutput:%d", isOutput);\r
@@ -709,14 +709,18 @@ bool InterruptMgrGetActiveStream(AudioStreamStrategy *streamStrategy, bool isOut
     AUDIO_LOCK(g_interruptMgrCtx.interruptLock);\r
     for (ListIterator it = ListIterBegin(list); it != ListIterEnd(list); it = ListIterNext(list, it)) {\r
         InterruptElement *interruptEl = (InterruptElement *)ListIterData(it);\r
-        bool isValidActiveStream = !interruptEl->isInterrupted &&\r
+        /* 可以恢复的流即使被打断,也需要默认是active的 */\r
+        bool isValidActiveStream = (!interruptEl->isInterrupted || IsNeedResumeForStream(interruptEl->streamType)) &&\r
             interruptEl->streamType == interruptEl->routedStreamDesc.streamDesc.streamType;\r
         if (isValidActiveStream) {\r
             ret = GetRoutedDeviceForStream(&interruptEl->routedStreamDesc, isOutput);\r
             if (ret != AUDIO_SUCCESS) {\r
-                ALOGE("Get Routed Device For Stream (0x%x) failed", interruptEl->streamType);\r
-                AUDIO_UNLOCK(g_interruptMgrCtx.interruptLock);\r
-                return false;\r
+                if (interruptEl->streamType == streamType) {\r
+                    ALOGE("Get Routed Device For Stream (0x%x) failed", interruptEl->streamType);\r
+                    AUDIO_UNLOCK(g_interruptMgrCtx.interruptLock);\r
+                    return false;\r
+                }\r
+                continue;\r
             }\r
             /* 第一条流作为混音权重 100% */\r
             if (index == 0) {\r
index 8fccc23..b31d96f 100644 (file)
@@ -41,7 +41,7 @@ void InterruptMgrDeInit(void);
 bool InterruptMgrCreateStream(AudioSession sessionID, const AudioStreamDescriptor *streamDesc, bool isOutput);\r
 bool InterruptMgrDestroyStream(AudioSession sessionID, const AudioStreamDescriptor *streamDesc, bool isOutput);\r
 \r
-bool InterruptMgrGetActiveStream(AudioStreamStrategy *streamStrategy, bool isOutput);\r
+bool InterruptMgrGetActiveStream(AudioStreamStrategy *streamStrategy, AudioStreamType streamType, bool isOutput);\r
 /* interrupt might already be time out in the stack, handle it */\r
 void InterruptMgrSignalExceptionCheckThread(void);\r
 void InterruptMgrHandleException(void);\r
index c47dd7e..9d07901 100644 (file)
@@ -377,18 +377,18 @@ static AudioStreamStrategy *GetStrategyForStreamCreate(AudioSession sessionID, c
     }
     ResetActiveStreams();
     /* 获取流和对应的混音权重 */
-    if (!InterruptMgrGetActiveStream(&g_policyMgrCtx.streamStrategy, isOutput)) {
+    if (!InterruptMgrGetActiveStream(&g_policyMgrCtx.streamStrategy, streamDesc->streamType, isOutput)) {
         ResetActiveStreams();
         return NULL;
     }
     return &g_policyMgrCtx.streamStrategy;
 }
 
-static AudioStreamStrategy *GetStrategyForStreamResume(bool isOutput)
+static AudioStreamStrategy *GetStrategyForStreamResume(const AudioStreamDescriptor *streamDesc, bool isOutput)
 {
     ResetActiveStreams();
     /* 获取流和对应的混音权重 */
-    if (!InterruptMgrGetActiveStream(&g_policyMgrCtx.streamStrategy, isOutput)) {
+    if (!InterruptMgrGetActiveStream(&g_policyMgrCtx.streamStrategy, streamDesc->streamType, isOutput)) {
         ResetActiveStreams();
         return NULL;
     }
@@ -407,7 +407,7 @@ static AudioStreamStrategy *GetStrategyForStreamDestroy(AudioSession sessionID,
         return NULL;
     }
     /* 获取流和对应的混音权重 */
-    if (!InterruptMgrGetActiveStream(&g_policyMgrCtx.streamStrategy, isOutput)) {
+    if (!InterruptMgrGetActiveStream(&g_policyMgrCtx.streamStrategy, streamDesc->streamType, isOutput)) {
         ResetActiveStreams();
         ALOGE("sessionID:%u get active stream:0x%x failed", sessionID, streamDesc->streamType);
         return NULL;
@@ -427,7 +427,7 @@ AudioStreamStrategy *PolicyMgrGetStrategyForStream(AudioSession sessionID, const
             return GetStrategyForStreamCreate(sessionID, streamDesc, isOutput);
         case STREAM_OUT_RESUME:
         case STREAM_IN_RESUME:
-            return GetStrategyForStreamResume(isOutput);
+            return GetStrategyForStreamResume(streamDesc, isOutput);
         case STREAM_OUT_DESTROY:
         case STREAM_IN_DESTROY:
             return GetStrategyForStreamDestroy(sessionID, streamDesc, isOutput);
index 761706b..d602e7f 100644 (file)
@@ -668,34 +668,35 @@ ERR:
 
 int32_t StreamMgrDestroyStreamOut(uintptr_t handle)
 {
-    if (!g_inited) {
-        return AUDIO_SUCCESS;
-    }
     CHK_NULL_RETURN((void*)handle, AUDIO_ERROR, "handle is NULL when destroy");
     int32_t streamId;
     AudioSession sessionId;
     int32_t ret = GetHandleId(handle, &streamId, &sessionId);
     CHK_FAILED_RETURN(ret, AUDIO_SUCCESS, AUDIO_ERROR, "get handle failed");
-
+    MediaMutexLock(g_mutex);
     // 告知策略模块即将清掉的流
     AudioStreamInfo streamInfForDestroy = { 0 };
     streamInfForDestroy.streamType = GetStreamType(handle);
     streamInfForDestroy.sessionID = sessionId;
     AudioStreamStrategy *strategy =
         GetStrategyFromPolicyManager(&streamInfForDestroy, (uint32_t)streamId, STREAM_OUT_DESTROY);
-    CHK_NULL_RETURN(strategy, AUDIO_ERROR, "get strategy fail when destroy out stream");
+    if (strategy == NULL) {
+        ALOGE("get strategy fail when destroy out stream");
+        MediaMutexUnLock(g_mutex);
+        return AUDIO_ERROR;
+    }
 #ifdef SUPPORT_SET_DSP_CLOCK_FREQ
     AudioStreamType streamType = GetStreamType(handle);
     AudioDeviceType deviceType = (AudioDeviceType)GetStreamDeviceId(handle);
 #endif
     // hal 销毁
     if (DestroyTrackHandle(handle) != AUDIO_SUCCESS) {
+        MediaMutexUnLock(g_mutex);
         return AUDIO_ERROR;
     }
     // 更新的话,先把流从管理中删除
     // 然后根据新的策略,把老流的信息该更新了
     // 通知外界流销毁了
-    MediaMutexLock(g_mutex);
     DeleteOneStream(streamId, true);
 #ifdef SUPPORT_SET_DSP_CLOCK_FREQ
     if (IsAllStreamDestroyed(streamType)) {\r
@@ -809,19 +810,16 @@ static int32_t StreamMgrSetTypeVolumeInner(int32_t streamType, float typeVolume,
         if (streamType == AUDIO_STREAM_VOICE_CALL_VOLTE) {
             int32_t ret = SetSourceVolume(streamHandle, typeVolume);
             if (ret == AUDIO_ERROR) {
-                MediaMutexUnLock(g_mutex);
                 return AUDIO_ERROR;
             }
         } else {
             // 获取混音比例,这个是不是也应该放在 trackcontext 更合适,目前先这么实现
             float mixWeight;
             if (!GetStreamMixWeight(streamHandle, &mixWeight)) {
-                MediaMutexUnLock(g_mutex);
                 return AUDIO_ERROR;
             }
             int32_t ret = SetTrackVolume(streamHandle, typeVolume, mixWeight, NOT_SET_STREAM_VOLUME);
             if (ret == AUDIO_ERROR) {
-                MediaMutexUnLock(g_mutex);
                 return AUDIO_ERROR;
             }
         }
index 6e6cced..3208660 100644 (file)
@@ -89,6 +89,7 @@ int32_t DestroyTrackHandle(uintptr_t handle)
 {
     TrackHandleContext *context = (TrackHandleContext *)handle;
     CHK_NULL_RETURN(context, AUDIO_ERROR, "track handle is NULL");
+    MediaMutexLock(context->deviceChangeMutex);
     ALOGI("type is:%s", StringType(context->streamInfo.streamType));
     uint32_t validFwDevice = context->userAudioOutDevice == 0 ?
         context->defalutAudioOutDevice :
@@ -107,6 +108,7 @@ EXIT:
         free(context->keyValueList);
         context->keyValueList = NULL;
     }
+    MediaMutexUnLock(context->deviceChangeMutex);
     MediaMutexDestroy(&context->deviceChangeMutex);
     free(context);
     return ret;
@@ -268,7 +270,6 @@ inline static bool IsVolumeValid(float volumeAbout)
 static int32_t ChangeRouteInner(TrackHandleContext *context, int32_t deviceId)
 {
     CHK_NULL_RETURN(context->render, AUDIO_ERROR, "hal render is NULL");
-
     // 1. process cur stream
     int32_t ret = ProcessCurStream(context);
     CHK_FAILED_RETURN(ret, AUDIO_SUCCESS, AUDIO_ERROR, "process cur stream fail");
@@ -316,7 +317,6 @@ static int32_t ChangeRouteInner(TrackHandleContext *context, int32_t deviceId)
             return ret;
         }
     }
-
     context->userAudioOutDevice = (uint32_t)deviceId;
     return AUDIO_SUCCESS;
 }
@@ -362,14 +362,14 @@ int32_t SetTrackOutputDevice(uintptr_t handle, int32_t deviceId, const AudioStre
     if (context->state == IDLE) {
         context->userAudioOutDevice = (uint32_t)deviceId;
     } else if (context->state == RUNNING) {
-        (void)context->callback(context->caller, AUDIO_EVENT_OUTPUT_DEVICE_CHANGED, NULL);
-        if (ChangeRouteInner(context, deviceId) != AUDIO_SUCCESS) {
-            goto ERR;
-        }
-    } else if (context->state == PAUSE) {
-        context->routeChangedDevice = (uint32_t)deviceId;
-    } else {
-        ALOGE("bad state[%d]", context->state);
+        (void)context->callback(context->caller, AUDIO_EVENT_OUTPUT_DEVICE_CHANGED, NULL);\r
+        if (ChangeRouteInner(context, deviceId) != AUDIO_SUCCESS) {\r
+            goto ERR;\r
+        }\r
+    } else if (context->state == PAUSE) {\r
+        context->routeChangedDevice = (uint32_t)deviceId;\r
+    } else {\r
+        ALOGE("bad state[%d]", context->state);\r
         goto ERR;
     }
     MediaMutexUnLock(context->deviceChangeMutex);
@@ -512,10 +512,13 @@ int32_t StartTrack(uintptr_t handle)
 {
     TrackHandleContext *context = (TrackHandleContext *)handle;
     CHK_NULL_RETURN(context, AUDIO_ERROR, "track handle is NULL");
+    MediaMutexLock(context->deviceChangeMutex);
     if (context->state == RUNNING) {
+        MediaMutexUnLock(context->deviceChangeMutex);
         return AUDIO_SUCCESS;
     }
     if (context->state == STOP) {
+        MediaMutexUnLock(context->deviceChangeMutex);
         return AUDIO_ERROR;
     }
     // 暂停后恢复分 主动暂停后恢复 和 被动暂停后恢复,
@@ -523,19 +526,17 @@ int32_t StartTrack(uintptr_t handle)
     // 由于目前还不能区分是哪种恢复,因此统一处理
     // 被动暂停后恢复典型场景分析:
     // 例如A1-A2混音,此时B抢占A1A2,待B结束,要恢复A1A2其中一个时(定为Ax),Ax需要重新计算权重
-    int32_t ret;
     if (context->state == PAUSE) {
         // 蓝牙音乐中途接听蓝牙电话,通话中途手表去使能,此时手机和蓝牙设备同时和手表断开,
         // 蓝牙音乐恢复和输出设备切换从不同线程触发,同时访问底层蓝牙插件资源,需要加锁保证时序
-        MediaMutexLock(context->deviceChangeMutex);
-        ret = ResumeTrack(context);
+        int32_t ret = ResumeTrack(context);
         MediaMutexUnLock(context->deviceChangeMutex);
         return ret;
     }
-
     // IDLE 状态要把 hal 创建起来
-    ret = CreateAudioRenderHandle(context);
+    int32_t ret = CreateAudioRenderHandle(context);
     if (ret != AUDIO_SUCCESS) {
+        MediaMutexUnLock(context->deviceChangeMutex);
         return AUDIO_ERROR;
     }
     if (!CheckRenderValid(context->render)) {
@@ -559,10 +560,12 @@ int32_t StartTrack(uintptr_t handle)
     if (SetVolumeAndSetMute(context) != AUDIO_SUCCESS) {
         goto DESTROY_RENDER_HANDLE;
     }
+    MediaMutexUnLock(context->deviceChangeMutex);
     return AUDIO_SUCCESS;
 
 DESTROY_RENDER_HANDLE:
     DestroyAudioRenderHandle(context);
+    MediaMutexUnLock(context->deviceChangeMutex);
     return AUDIO_ERROR;
 }
 
@@ -631,7 +634,6 @@ int32_t SetTrackVolume(uintptr_t handle, float typeVolume, float mixWeight, floa
         MediaMutexUnLock(context->deviceChangeMutex);
         return AUDIO_BAD_STATE;
     }
-    MediaMutexUnLock(context->deviceChangeMutex);
     if (context->keyValueList != NULL) {
         if (SetExtraData(context) != AUDIO_SUCCESS) {
             ALOGI("set volume extra data failed!");
@@ -662,9 +664,11 @@ int32_t SetTrackVolume(uintptr_t handle, float typeVolume, float mixWeight, floa
             goto ERROR;
         }
     }
+    MediaMutexUnLock(context->deviceChangeMutex);
     return AUDIO_SUCCESS;
 
 ERROR:
+    MediaMutexUnLock(context->deviceChangeMutex);
     return AUDIO_ERROR;
 }
 
@@ -681,15 +685,19 @@ int32_t SetStreamPlayBackSpeed(uintptr_t handle, float speed)
     TrackHandleContext *context = (TrackHandleContext *)handle;
     CHK_NULL_RETURN(context, AUDIO_ERROR, "track handle is NULL");
     // 状态
+    MediaMutexLock(context->deviceChangeMutex);
     if (context->state == STOP) {
         ALOGE("track[%d] is stop", context->streamId);
+        MediaMutexUnLock(context->deviceChangeMutex);
         return AUDIO_ERROR;
     }
     // 调南向
     int32_t ret = context->render->SetRenderSpeed(context->render, speed);
     if (ret != AUDIO_SUCCESS) {
+        MediaMutexUnLock(context->deviceChangeMutex);
         return AUDIO_ERROR;
     }
+    MediaMutexUnLock(context->deviceChangeMutex);
     return AUDIO_SUCCESS;
 }
 
@@ -698,6 +706,7 @@ int32_t StreamWriteTrack(uintptr_t handle, const uint8_t *buffer, uint64_t buffe
     TrackHandleContext *context = (TrackHandleContext *)handle;
     CHK_NULL_RETURN(context, AUDIO_ERROR, "track handle is NULL");
     // 状态
+    MediaMutexLock(context->deviceChangeMutex);
     if (context->state != RUNNING) {
         // 场景B打断场景A,策略结果是场景A业务暂停,由于中断结果上报和场景B业务启动是异步的,
         // 因此当场景B业务启动时,场景A业务可能还未响应暂停,此时流管理模块会检查老流状态,
@@ -709,10 +718,10 @@ int32_t StreamWriteTrack(uintptr_t handle, const uint8_t *buffer, uint64_t buffe
             ALOGE("track[%d] is neither running or pause, write failed", context->streamId);
         }
         *replyBytes = 0;
+        MediaMutexUnLock(context->deviceChangeMutex);
         return AUDIO_ERROR;
     }
     // 调南向
-    MediaMutexLock(context->deviceChangeMutex);
     if (context->render == NULL) {
         MediaMutexUnLock(context->deviceChangeMutex);
         return AUDIO_ERROR;
@@ -751,19 +760,24 @@ int32_t SetTrackMute(uintptr_t handle, bool mute)
     TrackHandleContext *context = (TrackHandleContext *)handle;
     CHK_NULL_RETURN(context, AUDIO_ERROR, "track handle is NULL");
     // 状态
+    MediaMutexLock(context->deviceChangeMutex);
     if (context->state == STOP) {
         ALOGE("track[%d] state is wrong, mute fail", context->streamId);
+        MediaMutexUnLock(context->deviceChangeMutex);
         return AUDIO_BAD_STATE;
     } else if (context->state == IDLE) {
         context->mute = mute;
+        MediaMutexUnLock(context->deviceChangeMutex);
         return AUDIO_SUCCESS;
     }
     // 调南向
     int32_t ret = context->render->volume.SetMute((AudioHandle)context->render, mute);
     if (ret != AUDIO_SUCCESS) {
+        MediaMutexUnLock(context->deviceChangeMutex);
         return AUDIO_ERROR;
     }
     context->mute = mute;
+    MediaMutexUnLock(context->deviceChangeMutex);
     return AUDIO_SUCCESS;
 }
 
@@ -780,15 +794,19 @@ int32_t GetStreamChannelId(uintptr_t handle, uint32_t *channelId)
 {
     TrackHandleContext *context = (TrackHandleContext *)handle;
     CHK_NULL_RETURN(context, AUDIO_ERROR, "track handle is NULL");
+    MediaMutexLock(context->deviceChangeMutex);
     if (context->state != RUNNING) {
+        MediaMutexUnLock(context->deviceChangeMutex);
         return AUDIO_BAD_STATE;
     }
     int32_t ret = context->render->attr.GetCurrentChannelId(context->render, channelId);
     if (ret != AUDIO_SUCCESS) {
         ALOGE("Get channel id failed: 0x%x", ret);
+        MediaMutexUnLock(context->deviceChangeMutex);
         return AUDIO_ERROR;
     }
     ALOGI("Channel id: 0x%x", *channelId);
+    MediaMutexUnLock(context->deviceChangeMutex);
     return AUDIO_SUCCESS;
 }
 
@@ -796,7 +814,9 @@ int32_t TrackAttachFrontend(uintptr_t handle, uint32_t frontendId)
 {
     TrackHandleContext *context = (TrackHandleContext *)handle;
     CHK_NULL_RETURN(context, AUDIO_ERROR, "track handle is NULL");
+    MediaMutexLock(context->deviceChangeMutex);
     if (context->state != RUNNING) {
+        MediaMutexUnLock(context->deviceChangeMutex);
         return AUDIO_BAD_STATE;
     }
 
@@ -804,14 +824,17 @@ int32_t TrackAttachFrontend(uintptr_t handle, uint32_t frontendId)
     int convertRet = sprintf_s(keyValuePair, sizeof(keyValuePair), "%s = %u", "attachId", frontendId);
     if (convertRet == AUDIO_ERROR) {
         ALOGE("splice key=value str fail[%d]", convertRet);
+        MediaMutexUnLock(context->deviceChangeMutex);
         return AUDIO_ERROR;
     }
     int32_t ret = context->render->attr.SetExtraParams((AudioHandle)context->render, keyValuePair);
     if (ret != AUDIO_SUCCESS) {
         ALOGE("set front end id failed: 0x%x", ret);
+        MediaMutexUnLock(context->deviceChangeMutex);
         return AUDIO_ERROR;
     }
     ALOGI("frontend Id: 0x%x", frontendId);
+    MediaMutexUnLock(context->deviceChangeMutex);
     return AUDIO_SUCCESS;
 }
 
@@ -877,15 +900,19 @@ int32_t TrackFlush(uintptr_t handle)
     TrackHandleContext *context = (TrackHandleContext *)handle;
     CHK_NULL_RETURN(context, AUDIO_ERROR, "track handle is NULL");
     // 状态
+    MediaMutexLock(context->deviceChangeMutex);
     if (context->state != PAUSE) {
         ALOGE("track[%d] state is wrong, mute fail", context->streamId);
+        MediaMutexUnLock(context->deviceChangeMutex);
         return AUDIO_ERROR;
     }
     // 调南向
     int32_t ret = context->render->control.Flush((AudioHandle)context->render);
     if (ret != AUDIO_SUCCESS) {
+        MediaMutexUnLock(context->deviceChangeMutex);
         return AUDIO_ERROR;
     }
+    MediaMutexUnLock(context->deviceChangeMutex);
     return AUDIO_SUCCESS;
 }
 
@@ -926,6 +953,7 @@ int32_t SetTrackParam(uintptr_t handle, const char *keyValueList, size_t len)
         ALOGE("len invalid ");
         return AUDIO_ERROR;
     }
+    MediaMutexLock(context->deviceChangeMutex);
     if (context->keyValueList != NULL) {
         free(context->keyValueList);
         context->keyValueList = NULL;
@@ -933,6 +961,7 @@ int32_t SetTrackParam(uintptr_t handle, const char *keyValueList, size_t len)
     context->keyValueList = malloc(len + 1);
     if (context->keyValueList == NULL) {
         ALOGE("malloc failed");
+        MediaMutexUnLock(context->deviceChangeMutex);
         return AUDIO_ERROR;
     }
     int32_t ret = memcpy_s(context->keyValueList, len + 1, keyValueList, len);
@@ -940,16 +969,18 @@ int32_t SetTrackParam(uintptr_t handle, const char *keyValueList, size_t len)
         ALOGE("memcpy_s failed");
         free(context->keyValueList);
         context->keyValueList = NULL;
+        MediaMutexUnLock(context->deviceChangeMutex);
         return AUDIO_ERROR;
     }
     if (context->render != NULL) {
         ret = SetExtraData(context);
         if (ret != AUDIO_SUCCESS) {
             ALOGE("Set extra data failed! ret = %d", ret);
+            MediaMutexUnLock(context->deviceChangeMutex);
             return ret;
         }
     }
-
+    MediaMutexUnLock(context->deviceChangeMutex);
     return AUDIO_SUCCESS;
 }
 
@@ -962,13 +993,16 @@ int32_t GetTrackParam(uintptr_t handle, char *keyValueList, size_t len)
         ALOGE("len invalid ");
         return AUDIO_ERROR;
     }
+    MediaMutexLock(context->deviceChangeMutex);
     if (context->render != NULL) {
         int32_t ret = context->render->attr.GetExtraParams((AudioHandle)context->render, keyValueList, (int32_t)len);
         if (ret != AUDIO_SUCCESS) {
             ALOGE("get extra data failed! ret = %d", ret);
+            MediaMutexUnLock(context->deviceChangeMutex);
             return ret;
         }
     }
+    MediaMutexUnLock(context->deviceChangeMutex);
     return AUDIO_SUCCESS;
 }
 
index 7332621..28452ab 100644 (file)
@@ -1075,7 +1075,7 @@ void PlayerControl::ReportRenderPosition(void)
     CHECK_NULL_RETURN_NONE(sinkManager_, "sinkManager_ nullptr");\r
     sinkManager_->GetRenderPosition(position);\r
     if (position >= 0 && currentPosition_ != position) {\r
-        if (lastRendPos_ > 0) {\r
+        if (lastRendPos_ >= 0) {\r
             currentPosition_ = position - lastRendPos_ + firstPosAfterSeek_;\r
         } else {\r
             currentPosition_ = position;\r
index 1f237e7..a9bf045 100644 (file)
@@ -1275,6 +1275,7 @@ int32_t Player::PlayerImpl::GetParameter(Format &params)
             goto EXIT;
         }
     }
+    MediaMutexUnLock(lock_);
     return 0;
 EXIT:
     MediaMutexUnLock(lock_);
index 19ac2dc..1f44dac 100644 (file)
@@ -77,7 +77,9 @@ public:
     bool ResetPlayer();
 
     void ReleaseEventListeners();
-
+#ifdef HMF_DECRYPT_DATA_ENABLE
+    void SetDecryptLibraryPath(char *path, uint32_t len);
+#endif
     void ReleaseSrc();
 
     bool Play();
@@ -118,7 +120,7 @@ public:
 
     bool SetAutoPlay(bool autoPlay);
 
-    bool SetLoop(bool loop) const;
+    bool SetLoop(bool loop);
 
     bool SetVolume(double volume);
 
@@ -155,6 +157,8 @@ public:
     void SetOnTimeUpdateListener(AudioEventListener *onTimeUpdateListener);
 
     int32_t GetSrcInnerPrefix(const char *src, char *dest);
+
+    bool IsSysSrc();
 private:
     AudioPlayer();
     ~AudioPlayer();
@@ -176,9 +180,11 @@ private:
     bool autoPlay_;
     bool isRunning_;
     bool isSysSrc_;
+    bool isPlayList_;
+    AudioPlayerLoopMode playLoopMode_ = AudioPlayerLoopMode::AUDIO_PLAYER_INVAILD_LOOP;
     MediaThreadIdHandle updateTimeProcess_;
     AudioStreamType streamType_ = AUDIO_STREAM_MUSIC;
 };
 } // namespace ACELite
 } // namespace OHOS
-#endif // AUDIO_PLAYER_H
\ No newline at end of file
+#endif // AUDIO_PLAYER_H
index a13e2c7..b1bd861 100644 (file)
 #include "media_log.h"
 #include "js_async_work.h"
 #ifdef HMF_DECRYPT_DATA_ENABLE
-#include "js_ability.h"\r
-#include "audio_decrypt.h"\r
+#include "js_ability.h"
+#include "audio_decrypt.h"
 #endif
 namespace OHOS {
 namespace ACELite {
 constexpr char PROP_SUCCESS[] = "success";
 constexpr char PROP_COMPLETE[] = "complete";
 constexpr char DECRYPT_FILE_PATH[] = "/user/app/user/ace/data/%s/rawfile/lib/audio_decode.bin";
-constexpr uint32_t MAX_PATH_LEN = 128;
+constexpr uint32_t MAX_PATH_LEN = 256;
 constexpr char PATH_PREFIX[] = "internal://";
+constexpr char PATH_SANDBOX_KEYWORD[] = "/assets/entry/";
 
 static Audio::AudioManager& g_amInstance = Audio::AudioManager::GetInstance();
 
@@ -41,9 +42,6 @@ void AudioModule::OnTerminate()
     }
     audioPlayer->ReleaseEventListeners();
     audioPlayer->StopUpdateTimeThread();
-#ifdef HMF_DECRYPT_DATA_ENABLE
-    AUDIO_UnLoadDecryptLibrary();
-#endif
 }
 
 void AudioModule::DefineProperty(JSIValue target,
@@ -116,7 +114,7 @@ JSIValue AudioModule::GetPlayState(const JSIValue thisVal, const JSIValue *args,
         JSI::SetBooleanProperty(data, "muted", audioPlayer->IsMuted());
         JSIValue params[1] = { data };
         JSI::CallFunction(successCallback, thisVal, params, 1);
-        JSI::ReleaseValue(successCallback);
+        JSI::ReleaseValueList(successCallback, data);
     }
 
     JSIValue completeCallback = JSI::GetNamedProperty(options, PROP_COMPLETE);
@@ -133,7 +131,17 @@ JSIValue AudioModule::SrcGetter(const JSIValue thisVal, const JSIValue *args, ui
     MEDIA_UNUSED(thisVal);
     MEDIA_UNUSED(args);
     MEDIA_UNUSED(argsSize);
-    char *src = AudioPlayer::GetInstance()->GetSrc(false);
+    char *src;
+    if (!AudioPlayer::GetInstance()->IsSysSrc()) {
+        char *sysSrc = AudioPlayer::GetInstance()->GetSrc(true);
+        std::string sysPath(sysSrc);
+        int size = sysPath.find(PATH_SANDBOX_KEYWORD) + strlen(PATH_SANDBOX_KEYWORD);
+        std::string path = sysPath.substr(size);
+        path.insert(0, PATH_PREFIX);
+        src = const_cast<char *>(path.c_str());
+    } else {
+        src = AudioPlayer::GetInstance()->GetSrc(false);
+    }
     return (src == nullptr) ? JSI::CreateUndefined() : JSI::CreateString(src);
 }
 
@@ -155,7 +163,18 @@ JSIValue AudioModule::SrcSetter(const JSIValue thisVal, const JSIValue *args, ui
     }
     char *src = JSI::ValueToString(args[0]);
     bool autoPlay = AudioPlayer::GetInstance()->GetAutoPlay();
-    bool ret = AudioPlayer::GetInstance()->SetSrc(src, false);
+    bool ret = false;
+    int size = strlen(PATH_PREFIX);
+    std::string strValue(src);
+    if (strValue.find(PATH_PREFIX) == 0) {
+        std::string strNew = strValue.substr(size);
+        char *innerPath = const_cast<char *>(strNew.c_str());
+        ret = AudioPlayer::GetInstance()->SetSrc(innerPath, true);
+        delete src;
+    } else {
+        ret = AudioPlayer::GetInstance()->SetSrc(src, false);
+    }
+
     AudioPlayer::GetInstance()->SetStreamType(g_streamType);
     if (autoPlay) {
         AudioPlayer::GetInstance()->Play();
@@ -206,8 +225,8 @@ JSIValue AudioModule::SetSrcList(const JSIValue thisVal, const JSIValue *args, u
                 return JSI::CreateBoolean(false);
             }
             srcList.push_back(std::string(absPath));
-        } else {\r
-            srcList.push_back(strValue);\r
+        } else {
+            srcList.push_back(strValue);
         }
     }
     bool ret = AudioPlayer::GetInstance()->SetSrcList(srcList);
@@ -537,14 +556,14 @@ static void InitAdioPlayer()
         MEDIA_ERR_LOG("get package name fail");
         return;
     }
-    char decfilePath[256] = {0};
+    char decfilePath[MAX_PATH_LEN] = {0};
     int32_t ret = snprintf_s(decfilePath, sizeof(decfilePath), sizeof(decfilePath) - 1,
                              DECRYPT_FILE_PATH, bundleName);
     if (ret < 0) {
         MEDIA_ERR_LOG("format decrypt file path fail");
         return;
     }
-    AUDIO_LoadDecryptLibrary(decfilePath);
+    AudioPlayer::GetInstance()->SetDecryptLibraryPath(decfilePath, MAX_PATH_LEN);
 #endif
 }
 
index 04d3a22..7755d1c 100644 (file)
@@ -39,7 +39,6 @@ constexpr uint16_t MAX_VOLUME = 100;
 constexpr double DEFAULT_VOLUME = 1.0;
 constexpr double MILLISECONDS_PER_SECOND = 1000.0;
 constexpr uint32_t MICROSECONDS_PER_SECOND = 1000 * 1000;
-constexpr uint32_t MAX_PATH_LEN = 128;
 char absPath[MAX_PATH_LEN] = {0};
 
 static Audio::AudioManager &g_amInstance = Audio::AudioManager::GetInstance();
@@ -177,7 +176,7 @@ AudioPlayer::AudioPlayer()
     : onPlayListener_(nullptr), onPauseListener_(nullptr), onStopListener_(nullptr),
       onLoadedDataListener_(nullptr), onEndedListener_(nullptr), onErrorListener_(nullptr),
       onTimeUpdateListener_(nullptr), src_(nullptr), srcInner_(nullptr), status_(STATUS_STOP), volume_(DEFAULT_VOLUME),
-      autoPlay_(false), isRunning_(false), isSysSrc_(false), updateTimeProcess_(nullptr)
+      autoPlay_(false), isRunning_(false), isSysSrc_(false), isPlayList_(false), updateTimeProcess_(nullptr)
 {}
 
 AudioPlayer::~AudioPlayer()
@@ -271,6 +270,7 @@ void AudioPlayer::StopUpdateTimeThread()
 bool AudioPlayer::ResetPlayer()
 {
     ReleaseSrc();
+    isPlayList_ = false;
     if (AudioPlayerService::GetInstance()->Reset() != 0) {
         MEDIA_ERR_LOG("fail to reset audio.");
         return false;
@@ -303,11 +303,24 @@ void AudioPlayer::ReleaseSrc()
     (void)memset_s(absPath, MAX_PATH_LEN, 0, MAX_PATH_LEN);
 }
 
+#ifdef HMF_DECRYPT_DATA_ENABLE
+void AudioPlayer::SetDecryptLibraryPath(char *path, uint32_t len)
+{
+    AudioPlayerService::GetInstance()->SetDecryptLibraryPath(path, len);
+}
+#endif
+
 bool AudioPlayer::Play()
 {
     if (AudioPlayerService::GetInstance()->GetPlayStatus() ==\r
         (int32_t)AudioPlayerStates::AUDIO_PLAYER_PAUSED) {\r
-        return AudioPlayerService::GetInstance()->Resume();\r
+        if (AudioPlayerService::GetInstance()->Resume() != 0) {\r
+            MEDIA_ERR_LOG("resume failed!");\r
+            return false;\r
+        }\r
+        MediaThreadCondSignal(condition_);
+        status_ = STATUS_PLAY;
+        return true;\r
     }
     if (AudioPlayerService::GetInstance()->SetAudioStreamType(streamType_) != 0) {
         MEDIA_ERR_LOG("fail to SetAudioStreamType streamType = %x.", streamType_);
@@ -356,6 +369,7 @@ char *AudioPlayer::GetSrc(bool innerFlag) const
         if (!str.empty()) {\r
             (void)memset_s(absPath, MAX_PATH_LEN, 0, MAX_PATH_LEN);\r
             if (strcpy_s(absPath, MAX_PATH_LEN, str.c_str()) != EOK) {
+                MEDIA_ERR_LOG("strcpy_s failed");
                 return nullptr;
             }\r
             return absPath;\r
@@ -366,11 +380,20 @@ char *AudioPlayer::GetSrc(bool innerFlag) const
 
 bool AudioPlayer::SetSrcList(std::vector<std::string> srcList)
 {
+    if (src_ != nullptr ||
+        srcInner_ != nullptr) {
+        MEDIA_ERR_LOG("the src interface should not be called before setting the playlist!");
+        return false;
+    }
     int32_t ret = AudioPlayerService::GetInstance()->SetPlayListSource(srcList);
     if (ret != 0) {\r
         MEDIA_ERR_LOG("audio player set play list failed!.");
         return false;\r
     }
+    isPlayList_ = true;
+    if (playLoopMode_ != AudioPlayerLoopMode::AUDIO_PLAYER_INVAILD_LOOP) {
+        return SetLoop(true);
+    }
     return true;
 }
 
@@ -421,6 +444,9 @@ bool AudioPlayer::GetAutoPlay() const
 
 bool AudioPlayer::IsLooping() const
 {
+    if (isPlayList_) {
+        return AudioPlayerService::GetInstance()->IsPlayListLooping();
+    }
     return AudioPlayerService::GetInstance()->IsSingleLooping();
 }
 
@@ -477,6 +503,9 @@ bool AudioPlayer::SetSrc(char *src, bool innerFlag)
         MEDIA_ERR_LOG("fail to Set PlaySource.");
         return false;
     }
+    if (!isPlayList_ && playLoopMode_ != AudioPlayerLoopMode::AUDIO_PLAYER_INVAILD_LOOP) {
+        return SetLoop(true);
+    }
     return true;
 }
 
@@ -505,10 +534,17 @@ bool AudioPlayer::SetAutoPlay(bool autoPlay)
     return true;
 }
 
-bool AudioPlayer::SetLoop(bool loop) const
+bool AudioPlayer::SetLoop(bool loop)
 {
-    if (AudioPlayerService::GetInstance()->SetSingleLoop(loop) != 0) {
-        MEDIA_ERR_LOG("1 argument is required.");
+    if (isPlayList_) {\r
+        playLoopMode_ = loop ? AudioPlayerLoopMode::AUDIO_PLAYER_PLAYLIST_LOOP:
+            AudioPlayerLoopMode::AUDIO_PLAYER_INVAILD_LOOP;
+    } else {
+        playLoopMode_ = loop ? AudioPlayerLoopMode::AUDIO_PLAYER_SINGLE_LOOP:
+            AudioPlayerLoopMode::AUDIO_PLAYER_INVAILD_LOOP;
+    }\r
+    if (AudioPlayerService::GetInstance()->SetPlayLoopMode(playLoopMode_) != 0) {
+        MEDIA_ERR_LOG("set single loop failed!");
         return false;
     }
     return true;
@@ -637,5 +673,11 @@ void AudioPlayer::SetOnTimeUpdateListener(AudioEventListener *onTimeUpdateListen
     }
     onTimeUpdateListener_ = onTimeUpdateListener;
 }
+
+bool AudioPlayer::IsSysSrc()
+{
+    return isSysSrc_;
+}
+
 }  // namespace ACELite
 }  // namespace OHOS
index 39c6696..5b1e3e7 100644 (file)
@@ -86,7 +86,7 @@ if ("${CHIP}" STREQUAL "brandy")
     )
 endif()
 
-set(CCDEFINES ${CCDEFINES} "_GNU_SOURCE" "_XOPEN_SOURCE=700" "LOCAL_VOICE_CALL")
+set(CCDEFINES ${CCDEFINES} "_GNU_SOURCE" "_XOPEN_SOURCE=700" "LOCAL_VOICE_CALL" "HMF_DECRYPT_DATA_ENABLE")
 list(REMOVE_ITEM CCDEFINES VERSION_STANDARD)
 set(PRIVATE_DEFINES
     ${CCDEFINES}
index 2e24acd..a804a4f 100644 (file)
@@ -734,6 +734,7 @@ static int32_t AudioManagerA2dpInit(AudioManagerA2dpContext *a2dpContext, bool i
 
     return AUDIO_SUCCESS;
 exit:
+    (void)ConnectBluetoothA2dpDevice();
     g_amInstance.SetDeviceConnectionState(IN_BLUETOOTH_A2DP, AUDIO_DEVICE_DISCONNECTED);
     g_amInstance.DeactivateAudioInterrupt(a2dpContext->interrupt);
     return ret;
index a1988a6..c68e63b 100644 (file)
@@ -8,6 +8,11 @@
 #include "audio_player_service.h"\r
 #include "audio_manager.h"\r
 #include "media_log.h"\r
+#include "securec.h"\r
+#ifdef HMF_DECRYPT_DATA_ENABLE\r
+#include "audio_decrypt.h"\r
+#endif // HMF_DECRYPT_DATA_ENABLE\r
+\r
 \r
 namespace OHOS {\r
 static AudioManager &g_amInstance = AudioManager::GetInstance();\r
@@ -55,7 +60,7 @@ void AudioPlayerService::OnPlaybackComplete()
         MEDIA_INFO_LOG("on playback complete!");\r
     }\r
     MediaMutexLock(mutex_);\r
-    if (!isPlayListLoop_) {\r
+    if (playerLoopMode_ != AudioPlayerLoopMode::AUDIO_PLAYER_PLAYLIST_LOOP) {\r
         MediaMutexUnLock(mutex_);\r
         return;\r
     }\r
@@ -174,7 +179,7 @@ int32_t AudioPlayerService::AudioPlayInner(void)
         MEDIA_ERR_LOG("player start failed!");\r
         return ret;\r
     }\r
-    player_->EnableSingleLooping(isSingleLoop_);\r
+    player_->EnableSingleLooping(playerLoopMode_ == AudioPlayerLoopMode::AUDIO_PLAYER_SINGLE_LOOP);\r
     currentState_ = AudioPlayerStates::AUDIO_PLAYER_PLAYED;\r
     isCutSong_ = false;\r
     OnPlay();\r
@@ -185,7 +190,6 @@ int32_t AudioPlayerService::AudioPlay(void)
 {\r
     player_->SetPlayerCallback(shared_from_this());\r
     int32_t ret = 0;\r
-    MediaMutexLock(mutex_);\r
     if (currentState_ != AudioPlayerStates::AUDIO_PLAYER_PAUSED) {\r
         ret = AudioPlayInner();\r
         if (ret != 0) {\r
@@ -208,13 +212,11 @@ int32_t AudioPlayerService::AudioPlay(void)
             }\r
         }\r
     }\r
-    MediaMutexUnLock(mutex_);\r
     return MEDIA_OK;\r
 EXIT:\r
     MEDIA_ERR_LOG("play failed");\r
     (void)player_->Reset();\r
     (void)player_->Release();\r
-    MediaMutexUnLock(mutex_);\r
     return MEDIA_ERR;\r
 }\r
 \r
@@ -269,29 +271,33 @@ int32_t AudioPlayerService::RunAudioPlay(void)
         !isPlaybackStopped_ &&\r
         !interruptHintStop_) {\r
         std::map<std::string, std::string> header;\r
+        MediaMutexLock(mutex_);\r
         Source source = Source(playList_[playIndex_], header);\r
         MEDIA_INFO_LOG("current play source = %s, index = %d",\r
             source.GetSourceUri().c_str(), playIndex_);\r
         ret = player_->SetSource(source);\r
         if (ret != MEDIA_OK) {\r
             MEDIA_ERR_LOG("set source failed");\r
+            MediaMutexUnLock(mutex_);\r
             (void)DeinitPlayerResources();\r
             return MEDIA_ERR;\r
         }\r
         ret = player_->Prepare();\r
         if (ret != MEDIA_OK) {\r
             MEDIA_ERR_LOG("prepare failed");\r
+            MediaMutexUnLock(mutex_);\r
             return ReleasePlayer();\r
         }\r
         ret = SetAudioSessionIdAndStreamType();\r
         if (ret != MEDIA_OK) {\r
+            MediaMutexUnLock(mutex_);\r
             return ReleasePlayer();\r
         }\r
         ret = AudioPlay();\r
         if (ret != MEDIA_OK) {\r
+            MediaMutexUnLock(mutex_);\r
             return ReleasePlayer();\r
         }\r
-        MediaMutexLock(mutex_);\r
         AudioStopAndExit();\r
         if (!isCutSong_) {\r
             playIndex_++;\r
@@ -299,7 +305,7 @@ int32_t AudioPlayerService::RunAudioPlay(void)
                 playIndex_ = 0;\r
             }\r
         }\r
-        if (!isPlayListLoop_) {\r
+        if (playerLoopMode_ != AudioPlayerLoopMode::AUDIO_PLAYER_PLAYLIST_LOOP) {\r
             MediaMutexUnLock(mutex_);\r
             MEDIA_ERR_LOG("isPlayListLoop exit");\r
             break;\r
@@ -373,6 +379,11 @@ AudioPlayerService::AudioPlayerService() : PlayerCallback(), InterruptListener()
 AudioPlayerService::~AudioPlayerService()\r
 {\r
     Reset();\r
+    if (loadDecryptPath_ != nullptr) {\r
+        delete[] loadDecryptPath_;\r
+        loadDecryptPath_ = nullptr;\r
+        loadDecryptPathLen_ = 0;\r
+    }\r
 }\r
 \r
 std::shared_ptr<AudioPlayerService> AudioPlayerService::GetInstance()\r
@@ -404,7 +415,6 @@ int32_t AudioPlayerService::SetPlayListSource(std::vector<std::string> playlist,
     }\r
     playList_ = playlist;\r
     playIndex_ = index;\r
-    isPlayListLoop_ = true;\r
     return MEDIA_OK;\r
 }\r
 \r
@@ -436,6 +446,31 @@ int32_t AudioPlayerService::SetBackgroundMode(bool isBackground)
     return MEDIA_OK;\r
 }\r
 \r
+#ifdef HMF_DECRYPT_DATA_ENABLE\r
+void AudioPlayerService::SetDecryptLibraryPath(char *path, uint32_t len)\r
+{\r
+    if (loadDecryptPath_ == nullptr) {\r
+        loadDecryptPath_ = new char[len];\r
+        loadDecryptPathLen_ = len;\r
+    }\r
+    if (loadDecryptPathLen_ != len) {\r
+        delete[] loadDecryptPath_;\r
+        loadDecryptPath_ = new char[len];\r
+        loadDecryptPathLen_ = len;\r
+    }\r
+    if (loadDecryptPath_ == nullptr) {\r
+        MEDIA_ERR_LOG("loadDecryptPath_ new failed!");\r
+        loadDecryptPathLen_ = 0;\r
+        return;\r
+    }\r
+    if (memcpy_s(loadDecryptPath_, loadDecryptPathLen_, path, len) != EOK) {\r
+        MEDIA_ERR_LOG("memcpy_s  decrypt path failed!");\r
+        delete[] loadDecryptPath_;\r
+        loadDecryptPath_ = nullptr;\r
+    }\r
+}\r
+#endif\r
+\r
 bool AudioPlayerService::IsBackgroundMode(void)\r
 {\r
     return isBackgroundMode_;\r
@@ -482,6 +517,11 @@ int32_t AudioPlayerService::Start(void)
         MEDIA_INFO_LOG("audio play is not idle status[%d], can not start!", currentState_);\r
         return MEDIA_OK;\r
     }\r
+#ifdef HMF_DECRYPT_DATA_ENABLE\r
+    if (loadDecryptPath_ != nullptr) {\r
+        AUDIO_LoadDecryptLibrary(loadDecryptPath_);\r
+    }\r
+#endif\r
     int32_t ret = StartPrepare();\r
     if (ret != 0) {\r
         return ret;\r
@@ -559,7 +599,14 @@ int32_t AudioPlayerService::Resume(void)
 \r
 int32_t AudioPlayerService::Reset(void)\r
 {\r
-    (void)Stop();\r
+    if (currentState_ == AudioPlayerStates::AUDIO_PLAYER_IDLE) {\r
+        MEDIA_INFO_LOG("currently in IDLE state, no reset is required!");\r
+        return MEDIA_OK;\r
+    }\r
+    if (currentState_ != AudioPlayerStates::AUDIO_PLAYER_STOPED) {\r
+        (void)Stop();\r
+    }\r
+    MediaMutexLock(mutex_);\r
     playList_.clear();\r
     playIndex_ = 0;\r
     isPlaybackCompleted_ = false;\r
@@ -569,13 +616,16 @@ int32_t AudioPlayerService::Reset(void)
     interruptHintStop_ = false;\r
     isBackgroundMode_ = false;\r
     playError_ = false;\r
-    isSingleLoop_ = false;\r
+    playerLoopMode_ = AudioPlayerLoopMode::AUDIO_PLAYER_INVAILD_LOOP;\r
     isCutSong_ = false;\r
-    isPlayListLoop_ = false;\r
     currentState_ = AudioPlayerStates::AUDIO_PLAYER_IDLE;\r
     streamType_ = AUDIO_STREAM_MUSIC;\r
+    MediaMutexUnLock(mutex_);\r
     (void)MediaMutexDestroy(&mutex_);\r
     (void)MediaThreadCondDestroy(&exitCond_);\r
+#ifdef HMF_DECRYPT_DATA_ENABLE\r
+    AUDIO_UnLoadDecryptLibrary();\r
+#endif\r
     MEDIA_INFO_LOG("reset success[%d]", currentState_);\r
     return MEDIA_OK;\r
 }\r
@@ -647,7 +697,7 @@ int32_t AudioPlayerService::Stop(void)
         return MEDIA_ERR;\r
     }\r
     if (isPlaybackStopped_ || isPlaybackCompleted_ || interruptHintStop_) {\r
-        if (isSingleLoop_) {\r
+        if (playerLoopMode_ == AudioPlayerLoopMode::AUDIO_PLAYER_SINGLE_LOOP) {\r
             if (!isPlaybackCompleted_) {\r
                 MEDIA_ERR_LOG("audio play already stopped");\r
                 MediaMutexUnLock(mutex_);\r
@@ -719,28 +769,33 @@ int32_t AudioPlayerService::GetPlayStatus(void)
     return state;\r
 }\r
 \r
-int32_t AudioPlayerService::SetSingleLoop(bool isLoop)\r
+int32_t AudioPlayerService::SetPlayLoopMode(AudioPlayerLoopMode loopMode)\r
 {\r
-    isSingleLoop_ = isLoop;\r
-    if (player_ == nullptr) {\r
-        MEDIA_INFO_LOG("player_ is NULL!");\r
-        return MEDIA_OK;\r
+    if (loopMode < AudioPlayerLoopMode::AUDIO_PLAYER_PLAYLIST_LOOP ||\r
+        loopMode > AudioPlayerLoopMode::AUDIO_PLAYER_INVAILD_LOOP) {\r
+        MEDIA_INFO_LOG("invalid loop mode[%d]!", loopMode);\r
+        return MEDIA_ERR;\r
     }\r
-    return player_->EnableSingleLooping(isSingleLoop_);\r
+    playerLoopMode_ = loopMode;\r
+    if (player_ != nullptr) {\r
+        if (loopMode == AudioPlayerLoopMode::AUDIO_PLAYER_SINGLE_LOOP) {\r
+            return player_->EnableSingleLooping(true);\r
+        } else {\r
+            return player_->EnableSingleLooping(false);\r
+        }\r
+    }\r
+    return MEDIA_OK;\r
 }\r
 \r
 bool AudioPlayerService::IsSingleLooping(void)\r
 {\r
-    if (player_ == nullptr) {\r
-        MEDIA_INFO_LOG("player_ is NULL!");\r
-        return isSingleLoop_;\r
-    }\r
-    return player_->IsSingleLooping();\r
+    return playerLoopMode_ == AudioPlayerLoopMode::AUDIO_PLAYER_SINGLE_LOOP;\r
 }\r
 \r
 bool AudioPlayerService::IsPlayListLooping(void)\r
 {\r
-    return isPlayListLoop_;\r
+\r
+    return playerLoopMode_ == AudioPlayerLoopMode::AUDIO_PLAYER_PLAYLIST_LOOP;\r
 }\r
 \r
 bool AudioPlayerService::IsPlaying(void)\r
index 65e097b..33ae10a 100644 (file)
@@ -30,6 +30,12 @@ enum class AudioPlayerStates : int32_t {
     AUDIO_PLAYER_EXITED,\r
 };\r
 \r
+enum class AudioPlayerLoopMode : int32_t {\r
+    AUDIO_PLAYER_PLAYLIST_LOOP,\r
+    AUDIO_PLAYER_SINGLE_LOOP,\r
+    AUDIO_PLAYER_INVAILD_LOOP,\r
+};\r
+\r
 class AudioPlayerServiceCallback {\r
 public:\r
     AudioPlayerServiceCallback() = default;\r
@@ -51,6 +57,9 @@ public:
     int32_t SetPlaySource(std::string src);\r
     int32_t SetAudioStreamType(AudioStreamType type);\r
     int32_t SetBackgroundMode(bool isBackground);\r
+#ifdef HMF_DECRYPT_DATA_ENABLE\r
+    void SetDecryptLibraryPath(char *path, uint32_t len);\r
+#endif\r
     bool IsBackgroundMode(void);\r
     void SetAudioPlayerCallback(const std::shared_ptr<AudioPlayerServiceCallback> &cb);\r
     int32_t Start(void);\r
@@ -64,7 +73,7 @@ public:
     int32_t GetDumpInfo(PlayerDebugInfo *playerInfo);\r
     int32_t GetCurrentTime(int64_t &time);\r
     int32_t GetPlayStatus(void);\r
-    int32_t SetSingleLoop(bool isLoop);\r
+    int32_t SetPlayLoopMode(AudioPlayerLoopMode loopMode);\r
     bool IsSingleLooping(void);\r
     bool IsPlayListLooping(void);\r
     bool IsPlaying(void);\r
@@ -99,6 +108,10 @@ private:
     int32_t StartPrepare(void);\r
     void ResetAudioPlayState(void);\r
     static void *AudioPlayThread(void *arg);\r
+#ifdef HMF_DECRYPT_DATA_ENABLE\r
+    char *loadDecryptPath_= nullptr;\r
+    uint32_t loadDecryptPathLen_ = 0;\r
+#endif\r
     AudioPlayerStates currentState_ = AudioPlayerStates::AUDIO_PLAYER_IDLE;\r
     AudioSession sessionId_ = AUDIO_SESSION_ID_NONE;\r
     bool isPlaybackCompleted_ = false;\r
@@ -108,8 +121,8 @@ private:
     bool interruptHintStop_ = false;\r
     bool isBackgroundMode_ = false;\r
     bool playError_ = false;\r
-    bool isSingleLoop_ = false;\r
     bool isCutSong_ = false;\r
+    AudioPlayerLoopMode playerLoopMode_ = AudioPlayerLoopMode::AUDIO_PLAYER_INVAILD_LOOP;\r
     shared_ptr<Player> player_ = nullptr;\r
     MediaMutexHandle mutex_ = nullptr;\r
     MediaThreadCondHandle cond_ = nullptr;\r
@@ -118,7 +131,6 @@ private:
     int32_t playIndex_ = 0;\r
     std::vector<std::string> playList_;\r
     AudioStreamType streamType_ = AUDIO_STREAM_MUSIC;\r
-    bool isPlayListLoop_ = false;\r
     static std::shared_ptr<AudioPlayerService> instance_;\r
     shared_ptr<AudioPlayerServiceCallback> callBack_ = nullptr;\r
 };\r
index ec387ae..889cd44 100644 (file)
@@ -174,7 +174,11 @@ static int32_t SetSingleLoop(int32_t argc, const char **param)
     if (enableValue != 0) {\r
         isLoop = true;\r
     }
-    return AudioPlayerService::GetInstance()->SetSingleLoop(isLoop);
+    AudioPlayerLoopMode loopMode = AudioPlayerLoopMode::AUDIO_PLAYER_INVAILD_LOOP;
+    if (isLoop) {\r
+        loopMode == AudioPlayerLoopMode::AUDIO_PLAYER_SINGLE_LOOP;\r
+    }
+    return AudioPlayerService::GetInstance()->SetPlayLoopMode(loopMode);
 }
 
 static int32_t GetCurrentPlaySource(int32_t argc, const char **param)
index ab04077..4687d8c 100644 (file)
@@ -2864,11 +2864,9 @@ int32_t AudioBluetoothSubPortCreateTrack(AudioHandle portHandle, const struct Po
         goto FREE_TRACK_CTX;
     }
 
-    ret = SubPortTrackInit(portCtx, inputAttr, portPin, portTrackCtx);
-    if (ret != MEDIA_HAL_OK) {
+    if (SubPortTrackInit(portCtx, inputAttr, portPin, portTrackCtx) != MEDIA_HAL_OK) {
         goto FREE_TRACK_CTX;
     }
-
     /* sound + aenc + adp for BLUETOOTH_A2DP_NORMAL workScene */
     ret = EstablishTranscodeBackendPipeline(portCtx, portTrackCtx, trackId);
     if (ret != MEDIA_HAL_OK) {
@@ -2884,8 +2882,9 @@ int32_t AudioBluetoothSubPortCreateTrack(AudioHandle portHandle, const struct Po
     portTrackCtx->trackId = trackId;
     portCtx->portTrack[trackId] = portTrackCtx;
     *trackHandle = &portTrackCtx->common;
-    /* A2dp sink 不占用蓝牙资源和aenc,所以这里默认就是暂停的状态 */
-    if (portTrackCtx->workScene == BLUETOOTH_IN_A2DP_NORMAL) {\r
+    /* A2dp sink 和 sco 不占用蓝牙资源和aenc,所以这里默认就是暂停的状态 */
+    if (portTrackCtx->workScene == BLUETOOTH_IN_A2DP_NORMAL ||\r
+        portTrackCtx->workScene == BLUETOOTH_SCO) {
         SetPause(trackId, true);\r
     }
     MediaHalMutexUnLock(portCtx->a2dpTrackMutex);
@@ -2934,7 +2933,6 @@ int32_t AudioBluetoothSubPortDestroyTrack(AudioHandle portHandle, AudioHandle tr
     }
     /* sound + aenc + adp for BLUETOOTH_A2DP_NORMAL workScene */
     ret = AbrogationTranscodeBackendPipeline(portCtx, portTrackCtx);
-    MediaHalMutexUnLock(portCtx->a2dpTrackMutex);
     CHK_FAILED_NO_RETURN(ret, MEDIA_HAL_OK, "AbrogationTranscodeBackendPipeline failed");
 
     MEDIA_HAL_LOGD(MODULE_NAME, "success trackId (%d)", portTrackCtx->trackId);
@@ -2946,6 +2944,7 @@ int32_t AudioBluetoothSubPortDestroyTrack(AudioHandle portHandle, AudioHandle tr
     }
 
     portCtx->portTrack[portTrackCtx->trackId] = NULL;
+    MediaHalMutexUnLock(portCtx->a2dpTrackMutex);
     free(portTrackCtx);
     return MEDIA_HAL_OK;
 }
index 9393f64..06e4aa7 100644 (file)
@@ -496,7 +496,16 @@ int32_t AudioSDKAencOpen(td_handle *aencHandle, uapi_aenc_attr aencAttr)
         MEDIA_HAL_LOGE(MODULE_NAME, "uapi_aenc_set_attr failed: 0x%x, codec id: 0x%x", ret, aencAttr.codec_id);
         goto CLOSE;
     }
-
+#ifndef MELODY_AUDIO_SUPPORT\r
+    if (aencAttr.codec_id == UAPI_ACODEC_ID_OPUS) {\r
+        uint32_t bitRate = OPUS_ENC_BIT_RATE;\r
+        ret = uapi_aenc_set_param(*aencHandle, UAPI_AENC_PARAM_BIT_RATE, &bitRate, sizeof(uint32_t));\r
+        if (ret != MEDIA_HAL_OK) {\r
+            MEDIA_HAL_LOGE(MODULE_NAME, "uapi set aenc send cmd bit Rate faild, ret: 0x%x", ret);\r
+            goto CLOSE;\r
+        }\r
+    }\r
+#endif
     MEDIA_HAL_LOGD(MODULE_NAME, "success");
     return MEDIA_HAL_OK;
 
index af11daa..092cc9b 100644 (file)
@@ -41,8 +41,6 @@ extern "C" {
 #define MODEM_DOWNLINK_SOUND_PORT_NUM 1
 
 #define MODEM_HEADSET_DOWNLINK_SOUND_PORT_NUM 1
-#define MODEM_HEADSET_DOWNLINK_SOUND_SAMPLE_RATE 16000
-#define MODEM_HEADSET_DOWNLINK_SOUND_CHANNELS 1
 
 #define MODEM_PORT_TRACK_NUM 2
 #define SEA_ENABLE   "seaenable"
@@ -474,13 +472,13 @@ static int32_t AIDevClose(const SubPortTrackContext *portTrackCtx)
     return MEDIA_HAL_OK;
 }
 
-static void GetHeadsetDownlinkAOAttr(uapi_snd_attr *sndAttr)
+static void GetHeadsetDownlinkAOAttr(uapi_snd_attr *sndAttr, SubPortTrackContext *portTrackCtx)
 {
     sndAttr->port_num = MODEM_HEADSET_DOWNLINK_SOUND_PORT_NUM;
     sndAttr->port_attr[0].out_port = UAPI_SND_OUT_PORT_CAST0;
     sndAttr->bit_depth = UAPI_AUDIO_BIT_DEPTH_16;
-    sndAttr->sample_rate = MODEM_HEADSET_DOWNLINK_SOUND_SAMPLE_RATE;
-    sndAttr->channels = MODEM_HEADSET_DOWNLINK_SOUND_CHANNELS;
+    sndAttr->sample_rate = portTrackCtx->inputAttr.sampleRate;
+    sndAttr->channels = portTrackCtx->inputAttr.channelCount;
 }
 
 static int32_t AODevOpen(SubPortTrackContext *portTrackCtx)
@@ -505,7 +503,7 @@ static int32_t AODevOpen(SubPortTrackContext *portTrackCtx)
         MEDIA_HAL_DOFUNC_TIME(ret = uapi_snd_open(&portTrackCtx->uplinkSoundHandle, sndId, &sndAttr));
     } else {
         if (portTrackCtx->workScene == MODEM_HEADSET_DOWNLINK) {
-            GetHeadsetDownlinkAOAttr(&sndAttr);
+            GetHeadsetDownlinkAOAttr(&sndAttr, portTrackCtx);
         } else {
             GetBuiltinAOAttr(&sndAttr);
         }
index b76418d..46071d4 100644 (file)
@@ -45,6 +45,7 @@ extern "C" {
 #define SET_SEA_PARAM "setseaparam"
 #define SET_BIT_RATE  "setbitrate"
 #define SEA_PARAM_LEN 256
+#define MP3_ENC_BIT_RATE_PRECISION 1000
 
 static enum AudioFormat g_supportFormats[] = {
     AUDIO_FORMAT_PCM_16_BIT,
@@ -94,10 +95,13 @@ static SubPortTrackInCapabilities g_caps[] = {
     { AUDIO_IN_MEDIA, AUDIO_FORMAT_MP3, 16000, 1 },
     { AUDIO_IN_MEDIA, AUDIO_FORMAT_SBC, 16000, 1 },
     { AUDIO_IN_MEDIA, AUDIO_FORMAT_PCM_16_BIT, 16000, 1 },
+    { AUDIO_IN_MEDIA, AUDIO_FORMAT_OPUS, 16000, 1 },
     { AUDIO_IN_COMMUNICATION, AUDIO_FORMAT_mSBC, 16000, 1 },
     { AUDIO_IN_COMMUNICATION, AUDIO_FORMAT_AMR_WB, 16000, 1 },
     { AUDIO_IN_COMMUNICATION, AUDIO_FORMAT_PCM_16_BIT, 8000, 1},
-    { AUDIO_IN_COMMUNICATION, AUDIO_FORMAT_PCM_16_BIT, 16000, 1}
+    { AUDIO_IN_COMMUNICATION, AUDIO_FORMAT_PCM_16_BIT, 16000, 1},
+    { AUDIO_IN_COMMUNICATION, AUDIO_FORMAT_OPUS, 16000, 1 },\r
+    { AUDIO_IN_COMMUNICATION, AUDIO_FORMAT_MP3, 16000, 1 },
 };
 
 static bool IsSupported(const struct PortPluginAttr *inputAttr)
@@ -250,9 +254,14 @@ static int32_t AudioSDKOpenInternal(SubPortTrackInContext *portTrackInCtx)
     aencAttr.param.bit_depth = inputAttrTemp.bitWidth;
     aencAttr.param.sample_rate = inputAttrTemp.sampleRate;
     aencAttr.param.samples_per_frame = ((uint32_t)inputAttrTemp.sampleRate) / SAMPLERATE_TO_PTNUMPERFRM;
-    aencAttr.param.private_data = NULL;
-    aencAttr.param.private_data_size = 0;
-
+    uint32_t bitRate = MP3_ENC_BIT_RATE / MP3_ENC_BIT_RATE_PRECISION;
+    if (aencCodecId == UAPI_ACODEC_ID_MP3) {
+        aencAttr.param.private_data = &bitRate;
+        aencAttr.param.private_data_size = sizeof(bitRate);
+    } else {\r
+        aencAttr.param.private_data = NULL;
+        aencAttr.param.private_data_size = 0;\r
+    }
     ret = AudioSDKAencOpen(&portTrackInCtx->aencHandle, aencAttr);
     if (ret != MEDIA_HAL_OK) {
         MEDIA_HAL_LOGE(MODULE_NAME, "aenc open failed");
index 718a5ed..1955e95 100644 (file)
@@ -52,7 +52,6 @@ int32_t DeInitDecrypt(void *context)
     bufContext->decryptSize = 0;
     bufContext->pos = -1;
     bufContext->isNeedDecryptData = false;
-    AUDIO_UnLoadDecryptLibrary();
     return MEDIA_HAL_OK;
 }
 
index 18c3399..b480bdb 100644 (file)
@@ -72,45 +72,6 @@ STATIC errcode_t diag_dpu_dfx_read(uint16_t cmd_id, diag_option_t *option, void
     return ret;
 }
 
-STATIC errcode_t diag_gmmu_dfx_read(uint16_t cmd_id, diag_option_t *option, void *cmd_param)
-{
-    errcode_t ret = ERRCODE_SUCC;
-    if (cmd_param == NULL) {
-        printf(" invalid gmmu_proc cmd: should input 2 params\n");
-        return ERRCODE_FAIL;
-    }
-    char *gmmu_param[GMMU_PARAM_CNT] = { NULL };
-    const td_u8 str_len = 5;
-    for (td_u32 i = 0; i < GMMU_PARAM_CNT; i++) {
-        gmmu_param[i] = (char *)dfx_malloc(0, str_len);
-        if (gmmu_param[i] == NULL) {
-            if (i == 1) {
-                dfx_free(0, gmmu_param[0]);
-            }
-            return ERRCODE_MALLOC;
-        }
-    }
-
-    gpu_gmmu_proc_info_t *gmmu_proc_param = (gpu_gmmu_proc_info_t *)cmd_param;
-    if (sprintf_s(gmmu_param[0], str_len, "%u\n", gmmu_proc_param->proc_en) == -1) {
-        dfx_free(0, gmmu_param[0]);
-        return ERRCODE_FAIL;
-    }
-    if (sprintf_s(gmmu_param[1], str_len, "%u\n", gmmu_proc_param->lut_en) == -1) {
-        dfx_free(0, gmmu_param[0]);
-        dfx_free(0, gmmu_param[1]);
-        return ERRCODE_FAIL;
-    }
-#ifdef SUPPORT_GPU_GMMU
-    ret = (errcode_t)gmmu_dfx_print_proc_info(GMMU_PARAM_CNT, (const td_char **)gmmu_param);
-#endif
-    uapi_diag_report_packet(cmd_id, option, (uint8_t *)("gmmu_proc_read_succ\r\n"),
-                            (uint16_t)strlen("gmmu_proc_read_succ\r\n") + 1, true);
-    dfx_free(0, gmmu_param[0]);
-    dfx_free(0, gmmu_param[1]);
-    return ret;
-}
-
 STATIC errcode_t gpu_proc_read(uint16_t cmd_id, void *cmd_param, uint16_t cmd_param_size, diag_option_t *option)
 {
     unused(cmd_param_size);
@@ -124,8 +85,6 @@ STATIC errcode_t gpu_proc_read(uint16_t cmd_id, void *cmd_param, uint16_t cmd_pa
         case DIAG_CMD_GPU_DPU_PROC:
         case DIAG_CMD_GPU_DPU_PRINT:
             return diag_dpu_dfx_read(cmd_id, option, cmd_param);
-        case DIAG_CMD_GPU_GMMU_PROC:
-            return diag_gmmu_dfx_read(cmd_id, option, cmd_param);
         default:
             printf("gpu_proc_read:invalid cmd id:%#x.\r\n",  cmd_id);
             ret = ERRCODE_FAIL;
index b9c9f0f..4f71ebc 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 efa2705..dbeea41 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 a2d524c..d4d36d3 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 cf442a3..5f84674 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 a2d524c..d4d36d3 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
index a2d524c..d4d36d3 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-xts-r/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-xts-r/libx_vfs_private.a differ
index cf442a3..5f84674 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-xts/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-xts/libx_vfs_private.a differ
index cf442a3..5f84674 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 21bd179..53ac754 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 7525467..0e2d1ef 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 f5b4aad..6951132 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 1586052..ade8e66 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 5ccbc31..2c25d4a 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 e9d3ca1..a8eda51 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 e48f4db..1e71bec 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 d161cf1..59e8e59 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 9319cc5..9aee13f 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 b7636e9..2469af9 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 62f8d09..23a8abb 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 4a79d59..07d8ad0 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 a6e2bbc..dfbf369 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 6f9afa3..7a5f00f 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 4abee5a..d5edc8c 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 6f9afa3..7a5f00f 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
index 6f9afa3..7a5f00f 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-xts-r/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-xts-r/libfs_yaffs2.a differ
index 4abee5a..d5edc8c 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-xts/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-xts/libfs_yaffs2.a differ
index 4abee5a..d5edc8c 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 de17759..c4d553a 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 09c7564..c2b76c4 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 cbb018c..005f8ea 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 bfd78d7..ad03209 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 5a633b7..db1bc69 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 8a952b2..f9c30b3 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 8720f3e..f293709 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 170acd2..918e2f7 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 bf2fba7..f7a618b 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 47c7734..027f4e2 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 3e4650d..e8670d9 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 51864b5..effd2b9 100644 (file)
@@ -2300,6 +2300,8 @@ mmc_go_discovery(struct mmc_softc *sc)
                sc->squelched++; /* Errors are expected, squelch reporting. */
                mmcbr_set_mode(dev, mode_sd);
                mmc_power_up(sc);
+               /* delay 100ms, sometimes sdio probe fail for detect as SD, maybe slave power supply not stable */
+               mmc_ms_delay(100);
                mmcbr_set_bus_mode(dev, pushpull);
 #ifdef DPALCFG_DRIVERS_MMC_DBG
                if (bootverbose || mmc_debug)
@@ -2354,6 +2356,7 @@ mmc_go_discovery(struct mmc_softc *sc)
                                        device_printf(sc->dev,
                                            "MMC probe: OK (OCR: 0x%08x)\n", ocr);
 #endif
+                               dprintf("MMC probe: OK (OCR: 0x%08x)\n", ocr);
                        }
                } else {
 #ifdef DPALCFG_DRIVERS_MMC_DBG
@@ -2361,6 +2364,7 @@ mmc_go_discovery(struct mmc_softc *sc)
                                device_printf(sc->dev, "SD probe: OK (OCR: 0x%08x)\n",
                                    ocr);
 #endif
+                       dprintf("SD probe: OK (OCR: 0x%08x)\n", ocr);
                        if ((ocr & MMC_OCR_LOW_VOLTAGE) && !(host_ocr & MMC_OCR_LOW_VOLTAGE)) {
                                dev_logi(dev, "sd card supports 1.8v, but host can't do.\n");
                                ocr &= ~MMC_OCR_LOW_VOLTAGE;
@@ -2474,6 +2478,7 @@ again:
        return;
 
 err_out:
+       dprintf("No compatible cards found on bus\n");
        dev_logt(sc->dev, "No compatible cards found on bus\n");
        if (sc->recovery == false) {
                err = mmc_delete_cards(sc, false);
@@ -3063,8 +3068,13 @@ sdio_reset_comm(const struct sdio_func *func)
        sc = device_get_softc(device_get_parent(func->sc->dev));
        if (sc == NULL || sc->dev == NULL)
                return (-EIO);
+
+       power_cycle(sc);
+       host_hw_init(device_get_ivars(sc->dev));
+       sc->last_rca = 0;
+       sc->card_init_status = MMC_CARD_UNINIT; // 需要, 否则中间过程时钟会被关掉
+
        mmc_idle_cards(sc);
-       mmcbr_set_clock(sc->dev, mmcbr_get_f_min(sc->dev));
 
        ret = sdio_io_send_op_cond(sc, 0, &ocr);
        if (ret)
@@ -3083,18 +3093,7 @@ sdio_reset_comm(const struct sdio_func *func)
        if (ret)
                goto err;
 
-       ret = sdio_switch_hispeed(sc, SD_SWITCH_HS_MODE);
-       if (ret)
-               goto err;
-
-       mmcbr_set_timing(sc->dev, (int)bus_timing_sd_hs);
-       mmcbr_set_clock(sc->dev, mmcbr_get_f_max(sc->dev));
-       ret = sdio_set_card_bus_width(sc, bus_width_4);
-       if (ret)
-               goto err;
-
-       mmcbr_set_bus_width(sc->dev, (int)bus_width_4);
-       mmcbr_update_ios(sc->dev);
+       mmc_calculate_clock(sc);
        return (0);
 
 err:
index 3eb9463..fab3fe0 100644 (file)
@@ -90,7 +90,6 @@ mmc_wait_for_cmd(device_t busdev, device_t dev, struct mmc_command *cmd,
                            cmd->opcode, err);
                }
        }
-
        return (err);
 }
 
index f977a21..9fc1ce0 100644 (file)
 
 #define        SDHCI_INT_STATUS        0x30
 #define        SDHCI_INT_ENABLE        0x34
+#define SDHCI_ERR_INT_STAT_EN 0x36
 #define        SDHCI_SIGNAL_ENABLE     0x38
+#define SDHCI_ERR_INT_SIGNAL_EN 0x3A
 #define         SDHCI_INT_RESPONSE     0x00000001
 #define         SDHCI_INT_DATA_END     0x00000002
 #define         SDHCI_INT_BLOCK_GAP    0x00000004
index aa58986..e64f1bc 100644 (file)
@@ -388,12 +388,9 @@ hi_sdhci_attach(struct dpal_platform_device *pdev)
        struct hci_softc *sc;
        struct sdhci_slot *slot;
        dpal_resource_t *res;
-#ifdef CFG_SDIO_EMMC_COEXIST
-       static bool emmc_initialized = false;
-       static bool sdio_initialized = false;
-#else
-       static bool mmc_initialized = false;
-#endif
+       static bool mmc0_initialized = false;
+       static bool mmc1_initialized = false;
+
        sc = dpal_zalloc(sizeof(struct hci_softc));
        if (sc == NULL)
                return (-ENOMEM);
@@ -482,33 +479,22 @@ hi_sdhci_attach(struct dpal_platform_device *pdev)
        err = set_mmc_resource(sc, slot->num);
        if (err != 0)
                goto clear_mmc_proc;
-#ifdef CFG_SDIO_EMMC_COEXIST
-    if (slot->num == 0 && !emmc_initialized) {
-        emmc_initialized = true;
-        err = sdhci_thread_create((dpal_tsk_entry_func)sdhci_task,
-            "cdsw_emmc_task", (uint32_t *)&slot->cd_tsk_id);
+
+    if (slot->num == 0 && !mmc0_initialized) {
+               mmc0_initialized = true;
+        err = sdhci_thread_create((dpal_tsk_entry_func)sdhci_task, "cdsw_mmc0_task", (uint32_t *)&slot->cd_tsk_id);
         if (err) {
             goto clear_mem_resource;
         }
     }
-    if (slot->num == 1 && !sdio_initialized) {
-        sdio_initialized = true;
-        err = sdhci_thread_create((dpal_tsk_entry_func)sdhci_task,
-            "cdsw_sdio_task", (uint32_t *)&slot->cd_tsk_id);
+    if (slot->num == 1 && !mmc1_initialized) {
+               mmc1_initialized = true;
+        err = sdhci_thread_create((dpal_tsk_entry_func)sdhci_task, "cdsw_mmc1_task", (uint32_t *)&slot->cd_tsk_id);
         if (err) {
             goto clear_mem_resource;
         }
     }
-#else
-    if (!mmc_initialized) {
-               mmc_initialized = true;
-               err = sdhci_thread_create((dpal_tsk_entry_func)sdhci_task,
-                   "cdsw_task", (uint32_t *)&slot->cd_tsk_id);
-               if (err) {
-                       goto clear_mem_resource;
-               }
-       }
-#endif
+
     return (0);
 
 clear_mem_resource:
index 1e3a344..e0fd708 100644 (file)
@@ -43,8 +43,9 @@
 #define        SDHCI_ASSERT_LOCKED(_slot)      mtx_assert((_slot)->mtx, MA_OWNED); //used in sdhci_exec_tuning()
 #define        SDHCI_ASSERT_UNLOCKED(_slot)    mtx_assert((_slot)->mtx, MA_NOTOWNED); //not used
 
+#define SDHCI_MBIU_CTRL             0x510
 #define SDHCI_EMMC_HW_RESET                    0x534
-#define SDHCI_AUTO_TUNING_CTRL                 0x540
+#define SDHCI_AUTO_TUNING_CTRL         0x540
 #define SDHCI_SW_TUNING_EN                     0x00000010
 #define SDHCI_AUTO_TUNING_STATUS               0x544
 
index b3dc9ca..04dded1 100644 (file)
@@ -480,7 +480,7 @@ typedef struct {
      * {@link VGResult} otherwise.
      * @since 3.0
      */
-    VGUResult (*RenderBlur)(VGUSurface *target, uint16_t blur);
+    VGUResult (*RenderBlur)(VGUSurface *target, float blur);
 
     /* *
      * @brief Blits one or multiple images to target surface.
index d010527..9b98211 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 7519835..c61d30c 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 8398f08..ce7a53d 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 8398f08..ce7a53d 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-xts/libams.a and b/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-xts/libams.a differ
index 8398f08..ce7a53d 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 764abd7..cc6ff5d 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 80d1174..0c14783 100644 (file)
@@ -227,6 +227,7 @@ set(PRIVATE_HEADER
     ${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/foundation/ace/ace_engine_lite/modules/keyinput
+    ${ROOT_DIR}/open_source/openharmony/foundation/ace/ace_engine_lite/modules/network
     ${ROOT_DIR}/open_source/openharmony/base/sensors/location/interfaces/kits/include
     ${ROOT_DIR}/open_source/openharmony/base/sensors/interfaces/kits/native/include
 )
@@ -266,7 +267,7 @@ set(SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/components/baidu_map_component.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/modules/app_module.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/modules/device_module.cpp
-    ${CMAKE_CURRENT_SOURCE_DIR}/modules/network_module.cpp
+    ${CMAKE_CURRENT_SOURCE_DIR}/modules/network/network_module.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/modules/nfc_module.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/modules/vibrator_module.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/modules/battery_module.cpp
index 546db48..b7ee418 100644 (file)
@@ -125,6 +125,7 @@ constexpr char ATTR_HEIGHT[] = "height"; // tab-bar | image-animator
 constexpr char ATTR_LEFT[] = "left";     // image-animator
 constexpr char ATTR_TOP[] = "top";       // image-animator
 constexpr char ATTR_TYPE[] = "type";
+constexpr char ATTR_LOOP[] = "loop";
 constexpr char COMMON_STYLE_BACKGROUND_COLOR[] = "backgroundColor";
 constexpr char ARG_WATCH_EL[] = "el";
 constexpr char ARG_WATCH_ATTR[] = "attr";
index 56e3276..b9e8339 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 c39cd16..7f42d31 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 a56a99c..634ec02 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 a56a99c..634ec02 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libace.a and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libace.a differ
index a56a99c..634ec02 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 b9fda95..4c139f2 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 6d9a3ad..86fd689 100644 (file)
@@ -963,7 +963,13 @@ jerry_value_t CanvasComponent::Rotate(const jerry_value_t func,
     }
 
     float angle = FloatOf(args[ArgsIndex::IDX_0]);
-    component->paint_.Rotate(angle);
+    if (argsNum < ArgsCount::NUM_3) {
+        component->paint_.Rotate(angle);
+    } else {
+        int16_t x =  IntegerOf(args[ArgsIndex::IDX_1]);
+        int16_t y =  IntegerOf(args[ArgsIndex::IDX_2]);
+        component->paint_.Rotate(angle, x, y);
+    }
     return UNDEFINED;
 }
 
index fc8c726..fedbd8c 100644 (file)
@@ -80,6 +80,7 @@ Component::Component(jerry_value_t options, jerry_value_t children, AppStyleMana
       onTouchMoveListener_(nullptr),
       onTouchCancelListener_(nullptr),
       onTouchEndListener_(nullptr),
+      onTouchListener_(nullptr),
       keyBoardEventListener_(nullptr),
 #endif
       onRotateListener_(nullptr),
@@ -1123,6 +1124,15 @@ void Component::SetClickEventListener(UIView &view, const jerry_value_t eventFun
     view.SetTouchable(true);
 }
 
+void Component::SetViewOnTouchListener(UIView &view)
+{
+    if (view.GetTouchListener() != nullptr) {
+        onTouchListener_ = dynamic_cast<ViewOnTouchListener*>(view.GetTouchListener());
+    } else {
+        onTouchListener_ = new ViewOnTouchListener();
+    }
+}
+
 #ifdef JS_TOUCH_EVENT_SUPPORT
 void Component::SetTouchStartEventListener(UIView &view, jerry_value_t eventFunc, uint16_t eventTypeId)
 {
@@ -1132,7 +1142,9 @@ void Component::SetTouchStartEventListener(UIView &view, jerry_value_t eventFunc
         return;
     }
 
-    view.SetOnTouchListener(onTouchStartListener_);
+    SetViewOnTouchListener(view);
+    onTouchListener_->SetOnTouchStartListener(onTouchStartListener_);
+    view.SetOnTouchListener(onTouchListener_);
     view.SetTouchable(true);
 }
 
@@ -1143,8 +1155,9 @@ void Component::SetTouchMoveEventListener(UIView &view, jerry_value_t eventFunc,
         HILOG_ERROR(HILOG_MODULE_ACE, "touch start event listener create failed");
         return;
     }
-
-    view.SetOnDragListener(onTouchMoveListener_);
+    SetViewOnTouchListener(view);
+    onTouchListener_->SetOnTouchMoveListener(onTouchMoveListener_);
+    view.SetOnDragListener(onTouchListener_);
     view.SetTouchable(true);
     view.SetDraggable(true);
 }
@@ -1157,7 +1170,9 @@ void Component::SetTouchCancelEventListener(UIView &view, jerry_value_t eventFun
         return;
     }
 
-    view.SetOnTouchListener(onTouchCancelListener_);
+    SetViewOnTouchListener(view);
+    onTouchListener_->SetOnTouchCancelListener(onTouchCancelListener_);
+    view.SetOnTouchListener(onTouchListener_);
     view.SetTouchable(true);
     view.SetDraggable(true);
 }
@@ -1170,7 +1185,9 @@ void Component::SetTouchEndEventListener(UIView &view, jerry_value_t eventFunc,
         return;
     }
 
-    view.SetOnTouchListener(onTouchEndListener_);
+    SetViewOnTouchListener(view);
+    onTouchListener_->SetOnTouchEndListener(onTouchEndListener_);
+    view.SetOnTouchListener(onTouchListener_);
     view.SetTouchable(true);
 }
 
@@ -1331,6 +1348,7 @@ void Component::ReleaseCommonEventListeners()
     ACE_DELETE(onTouchCancelListener_);
     ACE_DELETE(onTouchMoveListener_);
     ACE_DELETE(onTouchEndListener_);
+    ACE_DELETE(onTouchListener_);
 #endif
     ACE_DELETE(onSwipeListener_);
     ACE_DELETE(onRotateListener_);
@@ -2021,5 +2039,87 @@ UIView *Component::GetScrollView(const JSValue dom, const jerry_length_t size)
     return uiview;
 }
 
+Component::ViewOnTouchListener::ViewOnTouchListener()
+    : onTouchStartListener_(nullptr),
+      onTouchCancelListener_(nullptr),
+      onTouchEndListener_(nullptr),
+      onTouchMoveListener_(nullptr)
+{
+}
+
+Component::ViewOnTouchListener::~ViewOnTouchListener()
+{
+    ACE_DELETE(onTouchStartListener_);
+    ACE_DELETE(onTouchCancelListener_);
+    ACE_DELETE(onTouchEndListener_);
+    ACE_DELETE(onTouchMoveListener_);
+}
+
+void Component::ViewOnTouchListener::SetOnTouchStartListener(ViewOnTouchStartListener *startListener)
+{
+    onTouchStartListener_ = startListener;
+}
+
+void Component::ViewOnTouchListener::SetOnTouchEndListener(ViewOnTouchEndListener *endListener)
+{
+    onTouchEndListener_ = endListener;
+}
+
+void Component::ViewOnTouchListener::SetOnTouchCancelListener(ViewOnTouchCancelListener *cancelListener)
+{
+    onTouchCancelListener_ = cancelListener;
+}
+
+void Component::ViewOnTouchListener::SetOnTouchMoveListener(ViewOnTouchMoveListener *moveListener)
+{
+    onTouchMoveListener_ = moveListener;
+}
+
+bool Component::ViewOnTouchListener::OnPress(UIView &view, const PressEvent &event)
+{
+    bool ret = false;
+    if (onTouchStartListener_ != nullptr) {
+        ret = onTouchStartListener_->OnPress(view, event);
+    }
+    return ret;
+}
+
+bool Component::ViewOnTouchListener::OnRelease(UIView &view, const ReleaseEvent &event)
+{
+    bool ret = false;
+    if (onTouchEndListener_ != nullptr) {
+        ret = onTouchEndListener_->OnRelease(view, event);
+    }
+    return ret;
+}
+
+bool Component::ViewOnTouchListener::OnCancel(UIView &view, const CancelEvent &event)
+{
+    bool ret = false;
+    if (onTouchCancelListener_ != nullptr) {
+        ret = onTouchCancelListener_->OnCancel(view, event);
+    }
+    return ret;
+};
+
+bool Component::ViewOnTouchListener::OnDrag(UIView &view, const DragEvent &event)
+{
+    bool ret = false;
+    if (onTouchMoveListener_ != nullptr) {
+        ret = onTouchMoveListener_->OnDrag(view, event);
+    }
+    return ret;
+}
+
+bool Component::ViewOnTouchListener::OnDragEnd(UIView &view, const DragEvent &event)
+{
+    bool ret = false;
+    if (onTouchEndListener_ != nullptr) {
+        ReleaseEvent evtRelease(event.GetLastPoint());
+        ret = onTouchEndListener_->OnRelease(view, evtRelease);
+    }
+    return ret;
+}
+
 } // namespace ACELite
 } // namespace OHOS
index eeb469e..18407fe 100644 (file)
@@ -492,6 +492,31 @@ protected:
     static UIView *GetScrollView(const JSValue dom, const jerry_length_t size);
 
 private:
+    class ViewOnTouchListener final : public UIView::OnTouchListener,public UIView::OnDragListener
+    {
+    public:
+        ViewOnTouchListener();
+        ~ViewOnTouchListener();
+
+        bool OnPress(UIView &view, const PressEvent &event) override;
+        bool OnRelease(UIView &view, const ReleaseEvent &event) override;
+        bool OnCancel(UIView &view, const CancelEvent &event) override;
+        bool OnDrag(UIView &view, const DragEvent &event) override;
+        bool OnDragEnd(UIView& view, const DragEvent& event) override;
+        void SetOnTouchStartListener(ViewOnTouchStartListener *startListener);
+        void SetOnTouchEndListener(ViewOnTouchEndListener *endListener);
+        void SetOnTouchCancelListener(ViewOnTouchCancelListener *cancelListener);
+        void SetOnTouchMoveListener(ViewOnTouchMoveListener *moveListener);
+
+    private:
+        ViewOnTouchStartListener *onTouchStartListener_;
+        ViewOnTouchCancelListener *onTouchCancelListener_;
+        ViewOnTouchEndListener *onTouchEndListener_;
+        ViewOnTouchMoveListener *onTouchMoveListener_;
+    };
+
+    void SetViewOnTouchListener(UIView &view);
+
     /**
      * @brief Used to set animation keyframes, such as transform, background-color, height etc.
      * it is set as attribute, and support binding to data, so it can be changed dynamically.
@@ -633,6 +658,7 @@ private:
     ViewOnTouchMoveListener *onTouchMoveListener_;
     ViewOnTouchCancelListener *onTouchCancelListener_;
     ViewOnTouchEndListener *onTouchEndListener_;
+    ViewOnTouchListener *onTouchListener_;
     KeyBoardEventListener *keyBoardEventListener_;
 #endif
     KeyInputEventListener *onKeyInputListener_;
index 6e78560..ae9237f 100644 (file)
@@ -101,6 +101,7 @@ PickerViewComponent::PickerViewComponent(jerry_value_t options, jerry_value_t ch
       selectedFontSize_(PICKER_SELECTED_FONT_SIZE),
       selectedFontFamily_(nullptr),
       pickerItemHeight_(PICKER_ITEM_HEIGHT),
+      loopState_(true),
       textSelected_(0),
       pTextArray_(nullptr),
       textArraySize_(0),
@@ -134,6 +135,7 @@ bool PickerViewComponent::CreateNativeViews()
 {
     bool result = false;
     pickerType_ = GetPickerType();
+    SetPickerLoopState();
     switch (pickerType_) {
         case PickerType::TEXT: {
             result = CreateTextPicker();
@@ -183,7 +185,7 @@ bool PickerViewComponent::CreateTextPicker()
         HILOG_ERROR(HILOG_MODULE_ACE, "PickerViewComponent: create text picker failed!");
         return false;
     }
-    uiPicker->SetLoopState(true);
+    uiPicker->SetLoopState(loopState_);
     textPickerListener_ = new TextPickerListener();
     if (textPickerListener_ == nullptr) {
         HILOG_ERROR(HILOG_MODULE_ACE, "PickerViewComponent: create text picker listener failed!");
@@ -203,9 +205,9 @@ bool PickerViewComponent::CreateTimePicker()
         HILOG_ERROR(HILOG_MODULE_ACE, "PickerViewComponent: create time picker failed");
         return false;
     }
-    uiTimePicker->SetLoopState(uiTimePicker->PICKER_HOUR, true);
-    uiTimePicker->SetLoopState(uiTimePicker->PICKER_MIN, true);
-    uiTimePicker->SetLoopState(uiTimePicker->PICKER_SEC, true);
+    uiTimePicker->SetLoopState(uiTimePicker->PICKER_HOUR, loopState_);
+    uiTimePicker->SetLoopState(uiTimePicker->PICKER_MIN, loopState_);
+    uiTimePicker->SetLoopState(uiTimePicker->PICKER_SEC, loopState_);
     timePickerListener_ = new TimePickerListener();
     if (timePickerListener_ == nullptr) {
         HILOG_ERROR(HILOG_MODULE_ACE, "PickerViewComponent: create time picker listener failed");
@@ -617,6 +619,13 @@ char *PickerViewComponent::GetStringAttrByName(const char * const name, uint16_t
     return strValue;
 }
 
+void PickerViewComponent::SetPickerLoopState()
+{
+    uint16_t length = 0;
+    char *typeStr = GetStringAttrByName(ATTR_LOOP, length);
+    loopState_ = strcmp(typeStr, "false") == 0 ? false : true;
+}
+
 PickerViewComponent::PickerType PickerViewComponent::GetPickerType() const
 {
     uint16_t length = 0;
@@ -762,8 +771,6 @@ bool PickerViewComponent::SetTextPickerRange(jerry_value_t rangeValue)
     // can not loop when pickerview has one child
     if (textArraySize_ == 1) {
         textPicker->SetLoopState(false);
-    } else {
-        textPicker->SetLoopState(true);
     }
     return true;
 }
index 8a537cb..85fe4e9 100644 (file)
@@ -216,6 +216,7 @@ private:
     bool CreateDatePicker();
 #endif // FEATURE_COMPONENT_DATE_PICKER
     bool SetPickerSelected(jerry_value_t selectedValue);
+    void SetPickerLoopState();
     void SetPickerListener(jerry_value_t funcValue) const;
     bool SetTextPickerRange(jerry_value_t rangeValue);
     void ReleaseTextRange();
@@ -232,6 +233,7 @@ private:
     uint8_t selectedFontSize_;
     char* selectedFontFamily_;
     uint16_t pickerItemHeight_;
+    bool loopState_;
 
     // text picker-view attributes
     uint16_t textSelected_;
index 7151e8c..86005ee 100644 (file)
@@ -198,10 +198,8 @@ void SliderComponent::SetWidthAndHeight()
     sliderView_.SetHeight(visibleHeight);
     sliderView_.SetWidth(visibleWidth);
     if (direction_ == UISlider::Direction::DIR_BOTTOM_TO_TOP) {
-        sliderView_.SetValidWidth(SLIDER_WIDTH);
         sliderView_.SetValidHeight(visibleHeight - DEFAULT_PADDING);
     } else {
-        sliderView_.SetValidHeight(SLIDER_WIDTH);
         sliderView_.SetValidWidth(visibleWidth - DEFAULT_PADDING);
     }
 }
index 0980ebf..ed94094 100644 (file)
@@ -13,7 +13,6 @@
  * limitations under the License.
  */
 
-
 #ifndef OHOS_ACELITE_JS_TIMER_LIST_H
 #define OHOS_ACELITE_JS_TIMER_LIST_H
 
@@ -35,7 +34,8 @@ public:
      * @fn TimerList::TimerList()
      * @brief Constructor
      */
-    TimerList() : timerListHead_(nullptr), index_(0) {}
+    TimerList() : timerListHead_(nullptr), index_(0)
+    {}
 
     /**
      * @fn TimerList::~TimerList()
@@ -65,15 +65,29 @@ public:
 
     jerry_value_t AddTimer(timerHandle_t timerId, Arguments *&arg);
 
-    TimerNode* GetTimer(uint8_t id);
+    TimerNode *GetTimer(uint8_t id);
 
     void DeleteTimer(uint8_t timer);
 
     void ReleaseArguments(Arguments *&argument);
 
-    uint8_t GetIndex()
+    /**
+     * @brief Get the next available index 0~255 for timer.
+     * @return int16_t. Returns the unused index. if there is no index, -1 is returned.
+     */
+    int16_t GetIndex()
     {
-        return ++index_;
+        uint8_t loopTimes = 0;
+        index_++;
+        while (GetTimer(index_) != nullptr) {
+            if (loopTimes >= UINT8_MAX) {
+                return -1;
+            }
+            // index_ = (index_ + 1) % 256;
+            index_++;
+            loopTimes++;
+        }
+        return index_;
     }
 
 private:
@@ -82,7 +96,7 @@ private:
     TimerNode *timerListHead_;
     uint8_t index_;
 };
-} // namespace ACELite
-} //  namespace OHOS
-#endif // FEATURE_TIMER_MODULE
-#endif // OHOS_ACELITE_JS_TIMER_LIST_H
+}  // namespace ACELite
+}  //  namespace OHOS
+#endif  // FEATURE_TIMER_MODULE
+#endif  // OHOS_ACELITE_JS_TIMER_LIST_H
index 6c47db1..2460066 100644 (file)
@@ -18,6 +18,7 @@
 #include "adapter.h"
 #include "js_ability_impl.h"
 #include "ace_log.h"
+#include "abilityms_slite_client.h"
 
 typedef struct : public OHOS::HeapBase {
     char *msgBody;
@@ -366,7 +367,13 @@ void OHOS::ACELite::KeyListener::OnRelease(const KeyEvent &event)
         SendToJS(event);
     } else if (isPress_ && !isLongPress_) {
         if (event.GetKeyId() == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_POWER)) {
-            JsAppContext::GetInstance()->TerminateAbility();
+            ElementName *elementName = OHOS::AbilityMsClient::GetInstance().GetTopAbility();
+            if (elementName != nullptr) {
+                OHOS::AbilityMsClient::GetInstance().ForceStop(elementName->bundleName);
+                FreeElement(elementName);
+            } else {
+                HILOG_ERROR(HILOG_MODULE_ACE, "KeyListener: OnRelease elementName is nullptr");
+            }
         }
     }
     isPress_ = false;
diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/network/network_listener.h b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/network/network_listener.h
new file mode 100644 (file)
index 0000000..8d76a8c
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) CompanyNameMagicTag. 2024-2025. All rights reserved.
+ * Description: network wrapper
+ * Author: SoftwarePlatform Group
+ * Create: 2024-08-10
+ */
+
+#ifndef OHOS_ACELITE_NETWORK_LISTENER_H
+#define OHOS_ACELITE_NETWORK_LISTENER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// 网络类型枚举
+typedef enum { 
+    NETWORK_TYPE_WIFI = 0,
+    NETWORK_TYPE_BLUETOOTH,
+    NETWORK_TYPE_BLUETOOTH_LE,
+    NETWORK_TYPE_UNKNOWN
+} NetworkType;
+
+// 连接状态枚举
+typedef enum {
+    CONNECTION_STATUS_CONNECTING = 0,
+    CONNECTION_STATUS_CONNECTED,
+    CONNECTION_STATUS_DISCONNECTING,
+    CONNECTION_STATUS_DISCONNECTED,
+    CONNECTION_STATUS_UNKNOWN
+} ConnectionState;
+
+void net_connect_status_change(uint8_t type, uint8_t netConnectState);
+#ifdef __cplusplus
+};
+#endif
+
+#endif
diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/network/network_module.cpp b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/network/network_module.cpp
new file mode 100644 (file)
index 0000000..b58a445
--- /dev/null
@@ -0,0 +1,270 @@
+/*\r
+ * Copyright (c) 2020 Huawei Device Co., Ltd.\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 "ace_log.h"\r
+#include "js_app_context.h"\r
+#include "js_async_work.h"\r
+#include "product_adapter.h"\r
+#include <securec.h>\r
+#include <unistd.h>\r
+#include "network_module.h"\r
+#include "BluetoothModel.h"\r
+#include "msg_center_protocol.h"\r
+#include "bts_le_gap.h"\r
+#include "network_listener.h"\r
+\r
+namespace OHOS {\r
+namespace ACELite {\r
+std::map<uint8_t, NetCallBack *> NetWorkModule::callbackSet;\r
+\r
+void NetWorkModule::TriggerCallbackListener(uint8_t type, uint8_t netConnectState)\r
+{\r
+    auto it = callbackSet.find(type);\r
+    if (it != callbackSet.end()) {\r
+        NetCallBack *callback = it->second;\r
+        callback->netParam.state = netConnectState;\r
+        callback->netParam.net_type = type;\r
+        if (!JsAsyncWork::DispatchAsyncWork(AsyncExecuteCallback, const_cast<NetCallBack *>(callback))) {\r
+            HILOG_ERROR(HILOG_MODULE_ACE, "dispatch async work failed.");\r
+        }\r
+    }\r
+}\r
+\r
+static bool ValidJsValue(JSIValue value)\r
+{\r
+    return (value != nullptr) && (!JSI::ValueIsUndefined(value));\r
+}\r
+\r
+static uint8_t GetNetConnectState(uint8_t net_type)\r
+{\r
+    uint8_t state;\r
+    switch (net_type) {\r
+        case NETWORK_TYPE_WIFI:\r
+            break;\r
+        case NETWORK_TYPE_BLUETOOTH:\r
+            state = OHOS::BluetoothModel::GetInstance()->GetAclConnected() ? CONNECTION_STATUS_CONNECTED\r
+                                                                           : CONNECTION_STATUS_DISCONNECTED;\r
+            break;\r
+        case NETWORK_TYPE_BLUETOOTH_LE:\r
+            state = (msg_center_get_ble_conn_state() == GAP_BLE_STATE_CONNECTED) ? CONNECTION_STATUS_CONNECTED\r
+                                                                                 : CONNECTION_STATUS_DISCONNECTED;\r
+            break;\r
+        default:\r
+            state = CONNECTION_STATUS_UNKNOWN;\r
+            break;\r
+    }\r
+    return state;\r
+}\r
+\r
+const JSIValue GetNetworkStateString(uint8_t type, uint8_t state)\r
+{\r
+    // 网络类型\r
+    const char *networkType;\r
+    switch (type) {\r
+        case NETWORK_TYPE_WIFI:\r
+            networkType = "WIFI";\r
+            break;\r
+        case NETWORK_TYPE_BLUETOOTH:\r
+            networkType = "Bluetooth";\r
+            break;\r
+        case NETWORK_TYPE_BLUETOOTH_LE:\r
+            networkType = "Bluetooth LE";\r
+            break;\r
+        default:\r
+            networkType = "Unknown Network Type";\r
+            break;\r
+    }\r
+\r
+    // 连接状态\r
+    const char *connectionState;\r
+    switch (state) {\r
+        case CONNECTION_STATUS_CONNECTING:\r
+            connectionState = "Connecting";\r
+            break;\r
+        case CONNECTION_STATUS_CONNECTED:\r
+            connectionState = "Connected";\r
+            break;\r
+        case CONNECTION_STATUS_DISCONNECTED:\r
+            connectionState = "Disconnected";\r
+            break;\r
+        default:\r
+            connectionState = "Unknown State";\r
+            break;\r
+    }\r
+\r
+    // 静态字符串缓冲区,用于返回结果\r
+    static char description[MAX_STATUS_LENGTH];\r
+    int ret =\r
+        snprintf_s(description, sizeof(description), sizeof(description) - 1, "%s: %s", networkType, connectionState);\r
+    if (ret <= 0) {\r
+        HILOG_ERROR(HILOG_MODULE_ACE, "result buff is too long");\r
+    }\r
+    JSIValue result = JSI::CreateObject();\r
+    JSI::SetStringProperty(result, "type", networkType);\r
+    JSI::SetNumberProperty(result, "state", state);\r
+    JSI::SetStringProperty(result, "description", description);\r
+    return result;\r
+}\r
+\r
+void NetWorkModule::AsyncExecuteCallback(void *arg)\r
+{\r
+    NetCallBack *callback = static_cast<NetCallBack *>(arg);\r
+    if (ValidJsValue(callback->net_connect_callback)) {\r
+        JSIValue result = GetNetworkStateString(callback->netParam.net_type, callback->netParam.state);\r
+        JSIValue argv[ARGC_ONE] = {result};\r
+        JSI::CallFunction(callback->net_connect_callback, callback->net_connect_thisVal, argv, ARGC_ONE);\r
+        JSI::ReleaseValue(result);\r
+    }\r
+}\r
+\r
+JSIValue NetWorkModule::RegisterConnectListener(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)\r
+{\r
+    uint8_t type;\r
+    JSIValue callbackArg;\r
+    if (argsNum == 1) {\r
+        type = NETWORK_TYPE_BLUETOOTH;\r
+        callbackArg = args[0];\r
+    } else if (argsNum == 2) {\r
+        if (args == nullptr || JSI::ValueIsUndefined(args[0])) {\r
+            HILOG_ERROR(HILOG_MODULE_ACE, "Invalid type argument for registering net connection callback");\r
+            return JSI::CreateUndefined();\r
+        }\r
+        type = JSI::ValueToNumber(args[0]);\r
+        callbackArg = args[1];\r
+    } else {\r
+        HILOG_ERROR(HILOG_MODULE_ACE, "Invalid number of arguments for registering net connection callback");\r
+        return JSI::CreateUndefined();\r
+    }\r
+    auto it = callbackSet.find(type);\r
+    if (it != callbackSet.end()) {\r
+        NetCallBack *callback = it->second;\r
+        // 从 map 中移除该回调\r
+        callbackSet.erase(it);\r
+        // 如果找到了对应的回调,先清理旧的回调\r
+        Clean(callback);\r
+    }\r
+    NetCallBack *newCallback = new (std::nothrow) NetCallBack();\r
+    if (newCallback == nullptr) {\r
+        HILOG_ERROR(HILOG_MODULE_ACE, "Failed to allocate memory for NetCallBack");\r
+        return JSI::CreateUndefined();\r
+    }\r
+    // 保存新的回调\r
+    newCallback->net_connect_thisVal = JSI::AcquireValue(thisVal);\r
+    newCallback->net_connect_callback = JSI::AcquireValue(callbackArg);\r
+    if (newCallback->net_connect_callback == nullptr) {\r
+        HILOG_ERROR(HILOG_MODULE_ACE, "Failed to register net connection callback");\r
+        delete newCallback;\r
+        return JSI::CreateUndefined();\r
+    }\r
+    newCallback->netParam.net_type = type;\r
+    callbackSet[type] = newCallback;\r
+    uint8_t state = GetNetConnectState(type);\r
+    net_connect_status_change(type, state);\r
+    return JSI::CreateUndefined();\r
+}\r
+\r
+JSIValue NetWorkModule::UnregisterConnectListener(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)\r
+{\r
+    if (args == nullptr || argsNum == 0) {\r
+        HILOG_ERROR(HILOG_MODULE_ACE, "Invalid arguments for unregistering net connection callback");\r
+        return JSI::CreateUndefined();\r
+    }\r
+\r
+    uint8_t type;\r
+    if (argsNum < 1) {\r
+        type = NETWORK_TYPE_BLUETOOTH;\r
+    } else {\r
+        if (JSI::ValueIsUndefined(args[0])) {\r
+            HILOG_ERROR(HILOG_MODULE_ACE, "Invalid type argument for unregistering net connection callback");\r
+            return JSI::CreateUndefined();\r
+        }\r
+        type = JSI::ValueToNumber(args[0]);\r
+    }\r
+    auto it = callbackSet.find(type);\r
+    if (it != callbackSet.end()) {\r
+        NetCallBack *callback = it->second;\r
+        callbackSet.erase(it);\r
+        Clean(callback);\r
+    } else {\r
+        HILOG_ERROR(HILOG_MODULE_ACE, "No callback registered for the given type");\r
+    }\r
+\r
+    return JSI::CreateUndefined();\r
+}\r
+\r
+JSIValue NetWorkModule::GetConnectState(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)\r
+{\r
+    uint8_t net_type = NETWORK_TYPE_UNKNOWN;\r
+    if (argsNum < 1) {\r
+        net_type = NETWORK_TYPE_BLUETOOTH;\r
+    } else {\r
+        net_type = (uint8_t)JSI::ValueToNumber(args[0]);\r
+    }\r
+    uint8_t state = GetNetConnectState(net_type);\r
+    return GetNetworkStateString(net_type, state);\r
+}\r
+\r
+void NetWorkModule::Clean(NetCallBack *callbackToClean)\r
+{\r
+    if (callbackToClean == nullptr) {\r
+        return;\r
+    }\r
+    // 释放回调函数资源\r
+    if (callbackToClean->net_connect_callback && JSI::ValueIsFunction(callbackToClean->net_connect_callback)) {\r
+        JSI::ReleaseValue(callbackToClean->net_connect_callback);\r
+    }\r
+    // 释放回调上下文资源\r
+    if (callbackToClean->net_connect_thisVal && !JSI::ValueIsUndefined(callbackToClean->net_connect_thisVal)) {\r
+        JSI::ReleaseValue(callbackToClean->net_connect_thisVal);\r
+    }\r
+    // 删除回调对象\r
+    delete callbackToClean;\r
+}\r
+\r
+void NetWorkModule::OnTerminate()\r
+{\r
+    for (auto it = callbackSet.begin(); it != callbackSet.end();) {\r
+        NetCallBack *callback = it->second;\r
+        callbackSet.erase(it);\r
+        // 移除多余的迭代器重置代码\r
+        Clean(callback);\r
+        // 从 map 中移除该回调\r
+        it = callbackSet.begin();\r
+    }\r
+}\r
+\r
+void InitNetWorkModule(JSIValue exports)\r
+{\r
+    JSI::SetModuleAPI(exports, "registerConnectListener", NetWorkModule::RegisterConnectListener);\r
+    JSI::SetModuleAPI(exports, "unregisterConnectListener", NetWorkModule::UnregisterConnectListener);\r
+    JSI::SetModuleAPI(exports, "getConnectState", NetWorkModule::GetConnectState);\r
+    JSI::SetOnTerminate(exports, NetWorkModule::OnTerminate);\r
+}\r
+\r
+}  // namespace ACELite\r
+}  // namespace OHOS\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+void net_connect_status_change(uint8_t type, uint8_t netConnectState)\r
+{\r
+    OHOS::ACELite::NetWorkModule::TriggerCallbackListener(type, netConnectState);\r
+}\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/network/network_module.h b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/network/network_module.h
new file mode 100644 (file)
index 0000000..fc8061b
--- /dev/null
@@ -0,0 +1,54 @@
+/*\r
+ * Copyright (c) CompanyNameMagicTag. 2024-2025. All rights reserved.\r
+ * Description: network wrapper\r
+ * Author: SoftwarePlatform Group\r
+ * Create: 2024-08-10\r
+ */\r
+\r
+#ifndef OHOS_ACELITE_NETWORK_MODULE_H\r
+#define OHOS_ACELITE_NETWORK_MODULE_H\r
+\r
+#include <cJSON.h>\r
+#include "acelite_config.h"\r
+#include "jsi.h"\r
+#include <map>\r
+#include "js_async_work.h"\r
+#include "non_copyable.h"\r
+#include "product_adapter.h"\r
+#include "abilityms_slite_client.h"\r
+#include "network_listener.h"\r
+\r
+namespace OHOS {\r
+namespace ACELite {\r
+#define MAX_STATUS_LENGTH 128\r
+\r
+struct NetParam {\r
+    uint8_t net_type = -1;\r
+    uint8_t state;\r
+};\r
+\r
+struct NetCallBack {\r
+    JSIValue net_connect_callback = nullptr;\r
+    JSIValue net_connect_thisVal = nullptr;\r
+    NetParam netParam;\r
+};\r
+\r
+class NetWorkModule final : public MemoryHeap {\r
+public:\r
+    ACE_DISALLOW_COPY_AND_MOVE(NetWorkModule);\r
+    NetWorkModule() = default;\r
+    ~NetWorkModule() = default;\r
+    static std::map<uint8_t, NetCallBack*> callbackSet;\r
+    static JSIValue RegisterConnectListener(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);\r
+    static JSIValue UnregisterConnectListener(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);\r
+    static JSIValue GetConnectState(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);\r
+    static void AsyncExecuteCallback(void *arg);\r
+    static void TriggerCallbackListener(uint8_t type, uint8_t netConnectState);\r
+    static void OnTerminate();\r
+    static void Clean(NetCallBack* callbackToClean);\r
+};\r
+\r
+}  // namespace ACELite\r
+}  // namespace OHOS\r
+\r
+#endif\r
index 9aa178a..9826884 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 636c899..33284f5 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 36de951..3faa0d3 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 36de951..3faa0d3 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-xts/libbms.a and b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-xts/libbms.a differ
index 36de951..3faa0d3 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 97023f4..8d7c947 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 04f7681..f00d9fa 100644 (file)
@@ -39,6 +39,15 @@ typedef enum {
     BUNDLE_UNINSTALL_FAIL = 5
 } InstallState;
 
+typedef enum {
+    SCAN_PACKAGE_OK = 0,
+    SCAN_PACKAGE_DOING = 1,
+    SCAN_PACKAGE_FAIL = 2,
+    SCAN_PACKAGE_INVALID_DIR = 3,
+    SCAN_PACKAGE_MEMORY_ERROR = 4,
+    SCAN_PACKAGE_PATH_ERROR = 5
+} ScanPackagesResultState;
+
 typedef struct {
     char *bundleName;
     char *label;
index de9e3c9..18bf1d4 100644 (file)
@@ -62,7 +62,7 @@ public:
     uint8_t GetBundleInfo(const char *bundleName, int32_t flags, BundleInfo& bundleInfo);
     uint8_t GetBundleInfos(const int flags, BundleInfo **bundleInfos, int32_t *len);
     uint8_t GetBundleInfosNoReplication(const int flags, BundleInfo **bundleInfos, int32_t *len);
-    void ScanPackages();
+    void ScanPackages(InstallerCallback ScanPackagesResultCallback);
     BundleInfo *QueryBundleInfo(const char *bundleName);
     void RemoveBundleInfo(const char *bundleName);
     void AddBundleInfo(BundleInfo *info);
@@ -87,7 +87,8 @@ private:
     GtManagerService();
     ~GtManagerService();
     void ScanSystemApp(const cJSON *uninstallRecord, List<ToBeInstalledApp *> *systemPathList);
-    void ScanThirdApp(const char *appDir, const List<ToBeInstalledApp *> *systemPathList);
+    void ScanThirdApp(const char *appDir, const List<ToBeInstalledApp *> *systemPathList,
+        InstallerCallback ScanPackagesResultCallback);
     void InstallAllSystemBundle(InstallerCallback installerCallback);
     bool ReloadBundleInfo(const char *profileDir, const char *appId, bool isSystemApp);
     void ReloadEntireBundleInfo(const char *appPath, const char *bundleName, List<ToBeInstalledApp *> *systemPathList,
index 19ac2dc..1f44dac 100644 (file)
@@ -77,7 +77,9 @@ public:
     bool ResetPlayer();
 
     void ReleaseEventListeners();
-
+#ifdef HMF_DECRYPT_DATA_ENABLE
+    void SetDecryptLibraryPath(char *path, uint32_t len);
+#endif
     void ReleaseSrc();
 
     bool Play();
@@ -118,7 +120,7 @@ public:
 
     bool SetAutoPlay(bool autoPlay);
 
-    bool SetLoop(bool loop) const;
+    bool SetLoop(bool loop);
 
     bool SetVolume(double volume);
 
@@ -155,6 +157,8 @@ public:
     void SetOnTimeUpdateListener(AudioEventListener *onTimeUpdateListener);
 
     int32_t GetSrcInnerPrefix(const char *src, char *dest);
+
+    bool IsSysSrc();
 private:
     AudioPlayer();
     ~AudioPlayer();
@@ -176,9 +180,11 @@ private:
     bool autoPlay_;
     bool isRunning_;
     bool isSysSrc_;
+    bool isPlayList_;
+    AudioPlayerLoopMode playLoopMode_ = AudioPlayerLoopMode::AUDIO_PLAYER_INVAILD_LOOP;
     MediaThreadIdHandle updateTimeProcess_;
     AudioStreamType streamType_ = AUDIO_STREAM_MUSIC;
 };
 } // namespace ACELite
 } // namespace OHOS
-#endif // AUDIO_PLAYER_H
\ No newline at end of file
+#endif // AUDIO_PLAYER_H
index 1fc220c..fa7a97e 100644 (file)
@@ -75,7 +75,8 @@ LITE_TEST_CASE(UtilsFileReliTestSuite, testCreateFileAfterMaxFilesOpened, Functi
         TEST_ASSERT_GREATER_THAN_INT(0, fd32[i]);
     }
     // Open the 33th file
-    char* fileName33 = "/user/testReli101-33";
+    char fileName33[LENGTH_OF_FILE_NAME_BUF] = { 0 };
+    (void)sprintf_s(fileName33, sizeof(fileName33), "%s%d", "/user/testReli101-", MAX_NUM_OF_OPENED_FILES + 1);
     int fd33 = UtilsFileOpen(fileName33, O_RDWR_FS | O_CREAT_FS, 0);
     TEST_ASSERT_EQUAL_INT(-1, fd33);
     // Close file
index 0c90cfe..9ecc442 100644 (file)
@@ -1730,9 +1730,10 @@ typedef ptrdiff_t  FT_PtrDist;
           band--;
           continue;
         }
-        else if ( error != ErrRaster_Memory_Overflow )
+        else if ( error != ErrRaster_Memory_Overflow ) {
           ft_sfree(buffer);
           return 1;
+        }
 
         /* render pool overflow; we will reduce the render band by half */
         width >>= 1;
index d8e2693..718648e 100644 (file)
@@ -285,7 +285,7 @@ set(PUBLIC_DEFINES
 )
 
 set(PRIVATE_DEFINES
-    JERRY_GLOBAL_HEAP_SIZE=512
+    JERRY_GLOBAL_HEAP_SIZE=576
     JERRY_ERROR_MESSAGES=1
     JERRY_LINE_INFO=1
     JERRY_FUNCTION_NAME
index 4440eca..fba453f 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 b24695a..f3d1ede 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 b5fc18b..934e948 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 b5fc18b..934e948 100644 (file)
Binary files a/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-xts/libjerryscript.a and b/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-xts/libjerryscript.a differ
index b5fc18b..934e948 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 054a02a..5548a92 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 cef74a2..74e4481 100644 (file)
@@ -63,7 +63,11 @@ int UtilsFileCopy(const char* src, const char* dest)
     if ((src == NULL) || (dest == NULL)) {\r
         return EC_FAILURE;\r
     }\r
+#ifdef XTS_SUPPORT\r
+    int fpSrc = UtilsFileOpen(src, O_RDWR_FS, 0);\r
+#else\r
     int fpSrc = UtilsFileOpen(src, O_RDONLY_FS, 0);\r
+#endif\r
     if (fpSrc < 0) {\r
         return fpSrc;\r
     }\r
index 2f6f235..44a4b6e 100644 (file)
@@ -27,6 +27,8 @@ namespace ACELite {
 namespace {\r
 char g_uriFullPath[FILE_NAME_MAX_LEN + 1] = {0};\r
 const unsigned int PREFIX_LEN = strlen(FILE_PREFIX);\r
+const char *trustPath = "/user/music";\r
+const int trustPathSize = strlen(trustPath);\r
 \r
 bool IsValidPath(const char* path)\r
 {\r
@@ -38,15 +40,28 @@ bool IsValidPath(const char* path)
     if (pathLen > URI_NAME_MAX_LEN) {\r
         return false;\r
     }\r
-    if ((pathLen < PREFIX_LEN) || (strncmp(path, FILE_PREFIX, PREFIX_LEN) != 0)) {\r
+\r
+    bool isTrustPath = (strncmp(path, trustPath, trustPathSize) == 0);\r
+    if (!isTrustPath && (strncmp(path, FILE_PREFIX, PREFIX_LEN) != 0)) {\r
+        return false;\r
+    }\r
+\r
+    if (isTrustPath && (pathLen < strlen(trustPath))) {\r
         return false;\r
     }\r
+\r
+    if ((strncmp(path, FILE_PREFIX, PREFIX_LEN) == 0) && (pathLen < PREFIX_LEN)) {\r
+        return false;\r
+    }\r
+\r
     if ((strstr(path, "/./") != nullptr) || (strstr(path, "/../") != nullptr)) {\r
         return false;\r
     }\r
-    if (strpbrk(path + PREFIX_LEN, "\"*+,:;<=>\?[]|\x7F")) {\r
+\r
+    if (strpbrk(path + (isTrustPath ? trustPathSize : PREFIX_LEN), "\"*+,:;<=>\?[]|\x7F")) {\r
         return false;\r
     }\r
+\r
     return true;\r
 }\r
 \r
@@ -56,15 +71,24 @@ int GetFullPath(const char* uri, char* fullPath, int len)
         return ERROR_CODE_PARAM;\r
     }\r
     const char* dataPath = GetDataPath();\r
+    int size = PREFIX_LEN;\r
+    bool isTrustPath = (strncmp(uri, trustPath, strlen(trustPath)) == 0);\r
+    if (isTrustPath) {\r
+        size = 0;\r
+    }\r
+\r
     if (dataPath == nullptr) {\r
         return ERROR_CODE_PARAM;\r
     }\r
+\r
     if (memset_s(fullPath, len, 0x0, len) != EOK) {\r
         return ERROR_CODE_GENERAL;\r
     }\r
-    if (sprintf_s(fullPath, len, "%s%s", dataPath, uri + PREFIX_LEN) < 0) {\r
+\r
+    if (sprintf_s(fullPath, len, "%s%s", (isTrustPath ? "" : dataPath), uri + size) < 0) {\r
         return ERROR_CODE_GENERAL;\r
     }\r
+\r
     return NATIVE_SUCCESS;\r
 }\r
 \r
index 8067bf8..005a9bf 100644 (file)
@@ -289,17 +289,31 @@ JSIValue NativeapiKv::Delete(const JSIValue thisVal, const JSIValue* args, uint8
 \r
 JSIValue NativeapiKv::Clear(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum)\r
 {\r
-    JSIValue undefValue = JSI::CreateUndefined();\r
+    JSIValue retValue = JSI::CreateUndefined();\r
+ \r
+    if (args == nullptr || argsNum == 0 || !NativeapiCommon::IsValidJSIValue(args, argsNum)) {\r
+        retValue = JSI::CreateErrorWithCode(-1, "Invalid arguments");\r
+        return retValue;\r
+    }\r
+ \r
     FuncParams* params = new(std::nothrow) FuncParams();\r
     if (params == nullptr) {\r
-        return undefValue;\r
+        retValue = JSI::CreateErrorWithCode(-1, "Failed to allocate FuncParams");\r
+        return retValue;\r
     }\r
+ \r
     params->thisVal = JSI::AcquireValue(thisVal);\r
-    if (NativeapiCommon::IsValidJSIValue(args, argsNum)) {\r
-        params->args = JSI::AcquireValue(args[0]);\r
+    params->args = JSI::AcquireValue(args[0]);\r
+ \r
+    bool isSuccess = JsAsyncWork::DispatchAsyncWork(reinterpret_cast<AsyncWorkHandler>(ExecuteClear), 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
-    JsAsyncWork::DispatchAsyncWork(reinterpret_cast<AsyncWorkHandler>(ExecuteClear), reinterpret_cast<void *>(params));\r
-    return undefValue;\r
+ \r
+    return retValue;\r
 }\r
 } // ACELite\r
 } // OHOS\r
index 2eff618..f7735f6 100644 (file)
@@ -44,6 +44,7 @@ typedef enum {
     CONN_MSG_ID_REPORT_LOCAL_ADDR_CHANGED,      /* 本地设备地址变化上报 */
     CONN_MSG_ID_REPORT_PAIR_STATUS_CHANGED,     /* 设备配对变化上报 */
     CONN_MSG_ID_REPORT_REMOTE_RSSI,             /* 远端设备RSSI上报 */
+    CONN_MSG_ID_REPORT_CONN_REJECTED,           /* 拒绝新设备连接上报 */
 } connection_manager_msg_id;
 
 typedef enum {
index f47a9f5..82c5ced 100644 (file)
@@ -235,7 +235,7 @@ typedef enum {
  * @endif
  */
 typedef struct {
-    struct osal_list_head node;
+    struct osal_list_head node;                          /*!< @if Eng List node @else 链表节点 @endif */
     uint8_t client_id;                                   /*!< @if Eng client id @else 客户端ID @endif */
     uint16_t conn_id;                                    /*!< @if Eng connect id @else 连接ID @endif */
     uint16_t start_handle;                               /*!< @if Eng start handle @else 服务开始handle @endif */
index 8a2d7cc..e418297 100644 (file)
@@ -276,6 +276,7 @@ typedef struct {
  * @endif
  */
 typedef struct {
+    struct osal_list_head node;     /*!< @if Eng List node        @else 链表节点 @endif */
     uint8_t att_id;                 /*!< @if Eng Attribute id     @else 属性ID @endif */
     uint16_t att_length;            /*!< @if Eng Attribute length @else 属性长度 @endif */
     uint8_t *att;                   /*!< @if Eng Attribute value  @else 属性值 @endif */
index 33d987c..d0526c8 100644 (file)
@@ -921,6 +921,13 @@ static void sample_gap_is_accept_conn_on_safe_mode_callback(const bd_addr_t *bd_
     *res = g_sample_gap_accept_conn;
 }
 
+static void sample_gap_connect_reject_rpt_callback(const bd_addr_t *bd_addr)
+{
+    bts_sample_log("conn_request_notify_callback addr: ****%02x%02x%02x%02x\n",
+        bd_addr->addr[3], bd_addr->addr[2], /* addr下标 2 3 */
+        bd_addr->addr[1], bd_addr->addr[0]); /* addr下标 0 1 */
+}
+
 /* 注册回调 params: sample_mode fill_callbacks */
 void btsrv_at_cmd_gap_register_callbacks(void)
 {
@@ -941,10 +948,11 @@ void btsrv_at_cmd_gap_register_callbacks(void)
         sample_gap_remote_cod_changed_callback,
         sample_gap_remote_battery_level_changed_callback,
         sample_gap_read_remote_rssi_event_callback,
-        sample_gap_is_accept_conn_on_safe_mode_callback
+        sample_gap_is_accept_conn_on_safe_mode_callback,
     };
     int ret = gap_register_callbacks(&cb);
     bts_sample_log("gap reg cbk ret %x\n", ret);
+    gap_register_br_connect_rejection_report_callback(sample_gap_connect_reject_rpt_callback);
 }
 
 /* 注册回调 params: sample_mode fill_callbacks */
@@ -965,6 +973,7 @@ static void btsrv_sample_cmd_gap_register_callbacks(const char **params, int32_t
     int ret;
     if ((sample_mode & 0x1) != 0) {
         ret = gap_register_callbacks(NULL);
+        gap_register_br_connect_rejection_report_callback(NULL);
     } else if (fill_callbacks != 0) {
         gap_call_backs_t cb = {
             sample_gap_state_changed_callback,
@@ -983,14 +992,16 @@ static void btsrv_sample_cmd_gap_register_callbacks(const char **params, int32_t
             sample_gap_remote_cod_changed_callback,
             sample_gap_remote_battery_level_changed_callback,
             sample_gap_read_remote_rssi_event_callback,
-            sample_gap_is_accept_conn_on_safe_mode_callback
+            sample_gap_is_accept_conn_on_safe_mode_callback,
         };
         ret = gap_register_callbacks(&cb);
         bts_sample_log("gap_register_callbacks with funcs ret(int): %x\n", ret);
+        gap_register_br_connect_rejection_report_callback(sample_gap_connect_reject_rpt_callback);
     } else {
         gap_call_backs_t cb = { 0, };
         ret = gap_register_callbacks(&cb);
         bts_sample_log("gap_register_callbacks test ret(int): %x\n", ret);
+        gap_register_br_connect_rejection_report_callback(NULL);
     }
 }
 
index bfef91a..a1258ef 100644 (file)
@@ -84,6 +84,7 @@ enum {
     BTSDK_ADD_DEVICE_TO_WHITE_LIST,
     BTSDK_REMOVE_DEVICE_FROM_WHITE_LIST,
     BTSDK_CLEAR_WHITE_LIST,
+    BTSDK_CONNECTION_REJECT_REPORT,
 
     BTSDK_ENUM_MAX     // let it at the bottom of the array
 };
@@ -393,6 +394,10 @@ typedef struct {
     bth_addr_t bd_addr;
 } connect_req_ind_struct;
 
+typedef struct {
+    bth_addr_t bd_addr;
+} connect_reject_info;
+
 typedef struct {
     uint8_t op;
     void *func;
@@ -440,6 +445,7 @@ typedef void  (btsdk_inquiry_complete_ind_func)(void);
 typedef void  (btsdk_authorization_req_ind_func)(uint32_t svc_hdl, uint32_t dev_hdl);
 typedef uint8_t  (btsdk_connection_request_ind_func)(uint32_t dev_hdl, uint32_t dev_class, uint8_t link_type,
     const uint8_t *remote_addr, uint8_t addr_len);
+typedef uint8_t  (btsdk_connection_reject_rpt_func)(const uint8_t *remote_addr, uint8_t addr_len);
 typedef void  (btsdk_connection_complete_ind_func)(uint32_t dev_hdl, bt_sdk_conn_dev_info_t *conn_dev_info);
 typedef void  (btsdk_disconnection_complete_ind_func)(uint32_t dev_hdl, uint32_t reason);
 typedef void  (btsdk_connection_event_ind_func)(uint32_t conn_hdl, uint16_t event, uint8_t *arg);
index 41a21bc..8bdf8ce 100644 (file)
Binary files a/code/sdk/tools/pkg/bin/brandy/bt.bin and b/code/sdk/tools/pkg/bin/brandy/bt.bin differ
index 9254d52..47dbba1 100644 (file)
Binary files a/code/sdk/tools/pkg/bin/brandy/dsp/max/dsp_main.bin and b/code/sdk/tools/pkg/bin/brandy/dsp/max/dsp_main.bin differ
index c1b466d..a4b8418 100644 (file)
Binary files a/code/sdk/tools/pkg/bin/brandy/dsp/max/dsp_overlay.bin and b/code/sdk/tools/pkg/bin/brandy/dsp/max/dsp_overlay.bin differ
index a63c4bb..ddeea84 100644 (file)
Binary files a/code/sdk/tools/pkg/bin/brandy/dsp/mini/dsp_main.bin and b/code/sdk/tools/pkg/bin/brandy/dsp/mini/dsp_main.bin differ
index ee819d6..de08c78 100644 (file)
Binary files a/code/sdk/tools/pkg/bin/brandy/dsp/mini/dsp_overlay.bin and b/code/sdk/tools/pkg/bin/brandy/dsp/mini/dsp_overlay.bin differ
index cf62a77..54ec759 100644 (file)
Binary files a/code/sdk/tools/pkg/bin/brandy/dsp/ultra/dsp_main.bin and b/code/sdk/tools/pkg/bin/brandy/dsp/ultra/dsp_main.bin differ
index 5ca2ce1..7878450 100644 (file)
Binary files a/code/sdk/tools/pkg/bin/brandy/dsp/ultra/dsp_overlay.bin and b/code/sdk/tools/pkg/bin/brandy/dsp/ultra/dsp_overlay.bin differ
index 74eeb58..80a4fa7 100644 (file)
@@ -24,16 +24,19 @@ from param_packet import gen_flash_part_bin
 from nv_binary import nv_begin
 
 # brandy packet
-def build_brandy_other_bin(pack_style_str, flash_size):
+def build_brandy_other_bin(pack_style_str, flash_size, no_dsp):
     ''' build brandy partition and nv '''
     chip_dir = os.path.join(SDK_DIR, "build", "config", "target_config", "brandy")
     # 分区配置文件路径
     partition_cfg = os.path.join(chip_dir, "param_sector")
-    if flash_size.endswith("0x1000000"):
+    if flash_size == "0x1000000":
         partition_cfg = os.path.join(partition_cfg, "param_sector_16M.json")
     else:
-        partition_cfg = os.path.join(partition_cfg, "param_sector.json")
-    print("partition_cfg {}".format(partition_cfg))
+        if (no_dsp == "True"):
+            partition_cfg = os.path.join(partition_cfg, "param_sector_no_dsp.json")
+        else:
+            partition_cfg = os.path.join(partition_cfg, "param_sector.json")
+    
     partition_bin = os.path.join(SDK_DIR, "output", "brandy", "partition_table.bin")
     # nv配置文件路径
     nv_config_json = os.path.join(chip_dir, "nv_bin_cfg")
@@ -114,6 +117,60 @@ def make_all_in_one_packet_8M(pack_style_str):
         print(e)
         exit(-1)
 
+def make_all_in_one_packet_no_dsp(pack_style_str):
+    # make all in one packet
+    bin_dir = os.path.join(PKG_DIR, "bin", "brandy")
+    application_dir = os.path.join(SDK_DIR,
+                                   "output",
+                                   "brandy",
+                                   "acore",
+                                   pack_style_str)
+    recovery_target = "%s-r" % pack_style_str
+    recovery_target = recovery_target.replace('-user', '')
+    recovery_bin = os.path.join(SDK_DIR,
+                                "output",
+                                "brandy",
+                                "acore",
+                                recovery_target,
+                                "recovery.bin")
+    recovery_bx = recovery_bin + "|0x70050000|0x40000|100"
+
+    upload_app_fwpkg = os.path.join(PKG_DIR, "fwpkg", "brandy", "upload_app.fwpkg")
+
+    ssb = os.path.join(SDK_DIR, "output", "brandy", "acore", "brandy-ssb", "ssb.bin")
+    if not os.path.exists(ssb):
+        ssb = os.path.join(bin_dir, "ssb.bin")
+    print("ssb_path: ", ssb)
+    ssb_bx = ssb + "|0x70000000|0x20000|0"
+
+    partition = os.path.join(SDK_DIR, "output", "brandy", "partition_table.bin")
+    partition_bx = partition + "|0x7004F000|0x1000|100"
+    nv = os.path.join(SDK_DIR, "output", "brandy", "nv_bin", "brandy_all_nv.bin")
+    nv_bx = nv + "|0x707F9000|0x4000|100"
+
+    app = os.path.join(application_dir, "application.bin")
+    app_bx = app + "|0x70100000|0x6F9000|18"
+
+    bt = os.path.join(bin_dir, "bt.bin")
+    bt_bx = bt + "|0x70090000|0x70000|20"
+
+    fs = os.path.join(application_dir, "file.bin")
+    fs_bx = fs + "|0xFFFFFFFF|0xFFFFFFFF|101"
+
+    try:
+        packet_post_agvs = list()
+        packet_post_agvs.append(ssb_bx)
+        packet_post_agvs.append(partition_bx)
+        packet_post_agvs.append(app_bx)
+        packet_post_agvs.append(recovery_bx)
+        packet_post_agvs.append(bt_bx)
+        packet_post_agvs.append(nv_bx)
+        packet_post_agvs.append(fs_bx)
+        packet_bin(upload_app_fwpkg, packet_post_agvs)
+    except Exception as e:
+        print(e)
+        exit(-1)
+
 def make_all_in_one_packet_16M(pack_style_str):
     # make all in one packet
     bin_dir = os.path.join(PKG_DIR, "bin", "brandy")
@@ -179,13 +236,16 @@ def make_all_in_one_packet_16M(pack_style_str):
         exit(-1)
 
 
-def make_all_in_one_packet(pack_style_str, flash_size):
+def make_all_in_one_packet(pack_style_str, flash_size, no_dsp):
     # make all in one packet
-    build_brandy_other_bin(pack_style_str, flash_size)
-    if flash_size.endswith("0x1000000"):
+    build_brandy_other_bin(pack_style_str, flash_size, no_dsp)
+    if flash_size == "0x1000000":
         make_all_in_one_packet_16M(pack_style_str)
     else:
-        make_all_in_one_packet_8M(pack_style_str)
+        if no_dsp == "True":
+            make_all_in_one_packet_no_dsp(pack_style_str)
+        else:
+            make_all_in_one_packet_8M(pack_style_str)
 
 def is_packing_files_exist(soc, pack_style_str):
     """
index 366688f..2656055 100644 (file)
@@ -18,6 +18,7 @@ def main():
     build_soc = sys.argv[1]
     build_target = sys.argv[2]
     flash_size = sys.argv[3]
+    no_dsp = sys.argv[4]
 
     load_fmt = "chip_packet.%s.packet" %build_soc
     load_mod = importlib.import_module(load_fmt)
@@ -27,7 +28,7 @@ def main():
         lost = ";".join(lost_file)
         print(f"cannot find {lost}")
         exit(-1)
-    load_mod.make_all_in_one_packet(build_target, flash_size)
+    load_mod.make_all_in_one_packet(build_target, flash_size, no_dsp)
 
 if __name__ == "__main__":
     main()