Clear caller identity in doesPackageHaveCallingUid helper method so it can work across users.

When this helper method is called on a binder thread it checks the caller's permission instead of just using the system service privileges to make the call, resulting in erroneous SecurityExceptions.

Bug: 182832208
Bug: 198860541
Test: CTS/unit tests
Change-Id: I2c71109f2556a47b8e44150565800528496173f5
1 file changed