#include "TransitionType.h"
#include "NativeRegisterManager.h"
+#include "health/health_service/health_service.h"
+#include "battery_hal.h"
+#include "ConfigModelC.h"
+#include "ConfigModel.h"
+#include <custom_utils.h>
+#include "custom_runtime.h"
namespace OHOS {
REGIST_SLICE(VIEW_APPLIST, ApplistView, ApplistPresenter);
uid = (char *)itemView->GetAppUid();
}
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistPresenter::OnClick viewid = %d", viewId);
- if (viewId < VIEW_MAX_INTER_APP) {
- if (viewId == VIEW_SETTING && style == AppListStyle::APPLIST_STYLE) {
- // NativeAbility::GetInstance().EnterSlice(viewId, type, gSliceDefaultPriority, true);
- NativeAbility::GetInstance().EnterSlice(viewId, type);
- } else {
- NativeAbility::GetInstance().EnterSlice(viewId, type);
+ if (viewId < VIEW_MAX_INTER_APP)
+ {
+ /*心率Slice需要增加特殊配置*/
+ bool isCharging = get_charge_stat(); // 获取充电状态
+ if (isCharging && viewId == VIEW_HEART_CHART)
+ {
+ HealthState highHealthState;
+ highHealthState.checkType = CHARGE;
+ HealthService::GetInstance()->SetHealthCurrent(highHealthState);
+ viewId = VIEW_CHECK_INVALID;
}
+ if(uapi_sleep_mode_flag_get())
+ {
+ if(VIEW_DNOTDISTURB == viewId)
+ return false;
+ }
+ NativeAbility::GetInstance().EnterSlice(viewId, type);
return true;
- } else if (viewId == VIEW_EXTERN_APP) {
+ }
+ else if (viewId == VIEW_EXTERN_APP)
+ {
#ifdef JS_ENABLE
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistPresenter::OnClick bundleName = %s", uid);
Want *want = new Want();