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

Commit 15700cb7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Protect against multiple starts of device index job" into pi-dev

parents cc31240f 2e76a9ba
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -53,10 +53,12 @@ public class DeviceIndexUpdateJobService extends JobService {
    @Override
    public boolean onStartJob(JobParameters params) {
        if (DEBUG) Log.d(TAG, "onStartJob");
        if (!mRunningJob) {
            mRunningJob = true;
            Thread thread = new Thread(() -> updateIndex(params));
            thread.setPriority(Thread.MIN_PRIORITY);
            thread.start();
        }
        return true;
    }