Home | History | Annotate | Download | only in cardemulation

Lines Matching refs:service

55     private NfcFCardEmulation(Context context, INfcFCardEmulation service) {
57 sService = service;
92 // Get card emu service
93 INfcFCardEmulation service = adapter.getNfcFCardEmulationService();
94 if (service == null) {
98 manager = new NfcFCardEmulation(context, service);
105 * Retrieves the current System Code for the specified service.
113 * @param service The component name of the service
116 public String getSystemCodeForService(ComponentName service) throws RuntimeException {
117 if (service == null) {
118 throw new NullPointerException("service is null");
121 return sService.getSystemCodeForService(mContext.getUserId(), service);
130 return sService.getSystemCodeForService(mContext.getUserId(), service);
140 * Registers a System Code for the specified service.
144 * <p>If a System Code was previously registered for this service
148 * <p>Even if the same System Code is already registered for another service,
151 * <p>Note that you can only register a System Code for a service that
154 * package as the service itself, though UIDs can also
157 * @param service The component name of the service
161 public boolean registerSystemCodeForService(ComponentName service, String systemCode)
163 if (service == null || systemCode == null) {
164 throw new NullPointerException("service or systemCode is null");
168 service, systemCode);
178 service, systemCode);
188 * Removes a registered System Code for the specified service.
190 * @param service The component name of the service
193 public boolean unregisterSystemCodeForService(ComponentName service) throws RuntimeException {
194 if (service == null) {
195 throw new NullPointerException("service is null");
198 return sService.removeSystemCodeForService(mContext.getUserId(), service);
207 return sService.removeSystemCodeForService(mContext.getUserId(), service);
217 * Retrieves the current NFCID2 for the specified service.
225 * @param service The component name of the service
228 public String getNfcid2ForService(ComponentName service) throws RuntimeException {
229 if (service == null) {
230 throw new NullPointerException("service is null");
233 return sService.getNfcid2ForService(mContext.getUserId(), service);
242 return sService.getNfcid2ForService(mContext.getUserId(), service);
252 * Set a NFCID2 for the specified service.
256 * <p>If a NFCID2 was previously set for this service
260 * <p>Note that you can only set the NFCID2 for a service that
263 * package as the service itself, though UIDs can also
266 * @param service The component name of the service
270 public boolean setNfcid2ForService(ComponentName service, String nfcid2)
272 if (service == null || nfcid2 == null) {
273 throw new NullPointerException("service or nfcid2 is null");
277 service, nfcid2);
287 service, nfcid2);
297 * Allows a foreground application to specify which card emulation service
300 * <p>The specified HCE-F service is only enabled when the corresponding application is
303 * NFCID2 or System Code is replaced, the HCE-F service is disabled.
312 * @param activity The activity which prefers this service to be invoked
313 * @param service The service to be preferred while this activity is in the foreground
316 public boolean enableService(Activity activity, ComponentName service) throws RuntimeException {
317 if (activity == null || service == null) {
318 throw new NullPointerException("activity or service is null");
325 return sService.enableNfcFForegroundService(service);
334 return sService.enableNfcFForegroundService(service);
344 * Disables the service for the specified Activity.
350 * @param activity The activity which the service was registered for