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

Commit 8f535e2a authored by Jing Ji's avatar Jing Ji Committed by Android (Google) Code Review
Browse files

Merge "Add missing lock in reschedulign service restart"

parents 345eb107 a75c9e5a
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -5000,12 +5000,15 @@ public final class ActiveServices {
                // Since we kicked off all its pending restarts, there could be some open slots
                // in the pending restarts list, schedule a check on it. We are posting to the same
                // handler, so by the time of the check, those immediate restarts should be done.
                mAm.mHandler.post(() ->
                mAm.mHandler.post(() -> {
                    final long now = SystemClock.uptimeMillis();
                    synchronized (mAm) {
                        rescheduleServiceRestartIfPossibleLocked(
                                getExtraRestartTimeInBetweenLocked(),
                                mAm.mConstants.SERVICE_MIN_RESTART_TIME_BETWEEN,
                                "other", SystemClock.uptimeMillis())
                );
                                "other", now);
                    }
                });
            }
        }
        return didSomething;