New UX for the NFC default payment settings

Re-design the UX.

Bug: 202367033
Test: maunal
      make RunSettingsRoboTests ROBOTEST_FILTER=NfcForegroundPreferenceControllerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=PaymentSettingsTest
Change-Id: I4c05ac4a1974645c76a37900d64aa8e1a491bca1
This commit is contained in:
Jack Yu
2022-01-04 17:40:55 +08:00
parent 8662e4642e
commit 9de30f08e6
11 changed files with 540 additions and 79 deletions

View File

@@ -20,6 +20,7 @@ import android.app.ActivityManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.PackageManager;
import android.graphics.drawable.Drawable;
import android.nfc.NfcAdapter;
import android.nfc.cardemulation.ApduServiceInfo;
import android.nfc.cardemulation.CardEmulation;
@@ -50,6 +51,7 @@ public class PaymentBackend {
public ComponentName componentName;
public ComponentName settingsComponent;
public UserHandle userHandle;
public Drawable icon;
}
/**
@@ -131,6 +133,7 @@ public class PaymentBackend {
appInfo.settingsComponent = null;
}
appInfo.description = service.getDescription();
appInfo.icon = pm.getUserBadgedIcon(service.loadIcon(pm), appInfo.userHandle);
appInfos.add(appInfo);
}