Home | History | Annotate | Download | only in cardemulation

Lines Matching refs:service

212             // A payment service may have been removed, leaving only one;
216 for (ApduServiceInfo service : services) {
217 if (service.hasCategory(CardEmulation.CATEGORY_PAYMENT)) {
219 lastFoundPaymentService = service.getComponent();
223 // More than one service left, leave default unset
224 if (DBG) Log.d(TAG, "No default set, more than one service left.");
226 // Make single found payment service the default
227 if (DBG) Log.d(TAG, "No default set, making single service default.");
232 if (DBG) Log.d(TAG, "No default set, last payment service removed.");
248 ComponentName service = ComponentName.unflattenFromString(name);
249 if (!validateInstalled || service == null) {
250 return service;
252 return mServiceCache.hasService(userId, service) ? service : null;
259 boolean setDefaultServiceForCategoryChecked(int userId, ComponentName service,
268 if (service == null || mServiceCache.hasService(userId, service)) {
271 service != null ? service.flattenToString() : null, userId);
273 Log.e(TAG, "Could not find default service to make default: " + service);
278 boolean isServiceRegistered(int userId, ComponentName service) {
279 boolean serviceFound = mServiceCache.hasService(userId, service);
281 // If we don't know about this service yet, it may have just been enabled
284 // calls to our APIs referencing that service to fail.
285 // Hence, update the cache in case we don't know about the service.
286 if (DBG) Log.d(TAG, "Didn't find passed in service, invalidating cache.");
289 return mServiceCache.hasService(userId, service);
292 boolean isNfcFServiceInstalled(int userId, ComponentName service) {
293 boolean serviceFound = mNfcFServicesCache.hasService(userId, service);
295 // If we don't know about this service yet, it may have just been enabled
298 // calls to our APIs referencing that service to fail.
299 // Hence, update the cache in case we don't know about the service.
300 if (DBG) Log.d(TAG, "Didn't find passed in service, invalidating cache.");
303 return mNfcFServicesCache.hasService(userId, service);
307 * Returns whether a service in this package is preferred,
321 public boolean isDefaultServiceForCategory(int userId, ComponentName service,
325 if (!isServiceRegistered(userId, service)) {
330 return (defaultService != null && defaultService.equals(service));
335 ComponentName service, String aid) throws RemoteException {
338 if (!isServiceRegistered(userId, service)) {
341 return mAidCache.isDefaultServiceForAid(userId, service, aid);
346 ComponentName service, String category) throws RemoteException {
349 if (!isServiceRegistered(userId, service)) {
352 return setDefaultServiceForCategoryChecked(userId, service, category);
356 public boolean setDefaultForNextTap(int userId, ComponentName service)
360 if (service != null && !isServiceRegistered(userId, service)) {
363 return mPreferredServices.setDefaultForNextTap(service);
368 ComponentName service, AidGroup aidGroup) throws RemoteException {
371 if (!isServiceRegistered(userId, service)) {
374 return mServiceCache.registerAidGroupForService(userId, Binder.getCallingUid(), service,
380 ComponentName service, String category) throws RemoteException {
383 if (!isServiceRegistered(userId, service)) {
386 return mServiceCache.getAidGroupForService(userId, Binder.getCallingUid(), service,
392 ComponentName service, String category) throws RemoteException {
395 if (!isServiceRegistered(userId, service)) {
398 return mServiceCache.removeAidGroupForService(userId, Binder.getCallingUid(), service,
411 public boolean setPreferredService(ComponentName service)
414 if (!isServiceRegistered(UserHandle.getCallingUserId(), service)) {
418 return mPreferredServices.registerPreferredForegroundService(service,
441 public String getSystemCodeForService(int userId, ComponentName service)
445 if (!isNfcFServiceInstalled(userId, service)) {
449 userId, Binder.getCallingUid(), service);
453 public boolean registerSystemCodeForService(int userId, ComponentName service,
458 if (!isNfcFServiceInstalled(userId, service)) {
462 userId, Binder.getCallingUid(), service, systemCode);
466 public boolean removeSystemCodeForService(int userId, ComponentName service)
470 if (!isNfcFServiceInstalled(userId, service)) {
474 userId, Binder.getCallingUid(), service);
478 public String getNfcid2ForService(int userId, ComponentName service)
482 if (!isNfcFServiceInstalled(userId, service)) {
486 userId, Binder.getCallingUid(), service);
491 ComponentName service, String nfcid2) throws RemoteException {
494 if (!isNfcFServiceInstalled(userId, service)) {
498 userId, Binder.getCallingUid(), service, nfcid2);
502 public boolean enableNfcFForegroundService(ComponentName service)
505 if (isNfcFServiceInstalled(UserHandle.getCallingUserId(), service)) {
506 return mEnabledNfcFServices.registerEnabledForegroundService(service,
536 public void onPreferredPaymentServiceChanged(ComponentName service) {
537 mAidCache.onPreferredPaymentServiceChanged(service);
538 mHostEmulationManager.onPreferredPaymentServiceChanged(service);
542 public void onPreferredForegroundServiceChanged(ComponentName service) {
543 mAidCache.onPreferredForegroundServiceChanged(service);
544 mHostEmulationManager.onPreferredForegroundServiceChanged(service);
548 public void onEnabledForegroundNfcFServiceChanged(ComponentName service) {
549 mT3tIdentifiersCache.onEnabledForegroundNfcFServiceChanged(service);
550 mHostNfcFEmulationManager.onEnabledForegroundNfcFServiceChanged(service);