From c39a7ac61806bd703421a76fca03febc0f804cf4 Mon Sep 17 00:00:00 2001 From: Jack Yu Date: Wed, 13 Oct 2021 17:09:01 +0800 Subject: [PATCH] NFC support in work profile Add new constant userId extra for ACTION_CHANGE_DEFAULT. Bug: 202367033 Test: mauanl tests Change-Id: I4ce95f3939a8bb80b77926f111f34d084be8fb3e --- core/api/current.txt | 1 + core/java/android/nfc/cardemulation/CardEmulation.java | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/core/api/current.txt b/core/api/current.txt index 131db7320f3f0..d72961085c204 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -27373,6 +27373,7 @@ package android.nfc.cardemulation { field public static final String CATEGORY_PAYMENT = "payment"; field public static final String EXTRA_CATEGORY = "category"; field public static final String EXTRA_SERVICE_COMPONENT = "component"; + field public static final String EXTRA_USERID = "android.nfc.cardemulation.extra.USERID"; field public static final int SELECTION_MODE_ALWAYS_ASK = 1; // 0x1 field public static final int SELECTION_MODE_ASK_IF_CONFLICT = 2; // 0x2 field public static final int SELECTION_MODE_PREFER_DEFAULT = 0; // 0x0 diff --git a/core/java/android/nfc/cardemulation/CardEmulation.java b/core/java/android/nfc/cardemulation/CardEmulation.java index 9a780c8a29359..0a9fe90f25249 100644 --- a/core/java/android/nfc/cardemulation/CardEmulation.java +++ b/core/java/android/nfc/cardemulation/CardEmulation.java @@ -83,6 +83,13 @@ public final class CardEmulation { */ public static final String EXTRA_SERVICE_COMPONENT = "component"; + /** + * The caller userId extra for {@link #ACTION_CHANGE_DEFAULT}. + * + * @see #ACTION_CHANGE_DEFAULT + */ + public static final String EXTRA_USERID = "android.nfc.cardemulation.extra.USERID"; + /** * Category used for NFC payment services. */