{
int *state = NULL;
size_t state_sz = 0;
+ struct watch_time_s timeinfo;
bundle_get_byte(envelope, "__AUL_SC_VIEWER_STATUS__",
(void **)&state, &state_sz);
return -1;
}
- priv.viewer_visibility = *state;
- _D("set viewer state to %d", *state);
+ _D("receive viewer state %d", *state);
+ if (*state != AUL_SCREEN_STATUS_PRE_RESUME) {
+ priv.viewer_visibility = *state;
+ _D("set viewer state to %d", *state);
+ }
if (*state == AUL_SCREEN_STATUS_RESUME &&
- priv.watch_visibility == WVS_RESUME)
+ priv.watch_visibility == WVS_RESUME) {
__do_app(WE_RESUME, &priv, NULL);
- else if (*state == AUL_SCREEN_STATUS_PAUSE)
+ } else if (*state == AUL_SCREEN_STATUS_PAUSE) {
__do_app(WE_PAUSE, &priv, NULL);
+ } else if (*state == AUL_SCREEN_STATUS_PRE_RESUME) {
+ __get_timeinfo(&timeinfo);
+ _D("call pre resume tick");
+ priv.ops->time_tick(&timeinfo, priv.ops->data);
+ }
return 0;
}