Reduce calls to updateOomAdj() during unbind

When unbinding a service, avoid repeatedly calling
updateOomAdj() as doing it one time should be
sufficient.

Running the below CTS test repeatedly with and
without the optimization resulted in CPU thread
time changing from 1800ms to 1450ms. Test includes
a mix of service bindings and activity launches,
etc.

Bug: 130684057
Test: atest CtsAppTestCases:ActivityManagerProcessStateTest
Change-Id: Iadb3743ac1d8b506a22baded279f2b7db7c60aaf
1 file changed