Merge "[pm] fix potential NPE in system server" into udc-dev

This commit is contained in:
Song Chun Fan
2023-06-02 20:20:53 +00:00
committed by Android (Google) Code Review
2 changed files with 1 additions and 7 deletions

View File

@@ -2145,7 +2145,7 @@ final class InstallPackageHelper {
final String pkgName = pkg.getPackageName();
final int[] installedForUsers = installRequest.getOriginUsers();
final int installReason = installRequest.getInstallReason();
final String installerPackageName = installRequest.getSourceInstallerPackageName();
final String installerPackageName = installRequest.getInstallerPackageName();
if (DEBUG_INSTALL) Slog.d(TAG, "New package installed in " + pkg.getPath());
synchronized (mPm.mLock) {

View File

@@ -366,12 +366,6 @@ final class InstallRequest {
public String getApexModuleName() {
return mApexModuleName;
}
@Nullable
public String getSourceInstallerPackageName() {
return mInstallArgs.mInstallSource.mInstallerPackageName;
}
public boolean isRollback() {
return mInstallArgs != null
&& mInstallArgs.mInstallReason == PackageManager.INSTALL_REASON_ROLLBACK;