diff options
Diffstat (limited to 'android/nfc/cardemulation/CardEmulation.java')
-rw-r--r-- | android/nfc/cardemulation/CardEmulation.java | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/android/nfc/cardemulation/CardEmulation.java b/android/nfc/cardemulation/CardEmulation.java index 6dd79939..15d02f2e 100644 --- a/android/nfc/cardemulation/CardEmulation.java +++ b/android/nfc/cardemulation/CardEmulation.java @@ -201,7 +201,7 @@ public final class CardEmulation { */ public boolean isDefaultServiceForCategory(ComponentName service, String category) { try { - return sService.isDefaultServiceForCategory(UserHandle.myUserId(), service, category); + return sService.isDefaultServiceForCategory(mContext.getUserId(), service, category); } catch (RemoteException e) { // Try one more time recoverService(); @@ -210,7 +210,7 @@ public final class CardEmulation { return false; } try { - return sService.isDefaultServiceForCategory(UserHandle.myUserId(), service, + return sService.isDefaultServiceForCategory(mContext.getUserId(), service, category); } catch (RemoteException ee) { Log.e(TAG, "Failed to recover CardEmulationService."); @@ -232,7 +232,7 @@ public final class CardEmulation { */ public boolean isDefaultServiceForAid(ComponentName service, String aid) { try { - return sService.isDefaultServiceForAid(UserHandle.myUserId(), service, aid); + return sService.isDefaultServiceForAid(mContext.getUserId(), service, aid); } catch (RemoteException e) { // Try one more time recoverService(); @@ -241,7 +241,7 @@ public final class CardEmulation { return false; } try { - return sService.isDefaultServiceForAid(UserHandle.myUserId(), service, aid); + return sService.isDefaultServiceForAid(mContext.getUserId(), service, aid); } catch (RemoteException ee) { Log.e(TAG, "Failed to reach CardEmulationService."); return false; @@ -326,7 +326,7 @@ public final class CardEmulation { List<String> aids) { AidGroup aidGroup = new AidGroup(aids, category); try { - return sService.registerAidGroupForService(UserHandle.myUserId(), service, aidGroup); + return sService.registerAidGroupForService(mContext.getUserId(), service, aidGroup); } catch (RemoteException e) { // Try one more time recoverService(); @@ -335,7 +335,7 @@ public final class CardEmulation { return false; } try { - return sService.registerAidGroupForService(UserHandle.myUserId(), service, + return sService.registerAidGroupForService(mContext.getUserId(), service, aidGroup); } catch (RemoteException ee) { Log.e(TAG, "Failed to reach CardEmulationService."); @@ -360,7 +360,7 @@ public final class CardEmulation { */ public List<String> getAidsForService(ComponentName service, String category) { try { - AidGroup group = sService.getAidGroupForService(UserHandle.myUserId(), service, + AidGroup group = sService.getAidGroupForService(mContext.getUserId(), service, category); return (group != null ? group.getAids() : null); } catch (RemoteException e) { @@ -370,7 +370,7 @@ public final class CardEmulation { return null; } try { - AidGroup group = sService.getAidGroupForService(UserHandle.myUserId(), service, + AidGroup group = sService.getAidGroupForService(mContext.getUserId(), service, category); return (group != null ? group.getAids() : null); } catch (RemoteException ee) { @@ -397,7 +397,7 @@ public final class CardEmulation { */ public boolean removeAidsForService(ComponentName service, String category) { try { - return sService.removeAidGroupForService(UserHandle.myUserId(), service, category); + return sService.removeAidGroupForService(mContext.getUserId(), service, category); } catch (RemoteException e) { // Try one more time recoverService(); @@ -406,7 +406,7 @@ public final class CardEmulation { return false; } try { - return sService.removeAidGroupForService(UserHandle.myUserId(), service, category); + return sService.removeAidGroupForService(mContext.getUserId(), service, category); } catch (RemoteException ee) { Log.e(TAG, "Failed to reach CardEmulationService."); return false; @@ -537,7 +537,7 @@ public final class CardEmulation { */ public boolean setDefaultServiceForCategory(ComponentName service, String category) { try { - return sService.setDefaultServiceForCategory(UserHandle.myUserId(), service, category); + return sService.setDefaultServiceForCategory(mContext.getUserId(), service, category); } catch (RemoteException e) { // Try one more time recoverService(); @@ -546,7 +546,7 @@ public final class CardEmulation { return false; } try { - return sService.setDefaultServiceForCategory(UserHandle.myUserId(), service, + return sService.setDefaultServiceForCategory(mContext.getUserId(), service, category); } catch (RemoteException ee) { Log.e(TAG, "Failed to reach CardEmulationService."); @@ -560,7 +560,7 @@ public final class CardEmulation { */ public boolean setDefaultForNextTap(ComponentName service) { try { - return sService.setDefaultForNextTap(UserHandle.myUserId(), service); + return sService.setDefaultForNextTap(mContext.getUserId(), service); } catch (RemoteException e) { // Try one more time recoverService(); @@ -569,7 +569,7 @@ public final class CardEmulation { return false; } try { - return sService.setDefaultForNextTap(UserHandle.myUserId(), service); + return sService.setDefaultForNextTap(mContext.getUserId(), service); } catch (RemoteException ee) { Log.e(TAG, "Failed to reach CardEmulationService."); return false; @@ -582,7 +582,7 @@ public final class CardEmulation { */ public List<ApduServiceInfo> getServices(String category) { try { - return sService.getServices(UserHandle.myUserId(), category); + return sService.getServices(mContext.getUserId(), category); } catch (RemoteException e) { // Try one more time recoverService(); @@ -591,7 +591,7 @@ public final class CardEmulation { return null; } try { - return sService.getServices(UserHandle.myUserId(), category); + return sService.getServices(mContext.getUserId(), category); } catch (RemoteException ee) { Log.e(TAG, "Failed to reach CardEmulationService."); return null; |