Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34447ac7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "[Bugfix]Fix NPE for PackageInstallerSession" into main am: 958c0226

parents 73f677a8 958c0226
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -5144,7 +5144,9 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
                    "Session " + sessionId + " is a parent of multi-package session and "
                            + "requestUserPreapproval on the parent session isn't supported.");
        }

        if (statusReceiver == null) {
            throw new IllegalArgumentException("Status receiver cannot be null.");
        }
        synchronized (mLock) {
            assertPreparedAndNotSealedLocked("request of session " + sessionId);
            mPreapprovalDetails = details;
@@ -5497,6 +5499,10 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
     */
    private static void sendOnUserActionRequired(Context context, IntentSender target,
            int sessionId, Intent intent) {
        if (target == null) {
            Slog.e(TAG, "Missing receiver for pending user action.");
            return;
        }
        final Intent fillIn = new Intent();
        fillIn.putExtra(PackageInstaller.EXTRA_SESSION_ID, sessionId);
        fillIn.putExtra(PackageInstaller.EXTRA_STATUS, PackageInstaller.STATUS_PENDING_USER_ACTION);