summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Fuller <nfuller@google.com>2019-11-25 13:53:15 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-11-25 13:53:15 +0000
commit05eeef4188ea69b99bb718c5e092aa7bb2d7306d (patch)
treed4fd5b60389a6b2048f8fe5fc3d6e5ab9ba0a837
parented2a3ec9b48a1e34445a95cbd3b820484a1d0477 (diff)
parent4b03c07cc70690aff6383fc4e8794b151c00b561 (diff)
Merge "Remove dead code from SystemServer"
-rw-r--r--core/java/android/os/SystemClock.java1
-rw-r--r--services/java/com/android/server/SystemServer.java9
2 files changed, 1 insertions, 9 deletions
diff --git a/core/java/android/os/SystemClock.java b/core/java/android/os/SystemClock.java
index 64effb8fa0cc..210f5d7b5dab 100644
--- a/core/java/android/os/SystemClock.java
+++ b/core/java/android/os/SystemClock.java
@@ -154,6 +154,7 @@ public final class SystemClock {
final IAlarmManager mgr = IAlarmManager.Stub
.asInterface(ServiceManager.getService(Context.ALARM_SERVICE));
if (mgr == null) {
+ Slog.e(TAG, "Unable to set RTC: mgr == null");
return false;
}
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 313f884c08cb..def61bf88798 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -384,15 +384,6 @@ public final class SystemServer {
EventLog.writeEvent(EventLogTags.SYSTEM_SERVER_START,
mStartCount, mRuntimeStartUptime, mRuntimeStartElapsedTime);
- // If a device's clock is before 1970 (before 0), a lot of
- // APIs crash dealing with negative numbers, notably
- // java.io.File#setLastModified, so instead we fake it and
- // hope that time from cell towers or NTP fixes it shortly.
- if (System.currentTimeMillis() < EARLIEST_SUPPORTED_TIME) {
- Slog.w(TAG, "System clock is before 1970; setting to 1970.");
- SystemClock.setCurrentTimeMillis(EARLIEST_SUPPORTED_TIME);
- }
-
//
// Default the timezone property to GMT if not set.
//