Home | History | Annotate | Download | only in cardemulation

Lines Matching defs:aid

36     // mAidServices is a tree that maps an AID to a list of handling services
41 // mAidCache is a lookup table for quickly mapping an AID to one or
55 String aid;
93 if (DBG) Log.d(TAG, "Not updating aid cache + routing: nothing changed.");
117 public AidResolveInfo resolveAidPrefix(String aid) {
119 char nextAidChar = (char) (aid.charAt(aid.length() - 1) + 1);
120 String nextAid = aid.substring(0, aid.length() - 1) + nextAidChar;
122 mAidToServices.subMap(aid, nextAid);
128 // Let the caller know which AID got selected
129 resolveInfo.aid = matches.firstKey();
135 public String getCategoryForAid(String aid) {
138 if (paymentAids != null && paymentAids.contains(aid)) {
146 public boolean isDefaultServiceForAid(int userId, ComponentName service, String aid) {
162 resolveInfo = mAidCache.get(aid);
260 * Resolves an AID to a set of services that can handle it.
262 AidResolveInfo resolveAidLocked(List<ApduServiceInfo> resolvedServices, String aid) {
264 if (DBG) Log.d(TAG, "Could not resolve AID " + aid + " to any service.");
268 if (DBG) Log.d(TAG, "resolveAidLocked: resolving AID " + aid);
276 if (paymentAids != null && paymentAids.contains(aid)) {
277 if (DBG) Log.d(TAG, "resolveAidLocked: AID " + aid + " is a payment AID");
278 // This AID has been registered as a payment AID by at least one service.
295 // So..since we resolved to only one service, and this AID
296 // is a payment AID, we know that this service is the only
297 // service that has registered for this AID and in fact claimed
298 // it was a payment AID.
304 // 2. At least one AID in the payment group is contended:
323 // Treat this as if it's the default for this AID
327 if (DBG) Log.d(TAG, "resolveAidLocked: DECISION: routing AID " + aid +
329 ", but will ask confirmation because its AID group is contended.");
334 // registered this AID, go with the default. Otherwise, add all.
351 // This AID is not a payment AID, just return all components
355 if (DBG) Log.d(TAG, "resolveAidLocked: DECISION: cat OTHER AID, " +
366 if (DBG) Log.d(TAG, "resolveAidLocked: DECISION: cat OTHER AID, " +
369 if (DBG) Log.d(TAG, "resolveAidLocked: DECISION: cat OTHER AID, routing all");
381 for (String aid : service.getAids()) {
382 if (DBG) Log.d(TAG, "generateAidTree AID: " + aid);
383 // Check if a mapping exists for this AID
384 if (mAidToServices.containsKey(aid)) {
385 final ArrayList<ApduServiceInfo> aidServices = mAidToServices.get(aid);
391 mAidToServices.put(aid, aidServices);
433 String aid = aidEntry.getKey();
434 if (!mAidCache.containsKey(aid)) {
435 mAidCache.put(aid, resolveAidLocked(aidEntry.getValue(), aid));
446 // For each AID, find interested services
449 String aid = aidEntry.getKey();
453 mRoutingManager.removeAid(aid);
456 mRoutingManager.setRouteForAid(aid, resolveInfo.defaultService.isOnHost());
460 mRoutingManager.setRouteForAid(aid, true);
463 mRoutingManager.setRouteForAid(aid, true);
465 handledAids.add(aid);
470 for (String aid : routedAids) {
471 if (!handledAids.contains(aid)) {
472 if (DBG) Log.d(TAG, "Removing routing for AID " + aid + ", because " +
474 mRoutingManager.removeAid(aid);
622 pw.println("AID cache entries: ");