Remove SystemClock.uptimeMillisClock().

It was marked @removed in Pie. Now removing it from the code.

Bug: 135214188
Test: atest FrameworksMockingServicesTests
Change-Id: Id8bdf28d8d10a767f54af1bf421185e179c0379a
This commit is contained in:
Kweku Adams
2019-06-17 15:03:37 -07:00
parent a94ba37208
commit bde8ba4100
9 changed files with 7 additions and 16 deletions

View File

@@ -375,7 +375,6 @@ package android.os {
public final class SystemClock {
method @NonNull public static java.time.Clock elapsedRealtimeClock();
method @NonNull public static java.time.Clock uptimeClock();
method @Deprecated @NonNull public static java.time.Clock uptimeMillisClock();
}
public class TestLooperManager {

View File

@@ -176,14 +176,6 @@ public final class SystemClock {
@CriticalNative
native public static long uptimeMillis();
/**
* @removed
*/
@Deprecated
public static @NonNull Clock uptimeMillisClock() {
return uptimeClock();
}
/**
* Return {@link Clock} that starts at system boot, not counting time spent
* in deep sleep.

View File

@@ -150,7 +150,7 @@ public class JobSchedulerService extends com.android.server.SystemService
@VisibleForTesting
public static Clock sSystemClock = Clock.systemUTC();
@VisibleForTesting
public static Clock sUptimeMillisClock = SystemClock.uptimeMillisClock();
public static Clock sUptimeMillisClock = SystemClock.uptimeClock();
@VisibleForTesting
public static Clock sElapsedRealtimeClock = SystemClock.elapsedRealtimeClock();

View File

@@ -109,7 +109,7 @@ public class ConnectivityControllerTest {
JobSchedulerService.sSystemClock =
Clock.fixed(Clock.systemUTC().instant(), ZoneOffset.UTC);
JobSchedulerService.sUptimeMillisClock =
Clock.fixed(SystemClock.uptimeMillisClock().instant(), ZoneOffset.UTC);
Clock.fixed(SystemClock.uptimeClock().instant(), ZoneOffset.UTC);
JobSchedulerService.sElapsedRealtimeClock =
Clock.fixed(SystemClock.elapsedRealtimeClock().instant(), ZoneOffset.UTC);

View File

@@ -82,7 +82,7 @@ public class JobStatusTest {
JobSchedulerService.sSystemClock =
Clock.fixed(Clock.systemUTC().instant(), ZoneOffset.UTC);
JobSchedulerService.sUptimeMillisClock =
Clock.fixed(SystemClock.uptimeMillisClock().instant(), ZoneOffset.UTC);
Clock.fixed(SystemClock.uptimeClock().instant(), ZoneOffset.UTC);
JobSchedulerService.sElapsedRealtimeClock =
Clock.fixed(SystemClock.elapsedRealtimeClock().instant(), ZoneOffset.UTC);
}

View File

@@ -170,7 +170,7 @@ public class QuotaControllerTest {
getAdvancedClock(Clock.fixed(Clock.systemUTC().instant(), ZoneOffset.UTC),
24 * HOUR_IN_MILLIS);
JobSchedulerService.sUptimeMillisClock = getAdvancedClock(
Clock.fixed(SystemClock.uptimeMillisClock().instant(), ZoneOffset.UTC),
Clock.fixed(SystemClock.uptimeClock().instant(), ZoneOffset.UTC),
24 * HOUR_IN_MILLIS);
JobSchedulerService.sElapsedRealtimeClock = getAdvancedClock(
Clock.fixed(SystemClock.elapsedRealtimeClock().instant(), ZoneOffset.UTC),

View File

@@ -117,7 +117,7 @@ public class StateControllerTest {
JobSchedulerService.sSystemClock =
Clock.fixed(Clock.systemUTC().instant(), ZoneOffset.UTC);
JobSchedulerService.sUptimeMillisClock =
Clock.fixed(SystemClock.uptimeMillisClock().instant(), ZoneOffset.UTC);
Clock.fixed(SystemClock.uptimeClock().instant(), ZoneOffset.UTC);
JobSchedulerService.sElapsedRealtimeClock =
Clock.fixed(SystemClock.elapsedRealtimeClock().instant(), ZoneOffset.UTC);

View File

@@ -105,7 +105,7 @@ public class TimeControllerTest {
JobSchedulerService.sSystemClock =
Clock.fixed(Clock.systemUTC().instant(), ZoneOffset.UTC);
JobSchedulerService.sUptimeMillisClock =
Clock.fixed(SystemClock.uptimeMillisClock().instant(), ZoneOffset.UTC);
Clock.fixed(SystemClock.uptimeClock().instant(), ZoneOffset.UTC);
JobSchedulerService.sElapsedRealtimeClock =
Clock.fixed(SystemClock.elapsedRealtimeClock().instant(), ZoneOffset.UTC);

View File

@@ -85,7 +85,7 @@ public class JobStoreTest {
JobSchedulerService.sSystemClock =
Clock.fixed(Clock.systemUTC().instant(), ZoneOffset.UTC);
JobSchedulerService.sUptimeMillisClock =
Clock.fixed(SystemClock.uptimeMillisClock().instant(), ZoneOffset.UTC);
Clock.fixed(SystemClock.uptimeClock().instant(), ZoneOffset.UTC);
JobSchedulerService.sElapsedRealtimeClock =
Clock.fixed(SystemClock.elapsedRealtimeClock().instant(), ZoneOffset.UTC);
}