Look up callers' UIDs when wake locks are acquired.

Update PowerManager::acquireWakeLock() to get the calling
process's actual UID instead of just storing -1. (The UID
isn't used for anything, though.)

Also do some related refactoring that came up while adding
tests: to avoid duplicated code, make PowerManagerStub use
WakeLockManagerStub instead of recording wake lock requests
itself.

Bug: 24988639
Change-Id: If2d2d2935052ab268f6b21dd72a7b1f02a66d799
10 files changed