Skip to content

Commit

Permalink
#415 methods which interacts with idle timer are now synchronized
Browse files Browse the repository at this point in the history
  • Loading branch information
gotev committed Mar 21, 2019
1 parent fd2bafd commit 3a81d2c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,15 +288,15 @@ public int onStartCommand(Intent intent, int flags, int startId) {
return START_STICKY;
}

private void clearIdleTimer() {
synchronized private void clearIdleTimer() {
if (idleTimer != null) {
Logger.info(TAG, "Clearing idle timer");
idleTimer.cancel();
idleTimer = null;
}
}

private int shutdownIfThereArentAnyActiveTasks() {
synchronized private int shutdownIfThereArentAnyActiveTasks() {
if (uploadTasksMap.isEmpty()) {
clearIdleTimer();

Expand Down

0 comments on commit 3a81d2c

Please sign in to comment.