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

Commit fd53b477 authored by Jack Yu's avatar Jack Yu
Browse files

NFC-F support in work profile

Add one function to get NfcF service based on user id.

Bug: 202367033
Test: mauanl tests
Change-Id: I15f3ef84198b0af40d33fd16f457fb9b6cb7ca32
parent c39a7ac6
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ import android.content.pm.PackageManager;
import android.nfc.INfcFCardEmulation;
import android.nfc.NfcAdapter;
import android.os.RemoteException;
import android.os.UserHandle;
import android.util.Log;

import java.util.HashMap;
+5 −2
Original line number Diff line number Diff line
@@ -237,6 +237,7 @@ public final class NfcFServiceInfo implements Parcelable {
    public String toString() {
        StringBuilder out = new StringBuilder("NfcFService: ");
        out.append(getComponent());
        out.append(", UID: " + mUid);
        out.append(", description: " + mDescription);
        out.append(", System Code: " + mSystemCode);
        if (mDynamicSystemCode != null) {
@@ -257,6 +258,7 @@ public final class NfcFServiceInfo implements Parcelable {
        NfcFServiceInfo thatService = (NfcFServiceInfo) o;

        if (!thatService.getComponent().equals(this.getComponent())) return false;
        if (thatService.getUid() != this.getUid()) return false;
        if (!thatService.mSystemCode.equalsIgnoreCase(this.mSystemCode)) return false;
        if (!thatService.mNfcid2.equalsIgnoreCase(this.mNfcid2)) return false;
        if (!thatService.mT3tPmm.equalsIgnoreCase(this.mT3tPmm)) return false;
@@ -321,8 +323,9 @@ public final class NfcFServiceInfo implements Parcelable {
    };

    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        pw.println("    " + getComponent() +
                " (Description: " + getDescription() + ")");
        pw.println("    " + getComponent()
                + " (Description: " + getDescription() + ")"
                + " (UID: " + getUid() + ")");
        pw.println("    System Code: " + getSystemCode());
        pw.println("    NFCID2: " + getNfcid2());
        pw.println("    T3tPmm: " + getT3tPmm());