diff options
| author | Lee Shombert <shombert@google.com> | 2020-05-21 09:16:27 -0700 |
|---|---|---|
| committer | Lee Shombert <shombert@google.com> | 2020-06-08 00:23:46 +0000 |
| commit | c1dad7f2d975c5cc245f524f1b97edded2a8a42a (patch) | |
| tree | 4959b8405af16efe890f4ca18e8896f51d838ae5 /opengl/java/android/opengl/Material.java | |
| parent | 44aeb8e7f423003a4ee98db709ba670306785319 (diff) | |
Update ContentProvider counters outside AMS lock
Bug: 157136568
ContentProviderConnection has a set of reference counts that are mostly
updated within blocks guarded by the ActivityManagerService (AMS) lock.
The exception is refContentProvider(), which is using the AMS lock
solely to guard the reference count updates. This change makes ref
count updates atomic under control of the local
ContentProviderConnection.
ContentProviderConnection reference counts are now private and must be
modified through accessor methods that enforce coherence. The total
reference count is returned. ActivityManagerService methods always
operate on the total reference count values that result from the
method's increment or decrement operation, as follows:
* A count of 1 means the object has just been created and must be
initialized.
* A count of 0 means the object is no longer used and should be
reclaimed.
Test: A/B comparisons between baseline and the changed image, with the
following atests:
* FrameworksServicesTests:UserSystemPackageInstallerTest
* PtsChreTestCases
* FrameworksServicesTests:UserManagerServiceCreateProfileTest
* FrameworksServicesTests:UserManagerServiceIdRecyclingTest
* FrameworksServicesTests:UserManagerServiceUserInfoTest
* FrameworksServicesTests:UserLifecycleTests
* BluetoothInstrumentationTests
* CtsCalendarProviderTestCases
* CtsContactsProviderTestCases
* CtsProviderTestCases
The change introduced no failures.
Change-Id: I688573ce7aee34d98ec510f432b9eb5cc5929670
Diffstat (limited to 'opengl/java/android/opengl/Material.java')
0 files changed, 0 insertions, 0 deletions
