mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2024-11-24 01:09:51 +00:00
!7788 修复快速切换亮灭屏,亮屏广播偶现发送失败的bug
Merge pull request !7788 from wudj2110/master_screen_status_merge
This commit is contained in:
commit
ed64f260cf
@ -562,6 +562,7 @@ static void HbScreenStateChangeEventHandler(const LnnEventBasicInfo *info)
|
||||
nowTime = time.sec * HB_TIME_FACTOR + time.usec / HB_TIME_FACTOR;
|
||||
HbScreenOnOnceTryCloudSync();
|
||||
if (g_hbConditionState.screenState == SOFTBUS_SCREEN_ON && oldstate != SOFTBUS_SCREEN_ON) {
|
||||
(void)LnnUpdateLocalScreenStatus(true);
|
||||
HbScreenOnChangeEventHandler(nowTime);
|
||||
return;
|
||||
}
|
||||
@ -569,10 +570,11 @@ static void HbScreenStateChangeEventHandler(const LnnEventBasicInfo *info)
|
||||
LNN_LOGI(LNN_HEART_BEAT, "HB handle SOFTBUS_SCREEN_OFF");
|
||||
g_lastScreenOffTime = nowTime;
|
||||
(void)LnnUpdateLocalScreenStatus(false);
|
||||
if (LnnStartHbByTypeAndStrategy(
|
||||
HEARTBEAT_TYPE_BLE_V0 | HEARTBEAT_TYPE_BLE_V3, STRATEGY_HB_SEND_SINGLE, false) != SOFTBUS_OK) {
|
||||
LNN_LOGE(LNN_HEART_BEAT, "start ble heartbeat failed");
|
||||
return;
|
||||
if (!LnnIsLocalSupportBurstFeature()) {
|
||||
if (LnnStartHbByTypeAndStrategy(HEARTBEAT_TYPE_BLE_V0, STRATEGY_HB_SEND_SINGLE, false) != SOFTBUS_OK) {
|
||||
LNN_LOGE(LNN_HEART_BEAT, "start ble heartbeat failed");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (LnnStopHeartBeatAdvByTypeNow(HEARTBEAT_TYPE_BLE_V1) != SOFTBUS_OK) {
|
||||
LNN_LOGE(LNN_HEART_BEAT, "ctrl disable ble heartbeat failed");
|
||||
|
@ -381,7 +381,7 @@ void LnnRemoveSendEndMsg(LnnHeartbeatFsm *hbFsm, LnnHeartbeatType type, bool wak
|
||||
|
||||
*isRemoved = true;
|
||||
LnnRemoveSendEndMsgPara msgPara = {
|
||||
.hbType = type,
|
||||
.hbType = type & (~HEARTBEAT_TYPE_BLE_V3),
|
||||
.wakeupFlag = wakeupFlag,
|
||||
.isRelay = isRelay,
|
||||
.isRemoved = isRemoved,
|
||||
|
Loading…
Reference in New Issue
Block a user