高通平台修改默认日期

android\vendor\qcom\proprietary\time-services

time_daemon_qmi.c

static int genoff_post_init(time_genoff_ptr time_genoff)
{
int rc;


if (time_genoff->init_func != NULL) {
rc = time_genoff->init_func();
if (rc) {
TIME_LOGE("Daemon:%s:Init func failed\n", __func__);
return -EINVAL;
}
}


if (time_genoff->per_storage_spec.initialized == 1) {
/* Read from the generic offset */
rc = time_persistent_memory_opr(

time_genoff->per_storage_spec.f_name,
TIME_READ_MEMORY, &(time_genoff->generic_offset));
if (rc) {
TIME_LOGD("Daemon:%s:Error in accessing storage\n",
__func__);
/* Modify by , 2015-1-1 start */
if (time_genoff->subsys_base == ATS_RTC) {
time_genoff->generic_offset = ((int64_t) 16436) * 24 * 60 * 60 * 1000;
time_persistent_memory_opr(time_genoff->per_storage_spec.f_name, TIME_WRITE_MEMORY, &time_genoff->generic_offset);
} else {
time_genoff->generic_offset = 0;
}

/* Modify by ,  end */


}
}


time_genoff->initialized = 1;


return 0;
}

你可能感兴趣的:(高通平台修改默认日期)