Exit Doze for tests.
Exit device idle state so that job tests aren't affected by the state. Bug: 274150342 Test: atest --rerun-until-failure 50 com.android.server.job.BiasSchedulingTest Change-Id: I6935dafd154c72e7fa74b60f9c669d22e0f360b8
This commit is contained in:
@@ -21,6 +21,7 @@ import android.app.job.JobInfo;
|
||||
import android.app.job.JobScheduler;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.os.DeviceIdleManager;
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
import com.android.server.job.MockBiasJobService.TestEnvironment;
|
||||
@@ -48,6 +49,7 @@ public class BiasSchedulingTest extends AndroidTestCase {
|
||||
sJobServiceComponent = new ComponentName(getContext(), MockBiasJobService.class);
|
||||
mJobScheduler = (JobScheduler) getContext().getSystemService(Context.JOB_SCHEDULER_SERVICE);
|
||||
mJobScheduler.cancelAll();
|
||||
getContext().getSystemService(DeviceIdleManager.class).endIdle("BiasSchedulingTest");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user