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

Commit 8879a43f authored by Achim Thesmann's avatar Achim Thesmann Committed by Android (Google) Code Review
Browse files

Merge "Revert "Fix Unsafe Parcel Usage"" into main

parents 717ba57d 7af38321
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ import android.nfc.NdefMessage;
import android.nfc.NdefRecord;
import android.nfc.NfcAdapter;
import android.os.Bundle;
import android.os.Parcelable;
import android.os.PersistableBundle;
import android.util.Log;

@@ -214,14 +215,14 @@ final class ProvisioningIntentHelper {
     * Returns the first {@link NdefRecord} found with a recognized MIME-type
     */
    private static NdefRecord getFirstNdefRecord(Intent nfcIntent) {
        NdefMessage[] ndefMessages = nfcIntent.getParcelableArrayExtra(EXTRA_NDEF_MESSAGES,
                NdefMessage.class);
        Parcelable[] ndefMessages = nfcIntent.getParcelableArrayExtra(EXTRA_NDEF_MESSAGES);
        if (ndefMessages == null) {
            Log.i(TAG, "No EXTRA_NDEF_MESSAGES from nfcIntent");
            return null;
        }

        for (NdefMessage msg : ndefMessages) {
        for (Parcelable rawMsg : ndefMessages) {
            NdefMessage msg = (NdefMessage) rawMsg;
            for (NdefRecord record : msg.getRecords()) {
                String mimeType = new String(record.getType(), UTF_8);