Several managers keep an "int mUserId" field which is assigned from
Context.getUserId(), so Binder calls referencing that field are okay.
Also shift to borrowing the "flavor" logic for detecting userId
parameters consistently.
Bug: 115654727, 159626156
Test: atest error_prone_android_framework_test
Change-Id: I9841fdf16f34c08b113e689e74b94f1ede839e2c
Many system internals pass around PID, UID and user ID arguments as a
single weakly-typed "int" value, which developers can accidentally
cross in method argument lists, resulting in obscure bugs.
Bug: 155703208
Test: atest error_prone_android_framework_test
Change-Id: I5e4d9b5a533071f94d82dff17faff5d52ae54564
We recently started writing custom Error Prone checkers, but it's
been painfully slow to develop against the giant source tree, so
this change adds tests to verify existing behavior and to enable TDD
for future checkers.
Bug: 155703208
Test: atest error_prone_android_framework_test
Change-Id: I7ea7484db5d19e812354703e561a499077329098