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

Commit 1b8b3aa2 authored by Christopher Tate's avatar Christopher Tate
Browse files

Fix BackgroundDexOptService scheduled job

1) use the right package name in the ComponentName
2) use a unique-within-package job ID

Also put the full component name in dumpsys, not just the package name

Change-Id: Icf6edabf45573ba72a1adf86b6f83baba57fc593
parent 85ef6ff6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -203,7 +203,8 @@ public class JobStatus {
    @Override
    public String toString() {
        return String.valueOf(hashCode()).substring(0, 3) + ".."
                + ":[" + job.getService().getPackageName() + ",jId=" + job.getId()
                + ":[" + job.getService()
                + ",jId=" + job.getId()
                + ",R=(" + earliestRunTimeElapsedMillis + "," + latestRunTimeElapsedMillis + ")"
                + ",N=" + job.getNetworkCapabilities() + ",C=" + job.isRequireCharging()
                + ",I=" + job.isRequireDeviceIdle() + ",F=" + numFailures
+2 −2
Original line number Diff line number Diff line
@@ -34,9 +34,9 @@ import java.util.concurrent.atomic.AtomicBoolean;
public class BackgroundDexOptService extends JobService {
    static final String TAG = "BackgroundDexOptService";

    static final int BACKGROUND_DEXOPT_JOB = 808;
    static final int BACKGROUND_DEXOPT_JOB = 800;
    private static ComponentName sDexoptServiceName = new ComponentName(
            BackgroundDexOptService.class.getPackage().getName(),
            "android",
            BackgroundDexOptService.class.getName());

    final AtomicBoolean mIdleTime = new AtomicBoolean(false);