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

Commit 409b9aeb authored by Li Li's avatar Li Li Committed by Android (Google) Code Review
Browse files

Merge "Fix lock contention in CAO.binderError handler" into main

parents 7c724434 f92de2f6
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -2256,10 +2256,9 @@ public final class CachedAppOptimizer {
                        }
                    }

                    // Check binder errors to frozen processes with a local freezer lock
                    synchronized (mFreezerLock) {
                        binderErrorLocked(pids);
                    }
                    // Check binder errors to frozen processes
                    // Freezer lock is not required as we don't perform (un)freeze operations here
                    binderErrorInternal(pids);
                } break;
                default:
                    return;
@@ -2618,7 +2617,7 @@ public final class CachedAppOptimizer {
        mFreezeHandler.sendEmptyMessage(BINDER_ERROR_MSG);
    }

    private void binderErrorLocked(IntArray pids) {
    private void binderErrorInternal(IntArray pids) {
        // PIDs that run out of async binder buffer when being frozen
        ArraySet<Integer> pidsAsync = (mFreezerBinderAsyncThreshold < 0) ? null : new ArraySet<>();