问题描述

Android10设备每次重启后,系统时间都会还原成刷机时的时间,影响APK录像时间轴问题,且机器是不带rtc电路的。

解决方案
diff --git a/frameworks/base/services/core/java/com/android/server/AlarmManagerService.java b/frameworks/base/services/core/java/com/android/server/AlarmManagerService.java
old mode 100644
new mode 100755
index d162441..1c04a22
--- a/frameworks/base/services/core/java/com/android/server/AlarmManagerService.java
+++ b/frameworks/base/services/core/java/com/android/server/AlarmManagerService.java
@@ -1511,14 +1511,14 @@ class AlarmManagerService extends SystemService {
             // 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(
+            /*final long systemBuildTime =  Long.max(
                     1000L * SystemProperties.getLong("ro.build.date.utc", -1L),
                     Long.max(Environment.getRootDirectory().lastModified(), Build.TIME));
             if (mInjector.getCurrentTimeMillis() < systemBuildTime) {
                 Slog.i(TAG, "Current time only " + mInjector.getCurrentTimeMillis()
                         + ", advancing to build time " + systemBuildTime);
                 mInjector.setKernelTime(systemBuildTime);
-            }
+            }*/
 
             // Determine SysUI's uid
             mSystemUiUid = mInjector.getSystemUiUid();
Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐