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

Commit 0683662d authored by Kweku Adams's avatar Kweku Adams Committed by Android (Google) Code Review
Browse files

Merge "Improve scheduling reliability." into main

parents 363f1d68 04cd35e4
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -36,7 +36,8 @@ import com.android.server.LocalServices;
 * will be killed if association/role are revoked.
 */
public class InactiveAssociationsRemovalService extends JobService {
    private static final int JOB_ID = InactiveAssociationsRemovalService.class.hashCode();
    private static final String JOB_NAMESPACE = "companion";
    private static final int JOB_ID = 1;
    private static final long ONE_DAY_INTERVAL = DAYS.toMillis(1);

    @Override
@@ -61,7 +62,8 @@ public class InactiveAssociationsRemovalService extends JobService {

    static void schedule(Context context) {
        Slog.i(TAG, "Scheduling the Association Removal job");
        final JobScheduler jobScheduler = context.getSystemService(JobScheduler.class);
        final JobScheduler jobScheduler =
                context.getSystemService(JobScheduler.class).forNamespace(JOB_NAMESPACE);
        final JobInfo job = new JobInfo.Builder(JOB_ID,
                new ComponentName(context, InactiveAssociationsRemovalService.class))
                .setRequiresCharging(true)
@@ -71,4 +73,3 @@ public class InactiveAssociationsRemovalService extends JobService {
        jobScheduler.schedule(job);
    }
}