commit | c1b8026b80af6de44f45c8fc184a3c556ece5004 | [log] [tgz] |
---|---|---|
author | ryanlwlin <ryanlwlin@google.com> | Mon May 31 17:04:11 2021 +0800 |
committer | ryanlwlin <ryanlwlin@google.com> | Thu Jun 03 16:21:23 2021 +0800 |
tree | 0d7a91bcdbf90f9c60a6625e7f53e7c76f506f8c | |
parent | 6533070526d1c14d1547c9f570574ee862723789 [diff] |
Fix using caller-aware methods after clearCallingIdentity() When we check Accessibility access, we would like to throw the security exception if the caller is not from system server. Unfortuantely we get the calling pid after clearCallingIdentity. It ends up the result is always own pid. To fix it, we get the calling pid before clearCallingIdentity. Bug: 189454345 Test: manually test Change-Id: I1399998eac70c973bc27da431a8eee3b1f804453