Skip to content
Commit 4b03c07c authored by Neil Fuller's avatar Neil Fuller
Browse files

Remove dead code from SystemServer

Remove dead code from SystemServer that obstensively protects devices
from negative (< 1970) system clock times, but does not.

In reality, SystemServer calls SystemClock.setCurrentTimeMillis(), which
calls through to the AlarmManager.setTime() binder call. When the code
runs the system server hasn't started any services yet, so this would
always fail.

AlarmManager has similar protections in place that do work: if the
device is earlier than a "build time", then the device's clock is forced
forward. That provides the protection that the code being removed from
SystemServer was trying to achieve.

Test: Added logging to SystemClock to prove AlarmManager is null /
manual debugging

Change-Id: I87dca1062829bc1a10202804fa7ee31e0a6f03a3
parent a8ce56e2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment