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

Commit 789c8a38 authored by louis_chang's avatar louis_chang Committed by Brint E. Kriebel
Browse files

[ActivityManager] Bring up Service if not schedule to restart

Symptom:
In some scenario, the Service process will be killed due to
"remove task" while updating oomadj. And it may results to
DeadObjectException while notify client to schedule unbind
Service in removeConnectionLocked().

In that case, the Service was failed to scheduled restart
(because the Service was removed from app.services in
serviceDoneExecutingLocked() since finishing=true).

The Service will unable to bring up afterward if
restartDelay > 0, which the Service has been scheduled to
restart before.

Solution:
Bring up Service if it was not in the restarting list

Change-Id: I28b023f0ce36e496bd6b0c69fe71121a083be83b
(cherry picked from commit 4fd268b8)
Ticket: CYNGNOS-751
parent f3de2dee
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1331,7 +1331,7 @@ public final class ActiveServices {
            return null;
        }

        if (!whileRestarting && r.restartDelay > 0) {
        if (!whileRestarting && r.restartDelay > 0 && mRestartingServices.contains(r)) {
            // If waiting for a restart, then do nothing.
            return null;
        }