Taking userId into account for fixupAppDir().
We previously used the getPackage(packageName) API, which doesn't take the userId into account; this could result in passing in the wrong uid into fixupAppDir(), because fixupAppDir() validates the passed in uid matches with the path. Instead, use PackageManager.getPackageUidAsUser() to match the userId that was passed in through the path. Note that we don't care about paths which don't have a userId embedded, since those are public volumes, for which we don't need this API anyway (since public volumes don't have UID/GID etc.) Bug: 157271022 Test: pm create-user aap ; log in to user, try selecting ringtones Change-Id: Id8731cb18c16c4742d232048f9093fbd57323159
Loading
Please register or sign in to comment