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

Skip to content
Commit b557f7b3 authored by Austin Borger's avatar Austin Borger
Browse files

UidObserver / Camera: Track the OOM adj of a uid via UidObserver.

Previously, onUidProcAdjChanged merely signaled that the OOM adj of a
uid changed, but did not provide the actual OOM adj score. Having this
information allows the camera service to cut out redundant calls to
onCameraAccessPrioritiesChanged and avoid overwhelming apps.

The number of calls to onCameraAccessPrioritiesChanged is reduced by
only signaling when it's likely the uid owning a camera would lose
access to it if another uid tried to open that camera. This is opposed
to the status quo, which signals every time a watched uid changes its
OOM adj, which is highly inefficient.

Bug: 274486653
Test: -- on physical device:
      -- testCamera2AccessCallbackInSplitMode x10
      -- ActivityManagerServiceTest
      -- ActivityManagerProcessStateTest
      -- ActivityManagerFgsBgStartTest
      -- UidObserverControllerTest
      -- Alternate focus in split screen between Camera2 + GCA x20
Change-Id: Ia8d36e7a49156d537ae4da3540a1046e3200d930
parent a8827e9c
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