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

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

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
parent e87bf3f9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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