summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2024-05-08 19:09:27 +0000
committerRoshan Pius <rpius@google.com>2024-05-08 22:13:02 +0000
commita087ec32bda61ec50b4af89bf53a3bc845981477 (patch)
tree69168419e8d2c792a80920c26f0f5c01b5b2ecc0
parent86b9f6441afa9c03ccf777f92e6886fb3ffa1187 (diff)
downloadbase-a087ec32bda61ec50b4af89bf53a3bc845981477.tar.gz
nfc(api): Add user id in setServiceEnabledForCategoryOther
Bug: 232711049 Change-Id: I3888fdbc45d283d6444e302bb44b098e3c4f5c59 Test: Compiles
-rw-r--r--nfc/java/android/nfc/cardemulation/CardEmulation.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/nfc/java/android/nfc/cardemulation/CardEmulation.java b/nfc/java/android/nfc/cardemulation/CardEmulation.java
index ad86d70db967..4bae1188e0df 100644
--- a/nfc/java/android/nfc/cardemulation/CardEmulation.java
+++ b/nfc/java/android/nfc/cardemulation/CardEmulation.java
@@ -970,16 +970,16 @@ public final class CardEmulation {
*
* @param service The ComponentName of the service
* @param status true to enable, false to disable
+ * @param userId the user handle of the user whose information is being requested.
* @return set service for the category and true if service is already set return false.
*
* @hide
*/
- public boolean setServiceEnabledForCategoryOther(ComponentName service, boolean status) {
+ public boolean setServiceEnabledForCategoryOther(ComponentName service, boolean status,
+ int userId) {
if (service == null) {
throw new NullPointerException("activity or service or category is null");
}
- int userId = mContext.getUser().getIdentifier();
-
try {
return sService.setServiceEnabledForCategoryOther(userId, service, status);
} catch (RemoteException e) {