Add a wrapper around SystemClock.uptimeMillis().
This bug is motivated by bug 140208026 where we want to replace Thread.sleep() with TestLooper.moveTimeForward() in PackageWatchdogTest.java. However, it turns out that PackageWatchdog uses SystemClock.uptimeMillis() internally. The tests will fail if we don't forward PackageWatchdog's internal clock accordingly. We add a wrapper around SystemClock.uptimeMillis() so it is customizable by the test case. Bug: 140358475 Test: atest PackageWatchdogTest Change-Id: Id26325a93dc4050c6468502347b0e7852ed1263f
Loading
Please register or sign in to comment