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

Commit 70cce57b authored by Jakob Schneider's avatar Jakob Schneider Committed by Android (Google) Code Review
Browse files

Merge "Fix a NPE in PIA if the caller has no requested permissions." into main

parents 84ad5d8e f25a6830
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ import android.os.Bundle;
import android.os.Process;
import android.util.Log;

import androidx.annotation.Nullable;
import androidx.annotation.NonNull;

import java.io.IOException;
import java.util.Arrays;
@@ -105,7 +105,7 @@ public class UnarchiveActivity extends Activity {
        }
    }

    @Nullable
    @NonNull
    private String[] getRequestedPermissions(String callingPackage) {
        String[] requestedPermissions = null;
        try {
@@ -115,7 +115,7 @@ public class UnarchiveActivity extends Activity {
            // Should be unreachable because we've just fetched the packageName above.
            Log.e(TAG, "Package not found for " + callingPackage);
        }
        return requestedPermissions;
        return requestedPermissions == null ? new String[]{} : requestedPermissions;
    }

    void startUnarchive() {