Allow requested installer package name to be null
Since an installer package name may be null, switch to
TextUtils.equals to allow for this case and to stop
any NullPointerExceptions
Test: adb shell pm install --staged
/system/app/CaptivePortalLogin/CaptivePortalLogin.apk works
Bug: 145575703
Change-Id: Ic30cc4610884657aaa8415dc96107c7cc3647ce9
This commit is contained in:
@@ -494,7 +494,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
|
||||
}
|
||||
// Only apps with INSTALL_PACKAGES are allowed to set an installer that is not the
|
||||
// caller.
|
||||
if (!requestedInstallerPackageName.equals(installerPackageName)) {
|
||||
if (!TextUtils.equals(requestedInstallerPackageName, installerPackageName)) {
|
||||
if (mContext.checkCallingOrSelfPermission(Manifest.permission.INSTALL_PACKAGES)
|
||||
!= PackageManager.PERMISSION_GRANTED) {
|
||||
mAppOps.checkPackage(callingUid, requestedInstallerPackageName);
|
||||
|
||||
Reference in New Issue
Block a user