Merge "Remove service before adding test mock." into tm-dev am: 279ce138aa

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17140808

Change-Id: I9b1dc79b3e3652ec1c330ae3f2bdbaac557e3bc2
This commit is contained in:
Kweku Adams
2022-03-09 18:46:46 +00:00
committed by Automerger Merge Worker

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