Merge "Exit Doze for tests." into udc-dev

This commit is contained in:
Kweku Adams
2023-03-23 20:51:14 +00:00
committed by Android (Google) Code Review

View File

@@ -21,6 +21,7 @@ import android.app.job.JobInfo;
import android.app.job.JobScheduler; import android.app.job.JobScheduler;
import android.content.ComponentName; import android.content.ComponentName;
import android.content.Context; import android.content.Context;
import android.os.DeviceIdleManager;
import android.test.AndroidTestCase; import android.test.AndroidTestCase;
import com.android.server.job.MockBiasJobService.TestEnvironment; import com.android.server.job.MockBiasJobService.TestEnvironment;
@@ -48,6 +49,7 @@ public class BiasSchedulingTest extends AndroidTestCase {
sJobServiceComponent = new ComponentName(getContext(), MockBiasJobService.class); sJobServiceComponent = new ComponentName(getContext(), MockBiasJobService.class);
mJobScheduler = (JobScheduler) getContext().getSystemService(Context.JOB_SCHEDULER_SERVICE); mJobScheduler = (JobScheduler) getContext().getSystemService(Context.JOB_SCHEDULER_SERVICE);
mJobScheduler.cancelAll(); mJobScheduler.cancelAll();
getContext().getSystemService(DeviceIdleManager.class).endIdle("BiasSchedulingTest");
} }
@Override @Override