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

Commit d9dc7dd2 authored by Michael Wachenschwanz's avatar Michael Wachenschwanz
Browse files

Switch activity state pushing to ConcurrentLinkedQueue

Activity state changes are time sensitive and updating
ProcessStateController too slowly can cause unexpected behavior.
Migrating the activity state pushing from being posted on a Handler
thread to a ConcurrentLinkedQueue enables ProcessStateController to
oppurtunistically handle the state changes without waiting for the
associated update.

Example of bad behavior due to slowness:
The CameraEvictionTest#testCamera2AccessCallbackInSplitMode test fails
because it has some fairly tight expectation about CameraAccessPriority
timeliness (which is based off of ProcState and OomScore changes)

Flag: com.android.server.am.push_activity_state_to_oomadjuster
Bug: 401350380
Test: atest MockingOomAdjusterTests
Test: atest ProcessStateControllerTest
Test: atest android.hardware.multiprocess.camera.cts.CameraEvictionTest#testCamera2AccessCallbackInSplitMode

Change-Id: Ia50a98fb5c51b386f199f5f689bf8a3fe155e607
parent 26e2563a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment