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

Commit a33f1a2f authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Fix issue #62524613: Background limitation is not working as expected...

...for most background services.

Whoops, was only stopping the first service it found!

Test: bit CtsAppTestCases:ActivityManagerProcessStateTest
Change-Id: I42af2872afed8b49fab0f53eff36b62e55d23409
parent d27d5d9e
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -622,6 +622,7 @@ public final class ActiveServices {
                            != ActivityManager.APP_START_MODE_NORMAL) {
                        if (stopping == null) {
                            stopping = new ArrayList<>();
                        }
                        String compName = service.name.flattenToShortString();
                        EventLogTags.writeAmStopIdleService(service.appInfo.uid, compName);
                        StringBuilder sb = new StringBuilder(64);
@@ -637,7 +638,6 @@ public final class ActiveServices {
                    }
                }
            }
            }
            if (stopping != null) {
                for (int i=stopping.size()-1; i>=0; i--) {
                    ServiceRecord service = stopping.get(i);