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

Commit 0a3c9cd4 authored by Ian Rogers's avatar Ian Rogers Committed by Android (Google) Code Review
Browse files

Merge "Fix bad locking."

parents 5d06b41e a5feec52
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ public class FileOperationService extends Service implements Job.Listener {
    private NotificationManager mNotificationManager;

    @GuardedBy("mRunning")
    private Map<String, JobRecord> mRunning = new HashMap<>();
    private final Map<String, JobRecord> mRunning = new HashMap<>();

    private int mLastServiceId;

@@ -176,8 +176,10 @@ public class FileOperationService extends Service implements Job.Listener {
        if (DEBUG) Log.d(
                TAG, "Scheduling job " + job.id + " to run in " + delay + " milliseconds.");
        ScheduledFuture<?> future = executor.schedule(job, delay, TimeUnit.MILLISECONDS);
        synchronized (mRunning) {
            mRunning.put(jobId, new JobRecord(job, future));
        }
    }

    /**
     * Cancels the operation corresponding to job id, identified in "EXTRA_JOB_ID".