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

Commit 679ad8e0 authored by Jason Monk's avatar Jason Monk Committed by android-build-merger
Browse files

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

am: 15700cb7

Change-Id: If34872eb4ddb4b51f4518834aac92a0ef64f163e
parents d27f2a4d 15700cb7
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;
    }