Skip OomAdjuster update in bindService for self-bindings
...or calling from the cached state.
Meanwhile, for bindings from a less important process to a more important
process, no longer bump its oom adj scores to 0 during the Service#onCreate()
and the Service#onBind().
Also freezing the caller immediately if it's trying to make self-bindings
from the cached state.
And, apply the same strategy to the content provider acquire/releases.
Bug: 318717054
Bug: 318774428
Test: perfetto
Test: atest FrameworksMockingServicesTests:ServiceBindingOomAdjPolicyTest
Test: atest CtsAppTestCases
Change-Id: I3bc9b8b030fdbd52f9b990f8e57697e0d50baac1
16 files changed