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
This commit is contained in:
Jack Yu
2021-10-14 16:45:02 +08:00
parent c39a7ac618
commit fd53b477cd
2 changed files with 5 additions and 3 deletions

View File

@@ -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;

View File

@@ -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());