完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
|
测试平台
Platform: RK3399/RK3328 OS: Android9.0 现象 使用系统接口设置时间生效,查看rtc也设置成功。但是重启后时间为首次开机的时间. 分析 多次测试后发现,设置时间在第一次开机时系统显示的时间之后,重启后时间设置生效;设置在之前,则会还原成第一次系统开机时显示的时间。 所以怀疑时,系统在开机的时候做了时间有效检测.查看AlarmManagerService.java后发现系统会用当前时间和编译固件的时间做对比,如果早于编译时间则使用编译时间为当前时间。 frameworks/base/services/core/java/com/android/server/AlarmManagerService.java @Override public void onStart() { mNativeData = init(); mNextWakeup = mNextNonWakeup = 0; // We have to set current TimeZone info to kernel // because kernel doesn't keep this after reboot setTimeZoneImpl(SystemProperties.get(TIMEZONE_PROPERTY)); if (mNativeData != 0) { // Ensure that we're booting with a halfway sensible current time. Use the // most recent of Build.TIME, the root file system's timestamp, and the // value of the ro.build.date.utc system property (which is in seconds). final long systemBuildTime = Long.max( 1000L * SystemProperties.getLong("ro.build.date.utc", -1L), Long.max(Environment.getRootDirectory().lastModified(), Build.TIME)); if (System.currentTimeMillis() < systemBuildTime) { Slog.i(TAG, "Current time only " + System.currentTimeMillis() + ", advancing to build time " + systemBuildTime); setKernelTime(mNativeData, systemBuildTime); } } 解决办法 屏蔽此处的时间检验即可或者向客户说明情况。 |
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
840 浏览 0 评论
谁有3566+电池+POE充电的方案,有个项目需要用该功能的主板
1309 浏览 0 评论
RK3588的GMAC0与PHY的参考时钟电平匹配问题??????
6756 浏览 1 评论
请问各位大佬,如何解决,瑞芯微 RV1126B 使用 mpp 自带工具 调试时,内核直接报错崩溃!
2124 浏览 0 评论
使用rk3568开发板,核0\\1\\3运行linux,核2运行hal,在核0中怎么关闭核2
2666 浏览 0 评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-13 13:54 , Processed in 0.769912 second(s), Total 76, Slave 55 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
2519