diff --git a/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java b/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java index 18d3f3d0e8056..1ce957d1e7680 100644 --- a/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java +++ b/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java @@ -489,6 +489,7 @@ public class AppStandbyControllerTests { @Before public void setUp() throws Exception { + LocalServices.removeServiceForTest(UsageStatsManagerInternal.class); LocalServices.addService( UsageStatsManagerInternal.class, mock(UsageStatsManagerInternal.class)); MyContextWrapper myContext = new MyContextWrapper(InstrumentationRegistry.getContext());