[PM] Use callingUid instead of binder#getCallingUid for uninstall
When the system checks whether the caller can uninstall an app silently, we should use callingUid to instead of the callingUid from the Binder. Because the archive caller calls uninstall method in the handler of PackageManagerService. The callingUid from the Binder is system server at this time. Flag: EXEMPT bugfix Bug: 352325525 Test: atest UninstallationViaIntentActionDeleteTest Test: atest UninstallationViaIntentActionUninstallPackageTest Test: atest UninstallationViaPackageInstallerApiTest Test: atest UninstallTest Test: atest PackageInstallerArchiveTest Test: atest ArchiveTest Test: manual. call requestArchive in a system app that is granted DELETE_PACKAGES. The user confirm dialog pops up. Test: manual. Settings can restore and archive apps. Change-Id: I3e95fa7690a69ca379fa4c108012ecfec841a9c8
Loading
Please register or sign in to comment