Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3bc95e6 authored by Kweku Adams's avatar Kweku Adams
Browse files

Fix JobSchedulerServiceTest.

JobScheduler expects the system gallery package to be non-null, so we
have to make sure the test context provides a non null value.

Bug: 146453470
Test: atest FrameworksMockingServicesTests:JobSchedulerServiceTest
Change-Id: Ib84567b006a2f57d17d767e0c08fd542576f979d
parent 0a7ced1d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -107,6 +107,7 @@ public class JobSchedulerServiceTest {
                .when(() -> LocalServices.getService(AppStandbyInternal.class));
        doReturn(mock(UsageStatsManagerInternal.class))
                .when(() -> LocalServices.getService(UsageStatsManagerInternal.class));
        when(mContext.getString(anyInt())).thenReturn("some_test_string");
        // Called in BackgroundJobsController constructor.
        doReturn(mock(AppStateTracker.class))
                .when(() -> LocalServices.getService(AppStateTracker.class));