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

Commit d68a1647 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

am: 679ad8e0

Change-Id: Ie7e29bc63d5f1f2f57d6a55225e14faf85d64b18
parents 4195870b 679ad8e0
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;
    }