Remove service before adding test mock.

Bug: 223101827
Change-Id: I45788f4ca7add353135ff3af73de2b5f4997ff14
Test: N/A
This commit is contained in:
Kweku Adams
2022-03-09 15:59:34 +00:00
parent 0eaf43c719
commit 8d9b93cb7d

View File

@@ -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());