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: I994bf56d8e1687460149626a3a658851ca9513c4
Loading
Please register or sign in to comment