Add an additional lock in the ActivityManagerService

This CL breaks down the ProcessRecord by the characteristic of
the fields in it. It's a preparation for future CLs, to let
the various components in the ActivityManagerService to access
its own correlated data class only.

Also introduces an additional semi-global lock in the
ActivityManagerService as an effort to reduce the lock contentions.
Some of the data fields now requires either the legacy global lock
or this new lock to read from it, and both of the lock to write to it.

Bug: 162450085
Test: atest CtsAppTestCases
Test: atest FrameworksMockingServicesTests
Test: atest FrameworksServicesTests
Change-Id: I2718dfb8cd5c1852e81280ed11676c567f76d0a2
2 files changed
tree: 9633cb010c5332820cf18d0a6bf08803de0e72d8
  1. java/