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

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

Revert "Fix Unsafe Parcel Usage"

This reverts commit 9582b99f.

Reason for revert: b/442807306 test failure

Bug: 439097174
Change-Id: I81034f9db873589342f4cbc189f48bed001dfbb3
parent 9582b99f
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);