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

Commit 958c0226 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "[Bugfix]Fix NPE for PackageInstallerSession" into main

parents d2f52153 7bf4b0fe
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);