summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/InputMethodService.java
diff options
context:
space:
mode:
authorMartijn Coenen <maco@google.com>2021-11-10 16:21:25 +0100
committerMartijn Coenen <maco@google.com>2021-11-17 13:59:54 +0000
commite57620446bfc0c2bdca5e07a0c39f647e07ca18d (patch)
treec2640712111cb139b25427d0716be2cab9f8ef87 /core/java/android/inputmethodservice/InputMethodService.java
parenteeb9d427ce24d8785356c66645a7d32451e1d677 (diff)
Have getVolumeList() take a userId instead of a UID.
getVolumeList() previously accepted a uid and a packagename. This approach has a few issues: 1) The uid wasn't actually checked in the implementation to match the calling UID, nor was the package name checked against the UID in all cases. 2) The implementation assumed that the UID also specificies the userId that we want to get the volumes for. This was historically true, but with the new app cloning implementation, MediaProvider running in user 0 might ask for volumes in the clone user. To fix this, explicitly pass in the userId that we're requesting volumes for, and verify that the calling UID and the passed in package name match. Bug: 206624903 Test: atest packages/providers/MediaProvider Change-Id: Idffbb4ae7740c1b9725af0974948dc55bf1f1fde
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
0 files changed, 0 insertions, 0 deletions