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

Commit d1094773 authored by Steve Kondik's avatar Steve Kondik
Browse files

am: Fix delayed GC merge damage, again

 * Unsure how this bug showed up again, as the previous commit shows it
   removed.  Fixing it again to stop the binder stalls.

Change-Id: I8ddde20771695907fdb71482059d46bd69437498
parent 72624de0
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2717,8 +2717,6 @@ public final class ActivityStackSupervisor implements DisplayListener {

    ActivityRecord findTaskLocked(ActivityRecord r) {
        if (DEBUG_TASKS) Slog.d(TAG, "Looking for task of " + r);
        /* Delay Binder Explicit GC during application launch */
        BinderInternal.modifyDelayedGcParams();
        for (int displayNdx = mActivityDisplays.size() - 1; displayNdx >= 0; --displayNdx) {
            final ArrayList<ActivityStack> stacks = mActivityDisplays.valueAt(displayNdx).mStacks;
            for (int stackNdx = stacks.size() - 1; stackNdx >= 0; --stackNdx) {
@@ -2734,13 +2732,15 @@ public final class ActivityStackSupervisor implements DisplayListener {
                }
                final ActivityRecord ar = stack.findTaskLocked(r);
                if (ar != null) {
                    BinderInternal.modifyDelayedGcParams();
                    return ar;
                }
            }
        }
        mPm.cpuBoost(2000 * 1000);

        /* Delay Binder Explicit GC during application launch */
        BinderInternal.modifyDelayedGcParams();

        if (DEBUG_TASKS) Slog.d(TAG, "No task found");
        return null;
    }