diff options
Diffstat (limited to 'src/com/android/nfc/cardemulation/CardEmulationManager.java')
-rw-r--r-- | src/com/android/nfc/cardemulation/CardEmulationManager.java | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/src/com/android/nfc/cardemulation/CardEmulationManager.java b/src/com/android/nfc/cardemulation/CardEmulationManager.java index f6353942..a122920d 100644 --- a/src/com/android/nfc/cardemulation/CardEmulationManager.java +++ b/src/com/android/nfc/cardemulation/CardEmulationManager.java @@ -262,30 +262,9 @@ public class CardEmulationManager implements RegisteredServicesCache.Callback, getDefaultServiceForCategory(userId, CardEmulation.CATEGORY_PAYMENT, true); if (DBG) Log.d(TAG, "Current default: " + defaultPaymentService); if (defaultPaymentService == null) { - // A payment service may have been removed, leaving only one; - // in that case, automatically set that app as default. - int numPaymentServices = 0; - ComponentName lastFoundPaymentService = null; - for (ApduServiceInfo service : services) { - if (service.hasCategory(CardEmulation.CATEGORY_PAYMENT)) { - numPaymentServices++; - lastFoundPaymentService = service.getComponent(); - } - } - if (numPaymentServices > 1) { - // More than one service left, leave default unset - if (DBG) Log.d(TAG, "No default set, more than one service left."); - setDefaultServiceForCategoryChecked(userId, null, CardEmulation.CATEGORY_PAYMENT); - } else if (numPaymentServices == 1) { - // Make single found payment service the default - if (DBG) Log.d(TAG, "No default set, making single service default."); - setDefaultServiceForCategoryChecked(userId, lastFoundPaymentService, - CardEmulation.CATEGORY_PAYMENT); - } else { - // No payment services left, leave default at null - if (DBG) Log.d(TAG, "No default set, last payment service removed."); - setDefaultServiceForCategoryChecked(userId, null, CardEmulation.CATEGORY_PAYMENT); - } + // A payment service may have been removed, set default payment selection to "not set". + if (DBG) Log.d(TAG, "No default set, last payment service removed."); + setDefaultServiceForCategoryChecked(userId, null, CardEmulation.CATEGORY_PAYMENT); } } |