diff --git a/frameworks/base/services/java/com/android/server/SystemServer.java b/frameworks/base/services/java/com/android/server/SystemServer.java
old mode 100644
new mode 100755
index c94a7db..76ba34f
--- a/frameworks/base/services/java/com/android/server/SystemServer.java
+++ b/frameworks/base/services/java/com/android/server/SystemServer.java
@@ -162,7 +162,8 @@ public final class SystemServer {
// The earliest supported time. We pick one day into 1970, to
// give any timezone code room without going into negative time.
- private static final long EARLIEST_SUPPORTED_TIME = 86400 * 1000;
+ //private static final long EARLIEST_SUPPORTED_TIME = 86400 * 1000;
+ private static final long EARLIEST_SUPPORTED_TIME = 1514764800000L;
private static final long SLOW_DISPATCH_THRESHOLD_MS = 100;
private static final long SLOW_DELIVERY_THRESHOLD_MS = 200;
@@ -441,6 +442,10 @@ public final class SystemServer {
startBootstrapServices();
startCoreServices();
startOtherServices();
+ if (System.currentTimeMillis() < EARLIEST_SUPPORTED_TIME) {
+ Slog.w(TAG, "System clock is before 2018; setting to 2018.");
+ SystemClock.setCurrentTimeMillis(EARLIEST_SUPPORTED_TIME);
+ }
SystemServerInitThreadPool.shutdown();
} catch (Throwable ex) {
Slog.e("System", "******************************************");
android P修改系统默认时间
最新推荐文章于 2024-08-11 03:46:18 发布