Loading api/current.txt +2 −2 Original line number Original line Diff line number Diff line Loading @@ -29194,10 +29194,10 @@ package android.nfc.cardemulation { method public boolean isDefaultServiceForCategory(android.content.ComponentName, String); method public boolean isDefaultServiceForCategory(android.content.ComponentName, String); method public boolean registerAidsForService(android.content.ComponentName, String, java.util.List<java.lang.String>); method public boolean registerAidsForService(android.content.ComponentName, String, java.util.List<java.lang.String>); method public boolean removeAidsForService(android.content.ComponentName, String); method public boolean removeAidsForService(android.content.ComponentName, String); method public boolean setOffHostForService(android.content.ComponentName, String); method public boolean setOffHostForService(@NonNull android.content.ComponentName, @NonNull String); method public boolean setPreferredService(android.app.Activity, android.content.ComponentName); method public boolean setPreferredService(android.app.Activity, android.content.ComponentName); method public boolean supportsAidPrefixRegistration(); method public boolean supportsAidPrefixRegistration(); method public boolean unsetOffHostForService(android.content.ComponentName); method public boolean unsetOffHostForService(@NonNull android.content.ComponentName); method public boolean unsetPreferredService(android.app.Activity); method public boolean unsetPreferredService(android.app.Activity); field public static final String ACTION_CHANGE_DEFAULT = "android.nfc.cardemulation.action.ACTION_CHANGE_DEFAULT"; field public static final String ACTION_CHANGE_DEFAULT = "android.nfc.cardemulation.action.ACTION_CHANGE_DEFAULT"; field public static final String CATEGORY_OTHER = "other"; field public static final String CATEGORY_OTHER = "other"; core/java/android/nfc/cardemulation/CardEmulation.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.nfc.cardemulation; package android.nfc.cardemulation; import android.annotation.NonNull; import android.annotation.SdkConstant; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.annotation.SdkConstant.SdkConstantType; import android.app.Activity; import android.app.Activity; Loading Loading @@ -359,7 +360,7 @@ public final class CardEmulation { * @param service The component name of the service * @param service The component name of the service * @return whether the registration was successful. * @return whether the registration was successful. */ */ public boolean unsetOffHostForService(ComponentName service) { public boolean unsetOffHostForService(@NonNull ComponentName service) { NfcAdapter adapter = NfcAdapter.getDefaultAdapter(mContext); NfcAdapter adapter = NfcAdapter.getDefaultAdapter(mContext); if (adapter == null) { if (adapter == null) { return false; return false; Loading Loading @@ -405,7 +406,8 @@ public final class CardEmulation { * @param offHostSecureElement Secure Element to register the AID to * @param offHostSecureElement Secure Element to register the AID to * @return whether the registration was successful. * @return whether the registration was successful. */ */ public boolean setOffHostForService(ComponentName service, String offHostSecureElement) { public boolean setOffHostForService(@NonNull ComponentName service, @NonNull String offHostSecureElement) { boolean validSecureElement = false; boolean validSecureElement = false; NfcAdapter adapter = NfcAdapter.getDefaultAdapter(mContext); NfcAdapter adapter = NfcAdapter.getDefaultAdapter(mContext); Loading Loading
api/current.txt +2 −2 Original line number Original line Diff line number Diff line Loading @@ -29194,10 +29194,10 @@ package android.nfc.cardemulation { method public boolean isDefaultServiceForCategory(android.content.ComponentName, String); method public boolean isDefaultServiceForCategory(android.content.ComponentName, String); method public boolean registerAidsForService(android.content.ComponentName, String, java.util.List<java.lang.String>); method public boolean registerAidsForService(android.content.ComponentName, String, java.util.List<java.lang.String>); method public boolean removeAidsForService(android.content.ComponentName, String); method public boolean removeAidsForService(android.content.ComponentName, String); method public boolean setOffHostForService(android.content.ComponentName, String); method public boolean setOffHostForService(@NonNull android.content.ComponentName, @NonNull String); method public boolean setPreferredService(android.app.Activity, android.content.ComponentName); method public boolean setPreferredService(android.app.Activity, android.content.ComponentName); method public boolean supportsAidPrefixRegistration(); method public boolean supportsAidPrefixRegistration(); method public boolean unsetOffHostForService(android.content.ComponentName); method public boolean unsetOffHostForService(@NonNull android.content.ComponentName); method public boolean unsetPreferredService(android.app.Activity); method public boolean unsetPreferredService(android.app.Activity); field public static final String ACTION_CHANGE_DEFAULT = "android.nfc.cardemulation.action.ACTION_CHANGE_DEFAULT"; field public static final String ACTION_CHANGE_DEFAULT = "android.nfc.cardemulation.action.ACTION_CHANGE_DEFAULT"; field public static final String CATEGORY_OTHER = "other"; field public static final String CATEGORY_OTHER = "other";
core/java/android/nfc/cardemulation/CardEmulation.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.nfc.cardemulation; package android.nfc.cardemulation; import android.annotation.NonNull; import android.annotation.SdkConstant; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.annotation.SdkConstant.SdkConstantType; import android.app.Activity; import android.app.Activity; Loading Loading @@ -359,7 +360,7 @@ public final class CardEmulation { * @param service The component name of the service * @param service The component name of the service * @return whether the registration was successful. * @return whether the registration was successful. */ */ public boolean unsetOffHostForService(ComponentName service) { public boolean unsetOffHostForService(@NonNull ComponentName service) { NfcAdapter adapter = NfcAdapter.getDefaultAdapter(mContext); NfcAdapter adapter = NfcAdapter.getDefaultAdapter(mContext); if (adapter == null) { if (adapter == null) { return false; return false; Loading Loading @@ -405,7 +406,8 @@ public final class CardEmulation { * @param offHostSecureElement Secure Element to register the AID to * @param offHostSecureElement Secure Element to register the AID to * @return whether the registration was successful. * @return whether the registration was successful. */ */ public boolean setOffHostForService(ComponentName service, String offHostSecureElement) { public boolean setOffHostForService(@NonNull ComponentName service, @NonNull String offHostSecureElement) { boolean validSecureElement = false; boolean validSecureElement = false; NfcAdapter adapter = NfcAdapter.getDefaultAdapter(mContext); NfcAdapter adapter = NfcAdapter.getDefaultAdapter(mContext); Loading