fix:通话中时把callui退到后台并杀死,通过通知栏重新拉起callui时会重置callui的通话状态

Signed-off-by: leiqiwei <280069503@qq.com>
This commit is contained in:
leiqiwei
2023-12-14 19:48:52 +08:00
parent 7779a926b0
commit 4e42fabcd7
@@ -256,7 +256,15 @@ export class NotificationViewModel {
Log.showInfo(TAG, `clickItem itemId: ${itemData.id}, want: ${JSON.stringify(want)}, tapDismissed: ${itemData.tapDismissed}`);
NotificationWindowManager.hideNotificationWindow();
Trace.start(Trace.CORE_METHOD_CLICK_NOTIFICATION);
CommonUtil.startWant((want) ? want : itemData.want);
if (itemData.bundleName == "com.ohos.callui") {
Log.showInfo(TAG, `start ability com.ohos.callui`);
AbilityManager.startAbility(AbilityManager.getContext(AbilityManager.ABILITY_NAME_STATUS_BAR), {
bundleName: "com.ohos.callui",
abilityName: "com.ohos.callui.MainAbility"
});
} else {
CommonUtil.startWant((want) ? want : itemData.want);
}
if (itemData.tapDismissed) {
this.removeNotificationItem(itemData, true, true);
}