g_button_state_record = 0;
g_button_press_time = 0;
}
+ uint32_t int_sts = osal_irq_lock();
button_report_click_state(id);
+ osal_irq_restore(int_sts);
}
static void button_pressed_state_handler(button_id_t id)
#include "graphic_config.h"
#include "dfx/fps_task.h"
#include "notification_manager.h"
+#include "baidu_app.h"
+
#ifdef __cplusplus
extern "C"
{
#ifdef JS_ENABLE
SliteAbility::OnActive(want);
#endif
+
+ msg_center_xiaodu_audio_pcm_clear_res();
}
void NativeAbility::StopSlice()
void ApplistUpdate(void);
void SetPresenter(ApplistPresenter *p);
AppListStyle GetCurrentStyle(void);
+ void SetInitFlag(bool flag);
private:
ApplistModel();
}
}
+ void ApplistModel::SetInitFlag(bool flag)
+ {
+ initFlag = flag;
+ }
+
void ApplistModel::ResolvingJSAppItems(void)
{
#ifdef JS_ENABLE
SetWantElement(want, startElement);
StartAbility(want);
+ ClearWant(want);
delete want;
return true;
#endif
if (text_ == nullptr) {
return false;
}
- if (memcpy_s(text_, textLen, text, textLen) != EOK) {
+ if (strcpy_s(text_, textLen, text) != EOK) {
+ GRAPHIC_LOGE("strcpy_s failed");
UIFree(text_);
text_ = nullptr;
return false;
}
- text_[textLen] = '\0';
return true;
}
} else if (align_ == ImgAlign::CENTER) {
curX -= totalWidth / 2; // 2: half
}
+ UIView* prev = this; // this is always the leading view of those images.
for (uint8_t i = 0; i < currentIndex_; i++) {
- parent_->Add(imgs_[i]);
+ parent_->Insert(prev, imgs_[i]);
imgs_[i]->SetPosition(curX, alignPos_.y);
imgs_[i]->Invalidate();
curX += imgs_[i]->GetWidth() + space_;
+ prev = imgs_[i];
}
}
if (text_ == nullptr) {
return false;
}
- if (memcpy_s(text_, textLen, text, textLen) != EOK) {
+ if (strcpy_s(text_, textLen, text) != EOK) {
+ GRAPHIC_LOGE("strcpy_s failed");
UIFree(text_);
text_ = nullptr;
return false;
}
- text_[textLen] = '\0';
return true;
}
passiveUpdateTypes_.PushBack(type);
}
dialViews_.PushBack(dynamic_cast<UIView*>(view));
- ProcessData(type, view);
Add(dynamic_cast<UIView*>(view));
+ ProcessData(type, view);
}
void DialViewGroup::SetPeriod(uint32_t period)
${ROOT_DIR}/open_source/openharmony/drivers/peripheral/display/interfaces/include
${ROOT_DIR}/open_source/openharmony/foundation/multimedia/player/interfaces/kits/
${ROOT_DIR}/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent
+ ${ROOT_DIR}/open_source/openharmony/foundation/ace/ace_engine_lite/modules/keyinput
${ROOT_DIR}/middleware/utils/fs/include/fs
${ROOT_DIR}/include/middleware/services/bts/br
${ROOT_DIR}/include/middleware/services/bts/common
${ROOT_DIR}/application/auto_ota
+ ${ROOT_DIR}/open_source/openharmony/foundation/multimedia/audio_capturer/interfaces/kits/audio_capturer_lite
)
if("JS_ENABLE" IN_LIST DEFINES)
errcode_t msg_center_vector_navi_rec_destroy_from_watch(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
\r
bool is_vector_navi_long_distance(uint8_t type);\r
+void msg_center_xiaodu_audio_pcm_clear_res(void);\r
\r
#ifdef __cplusplus\r
#if __cplusplus\r
#include "msg_center_protocol.h"
#include "baidumap.h"
#include "common_def.h"
-
+#include "keyinput.h"
+#include "KeyInputListener.h"
+#include "VolumeSettingView.h"
+#include "VolumeSettingPresenter.h"
+#include "VolumeSettingView.h"
namespace OHOS {
#ifdef __cplusplus
{TOPIC_EVENT_HFP_PHONE_TO_WATCH, PRIORITY_ONE},
};
+bool g_pressFlag = false;
+bool g_longPressFlag = false;
+
static bool CheckPriority(const Topic topic)
{
uint16_t mapperSize = sizeof(PRI_MAPPER) / sizeof(PRI_MAPPER[0]);
return sizeof(g_msgCenterNotifyTable) / sizeof(g_msgCenterNotifyTable[0]);
}
+static void CallVolumeDipSwitchControl(uint16_t notifyId, uint8_t states)
+{
+ VolumeSliderEventListener *volumeSliderEventListener = nullptr;
+ if (notifyId == TOPIC_EVENT_HFP_WATCH_ACTIVE ||
+ notifyId == TOPIC_EVENT_HFP_PHONE_TO_WATCH) {
+ if (NotificationManager::GetInstance()->GetVolumeScreenStatus()) {
+ VolumeSettingView *settingView = GetvolumeSetting();
+ if (settingView == nullptr) {
+ return;
+ }
+ volumeSliderEventListener = settingView->GetVolumeEventListener();
+ if (volumeSliderEventListener == nullptr) {
+ return;
+ }
+ volumeSliderEventListener->ChangeVolume(static_cast<VolumeChangeStatus>(VOLUMEUP));
+ } else {
+ HonrsViewChange();
+ NotificationManager::GetInstance()->SetVolumeScreenStatus(true);
+ }
+ }
+ return;
+}
+
+static void OnKeyLongPress(uint16_t keyID)
+{
+ g_longPressFlag = true; // Long press the logo
+ if (keyID == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_POWER)) { // Power button
+ // After StopNotify, a restart card will pop up first
+ uint16_t notifyId = NotificationManager::GetInstance()->GetShowingNotifyId();
+ if(notifyId == TOPIC_EVENT_ALARM_RING) {
+ NativeAbility::GetInstance().ChangeSlice(VIEW_REBOOT);
+ NotificationManager::GetInstance()->SetNativeUIRunning(true);
+ NotificationManager::GetInstance()->StopNotify();
+ }
+ } else if (keyID == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_FUNC)) { // Function buttons
+ // Switch to user configured shortcut card
+ }
+ return;
+}
+
+static void HandleKeyPress(uint16_t notifyId)
+{
+ if (notifyId == TOPIC_EVENT_ALARM_RING) {
+ AlarmClockModel::GetInstance()->AlarmGetClockNum();
+ AlarmPopUpPresenter::GetInstance()->DelayAlarmRing();
+ NotificationManager::GetInstance()->StopNotify();
+ }
+}
+
+static bool PressKeyEvent(uint16_t keyID, uint8_t state)
+{
+ switch (state) {
+ case InputDevice::STATE_PRESS:
+ g_pressFlag = true;
+ return true;
+ case InputDevice::STATE_LONG_PRESS:
+ OnKeyLongPress(keyID);
+ return true;
+ case InputDevice::STATE_RELEASE:
+ if (g_longPressFlag) {
+ g_pressFlag = false;
+ g_longPressFlag = false;
+ return true;
+ }
+ break;
+ default:
+ break;
+ }
+ return false;
+}
+
+static bool KeyNotifyCallback(uint16_t keyID, uint8_t state)
+{
+ if (!OHOS::NotificationManager::GetInstance()->HasNotifyShowing()) {
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "Notify does not exist!");
+ OHOS::ACELite::KeyInputModule::SetNotifyKeyListener(nullptr);
+ g_pressFlag = false;
+ g_longPressFlag = false;
+ return false;
+ }
+ if (PressKeyEvent(keyID, state)) {
+ return true;
+ }
+ uint16_t notifyId = NotificationManager::GetInstance()->GetShowingNotifyId();
+ if (keyID == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_POWER)) { // Power button
+ if (NotificationManager::GetInstance()->GetWatchCallStatus()) { // Volume card
+ // volume+
+ CallVolumeDipSwitchControl(notifyId, VOLUMEUP);
+ } else {
+ HandleKeyPress(notifyId);
+ }
+ }
+ else if (keyID == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_FUNC)) { // Function buttons
+ if (NotificationManager::GetInstance()->GetWatchCallStatus()) { // Volume card
+ // volume-
+ CallVolumeDipSwitchControl(notifyId, VOLUMEDOWN);
+ } else {
+ // Switch to user configured shortcut card
+ }
+ }
+ g_pressFlag = false;
+ g_longPressFlag = false;
+ return true;
+}
+
bool MsgCenterNotifyProc(const Topic topic, Request* req)
{
uint8_t i;
uint8_t tblSize = MsgCenterGetNotifyTblSize();
-
+ OHOS::ACELite::KeyInputModule::SetNotifyKeyListener(KeyNotifyCallback);
for (i = 0; i < tblSize; i++) {
MsgCenterNotifyTable *item = MsgCenterGetNotifyTblCb(i);
- if (item->topic == topic && item->cb != nullptr) {
+ if (item != nullptr && item->topic == topic && item->cb != nullptr) {
item->cb(topic, req);
return true;
}
SetWantElement(want, startElement);
StartAbility(want);
-
+ ClearWant(want);
delete want;
}
#include "soc_osal.h"\r
#include "watchdog.h"\r
#include "js_ability.h"\r
+#include "recording_module.h"\r
\r
#ifdef __cplusplus\r
extern "C" {\r
#define ROUTE_TRANS_MAX_SIZE (60 * 1024) /* 60K大小的导航路线规划,距离大概是15KM */\r
\r
osMessageQueueId_t g_pcm_stream_msg_queue_id = nullptr;\r
+static bool g_pcm_stream_end_record_sended_flag = false; /* 标识pcm的end帧是否发送完成,用于异常场景时资源清理 */\r
\r
errcode_t msg_center_navigation_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
{\r
return ERRCODE_FAIL;\r
}\r
\r
+ g_pcm_stream_end_record_sended_flag = false;\r
+\r
for (;;) {\r
osStatus_t ret = osMessageQueueGet(g_pcm_stream_msg_queue_id, &msg, nullptr, osWaitForever);\r
if (ret != osOK) {\r
msg.data = nullptr;\r
if (res != ERRCODE_SUCC) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "send pcm stream failed");\r
+ pcm_stream_del_queue();\r
return ERRCODE_FAIL;\r
}\r
} else if (msg.msg_id == MSGCENTER_TYPE_ID_XIAODU_END_RECORD) {\r
msg.data = nullptr;\r
if (res != ERRCODE_SUCC) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "send pcm end failed");\r
+ pcm_stream_del_queue();\r
return ERRCODE_FAIL;\r
}\r
+ g_pcm_stream_end_record_sended_flag = true;\r
return ERRCODE_SUCC;\r
}\r
}\r
return ERRCODE_SUCC;\r
}\r
\r
+/*\r
+ 异常场景时清除audio资源、pcm队列资源\r
+ 可能的异常场景包括:\r
+ 1)录音过程中,JS直接退出;\r
+ 2)录音完成后,等待APP结果未返回时,JS退出;\r
+ */\r
+void msg_center_xiaodu_audio_pcm_clear_res(void)\r
+{\r
+ OHOS::ACELite::AudioCapturerModule::ExceptionStop();\r
+ if (g_pcm_stream_end_record_sended_flag == false) {\r
+ pcm_stream_queue_msg msg;\r
+ msg.msg_id = MSGCENTER_TYPE_ID_XIAODU_END_RECORD;\r
+ msg.data = 0;\r
+ msg.len = 1;\r
+ if (g_pcm_stream_msg_queue_id != nullptr) {\r
+ osStatus_t ret = osMessageQueuePut(g_pcm_stream_msg_queue_id, &msg, 0, 0);\r
+ if (ret != osOK) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "Fatal err, ret = %d\r\n", ret);\r
+ }\r
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_MSG_CENTER, "active send pcm end\r\n");\r
+ }\r
+ }\r
+ return;\r
+}\r
+\r
osMessageQueueId_t GetPcmMsgQueueId(void)\r
{\r
return g_pcm_stream_msg_queue_id;\r
0 };\r
if (osThreadNew((osThreadFunc_t)pcm_stream_task_body, nullptr, &attr) == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "create pcm_stream task fail!\r\n");\r
+ pcm_stream_del_queue();\r
return ERRCODE_FAIL;\r
}\r
\r
#include "global.h"
#include "gt_bundle_manager_service.h"
#include "ApplistModel.h"
+#include "bundle_manager.h"
#define ARRAY_COUNT(array) (sizeof(array) / sizeof(array[0]))
#define OHOSFWK_MAX_ARGC 8
} else {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "bms resultCode = 0x%x", resultCode);
}
+ AdapterFree(installMsg);
}
static int ConvertCmdToParam(uint8_t *para, uint32_t paraLen,
startElement.deviceId = nullptr;
SetWantElement(want, startElement);
StartAbility(want);
+ ClearWant(want);
delete want;
return ERRCODE_SUCC;
}
WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "Language changed to %s\n", languageRegion);
+ bool scanResult = ScanPackages(nullptr);
+
+ if (scanResult) {
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "Scan Packages Succeeded");
+ } else {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Scan Packages Failed");
+ return ERRCODE_FAIL;
+ }
+
+ OHOS::ApplistModel::GetInstance().SetInitFlag(false);
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "Set InitFlag false Succeeded");
+
return ERRCODE_SUCC;
}
*/
void pmu_vdd0p8_power_vset(uint8_t level);
+/**
+ * @brief VDD0p8 power adjust get.
+ * @param level Voltage level.
+ */
+void pmu_vdd0p8_power_vget(uint8_t *level);
+
/**
* @brief LDO power on/off.
* @param sub Which ldo select.
#include "hal_pmu_vdd.h"
#include "std_def.h"
+uint8_t g_pmu_0p8_vget = 0;
+
typedef struct {
volatile uint32_t lock;
volatile uint32_t req_closed;
osal_irq_restore(irq);
}
+void pmu_vdd0p8_power_vget(uint8_t *level)
+{
+ *level = g_pmu_0p8_vget;
+}
+
void pmu_vdd0p8_power_vset(uint8_t level)
{
/* 1. Set vset step, default: 0.25mv
* 3. requset vset config
* 4. wait ack, clr ack
*/
+ g_pmu_0p8_vget = level;
hal_pmu_vdd0p8_set_nor_voltage(level);
hal_pmu_vdd0p8_vset_requset(PMU_VSET_MCORE);
(void)hal_pmu_vdd0p8_vset_ack_get(PMU_VSET_MCORE);
#define PMU_LPM_MCPU_WKUP_ALL_MASK 0xFFFF
-#define PMU_LPM_MCPU_WKUP_MASK (BIT(PMU_LPM_MCPU_DAP_WAKEUP) | \
+#define PMU_LPM_MCPU_WKUP_MASK (BIT(PMU_LPM_MCPU_CWDT_INT_WAKEUP) | \
+ BIT(PMU_LPM_MCPU_DAP_WAKEUP) | \
BIT(PMU_LPM_MCPU_SSI_WAKEUP) | \
BIT(PMU_LPM_MCPU_GPIO_WAKEUP) | \
BIT(PMU_LPM_MCPU_M_RTC_WAKEUP) | \
}\r
}\r
\r
-#ifdef SUPPORT_RC_CALIBRATION\r
-volatile uint64_t g_pre_count = 0;\r
-volatile double g_pre_msec = 0;\r
-#endif\r
-\r
uint64_t HalClockGetCycles(void)\r
{\r
-#ifdef SUPPORT_RC_CALIBRATION\r
- volatile double tick_count;\r
-#else\r
uint64_t tick_count;\r
-#endif\r
uint64_t cycle;\r
uint32_t lock_int_save;\r
uint32_t load_tick;\r
-#ifdef SUPPORT_RC_CALIBRATION\r
- volatile double msec;\r
- volatile uint64_t now_count;\r
-#endif\r
\r
lock_int_save = LOS_IntLock();\r
-\r
-#ifdef SUPPORT_RC_CALIBRATION\r
- if (g_pre_count == 0) {\r
- tick_count = (uapi_systick_get_count() * OS_SYS_MS_PER_SECOND) / CLOCK_32K_CALI_FREQ;\r
- g_pre_count = uapi_systick_get_count();\r
- g_pre_msec = tick_count;\r
- } else {\r
- now_count = uapi_systick_get_count();\r
- msec = (double)((now_count - g_pre_count) * OS_SYS_MS_PER_SECOND) / CLOCK_32K_CALI_FREQ;\r
- tick_count = g_pre_msec + msec;\r
-\r
- g_pre_count = now_count;\r
- g_pre_msec = tick_count;\r
- }\r
-#else\r
tick_count = uapi_systick_get_ms();\r
-#endif\r
-\r
load_tick = machine_timer_get_load_count();\r
cycle = (uint64_t)(tick_count * load_tick);\r
-\r
LOS_IntRestore(lock_int_save);\r
return cycle;\r
}\r
}
#endif
- ret = drv_ao_load_aef();
- if (ret != AUDIO_SUCCESS) {
- sap_err_log_fun(drv_ao_load_aef, ret);
- return ret;
- }
-
audio_unused(cmd);
audio_unused(file);
return AUDIO_SUCCESS;
profile = (sap_ao_port_aef_profile *)arg;
drv_ao = profile->h_mod;
+ if (profile->aef_profile > AO_AEF_PROFILE_NONE && profile->aef_profile < AO_AEF_PROFILE_MAX) {
+ ret = drv_ao_load_aef();
+ if (ret != AUDIO_SUCCESS) {
+ sap_err_log_fun(drv_ao_load_aef, ret);
+ return ret;
+ }
+ }
+
ret = drv_msg_ao_set_aef_profile(drv_ao, profile->aef_profile);
if (ret != AUDIO_SUCCESS) {
sap_err_log_fun(drv_msg_ao_set_aef_profile, ret);
#include "soc_osal.h"
#include "errcode.h"
#include "tcxo.h"
+#include "pmu_ldo.h"
+#include "hal_pmu_vdd.h"
#include "hal_efuse.h"
#include "efuse_porting.h"
return ERRCODE_INVALID_PARAM;
}
+ uint8_t old_level = 0;
+ pmu_vdd0p8_power_vget(&old_level);
+ if (old_level != HAL_PMU_VDD0P8_1P0_0P925V) {
+ pmu_vdd0p8_power_vset(HAL_PMU_VDD0P8_1P0_0P925V);
+ }
hal_efuse_region_t region = hal_efuse_get_region(byte_number);
if (hal_funcs->write_op(byte_number, (uint8_t)bit(bit_pos), region) == ERRCODE_SUCC) {
+ if (old_level != HAL_PMU_VDD0P8_1P0_0P925V) {
+ pmu_vdd0p8_power_vset(old_level);
+ }
return ERRCODE_SUCC;
}
+ if (old_level != HAL_PMU_VDD0P8_1P0_0P925V) {
+ pmu_vdd0p8_power_vset(old_level);
+ }
return ERRCODE_FAIL;
}
#endif
errcode_t uapi_efuse_write_buffer(uint32_t byte_number, const uint8_t *buffer, uint16_t length)
{
errcode_t ret;
+ uint8_t old_level;
ret = efuse_write_param_check(byte_number, buffer, length);
if (ret != ERRCODE_SUCC) {
return ERRCODE_EFUSE_INVALID_PARAM;
}
+
+ pmu_vdd0p8_power_vget(&old_level);
+ if (old_level != HAL_PMU_VDD0P8_1P0_0P925V) {
+ pmu_vdd0p8_power_vset(HAL_PMU_VDD0P8_1P0_0P925V);
+ }
hal_efuse_funcs_t *hal_funcs = hal_efuse_get_funcs();
if (hal_funcs->write_buffer_op(byte_number, buffer, length) != ERRCODE_SUCC) {
+ if (old_level != HAL_PMU_VDD0P8_1P0_0P925V) {
+ pmu_vdd0p8_power_vset(old_level);
+ }
return ERRCODE_FAIL;
}
+ if (old_level != HAL_PMU_VDD0P8_1P0_0P925V) {
+ pmu_vdd0p8_power_vset(old_level);
+ }
return ERRCODE_SUCC;
}
*/
int spp_write(int client_id, const char *data, const unsigned int len);
+/**
+ * @if Eng
+ * @brief Config client write data retry max times.
+ * @attention NULL.
+ * @param [in] retry_times Indicate the retry max times when write operation failed,
+ retry interval is 5ms.
+ * @retval ERRCODE_BT_SUCCESS The operation success.
+ * @par Dependency:
+ * @li bts_spp.h
+ * @else
+ * @brief 配置spp写重试最大次数
+ * @attention NULL.
+ * @param [in] retry_times 入参,用来指定写操作失败时重试的最大次数,重试间隔为5ms。
+ * @retval ERRCODE_BT_SUCCESS 操作成功。
+ * @par 依赖:
+ * @li bts_spp.h
+ * @endif
+ */
+errcode_bt_t spp_write_retry_times_config(uint32_t retry_times);
+
/**
* @if Eng
* @brief Callback function for connection event.
<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="initAppSysCmd bm! @appsys_bms_cmd.cpp(53),INFO" ID="0xe04a01ad" />
<MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm ReceiveCallback resultCode = %d @appsys_bms_cmd.cpp(60),INFO" ID="0xe04a01e5" />
- <MSG STRUCTURE="diag_log_msg0" NAME="argc > 4, ERR!!! @appsys_bms_cmd.cpp(67),ERROR" ID="0xe04a021a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="input failed! @appsys_bms_cmd.cpp(76),ERROR" ID="0xe04a0262" />
- <MSG STRUCTURE="diag_log_msg0" NAME="argc > 4, ERR!!! @appsys_bms_cmd.cpp(84),ERROR" ID="0xe04a02a2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="js app is active, first need terminate @appsys_bms_cmd.cpp(110),INFO" ID="0xe04a0375" />
- <MSG STRUCTURE="diag_log_msg0" NAME="bm dump argc 2 only support allBundles, ERR!!! @appsys_bms_cmd.cpp(122),ERROR" ID="0xe04a03d2" />
- <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo len = %d @appsys_bms_cmd.cpp(131),DBG" ID="0xe04a041e" />
- <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo bundleName = %s @appsys_bms_cmd.cpp(134),DBG" ID="0xe04a0436" />
- <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo versionName = %s @appsys_bms_cmd.cpp(135),DBG" ID="0xe04a043e" />
- <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo deviceType = %s @appsys_bms_cmd.cpp(137),DBG" ID="0xe04a044e" />
- <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo udid = %d @appsys_bms_cmd.cpp(139),DBG" ID="0xe04a045e" />
- <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo isSystemApp = %d @appsys_bms_cmd.cpp(140),DBG" ID="0xe04a0466" />
- <MSG STRUCTURE="diag_log_msg0" NAME="cmd_bm start @appsys_bms_cmd.cpp(159),INFO" ID="0xe04a04fd" />
- <MSG STRUCTURE="diag_log_msg0" NAME="argc is not 2, ERR!!! @appsys_bms_cmd.cpp(161),ERROR" ID="0xe04a050a" />
- <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm command = %s @appsys_bms_cmd.cpp(166),INFO" ID="0xe04a0535" />
- <MSG STRUCTURE="diag_log_msg0" NAME="cmd_bm no correct cmd!!! @appsys_bms_cmd.cpp(180),ERROR" ID="0xe04a05a2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="cmd_bm end @appsys_bms_cmd.cpp(183),INFO" ID="0xe04a05bd" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="argc > 4, ERR!!! @appsys_bms_cmd.cpp(68),ERROR" ID="0xe04a0222" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="input failed! @appsys_bms_cmd.cpp(77),ERROR" ID="0xe04a026a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="argc > 4, ERR!!! @appsys_bms_cmd.cpp(85),ERROR" ID="0xe04a02aa" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="js app is active, first need terminate @appsys_bms_cmd.cpp(111),INFO" ID="0xe04a037d" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="bm dump argc 2 only support allBundles, ERR!!! @appsys_bms_cmd.cpp(123),ERROR" ID="0xe04a03da" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo len = %d @appsys_bms_cmd.cpp(132),DBG" ID="0xe04a0426" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo bundleName = %s @appsys_bms_cmd.cpp(135),DBG" ID="0xe04a043e" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo versionName = %s @appsys_bms_cmd.cpp(136),DBG" ID="0xe04a0446" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo deviceType = %s @appsys_bms_cmd.cpp(138),DBG" ID="0xe04a0456" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo udid = %d @appsys_bms_cmd.cpp(140),DBG" ID="0xe04a0466" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo isSystemApp = %d @appsys_bms_cmd.cpp(141),DBG" ID="0xe04a046e" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="cmd_bm start @appsys_bms_cmd.cpp(160),INFO" ID="0xe04a0505" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="argc is not 2, ERR!!! @appsys_bms_cmd.cpp(162),ERROR" ID="0xe04a0512" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm command = %s @appsys_bms_cmd.cpp(167),INFO" ID="0xe04a053d" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="cmd_bm no correct cmd!!! @appsys_bms_cmd.cpp(181),ERROR" ID="0xe04a05aa" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="cmd_bm end @appsys_bms_cmd.cpp(184),INFO" ID="0xe04a05c5" />
</MSG_LOG>
\ No newline at end of file
<MSG STRUCTURE="diag_log_msg0" NAME="[BMS] get profile data failed! @gt_bundle_extractor.cpp(117),ERROR" ID="0xe04003aa" />
<MSG STRUCTURE="diag_log_msg0" NAME="[BMS] extract file data pos failed! @gt_bundle_extractor.cpp(145),ERROR" ID="0xe040048a" />
<MSG STRUCTURE="diag_log_msg0" NAME="[BMS] get file attr failed! @gt_bundle_extractor.cpp(151),ERROR" ID="0xe04004ba" />
- <MSG STRUCTURE="diag_log_msg1" NAME="VINCENTSS::GtBundleExtractor::ExtractInstallMsg totalFileSize = %d @gt_bundle_extractor.cpp(198),INFO" ID="0xe0400635" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] get unsigned file length failed! @gt_bundle_extractor.cpp(200),ERROR" ID="0xe0400642" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] extract resource file failed! @gt_bundle_extractor.cpp(222),ERROR" ID="0xe04006f2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] parse hap profile get bundle info failed! @gt_bundle_extractor.cpp(231),ERROR" ID="0xe040073a" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="VINCENTSS::GtBundleExtractor::ExtractInstallMsg totalFileSize = %d @gt_bundle_extractor.cpp(199),INFO" ID="0xe040063d" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] get unsigned file length failed! @gt_bundle_extractor.cpp(201),ERROR" ID="0xe040064a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] extract resource file failed! @gt_bundle_extractor.cpp(237),ERROR" ID="0xe040076a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] parse hap profile get bundle info failed! @gt_bundle_extractor.cpp(246),ERROR" ID="0xe04007b2" />
</MSG_LOG>
\ No newline at end of file
<MSG STRUCTURE="diag_log_msg0" NAME="[BMS] rawfile is not exists! @gt_bundle_installer.cpp(403),INFO" ID="0xe0420c9d" />
<MSG STRUCTURE="diag_log_msg0" NAME="[BMS] dstRawFilePath is nullptr @gt_bundle_installer.cpp(411),ERROR" ID="0xe0420cda" />
<MSG STRUCTURE="diag_log_msg0" NAME="[BMS] frename rawfile fail! @gt_bundle_installer.cpp(417),ERROR" ID="0xe0420d0a" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] transform js to bc when install, result is %d @gt_bundle_installer.cpp(564),INFO" ID="0xe04211a5" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] ConvertResInfoToBundleInfo errorCode = %d @gt_bundle_installer.cpp(589),INFO" ID="0xe042126d" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] delete permissions, result is %d @gt_bundle_installer.cpp(823),INFO" ID="0xe04219bd" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] transform js to bc when install, result is %d @gt_bundle_installer.cpp(559),INFO" ID="0xe042117d" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] ConvertResInfoToBundleInfo errorCode = %d @gt_bundle_installer.cpp(584),INFO" ID="0xe0421245" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] delete permissions, result is %d @gt_bundle_installer.cpp(818),INFO" ID="0xe0421995" />
</MSG_LOG>
\ No newline at end of file
<MSG STRUCTURE="diag_log_msg0" NAME="[BMS] ExtractHapProfile failed when excute parse bundle! @gt_bundle_parser.cpp(100),ERROR" ID="0xe0460322" />
<MSG STRUCTURE="diag_log_msg0" NAME="[BMS] cJSON_Parse failed when excute parse bundle! @gt_bundle_parser.cpp(108),ERROR" ID="0xe0460362" />
<MSG STRUCTURE="diag_log_msg0" NAME="[BMS] cJSON_GetObjectItem failed when excute parse bundle! @gt_bundle_parser.cpp(116),ERROR" ID="0xe04603a2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="SetModuleInfoDeviceType fail! @gt_bundle_parser.cpp(703),ERROR" ID="0xe04615fa" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="SetModuleInfoDeviceType fail! @gt_bundle_parser.cpp(719),ERROR" ID="0xe046167a" />
</MSG_LOG>
\ No newline at end of file
<MSG STRUCTURE="diag_log_msg0" NAME="multiImgInfo is nullptr! @image_cache_manager.cpp(110),ERROR" ID="0xcb1c0372" />
<MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc node failed! @image_cache_manager.cpp(120),ERROR" ID="0xcb1c03c2" />
<MSG STRUCTURE="diag_log_msg0" NAME="multiImgInfo.info is nullptr @image_cache_manager.cpp(130),ERROR" ID="0xcb1c0412" />
- <MSG STRUCTURE="diag_log_msg2" NAME="LRU free short term image %s resid: 0x%x @image_cache_manager.cpp(148),DBG" ID="0xcb1c04a6" />
- <MSG STRUCTURE="diag_log_msg2" NAME="LRU free long term image %s resid: 0x%x @image_cache_manager.cpp(157),DBG" ID="0xcb1c04ee" />
- <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc for node failed! @image_cache_manager.cpp(170),ERROR" ID="0xcb1c0552" />
- <MSG STRUCTURE="diag_log_msg0" NAME="ImageCacheMalloc for img data failed! @image_cache_manager.cpp(178),ERROR" ID="0xcb1c0592" />
- <MSG STRUCTURE="diag_log_msg1" NAME="File is not loaded. File: %s. @image_cache_manager.cpp(216),ERROR" ID="0xcb1c06c2" />
- <MSG STRUCTURE="diag_log_msg2" NAME="MultiImgInfo is nullptr, or resId is invalid. File: %s, ResId: %u. @image_cache_manager.cpp(224),ERROR" ID="0xcb1c0702" />
- <MSG STRUCTURE="diag_log_msg2" NAME="Node is nullptr. File: %s, ResId: %u. @image_cache_manager.cpp(229),ERROR" ID="0xcb1c072a" />
- <MSG STRUCTURE="diag_log_msg2" NAME="LoadSingleRes failed. File: %s, ResId: %u. @image_cache_manager.cpp(244),ERROR" ID="0xcb1c07a2" />
- <MSG STRUCTURE="diag_log_msg2" NAME="LoadOneInMultiRes failed. File: %s, ResId: %u. @image_cache_manager.cpp(250),ERROR" ID="0xcb1c07d2" />
- <MSG STRUCTURE="diag_log_msg3" NAME="Update image info failed. Set img data to nullptr. File: %s, FileLen: %u, ResId: %u. @image_cache_manager.cpp(262),ERROR" ID="0xcb1c0832" />
- <MSG STRUCTURE="diag_log_msg0" NAME="CreateImageNode failed! @image_cache_manager.cpp(284),ERROR" ID="0xcb1c08e2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="fread info header failed! @image_cache_manager.cpp(298),ERROR" ID="0xcb1c0952" />
- <MSG STRUCTURE="diag_log_msg0" NAME="LoadAllImgInfo failed! @image_cache_manager.cpp(327),ERROR" ID="0xcb1c0a3a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="LoadSingleImgInfo failed! node is nullptr or imgIndex is invalid. @image_cache_manager.cpp(335),ERROR" ID="0xcb1c0a7a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="LoadSingleImgInfo failed! @image_cache_manager.cpp(385),ERROR" ID="0xcb1c0c0a" />
- <MSG STRUCTURE="diag_log_msg1" NAME="LoadAllInMultiRes failed! Open file failed: %s @image_cache_manager.cpp(396),ERROR" ID="0xcb1c0c62" />
- <MSG STRUCTURE="diag_log_msg0" NAME="fread bin header failed! @image_cache_manager.cpp(408),ERROR" ID="0xcb1c0cc2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="LoadAllImgInfo failed! @image_cache_manager.cpp(427),ERROR" ID="0xcb1c0d5a" />
- <MSG STRUCTURE="diag_log_msg1" NAME="LoadAllInMultiRes failed! file: %s @image_cache_manager.cpp(442),ERROR" ID="0xcb1c0dd2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="Res file is already loaded. @image_cache_manager.cpp(450),WARNING" ID="0xcb1c0e13" />
- <MSG STRUCTURE="diag_log_msg0" NAME="CreateImageNode failed! @image_cache_manager.cpp(468),ERROR" ID="0xcb1c0ea2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="memcpy info header failed! @image_cache_manager.cpp(472),ERROR" ID="0xcb1c0ec2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="memcpy img data failed! @image_cache_manager.cpp(477),ERROR" ID="0xcb1c0eea" />
- <MSG STRUCTURE="diag_log_msg2" NAME="LoadOneInMultiRes failed! resId: 0x%x, file: %s @image_cache_manager.cpp(564),ERROR" ID="0xcb1c11a2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="CreateImageNode failed! @image_cache_manager.cpp(578),ERROR" ID="0xcb1c1212" />
- <MSG STRUCTURE="diag_log_msg1" NAME="Res file is not loaded: %s @image_cache_manager.cpp(635),ERROR" ID="0xcb1c13da" />
- <MSG STRUCTURE="diag_log_msg0" NAME="Res file is not loaded. @image_cache_manager.cpp(663),ERROR" ID="0xcb1c14ba" />
- <MSG STRUCTURE="diag_log_msg1" NAME="Res file is not loaded: %s @image_cache_manager.cpp(690),ERROR" ID="0xcb1c1592" />
- <MSG STRUCTURE="diag_log_msg0" NAME="Res file is not loaded. @image_cache_manager.cpp(705),ERROR" ID="0xcb1c160a" />
+ <MSG STRUCTURE="diag_log_msg2" NAME="LRU free short term image %s resid: 0x%x @image_cache_manager.cpp(149),DBG" ID="0xcb1c04ae" />
+ <MSG STRUCTURE="diag_log_msg2" NAME="LRU free long term image %s resid: 0x%x @image_cache_manager.cpp(159),DBG" ID="0xcb1c04fe" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc for node failed! @image_cache_manager.cpp(174),ERROR" ID="0xcb1c0572" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="ImageCacheMalloc for img data failed! @image_cache_manager.cpp(182),ERROR" ID="0xcb1c05b2" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="File is not loaded. File: %s. @image_cache_manager.cpp(224),ERROR" ID="0xcb1c0702" />
+ <MSG STRUCTURE="diag_log_msg2" NAME="MultiImgInfo is nullptr, or resId is invalid. File: %s, ResId: %u. @image_cache_manager.cpp(232),ERROR" ID="0xcb1c0742" />
+ <MSG STRUCTURE="diag_log_msg2" NAME="Node is nullptr. File: %s, ResId: %u. @image_cache_manager.cpp(237),ERROR" ID="0xcb1c076a" />
+ <MSG STRUCTURE="diag_log_msg2" NAME="LoadSingleRes failed. File: %s, ResId: %u. @image_cache_manager.cpp(254),ERROR" ID="0xcb1c07f2" />
+ <MSG STRUCTURE="diag_log_msg2" NAME="LoadOneInMultiRes failed. File: %s, ResId: %u. @image_cache_manager.cpp(260),ERROR" ID="0xcb1c0822" />
+ <MSG STRUCTURE="diag_log_msg3" NAME="Update image info failed. Set img data to nullptr. File: %s, FileLen: %u, ResId: %u. @image_cache_manager.cpp(272),ERROR" ID="0xcb1c0882" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="CreateImageNode failed! @image_cache_manager.cpp(294),ERROR" ID="0xcb1c0932" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="fread info header failed! @image_cache_manager.cpp(312),ERROR" ID="0xcb1c09c2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="LoadAllImgInfo failed! @image_cache_manager.cpp(341),ERROR" ID="0xcb1c0aaa" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="LoadSingleImgInfo failed! node is nullptr or imgIndex is invalid. @image_cache_manager.cpp(349),ERROR" ID="0xcb1c0aea" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="LoadSingleImgInfo failed! @image_cache_manager.cpp(403),ERROR" ID="0xcb1c0c9a" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="LoadAllInMultiRes failed! Open file failed: %s @image_cache_manager.cpp(414),ERROR" ID="0xcb1c0cf2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="fread bin header failed! @image_cache_manager.cpp(426),ERROR" ID="0xcb1c0d52" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="LoadAllImgInfo failed! @image_cache_manager.cpp(445),ERROR" ID="0xcb1c0dea" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="LoadAllInMultiRes failed! file: %s @image_cache_manager.cpp(460),ERROR" ID="0xcb1c0e62" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="Res file is already loaded. @image_cache_manager.cpp(468),WARNING" ID="0xcb1c0ea3" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="CreateImageNode failed! @image_cache_manager.cpp(486),ERROR" ID="0xcb1c0f32" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="memcpy info header failed! @image_cache_manager.cpp(490),ERROR" ID="0xcb1c0f52" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="memcpy img data failed! @image_cache_manager.cpp(495),ERROR" ID="0xcb1c0f7a" />
+ <MSG STRUCTURE="diag_log_msg2" NAME="LoadOneInMultiRes failed! resId: 0x%x, file: %s @image_cache_manager.cpp(584),ERROR" ID="0xcb1c1242" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="CreateImageNode failed! @image_cache_manager.cpp(598),ERROR" ID="0xcb1c12b2" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="Res file is not loaded: %s @image_cache_manager.cpp(655),ERROR" ID="0xcb1c147a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="Res file is not loaded. @image_cache_manager.cpp(683),ERROR" ID="0xcb1c155a" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="Res file is not loaded: %s @image_cache_manager.cpp(710),ERROR" ID="0xcb1c1632" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="Res file is not loaded. @image_cache_manager.cpp(725),ERROR" ID="0xcb1c16aa" />
</MSG_LOG>
\ No newline at end of file
<MSG STRUCTURE="diag_log_msg1" NAME="local dev info write error! ret 0x%x @local_device_manager.c(270),ERROR" ID="0xd8080872" />
<MSG STRUCTURE="diag_log_msg0" NAME="deinit bt stack @local_device_manager.c(306),INFO" ID="0xd8080995" />
<MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(382),ERROR" ID="0xd8080bf2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] ble gap conn state change fail. @local_device_manager.c(401),ERROR" ID="0xd8080c8a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] ble gap conn addr memcpy fail. @local_device_manager.c(410),ERROR" ID="0xd8080cd2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="ble smp can not find connect node by handle @local_device_manager.c(440),ERROR" ID="0xd8080dc2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] ble gap conn addr memcpy fail. @local_device_manager.c(449),ERROR" ID="0xd8080e0a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(470),ERROR" ID="0xd8080eb2" />
- <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(494),ERROR" ID="0xd8080f72" />
- <MSG STRUCTURE="diag_log_msg1" NAME="bt init err ret = %08x @local_device_manager.c(526),ERROR" ID="0xd8081072" />
- <MSG STRUCTURE="diag_log_msg1" NAME="unhandled msg id %x @local_device_manager.c(624),WARNING" ID="0xd8081383" />
- <MSG STRUCTURE="diag_log_msg0" NAME="inquiry complete @local_device_manager.c(632),INFO" ID="0xd80813c5" />
- <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl:0x%08x @local_device_manager.c(639),INFO" ID="0xd80813fd" />
- <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl:0x%08x @local_device_manager.c(653),INFO" ID="0xd808146d" />
- <MSG STRUCTURE="diag_log_msg0" NAME="btsrv_connection_request_ind_callback: memecpy error @local_device_manager.c(667),ERROR" ID="0xd80814da" />
- <MSG STRUCTURE="diag_log_msg4" NAME="addr:****%02x%02x%02x%02x @local_device_manager.c(672),INFO" ID="0xd8081505" />
- <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl:0x%08x @local_device_manager.c(682),INFO" ID="0xd8081555" />
- <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s errr @local_device_manager.c(697),ERROR" ID="0xd80815ca" />
- <MSG STRUCTURE="diag_log_msg0" NAME="malloc errr @local_device_manager.c(711),ERROR" ID="0xd808163a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s errr @local_device_manager.c(717),ERROR" ID="0xd808166a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="malloc errr @local_device_manager.c(746),ERROR" ID="0xd8081752" />
- <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s errr @local_device_manager.c(752),ERROR" ID="0xd8081782" />
- <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(766),INFO" ID="0xd80817f5" />
- <MSG STRUCTURE="diag_log_msg2" NAME="received_bytes: %d sent_bytes: %d @local_device_manager.c(769),INFO" ID="0xd808180d" />
- <MSG STRUCTURE="diag_log_msg1" NAME="unhandled service class 0x%x @local_device_manager.c(795),WARNING" ID="0xd80818db" />
- <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x num_value: %06d @local_device_manager.c(818),INFO" ID="0xd8081995" />
- <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: 0x%08x @local_device_manager.c(825),INFO" ID="0xd80819cd" />
- <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: 0x%08x @local_device_manager.c(832),INFO" ID="0xd8081a05" />
- <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x num_value: %06d @local_device_manager.c(838),INFO" ID="0xd8081a35" />
- <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x reason: %x @local_device_manager.c(852),INFO" ID="0xd8081aa5" />
- <MSG STRUCTURE="diag_log_msg1" NAME="white_list_size:%d @local_device_manager.c(858),INFO" ID="0xd8081ad5" />
- <MSG STRUCTURE="diag_log_msg1" NAME="transmit_power_level:%d @local_device_manager.c(863),INFO" ID="0xd8081afd" />
- <MSG STRUCTURE="diag_log_msg2" NAME="register err id: %x ret: %x @local_device_manager.c(894),ERROR" ID="0xd8081bf2" />
- <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(929),ERROR" ID="0xd8081d0a" />
- <MSG STRUCTURE="diag_log_msg1" NAME="bt_init err ret = %08x @local_device_manager.c(959),ERROR" ID="0xd8081dfa" />
- <MSG STRUCTURE="diag_log_msg1" NAME="buff is't long enough, need length:%d. @local_device_manager.c(1067),ERROR" ID="0xd808215a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="get local name memcpy fail. @local_device_manager.c(1071),ERROR" ID="0xd808217a" />
- <MSG STRUCTURE="diag_log_msg2" NAME="name: %s, length: %d @local_device_manager.c(1080),INFO" ID="0xd80821c5" />
- <MSG STRUCTURE="diag_log_msg0" NAME="failed: bt not enabled @local_device_manager.c(1095),INFO" ID="0xd808223d" />
- <MSG STRUCTURE="diag_log_msg1" NAME="local name null or length not match, len: %d @local_device_manager.c(1099),INFO" ID="0xd808225d" />
- <MSG STRUCTURE="diag_log_msg1" NAME="returns error ret: %x @local_device_manager.c(1105),WARNING" ID="0xd808228b" />
- <MSG STRUCTURE="diag_log_msg3" NAME="set result name: "%s" name_len: %d get_re: %x @local_device_manager.c(1111),INFO" ID="0xd80822bd" />
- <MSG STRUCTURE="diag_log_msg0" NAME="gap_remove_all_pairs fail @local_device_manager.c(1171),ERROR" ID="0xd808249a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="gap ble remove all pairs fail @local_device_manager.c(1177),ERROR" ID="0xd80824ca" />
- <MSG STRUCTURE="diag_log_msg1" NAME="diable_bt_ret(errcode_t): %x @local_device_manager.c(1184),INFO" ID="0xd8082505" />
- <MSG STRUCTURE="diag_log_msg1" NAME="disable_ble_ret(errcode_t): %x @local_device_manager.c(1189),INFO" ID="0xd808252d" />
- <MSG STRUCTURE="diag_log_msg0" NAME="set discovery data pointer is null. @local_device_manager.c(1220),ERROR" ID="0xd8082622" />
- <MSG STRUCTURE="diag_log_msg1" NAME="adv_id(%d) advertising, please stop first. @local_device_manager.c(1238),ERROR" ID="0xd80826b2" />
- <MSG STRUCTURE="diag_log_msg1" NAME="adv data alloc faild, length:%d @local_device_manager.c(1251),ERROR" ID="0xd808271a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap_ble_set_adv_data adv data memcpy_s fail @local_device_manager.c(1255),ERROR" ID="0xd808273a" />
- <MSG STRUCTURE="diag_log_msg1" NAME="scan rsp data alloc faild, length:%d @local_device_manager.c(1264),ERROR" ID="0xd8082782" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap_ble_set_adv_data scan rsp data memcpy_s fail @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(1307),ERROR" ID="0xd80828da" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap ble set adv param memcpy_s fail @local_device_manager.c(1319),ERROR" ID="0xd808293a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap ble set adv param memcpy_s fail @local_device_manager.c(1333),ERROR" ID="0xd80829aa" />
- <MSG STRUCTURE="diag_log_msg0" NAME="ble gap set sec param error param NULL @local_device_manager.c(1355),ERROR" ID="0xd8082a5a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="ble gap set sec param error param NULL @local_device_manager.c(1360),ERROR" ID="0xd8082a82" />
- <MSG STRUCTURE="diag_log_msg0" NAME="bt has page scanning enabled. @local_device_manager.c(1384),ERROR" ID="0xd8082b42" />
- <MSG STRUCTURE="diag_log_msg0" NAME="bt has an ACL connection. @local_device_manager.c(1390),ERROR" ID="0xd8082b72" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[CTKD] please set ble secure connection enable,current_sc=%d. @local_device_manager.c(1407),ERROR" ID="0xd8082bfa" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[BT] flow limit range is [3072-10240] bytes. @local_device_manager.c(1425),ERROR" ID="0xd8082c8a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap set adv data memcpy_s fail @local_device_manager.c(1444),ERROR" ID="0xd8082d22" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap set scan rsp data memcpy_s fail @local_device_manager.c(1451),ERROR" ID="0xd8082d5a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[Error] btsrv_gap_set_adv_param memcpy_s fail @local_device_manager.c(1470),ERROR" ID="0xd8082df2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap set adv param memcpy_s fail @local_device_manager.c(1475),ERROR" ID="0xd8082e1a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt memcpy fail @local_device_manager.c(1495),ERROR" ID="0xd8082eba" />
- <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt memcpy fail @local_device_manager.c(1510),ERROR" ID="0xd8082f32" />
- <MSG STRUCTURE="diag_log_msg0" NAME="ble gap adv set terminated cbk param error @local_device_manager.c(1522),ERROR" ID="0xd8082f92" />
- <MSG STRUCTURE="diag_log_msg0" NAME="ble enable cbk param error @local_device_manager.c(1533),ERROR" ID="0xd8082fea" />
- <MSG STRUCTURE="diag_log_msg0" NAME="ble read remote rssi cbk param error @local_device_manager.c(1544),ERROR" ID="0xd8083042" />
- <MSG STRUCTURE="diag_log_msg0" NAME="ble conn param update cbk param error @local_device_manager.c(1560),ERROR" ID="0xd80830c2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="ble gap conn param malloc fail @local_device_manager.c(1574),ERROR" ID="0xd8083132" />
- <MSG STRUCTURE="diag_log_msg3" NAME="ble conn param update cbk interval:%x, latency:%x, timeout:%x @local_device_manager.c(1581),INFO" ID="0xd808316d" />
- <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(1615),ERROR" ID="0xd808327a" />
- <MSG STRUCTURE="diag_log_msg1" NAME="adv id(%d) is discoverying, please stop first. @local_device_manager.c(1619),ERROR" ID="0xd808329a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="adv param alloc fail @local_device_manager.c(1628),ERROR" ID="0xd80832e2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] ble gap conn state change fail. @local_device_manager.c(409),ERROR" ID="0xd8080cca" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] ble gap conn addr memcpy fail. @local_device_manager.c(418),ERROR" ID="0xd8080d12" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="ble smp can not find connect node by handle @local_device_manager.c(448),ERROR" ID="0xd8080e02" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] ble gap conn addr memcpy fail. @local_device_manager.c(457),ERROR" ID="0xd8080e4a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(478),ERROR" ID="0xd8080ef2" />
+ <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(502),ERROR" ID="0xd8080fb2" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="bt init err ret = %08x @local_device_manager.c(534),ERROR" ID="0xd80810b2" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="unhandled msg id %x @local_device_manager.c(632),WARNING" ID="0xd80813c3" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="inquiry complete @local_device_manager.c(640),INFO" ID="0xd8081405" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl:0x%08x @local_device_manager.c(647),INFO" ID="0xd808143d" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl:0x%08x @local_device_manager.c(661),INFO" ID="0xd80814ad" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="btsrv_connection_request_ind_callback: memecpy error @local_device_manager.c(675),ERROR" ID="0xd808151a" />
+ <MSG STRUCTURE="diag_log_msg4" NAME="addr:****%02x%02x%02x%02x @local_device_manager.c(680),INFO" ID="0xd8081545" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl:0x%08x @local_device_manager.c(690),INFO" ID="0xd8081595" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s errr @local_device_manager.c(705),ERROR" ID="0xd808160a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="malloc errr @local_device_manager.c(719),ERROR" ID="0xd808167a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s errr @local_device_manager.c(725),ERROR" ID="0xd80816aa" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="malloc errr @local_device_manager.c(754),ERROR" ID="0xd8081792" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s errr @local_device_manager.c(760),ERROR" ID="0xd80817c2" />
+ <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(774),INFO" ID="0xd8081835" />
+ <MSG STRUCTURE="diag_log_msg2" NAME="received_bytes: %d sent_bytes: %d @local_device_manager.c(777),INFO" ID="0xd808184d" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="unhandled service class 0x%x @local_device_manager.c(803),WARNING" ID="0xd808191b" />
+ <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x num_value: %06d @local_device_manager.c(826),INFO" ID="0xd80819d5" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: 0x%08x @local_device_manager.c(833),INFO" ID="0xd8081a0d" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: 0x%08x @local_device_manager.c(840),INFO" ID="0xd8081a45" />
+ <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x num_value: %06d @local_device_manager.c(846),INFO" ID="0xd8081a75" />
+ <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x reason: %x @local_device_manager.c(860),INFO" ID="0xd8081ae5" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="white_list_size:%d @local_device_manager.c(866),INFO" ID="0xd8081b15" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="transmit_power_level:%d @local_device_manager.c(871),INFO" ID="0xd8081b3d" />
+ <MSG STRUCTURE="diag_log_msg2" NAME="register err id: %x ret: %x @local_device_manager.c(902),ERROR" ID="0xd8081c32" />
+ <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(937),ERROR" ID="0xd8081d4a" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="bt_init err ret = %08x @local_device_manager.c(967),ERROR" ID="0xd8081e3a" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="buff is't long enough, need length:%d. @local_device_manager.c(1075),ERROR" ID="0xd808219a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="get local name memcpy fail. @local_device_manager.c(1079),ERROR" ID="0xd80821ba" />
+ <MSG STRUCTURE="diag_log_msg2" NAME="name: %s, length: %d @local_device_manager.c(1088),INFO" ID="0xd8082205" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="failed: bt not enabled @local_device_manager.c(1103),INFO" ID="0xd808227d" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="local name null or length not match, len: %d @local_device_manager.c(1107),INFO" ID="0xd808229d" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="returns error ret: %x @local_device_manager.c(1113),WARNING" ID="0xd80822cb" />
+ <MSG STRUCTURE="diag_log_msg3" NAME="set result name: "%s" name_len: %d get_re: %x @local_device_manager.c(1119),INFO" ID="0xd80822fd" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="gap_remove_all_pairs fail @local_device_manager.c(1179),ERROR" ID="0xd80824da" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="gap ble remove all pairs fail @local_device_manager.c(1185),ERROR" ID="0xd808250a" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="diable_bt_ret(errcode_t): %x @local_device_manager.c(1192),INFO" ID="0xd8082545" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="disable_ble_ret(errcode_t): %x @local_device_manager.c(1197),INFO" ID="0xd808256d" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="set discovery data pointer is null. @local_device_manager.c(1228),ERROR" ID="0xd8082662" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="adv_id(%d) advertising, please stop first. @local_device_manager.c(1246),ERROR" ID="0xd80826f2" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="adv data alloc faild, length:%d @local_device_manager.c(1259),ERROR" ID="0xd808275a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap_ble_set_adv_data adv data memcpy_s fail @local_device_manager.c(1263),ERROR" ID="0xd808277a" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="scan rsp data alloc faild, length:%d @local_device_manager.c(1272),ERROR" ID="0xd80827c2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap_ble_set_adv_data scan rsp data memcpy_s fail @local_device_manager.c(1276),ERROR" ID="0xd80827e2" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="adv_id(%d) advertising, please stop first. @local_device_manager.c(1315),ERROR" ID="0xd808291a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap ble set adv param memcpy_s fail @local_device_manager.c(1327),ERROR" ID="0xd808297a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap ble set adv param memcpy_s fail @local_device_manager.c(1341),ERROR" ID="0xd80829ea" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="ble gap set sec param error param NULL @local_device_manager.c(1363),ERROR" ID="0xd8082a9a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="ble gap set sec param error param NULL @local_device_manager.c(1368),ERROR" ID="0xd8082ac2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="bt has page scanning enabled. @local_device_manager.c(1392),ERROR" ID="0xd8082b82" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="bt has an ACL connection. @local_device_manager.c(1398),ERROR" ID="0xd8082bb2" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[CTKD] please set ble secure connection enable,current_sc=%d. @local_device_manager.c(1415),ERROR" ID="0xd8082c3a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[BT] flow limit range is [3072-10240] bytes. @local_device_manager.c(1433),ERROR" ID="0xd8082cca" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap set adv data memcpy_s fail @local_device_manager.c(1452),ERROR" ID="0xd8082d62" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap set scan rsp data memcpy_s fail @local_device_manager.c(1459),ERROR" ID="0xd8082d9a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[Error] btsrv_gap_set_adv_param memcpy_s fail @local_device_manager.c(1478),ERROR" ID="0xd8082e32" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap set adv param memcpy_s fail @local_device_manager.c(1483),ERROR" ID="0xd8082e5a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt malloc fail @local_device_manager.c(1521),ERROR" ID="0xd8082f8a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt memcpy fail @local_device_manager.c(1526),ERROR" ID="0xd8082fb2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt memcpy fail @local_device_manager.c(1532),ERROR" ID="0xd8082fe2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt malloc fail @local_device_manager.c(1543),ERROR" ID="0xd808303a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt memcpy fail @local_device_manager.c(1548),ERROR" ID="0xd8083062" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="ble gap adv set terminated cbk param error @local_device_manager.c(1568),ERROR" ID="0xd8083102" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="ble enable cbk param error @local_device_manager.c(1579),ERROR" ID="0xd808315a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="ble read remote rssi cbk param error @local_device_manager.c(1590),ERROR" ID="0xd80831b2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="ble conn param update cbk param error @local_device_manager.c(1606),ERROR" ID="0xd8083232" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="ble gap conn param malloc fail @local_device_manager.c(1620),ERROR" ID="0xd80832a2" />
+ <MSG STRUCTURE="diag_log_msg3" NAME="ble conn param update cbk interval:%x, latency:%x, timeout:%x @local_device_manager.c(1627),INFO" ID="0xd80832dd" />
<MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(1661),ERROR" ID="0xd80833ea" />
- <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(1667),ERROR" ID="0xd808341a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="mc sdk ble stop adv atb failed @local_device_manager.c(1673),ERROR" ID="0xd808344a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="scanning in process, please stop first. @local_device_manager.c(1707),ERROR" ID="0xd808355a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="scanning already stopped. @local_device_manager.c(1739),ERROR" ID="0xd808365a" />
- <MSG STRUCTURE="diag_log_msg1" NAME="ble stop extern scan ret: %#x @local_device_manager.c(1743),INFO" ID="0xd808367d" />
- <MSG STRUCTURE="diag_log_msg0" NAME="ble set phy node == NULL @local_device_manager.c(1768),ERROR" ID="0xd8083742" />
- <MSG STRUCTURE="diag_log_msg0" NAME="ble set phy memcpy fail @local_device_manager.c(1774),ERROR" ID="0xd8083772" />
- <MSG STRUCTURE="diag_log_msg5" NAME="ble general set phy hdl:%x all:%x rx:%x tx:%x op:%x. @local_device_manager.c(1780),INFO" ID="0xd80837a5" />
- <MSG STRUCTURE="diag_log_msg1" NAME="ble set phy ret: %#x @local_device_manager.c(1783),ERROR" ID="0xd80837ba" />
- <MSG STRUCTURE="diag_log_msg0" NAME="ble set data length node == NULL @local_device_manager.c(1805),ERROR" ID="0xd808386a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="ble set data length memcpy fail @local_device_manager.c(1811),ERROR" ID="0xd808389a" />
- <MSG STRUCTURE="diag_log_msg3" NAME="ble general set len hdl:%x maxoct:%x maxtime:%x @local_device_manager.c(1817),INFO" ID="0xd80838cd" />
- <MSG STRUCTURE="diag_log_msg1" NAME="ble set len ret: %#x @local_device_manager.c(1820),ERROR" ID="0xd80838e2" />
- <MSG STRUCTURE="diag_log_msg1" NAME="bts sert log type levle:%x @local_device_manager.c(1838),INFO" ID="0xd8083975" />
- <MSG STRUCTURE="diag_log_msg1" NAME="g_bts_feature_bitmap bt_auto_reconnect_closed:%d. @local_device_manager.c(1859),ERROR" ID="0xd8083a1a" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="adv id(%d) is discoverying, please stop first. @local_device_manager.c(1665),ERROR" ID="0xd808340a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="adv param alloc fail @local_device_manager.c(1674),ERROR" ID="0xd8083452" />
+ <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_msg2" NAME="no advertising in progress or advertising for adv_id(%d). No advertising for adv_id(%d). @local_device_manager.c(1713),ERROR" ID="0xd808358a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="mc sdk ble stop adv atb failed @local_device_manager.c(1719),ERROR" ID="0xd80835ba" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="scanning in process, please stop first. @local_device_manager.c(1753),ERROR" ID="0xd80836ca" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="scanning already stopped. @local_device_manager.c(1786),ERROR" ID="0xd80837d2" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="ble stop extern scan ret: %#x @local_device_manager.c(1790),INFO" ID="0xd80837f5" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="ble set phy node == NULL @local_device_manager.c(1815),ERROR" ID="0xd80838ba" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="ble set phy memcpy fail @local_device_manager.c(1821),ERROR" ID="0xd80838ea" />
+ <MSG STRUCTURE="diag_log_msg5" NAME="ble general set phy hdl:%x all:%x rx:%x tx:%x op:%x. @local_device_manager.c(1827),INFO" ID="0xd808391d" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="ble set phy ret: %#x @local_device_manager.c(1830),ERROR" ID="0xd8083932" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="ble set data length node == NULL @local_device_manager.c(1852),ERROR" ID="0xd80839e2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="ble set data length memcpy fail @local_device_manager.c(1858),ERROR" ID="0xd8083a12" />
+ <MSG STRUCTURE="diag_log_msg3" NAME="ble general set len hdl:%x maxoct:%x maxtime:%x @local_device_manager.c(1864),INFO" ID="0xd8083a45" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="ble set len ret: %#x @local_device_manager.c(1867),ERROR" ID="0xd8083a5a" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="bts sert log type levle:%x @local_device_manager.c(1885),INFO" ID="0xd8083aed" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="g_bts_feature_bitmap bt_auto_reconnect_closed:%d. @local_device_manager.c(1906),ERROR" ID="0xd8083b92" />
</MSG_LOG>
\ No newline at end of file
<MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for buffer failed. @map_svg_parser.cpp(284),ERROR" ID="0xcb4a08e2" />
<MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(295),ERROR" ID="0xcb4a093a" />
<MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(302),ERROR" ID="0xcb4a0972" />
- <MSG STRUCTURE="diag_log_msg0" NAME="read map path array faild @map_svg_parser.cpp(311),ERROR" ID="0xcb4a09ba" />
- <MSG STRUCTURE="diag_log_msg0" NAME="alloc path faild @map_svg_parser.cpp(318),ERROR" ID="0xcb4a09f2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="read path cmd faild @map_svg_parser.cpp(324),ERROR" ID="0xcb4a0a22" />
- <MSG STRUCTURE="diag_log_msg0" NAME="read path data faild @map_svg_parser.cpp(330),ERROR" ID="0xcb4a0a52" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(341),ERROR" ID="0xcb4a0aaa" />
- <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(348),ERROR" ID="0xcb4a0ae2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map path array faild @map_svg_parser.cpp(356),ERROR" ID="0xcb4a0b22" />
- <MSG STRUCTURE="diag_log_msg0" NAME="alloc path faild @map_svg_parser.cpp(366),ERROR" ID="0xcb4a0b72" />
- <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s path cmd faild @map_svg_parser.cpp(371),ERROR" ID="0xcb4a0b9a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s path data faild @map_svg_parser.cpp(378),ERROR" ID="0xcb4a0bd2" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(413),ERROR" ID="0xcb4a0cea" />
- <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(420),ERROR" ID="0xcb4a0d22" />
- <MSG STRUCTURE="diag_log_msg0" NAME="read map text array faild @map_svg_parser.cpp(429),ERROR" ID="0xcb4a0d6a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path cmd faild @map_svg_parser.cpp(436),ERROR" ID="0xcb4a0da2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="read text faild @map_svg_parser.cpp(443),ERROR" ID="0xcb4a0dda" />
- <MSG STRUCTURE="diag_log_msg0" NAME="malloc text offset faild @map_svg_parser.cpp(451),ERROR" ID="0xcb4a0e1a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="read text offset faild @map_svg_parser.cpp(457),ERROR" ID="0xcb4a0e4a" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(468),ERROR" ID="0xcb4a0ea2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(475),ERROR" ID="0xcb4a0eda" />
- <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(483),ERROR" ID="0xcb4a0f1a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path cmd faild @map_svg_parser.cpp(492),ERROR" ID="0xcb4a0f62" />
- <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s text faild @map_svg_parser.cpp(497),ERROR" ID="0xcb4a0f8a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="malloc text offset faild @map_svg_parser.cpp(507),ERROR" ID="0xcb4a0fda" />
- <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s text offset faild @map_svg_parser.cpp(512),ERROR" ID="0xcb4a1002" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(546),ERROR" ID="0xcb4a1112" />
- <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(553),ERROR" ID="0xcb4a114a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="read map image array faild @map_svg_parser.cpp(558),ERROR" ID="0xcb4a1172" />
- <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(566),ERROR" ID="0xcb4a11b2" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(595),ERROR" ID="0xcb4a129a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(602),ERROR" ID="0xcb4a12d2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(607),ERROR" ID="0xcb4a12fa" />
- <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(615),ERROR" ID="0xcb4a133a" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(647),ERROR" ID="0xcb4a143a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(654),ERROR" ID="0xcb4a1472" />
- <MSG STRUCTURE="diag_log_msg0" NAME="read map road array faild @map_svg_parser.cpp(659),ERROR" ID="0xcb4a149a" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(669),ERROR" ID="0xcb4a14ea" />
- <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(676),ERROR" ID="0xcb4a1522" />
- <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(681),ERROR" ID="0xcb4a154a" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(700),ERROR" ID="0xcb4a15e2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(707),ERROR" ID="0xcb4a161a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="read map poi array faild @map_svg_parser.cpp(712),ERROR" ID="0xcb4a1642" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(722),ERROR" ID="0xcb4a1692" />
- <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(729),ERROR" ID="0xcb4a16ca" />
- <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(734),ERROR" ID="0xcb4a16f2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="read map path array faild @map_svg_parser.cpp(312),ERROR" ID="0xcb4a09c2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="alloc path faild @map_svg_parser.cpp(319),ERROR" ID="0xcb4a09fa" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="read path cmd faild @map_svg_parser.cpp(325),ERROR" ID="0xcb4a0a2a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="read path data faild @map_svg_parser.cpp(331),ERROR" ID="0xcb4a0a5a" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(342),ERROR" ID="0xcb4a0ab2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(349),ERROR" ID="0xcb4a0aea" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map path array faild @map_svg_parser.cpp(358),ERROR" ID="0xcb4a0b32" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="alloc path faild @map_svg_parser.cpp(368),ERROR" ID="0xcb4a0b82" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s path cmd faild @map_svg_parser.cpp(373),ERROR" ID="0xcb4a0baa" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s path data faild @map_svg_parser.cpp(380),ERROR" ID="0xcb4a0be2" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(415),ERROR" ID="0xcb4a0cfa" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(422),ERROR" ID="0xcb4a0d32" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="read map text array faild @map_svg_parser.cpp(432),ERROR" ID="0xcb4a0d82" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path cmd faild @map_svg_parser.cpp(439),ERROR" ID="0xcb4a0dba" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="read text faild @map_svg_parser.cpp(445),ERROR" ID="0xcb4a0dea" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="malloc text offset faild @map_svg_parser.cpp(453),ERROR" ID="0xcb4a0e2a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="read text offset faild @map_svg_parser.cpp(459),ERROR" ID="0xcb4a0e5a" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(470),ERROR" ID="0xcb4a0eb2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(477),ERROR" ID="0xcb4a0eea" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(486),ERROR" ID="0xcb4a0f32" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path cmd faild @map_svg_parser.cpp(495),ERROR" ID="0xcb4a0f7a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s text faild @map_svg_parser.cpp(499),ERROR" ID="0xcb4a0f9a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="malloc text offset faild @map_svg_parser.cpp(509),ERROR" ID="0xcb4a0fea" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s text offset faild @map_svg_parser.cpp(514),ERROR" ID="0xcb4a1012" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(548),ERROR" ID="0xcb4a1122" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(555),ERROR" ID="0xcb4a115a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="read map image array faild @map_svg_parser.cpp(560),ERROR" ID="0xcb4a1182" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(568),ERROR" ID="0xcb4a11c2" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(597),ERROR" ID="0xcb4a12aa" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(604),ERROR" ID="0xcb4a12e2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(609),ERROR" ID="0xcb4a130a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(617),ERROR" ID="0xcb4a134a" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(649),ERROR" ID="0xcb4a144a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(656),ERROR" ID="0xcb4a1482" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="read map road array faild @map_svg_parser.cpp(661),ERROR" ID="0xcb4a14aa" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(671),ERROR" ID="0xcb4a14fa" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(678),ERROR" ID="0xcb4a1532" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(683),ERROR" ID="0xcb4a155a" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(702),ERROR" ID="0xcb4a15f2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(709),ERROR" ID="0xcb4a162a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="read map poi array faild @map_svg_parser.cpp(714),ERROR" ID="0xcb4a1652" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(724),ERROR" ID="0xcb4a16a2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(731),ERROR" ID="0xcb4a16da" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(736),ERROR" ID="0xcb4a1702" />
</MSG_LOG>
\ No newline at end of file
<MSG STRUCTURE="diag_log_msg0" NAME="[Core] ble general: mc ble conn state. @sdk_general_gap.c(239),INFO" ID="0xd86c077d" />
<MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble conn state fail. len = %u @sdk_general_gap.c(242),ERROR" ID="0xd86c0792" />
<MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble conn state memcpy fail: %d @sdk_general_gap.c(248),ERROR" ID="0xd86c07c2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[Core] ble general: gap general interface. @sdk_general_gap.c(259),INFO" ID="0xd86c081d" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: gap general interface fail. len = %u @sdk_general_gap.c(262),ERROR" ID="0xd86c0832" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: gap general interface fail. len = %u @sdk_general_gap.c(268),ERROR" ID="0xd86c0862" />
- <MSG STRUCTURE="diag_log_msg4" NAME="[ACore] ble general: gap ext adv report. addr_type:0x%x addr:0x%02x:**:**:**:**:%02x data_len:0x%02x @sdk_general_gap.c(273),INFO" ID="0xd86c088d" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: gap adv set terminated fail. len = %u @sdk_general_gap.c(283),ERROR" ID="0xd86c08da" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: gap adv set terminated status: %u @sdk_general_gap.c(288),INFO" ID="0xd86c0905" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble smp passkey req bta fail. len = %u @sdk_general_gap.c(299),ERROR" ID="0xd86c095a" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble smp passkey req bta. rmt_dev_handle = 0x%x @sdk_general_gap.c(305),INFO" ID="0xd86c098d" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble smp passkey notify bta fail. len = %u @sdk_general_gap.c(319),ERROR" ID="0xd86c09fa" />
- <MSG STRUCTURE="diag_log_msg2" NAME="[ACore] ble general: mc ble smp passkey notify bta. rmt_dev_handle = 0x%x, number = %u @sdk_general_gap.c(326),INFO" ID="0xd86c0a35" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble smp pair keys bta fail. len = %u @sdk_general_gap.c(338),ERROR" ID="0xd86c0a92" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] ble general: mc ble smp pair keys addr memcpy fail. @sdk_general_gap.c(345),ERROR" ID="0xd86c0aca" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] ble general: mc ble smp pair keys memcpy fail. @sdk_general_gap.c(351),ERROR" ID="0xd86c0afa" />
- <MSG STRUCTURE="diag_log_msg3" NAME="[ACore] ble general: mc ble smp pair keys bta. addr:%02x:**:**:**:%02x:%02x @sdk_general_gap.c(355),INFO" ID="0xd86c0b1d" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble smp pair complete bta fail. len = %u @sdk_general_gap.c(366),ERROR" ID="0xd86c0b72" />
- <MSG STRUCTURE="diag_log_msg2" NAME="[ACore] ble general: mc ble smp pair complete bta. rmt_dev_handle = 0x%x, result = 0x%x @sdk_general_gap.c(373),INFO" ID="0xd86c0bad" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble gap get apperance fail. len = %u @sdk_general_gap.c(383),ERROR" ID="0xd86c0bfa" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble gap get apperance apperance = %u @sdk_general_gap.c(388),ERROR" ID="0xd86c0c22" />
- <MSG STRUCTURE="diag_log_msg2" NAME="[Core] ble general: mc ble gap get white list pkt_len = %d, sizeof(bth_gap_white_addr_list) = %d @sdk_general_gap.c(398),INFO" ID="0xd86c0c75" />
- <MSG STRUCTURE="diag_log_msg1" NAME="mc ble gap get white list: count = %d. @sdk_general_gap.c(401),INFO" ID="0xd86c0c8d" />
- <MSG STRUCTURE="diag_log_msg3" NAME="mc ble gap get white list addr:0x%x:**:**:**:0x%x:0x%x. @sdk_general_gap.c(405),INFO" ID="0xd86c0cad" />
- <MSG STRUCTURE="diag_log_msg2" NAME="[ACore] ble conn general gap proc:cmdid:0x%02X pay_len:%d. @sdk_general_gap.c(427),INFO" ID="0xd86c0d5d" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble conn general gap proc no handle for command id:0x%02x. @sdk_general_gap.c(442),INFO" ID="0xd86c0dd5" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp pair remote device atb. @sdk_general_gap.c(521),INFO" ID="0xd86c104d" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp passkey number atb. @sdk_general_gap.c(529),INFO" ID="0xd86c108d" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp send passkey number did not receive passkey req. @sdk_general_gap.c(541),INFO" ID="0xd86c10ed" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp remove pair info atb. @sdk_general_gap.c(554),INFO" ID="0xd86c1155" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp remove pair device atb. @sdk_general_gap.c(566),INFO" ID="0xd86c11b5" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble disc all links atb. @sdk_general_gap.c(575),INFO" ID="0xd86c11fd" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp set key from btc atb. @sdk_general_gap.c(606),INFO" ID="0xd86c12f5" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble remove adv by handle atb. @sdk_general_gap.c(616),INFO" ID="0xd86c1345" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble disable adv by handle atb. @sdk_general_gap.c(623),INFO" ID="0xd86c137d" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[warning] uapi disconnect ble link conn_node not found disc all. @sdk_general_gap.c(746),INFO" ID="0xd86c1755" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[error] uapi disconnect ble link addr memcpy fail. @sdk_general_gap.c(752),INFO" ID="0xd86c1785" />
- <MSG STRUCTURE="diag_log_msg1" NAME="[INFO] uapi disconnect ble link ret:%u. @sdk_general_gap.c(757),INFO" ID="0xd86c17ad" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] ble general: set ble sec param comes. @sdk_general_gap.c(769),INFO" ID="0xd86c180d" />
- <MSG STRUCTURE="diag_log_msg0" NAME="[Error] bt at cmd set ble sec param fail, value is null! @sdk_general_gap.c(772),ERROR" ID="0xd86c1822" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: gap general interface fail. len = %u @sdk_general_gap.c(260),ERROR" ID="0xd86c0822" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: gap general interface fail. len = %u @sdk_general_gap.c(266),ERROR" ID="0xd86c0852" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: gap adv set terminated fail. len = %u @sdk_general_gap.c(279),ERROR" ID="0xd86c08ba" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: gap adv set terminated status: %u @sdk_general_gap.c(284),INFO" ID="0xd86c08e5" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble smp passkey req bta fail. len = %u @sdk_general_gap.c(295),ERROR" ID="0xd86c093a" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble smp passkey req bta. rmt_dev_handle = 0x%x @sdk_general_gap.c(301),INFO" ID="0xd86c096d" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble smp passkey notify bta fail. len = %u @sdk_general_gap.c(315),ERROR" ID="0xd86c09da" />
+ <MSG STRUCTURE="diag_log_msg2" NAME="[ACore] ble general: mc ble smp passkey notify bta. rmt_dev_handle = 0x%x, number = %u @sdk_general_gap.c(322),INFO" ID="0xd86c0a15" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble smp pair keys bta fail. len = %u @sdk_general_gap.c(334),ERROR" ID="0xd86c0a72" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] ble general: mc ble smp pair keys addr memcpy fail. @sdk_general_gap.c(341),ERROR" ID="0xd86c0aaa" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] ble general: mc ble smp pair keys memcpy fail. @sdk_general_gap.c(347),ERROR" ID="0xd86c0ada" />
+ <MSG STRUCTURE="diag_log_msg3" NAME="[ACore] ble general: mc ble smp pair keys bta. addr:%02x:**:**:**:%02x:%02x @sdk_general_gap.c(351),INFO" ID="0xd86c0afd" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble smp pair complete bta fail. len = %u @sdk_general_gap.c(362),ERROR" ID="0xd86c0b52" />
+ <MSG STRUCTURE="diag_log_msg2" NAME="[ACore] ble general: mc ble smp pair complete bta. rmt_dev_handle = 0x%x, result = 0x%x @sdk_general_gap.c(369),INFO" ID="0xd86c0b8d" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble gap get apperance fail. len = %u @sdk_general_gap.c(379),ERROR" ID="0xd86c0bda" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble general: mc ble gap get apperance apperance = %u @sdk_general_gap.c(384),ERROR" ID="0xd86c0c02" />
+ <MSG STRUCTURE="diag_log_msg2" NAME="[Core] ble general: mc ble gap get white list pkt_len = %d, sizeof(bth_gap_white_addr_list) = %d @sdk_general_gap.c(394),INFO" ID="0xd86c0c55" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="mc ble gap get white list: count = %d. @sdk_general_gap.c(397),INFO" ID="0xd86c0c6d" />
+ <MSG STRUCTURE="diag_log_msg3" NAME="mc ble gap get white list addr:0x%x:**:**:**:0x%x:0x%x. @sdk_general_gap.c(401),INFO" ID="0xd86c0c8d" />
+ <MSG STRUCTURE="diag_log_msg2" NAME="[ACore] ble conn general gap proc:cmdid:0x%02X pay_len:%d. @sdk_general_gap.c(423),INFO" ID="0xd86c0d3d" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble conn general gap proc no handle for command id:0x%02x. @sdk_general_gap.c(438),INFO" ID="0xd86c0db5" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp pair remote device atb. @sdk_general_gap.c(517),INFO" ID="0xd86c102d" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp passkey number atb. @sdk_general_gap.c(525),INFO" ID="0xd86c106d" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp send passkey number did not receive passkey req. @sdk_general_gap.c(537),INFO" ID="0xd86c10cd" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp remove pair info atb. @sdk_general_gap.c(550),INFO" ID="0xd86c1135" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp remove pair device atb. @sdk_general_gap.c(562),INFO" ID="0xd86c1195" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble disc all links atb. @sdk_general_gap.c(571),INFO" ID="0xd86c11dd" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble smp set key from btc atb. @sdk_general_gap.c(602),INFO" ID="0xd86c12d5" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble remove adv by handle atb. @sdk_general_gap.c(612),INFO" ID="0xd86c1325" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble disable adv by handle atb. @sdk_general_gap.c(619),INFO" ID="0xd86c135d" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[warning] uapi disconnect ble link conn_node not found disc all. @sdk_general_gap.c(742),INFO" ID="0xd86c1735" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[error] uapi disconnect ble link addr memcpy fail. @sdk_general_gap.c(748),INFO" ID="0xd86c1765" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="[INFO] uapi disconnect ble link ret:%u. @sdk_general_gap.c(753),INFO" ID="0xd86c178d" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] ble general: set ble sec param comes. @sdk_general_gap.c(765),INFO" ID="0xd86c17ed" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="[Error] bt at cmd set ble sec param fail, value is null! @sdk_general_gap.c(768),ERROR" ID="0xd86c1802" />
</MSG_LOG>
\ No newline at end of file
-<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="osal_sem_init error %x @spp_service.c(86),ERROR" ID="0xd82a02b2" />
- <MSG STRUCTURE="diag_log_msg1" NAME="osal_sem_down error %x @spp_service.c(110),ERROR" ID="0xd82a0372" />
- <MSG STRUCTURE="diag_log_msg0" NAME="client num reached max limit @spp_service.c(134),ERROR" ID="0xd82a0432" />
- <MSG STRUCTURE="diag_log_msg0" NAME="client malloc fail @spp_service.c(140),ERROR" ID="0xd82a0462" />
- <MSG STRUCTURE="diag_log_msg0" NAME="uuid memcpy fail @spp_service.c(147),ERROR" ID="0xd82a049a" />
- <MSG STRUCTURE="diag_log_msg1" NAME="spp client %x add success @spp_service.c(158),INFO" ID="0xd82a04f5" />
- <MSG STRUCTURE="diag_log_msg1" NAME="uuid=%s @spp_service.c(182),INFO" ID="0xd82a05b5" />
- <MSG STRUCTURE="diag_log_msg0" NAME="client_id invalid @spp_service.c(237),ERROR" ID="0xd82a076a" />
- <MSG STRUCTURE="diag_log_msg1" NAME="sleep too long. %d ms. @spp_service.c(250),WARNING" ID="0xd82a07d3" />
- <MSG STRUCTURE="diag_log_msg1" NAME="spp client %x delete success @spp_service.c(256),INFO" ID="0xd82a0805" />
- <MSG STRUCTURE="diag_log_msg0" NAME="add client fail @spp_service.c(265),ERROR" ID="0xd82a084a" />
- <MSG STRUCTURE="diag_log_msg1" NAME="spp server %x add success @spp_service.c(295),INFO" ID="0xd82a093d" />
- <MSG STRUCTURE="diag_log_msg1" NAME="spp server %x add fail @spp_service.c(298),ERROR" ID="0xd82a0952" />
- <MSG STRUCTURE="diag_log_msg1" NAME="sleep too long. %d ms. @spp_service.c(339),WARNING" ID="0xd82a0a9b" />
- <MSG STRUCTURE="diag_log_msg1" NAME="unregister spp service ret: %x @spp_service.c(346),WARNING" ID="0xd82a0ad3" />
- <MSG STRUCTURE="diag_log_msg1" NAME="spp server %x delete success @spp_service.c(357),INFO" ID="0xd82a0b2d" />
- <MSG STRUCTURE="diag_log_msg3" NAME="spp connect connHdl: %x devHdl: %x svcHdl: %x @spp_service.c(362),INFO" ID="0xd82a0b55" />
- <MSG STRUCTURE="diag_log_msg0" NAME="server not exist @spp_service.c(368),WARNING" ID="0xd82a0b83" />
- <MSG STRUCTURE="diag_log_msg0" NAME="client not exist @spp_service.c(375),WARNING" ID="0xd82a0bbb" />
- <MSG STRUCTURE="diag_log_msg1" NAME="spp disconnect connHdl: %x @spp_service.c(396),INFO" ID="0xd82a0c65" />
- <MSG STRUCTURE="diag_log_msg0" NAME="client not exist @spp_service.c(400),WARNING" ID="0xd82a0c83" />
- <MSG STRUCTURE="diag_log_msg1" NAME="server %x disconnected @spp_service.c(412),INFO" ID="0xd82a0ce5" />
- <MSG STRUCTURE="diag_log_msg1" NAME="unhandled msg id %x @spp_service.c(437),WARNING" ID="0xd82a0dab" />
- <MSG STRUCTURE="diag_log_msg0" NAME="params socket_para invalid. @spp_service.c(445),ERROR" ID="0xd82a0dea" />
- <MSG STRUCTURE="diag_log_msg0" NAME="uuid invalid @spp_service.c(450),ERROR" ID="0xd82a0e12" />
- <MSG STRUCTURE="diag_log_msg0" NAME="params name len invalid. @spp_service.c(456),ERROR" ID="0xd82a0e42" />
- <MSG STRUCTURE="diag_log_msg0" NAME="exist same uuid client @spp_service.c(463),ERROR" ID="0xd82a0e7a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="add server fail @spp_service.c(469),ERROR" ID="0xd82a0eaa" />
- <MSG STRUCTURE="diag_log_msg0" NAME="btsdk_register_spp_service fail @spp_service.c(485),WARNING" ID="0xd82a0f2b" />
- <MSG STRUCTURE="diag_log_msg2" NAME="server %x create success. svc_hdl: %x @spp_service.c(489),INFO" ID="0xd82a0f4d" />
- <MSG STRUCTURE="diag_log_msg1" NAME="server id %d invalid @spp_service.c(498),ERROR" ID="0xd82a0f92" />
- <MSG STRUCTURE="diag_log_msg1" NAME="server not exist. server id %d @spp_service.c(505),ERROR" ID="0xd82a0fca" />
- <MSG STRUCTURE="diag_log_msg1" NAME="server is already waiting to accept. server id %d @spp_service.c(510),ERROR" ID="0xd82a0ff2" />
- <MSG STRUCTURE="diag_log_msg1" NAME="client not exist. server id %d @spp_service.c(522),ERROR" ID="0xd82a1052" />
- <MSG STRUCTURE="diag_log_msg1" NAME="server waiting for accept timeout. server id %d @spp_service.c(536),ERROR" ID="0xd82a10c2" />
- <MSG STRUCTURE="diag_log_msg1" NAME="server not exist. server id %d @spp_service.c(553),ERROR" ID="0xd82a114a" />
- <MSG STRUCTURE="diag_log_msg1" NAME="BTSDK_DisconnectConnection fail retCode: %x @spp_service.c(563),ERROR" ID="0xd82a119a" />
- <MSG STRUCTURE="diag_log_msg1" NAME="access_cnt=%d @spp_service.c(569),INFO" ID="0xd82a11cd" />
- <MSG STRUCTURE="diag_log_msg0" NAME="socket_type invalid @spp_service.c(581),ERROR" ID="0xd82a122a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="uuid invalid @spp_service.c(586),ERROR" ID="0xd82a1252" />
- <MSG STRUCTURE="diag_log_msg0" NAME="acl not connected @spp_service.c(591),ERROR" ID="0xd82a127a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="dev_hdl invalid @spp_service.c(597),ERROR" ID="0xd82a12aa" />
- <MSG STRUCTURE="diag_log_msg0" NAME="add client fail @spp_service.c(611),INFO" ID="0xd82a131d" />
- <MSG STRUCTURE="diag_log_msg1" NAME="connect spp fail. ret: %x @spp_service.c(620),INFO" ID="0xd82a1365" />
- <MSG STRUCTURE="diag_log_msg1" NAME="BTSDK_DisconnectConnection fail retCode: %x @spp_service.c(645),ERROR" ID="0xd82a142a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="spp read data failed @spp_service.c(731),ERROR" ID="0xd82a16da" />
- <MSG STRUCTURE="diag_log_msg1" NAME="client is null. client id %d @spp_service.c(755),ERROR" ID="0xd82a179a" />
- <MSG STRUCTURE="diag_log_msg1" NAME="client not connected. client id %d @spp_service.c(759),ERROR" ID="0xd82a17ba" />
- <MSG STRUCTURE="diag_log_msg4" NAME="connHdl: %x dataLen: %d writeRet: %d writeLen: %d @spp_service.c(774),WARNING" ID="0xd82a1833" />
- <MSG STRUCTURE="diag_log_msg1" NAME="hdl 0x%x not exist @spp_service.c(788),WARNING" ID="0xd82a18a3" />
- <MSG STRUCTURE="diag_log_msg0" NAME="no recieve function registered @spp_service.c(795),INFO" ID="0xd82a18dd" />
- <MSG STRUCTURE="diag_log_msg1" NAME="hdl 0x%x not exist @spp_service.c(810),WARNING" ID="0xd82a1953" />
- <MSG STRUCTURE="diag_log_msg2" NAME="no match client id for hdl 0x%x, try %d times @spp_service.c(814),INFO" ID="0xd82a1975" />
- <MSG STRUCTURE="diag_log_msg1" NAME="BTSDK_SPP_EVT_CONNECTED hdl=0x%x @spp_service.c(830),INFO" ID="0xd82a19f5" />
- <MSG STRUCTURE="diag_log_msg1" NAME="BTSDK_SPP_EVT_DISCONNECTED hdl=0x%x @spp_service.c(834),INFO" ID="0xd82a1a15" />
- <MSG STRUCTURE="diag_log_msg1" NAME="BTSDK_SPP_EVT_FC_ON hdl=0x%x @spp_service.c(841),INFO" ID="0xd82a1a4d" />
- <MSG STRUCTURE="diag_log_msg1" NAME="unknown msg hdl=0x%x @spp_service.c(844),WARNING" ID="0xd82a1a63" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="osal_sem_init error %x @spp_service.c(89),ERROR" ID="0xd82a02ca" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="osal_sem_down error %x @spp_service.c(113),ERROR" ID="0xd82a038a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="client num reached max limit @spp_service.c(137),ERROR" ID="0xd82a044a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="client malloc fail @spp_service.c(143),ERROR" ID="0xd82a047a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="uuid memcpy fail @spp_service.c(150),ERROR" ID="0xd82a04b2" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="spp client %x add success @spp_service.c(161),INFO" ID="0xd82a050d" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="uuid=%s @spp_service.c(185),INFO" ID="0xd82a05cd" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="client_id invalid @spp_service.c(240),ERROR" ID="0xd82a0782" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="sleep too long. %d ms. @spp_service.c(253),WARNING" ID="0xd82a07eb" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="spp client %x delete success @spp_service.c(259),INFO" ID="0xd82a081d" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="add client fail @spp_service.c(268),ERROR" ID="0xd82a0862" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="spp server %x add success @spp_service.c(298),INFO" ID="0xd82a0955" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="spp server %x add fail @spp_service.c(301),ERROR" ID="0xd82a096a" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="sleep too long. %d ms. @spp_service.c(342),WARNING" ID="0xd82a0ab3" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="unregister spp service ret: %x @spp_service.c(349),WARNING" ID="0xd82a0aeb" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="spp server %x delete success @spp_service.c(360),INFO" ID="0xd82a0b45" />
+ <MSG STRUCTURE="diag_log_msg3" NAME="spp connect connHdl: %x devHdl: %x svcHdl: %x @spp_service.c(365),INFO" ID="0xd82a0b6d" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="server not exist @spp_service.c(371),WARNING" ID="0xd82a0b9b" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="client not exist @spp_service.c(378),WARNING" ID="0xd82a0bd3" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="spp disconnect connHdl: %x @spp_service.c(399),INFO" ID="0xd82a0c7d" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="client not exist @spp_service.c(403),WARNING" ID="0xd82a0c9b" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="server %x disconnected @spp_service.c(415),INFO" ID="0xd82a0cfd" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="unhandled msg id %x @spp_service.c(440),WARNING" ID="0xd82a0dc3" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="params socket_para invalid. @spp_service.c(448),ERROR" ID="0xd82a0e02" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="uuid invalid @spp_service.c(453),ERROR" ID="0xd82a0e2a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="params name len invalid. @spp_service.c(459),ERROR" ID="0xd82a0e5a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="exist same uuid client @spp_service.c(466),ERROR" ID="0xd82a0e92" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="add server fail @spp_service.c(472),ERROR" ID="0xd82a0ec2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="btsdk_register_spp_service fail @spp_service.c(488),WARNING" ID="0xd82a0f43" />
+ <MSG STRUCTURE="diag_log_msg2" NAME="server %x create success. svc_hdl: %x @spp_service.c(492),INFO" ID="0xd82a0f65" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="server id %d invalid @spp_service.c(501),ERROR" ID="0xd82a0faa" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="server not exist. server id %d @spp_service.c(508),ERROR" ID="0xd82a0fe2" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="server is already waiting to accept. server id %d @spp_service.c(513),ERROR" ID="0xd82a100a" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="client not exist. server id %d @spp_service.c(525),ERROR" ID="0xd82a106a" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="server waiting for accept timeout. server id %d @spp_service.c(539),ERROR" ID="0xd82a10da" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="server not exist. server id %d @spp_service.c(556),ERROR" ID="0xd82a1162" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="BTSDK_DisconnectConnection fail retCode: %x @spp_service.c(566),ERROR" ID="0xd82a11b2" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="access_cnt=%d @spp_service.c(572),INFO" ID="0xd82a11e5" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="socket_type invalid @spp_service.c(584),ERROR" ID="0xd82a1242" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="uuid invalid @spp_service.c(589),ERROR" ID="0xd82a126a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="acl not connected @spp_service.c(594),ERROR" ID="0xd82a1292" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="dev_hdl invalid @spp_service.c(600),ERROR" ID="0xd82a12c2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="add client fail @spp_service.c(614),INFO" ID="0xd82a1335" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="connect spp fail. ret: %x @spp_service.c(623),INFO" ID="0xd82a137d" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="BTSDK_DisconnectConnection fail retCode: %x @spp_service.c(648),ERROR" ID="0xd82a1442" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="spp read data failed @spp_service.c(734),ERROR" ID="0xd82a16f2" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="client is null. client id %d @spp_service.c(759),ERROR" ID="0xd82a17ba" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="client not connected. client id %d @spp_service.c(763),ERROR" ID="0xd82a17da" />
+ <MSG STRUCTURE="diag_log_msg4" NAME="connHdl: %x dataLen: %d writeRet: %d writeLen: %d @spp_service.c(778),WARNING" ID="0xd82a1853" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="hdl 0x%x not exist @spp_service.c(801),WARNING" ID="0xd82a190b" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="no recieve function registered @spp_service.c(808),INFO" ID="0xd82a1945" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="hdl 0x%x not exist @spp_service.c(823),WARNING" ID="0xd82a19bb" />
+ <MSG STRUCTURE="diag_log_msg2" NAME="no match client id for hdl 0x%x, try %d times @spp_service.c(827),INFO" ID="0xd82a19dd" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="BTSDK_SPP_EVT_CONNECTED hdl=0x%x @spp_service.c(843),INFO" ID="0xd82a1a5d" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="BTSDK_SPP_EVT_DISCONNECTED hdl=0x%x @spp_service.c(847),INFO" ID="0xd82a1a7d" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="BTSDK_SPP_EVT_FC_ON hdl=0x%x @spp_service.c(854),INFO" ID="0xd82a1ab5" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="unknown msg hdl=0x%x @spp_service.c(857),WARNING" ID="0xd82a1acb" />
</MSG_LOG>
\ No newline at end of file
-<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="the fontName %s no register, use default font @text_ext.cpp(74),ERROR" ID="0xcae20252" />
- <MSG STRUCTURE="diag_log_msg0" NAME="malloc buffer for utf16Text failed. @text_ext.cpp(109),ERROR" ID="0xcae2036a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="text_ is nullptr. @text_ext.cpp(133),ERROR" ID="0xcae2042a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="malloc for shapingLineText failed. @text_ext.cpp(256),ERROR" ID="0xcae20802" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="the fontName %s no register, use default font @text_ext.cpp(82),ERROR" ID="0xcae20292" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="malloc buffer for utf16Text failed. @text_ext.cpp(117),ERROR" ID="0xcae203aa" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="text_ is nullptr. @text_ext.cpp(141),ERROR" ID="0xcae2046a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="malloc for shapingLineText failed. @text_ext.cpp(264),ERROR" ID="0xcae20842" />
</MSG_LOG>
\ No newline at end of file
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="memcpy tempPaint error! @ui_canvas_ext.cpp(51),ERROR" ID="0xcaea019a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc for stops failed. Gradient will be inactive. @ui_canvas_ext.cpp(54),WARNING" ID="0xcaea01b3" />
- <MSG STRUCTURE="diag_log_msg0" NAME="Already beginned a path without setting path data. @ui_canvas_ext.cpp(63),ERROR" ID="0xcaea01fa" />
- <MSG STRUCTURE="diag_log_msg0" NAME="Previous path has been initialized but has not called DrawPath. @ui_canvas_ext.cpp(67),ERROR" ID="0xcaea021a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="cmd or data is nullptr. @ui_canvas_ext.cpp(81),ERROR" ID="0xcaea028a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="Need to call BeginPath prior to calling this method. @ui_canvas_ext.cpp(85),ERROR" ID="0xcaea02aa" />
- <MSG STRUCTURE="diag_log_msg0" NAME="path is nullptr @ui_canvas_ext.cpp(90),ERROR" ID="0xcaea02d2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="Path data has been set. Can only set once. @ui_canvas_ext.cpp(94),ERROR" ID="0xcaea02f2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for data failed. @ui_canvas_ext.cpp(103),ERROR" ID="0xcaea033a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="memcpy for cmds failed. @ui_canvas_ext.cpp(110),ERROR" ID="0xcaea0372" />
- <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for data failed. @ui_canvas_ext.cpp(121),ERROR" ID="0xcaea03ca" />
- <MSG STRUCTURE="diag_log_msg0" NAME="memcpy for data failed. @ui_canvas_ext.cpp(130),ERROR" ID="0xcaea0412" />
- <MSG STRUCTURE="diag_log_msg0" NAME="can only set matrix after beginning any path. @ui_canvas_ext.cpp(144),ERROR" ID="0xcaea0482" />
- <MSG STRUCTURE="diag_log_msg0" NAME="Index out of range. @ui_canvas_ext.cpp(152),ERROR" ID="0xcaea04c2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="HandleStyleAndPattern failed. UpdateImageInfoIfNecessary failed. @ui_canvas_ext.cpp(273),ERROR" ID="0xcaea088a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="Image is invalid! @ui_canvas_ext.cpp(339),ERROR" ID="0xcaea0a9a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="path or paint or matrix is nullptr. @ui_canvas_ext.cpp(389),ERROR" ID="0xcaea0c2a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for cmd failed. @ui_canvas_ext.cpp(448),ERROR" ID="0xcaea0e02" />
- <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for cmd failed. @ui_canvas_ext.cpp(485),ERROR" ID="0xcaea0f2a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for cmd failed. @ui_canvas_ext.cpp(519),ERROR" ID="0xcaea103a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="Sector is not supported currently @ui_canvas_ext.cpp(535),WARNING" ID="0xcaea10bb" />
- <MSG STRUCTURE="diag_log_msg0" NAME="startAngle and endAngle can not be smaller than 0. @ui_canvas_ext.cpp(543),ERROR" ID="0xcaea10fa" />
- <MSG STRUCTURE="diag_log_msg0" NAME="endAngle should not be equal to startAngle @ui_canvas_ext.cpp(547),ERROR" ID="0xcaea111a" />
- <MSG STRUCTURE="diag_log_msg1" NAME="realpath fail: %s @ui_canvas_ext.cpp(588),ERROR" ID="0xcaea1262" />
- <MSG STRUCTURE="diag_log_msg0" NAME="new svgdata obj failed @ui_canvas_ext.cpp(600),ERROR" ID="0xcaea12c2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="OverlayOpacity Failed!!! @ui_canvas_ext.cpp(625),ERROR" ID="0xcaea138a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="can only set matrix after beginning any path. @ui_canvas_ext.cpp(712),ERROR" ID="0xcaea1642" />
- <MSG STRUCTURE="diag_log_msg0" NAME="index error @ui_canvas_ext.cpp(716),ERROR" ID="0xcaea1662" />
- <MSG STRUCTURE="diag_log_msg0" NAME="read data fail. @ui_canvas_ext.cpp(779),ERROR" ID="0xcaea185a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc path fail. @ui_canvas_ext.cpp(797),ERROR" ID="0xcaea18ea" />
- <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc path fail. @ui_canvas_ext.cpp(802),ERROR" ID="0xcaea1912" />
- <MSG STRUCTURE="diag_log_msg1" NAME="open %s fail @ui_canvas_ext.cpp(818),ERROR" ID="0xcaea1992" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="memcpy tempPaint error! @ui_canvas_ext.cpp(52),ERROR" ID="0xcaea01a2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc for stops failed. Gradient will be inactive. @ui_canvas_ext.cpp(55),WARNING" ID="0xcaea01bb" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="Already beginned a path without setting path data. @ui_canvas_ext.cpp(64),ERROR" ID="0xcaea0202" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="Previous path has been initialized but has not called DrawPath. @ui_canvas_ext.cpp(68),ERROR" ID="0xcaea0222" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="cmd or data is nullptr. @ui_canvas_ext.cpp(82),ERROR" ID="0xcaea0292" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="Need to call BeginPath prior to calling this method. @ui_canvas_ext.cpp(86),ERROR" ID="0xcaea02b2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="path is nullptr @ui_canvas_ext.cpp(91),ERROR" ID="0xcaea02da" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="Path data has been set. Can only set once. @ui_canvas_ext.cpp(95),ERROR" ID="0xcaea02fa" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for data failed. @ui_canvas_ext.cpp(104),ERROR" ID="0xcaea0342" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="memcpy for cmds failed. @ui_canvas_ext.cpp(111),ERROR" ID="0xcaea037a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for data failed. @ui_canvas_ext.cpp(122),ERROR" ID="0xcaea03d2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="memcpy for data failed. @ui_canvas_ext.cpp(131),ERROR" ID="0xcaea041a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="can only set matrix after beginning any path. @ui_canvas_ext.cpp(145),ERROR" ID="0xcaea048a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="Index out of range. @ui_canvas_ext.cpp(153),ERROR" ID="0xcaea04ca" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="HandleStyleAndPattern failed. UpdateImageInfoIfNecessary failed. @ui_canvas_ext.cpp(274),ERROR" ID="0xcaea0892" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="Image is invalid! @ui_canvas_ext.cpp(340),ERROR" ID="0xcaea0aa2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="path or paint or matrix is nullptr. @ui_canvas_ext.cpp(390),ERROR" ID="0xcaea0c32" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for cmd failed. @ui_canvas_ext.cpp(449),ERROR" ID="0xcaea0e0a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for cmd failed. @ui_canvas_ext.cpp(486),ERROR" ID="0xcaea0f32" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for cmd failed. @ui_canvas_ext.cpp(520),ERROR" ID="0xcaea1042" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="Sector is not supported currently @ui_canvas_ext.cpp(536),WARNING" ID="0xcaea10c3" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="startAngle and endAngle can not be smaller than 0. @ui_canvas_ext.cpp(544),ERROR" ID="0xcaea1102" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="endAngle should not be equal to startAngle @ui_canvas_ext.cpp(548),ERROR" ID="0xcaea1122" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="realpath fail: %s @ui_canvas_ext.cpp(589),ERROR" ID="0xcaea126a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="new svgdata obj failed @ui_canvas_ext.cpp(601),ERROR" ID="0xcaea12ca" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="OverlayOpacity Failed!!! @ui_canvas_ext.cpp(626),ERROR" ID="0xcaea1392" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="can only set matrix after beginning any path. @ui_canvas_ext.cpp(713),ERROR" ID="0xcaea164a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="index error @ui_canvas_ext.cpp(717),ERROR" ID="0xcaea166a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="read data fail. @ui_canvas_ext.cpp(780),ERROR" ID="0xcaea1862" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc path fail. @ui_canvas_ext.cpp(798),ERROR" ID="0xcaea18f2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc path fail. @ui_canvas_ext.cpp(803),ERROR" ID="0xcaea191a" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="open %s fail @ui_canvas_ext.cpp(819),ERROR" ID="0xcaea199a" />
</MSG_LOG>
\ No newline at end of file
<MSG STRUCTURE="diag_log_msg0" NAME="add failed, the view type is not support, only suppot UITransformGroup. @ui_coverflow_view2.cpp(58),ERROR" ID="0xcb4001d2" />
<MSG STRUCTURE="diag_log_msg0" NAME="insert failed, view is nullptr @ui_coverflow_view2.cpp(76),ERROR" ID="0xcb400262" />
<MSG STRUCTURE="diag_log_msg0" NAME="add failed, the view type is not support, only suppot UITransformGroup. @ui_coverflow_view2.cpp(81),ERROR" ID="0xcb40028a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="remove failed, view is nullptr @ui_coverflow_view2.cpp(99),ERROR" ID="0xcb40031a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="remove failed, the view type is not support, only suppot UITransformGroup. @ui_coverflow_view2.cpp(104),ERROR" ID="0xcb400342" />
- <MSG STRUCTURE="diag_log_msg0" NAME="remove failed, view parent is nullptr @ui_coverflow_view2.cpp(110),ERROR" ID="0xcb400372" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="remove failed, view is nullptr @ui_coverflow_view2.cpp(104),ERROR" ID="0xcb400342" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="remove failed, the view type is not support, only suppot UITransformGroup. @ui_coverflow_view2.cpp(109),ERROR" ID="0xcb40036a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="remove failed, view parent is nullptr @ui_coverflow_view2.cpp(115),ERROR" ID="0xcb40039a" />
</MSG_LOG>
\ No newline at end of file
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="GetSpace AllocBuffer failed. @ui_font_hw_cache.cpp(52),ERROR" ID="0xcb1201a2" />
- <MSG STRUCTURE="diag_log_msg2" NAME="unicode %u was not found in font %u @ui_font_hw_cache.cpp(68),ERROR" ID="0xcb120222" />
- <MSG STRUCTURE="diag_log_msg2" NAME="unicode %u was not found in font %u @ui_font_hw_cache.cpp(96),ERROR" ID="0xcb120302" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="Nothing in font cache can be freed! @ui_font_hw_cache.cpp(45),ERROR" ID="0xcb12016a" />
+ <MSG STRUCTURE="diag_log_msg2" NAME="unicode %u was not found in font %u @ui_font_hw_cache.cpp(55),ERROR" ID="0xcb1201ba" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="GetSpace AllocBuffer failed. @ui_font_hw_cache.cpp(69),ERROR" ID="0xcb12022a" />
+ <MSG STRUCTURE="diag_log_msg2" NAME="unicode %u was not found in font %u @ui_font_hw_cache.cpp(97),ERROR" ID="0xcb12030a" />
</MSG_LOG>
\ No newline at end of file
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="memcpy cmd data failed @ui_font_hw_vector.cpp(264),ERROR" ID="0xcb140842" />
- <MSG STRUCTURE="diag_log_msg0" NAME="memcpy path data failed @ui_font_hw_vector.cpp(267),ERROR" ID="0xcb14085a" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="memcpy cmd data failed @ui_font_hw_vector.cpp(273),ERROR" ID="0xcb14088a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="memcpy path data failed @ui_font_hw_vector.cpp(276),ERROR" ID="0xcb1408a2" />
</MSG_LOG>
\ No newline at end of file
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="RollerItemInfo is nullptr! @ui_roller_view.cpp(180),ERROR" ID="0xcb4405a2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="Already add an item with the same name. Remove it before adding this. @ui_roller_view.cpp(224),ERROR" ID="0xcb440702" />
- <MSG STRUCTURE="diag_log_msg0" NAME="name is empty! @ui_roller_view.cpp(267),ERROR" ID="0xcb44085a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="Should remove an item in DISPLAY mode @ui_roller_view.cpp(272),ERROR" ID="0xcb440882" />
- <MSG STRUCTURE="diag_log_msg0" NAME="RollerItemInfo is null! @ui_roller_view.cpp(453),ERROR" ID="0xcb440e2a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="Cannot set align item when mode is about to change. @ui_roller_view.cpp(506),ERROR" ID="0xcb440fd2" />
- <MSG STRUCTURE="diag_log_msg0" NAME="Should SetCurrentItem in DISPLAY mode. @ui_roller_view.cpp(510),ERROR" ID="0xcb440ff2" />
- <MSG STRUCTURE="diag_log_msg1" NAME="Cannot find an item with name: %s @ui_roller_view.cpp(525),ERROR" ID="0xcb44106a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="Cannot set mode when AlignAnim is running @ui_roller_view.cpp(620),ERROR" ID="0xcb441362" />
- <MSG STRUCTURE="diag_log_msg0" NAME="mode is already set. @ui_roller_view.cpp(625),ERROR" ID="0xcb44138a" />
- <MSG STRUCTURE="diag_log_msg0" NAME="Cannot Set mode during transition or cannot set TRANSITION mode. @ui_roller_view.cpp(630),ERROR" ID="0xcb4413b2" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="width and height can not set 0 @ui_roller_view.cpp(146),ERROR" ID="0xcb440492" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="RollerItemInfo is nullptr! @ui_roller_view.cpp(193),ERROR" ID="0xcb44060a" />
+ <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="0xcb44076a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="name is empty! @ui_roller_view.cpp(280),ERROR" ID="0xcb4408c2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="Should remove an item in DISPLAY mode @ui_roller_view.cpp(285),ERROR" ID="0xcb4408ea" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="RollerItemInfo is null! @ui_roller_view.cpp(466),ERROR" ID="0xcb440e92" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="Cannot set align item when mode is about to change. @ui_roller_view.cpp(519),ERROR" ID="0xcb44103a" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="Should SetCurrentItem in DISPLAY mode. @ui_roller_view.cpp(523),ERROR" ID="0xcb44105a" />
+ <MSG STRUCTURE="diag_log_msg1" NAME="Cannot find an item with name: %s @ui_roller_view.cpp(538),ERROR" ID="0xcb4410d2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="Cannot set mode when AlignAnim is running @ui_roller_view.cpp(633),ERROR" ID="0xcb4413ca" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="mode is already set. @ui_roller_view.cpp(638),ERROR" ID="0xcb4413f2" />
+ <MSG STRUCTURE="diag_log_msg0" NAME="Cannot Set mode during transition or cannot set TRANSITION mode. @ui_roller_view.cpp(643),ERROR" ID="0xcb44141a" />
</MSG_LOG>
\ No newline at end of file
#include "pm_lpc.h"
#include "pm_core.h"
#include "pm_clocks.h"
+#include "clocks_config.h"
#include "arch_encoding.h"
#include "arch_barrier.h"
#include "debug_print.h"
#define PM_SLEEP_TRACE_SEL_TAG(val) (writew(PM_SLEEP_SEL_TRACE, val))
#define PM_SLEEP_SEL_EVENT 0x777
#define PM_SLEEP_TRACE_DEF_VAL 0x5a5a
-#define PM_OS_US_TO_MS 1000
+#define PM_OS_US_TO_MS 1000
+#define RTC_TIMER_INT_STATUS 0x57024010
+#define PM_RTC_LOAD_COUNT_REG 0x57024000
+#define PM_RTC_CUR_ALERT_US 64000000
+#define PM_RTC_LOAD_THRESHOLD_MS (CLOCK_32K_CALI_FREQ / 50)
enum {
PM_SLEEP_STATE_IDLE,
uint32_t status;
uint32_t sleep_ms = sleep_ms_val;
uint32_t rtc_times = 0;
+ uint32_t rtc_times_alert = 0;
if ((g_pm_mcu_dynamic_power_flag == 1) || hal_ipc_get_core_clr_sts(CORES_BT_CORE)) {
return;
}
return;
}
uapi_rtc_get_current_time_us(0, &rtc_times);
+ if (rtc_times > PM_RTC_CUR_ALERT_US) {
+ rtc_times_alert = rtc_times;
+ rtc_times = rtc_porting_cycle_2_us(readl(PM_RTC_LOAD_COUNT_REG));
+ }
if (rtc_times < PM_OS_US_TO_MS && rtc_times > 0) {
return;
}
rtc_times /= PM_OS_US_TO_MS;
- if (sleep_ms > rtc_times && rtc_times != 0 && sleep_ms <= g_pm_sleep_threshold) {
+ if (sleep_ms > rtc_times && rtc_times != 0) {
sleep_ms = rtc_times;
}
if (sleep_ms <= PM_SLEEP_THRESHOLD_WFI_ONLY_MS || pm_get_sleep_veto()) {
pm_enter_deepsleep_set_flag();
status = pm_os_irq_lock();
- if ((sleep_ms <= g_pm_sleep_threshold) || pm_get_sleep_veto()) {
+ if ((sleep_ms <= g_pm_sleep_threshold) || pm_get_sleep_veto() || readl(RTC_TIMER_INT_STATUS) == 1 ||
+ ((readl(PM_RTC_LOAD_COUNT_REG) < PM_RTC_LOAD_THRESHOLD_MS) && (rtc_times_alert > PM_RTC_CUR_ALERT_US))) {
pm_enter_deepsleep_cancel_flag();
pm_enter_light_sleep();
} else {
void uapi_pm_enter_sleep(void)
{
- uint32_t status = pm_os_irq_lock();
uint32_t sleep_ms = pm_os_get_sleep_ms();
pm_enter_sleep(sleep_ms);
- pm_os_irq_restore(status);
}
g_exit_sleep_time = pm_core_get_count(); // freq:32768
uint64_t sleep_time = ((g_exit_sleep_time - g_entry_sleep_time) * PM_OS_TICKS_PER_S) + g_32k_time_calibrate;
uint32_t actual_sleep_time = (uint32_t)(sleep_time / CLOCK_32K_CALI_FREQ);
- g_32k_time_calibrate = actual_sleep_time & 0x7FFF;
+ g_32k_time_calibrate = actual_sleep_time % CLOCK_32K_CALI_FREQ;
if (actual_sleep_time > ticks) {
+#ifdef __FREERTOS__
pm_os_compensate_sleep_ticks(ticks);
+#else
+ pm_os_compensate_sleep_ticks(actual_sleep_time);
+#endif
} else {
pm_os_compensate_sleep_ticks(actual_sleep_time);
}
return DRV_ERR_DPU_OPERATION_NOT_SUPPORT;\r
}\r
\r
+ if ((layer_dev->run_info.pos_x == pos_x) && (layer_dev->run_info.pos_y == pos_y)) {\r
+ return EXT_SUCCESS;\r
+ }\r
+\r
osal_spin_lock_irqsave(&layer_dev->layer_lock, &flag);\r
layer_dev->update_flag = TD_TRUE;\r
layer_dev->run_info.pos_x = pos_x;\r
} AddrInfo;
TryToFreeImgCallback g_tryToFreeImgCallback = NULL;
+TryToFreeFontCacheCallback g_tryToFreeFontCacheCallback = NULL;
+
#if ENABLE_GMMU
static bool g_gmmuAllocated[FB_COUNT] = {false, false};
struct gmmu_buf_struct g_gmmuMem = { 0 };
}
uint8_t *addr = LosAllocMem(pool, (uint32_t)(buffer->size));
- if (((info->usage & HBM_USE_MEM_YUV) != HBM_USE_MEM_YUV) &&
- (pool == g_poolId) && (g_tryToFreeImgCallback != NULL)) {
+ if ((pool == g_poolId) && (g_tryToFreeImgCallback != NULL)) {
while (addr == NULL) {
if (g_tryToFreeImgCallback()) {
DISP_LOGW("Success to free image during AllocMem size: %u\n", buffer->size);
addr = LosAllocMem(pool, (uint32_t)(buffer->size));
} else {
- DISP_LOGE("Failed to AllocMem size: %u and no image can be free\n", buffer->size);
+ DISP_LOGE("Failed to AllocMem size: %u, and no image can be free\n", buffer->size);
+ break;
+ }
+ }
+ } else if ((pool == g_fontPoolId) && (g_tryToFreeFontCacheCallback != NULL)) {
+ while (addr == NULL) {
+ if (g_tryToFreeFontCacheCallback()) {
+ DISP_LOGW("Success to free font cache during AllocMem size: %u\n", buffer->size);
+ addr = LosAllocMem(pool, (uint32_t)(buffer->size));
+ } else {
+ DISP_LOGE("Failed to AllocMem size: %u, and no font cache can be free\n", buffer->size);
break;
}
}
#endif
}
} else if (((handle->usage & HBM_USE_MEM_FONT) == HBM_USE_MEM_FONT) ||
- ((handle->usage & HBM_USE_MEM_PATH) == HBM_USE_MEM_PATH)){
+ ((handle->usage & HBM_USE_MEM_PATH) == HBM_USE_MEM_PATH)) {
LosFreeMem(g_fontPoolId, handle->virAddr);
} else {
LosFreeMem(g_poolId, handle->virAddr);
g_tryToFreeImgCallback = callback;
}
+static void RegisterTryToFreeFontCacheCallback(TryToFreeFontCacheCallback callback)
+{
+ g_tryToFreeFontCacheCallback = callback;
+}
+
int32_t GrallocInitialize(GrallocFuncs **funcs)
{
CHECK_NULLPOINTER_RETURN_VALUE(funcs, DISPLAY_NULL_PTR);
gFuncs->AllocMem = AllocMem;
gFuncs->FreeMem = FreeMem;
gFuncs->RegisterTryToFreeImgCallback = RegisterTryToFreeImgCallback;
+ gFuncs->RegisterTryToFreeFontCacheCallback = RegisterTryToFreeFontCacheCallback;
*funcs = gFuncs;
#if ENABLE_GMMU
#include "gfx_utils/heap_base.h"
#include "graphic_config.h"
#include "hals/gralloc_engines.h"
+#include "graphic_mutex.h"
#if ENABLE_IMAGE_PACKER
namespace OHOS {
std::unordered_map<uint8_t*, MultiImageInfo*> bufMap_;
ImageNode longTermList_;
ImageNode shortTermList_;
+ GraphicMutex listMutex_;
ImageCacheManager()
{
*/\r
void CancelBuffer(SurfaceBuffer* buffer) override;\r
\r
+ /**\r
+ * @brief Prepare video buffers. This should be called before playing video.\r
+ * @since 1.0\r
+ * @version 1.0\r
+ */\r
+ void PrepareBuffers();\r
+\r
void ClearBuffers();\r
SurfaceBuffer* GetBackBuf();\r
\r
List<SurfaceBuffer*> freeList_;\r
List<SurfaceBuffer*> dirtyList_;\r
IBufferConsumerListener* consumerListener_;\r
+ std::shared_ptr<bool> waitPrepareBuffer_;\r
};\r
} // end namespace\r
#endif\r
#endif
private:
+ void SetTextInnner(const char* text);
uint16_t textId_ = FontGlobalManager::INVALID_TEXT_ID;
#if ENABLE_SHAPING
bool isNeedShaping_ = 0;
#include "components/ui_swipe_view.h"
#include "components/card_swipe.h"
#include "components_ext/hor_swipe_view.h"
+#include "components_ext/ver_swipe_view.h"
namespace OHOS {
/**
* @since 1.0
* @version 1.0
*/
-class UICrossView : public UIViewGroup, public UISwipeView::OnSwipeListener {
+class UICrossView : public UIViewGroup, public UISwipeView::OnSwipeListener,
+ public VerSwipeView::OnMoveChildListener {
public:
UICrossView(const UICrossView &) = delete;
UICrossView &operator=(const UICrossView &) = delete;
return &instance;
}
+ void OnMoveChild(UISwipeView& view, int16_t xOffset, int16_t yOffset) override;
void OnSwipe(UISwipeView& view) override;
bool OnDragStartEvent(const DragEvent& event) override;
bool OnDragEvent(const DragEvent& event) override;
static constexpr uint16_t INVALID_VIEW_INDEX = 0xff;
bool loop_ = false;
bool enableScreenCap_ = false;
- bool gaussianBlurEnable_ = false;
int swipeDirect_ = 0;
- int pullIndex_ = 0;
int16_t hDragStartIndex_ = INVALID_VIEW_INDEX;
int16_t vBlankIndex_ = INVALID_VIEW_INDEX;
UIView* vBlankView_ = nullptr;
- UISwipeView vertical_;
+ VerSwipeView vertical_;
HorSwipeView horizontal_;
UIView* tailView_ = nullptr;
UISwipeView::OnSwipeListener *swipeListener_ = nullptr;
void RemoveAllInner(UISwipeView& view);
void ProcessRes(void);
- void VertSetGausBlur(uint16_t direct);
void HorHandleCardEvent(int16_t index, uint16_t scrollStage);
void VertHandleCardEvent(uint16_t scrollStage);
};
void DumpImgInfo() override;
+ std::string GetGuiInfo() const override;
+
private:
UILiteSurfaceView(const UILiteSurfaceView&) = delete;
UILiteSurfaceView &operator=(const UILiteSurfaceView&) = delete;
*/
void HidePOI(uint16_t tag, bool isHide = true);
void SetX(int16_t x) override;
- void SetY(int16_t x) override;
+ void SetY(int16_t y) override;
private:
POIInfo* pois_ = nullptr;
bool needUpdate_ = false;
ImageInfo cacheInfo_ = {{0}};
MapSVGParser parser_;
- char* filePath_ = nullptr;
PathDetail* pathArray_ = nullptr;
uint8_t pathCount_ = 0;
RoadDetail* roadArray_ = nullptr;
bool switchModeWithAnim_ = false;
bool alignWithAnim_ = false;
UIView* coverPreviousItem_ = nullptr;
- uint16_t itemWidth_ = 0;
- uint16_t itemHeight_ = 0;
+ uint16_t itemWidth_ = 1;
+ uint16_t itemHeight_ = 1;
uint8_t mirrorOpa_ = 100;
float radius_ = 0.0f;
float perimeter_ = 0.0f;
#include "hals/gralloc_engines.h"
#include "gfx_utils/graphic_log.h"
#include "gfx_utils/graphic_math.h"
+#include "graphic_service.h"
+
namespace OHOS {
LiteSurface::LiteSurface() : bufferCount_(0), queueSize_(0), size_(0),
width_(0), height_(0), strideAlignment_(0), format_(PIXEL_FMT_BUTT),
- consumerListener_(nullptr)
+ consumerListener_(nullptr), waitPrepareBuffer_(std::make_shared<bool>(false))
{
}
lock_.Unlock();
}
+void LiteSurface::PrepareBuffers()
+{
+ if (bufferCount_ != 0) {
+ GRAPHIC_LOGD("Already prepared buffers, bufferCount_ is %u", bufferCount_);
+ return;
+ }
+ for (uint8_t i = 0; i < queueSize_; i++) {
+ AddBuffer();
+ }
+}
+
void LiteSurface::AddBuffer()
{
if (queueSize_ == bufferCount_) {
goto END;
}
if (bufferCount_ < queueSize_) {
- AddBuffer();
- res = true;
- if (freeList_.IsEmpty()) {
- GRAPHIC_LOGE("Cannot request buffer: freeList is empty.");
- res = false;
+ bool waitPrepareBuffer = *waitPrepareBuffer_;
+ if (!waitPrepareBuffer) {
+ std::weak_ptr<bool> wp = waitPrepareBuffer_;
+ GraphicService::GetInstance()->PostGraphicEvent([this, wp]() {
+ if (!wp.expired()) {
+ PrepareBuffers();
+ *waitPrepareBuffer_ = false;
+ }
+ });
+ *waitPrepareBuffer_ = true;
+ GRAPHIC_LOGE("Post PrepareBuffers Event. BufferCount: %d, QueueSize: %d.", bufferCount_, queueSize_);
+ } else {
+ GRAPHIC_LOGW("Waiting Preparing buffer!");
}
+ res = false;
goto END;
}
if (wait) {
BufferItem* LiteSurface::GetBufferItem(const SurfaceBuffer* buffer)
{
+ if (buffer == nullptr) {
+ return nullptr;
+ }
+
ListNode<BufferItem*>* cur = buffers_.Head();
while (cur != buffers_.End()) {
- if (cur->data_->buffer->addr == buffer->addr) {
+ if ((cur->data_->buffer == buffer) && (cur->data_->buffer->addr == buffer->addr)) {
return cur->data_;
}
cur = cur->next_;
SurfaceBuffer* surfaceBuffer = dirtyList_.Front();
dirtyList_.PopFront();
BufferItem* bufferItem = GetBufferItem(surfaceBuffer);
- if (bufferItem != nullptr) {
- bufferItem->state = BufferState::BUFFER_STATE_ACQUIRE;
+ if (bufferItem == nullptr) {
+ GRAPHIC_LOGE("Acquired buffer is invalid: %p", surfaceBuffer);
+ lock_.Unlock();
+ return nullptr;
}
+ bufferItem->state = BufferState::BUFFER_STATE_ACQUIRE;
lock_.Unlock();
return surfaceBuffer;
}
bool LiteSurface::ReleaseBuffer(SurfaceBuffer* buffer)
{
lock_.Lock();
- if (buffer != nullptr) {
- freeList_.PushBack(buffer);
- BufferItem* bufferItem = GetBufferItem(buffer);
- if (bufferItem != nullptr) {
- bufferItem->state = BufferState::BUFFER_STATE_RELEASE;
- }
- cond_.Signal();
+ BufferItem* bufferItem = GetBufferItem(buffer);
+ if (bufferItem == nullptr) {
+ GRAPHIC_LOGE("Release invalid buffer: %p", buffer);
lock_.Unlock();
- return true;
+ return false;
}
+ bufferItem->state = BufferState::BUFFER_STATE_RELEASE;
+ freeList_.PushBack(buffer);
cond_.Signal();
lock_.Unlock();
- return false;
+ return true;
}
int32_t LiteSurface::FlushBuffer(SurfaceBuffer* buffer)
{
lock_.Lock();
- dirtyList_.PushBack(buffer);
-
BufferItem* bufferItem = GetBufferItem(buffer);
- if (bufferItem != nullptr) {
- bufferItem->state = BufferState::BUFFER_STATE_FLUSH;
+ if (bufferItem == nullptr) {
+ GRAPHIC_LOGE("Flush invalid buffer: %p", buffer);
+ lock_.Unlock();
+ return -1;
}
+ bufferItem->state = BufferState::BUFFER_STATE_FLUSH;
+ dirtyList_.PushBack(buffer);
if (consumerListener_ != nullptr) {
consumerListener_->OnBufferAvailable();
}
freeList_.PopFront();
BufferItem* bufferItem = GetBufferItem(buffer);
-
- if (bufferItem != nullptr) {
- bufferItem->state = BufferState::BUFFER_STATE_REQUEST;
+ if (bufferItem == nullptr) {
+ GRAPHIC_LOGE("Requested buffer is invalid: %p", buffer);
+ lock_.Unlock();
+ return nullptr;
}
+ bufferItem->state = BufferState::BUFFER_STATE_REQUEST;
lock_.Unlock();
return buffer;
}
rotateCenterIndexInNormal_ = static_cast<uint8_t>(focusIndex);
}
}
+ SetTouchable(false);
+ SetDraggable(false);
return UIView::OnRotateStartEvent(event);
}
SetReboundMode(ReboundMode::CENTER_IMG_ON_SCR_CENTER);
}
+ SetTouchable(true);
+ SetDraggable(true);
return UIView::OnRotateEndEvent(event);
}
#endif
DisplayDev::GetInstance()->CloseLayer(LAYER_1);\r
DisplayDev::GetInstance()->SetLayerColorKey(LAYER_0, false);\r
}\r
- if (lastFlushedBuffer_ != nullptr) {\r
- surface_->ReleaseBuffer(lastFlushedBuffer_);\r
- lastFlushedBuffer_ = nullptr;\r
- }\r
- if (currentBuffer_ != nullptr) {\r
- surface_->ReleaseBuffer(currentBuffer_);\r
- currentBuffer_ = nullptr;\r
- }\r
+\r
surface_->UnregisterConsumerListener();\r
LiteMGfxEngine::GetInstance()->ClearHardwareLayer(this);\r
GraphicService::GetInstance()->PostGraphicEvent([] {\r
BlendOption blendOption;\r
#if UIKIT_SKIP_LINE\r
blendOption.transMap.Scale(Vector2<float>{2.0, 2.0}, Vector2<float>{0, 0}); // 2.0: scale 2\r
+ blendOption.transMap.Translate(Vector2<int16_t>(GetRect().GetX(), GetRect().GetY()));\r
#endif\r
blendOption.opacity = OPA_OPAQUE;\r
blendOption.mode = BLEND_SRC_OVER;\r
style.bgColor_ = colorKey_;\r
}\r
\r
- if (!(layerRect_ == GetRect())) {\r
- layerRect_ = GetRect();\r
- AdjustArea(layerRect_);\r
- Rect dirtyRect(0, 0, layerRect_.GetWidth() - 1, layerRect_.GetHeight() - 1);\r
- DisplayDev::GetInstance()->SetLayerPositon(LAYER_1, layerRect_.GetX(), layerRect_.GetY());\r
- DisplayDev::GetInstance()->SetLayerDirtyRegion(LAYER_1, dirtyRect);\r
- }\r
+ layerRect_ = GetRect();\r
+ AdjustArea(layerRect_);\r
+ Rect dirtyRect(0, 0, layerRect_.GetWidth() - 1, layerRect_.GetHeight() - 1);\r
+ DisplayDev::GetInstance()->SetLayerPositon(LAYER_1, layerRect_.GetX(), layerRect_.GetY());\r
+ DisplayDev::GetInstance()->SetLayerDirtyRegion(LAYER_1, dirtyRect);\r
+\r
BaseGfxEngine::GetInstance()->DrawRect(gfxDstBuffer, GetRect(), invalidatedArea, style, OPA_OPAQUE);\r
}\r
\r
PrintImgInfo(info);\r
}\r
}\r
+\r
+std::string UILiteSurfaceView::GetGuiInfo() const\r
+{\r
+ const int len = 256;\r
+ char *buf = new (std::nothrow) char[len];\r
+ if (buf == nullptr) {\r
+ return std::string("");\r
+ }\r
+ memset_s(buf, len, 0, len);\r
+ sprintf_s(buf, len, "stopped %d layerinit %d flushCnt %u lastbuf %p curbuf %p colorKey %x preView %p",\r
+ isStopped_, isLayerInit_, flushCount_, lastFlushedBuffer_, currentBuffer_, colorKey_.full, preView_);\r
+ std::string str(buf);\r
+ delete []buf;\r
+ return str;\r
+}\r
}\r
int16_t right = left + hand.width_ - 1;
int16_t top = hand.position_.y + current.GetTop();
int16_t bottom = top + hand.height_ - 1;
+ int16_t compensationDistance = hand.width_ / 2;
Rect handRect(left, top, right, bottom);
TransformMap backwardMap(handRect);
Vector2<float> pivot;
if (!clockInit) {
/* Prevent old images from being residued */
redraw.Join(redraw, hand.target_);
+ redraw.SetRect(redraw.GetLeft() - compensationDistance, redraw.GetTop() - compensationDistance,
+ redraw.GetRight() + compensationDistance, redraw.GetBottom() + compensationDistance);
InvalidateRect(redraw);
}
}
*/
void SwipeStart(void);
- /* *
- * @brief Get state of scroll animator.
- * @since 1.0
- * @version 1.0
- */
- uint8_t GetScrollState()
- {
- return scrollAnimator_.GetState();
- }
-
private:
bool enableScreenCap_ = false;
CardSwipe* swipeCallback_ = nullptr;
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2024. All rights reserved.
+ * Description: VerSwipeView
+ * Author:
+ * Create: 2024-11
+ */
+
+#ifndef UI_VER_SWIPE_VIEW_H
+#define UI_VER_SWIPE_VIEW_H
+#include "components/ui_swipe_view.h"
+
+namespace OHOS {
+class VerSwipeView : public UISwipeView {
+public:
+ /**
+ * @brief Represents a listener for moving children.
+ *
+ * This is an inner class of <b>VerSwipeView</b>.
+ * It contains a callback function to be invoked when the swipe view moves children.
+ *
+ * @since 1.0
+ * @version 1.0
+ */
+ class OnMoveChildListener : public HeapBase {
+ public:
+ OnMoveChildListener() {}
+ virtual ~OnMoveChildListener() {}
+ virtual void OnMoveChild(UISwipeView& view, int16_t xOffset, int16_t yOffset) = 0;
+ };
+
+ /* *
+ * @brief A constructor used to create the <b>VerSwipeView</b> instance.
+ * @since 1.0
+ * @version 1.0
+ */
+ VerSwipeView() {}
+
+ /* *
+ * @brief A destructor used to delete the <b>VerSwipeView</b> instance.
+ * @since 1.0
+ * @version 1.0
+ */
+ ~VerSwipeView() override {}
+
+ /**
+ * @brief Obtains the listener set for moving child event.
+ *
+ * @return Returns the move child listener.
+ * @since 1.0
+ * @version 1.0
+ */
+ OnMoveChildListener*& GetOnMoveChildListener()
+ {
+ return onMoveChildListener_;
+ }
+
+ /**
+ * @brief Sets the listener that contains a callback to be invoked upon moving child.
+ *
+ * @param onMoveChildListener Indicates the listener to set.
+ * @since 1.0
+ * @version 1.0
+ */
+ void SetOnMoveChildListener(OnMoveChildListener* onMoveChildListener)
+ {
+ onMoveChildListener_ = onMoveChildListener;
+ }
+
+protected:
+ void MoveChildByOffset(int16_t xOffset, int16_t yOffset) override
+ {
+ UISwipeView::MoveChildByOffset(xOffset, yOffset);
+ if (onMoveChildListener_ != nullptr) {
+ onMoveChildListener_->OnMoveChild(*this, xOffset, yOffset);
+ }
+ }
+
+private:
+ OnMoveChildListener* onMoveChildListener_ = nullptr;
+};
+}
+#endif
#include "components/root_view.h"\r
#include "gfx_utils/input_event_info.h"\r
#include "lite_input_distributer.h"\r
+#ifdef SUPPORT_AT_OHOSFWK\r
+#include "graphic_service.h"\r
+#include "modules/keyinput/keyinput.h"\r
+#endif\r
\r
namespace OHOS {\r
bool LiteKeyDevice::Read(DeviceData& data)\r
}\r
KeyEvent event({data.keyId, data.state});\r
RootView::GetInstance()->OnKeyEvent(event);\r
+#ifdef SUPPORT_AT_OHOSFWK\r
+ if (!GraphicService::GetInstance()->IsNativeRunning()) {\r
+ OHOS::ACELite::KeyListener::GetInstance()->OnKeyEvent(event);\r
+ }\r
+#endif\r
}\r
\r
bool LiteKeyDevice::IsEventEmpty()\r
uint8_t* GetCacheData(uint8_t fontId, uint32_t unicode);
+ bool TryToFreeFontCache();
+
private:
struct FontInfo {
uint8_t fontId;
pointData_.PushBack(data);
}
+ bool TryToFreeFontCache() override;
+
private:
float size_ = 0;
UIFontHWCache* pathCache_ = nullptr;
return;
}
- if (layer_[layerId].pos.x == x && layer_[layerId].pos.y == y) {
- return;
- }
-
layer_[layerId].pos.x = x;
layer_[layerId].pos.y = y;
if (layerFuncs_->SetLayerSize != nullptr) {
#include "gfx_utils/graphic_log.h"
#include "securec.h"
#include "common/image_cache_manager.h"
+#include "font/ui_font.h"
#include "hals/gralloc_engines.h"
namespace OHOS {
return ImageCacheManager::GetInstance().TryToFreeImage();
}
+static bool TryToFreeFontCache()
+{
+ return UIFont::GetInstance()->TryToFreeFontCache();
+}
+
bool GrallocEngines::Init()
{
if (grallocFuncs_ != nullptr) {
return false;
}
grallocFuncs_->RegisterTryToFreeImgCallback(TryToFreeImage);
+ grallocFuncs_->RegisterTryToFreeFontCacheCallback(TryToFreeFontCache);
return true;
}
#endif
#ifdef __LITEOS__
OsMemInfoPrint(reinterpret_cast<void*>(MEM_POOL_UI_OTHER));
+ OsMemInfoPrint(reinterpret_cast<void*>(MEM_POOL_UI_FONT));
#endif
return false;
}
}
#if ENABLE_MEMORY_CHECK
-void GrallocEngines::DumpMem()
+void GrallocEngines::DumpMem(bool dumpDetails)
{
int32_t fontCacheSize = 0;
int32_t imageCacheSize = 0;
int32_t yuvCacheSize = 0;
int32_t fontCount = 0;
int32_t fontMax = 0;
+ int32_t pathCnt = 0;
printf("current gralloc allocate memory:\n");
for (auto it : g_buffers) {
if ((it.second->usage & HBM_USE_MEM_FONT) == HBM_USE_MEM_FONT) {
}
if (it.second->usage == HBM_USE_ASSIGN_SIZE) {
imageCacheSize += it.second->size;
- printf(" image addr=%p, size=%d\n", reinterpret_cast<void*>(it.first), it.second->size);
+ if (dumpDetails) {
+ printf(" image addr=%p, size=%d\n", reinterpret_cast<void*>(it.first), it.second->size);
+ }
continue;
}
if ((it.second->usage & HBM_USE_MEM_MULTI_IMG) == HBM_USE_MEM_MULTI_IMG) {
imageCacheSize += it.second->size;
- printf(" multi image addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
+ if (dumpDetails) {
+ printf(" multi image addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
+ }
continue;
}
if ((it.second->usage & HBM_USE_MEM_PATH) == HBM_USE_MEM_PATH) {
pathCacheSize += it.second->size;
- printf(" path addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
+ if (dumpDetails) {
+ printf(" path addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
+ }
+ pathCnt++;
continue;
}
if ((it.second->usage & HBM_USE_MEM_FB) == HBM_USE_MEM_FB) {
fbSize += it.second->size;
- printf(" fb addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
+ if (dumpDetails) {
+ printf(" fb addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
+ }
continue;
}
if ((it.second->usage & HBM_USE_MEM_BUFMAP) == HBM_USE_MEM_BUFMAP) {
mapBufferSize += it.second->size;
- printf(" mapbuffer addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
+ if (dumpDetails) {
+ printf(" mapbuffer addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
+ }
continue;
}
if ((it.second->usage & HBM_USE_MEM_YUV) == HBM_USE_MEM_YUV) {
- printf(" yuv addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
yuvCacheSize += it.second->size;
+ if (dumpDetails) {
+ printf(" yuv addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
+ }
continue;
}
if ((it.second->usage & HBM_USE_MEM_JPEG_DATA) == HBM_USE_MEM_JPEG_DATA) {
- printf(" jpeg addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
yuvCacheSize += it.second->size;
+ if (dumpDetails) {
+ printf(" jpeg addr=%p, size=%d\n", reinterpret_cast<void *>(it.first), it.second->size);
+ }
continue;
}
}
- printf("total size: font %d (count: %d, max: %d), image %d, path %d, fb %d, mapbuffer:%d, yuv %d\n",
- fontCacheSize, fontCount, fontMax, imageCacheSize, pathCacheSize, fbSize, mapBufferSize, yuvCacheSize);
+ printf("total size: font %d (count: %d, max: %d), image %d, path %d (count: %d), fb %d, mapbuffer:%d, yuv %d\n",
+ fontCacheSize, fontCount, fontMax, imageCacheSize, pathCacheSize, pathCnt, fbSize, mapBufferSize, yuvCacheSize);
}
void GrallocEngines::SetMemMonitor(bool enable)
bool AllocBufferOnce(const AllocInfo& info, GrallocBuffer& buffer);
void FreeBuffer(uint8_t* virAddr);
#if ENABLE_MEMORY_CHECK
- void DumpMem();
+ void DumpMem(bool dumpDetails = false);
void SetMemMonitor(bool enable);
#endif
private:
coverflow_ = nullptr;\r
}\r
lastIndex_ = 0;\r
- lastPage_ = nullptr;\r
addImage_ = nullptr;\r
if (label_ != nullptr) {\r
delete label_;\r
imageSub->SetTouchable(true);\r
imageSub->SetOnClickListener(this);\r
coverflow_->Add(page);\r
- lastPage_ = page;\r
}\r
CreateAddButton();\r
CreateTitleLabel();\r
imageSub->SetSrc(src);\r
imageSub->SetTouchable(true);\r
imageSub->SetOnClickListener(this);\r
- coverflow_->Insert(lastPage_, page);\r
- lastPage_ = page;\r
+ coverflow_->Insert(nullptr, page);\r
} else {\r
UITransformGroup* page = dynamic_cast<UITransformGroup*>(view.GetParent());\r
UIView* child = page->GetChildrenHead();\r
UILabel* label_ = nullptr;\r
UIImageView* addImage_ = nullptr;\r
uint16_t lastIndex_ = 0;\r
- UITransformGroup* lastPage_ = nullptr;\r
};\r
} // namespace OHOS\r
#endif // UI_TEST_COVERFLOW_VIEW_2_H\r
minOffset = distance;\r
}\r
}\r
- if (newCenterIndex != lastIndex_) {\r
- lastIndex_ = newCenterIndex;\r
- label_->SetText(slipflow_->GetViewByIndex(lastIndex_)->GetViewId());\r
- }\r
+ lastIndex_ = newCenterIndex;\r
+ label_->SetText(slipflow_->GetViewByIndex(lastIndex_)->GetViewId());\r
\r
Rect curViewRect = slipflow_->GetViewByIndex(lastIndex_)->GetOrigRect();\r
int16_t centerMid = curViewRect.GetLeft() + curViewRect.GetWidth() / DIVISOR_TWO;\r
UIView::~UIView()
{
+#if ENABLE_ROTATE_INPUT
+ ClearFocus();
+#endif
ClearBackgroundBlur();
if (parent_ != nullptr) {
GRAPHIC_LOGE("UIView::~UIView failed, parent is not nullptr! Need to remove from parent component first");
#include "components/root_view.h"
#include "gfx_utils/graphic_log.h"
+#include "gfx_utils/vector.h"
namespace OHOS {
UIViewGroup::UIViewGroup()
}
}
+static void CalculatedHexagonalRegion(Polygon polygon, Graphic::Vector<Point>& vertexes)
+{
+ vertexes.PushBack({(polygon[0].x_ + polygon[1].x_) / 2, (polygon[0].y_ + polygon[1].y_) / 2});
+ vertexes.PushBack({polygon[1].x_ + (polygon[2].x_ - polygon[1].x_) * 1 / 3,
+ polygon[1].y_ + (polygon[2].y_ - polygon[1].y_) * 1 / 3});
+ vertexes.PushBack({polygon[1].x_ + (polygon[2].x_ - polygon[1].x_) * 2 / 3,
+ polygon[1].y_ + (polygon[2].y_ - polygon[1].y_) * 2 / 3});
+ vertexes.PushBack({(polygon[2].x_ + polygon[3].x_) / 2, (polygon[2].y_ + polygon[3].y_) / 2});
+ vertexes.PushBack({polygon[3].x_ + (polygon[0].x_ - polygon[3].x_) * 1 / 3,
+ polygon[3].y_ + (polygon[0].y_ - polygon[3].y_) * 1 / 3});
+ vertexes.PushBack({polygon[3].x_ + (polygon[0].x_ - polygon[3].x_) * 2 / 3,
+ polygon[3].y_ + (polygon[0].y_ - polygon[3].y_) * 2 / 3});
+}
+static bool CalculatedPointInRegion(Point point, Graphic::Vector<Point>& vertexes)
+{
+ bool isInPolygon = false;
+ int j = 0;
+ for (int i = 0; i < vertexes.Size(); i++) {
+ int16_t sx = vertexes[i].x;
+ int16_t sy = vertexes[i].y;
+ j = (i + 1) % vertexes.Size();
+ int16_t tx = vertexes[j].x;
+ int16_t ty = vertexes[j].y;
+ if (((point.y > sy) && (point.y <= ty)) || ((point.y > ty) && (point.y <= sy))) {
+ isInPolygon ^= (sx + (tx - sx) * (point.y - sy) / (ty - sy) > point.x);
+ }
+ }
+ return isInPolygon;
+}
void UIViewGroup::GetTargetView(const Point& point, UIView** current, UIView** target)
{
if ((current == nullptr) || (target == nullptr)) {
if (!view->IsViewGroup()) {
rect = view->GetRect();
if (rect.IsContains(point)) {
+ bool isInPolygon = true;
+ if (view->GetParent()->GetViewType() == UI_ICOSAHEDRON_VIEW) {
+ Graphic::Vector<Point> vertex(6); // 6: point number
+ CalculatedHexagonalRegion(view->GetTransformMap().GetPolygon(), vertex);
+ isInPolygon = CalculatedPointInRegion(point, vertex);
+ }
+ if (isInPolygon) {
view->GetTargetView(point, current, target);
+ }
}
} else {
UIViewGroup* viewGroup = static_cast<UIViewGroup*>(view);
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
#include "dock/rotate_input_device.h"
#include "dock/focus_manager.h"
+#ifdef SUPPORT_AT_OHOSFWK
+#include "graphic_service.h"
+#include "modules/keyinput/keyinput.h"
+#endif
#if ENABLE_ROTATE_INPUT
namespace {
#else
constexpr int16_t ROTATE_INPUT_THRESHOLD = 10;
#endif
-}
+} // namespace
namespace OHOS {
-RotateInputDevice::RotateInputDevice() : rotateStart_(false), threshold_(ROTATE_INPUT_THRESHOLD), cachedRotation_(0) {}
+RotateInputDevice::RotateInputDevice() : rotateStart_(false), threshold_(ROTATE_INPUT_THRESHOLD), cachedRotation_(0)
+{}
-void RotateInputDevice::DispatchEvent(const DeviceData& data)
+void RotateInputDevice::DispatchEvent(const DeviceData &data)
{
bool cachedToRotate = false;
if (data.rotate == 0 || rotateStart_) {
return;
}
- UIView* view = FocusManager::GetInstance()->GetFocusedView();
- if (view == nullptr) {
- return;
+#ifdef SUPPORT_AT_OHOSFWK
+ if (data.rotate != 0) {
+ if (!GraphicService::GetInstance()->IsNativeRunning()) {
+ OHOS::ACELite::RotateListener::GetInstance()->OnRotateEvent(data.rotate);
+ }
}
+#endif
- UIView* par = view;
- while (par->GetParent() != nullptr) {
- if (!par->IsVisible()) {
+ UIView *view = FocusManager::GetInstance()->GetFocusedView();
+ if (view != nullptr) {
+ UIView *par = view;
+ while (par->GetParent() != nullptr) {
+ if (!par->IsVisible()) {
+ return;
+ }
+ par = par->GetParent();
+ }
+ if (par->GetViewType() != UI_ROOT_VIEW) {
return;
}
- par = par->GetParent();
- }
- if (par->GetViewType() != UI_ROOT_VIEW) {
- return;
}
if (MATH_ABS(data.rotate) < threshold_ && !rotateStart_ && !cachedToRotate) {
return;
}
if (data.rotate == 0 && rotateStart_) {
- view->OnRotateEndEvent(0);
+ if (view != nullptr) {
+ view->OnRotateEndEvent(0);
+ }
rotateStart_ = false;
return;
}
if (!rotateStart_) {
- view->OnRotateStartEvent(data.rotate);
+ if (view != nullptr) {
+ view->OnRotateStartEvent(data.rotate);
+ }
+ }
+ if (view != nullptr) {
+ view->OnRotateEvent(data.rotate);
}
- view->OnRotateEvent(data.rotate);
+
rotateStart_ = true;
}
-} // namespace OHOS
+} // namespace OHOS
#endif
}
}
+bool UIFont::TryToFreeFontCache()
+{
+ if (instance_ == nullptr) {
+ return false;
+ }
+ return instance_->TryToFreeFontCache();
+}
+
bool UIFont::GetGlyphPathData(uint32_t unicode, uint8_t shapingFont, GlyphPathData& data)
{
bool ret = false;
}
}
+ void ClearBlurView(UIView* view)
+ {
+ if (blurView_ == view) {
+ blurView_ = nullptr;
+ }
+ }
+
+ UIView* GetBlurView()
+ {
+ return blurView_;
+ }
+
void SetSnapshotFlag(bool flag)
{
isSnapshot_ = flag;
return isSnapshot_;
}
- void ClearBlurView(UIView* view)
- {
- if (blurView_ == view) {
- blurView_ = nullptr;
- }
- }
-
void Add(UIView* view) override
{
appView_.Add(view);
return false;
}
+ virtual bool TryToFreeFontCache()
+ {
+ return false;
+ }
+
/**
* @brief Get bitmap for specific unicode
*
*/
bool GetGlyphPathData(uint32_t unicode, uint8_t shapingFont, GlyphPathData& data);
+ /**
+ * @brief Try to free mem used for font cache by LRU rule. This is only applicable for UIFontHWVector.
+ *
+ */
+ bool TryToFreeFontCache();
+
/**
* @brief Get bitmap for specific unicode
*
--- /dev/null
+#===============================================================================
+# @brief cmake file
+# Copyright (c) CompanyNameMagicTag 2022-2022. All rights reserved.
+#===============================================================================
+
+enable_language(CXX)
+
+set(COMPONENT_NAME "js_audio_capturer")
+
+set(SOURCES
+ ${CMAKE_CURRENT_SOURCE_DIR}/recording_module.cpp
+)
+
+set(PUBLIC_HEADER
+ ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+set(PRIVATE_HEADER
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../utils/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../interfaces/kits
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../frameworks/buffersource/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../frameworks/player_control/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../frameworks/player_control/decoder
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../frameworks/player_control/player
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../frameworks/player_control/sink
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../frameworks/player_control/source
+ ${ROOTDIR}/middleware/services/media/foundation/audiomanager/interfaces/kits/audiomanager
+ ${ROOTDIR}/middleware/services/media/foundation/audiomanager/interfaces/kits/audiocommon
+ ${ROOTDIR}/middleware/services/media/foundation/audiomanager/audioservice/include
+ ${ROOTDIR}/middleware/services/media/foundation/audiomanager/frameworks/audiostream/include
+ ${ROOTDIR}/middleware/services/media/foundation/audiomanager/frameworks/audioutils/include
+ ${ROOTDIR}/open_source/openharmony/drivers/peripheral/format/interfaces/include
+ ${ROOTDIR}/middleware/services/gui/uikit/surface/interfaces/kits
+ ${ROOTDIR}/middleware/services/gui/uikit/utils/interfaces/kits
+ ${ROOTDIR}/open_source/openharmony/drivers/peripheral/codec/interfaces/include
+ ${ROOTDIR}/open_source/openharmony/drivers/peripheral/display/interfaces/include
+ ${ROOTDIR}/open_source/openharmony/foundation/multimedia/audio_capturer/interfaces/kits
+ ##${ROOTDIR}/middleware/services/media/foundation/sample
+)
+
+set(CCDEFINES ${CCDEFINES} "_GNU_SOURCE" "_XOPEN_SOURCE=700" "UNSUPPORT_AUDIO_DECODER")
+set(PRIVATE_DEFINES
+ ${CCDEFINES}
+)
+
+set(PUBLIC_DEFINES
+)
+
+# use this when you want to add ccflags like -include xxx
+set(COMPONENT_PUBLIC_CCFLAGS
+)
+
+set(COMPONENT_FLAGS ${ccflags})
+list(REMOVE_ITEM COMPONENT_FLAGS -std=gnu99 -std=c99 -std=gnu11 -std=c11)
+list(APPEND COMPONENT_FLAGS -std=c++11 -Wno-unused-parameter -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wno-undef -Wno-bitwise-op-parentheses -Wno-shift-op-parentheses -nostdlibinc -Wno-typedef-redefinition)
+set(COMPONENT_CCFLAGS
+ ${COMPONENT_FLAGS}
+)
+
+set(WHOLE_LINK
+ true
+)
+
+set(MAIN_COMPONENT
+ false
+)
+
+set(LIBRARY_OUTPUT_PATH ${BIN_DIR}/${CHIP}/libs/media/${BOARD}_${APPLICATION})
+
+build_component()
--- /dev/null
+/*\r
+* Copyright (c) CompanyNameMagicTag. 2021-2021. All rights reserved.\r
+* Description: audio capture wrapper\r
+* Author: Media Software Group\r
+* Create: 2021-09-13\r
+*/\r
+\r
+#include "recording_module.h"\r
+#include <stdio.h>\r
+#include <string.h>\r
+#include <climits>\r
+#include <stdlib.h>\r
+#include <unistd.h>\r
+#include <sys/select.h>\r
+#include <sys/time.h>\r
+#include <sys/types.h>\r
+#include <sys/stat.h>\r
+#include <fcntl.h>\r
+#ifdef SUPPORT_SYS_PRCTL\r
+#include <sys/prctl.h>\r
+#endif\r
+#include <string>\r
+#include <iostream>\r
+#include "securec.h"\r
+#include "media_errors.h"\r
+#include "audio_manager.h"\r
+#include "media_log.h"\r
+#include "media_thread_adapt.h"\r
+#include "msg_center_protocol.h"\r
+#include "cmsis_os2.h"\r
+#include "audio_capturer.h"\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+\r
+using namespace OHOS::Media;\r
+using namespace OHOS::Audio;\r
+using namespace::Audio;\r
+using Audio::InterruptListener;\r
+using Audio::AudioInterrupt;\r
+using Audio::AudioManager;\r
+#define PLAYER_CONTROL_CMD_LEN 20\r
+#define READ_RETRY_TIME_US 10000\r
+#define READ_COUNT_MAX 1000\r
+#define GET_AUDIO_TIME_INTERVAL_TIMES 100\r
+#define MAX_ARGC 5\r
+#define PATH_STR_SIZE 64\r
+\r
+typedef struct {\r
+ size_t framesize;\r
+ uint8_t *buffer;\r
+ AudioCapturer *audioCap;\r
+ AudioCodecFormat audioFormat;\r
+ bool bThreadRun;\r
+} AudioSourceInput;\r
+\r
+struct NameAudioFormat {\r
+ std::string name;\r
+ AudioCodecFormat audioFormat;\r
+};\r
+\r
+typedef struct TagTestSample {\r
+ char control[PLAYER_CONTROL_CMD_LEN];\r
+ bool needStop;\r
+ AudioInterrupt interrupt;\r
+ MediaThreadIdHandle audioCaptureProcess;\r
+} TestSample;\r
+\r
+struct SampleAudioCapturerInfo {\r
+ /** Audio source type */\r
+ AudioSourceType inputSource = AUDIO_MIC;\r
+ /** Audio codec format */\r
+ AudioCodecFormat audioFormat = AUDIO_DEFAULT;\r
+ /** Sampling rate */\r
+ int32_t sampleRate = 0;\r
+ /** Number of audio channels */\r
+ int32_t channelCount = 0;\r
+ /** Bit rate */\r
+ int32_t bitRate = 0;\r
+ /** Audio stream type */\r
+ AudioStreamType streamType = TYPE_MEDIA;\r
+ /** Bit width */\r
+ AudioBitWidth bitWidth = BIT_WIDTH_16;\r
+ /** Session id */\r
+ AudioSession sessionID = AUDIO_SESSION_ID_NONE;\r
+};\r
+\r
+static bool g_interruptHintStop = false;\r
+static std::shared_ptr<AudioCapturer> g_audioCap;\r
+static NameAudioFormat g_audioCodecFormat[] = {\r
+ {"mp3", MP3},\r
+ {"ape", APE},\r
+ {"msbc", mSBC},\r
+ {"vorbis", VORBIS},\r
+ {"flac", FLAC},\r
+ {"opus", OPUS},\r
+ {"g726", G726},\r
+ {"g711u", G711U},\r
+ {"g711a", G711A},\r
+ {"aaceld", AAC_ELD},\r
+ {"silk", SILK},\r
+ {"pcm", PCM}\r
+};\r
+\r
+class CaptureInterruptListener : public InterruptListener {\r
+public:\r
+ CaptureInterruptListener() {};\r
+ ~CaptureInterruptListener() override {};\r
+\r
+ void OnInterrupt(int32_t type, int32_t hint) override\r
+ {\r
+ MEDIA_INFO_LOG("CaptureInterruptListener OnInterrupt, type:%d, hint:%d", type, hint);\r
+\r
+ if (type == INTERRUPT_TYPE_BEGIN && hint == INTERRUPT_HINT_PAUSE) {\r
+ MEDIA_INFO_LOG("OnInterrupt pause not supported");\r
+ }\r
+ if (type == INTERRUPT_TYPE_END && hint == INTERRUPT_HINT_RESUME) {\r
+ MEDIA_INFO_LOG("OnInterrupt resume not supported");\r
+ }\r
+ if (type == INTERRUPT_TYPE_BEGIN && hint == INTERRUPT_HINT_STOP) {\r
+ g_interruptHintStop = true;\r
+ }\r
+ if (type == INTERRUPT_TYPE_END && hint == INTERRUPT_HINT_STOP) {\r
+ MEDIA_INFO_LOG("OnInterrupt stop not supported");\r
+ }\r
+ }\r
+};\r
+\r
+static AudioSourceInput g_audioSourceProcessInput;\r
+static AudioManager& g_amInstance = AudioManager::GetInstance();\r
+static TestSample g_sample;\r
+static std::shared_ptr<CaptureInterruptListener> g_captureInterruptListener;\r
+extern osMessageQueueId_t g_pcm_stream_msg_queue_id;\r
+\r
+static void* AudioCaptureProcess(void* arg)\r
+{\r
+ int32_t readCnt = 0;\r
+ Timestamp timeStamp;\r
+ g_audioSourceProcessInput.bThreadRun = true;\r
+ pcm_stream_queue_msg msg = {MSGCENTER_TYPE_ID_XIAODU_SEND_PCM_STREAM, NULL, 0};\r
+ while (!g_sample.needStop && !g_interruptHintStop) {\r
+ int32_t ret = g_audioCap->Read(g_audioSourceProcessInput.buffer, g_audioSourceProcessInput.framesize, false);\r
+ if (ret == -1) {\r
+ MEDIA_ERR_LOG("audioCap Read failed:0x%x", ret);\r
+ continue;\r
+ }\r
+ if (ret == ERR_RETRY_READ) {\r
+ usleep(READ_RETRY_TIME_US);\r
+ continue;\r
+ }\r
+\r
+ if (ret == 0) {\r
+ continue;\r
+ }\r
+ msg.len = ret;\r
+ msg.data = (uint8_t *)malloc(msg.len); /* 消费者释放内存 */\r
+ if (msg.data == NULL) {\r
+ MEDIA_ERR_LOG("malloc fail. len = %d", msg.len);\r
+ break;\r
+ }\r
+ (void)memcpy_s(msg.data, msg.len, g_audioSourceProcessInput.buffer, msg.len);\r
+\r
+ errcode_t res = osMessageQueuePut(g_pcm_stream_msg_queue_id, &msg, 0, 0);\r
+ if (res != osOK) {\r
+ MEDIA_ERR_LOG("put pcm stream fail, len = %d, res = 0x%x", msg.len, res);\r
+ break;\r
+ }\r
+\r
+ readCnt++;\r
+ if (readCnt % GET_AUDIO_TIME_INTERVAL_TIMES == 0) {\r
+ if (g_audioCap->GetAudioTime(timeStamp, Timestamp::Timebase::MONOTONIC)) {\r
+ MEDIA_INFO_LOG("read %d frames timestamp seconds:%ld, nanoseconds:%ld",\r
+ readCnt, timeStamp.time.tv_sec, timeStamp.time.tv_nsec);\r
+ }\r
+ }\r
+ MEDIA_INFO_LOG("audioCap Read readCnt = %d, size = %d", readCnt, ret);\r
+ }\r
+\r
+ if (!g_audioCap->Stop()) {\r
+ MEDIA_ERR_LOG("Stop failed");\r
+ }\r
+ if (!g_audioCap->Release()) {\r
+ MEDIA_ERR_LOG("Release failed");\r
+ }\r
+\r
+ delete g_audioSourceProcessInput.buffer;\r
+ g_audioSourceProcessInput.buffer = nullptr;\r
+\r
+ if (g_amInstance.DeactivateAudioInterrupt(g_sample.interrupt) != 0) {\r
+ MEDIA_ERR_LOG("deactivate audio interrupt failed");\r
+ }\r
+ g_audioCap.reset();\r
+ g_audioSourceProcessInput.bThreadRun = false;\r
+ MEDIA_INFO_LOG("AudioCaptureProcess end");\r
+ return NULL;\r
+}\r
+\r
+static void AudioCaptureGetFormat(const char **argv, AudioCodecFormat &audioFormat)\r
+{\r
+ char formatType[10];\r
+ if (strncpy_s(formatType, sizeof(formatType), argv[0x1], strlen(argv[0x1])) != 0) {\r
+ MEDIA_ERR_LOG("strncpy_s failed");\r
+ }\r
+ std::string inputFormat = formatType;\r
+ for (size_t i = 0; i < (sizeof(g_audioCodecFormat) / sizeof(g_audioCodecFormat[0])); i++) {\r
+ if (inputFormat == g_audioCodecFormat[i].name) {\r
+ audioFormat = g_audioCodecFormat[i].audioFormat;\r
+ MEDIA_INFO_LOG("[AudioCaptureSample] set audioFormat %s", g_audioCodecFormat[i].name.c_str());\r
+ }\r
+ }\r
+}\r
+\r
+static int32_t AudioCaptureGetInfo(const char **argv, SampleAudioCapturerInfo &audioCapturerInfo, std::string &filePath)\r
+{\r
+ AudioCaptureGetFormat(argv, audioCapturerInfo.audioFormat);\r
+ audioCapturerInfo.sampleRate = atoi(argv[0x2]); /* 2: samplerate */\r
+ MEDIA_INFO_LOG("set capture parameter sampleRate:%d", audioCapturerInfo.sampleRate);\r
+ audioCapturerInfo.channelCount = atoi(argv[0x3]); /* 3: channel */\r
+ MEDIA_INFO_LOG("set capture parameter channel:%d", audioCapturerInfo.channelCount);\r
+ audioCapturerInfo.bitWidth = (AudioBitWidth)atoi(argv[0x4]); /* 4: bitWidth */\r
+ MEDIA_INFO_LOG("set capture parameter bitWidth:%d", audioCapturerInfo.bitWidth);\r
+ MEDIA_INFO_LOG("input argv[5]:%s.", argv[5]); /* 5: filePath */\r
+\r
+ if (strlen(argv[0x5]) < PATH_MAX) {\r
+ filePath = argv[0x5];\r
+ } else {\r
+ MEDIA_ERR_LOG("input path too long");\r
+ return -1;\r
+ }\r
+ return 0;\r
+}\r
+\r
+static int32_t HandleAudioCaptureCmd(int32_t argc, const char **argv)\r
+{\r
+ if (argc == 1 && argv[0] != nullptr) {\r
+ if (memcpy_s(g_sample.control, PLAYER_CONTROL_CMD_LEN,\r
+ argv[0], strlen(argv[0]) + 1) != EOK) {\r
+ MEDIA_ERR_LOG("memcpy_s failed");\r
+ }\r
+ MEDIA_INFO_LOG("audio_capture argv[0]: %s.", argv[0]);\r
+ if ((strncmp(g_sample.control, "stop", strlen("stop")) == 0)) {\r
+ if (g_audioSourceProcessInput.bThreadRun) {\r
+ g_sample.needStop = true;\r
+ MEDIA_INFO_LOG("set g_sample.needStop:%d", g_sample.needStop);\r
+ MediaThreadJoin(&g_sample.audioCaptureProcess);\r
+ } else {\r
+ MEDIA_INFO_LOG("bThreadRun:%d no need stop", g_audioSourceProcessInput.bThreadRun);\r
+ }\r
+ MEDIA_INFO_LOG("stop command excute success");\r
+ return 0;\r
+ } else if ((strncmp(g_sample.control, "mute", strlen("mute")) == 0)) {\r
+ MEDIA_INFO_LOG("mute detected call SetMicrophoneMute(true)");\r
+ if (!g_amInstance.SetMicrophoneMute(true)) {\r
+ MEDIA_ERR_LOG("SetMicrophoneMute failed");\r
+ }\r
+ if (!g_amInstance.IsMicrophoneMute()) {\r
+ MEDIA_ERR_LOG("IsMicrophoneMute return not true");\r
+ }\r
+ MEDIA_INFO_LOG("mute cmd out");\r
+ } else if ((strncmp(g_sample.control, "unmute", strlen("unmute")) == 0)) {\r
+ MEDIA_INFO_LOG("unmute detected call SetMicrophoneMute(false)");\r
+ if (!g_amInstance.SetMicrophoneMute(false)) {\r
+ MEDIA_ERR_LOG("SetMicrophoneMute failed");\r
+ }\r
+ if (g_amInstance.IsMicrophoneMute()) {\r
+ MEDIA_ERR_LOG("IsMicrophoneMute return not false");\r
+ }\r
+ MEDIA_INFO_LOG("unmute cmd out");\r
+ } else {\r
+ MEDIA_ERR_LOG("[AudioCaptureSample]control cmd not supported:%s do nothing", g_sample.control);\r
+ return 0;\r
+ }\r
+ }\r
+ return 0;\r
+}\r
+\r
+static void ConvertCaptureInfo(AudioCapturerInfo &dts, const SampleAudioCapturerInfo &src)\r
+{\r
+ dts.inputSource = src.inputSource;\r
+ dts.audioFormat = src.audioFormat;\r
+ dts.sampleRate = src.sampleRate;\r
+ dts.channelCount = src.channelCount;\r
+ dts.streamType = src.streamType;\r
+ dts.bitWidth = src.bitWidth;\r
+ dts.sessionID = src.sessionID;\r
+}\r
+\r
+static int32_t AudioCaptureSetInfo(SampleAudioCapturerInfo audioCapturerInfo)\r
+{\r
+ AudioCapturerInfo info = {};\r
+ ConvertCaptureInfo(info, audioCapturerInfo);\r
+ if (g_audioCap->SetCapturerInfo(info) != 0) {\r
+ MEDIA_ERR_LOG("Can't SetCapturerInfo");\r
+ return -1;\r
+ }\r
+ size_t frameCount = g_audioCap->GetFrameCount();\r
+ if (!frameCount) {\r
+ MEDIA_ERR_LOG("Can't GetFrameCount");\r
+ (void)g_audioCap->Release();\r
+ return -1;\r
+ }\r
+ MEDIA_INFO_LOG("GetFrameCount:%d", frameCount);\r
+ g_audioSourceProcessInput.framesize = frameCount * info.channelCount * info.bitWidth / 8; /* 8: byte width */\r
+ g_audioSourceProcessInput.buffer = new uint8_t[g_audioSourceProcessInput.framesize];\r
+ if (g_audioSourceProcessInput.buffer == nullptr) {\r
+ (void)g_audioCap->Release();\r
+ return -1;\r
+ }\r
+ if (!g_audioCap->Start()) {\r
+ MEDIA_ERR_LOG("Can't Start");\r
+ delete g_audioSourceProcessInput.buffer;\r
+ g_audioSourceProcessInput.buffer = nullptr;\r
+ (void)g_audioCap->Release();\r
+ return -1;\r
+ }\r
+ return 0;\r
+}\r
+\r
+static int32_t ActivateAudioInterrupt(AudioSession &sessionId)\r
+{\r
+ g_amInstance = AudioManager::GetInstance();\r
+ g_amInstance.Initialize();\r
+ sessionId = g_amInstance.MakeSessionId();\r
+ if (sessionId == AUDIO_SESSION_ID_NONE) {\r
+ MEDIA_ERR_LOG("session is none");\r
+ return -1;\r
+ }\r
+ MEDIA_INFO_LOG("sessionId:%d", sessionId);\r
+ g_captureInterruptListener = std::make_shared<CaptureInterruptListener>();\r
+ g_sample.interrupt = { AUDIO_STREAM_VOICE_ASSISTANT, sessionId, g_captureInterruptListener };\r
+\r
+ if (g_amInstance.ActivateAudioInterrupt(g_sample.interrupt) == INTERRUPT_FAILED) {\r
+ MEDIA_ERR_LOG("ActivateAudioInterrupt failed");\r
+ return -1;\r
+ }\r
+ return 0;\r
+}\r
+\r
+\r
+static int32_t CheckInputParam(int32_t argc, const char **argv)\r
+{\r
+ if (argc != 0x6) { // must be 6 parameters\r
+ MEDIA_ERR_LOG("argc:%d is invalid, must be 6 parameters", argc);\r
+ return -1;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+\r
+int MakeAudioDir(const char *dir)\r
+{\r
+ if (strlen(dir) >= PATH_STR_SIZE) {\r
+ return -1;\r
+ }\r
+ int i, len;\r
+ char str[PATH_STR_SIZE];\r
+ if (strncpy_s(str, PATH_STR_SIZE, dir, strlen(dir)) != 0) {\r
+ MEDIA_ERR_LOG("copy path error");\r
+ return -1;\r
+ }\r
+ len = strlen(str);\r
+ for (i = 0; i < len; i++) {\r
+ if (str[i] == '/') {\r
+ str[i] = '\0';\r
+ if (access(str, F_OK) != 0) {\r
+ (void)mkdir(str, 0755);\r
+ }\r
+ str[i] = '/';\r
+ }\r
+ }\r
+ if (len > 0 && access(str, F_OK) != 0) {\r
+ (void)mkdir(str, 0755);\r
+ }\r
+ return 0;\r
+}\r
+\r
+\r
+\r
+int32_t AudioCaptureStart_sample(int32_t argc, const char **argv)\r
+{\r
+ errcode_t res;\r
+ for (int32_t i = 0; i < argc; i++) {\r
+ MEDIA_INFO_LOG("argv[%d]:%s", i, argv[i]);\r
+ }\r
+ int32_t ret = CheckInputParam(argc, argv);\r
+ if (ret != 0) {\r
+ return ret;\r
+ }\r
+\r
+ std::string filePath = "";\r
+ g_sample.needStop = false;\r
+ g_interruptHintStop = false;\r
+ SampleAudioCapturerInfo audioCapturerInfo = {};\r
+\r
+ ret = AudioCaptureGetInfo(argv, audioCapturerInfo, filePath);\r
+ if (ret != 0) {\r
+ return ret;\r
+ }\r
+\r
+ AudioSession sessionId = AUDIO_SESSION_ID_NONE;\r
+ ret = ActivateAudioInterrupt(sessionId);\r
+ if (ret != 0) {\r
+ return ret;\r
+ }\r
+ g_audioCap = std::make_shared<AudioCapturer>();\r
+ if (g_audioCap == nullptr || g_audioCap.get() == nullptr) {\r
+ MEDIA_ERR_LOG("audio capture is nullptr");\r
+ (void)g_amInstance.DeactivateAudioInterrupt(g_sample.interrupt);\r
+ return -1;\r
+ }\r
+\r
+ ret = MakeAudioDir("/user/log/xiaodu");\r
+ if (ret != 0) {\r
+ MEDIA_ERR_LOG("dir path is invalid");\r
+ return -1;\r
+ }\r
+\r
+ audioCapturerInfo.sessionID = sessionId;\r
+ audioCapturerInfo.inputSource = AUDIO_MIC;\r
+ audioCapturerInfo.streamType = AUDIO_STREAM_VOICE_ASSISTANT;\r
+ ret = AudioCaptureSetInfo(audioCapturerInfo);\r
+ if (ret != 0) {\r
+ g_audioCap.reset();\r
+ (void)g_amInstance.DeactivateAudioInterrupt(g_sample.interrupt);\r
+ return ret;\r
+ }\r
+\r
+ /* send record start */\r
+ res = msg_center_xiaodu_start_record(MSGCENTER_CMD_XIAODU, MSGCENTER_TYPE_ID_XIAODU_START_RECORD, NULL, 0);\r
+ if (res != ERRCODE_SUCC) {\r
+ MEDIA_ERR_LOG("send start fail.\r\n");\r
+ return res;\r
+ }\r
+\r
+ /* create pcm stream task for transfer */\r
+ ret = pcm_stream_create_task();\r
+ if (ret != ERRCODE_SUCC) {\r
+ return ERRCODE_FAIL;\r
+ }\r
+\r
+ MediaThreadattr attr = { "AudioCaptureTask", 0x2000, THREAD_SCHED_INVALID, 0, false };\r
+ g_sample.audioCaptureProcess = MediaThreadCreate(AudioCaptureProcess, NULL, &attr);\r
+ if (g_sample.audioCaptureProcess == nullptr) {\r
+ MEDIA_ERR_LOG("thread create failed");\r
+ return -1;\r
+ }\r
+ return 0;\r
+}\r
+\r
+\r
+#ifdef __cplusplus\r
+};\r
+\r
+namespace OHOS {\r
+namespace ACELite {\r
+\r
+JSIValue AudioCapturerModule::Start(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)\r
+{\r
+ const char *pars[6] = {"","","16000","1","16","/user/log/xiaodu/xiaodu.pcm"};\r
+ return JSI::CreateBoolean(AudioCaptureStart_sample(6,pars));\r
+}\r
+\r
+JSIValue AudioCapturerModule::Stop(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)\r
+{\r
+ g_sample.needStop = true;\r
+ MediaThreadJoin(&g_sample.audioCaptureProcess);\r
+ g_sample.audioCaptureProcess = nullptr;\r
+ return JSI::CreateBoolean(0);\r
+}\r
+\r
+void AudioCapturerModule::ExceptionStop(void)\r
+{\r
+ if (g_sample.needStop == false) {\r
+ g_sample.needStop = true;\r
+ }\r
+}\r
+\r
+void InitAudioCapturerModule(JSIValue exports)\r
+{\r
+ JSI::SetModuleAPI(exports, "Start", AudioCapturerModule::Start);\r
+ JSI::SetModuleAPI(exports, "Stop", AudioCapturerModule::Stop);\r
+}\r
+\r
+}\r
+}\r
+\r
+#endif\r
--- /dev/null
+/*\r
+* Copyright (c) CompanyNameMagicTag. 2021-2021. All rights reserved.\r
+* Description: audio capture wrapper\r
+* Author: Media Software Group\r
+* Create: 2021-09-13\r
+*/\r
+\r
+#ifndef AUDIOCAPTURER_MODULE_H\r
+#define AUDIOCAPTURER_MODULE_H\r
+\r
+#include <stdint.h>\r
+#include "jsi.h"\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+int32_t AudioCaptureSample(int32_t argc, const char *argv[]);\r
+\r
+\r
+#ifdef __cplusplus\r
+};\r
+#endif\r
+\r
+namespace OHOS {\r
+namespace ACELite {\r
+class AudioCapturerModule final : public MemoryHeap {\r
+public:\r
+ /**\r
+ * constructor\r
+ */\r
+ AudioCapturerModule() = default;\r
+\r
+ /**\r
+ * desconstructor\r
+ */\r
+ ~AudioCapturerModule() = default;\r
+ /**\r
+ * Start\r
+ */\r
+ static JSIValue Start(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);\r
+\r
+ /**\r
+ * Stop\r
+ */\r
+ static JSIValue Stop(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);\r
+\r
+ /**\r
+ handle exception\r
+ */\r
+ static void ExceptionStop(void);\r
+};\r
+\r
+void InitAudioCapturerModule(JSIValue exports);\r
+}\r
+}\r
+\r
+\r
+#endif\r
bool AudioServiceSetVolume(AudioStreamType streamType, int32_t volume)
{
- CHK_FAILED_RETURN(g_audioSVCInited, true, AUDIO_NO_INIT, "Audio Service not init");
+ CHK_FAILED_RETURN(g_audioSVCInited, true, false, "Audio Service not init");
if (volume < VOLUME_MIN || volume > VOLUME_MAX) {
return false;
}
bool AudioServiceMute(AudioStreamType streamType)
{
- CHK_FAILED_RETURN(g_audioSVCInited, true, AUDIO_NO_INIT, "Audio Service not init");
+ CHK_FAILED_RETURN(g_audioSVCInited, true, false, "Audio Service not init");
int32_t ret = StreamMgrSetMute(streamType, true);
if (ret != AUDIO_SUCCESS) {
return false;
bool AudioServiceUnMute(AudioStreamType streamType)
{
- CHK_FAILED_RETURN(g_audioSVCInited, true, AUDIO_NO_INIT, "Audio Service not init");
+ CHK_FAILED_RETURN(g_audioSVCInited, true, false, "Audio Service not init");
int32_t ret = StreamMgrSetMute(streamType, false);
if (ret != AUDIO_SUCCESS) {
return false;
bool AudioServiceIsMute(AudioStreamType streamType)
{
- CHK_FAILED_RETURN(g_audioSVCInited, true, AUDIO_NO_INIT, "Audio Service not init");
+ CHK_FAILED_RETURN(g_audioSVCInited, true, false, "Audio Service not init");
return StreamMgrIsMute(streamType);
}
bool AudioServiceSetMasterMute(bool isMute)
{
- CHK_FAILED_RETURN(g_audioSVCInited, true, AUDIO_NO_INIT, "Audio Service not init");
+ CHK_FAILED_RETURN(g_audioSVCInited, true, false, "Audio Service not init");
return StreamMgrSetMasterMute(isMute);
}
bool AudioServiceIsMasterMute(void)
{
- CHK_FAILED_RETURN(g_audioSVCInited, true, AUDIO_NO_INIT, "Audio Service not init");
+ CHK_FAILED_RETURN(g_audioSVCInited, true, false, "Audio Service not init");
return StreamMgrIsMasterMute();
}
bool AudioServiceSetMicrophoneMute(bool isMute)
{
- CHK_FAILED_RETURN(g_audioSVCInited, true, AUDIO_NO_INIT, "Audio Service not init");
+ CHK_FAILED_RETURN(g_audioSVCInited, true, false, "Audio Service not init");
return StreamMgrSetMicrophoneMute(isMute);
}
bool AudioServiceIsMicrophoneMute(void)
{
- CHK_FAILED_RETURN(g_audioSVCInited, true, AUDIO_NO_INIT, "Audio Service not init");
+ CHK_FAILED_RETURN(g_audioSVCInited, true, false, "Audio Service not init");
return StreamMgrIsMicrophoneMute();
}
bool AudioServiceSetRingerMode(AudioRingMode mode)
{
- CHK_FAILED_RETURN(g_audioSVCInited, true, AUDIO_NO_INIT, "Audio Service not init");
+ CHK_FAILED_RETURN(g_audioSVCInited, true, false, "Audio Service not init");
return StreamMgrSetRingerMode(mode);
}
static StreamTypeMap g_mapStreamType[] = {\r
{ AUDIO_STREAM_MUSIC, AUDIO_IN_MEDIA },\r
{ AUDIO_STREAM_NOTIFICATION, AUDIO_IN_MEDIA },\r
- { AUDIO_STREAM_VOICE_ASSISTANT, AUDIO_IN_MEDIA },\r
+ { AUDIO_STREAM_VOICE_ASSISTANT, AUDIO_IN_COMMUNICATION },\r
{ AUDIO_STREAM_VOICE_RECORD, AUDIO_IN_MEDIA },\r
{ AUDIO_STREAM_A2DP_MUSIC, AUDIO_IN_MEDIA },\r
{ AUDIO_STREAM_VOICE_CALL, AUDIO_IN_COMMUNICATION },\r
ALOGE("Adapter name:%s InitAllPorts failed", (desc == NULL) ? "unknow" : desc->adapterName);\r
manager->UnloadAdapter(manager, adapter);\r
g_audioHalDesc.audioAdapterDesc[adapterIndex].audioAdapter = NULL;\r
- continue;\r
+ return AUDIO_ERROR;\r
}\r
g_audioHalDesc.audioAdapterDesc[adapterIndex].desc = desc;\r
adapterIndex++;\r
\r
static InterruptMgrContext g_interruptMgrCtx;\r
\r
+static AudioStreamType g_notSupportHandleException[] = {\r
+ AUDIO_STREAM_VOICE_ASSISTANT,\r
+};\r
+\r
static int64_t GetNowTimeUs(void)\r
{\r
struct timeval tv;\r
ALOGD("CreateStream interruptEl->isInterrupted:%d", interruptEl->isInterrupted);\r
ALOGD("CreateStream interruptEl->sessionID:%d", interruptEl->sessionID);\r
ALOGD("CreateStream interruptEl->streamType:0x%x", interruptEl->streamType);\r
- if (!interruptEl->isInterrupted && interruptEl->sessionID == sessionID &&\r
+ if (interruptEl->sessionID == sessionID &&\r
interruptEl->streamType == streamDesc->streamType) {\r
/* 先把 streamDesc copy 到 streamDesc 中 */\r
interruptEl->routedStreamDesc.streamDesc = *streamDesc;\r
}\r
return ret;\r
}\r
+static bool CheckStreamTypeSupportHandleException(AudioStreamType streamType)\r
+{\r
+ for (uint32_t i = 0; i < sizeof(g_notSupportHandleException) /\r
+ sizeof(g_notSupportHandleException[0]); i++) {\r
+ if (g_notSupportHandleException[i] == streamType) {\r
+ return false;\r
+ }\r
+ }\r
+ return true;\r
+}\r
+\r
static void InterruptMgrHandleExceptionInner(List *list, bool isOutPut)\r
{\r
int64_t nowTimeUs = GetNowTimeUs();\r
ALOGI("interruptToCreateTimeOutException:%d destroyToDeactiveTimeOutException:%d sessionID:%u streamType:0x%x",\r
interruptToCreateTimeOutException, destroyToDeactiveTimeOutException, interruptEl->sessionID,\r
interruptEl->streamType);\r
- if (interruptToCreateTimeOutException || destroyToDeactiveTimeOutException) {\r
+ if ((interruptToCreateTimeOutException || destroyToDeactiveTimeOutException) &&\r
+ CheckStreamTypeSupportHandleException(interruptEl->streamType)) {\r
/* 栈顶 是 后台流,说明是被打断的应用 重新获取 interrupt,需要回调打断结束的信息 */\r
ResumeInterruptStream(interruptEl, list, isOutPut);\r
it = ListIterErase(list, it);\r
* Create: 2021-04-21
*/
+#include "stream_manager.h"
#include <stdlib.h>
#include <math.h>
+#include "securec.h"
#include "policy_manager.h"
#include "source_handle.h"
#include "track_handle.h"
#include "nv.h"
#endif
#include "media_thread_adapt.h"
-#include "stream_manager.h"
+#ifdef SUPPORT_SET_DSP_CLOCK_FREQ
+#include "hifi_clock_freq_manager.h"
+#endif
#define LOG_MODULE_NAME "StreamMgr"
#ifdef __cplusplus
ALOGI("typeName[%s], typeVolume[%.3f]", typeName[typeHashId], typeVolume);
char typeVolumeStr[MAX_FLOAT_TO_CHAR_NUM] = { 0 };
int32_t ret = sprintf_s(typeVolumeStr, MAX_FLOAT_TO_CHAR_NUM,
- "%d", (int32_t)(typeVolume * THOUSAND)); // int - str
+ "%d", (int32_t)(typeVolume * THOUSAND)); // int - str
if (ret == AUDIO_ERROR) {
return AUDIO_ERROR;
}
#include "securec.h"
#include "media_thread_adapt.h"
#include "track_handle.h"
+#ifdef SUPPORT_SET_DSP_CLOCK_FREQ
+#include "hifi_clock_freq_manager.h"
+#endif
#ifdef __cplusplus
#if __cplusplus
TrackHandleContext *context = (TrackHandleContext *)handle;
CHK_NULL_RETURN(context, AUDIO_ERROR, "track handle is NULL");
// 状态
- if (context->state == IDLE || context->state == STOP) {
+ if (context->state == STOP) {
ALOGE("track[%d] state is wrong, mute fail", context->streamId);
return AUDIO_BAD_STATE;
+ } else if (context->state == IDLE) {
+ context->mute = mute;
+ return AUDIO_SUCCESS;
}
// 调南向
int32_t ret = context->render->volume.SetMute((AudioHandle)context->render, mute);
const uint32_t RENDER_FULL_SLEEP_TIME_US = 10000u;\r
// 1. waiting app response playback complete callback event\r
// 2. waiting interval time for loop playback\r
-const uint32_t RENDER_EOS_SLEEP_TIME_US = 1000000u;\r
+const uint32_t RENDER_EOS_SLEEP_TIME_US = 3000000u;\r
const uint32_t WAIT_BUFFER_EMPTY_SLEEP_TIME_US = 1000000u;\r
const uint32_t DECODER_DEFAULT_WIDTH = 1920;\r
const uint32_t DECODER_DEFAULT_HEIGHT = 1080;\r
PlayerControl *player = static_cast<PlayerControl *>(priv);\r
player->RecordLastPosition();\r
return HI_SUCCESS;\r
+ } else if (event == EVNET_AUDIO_RUNNING_ERR ||\r
+ event == EVNET_VIDEO_RUNNING_ERR) {\r
+ PlayerControlError playerError = PLAYERCONTROL_ERROR_AUD_PLAY_FAIL;\r
+ EventCallback(PLAYERCONTROL_EVENT_ERROR, &playerError);\r
+ return HI_SUCCESS;\r
}\r
\r
PalayControlEventItem item;\r
return mime;\r
}\r
\r
+#ifndef UNSUPPORT_VIDEO_DECODER\r
static void GetCurVideoSolution(const FormatFileInfo &info, uint32_t &width, uint32_t &height)\r
{\r
for (int i = 0; i < HI_DEMUXER_RESOLUTION_CNT; i++) {\r
}\r
}\r
}\r
+#endif\r
\r
#ifndef UNSUPPORT_AUDIO_DECODER\r
static std::string GetAudioNameByAvCodecMime(AvCodecMime mime)\r
\r
void PlayerControl::DataSchPreProcess(PlayerControl *play, bool *isContinue)\r
{\r
+ if (play->hasRenderAudioEos_) {\r
+ int32_t info = PLAYERCONTROL_ERROR_AUD_PLAY_FAIL;\r
+ play->EventCallback(PLAYERCONTROL_EVENT_ERROR, &info);\r
+ MEDIA_ERR_LOG("player waiting for the EOS callback timed out.");\r
+ }\r
play->DoSeekIfNeed();\r
\r
play->renderSleepTime_ = 0;\r
{\r
CHECK_NULL_RETURN(playerSource_, HI_FAILURE, "playerSource_ nullptr");\r
int64_t seekTimeInMs = seekTime;\r
- int32_t ret = DecoderAndSinkReset();\r
- CHECK_FAILED_RETURN(ret, HI_SUCCESS, ret, "DecoderAndSinkReset failed");\r
+ int32_t ret = 0;\r
ClearCachePacket();\r
if (fmtFileInfo_.s32UsedVideoStreamIndex != HI_DEMUXER_NO_MEDIA_STREAM) {\r
ret = playerSource_->Seek(fmtFileInfo_.s32UsedVideoStreamIndex, seekTimeInMs, FORMAT_SEEK_MODE_BACKWARD_KEY);\r
}
double streamType = JSI::ValueToNumber(args[0]);
g_streamType = (AudioStreamType)streamType;
+ AudioPlayer::GetInstance()->SetStreamType(g_streamType);
return JSI::CreateBoolean(true);
}
MEDIA_ERR_LOG("audio src is required.");
return false;
}
+ if (player_->SetAudioStreamType(streamType_) != 0) {
+ MEDIA_ERR_LOG("fail to SetAudioStreamType streamType = %x.", streamType_);
+ return false;
+ }
if (player_->Play() != 0) {
MEDIA_ERR_LOG("fail to play audio.");
return false;
bool AudioPlayer::SetStreamType(AudioStreamType streamType)
{
+ streamType_ = streamType;
+ if (player_ == NULL || player_->IsPlaying()) {
+ MEDIA_ERR_LOG("player is NULL or not playing!");
+ return false;
+ }
if (player_->SetAudioStreamType(streamType) != 0) {
MEDIA_ERR_LOG("fail to SetAudioStreamType streamType = %x.", streamType);
return false;
}
- streamType_ = streamType;
return true;
}
return MEDIA_ERR;\r
}\r
videoPlay->player_->SetPlayerCallback(callback);\r
- int32_t ret = videoPlay->player_->Play();\r
- if (ret != 0) {\r
- MEDIA_ERR_LOG("play failed\n");\r
- (void)videoPlay->player_->Reset();\r
- (void)videoPlay->player_->Release();\r
- return MEDIA_ERR;\r
- }\r
- videoPlay->player_->EnableSingleLooping(videoPlay->isLoop_);\r
+ int32_t ret = 0;\r
MediaMutexLock(videoPlay->mutex_);\r
- videoPlay->isPlayed_ = true;\r
- if (videoPlay->button_ != nullptr) {\r
- videoPlay->button_->SetText("Pause");\r
+ if (!videoPlay->isPause_) {\r
+ ret = videoPlay->player_->Play(); \r
+ if (ret != 0) {\r
+ goto EXIT;\r
+ }\r
+ videoPlay->player_->EnableSingleLooping(videoPlay->isLoop_);\r
+ if (videoPlay->button_ != nullptr) {\r
+ videoPlay->button_->SetText("Pause");\r
+ }\r
}\r
+ videoPlay->isPlayed_ = true;\r
while (!videoPlay->isPlaybackCompleted_ &&\r
!videoPlay->isPlaybackStopped_ &&\r
!videoPlay->interruptHintStop_ &&\r
!videoPlay->playError_) {\r
MediaThreadCondWait(videoPlay->cond_, videoPlay->mutex_);\r
+ if (videoPlay->isResume_) {\r
+ ret = videoPlay->player_->Play();\r
+ if (ret != 0) {\r
+ goto EXIT;\r
+ }\r
+ videoPlay->isResume_ = false;\r
+ }\r
}\r
MediaMutexUnLock(videoPlay->mutex_);\r
return 0;\r
+EXIT:\r
+ MEDIA_ERR_LOG("play failed\n");\r
+ (void)videoPlay->player_->Reset();\r
+ (void)videoPlay->player_->Release();\r
+ MediaMutexUnLock(videoPlay->mutex_);\r
+ return MEDIA_ERR;\r
}\r
\r
static void VideoStopAndExit(MediaVideoPlay *videoPlay)\r
MEDIA_INFO_LOG("video play is not stop, can not start!");\r
return MEDIA_OK;\r
}\r
+\r
+ // prepare buffers which are used to playing video\r
+ LiteSurface* liteSurface = dynamic_cast<LiteSurface*>(surface_);\r
+ if (liteSurface != nullptr) {\r
+ liteSurface->PrepareBuffers();\r
+ }\r
+\r
isEntered_ = true;\r
ResetVideoPlayState();\r
MediaThreadattr attr = { "VideoPlayThread", 0x2000, THREAD_SCHED_INVALID, 0, true };\r
int32_t MediaVideoPlay::PauseVideoPlay(void)\r
{\r
MediaMutexLock(mutex_);\r
- if (player_ == NULL) {\r
- MEDIA_ERR_LOG("can not pause play");\r
+ if (!isEntered_ ||isPlaybackStopped_ ||\r
+ isPlaybackCompleted_ || interruptHintStop_ ||\r
+ isPause_) {\r
+ MEDIA_ERR_LOG("current state is invaild, can not pause play");\r
MediaMutexUnLock(mutex_);\r
return MEDIA_ERR;\r
}\r
- if (isPlaybackStopped_ || isPlaybackCompleted_ || interruptHintStop_) {\r
- MEDIA_ERR_LOG("current state is stop, can not pause play");\r
+ isPause_ = true;\r
+ if (player_ == nullptr || !isPlayed_ ) {\r
MediaMutexUnLock(mutex_);\r
- return MEDIA_ERR;\r
+ return MEDIA_OK;\r
}\r
int32_t ret = player_->Pause();\r
if (ret != MEDIA_OK) {\r
MediaMutexUnLock(mutex_);\r
return MEDIA_ERR;\r
}\r
- isPause_ = true;\r
MediaMutexUnLock(mutex_);\r
return ret;\r
}\r
int32_t MediaVideoPlay::ResumeVideoPlay(void)\r
{\r
MediaMutexLock(mutex_);\r
- if (player_ == NULL) {\r
- MEDIA_ERR_LOG("can not resume play");\r
+ if (!isEntered_ || isPlaybackStopped_ ||\r
+ isPlaybackCompleted_ || interruptHintStop_ ||\r
+ !isPause_) {\r
+ MEDIA_ERR_LOG("current state is invaild, can not resume play");\r
MediaMutexUnLock(mutex_);\r
return MEDIA_ERR;\r
}\r
- if (isPlaybackStopped_ || isPlaybackCompleted_ || interruptHintStop_) {\r
- MEDIA_ERR_LOG("current state is stop, can not resume play");\r
+ isPause_ = false;\r
+ if (player_ == nullptr || !isPlayed_) {\r
+ MediaMutexUnLock(mutex_);\r
+ return MEDIA_OK;\r
+ }\r
+ isResume_ = true;\r
+ MediaThreadCondSignal(cond_);\r
+ MediaMutexUnLock(mutex_);\r
+ return MEDIA_OK;\r
+}\r
+\r
+int32_t MediaVideoPlay::GetDumpInfo(PlayerDebugInfo *playerInfo)\r
+{\r
+ MediaMutexLock(mutex_);\r
+ if (player_ == nullptr) {\r
+ MEDIA_ERR_LOG("can not get dump info!");\r
MediaMutexUnLock(mutex_);\r
return MEDIA_ERR;\r
}\r
- int32_t ret = player_->Play();\r
+ int32_t ret = player_->DumpInfo(playerInfo);\r
if (ret != MEDIA_OK) {\r
- MEDIA_ERR_LOG("resume failed");\r
+ MEDIA_ERR_LOG("get dump info failed");\r
MediaMutexUnLock(mutex_);\r
return ret;\r
}\r
- isPause_ = false;\r
MediaMutexUnLock(mutex_);\r
return ret;\r
}\r
\r
-int32_t MediaVideoPlay::GetDumpInfo(PlayerDebugInfo *playerInfo)\r
+int32_t MediaVideoPlay::SeekVideoPlay(int64_t mSeconds)\r
{\r
MediaMutexLock(mutex_);\r
- if (player_ == NULL) {\r
- MEDIA_ERR_LOG("can not get dump info!");\r
+ if (player_ == nullptr) {\r
+ MEDIA_ERR_LOG("can not seek!");\r
MediaMutexUnLock(mutex_);\r
return MEDIA_ERR;\r
}\r
- int32_t ret = player_->DumpInfo(playerInfo);\r
+ int32_t ret = player_->Rewind(mSeconds, PLAYER_SEEK_CLOSEST_SYNC);\r
if (ret != MEDIA_OK) {\r
- MEDIA_ERR_LOG("get dump info failed");\r
+ MEDIA_ERR_LOG("video player seek failed!");\r
+ }\r
+ MediaMutexUnLock(mutex_);\r
+ return ret;\r
+}\r
+\r
+int32_t MediaVideoPlay::GetCurrentPosition(int64_t *currentPosition)\r
+{\r
+ MediaMutexLock(mutex_);\r
+ if (player_ == nullptr) {\r
+ MEDIA_ERR_LOG("can not get current play position!");\r
MediaMutexUnLock(mutex_);\r
- return ret;\r
+ return MEDIA_ERR;\r
+ }\r
+ int32_t ret = player_->GetCurrentTime(*currentPosition);\r
+ if (ret != MEDIA_OK) {\r
+ MEDIA_ERR_LOG("video player get current play position failed!");\r
}\r
MediaMutexUnLock(mutex_);\r
return ret;\r
int32_t PauseVideoPlay(void);\r
int32_t ResumeVideoPlay(void);\r
int32_t GetDumpInfo(PlayerDebugInfo *playerInfo);\r
+ int32_t SeekVideoPlay(int64_t mSeconds);\r
+ int32_t GetCurrentPosition(int64_t *currentPosition);\r
void SetVideoPlayLoop(bool isLoop);\r
void SetSyncExitMode(bool isSyncExitMode);\r
bool IsSyncExitMode(void);\r
MediaThreadCondHandle cond_ = nullptr;\r
MediaThreadIdHandle threadHandle_ = nullptr;\r
UILabelButton *button_ = nullptr;\r
+ bool isResume_ = false;\r
bool isPause_ = false;\r
bool isPlayed_ = false;\r
bool isLoop_ = true;\r
#define CAST_SND_PORT_NUM 1
+#define BT_DETACH_FAIL_RETRY_TIMES 3
+
#define MAX_KEY_STR_LEN 10
#define MAX_BUF_LEN 1024
return MEDIA_HAL_OK;
}
+#if defined(BT_HAL_SUPPORT) && defined(SUPPORT_BREDR)
+static int32_t BtDetachHandle(const SubPortTrackContext *portTrackCtx, bt_audio_port_params portParam)
+{
+ int32_t count = 0;
+ td_u32 btRet = MEDIA_HAL_OK;
+ while (count < BT_DETACH_FAIL_RETRY_TIMES) {
+ btRet = bt_detach_audio_port(portTrackCtx->btStreamHandle, &portParam);
+ if (btRet == MEDIA_HAL_OK) {
+ MEDIA_HAL_LOGI(MODULE_NAME, "bt detach audio port success!");
+ return MEDIA_HAL_OK;
+ }
+ count++;
+ MEDIA_HAL_LOGE(MODULE_NAME, "bt detach audio port retry ret = %x, count: %d", count, btRet);
+ }
+ return MEDIA_HAL_ERR;
+}
+#endif
+
static int32_t BluetoothDetachInternal(const SubPortTrackContext *portTrackCtx)
{
+ int32_t ret = MEDIA_HAL_OK;
#if defined(BT_HAL_SUPPORT) && defined(SUPPORT_BREDR)
if (portTrackCtx->isHandlePublicResource) {
bt_audio_port_params portParam = {};
portParam.port_type = A2DP;
portParam.share_mem_id = portTrackCtx->outputAdpHandle;
- td_u32 btRet = bt_detach_audio_port(portTrackCtx->btStreamHandle, &portParam);
- CHK_FAILED_NO_RETURN(btRet, MEDIA_HAL_OK, "bt detach audio port failed");
+ ret = BtDetachHandle(portTrackCtx, portParam);
}
#endif
MEDIA_HAL_LOGD(MODULE_NAME, "success");
- return MEDIA_HAL_OK;
+ return ret;
}
static int32_t AudioSDKDetachInternal(const SubPortTrackContext *portTrackCtx)
static int32_t BluetoothDetach(const SubPortContext *portCtx, const SubPortTrackContext *portTrackCtx)
{
+ int32_t ret = MEDIA_HAL_OK;
#if defined(BT_HAL_SUPPORT) && defined(SUPPORT_BREDR)
bt_audio_port_params portParam = {};
portParam.port_type = A2DP;
portParam.share_mem_id = portCtx->outputAdpHandle;
- td_u32 btRet = bt_detach_audio_port(portTrackCtx->btStreamHandle, &portParam);
- CHK_FAILED_RETURN(btRet, MEDIA_HAL_OK, MEDIA_HAL_ERR, "bt detach audio port failed");
+ ret = BtDetachHandle(portTrackCtx, portParam);
#endif
MEDIA_HAL_LOGD(MODULE_NAME, "success");
- return MEDIA_HAL_OK;
+ return ret;
}
static int32_t SingletonResourceStartInternal(const SubPortContext *portCtx, SubPortTrackContext *portTrackCtx)
{ AUDIO_IN_MEDIA, AUDIO_FORMAT_SBC, 16000, 1 },
{ AUDIO_IN_MEDIA, AUDIO_FORMAT_PCM_16_BIT, 16000, 1 },
{ AUDIO_IN_COMMUNICATION, AUDIO_FORMAT_mSBC, 16000, 1 },
- { AUDIO_IN_COMMUNICATION, AUDIO_FORMAT_PCM_16_BIT, 8000, 1}
+ { AUDIO_IN_COMMUNICATION, AUDIO_FORMAT_PCM_16_BIT, 8000, 1},
+ { AUDIO_IN_COMMUNICATION, AUDIO_FORMAT_PCM_16_BIT, 16000, 1 },
};
static bool IsSupported(const struct PortPluginAttr *inputAttr)
aencAttr.param.samples_per_frame = ((uint32_t)inputAttrTemp.sampleRate) / SAMPLERATE_TO_PTNUMPERFRM;
aencAttr.param.private_data = NULL;
aencAttr.param.private_data_size = 0;
-
MEDIA_HAL_LOGI(MODULE_NAME, "audioFormat: 0x%x, sampleRate: %d, channelCount: %u, bitWidth: %u",
inputAttrTemp.audioFormat, inputAttrTemp.sampleRate, inputAttrTemp.channelCount, inputAttrTemp.bitWidth);
-
ret = AudioSDKAencOpen(&portTrackInCtx->aencHandle, aencAttr);
if (ret != MEDIA_HAL_OK) {
MEDIA_HAL_LOGE(MODULE_NAME, "aenc open failed");
MEDIA_HAL_LOGE(MODULE_NAME, "memcpy_s failed");
return MEDIA_HAL_ERR;
}
-
int64_t sec = 0;
int64_t nsec = 0;
int32_t ret = MediaHalConvertUSecToSecAndNSec(audioStream.pts, &sec, &nsec);
#include "tcxo.h"
#include "pm.h"
#endif
+#ifdef CFG_DRIVERS_NANDFLASH
#include "nandflash_config.h"
+#endif
+#include "preserve.h"
+#include "exception_dump.h"
#define NON_OS_ENTER_MAX_NUM 8
#define MAX_STR_LEN 64
nand_driver_init(SPEED_SLOW);
set_trans_type(TRANS_BY_CPU_SINGLE_LINE);
#if defined(SAVE_EXC_INFO) && (CONFIG_DFX_SUPPORT_FILE_SYSTEM == DFX_YES)
+ dump_all_to_file();
save_preserve_file_to_nand();
#endif
#endif
void save_btram_file_to_nand(void);
void save_btrace_file_to_nand(void);
+
+void save_preserve_file_to_nand(void);
#endif
/**
* @}
#endif
typedef bool (*TryToFreeImgCallback)(void);
+typedef bool (*TryToFreeFontCacheCallback)(void);
+
/**
* @brief Defines pointers to the memory driver functions.
*/
int32_t (*InvalidateCache)(BufferHandle* handle);
void (*RegisterTryToFreeImgCallback)(TryToFreeImgCallback callback);
+
+ void (*RegisterTryToFreeFontCacheCallback)(TryToFreeFontCacheCallback callback);
} GrallocFuncs;
/**
${ROOT_DIR}/open_source/openharmony/base/global/i18n_lite/interfaces/kits/i18n/include
${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
)
if("JS_ENABLE" IN_LIST DEFINES)
${CMAKE_CURRENT_SOURCE_DIR}/modules/presets/version_module.cpp
${CMAKE_CURRENT_SOURCE_DIR}/modules/router_module.cpp
${CMAKE_CURRENT_SOURCE_DIR}/modules/sample_module.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/modules/keyinput/keyinput.cpp
)
endif()
KEYWORD(PLACEHOLDER_COLOR, placeholderColor) // placeholder-color of edittext
#endif // FEATURE_COMPONENT_EDITTEXT
KEYWORD(PROGRESS, progress) // progress tag name
+ KEYWORD(ORIENTATION, text-orientation) // text rotation
#ifdef FEATURE_COMPONENT_QRCODE
KEYWORD(QRCODE, qrcode) // qrcode tag name
#endif
return false;
}
}
- SetKeyInputEventListener(view, funcValue, eventTypeId);
return true;
}
void Component::ReleaseCommonEventListeners()
{
- RootView *rootView = RootView::GetInstance();
- if (rootView != nullptr && rootView->GetOnKeyActListener() == onKeyInputListener_) {
- rootView->ClearOnKeyActListener();
- }
- ACE_DELETE(onKeyInputListener_);
ACE_DELETE(onClickListener_);
ACE_DELETE(onLongPressListener_);
#ifdef JS_TOUCH_EVENT_SUPPORT
{
UNUSED(view);
UNUSED(event);
- HILOG_DEBUG(HILOG_MODULE_ACE, "OnDrag received");
+ // HILOG_DEBUG(HILOG_MODULE_ACE, "OnDrag received");
return isStopPropagation_;
}
uiLabel_.SetRollSpeed(speed);
break;
}
+ case K_ORIENTATION:
+ SetTextRotateAngle(uiLabel_, attrValue);
+ break;
default: {
return false;
}
}
}
+void TextComponent::SetTextRotateAngle(UILabel &label, jerry_value_t attrValue)
+{
+ char *angle = MallocStringOf(attrValue);
+ if (!strcmp(angle, "up")) {
+ // Rotate to the "up" position (full rotation)
+ rotateAngle_ = 360;
+ } else if (!strcmp(angle, "down")) {
+ // Rotate to the "down" position (inverted)
+ rotateAngle_ = 180;
+ } else if (!strcmp(angle, "left")) {
+ // Rotate to the "left" position (counter-clockwise)
+ rotateAngle_ = 270;
+ } else if (!strcmp(angle, "right")) {
+ // Rotate to the "right" position (clockwise)
+ rotateAngle_ = 90;
+ }
+ ACE_FREE(angle);
+ label.Rotate(rotateAngle_, Vector2<float>(label.GetWidth()/2, label.GetHeight()/2));
+}
+
void TextComponent::SetTextSize(const AppStyleItem *styleItem)
{
fontSize_ = GetStylePixelValue(styleItem);
void SetTextLetterSpace(UILabel& label, const AppStyleItem* styleItem) const;
// parse js text line height style to ui_label
void SetTextLineHeight(UILabel& label, const AppStyleItem* styleItem) const;
+ // parse js text rotate angle style to ui_label
+ void SetTextRotateAngle(UILabel &label, jerry_value_t attrValue);
UILabel uiLabel_;
uint8_t fontSize_;
char* fontFamily_;
char* textValue_;
uint8_t overflowMode_;
+ uint16_t rotateAngle_ = 0;
};
} // namespace ACELite
} // namespace OHOS
HILOG_INFO(HILOG_MODULE_ACE, "ExecuteSendMsgToJS type = %d flag = %d", type, flag);
if (!flag) {
if ((!CheckIsJsValueFunction(fail)) || (!CheckIsJsValueDefined(context))) {
- HILOG_ERROR(HILOG_MODULE_ACE, "Error in ExecuteSendMsgToJS. Invalid params detected!");
+ HILOG_ERROR(HILOG_MODULE_ACE, "ExecuteSendMsgToJS Callback or Context is nullptr!");
+ OHOS::ACELite::JSI::ReleaseValue(dataInfo);
AdapterFree(msgBody);
return;
}
OHOS::ACELite::JSI::ReleaseValue(dataInfo);
} else {
if ((!CheckIsJsValueDefined(context)) || (!CheckIsJsValueFunction(success))) {
- HILOG_ERROR(HILOG_MODULE_ACE, "Error in ExecuteSendMsgToJS. Invalid params detected!");
+ HILOG_ERROR(HILOG_MODULE_ACE, "ExecuteSendMsgToJS Callback or Context is nullptr!");
+ OHOS::ACELite::JSI::ReleaseValue(dataInfo);
AdapterFree(msgBody);
return;
}
{
HILOG_INFO(HILOG_MODULE_ACE, "poi_nearby_search");
char *data = JSI::JsonStringify(args[0]);
- HILOG_INFO(HILOG_MODULE_ACE, "poi_nearby_search : %s \n", data);
+ HILOG_INFO(HILOG_MODULE_ACE, "poi_nearby_search : %s", data);
// success Callback & failed Callback
ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_POI);
poi_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
{
HILOG_INFO(HILOG_MODULE_ACE, "route_riding_search");
char *data = JSI::JsonStringify(args[0]);
- HILOG_INFO(HILOG_MODULE_ACE, "route_riding_search : %s \n", data);
+ HILOG_INFO(HILOG_MODULE_ACE, "route_riding_search : %s", data);
// success Callback & failed Callback
ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_RIDING_SEARCH);
route_riding_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
{
HILOG_INFO(HILOG_MODULE_ACE, "route_walking_search");
char *data = JSI::JsonStringify(args[0]);
- HILOG_INFO(HILOG_MODULE_ACE, "route_walking_search : %s \n", data);
+ HILOG_INFO(HILOG_MODULE_ACE, "route_walking_search : %s", data);
// success Callback & failed Callback
ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_WALKING_SEARCH);
route_walking_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
{
HILOG_INFO(HILOG_MODULE_ACE, "route_transit_search");
char *data = JSI::JsonStringify(args[0]);
- HILOG_INFO(HILOG_MODULE_ACE, "route_transit_search : %s \n", data);
+ HILOG_INFO(HILOG_MODULE_ACE, "route_transit_search : %s", data);
// success Callback & failed Callback
ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_TRANSIT_SEARCH);
route_transit_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
{
HILOG_INFO(HILOG_MODULE_ACE, "auth_license");
char *data = JSI::JsonStringify(args[0]);
- HILOG_INFO(HILOG_MODULE_ACE, "auth_license : %s \n", data);
+ HILOG_INFO(HILOG_MODULE_ACE, "auth_license : %s", data);
// success Callback & failed Callback
ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_AUTH_LICENSE);
auth_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
{
HILOG_INFO(HILOG_MODULE_ACE, "getGeolocation");
char *data = JSI::JsonStringify(args[0]);
- HILOG_INFO(HILOG_MODULE_ACE, "getGeolocation : %s \n", data);
+ HILOG_INFO(HILOG_MODULE_ACE, "getGeolocation : %s", data);
ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GEO_LOCATION);
geo_location_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
OHOS::ACELite::JSIValue Callback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
{
HILOG_INFO(HILOG_MODULE_ACE, "naviInit");
char *data = JSI::JsonStringify(args[0]);
- HILOG_INFO(HILOG_MODULE_ACE, "naviInit : %s \n", data);
+ HILOG_INFO(HILOG_MODULE_ACE, "naviInit : %s", data);
// success Callback & failed Callback
ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_INIT);
nav_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
{
HILOG_INFO(HILOG_MODULE_ACE, "poi_sug_search");
char *data = JSI::JsonStringify(args[0]);
- HILOG_INFO(HILOG_MODULE_ACE, "poi_sug_search : %s \n", data);
+ HILOG_INFO(HILOG_MODULE_ACE, "poi_sug_search : %s", data);
ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_POI_SUG_SEARCH);
poi_sug_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
{
HILOG_INFO(HILOG_MODULE_ACE, "Geocode_search");
char *data = JSI::JsonStringify(args[0]);
- HILOG_INFO(HILOG_MODULE_ACE, "Geocode_search : %s \n", data);
+ HILOG_INFO(HILOG_MODULE_ACE, "Geocode_search : %s", data);
// success Callback & failed Callback
ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GEOCODE_SEARCH);
geocode_search_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
{
HILOG_INFO(HILOG_MODULE_ACE, "Regeocode_search");
char *data = JSI::JsonStringify(args[0]);
- HILOG_INFO(HILOG_MODULE_ACE, "Regeocode_search : %s \n", data);
+ HILOG_INFO(HILOG_MODULE_ACE, "Regeocode_search : %s", data);
// success Callback & failed Callback
ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REGEOCODE_SEARCH);
regeocode_search_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
{
HILOG_INFO(HILOG_MODULE_ACE, "Destroy_page");
char *data = JSI::JsonStringify(args[0]);
- HILOG_INFO(HILOG_MODULE_ACE, "Destroy_page : %s \n", data);
+ HILOG_INFO(HILOG_MODULE_ACE, "Destroy_page : %s", data);
msg_center_vector_navi_req_destroy_page(
MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_DESTROY_PAGE, data, strlen(data));
ace_free(data);
{
HILOG_INFO(HILOG_MODULE_ACE, "onBTConnect");
char *data = JSI::JsonStringify(args[0]);
- HILOG_INFO(HILOG_MODULE_ACE, "onBTConnect : %s \n", data);
+ HILOG_INFO(HILOG_MODULE_ACE, "onBTConnect : %s", data);
// success Callback & failed Callback
ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_BT_CONNECTED);
bt_connect_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
{
HILOG_INFO(HILOG_MODULE_ACE, "exitNavigation");
char *data = JSI::JsonStringify(args[0]);
- HILOG_INFO(HILOG_MODULE_ACE, "exitNavigation : %s \n", data);
+ HILOG_INFO(HILOG_MODULE_ACE, "exitNavigation : %s", data);
msg_center_vector_navi_req_destroy_from_watch(
MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_DESTROY_FROM_WATCH, data, strlen(data));
ace_free(data);
JSIValue BaiduMapComponentModule::StopAnswer(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
{
HILOG_INFO(HILOG_MODULE_ACE, "StopAnswer");
- char *data = JSI::JsonStringify(args[0]);
- HILOG_INFO(HILOG_MODULE_ACE, "StopAnswer : %s \n", data);
- msg_center_xiaodu_send_stop_answer(MSGCENTER_CMD_XIAODU, MSGCENTER_TYPE_ID_XIAODU_SEND_JS_EXIT, data, strlen(data));
- ace_free(data);
- return JSI::CreateBoolean(true);
+ uint8_t data = (uint8_t)JSI::GetNumberProperty(args[0], "data");
+ HILOG_INFO(HILOG_MODULE_ACE, "StopAnswer : %d", data);
+ uint32_t ret = msg_center_xiaodu_send_stop_answer(
+ MSGCENTER_CMD_XIAODU, MSGCENTER_TYPE_ID_XIAODU_SEND_JS_EXIT, &data, sizeof(data));
+ return (ret == ERRCODE_SUCC) ? JSI::CreateBoolean(true) : JSI::CreateBoolean(false);
}
JSIValue BaiduMapComponentModule::MapInit(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
} else {\r
FailCallBack(thisVal, args[0], ret);\r
}\r
+ JSI::ReleaseValue(result);\r
return JSI::CreateUndefined();\r
}\r
\r
} else {\r
FailCallBack(thisVal, args[0], ret);\r
}\r
+ JSI::ReleaseValue(result);\r
return JSI::CreateUndefined();\r
}\r
\r
--- /dev/null
+/*
+ * Copyright (c) 2020 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "keyinput.h"
+#include "js_async_work.h"
+#include "adapter.h"
+#include "js_ability_impl.h"
+#include "ace_log.h"
+
+typedef struct : public OHOS::HeapBase {
+ char *msgBody;
+ uint16_t status;
+} KeyMsgParams;
+
+typedef struct : public OHOS::HeapBase {
+ int16_t rotate;
+} RotateMsgParams;
+
+namespace OHOS {
+namespace ACELite {
+KeyNotifyCallback KeyInputModule::notifyCallback_ = nullptr;
+OHOS::ACELite::JSIValue keyCallback = nullptr;
+OHOS::ACELite::JSIValue rotateCallback = nullptr;
+OHOS::ACELite::JSIValue context = nullptr;
+OHOS::ACELite::JSIValue onClickCallback = nullptr;
+OHOS::ACELite::JSIValue onPressCallback = nullptr;
+
+static bool CheckIsJsValueDefined(OHOS::ACELite::JSIValue jsValue)
+{
+ if (jsValue == nullptr) {
+ return false;
+ }
+
+ if (OHOS::ACELite::JSI::ValueIsUndefined(jsValue)) {
+ return false;
+ }
+
+ return true;
+}
+
+static void ReleaseJsValue(OHOS::ACELite::JSIValue &jsValue)
+{
+ if (CheckIsJsValueDefined(jsValue)) {
+ OHOS::ACELite::JSI::ReleaseValue(jsValue);
+ jsValue = OHOS::ACELite::JSI::CreateUndefined();
+ }
+ return;
+}
+
+static int32_t ACECopyStr(char **destStr, const char *srcStr)
+{
+ if (destStr == nullptr || srcStr == nullptr) {
+ return -1;
+ }
+
+ uint32_t length = strlen(srcStr) + 1;
+ *destStr = static_cast<char *>(AdapterMalloc(length));
+ if (*destStr == nullptr) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "Failed to allocate memory for destination string");
+ return -1;
+ }
+
+ if (memset_s(*destStr, length, 0, length) != EOK) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "Failed to set memory for destination string");
+ AdapterFree(*destStr);
+ return -1;
+ }
+ if (memcpy_s(*destStr, length, srcStr, length) != EOK) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "Failed to copy source string to destination string");
+ AdapterFree(*destStr);
+ return -1;
+ }
+
+ return 0;
+}
+
+static void ExecuteSendKeyMsgToJS(void *data)
+{
+ KeyMsgParams *params = static_cast<KeyMsgParams *>(data);
+ if (params == nullptr) {
+ return;
+ }
+
+ char *msgBody = params->msgBody;
+ uint16_t status = params->status;
+ OHOS::ACELite::JSIValue dataInfo = OHOS::ACELite::JSI::CreateObject();
+ OHOS::ACELite::JSI::SetStringProperty(dataInfo, "keyName", msgBody);
+
+ switch (status) {
+ case InputDevice::STATE_PRESS:
+ if (onPressCallback != nullptr && context != nullptr) {
+ OHOS::ACELite::JSIValue callbackArgv[OHOS::ACELite::ARGC_ONE] = {dataInfo};
+ OHOS::ACELite::JSI::CallFunction(onPressCallback, context, callbackArgv, OHOS::ACELite::ARGC_ONE);
+ }
+ break;
+ case InputDevice::STATE_RELEASE:
+ if (onClickCallback != nullptr && context != nullptr) {
+ OHOS::ACELite::JSIValue callbackArgv[OHOS::ACELite::ARGC_ONE] = {dataInfo};
+ OHOS::ACELite::JSI::CallFunction(onClickCallback, context, callbackArgv, OHOS::ACELite::ARGC_ONE);
+ }
+ break;
+ default:
+ break;
+ }
+
+ if (keyCallback != nullptr && context != nullptr) {
+ OHOS::ACELite::JSI::SetNumberProperty(dataInfo, "status", status);
+ OHOS::ACELite::JSIValue callbackArgv[OHOS::ACELite::ARGC_ONE] = {dataInfo};
+ OHOS::ACELite::JSI::CallFunction(keyCallback, context, callbackArgv, OHOS::ACELite::ARGC_ONE);
+ }
+
+ OHOS::ACELite::JSI::ReleaseValue(dataInfo);
+ AdapterFree(msgBody);
+ delete params;
+ params = nullptr;
+ return;
+}
+
+static void ExecuteSendRotateMsgToJS(void *data)
+{
+ RotateMsgParams *params = static_cast<RotateMsgParams *>(data);
+ if (params == nullptr) {
+ return;
+ }
+
+ int16_t rotate = params->rotate;
+ delete params;
+ params = nullptr;
+ OHOS::ACELite::JSIValue dataInfo = OHOS::ACELite::JSI::CreateObject();
+ OHOS::ACELite::JSI::SetNumberProperty(dataInfo, "rotate", rotate);
+ OHOS::ACELite::JSIValue callbackArgv[OHOS::ACELite::ARGC_ONE] = {dataInfo};
+ OHOS::ACELite::JSI::CallFunction(rotateCallback, context, callbackArgv, OHOS::ACELite::ARGC_ONE);
+ OHOS::ACELite::JSI::ReleaseValue(dataInfo);
+ return;
+}
+
+JSIValue KeyInputModule::SetKeyListener(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
+{
+ bool ret = false;
+ ReleaseKeyCallback();
+ if (argsNum > 0) {
+ context = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ keyCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
+ if ((!JSI::ValueIsUndefined(keyCallback)) && JSI::ValueIsFunction(keyCallback)) {
+ ret = true;
+ } else {
+ HILOG_DEBUG(HILOG_MODULE_ACE, "setKeyListener: unset listener.");
+ }
+ } else {
+ HILOG_ERROR(HILOG_MODULE_ACE, "setKeyListener failed, argsNum is %d.", argsNum);
+ }
+ return JSI::CreateBoolean(ret);
+}
+
+void KeyInputModule::ReleaseKeyCallback()
+{
+ ReleaseJsValue(keyCallback);
+ keyCallback = nullptr;
+ return;
+}
+
+JSIValue KeyInputModule::SetRotateListener(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
+{
+ bool ret = false;
+ ReleaseRotateCallbacks();
+ if (argsNum > 0) {
+ context = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ rotateCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
+ if ((!JSI::ValueIsUndefined(rotateCallback)) && JSI::ValueIsFunction(rotateCallback)) {
+ RotateListener::GetInstance()->SetRegister(true);
+ ret = true;
+ // you could enable rotary encoder's driver here.
+ } else {
+ HILOG_DEBUG(HILOG_MODULE_ACE, "setRotateListener: unset listener.");
+ // you could disable rotary encoder's driver here.
+ }
+ } else {
+ HILOG_ERROR(HILOG_MODULE_ACE, "setRotateListener failed, argsNum is %d.", argsNum);
+ // you could disable rotary encoder's driver here.
+ }
+ return JSI::CreateBoolean(ret);
+}
+
+void KeyInputModule::ReleaseRotateCallbacks()
+{
+ OHOS::ACELite::RotateListener::GetInstance()->SetRegister(false);
+ ReleaseJsValue(rotateCallback);
+ rotateCallback = nullptr;
+ return;
+}
+
+void OHOS::ACELite::KeyInputModule::SetNotifyKeyListener(KeyNotifyCallback callback)
+{
+ notifyCallback_ = callback;
+}
+
+KeyNotifyCallback OHOS::ACELite::KeyInputModule::GetNotifyKeyListener(void)
+{
+ return notifyCallback_;
+}
+
+void KeyInputModule::DefineProperty(
+ JSIValue target, const char *propName, JSIFunctionHandler getter, JSIFunctionHandler setter)
+{
+ JSPropertyDescriptor descriptor;
+ descriptor.getter = getter;
+ descriptor.setter = setter;
+ JSI::DefineNamedProperty(target, propName, descriptor);
+}
+
+JSIValue KeyInputModule::OnClickSetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
+{
+ bool ret = false;
+ if (argsNum > 0) {
+ context = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ onClickCallback = OHOS::ACELite::JSI::AcquireValue(args[0]);
+ if (JSI::ValueIsUndefined(onClickCallback) || !JSI::ValueIsFunction(onClickCallback)) {
+ ReleaseOnClickCallbacks();
+ } else {
+ ret = true;
+ }
+ } else {
+ HILOG_ERROR(HILOG_MODULE_ACE, "OnClickSetter failed, argsNum is %d.", argsNum);
+ }
+ return JSI::CreateBoolean(ret);
+}
+
+JSIValue KeyInputModule::OnClickGetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
+{
+ return (onClickCallback == nullptr) ? JSI::CreateUndefined() : onClickCallback;
+}
+
+void KeyInputModule::ReleaseOnClickCallbacks()
+{
+ ReleaseJsValue(onClickCallback);
+ onClickCallback = nullptr;
+ return;
+}
+
+JSIValue KeyInputModule::OnPressSetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
+{
+ bool ret = false;
+ if (argsNum > 0) {
+ context = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ onPressCallback = OHOS::ACELite::JSI::AcquireValue(args[0]);
+ if (JSI::ValueIsUndefined(onPressCallback) || !JSI::ValueIsFunction(onPressCallback)) {
+ ReleaseOnPressCallbacks();
+ } else {
+ ret = true;
+ }
+ } else {
+ HILOG_ERROR(HILOG_MODULE_ACE, "OnPressSetter failed, argsNum is %d.", argsNum);
+ }
+ return JSI::CreateBoolean(ret);
+}
+
+JSIValue KeyInputModule::OnPressGetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
+{
+ return (onPressCallback == nullptr) ? JSI::CreateUndefined() : onPressCallback;
+}
+
+void KeyInputModule::ReleaseOnPressCallbacks()
+{
+ ReleaseJsValue(onPressCallback);
+ onPressCallback = nullptr;
+ return;
+}
+
+void KeyInputModule::OnDestroy()
+{
+ // you could disable rotary encoder's driver here.
+ ReleaseKeyCallback();
+ ReleaseRotateCallbacks();
+ ReleaseOnClickCallbacks();
+ ReleaseOnPressCallbacks();
+ ReleaseJsValue(context);
+ context = nullptr;
+}
+
+void InitKeyInputModule(JSIValue exports)
+{
+ JSI::SetModuleAPI(exports, "setKeyListener", KeyInputModule::SetKeyListener);
+ JSI::SetModuleAPI(exports, "setRotateListener", KeyInputModule::SetRotateListener);
+
+ KeyInputModule::DefineProperty(exports, "onClick", KeyInputModule::OnClickGetter, KeyInputModule::OnClickSetter);
+ KeyInputModule::DefineProperty(exports, "onPress", KeyInputModule::OnPressGetter, KeyInputModule::OnPressSetter);
+ JSI::SetOnDestroy(exports, KeyInputModule::OnDestroy);
+}
+
+} // namespace ACELite
+} // namespace OHOS
+
+bool OHOS::ACELite::KeyListener::HasRegister()
+{
+ if (keyCallback != nullptr || onClickCallback != nullptr || onPressCallback != nullptr) {
+ return true;
+ }
+ return false;
+}
+
+void OHOS::ACELite::KeyListener::SendToJS(const KeyEvent &event)
+{
+ if (!OHOS::ACELite::KeyListener::HasRegister()) {
+ return;
+ }
+
+ char *type = "UNKNOWN";
+ switch (event.GetKeyId()) {
+ case static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_POWER):
+ type = "POWER";
+ break;
+ case static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_FUNC):
+ type = "FUNCTION";
+ break;
+ default:
+ break;
+ }
+ int32_t ret = KeySendMsgToJS(type, event.GetState());
+ if (ret != 0) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "KeyListener: OnKeyEvent send event error");
+ }
+}
+
+void OHOS::ACELite::KeyListener::OnKeyEvent(const KeyEvent &event)
+{
+ // Prioritize handling notification events
+ KeyNotifyCallback notifyCallback = KeyInputModule::GetNotifyKeyListener();
+ if (notifyCallback != nullptr) {
+ // If the upper layer does not notify, continue executing the JS event
+ if (notifyCallback(event.GetKeyId(), event.GetState())) {
+ return;
+ }
+ }
+ switch (event.GetState()) {
+ case InputDevice::STATE_PRESS:
+ isPress_ = true;
+ SendToJS(event);
+ break;
+ case InputDevice::STATE_LONG_PRESS:
+ isLongPress_ = true;
+ OnKeyLongPress(event);
+ break;
+ case InputDevice::STATE_RELEASE:
+ OnRelease(event);
+ break;
+ default:
+ break;
+ }
+}
+
+void OHOS::ACELite::KeyListener::OnRelease(const KeyEvent &event)
+{
+ if (OHOS::ACELite::KeyListener::HasRegister()) {
+ SendToJS(event);
+ } else if (isPress_ && !isLongPress_) {
+ if (event.GetKeyId() == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_POWER)) {
+ JsAppContext::GetInstance()->TerminateAbility();
+ }
+ }
+ isPress_ = false;
+}
+
+void OHOS::ACELite::KeyListener::OnKeyLongPress(const KeyEvent &event)
+{
+ if (isLongPress_) {
+ if (event.GetKeyId() == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_POWER)) {
+ NativeAbility::GetInstance().ChangeSlice(VIEW_REBOOT);
+ }
+ }
+ // we don't handle isLongPress & isRelease, so reset isLongPress_ to false here.
+ isLongPress_ = false;
+}
+
+void OHOS::ACELite::RotateListener::OnRotateEvent(const RotateEvent &event)
+{
+ if (!OHOS::ACELite::RotateListener::HasRegister()) {
+ return;
+ }
+ int ret = RotateSendMsgToJS(event.GetRotate());
+ if (ret != 0) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "RotateListener: OnRotateEvent send event error");
+ }
+}
+
+int32_t KeySendMsgToJS(const char *msgBody, uint16_t status)
+{
+ KeyMsgParams *params = new KeyMsgParams();
+ if (params == nullptr) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "Failed to allocate memory for params");
+ return -1;
+ }
+ params->status = status;
+ int32_t copyRet = OHOS::ACELite::ACECopyStr(¶ms->msgBody, msgBody);
+
+ if (copyRet != 0) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "Failed to copy msgBody");
+ AdapterFree(params->msgBody);
+ delete params;
+ params = nullptr;
+ return copyRet;
+ }
+
+ bool ret = OHOS::ACELite::JsAsyncWork::DispatchAsyncWork(
+ OHOS::ACELite::ExecuteSendKeyMsgToJS, static_cast<void *>(params));
+ if (!ret) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "Failed to dispatch async work");
+ AdapterFree(params->msgBody);
+ delete params;
+ params = nullptr;
+ return -1;
+ }
+
+ return 0;
+}
+
+int32_t RotateSendMsgToJS(int16_t rotate)
+{
+ RotateMsgParams *params = new RotateMsgParams();
+ if (params == nullptr) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "Failed to allocate memory for params");
+ return -1;
+ }
+ params->rotate = rotate;
+ bool ret = OHOS::ACELite::JsAsyncWork::DispatchAsyncWork(
+ OHOS::ACELite::ExecuteSendRotateMsgToJS, static_cast<void *>(params));
+ if (!ret) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "Failed to dispatch async work");
+ delete params;
+ params = nullptr;
+ return -1;
+ }
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag. 2024-2025. All rights reserved.
+ * Description: keyinput wrapper
+ * Author: SoftwarePlatform Group
+ * Create: 2024-09-29
+ */
+
+#ifndef OHOS_ACELITE_KEYINPUT_MODULE_H
+#define OHOS_ACELITE_KEYINPUT_MODULE_H
+
+#include "jsi.h"
+#include "events/key_event.h"
+#include "events/rotate_event.h"
+#include "dock/input_device.h"
+#include "common/key_code.h"
+typedef bool (*KeyNotifyCallback)(uint16_t keyID, uint8_t state);
+
+namespace OHOS {
+namespace ACELite {
+class KeyInputModule : public MemoryHeap {
+public:
+ KeyInputModule() = default;
+ ~KeyInputModule() = default;
+ static JSIValue SetKeyListener(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
+ static JSIValue SetRotateListener(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
+ static void SetNotifyKeyListener(KeyNotifyCallback callback);
+ static KeyNotifyCallback GetNotifyKeyListener(void);
+ static void DefineProperty(JSIValue target, const char *propName, JSIFunctionHandler getter, JSIFunctionHandler setter);
+ static JSIValue OnClickGetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
+ static JSIValue OnClickSetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
+ static JSIValue OnPressGetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
+ static JSIValue OnPressSetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
+ static void OnDestroy();
+
+private:
+ static KeyNotifyCallback notifyCallback_;
+ static void ReleaseKeyCallback();
+ static void ReleaseRotateCallbacks();
+ static void ReleaseOnClickCallbacks();
+ static void ReleaseOnPressCallbacks();
+};
+
+void InitKeyInputModule(JSIValue exports);
+
+class KeyListener {
+public:
+ static KeyListener *GetInstance()
+ {
+ static KeyListener instance;
+ return &instance;
+ }
+
+ void OnKeyEvent(const KeyEvent &event);
+
+ bool HasRegister();
+
+ void SendToJS(const KeyEvent &event);
+
+private:
+ KeyListener() : isPress_(false), isLongPress_(false){};
+ ~KeyListener() = default;
+ void OnRelease(const KeyEvent &event);
+ void OnKeyLongPress(const KeyEvent &event);
+ bool isPress_;
+ bool isLongPress_;
+};
+
+class RotateListener {
+public:
+ static RotateListener *GetInstance()
+ {
+ static RotateListener instance;
+ return &instance;
+ }
+
+ void OnRotateEvent(const RotateEvent &event);
+
+ bool HasRegister()
+ {
+ return isRegister_;
+ }
+ void SetRegister(bool isRegister)
+ {
+ isRegister_ = isRegister;
+ }
+
+private:
+ RotateListener() : isRegister_(false){};
+ ~RotateListener() = default;
+ bool isRegister_;
+};
+
+} // namespace ACELite
+} // namespace OHOS
+int32_t KeySendMsgToJS(const char *msgBody, uint16_t type);
+int32_t RotateSendMsgToJS(int16_t rotate);
+#endif
#endif
extern void InitNetWorkModule(JSIValue exports);
+extern void InitKeyInputModule(JSIValue exports);
// #ifdef FEATURE_ACELITE_SYSTEM_CAPABILITY
// extern void InitCapabilityModule(JSIValue exports);
// #endif
// {"capability", InitCapabilityModule},
// #endif
{"network", InitNetWorkModule},
+ {"keyinput", InitKeyInputModule},
};
} // namespace ACELite
} // namespace OHOS
/** Failed to parse the label of the ability. */
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ABILITY_LABEL_ERROR,
+ /** Failed to parse the srcPath of the ability. */
+ ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ABILITY_SRCPATH_ERROR,
+
/** Failed to parse the description of the ability. */
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ABILITY_DESCRIPTION_ERROR,
const char PROFILE_KEY_MODULE_ABILITY_LABEL[] = "label";
const char PROFILE_KEY_MODULE_ABILITY_ICON[] = "icon";
const char PROFILE_KEY_MODULE_ABILITY_TYPE[] = "type";
+const char PROFILE_KEY_MODULE_ABILITY_SRCPATH[] = "srcPath";
const char PROFILE_KEY_MODULE_ABILITY_LAUNCHTYPE[] = "launchType";
const char PROFILE_KEY_MODULE_ABILITY_VISIBLE[] = "visible";
const char PROFILE_KEY_MODULE_ABILITY_DEVICE_CAP[] = "deviceCapability";
const char JSON_PATH_NO_SLASH_END[] = APP_BASE_DIR"user/ace/etc/bundles";
// store bundle permissions for IAM
const char PERMISSIONS_PATH[] = APP_BASE_DIR"user/ace/etc/permissions";
+// Original IDE version
const char ASSET_JS_PATH[] = "/assets/js/default";
+// IDE version 5.0 and above
+const char ASSET_JS_PATH_MAIN[] = "/assets/js/MainAbility";
+// IDE version below 5.0
+const char ASSET_JS_PATH_DEFAULT[] = "/assets/js/default";
+const char ASSET_PATH[] = "/assets/js/";
const char ICON_NAME[] = "/icon.bin";
const char SMALL_ICON_NAME[] = "/icon_small.bin";
const char DEFAULT_ICON_SETTING[] = "$media:icon";
char *vendor;
char *label;
char *iconPath;
+ char *srcPath;
ProfileVersion profileVersion;
ProfileApiVersion profileApiVersion;
ModuleInfo moduleInfo;
uint8_t SwitchErrorCode(int32_t errorCode);
uint8_t AddBundleResList(const char *bundleName, uint32_t labelId, uint32_t iconId);
uint8_t MoveRawFileToDataPath(const BundleInfo *bundleInfo);
- uint8_t TransformJsToBc(const char *codePath, InstallRecord &record);
+ uint8_t TransformJsToBc(const char *codePath, InstallRecord &record, char *jsPath);
};
#define FREE_PRO_RESOURCE(fp, permissions, bundleInfo) \
void APP_QueryAppInfo(const char *appDir, AppInfoList *list);
void APP_InsertAppInfo(char *filePath, AppInfoList *list);
void APP_FreeAllAppInfo(const AppInfoList *list);
- void InstallPreBundle(List<ToBeInstalledApp *> systemPathList, InstallerCallback installerCallback);
+ void InstallPreBundle(List<ToBeInstalledApp *> &systemPathList, InstallerCallback installerCallback);
GtBundleInstaller *installer_;
BundleMap *bundleMap_;
--- /dev/null
+/*\r
+* Copyright (c) CompanyNameMagicTag. 2021-2021. All rights reserved.\r
+* Description: audio capture wrapper\r
+* Author: Media Software Group\r
+* Create: 2021-09-13\r
+*/\r
+\r
+#ifndef AUDIOCAPTURER_MODULE_H\r
+#define AUDIOCAPTURER_MODULE_H\r
+\r
+#include <stdint.h>\r
+#include "jsi.h"\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+int32_t AudioCaptureSample(int32_t argc, const char *argv[]);\r
+\r
+\r
+#ifdef __cplusplus\r
+};\r
+#endif\r
+\r
+namespace OHOS {\r
+namespace ACELite {\r
+class AudioCapturerModule final : public MemoryHeap {\r
+public:\r
+ /**\r
+ * constructor\r
+ */\r
+ AudioCapturerModule() = default;\r
+\r
+ /**\r
+ * desconstructor\r
+ */\r
+ ~AudioCapturerModule() = default;\r
+ /**\r
+ * Start\r
+ */\r
+ static JSIValue Start(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);\r
+\r
+ /**\r
+ * Stop\r
+ */\r
+ static JSIValue Stop(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);\r
+\r
+ /**\r
+ handle exception\r
+ */\r
+ static void ExceptionStop(void);\r
+};\r
+\r
+void InitAudioCapturerModule(JSIValue exports);\r
+}\r
+}\r
+\r
+\r
+#endif\r
JSIValue ExecuteAsyncWork(const JSIValue thisVal, const JSIValue* args,\r
uint8_t argsNum, AsyncWorkHandler ExecuteFunc, bool flag = false)\r
{\r
- JSIValue undefValue = JSI::CreateUndefined();\r
- if (!NativeapiCommon::IsValidJSIValue(args, argsNum)) {\r
- return undefValue;\r
- }\r
- FuncParams* params = new(std::nothrow) FuncParams();\r
- if (params == nullptr) {\r
- return undefValue;\r
+ JSIValue retValue = JSI::CreateUndefined();\r
+\r
+ if (args != nullptr && argsNum > 0 && NativeapiCommon::IsValidJSIValue(args, argsNum)) {\r
+ FuncParams* params = new(std::nothrow) FuncParams();\r
+ if (params != nullptr) {\r
+ params->thisVal = JSI::AcquireValue(thisVal);\r
+ params->args = JSI::AcquireValue(args[0]);\r
+ params->flag = flag;\r
+\r
+ bool isSuccess = JsAsyncWork::DispatchAsyncWork(ExecuteFunc, reinterpret_cast<void *>(params));\r
+ if (!isSuccess) {\r
+ JSI::ReleaseValue(params->thisVal);\r
+ JSI::ReleaseValue(params->args);\r
+ delete params;\r
+ retValue = JSI::CreateErrorWithCode(-1, "Async work dispatch failed");\r
+ }\r
+ } else {\r
+ retValue = JSI::CreateErrorWithCode(-1, "Failed to allocate FuncParams");\r
+ }\r
+ } else {\r
+ retValue = JSI::CreateErrorWithCode(-1, "Invalid arguments");\r
}\r
- params->thisVal = JSI::AcquireValue(thisVal);\r
- params->args = JSI::AcquireValue(args[0]);\r
- params->flag = flag;\r
- JsAsyncWork::DispatchAsyncWork(ExecuteFunc, reinterpret_cast<void *>(params));\r
- return undefValue;\r
+ return retValue;\r
}\r
\r
void ExecuteCopyFile(void* data)\r
}\r
\r
JSIValue ExecuteAsyncWork(const JSIValue thisVal, const JSIValue* args,\r
- uint8_t argsNum, AsyncWorkHandler ExecuteFunc, bool flag)\r
+ uint8_t argsNum, AsyncWorkHandler ExecuteFunc, bool flag = false)\r
{\r
- JSIValue undefValue = JSI::CreateUndefined();\r
- if (!NativeapiCommon::IsValidJSIValue(args, argsNum)) {\r
- return undefValue;\r
- }\r
- FuncParams* params = new(std::nothrow) FuncParams();\r
- if (params == nullptr) {\r
- return undefValue;\r
+ JSIValue retValue = JSI::CreateUndefined();\r
+\r
+ if (args != nullptr && argsNum > 0 && NativeapiCommon::IsValidJSIValue(args, argsNum)) {\r
+ FuncParams* params = new(std::nothrow) FuncParams();\r
+ if (params != nullptr) {\r
+ params->thisVal = JSI::AcquireValue(thisVal);\r
+ params->args = JSI::AcquireValue(args[0]);\r
+ params->flag = flag;\r
+\r
+ bool isSuccess = JsAsyncWork::DispatchAsyncWork(ExecuteFunc, reinterpret_cast<void *>(params));\r
+ if (!isSuccess) {\r
+ JSI::ReleaseValue(params->thisVal);\r
+ JSI::ReleaseValue(params->args);\r
+ delete params;\r
+ retValue = JSI::CreateErrorWithCode(-1, "Async work dispatch failed");\r
+ }\r
+ } else {\r
+ retValue = JSI::CreateErrorWithCode(-1, "Failed to allocate FuncParams");\r
+ }\r
+ } else {\r
+ retValue = JSI::CreateErrorWithCode(-1, "Invalid arguments");\r
}\r
- params->thisVal = JSI::AcquireValue(thisVal);\r
- params->args = JSI::AcquireValue(args[0]);\r
- params->flag = flag;\r
- JsAsyncWork::DispatchAsyncWork(ExecuteFunc, reinterpret_cast<void *>(params));\r
- return undefValue;\r
+ return retValue;\r
}\r
\r
void ExecuteGet(void* data)\r
#include "bts_le_gap.h"
#include "bts_feature.h"
#include "bts_a2dp_source.h"
+#include "bts_spp.h"
#include "bts_br_gap.h"
#include "bts_avrcp_controller.h"
#include "sample_common.h"
BTSRV_SAMPLE_GAP_SET_INQUIRY_PARAM, /* 35 设置搜到参数 */
BTSRV_SAMPLE_GAP_SET_SERVICE_TASK_PRIORITY, /* 36 设置BT_SERVICE_TASK优先级 */
BTSRV_SAMPLE_GAP_SET_FLOW_LIMIT, /* 37 设置流控限制字节数 */
+ BTSRV_SAMPLE_GAP_SET_SPP_WRITE_RETRY_MAX, /* 38 设置spp写入重试最大次数 */
} btsrv_gap_sample_cmd_id;
typedef enum {
bts_sample_log("bts set flow limit ret:0x%x limit:%d\n", ret, flow_limit);
}
+static void btsrv_sample_cmd_set_spp_write_retry_max(const char **params, int32_t params_cnt)
+{
+ if (params_cnt != 1) { /* 1:参数个数 */
+ bts_sample_log("params_cnt error! need one param!\n");
+ return;
+ }
+ uint32_t retry_max = (uint32_t)atoi(params[0]);
+ errcode_t ret = spp_write_retry_times_config(retry_max);
+ bts_sample_log("bts set spp write retry max ret:0x%x max:%u\n", ret, retry_max);
+}
+
btsrv_sample_cmd_hdl_info g_btsrv_gap_sample_hdls[] = {
/* 0 */
{ BTSRV_SAMPLE_GAP_ENABLE_BLE, btsrv_sample_cmd_enable_ble },
{ BTSRV_SAMPLE_GAP_SET_INQUIRY_PARAM, btsrv_sample_cmd_set_filter_device_class },
{ BTSRV_SAMPLE_GAP_SET_SERVICE_TASK_PRIORITY, btsrv_sample_cmd_set_service_task_priority},
{ BTSRV_SAMPLE_GAP_SET_FLOW_LIMIT, btsrv_sample_cmd_set_flow_limit},
+ { BTSRV_SAMPLE_GAP_SET_SPP_WRITE_RETRY_MAX, btsrv_sample_cmd_set_spp_write_retry_max},
};
void btsrv_gap_sample_cmd(uint32_t cmd_id, const char **params, int32_t params_cnt)
bts_sample_log_no_header("scan_result_data is null \n");
return;
}
- bts_sample_log("addr_type: %u addr:0x%02x:**:**:**:%02x:%02x.\r\n", scan_result_data->addr.type,
- scan_result_data->addr.addr[BT_INDEX_0], scan_result_data->addr.addr[BT_INDEX_4],
- scan_result_data->addr.addr[BT_INDEX_5]);
+ bts_sample_log("event_type:%u addr_type: %u addr:0x%02x:**:**:**:%02x:%02x adv_len:%u.\r\n",
+ scan_result_data->event_type, scan_result_data->addr.type, scan_result_data->addr.addr[BT_INDEX_0],
+ scan_result_data->addr.addr[BT_INDEX_4], scan_result_data->addr.addr[BT_INDEX_5], scan_result_data->adv_len);
}
static void sample_gap_ble_conn_state_change_cbk(uint16_t conn_id, bd_addr_t *addr, gap_ble_conn_state_t conn_state,
#define BT_AT_TGAP_PRIMARY_ADV_INTERVAL_MAX 96 /* 0x0060, 60.000ms, U:0.625 */
#define BT_AT_TGAP_PRIMARY_ADV_CHANNEL_MAP 0x7
#define BT_AT_EXT_ADV_PHYS_1M 0x01 /* HCI_PRIMARY_ADVERTISING_PHY_1M */
+#define BT_AT_FILTER_DUPLICATES_ENABLE 0x01 /* HCI_FILTER_DUPLICATES_DUPLICATE_FILTERING_ENABLED */
#define BT_AT_GAP_LE_EXT_ADV_FLAG_OWN_ADDR 16
enum {
--- /dev/null
+{
+ "api_version": 0,
+ "manufacturer_id": 0,
+ "system_type": "mini",
+ "syscap": {
+ "os": ["SystemCapability.Developtools.Syscap", "SystemCapability.Security.Cipher", "SystemCapability.Security.Huks.Core", "SystemCapability.Security.Huks.Extension"],
+ "private": []
+ }
+}
--- /dev/null
+*.iml\r
+.gradle\r
+/local.properties\r
+/.idea/caches\r
+/.idea/libraries\r
+/.idea/modules.xml\r
+/.idea/workspace.xml\r
+/.idea/navEditor.xml\r
+/.idea/assetWizardSettings.xml\r
+.DS_Store\r
+/build\r
+/captures\r
+.externalNativeBuild\r
+/entry/.preview\r
+.cxx\r
--- /dev/null
+// Top-level build file where you can add configuration options common to all sub-projects/modules.\r
+apply plugin: 'com.huawei.ohos.app'\r
+\r
+//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#ZH-CN_TOPIC_0000001154985555__section1112183053510\r
+ohos {\r
+ compileSdkVersion 5\r
+ defaultConfig {\r
+ compatibleSdkVersion 5\r
+ }\r
+}\r
+ \r
+buildscript {\r
+ repositories {\r
+ maven {\r
+ url 'https://repo.huaweicloud.com/repository/maven/'\r
+ }\r
+ maven {\r
+ url 'https://developer.huawei.com/repo/'\r
+ }\r
+ jcenter()\r
+ }\r
+ dependencies {\r
+ classpath 'com.huawei.ohos:hap:2.4.4.2'\r
+ classpath 'com.huawei.ohos:decctest:1.2.4.0'\r
+ }\r
+}\r
+\r
+allprojects {\r
+ repositories {\r
+ maven {\r
+ url 'https://repo.huaweicloud.com/repository/maven/'\r
+ }\r
+ maven {\r
+ url 'https://developer.huawei.com/repo/'\r
+ }\r
+ jcenter()\r
+ }\r
+}\r
--- /dev/null
+apply plugin: 'com.huawei.ohos.hap'\r
+apply plugin: 'com.huawei.ohos.decctest'\r
+//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#ZH-CN_TOPIC_0000001154985555__section1112183053510\r
+ohos {\r
+ compileSdkVersion 5\r
+ defaultConfig {\r
+ compatibleSdkVersion 5\r
+ }\r
+ buildTypes {\r
+ release {\r
+ proguardOpt {\r
+ proguardEnabled false\r
+ rulesFiles 'proguard-rules.pro'\r
+ }\r
+ }\r
+ }\r
+ \r
+}\r
+\r
+dependencies {\r
+ testImplementation 'junit:junit:4.13'\r
+}\r
+decc {\r
+ supportType = ['html','xml']\r
+}\r
--- /dev/null
+# config module specific ProGuard rules here.
\ No newline at end of file
--- /dev/null
+{\r
+ "app": {\r
+ "bundleName": "com.example.keyinput_sample",\r
+ "vendor": "example",\r
+ "version": {\r
+ "code": 1000000,\r
+ "name": "1.0.0"\r
+ }\r
+ },\r
+ "deviceConfig": {},\r
+ "module": {\r
+ "deviceType": [\r
+ "liteWearable"\r
+ ],\r
+ "distro": {\r
+ "deliveryWithInstall": true,\r
+ "moduleName": "entry",\r
+ "moduleType": "entry"\r
+ },\r
+ "abilities": [\r
+ {\r
+ "name": "default",\r
+ "icon": "$media:icon",\r
+ "label": "$string:entry_MainAbility",\r
+ "type": "page"\r
+ }\r
+ ],\r
+ "js": [\r
+ {\r
+ "pages": [\r
+ "pages/index/index",\r
+ "pages/keyinput/keyinput",\r
+ "pages/list_scrollToEnd/list_scrollToEnd",\r
+ "pages/rotation/rotation"\r
+ ],\r
+ "name": "default"\r
+ }\r
+ ]\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+export default {
+ onCreate() {
+ console.info("Application onCreate");
+ },
+ onDestroy() {
+ console.info("Application onDestroy");
+ }
+};
--- /dev/null
+{
+ "strings": {
+ "hello": "Hello",
+ "world": "World"
+ }
+}
\ No newline at end of file
--- /dev/null
+{
+ "strings": {
+ "hello": "您好",
+ "world": "世界"
+ }
+}
\ No newline at end of file
--- /dev/null
+.container {
+ width: 100%;
+ height: 100%;
+ justify-content: center;
+ align-items: center;
+ display: flex;
+ flex-direction: column;
+}
+
+.title {
+ width: 200px;
+ font-size: 30px;
+ text-align: center;
+}
+
+.listcontainer{
+ width: 80%;
+ height: 60%;
+ justify-content: center;
+ align-items: center;
+ background-color: black;
+ flex-direction: column;
+}
+
+.listitem{
+ width: 100%;
+ height: 80px;
+ flex-direction: column;
+ background-color: black;
+ justify-content: center;
+}
+
+.btn{
+ width: 100%;
+ height: 70px;
+ font-size: 24px;
+ text-align:center;
+ text-align-vertical: center;
+ color: black;
+ background-color: grey;
+}
+
--- /dev/null
+<div class="container" onswipe="swipe">
+ <list class="listcontainer">
+ <list-item class="listitem" for="{{pages}}">
+ <text class="btn" on:click="onClick($item.path)">{{$item.title}}</text>
+ </list-item>
+ </list>
+</div>
--- /dev/null
+import app from "@system.app"
+import router from '@system.router';
+
+export default {
+ data: {
+ pages: [
+ {
+ title: "keyinput Listener",
+ path: "pages/keyinput/keyinput"
+ },
+ {
+ title: "List scrollToEnd",
+ path: "pages/list_scrollToEnd/list_scrollToEnd"
+ }
+ ]
+ },
+ onShow() {
+
+ },
+ onClick(item){
+ router.replace({
+ uri:item,
+ })
+ },
+ swipe(e){
+ if (e.direction == "right" && e.distance > 200) {
+ app.terminate()
+ }
+ }
+}
--- /dev/null
+.container {
+ width: 454px;
+ height: 454px;
+ justify-content: center;
+ align-items: center;
+}
+
+.title {
+ width: 200px;
+ font-size: 30px;
+ text-align: center;
+}
--- /dev/null
+<div class="container" onswipe="swipe">
+ <text class="title">
+ register KeyListener & RotateListener
+ </text>
+</div>
--- /dev/null
+import key from '@system.keyinput';
+import router from '@system.router';
+
+function Rotatecallback(data) {
+ console.info("Rotatecallback : " + JSON.stringify(data))
+}
+
+export default {
+ data: {
+ Test:"Test"
+ },
+ onShow() {
+ let that = this
+ key.setKeyListener({
+ "callback": function(data){
+ console.info("Keycallback data : "+JSON.stringify(data)+" Test : "+that.Test)
+ }
+ })
+ key.setRotateListener({
+ "callback": Rotatecallback
+ })
+ },
+ swipe(e){
+ console.info(" swipe "+JSON.stringify(e))
+ if (e.direction == "right") {
+ router.replace({
+ uri: 'pages/index/index',
+ })
+ }
+ }
+}
--- /dev/null
+.container {
+ width: 100%;
+ height: 100%;
+ justify-content: center;
+ align-items: center;
+ display: flex;
+ flex-direction: column;
+}
+
+.listcontainer{
+ width: 80%;
+ height: 60%;
+ justify-content: center;
+ align-items: center;
+ background-color: pink;
+ flex-direction: column;
+}
+
+.listitem{
+ width: 100%;
+ flex-direction: column;
+ background-color: green;
+}
+
+.btn{
+ width: 100%;
+ font-size: 24px;
+ text-align:left;
+ color: black;
+ background-color: grey;
+}
+
+.title {
+ width: 200px;
+ font-size: 30px;
+ text-align: center;
+}
--- /dev/null
+<div class="container" onswipe="swipe">
+ <div style="height: 20%;width: 100%;"></div>
+ <list class="listcontainer" ref="list" on:click="scrollToEnd" if="{{isShow}}">
+ <list-item class="listitem" for="{{todolist}}">
+ <text class="btn" >{{$item}}</text>
+ </list-item>
+ </list>
+ <div style="height: 20%;width: 100%;"></div>
+</div>
--- /dev/null
+import router from '@system.router';
+
+export default {
+ data: {
+ isShow:true,
+ todolist: [
+ "add list item 1",
+ ],
+ listid:0,
+ scrollid:0
+ },
+ onShow() {
+ this.listid = setInterval(() => {
+ if (this.todolist[0].length < 1050) {
+ console.info(" this.todolist[0].length < 1050 ")
+ let temp = this.todolist[0] + "add list item 1";
+ this.todolist[0] = temp;
+ this.todolist = this.todolist;
+ } else {
+ console.info(" this.todolist[0].length > 1050 ")
+ }
+ }, 2500)
+ this.scrollid = setInterval(() => {
+ const list = this.$refs.list;
+ list.scrollToEnd(this.code);
+ }, 1000)
+ },
+ swipe(e) {
+ if (e.direction == "right" && e.distance > 200) {
+ router.replace({
+ uri: 'pages/index/index',
+ })
+ }
+ },
+ onHide(){
+ clearInterval(this.listid);
+ clearInterval(this.scrollid);
+ }
+}
--- /dev/null
+.container {
+ width: 100%;
+ height: 100%;
+ justify-content: center;
+ align-items: center;
+ display: flex;
+ flex-direction: row;
+}
+
--- /dev/null
+<div class="container" onswipe="swipe">
+ <picker-view style=" height : 60%; width : 25%;" type="text" range="{{picker_data}}" ref="pickerview" on:click="fun_pickerview"/>
+ <list style="width: 25%; height: 60%;" ref="list" on:click="fun_list">
+ <list-item style="width: 100%; height: 150px;" for="{{todolist}}">
+ <text style="width: 100%; height: 150px; ">{{$item.title}} 111</text>
+ </list-item>
+ </list>
+ <swiper style="width: 25%; height: 60%; flex-direction: row;" ref="swiper" on:click="fun_swiper">
+ <div style="width: 100%; height: 100%; background-color: #007dff; ">
+ <text>1</text>
+ </div>
+ <div style="width: 100%; height: 100%; background-color: #ff7500;">
+ <text>2</text>
+ </div>
+ <div style="width: 100%; height: 100%; background-color: #41ba41;">
+ <text>3</text>
+ </div>
+ </swiper>
+ <slider style=" height : 60%; width : 25%; background-color: red;" ref="slider" on:click="fun_slider"></slider>
+</div>
--- /dev/null
+import router from '@system.router';
+
+export default {
+ data: {
+ picker_data: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30"],
+ todolist: [
+ {
+ title: 'aaa',
+ },
+ {
+ title: 'bbb'
+ },
+ {
+ title: 'ccc'
+ },
+ {
+ title: 'ddd'
+ },
+ {
+ title: 'eee'
+ },
+ {
+ title: 'fff'
+ },
+ {
+ title: 'ggg'
+ },
+ {
+ title: 'hhh'
+ },
+ {
+ title: 'iii'
+ },
+ {
+ title: 'jjj'
+ },
+ {
+ title: 'kkk'
+ },
+ ],
+ },
+ fun_list() {
+ console.info("fun_list")
+ const list = this.$refs.list;
+ list.rotation({
+ "focus": true
+ })
+ },
+ fun_pickerview() {
+ console.info("fun_pickerview")
+ const pickerview = this.$refs.pickerview;
+ pickerview.rotation({
+ "focus": true
+ })
+ },
+ fun_swiper() {
+ console.info("fun_pickerview")
+ const swiper = this.$refs.swiper;
+ swiper.rotation({
+ "focus": true
+ })
+ },
+ fun_slider() {
+ console.info("fun_slider")
+ const slider = this.$refs.slider;
+ slider.rotation({
+ "focus": true
+ })
+ },
+ swipe(e) {
+ if (e.direction == "right" && e.distance > 200) {
+ router.replace({
+ uri: 'pages/index/index',
+ })
+ }
+ }
+}
+
--- /dev/null
+{\r
+ "string": [\r
+ {\r
+ "name": "entry_MainAbility",\r
+ "value": "entry_MainAbility"\r
+ }\r
+ ]\r
+}\r
--- /dev/null
+# Project-wide Gradle settings.\r
+# IDE (e.g. DevEco Studio) users:\r
+# Gradle settings configured through the IDE *will override*\r
+# any settings specified in this file.\r
+# For more details on how to configure your build environment visit\r
+# http://www.gradle.org/docs/current/userguide/build_environment.html\r
+# Specifies the JVM arguments used for the daemon process.\r
+# The setting is particularly useful for tweaking memory settings.\r
+# If the Chinese output is garbled, please configure the following parameter.\r
+# This function is enabled by default when the DevEco Studio builds the hap/app,if you need disable gradle parallel,you should set org.gradle.parallel false.\r
+# more information see https://docs.gradle.org/current/userguide/performance.html\r
+# org.gradle.parallel=false\r
+# org.gradle.jvmargs=-Dfile.encoding=GBK
\ No newline at end of file
--- /dev/null
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://repo.huaweicloud.com/gradle/gradle-6.3-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
--- /dev/null
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=`expr $i + 1`
+ done
+ case $i in
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=`save "$@"`
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+exec "$JAVACMD" "$@"
--- /dev/null
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
--- /dev/null
+include ':entry'\r
--- /dev/null
+【补丁名称】patch_602_1029_to_1126\r
+【基础版本】b602 + 0521 + 0626 + 7020 + 0812 + 0911 + 1009 + 1029\r
+【修复问题】\r
+BT合入内容:\r
+1、新增需求:提供配置SPP数传重试次数的功能。\r
+\r
+PLT合入内容\r
+1、 问题描述:解决客户打开双击宏后,概率性单击按键上报双击事件问题。\r
+ 测试建议:powerkey双击场景验证,库上默认没有打开双击宏\r
+2、 问题描述:gettimeofday底层调用接口修改,删除冗余算法。。\r
+ 测试建议:不同步时间的情况下,压测系统时间误差\r
+3、 代码优化:低功耗流程优化\r
+ 测试建议:压测深睡场景\r
+4、 维测优化:panic函数流程中增加trace&mem导出\r
+\r
+AUDIO&MEDIA合入内容\r
+1、 问题描述:概率性初始化失败,导致音频播放失败。\r
+ 测试场景:媒体初始化加载某一个插件失败以后,再进行媒体的初始化\r
+2、 问题描述:手表连接蓝牙耳机播放蓝牙音乐时来电,挂断后会导致音乐无法恢复。\r
+ 测试场景:蓝牙sink音乐+来电铃声+蓝牙通话,通话打断音乐以后,通话结束以后,音乐恢复\r
+3、 问题描述:视频表盘弹窗概率性出现视频黑帧\r
+ 测试场景:视频表盘场景,视频还未完全起播就灭屏;视频表盘+视频弹窗场景\r
+4、 问题描述:蓝牙通话的场景,来电铃声的时候需要静音通话,有时候静音无效。\r
+ 测试场景:蓝牙通话的场景,来电铃声的时候需要静音通话,有时候静音无效\r
+5、 需求描述:实现音视频播放时进度条拖动需求\r
+ 测试场景:音视频播放的时候,都可以调用seek接口进行跳转\r
+6、 问题描述:解决音乐播放完DSP无法进入低功耗的问题\r
+ 测试场景:本地音乐播放\r
+7、 问题描述:JS敲木鱼设置音量不生效\r
+ 测试场景:js敲木鱼的音频播放,在播放前进行音量和流类型的设置,在真正播放的时候生效\r
+8、 问题描述: 不停推送微信消息会出现音频播放失败的问题\r
+ 测试场景,在播放蓝牙sink音乐的时候,不停的推送微信消息\r
+9、 问题描述:录音打断sink音乐,结束录音后sink音乐无法恢复。\r
+ 测试场景:先播放蓝牙sink音乐再起小度语音会打断sink音乐,小度语音退出以后,sink音乐会恢复\r
+\r
+GUI合入内容\r
+1、 问题描述:解决视频特定场景的停播问题\r
+ 测试建议:图形内存严重不足时起播视频,视频起播后调用Stop后重新设置视频源再起播\r
+2、 问题描述:解决CrossView上下滑动高斯模糊消失问题\r
+ 测试建议:一级表盘界面,向一个方向拖动一段距离后,快速反向滑动然后松手,确认反向拉出的界面是否有正常的高斯模糊效果\r
+3、 问题描述:解决地图相关的显示和内存问题\r
+ 测试建议:测试地图业务\r
+4、 问题描述:解决局部视频滑动以及亮灭屏后显示问题\r
+ 测试建议:在一级卡片中播放位于非[0,0]的局部视频,测试左右滑动和量灭屏\r
+5、 问题描述:解决UIRollerView移除最后一个控件后挂死问题\r
+ 测试建议:NativeJS示例页面,点击进入滚筒后点击页面底部,反复点击remove至到控件被全部移除\r
+\r
+OHOS合入内容\r
+1、 新增需求:JS应用名支持动态切换语言。\r
+ 测试建议:使用AT命令测试切换语言场景:AT^OHOSFWK_CHANGE_LANGUAGE=en-US,退出applist,再进入后应用名切换为中文。\r
+2、 新增需求:兼容IDE5.0和2.1版本安装包。\r
+ 安装不同版本IDE(IDE5.0和2.1)编译出的安装包,测试安装是否正常。\r
+3、 新增需求:添加一个AT命令用于切换语言。\r
+ 测试建议:使用AT命令切换语言AT^OHOSFWK_CHANGE_LANGUAGE=en-US\r
+4、 新增需求:增加最大应用数量,从30修改为60\r
+5、 新增需求:List 滑动到底部功能添加,以及滑动底部功能js sample代码,示例代码:jsapp/keyinput_sample\r
+6、 代码优化:听书新增streamType API;文心一言设置getApp获取回调,item高度自适应\r
+7、 代码优化:swiper滑动频繁触发OnDrag原生日志影响流畅度,屏蔽OnDrag原生日志\r
+8、 代码优化:rotate focus获取焦点,再隐藏控件挂死问题 。示例代码:jsapp/keyinput_sample\r
+9、 新增需求:keyinput 模块,扩展社区标准接口onClick, onPress\r
+\r
+10、新增需求:支持跑马灯功能,跑马灯文本支持旋转功能合\r
+ 测试建议:使用jsapp.zip的marqueesample源码编译出bin,板端安装应用进行测试\r
+11、新增需求: 新增支持点击power键正常关闭notify。\r
+ 测试建议:js应用下 闹钟notifyshowing时 点击power键正常关闭notify。参考代码:application\wearable\service\msg_center\src\msg_center_customer.cpp\r
+12、代码优化:js安装命令解决内存泄露\r
+ 开发建议:客户参考js安装回调ReceiveCallback中,调用AdapterFree\r
+\r
+\r
+【修改影响】NA\r
+\r
+【使用方法】\r
+ 1、合入0521补丁\r
+ 2、合入0626补丁\r
+ 3、合入0720补丁\r
+ 4、合入0812补丁\r
+ 5、合入0911补丁\r
+ 6、合入1009补丁\r
+ 7、合入1029补丁\r
+ 8、合入1126补丁(包含1029到1126之间所有调试补丁)\r
+\r
+【自测情况】\r
+ 自验证范围:\r
+ 全功能冒烟\r
+ 自验证target:\r
+ Native-js、target3 rc版本\r
+【是否合入版本】根据测试结果确定\r