diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index b2e5179889f..b18b81e2c1c 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1609,9 +1609,14 @@
android:excludeFromRecents="true"
android:theme="@*android:style/Theme.Holo.Light.Dialog.Alert">
+
+
+
+
+
getPaymentAppInfos() {
PackageManager pm = mContext.getPackageManager();
List serviceInfos =
- mCardEmuManager.getServices(CardEmulationManager.CATEGORY_PAYMENT);
+ mCardEmuManager.getServices(CardEmulation.CATEGORY_PAYMENT);
List appInfos = new ArrayList();
if (serviceInfos == null) return appInfos;
diff --git a/src/com/android/settings/nfc/PaymentDefaultDialog.java b/src/com/android/settings/nfc/PaymentDefaultDialog.java
index a6887a34183..ae2f4c1b340 100644
--- a/src/com/android/settings/nfc/PaymentDefaultDialog.java
+++ b/src/com/android/settings/nfc/PaymentDefaultDialog.java
@@ -22,7 +22,7 @@ import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
-import android.nfc.cardemulation.CardEmulationManager;
+import android.nfc.cardemulation.CardEmulation;
import android.os.Bundle;
import android.util.Log;
@@ -47,8 +47,8 @@ public final class PaymentDefaultDialog extends AlertActivity implements
mBackend = new PaymentBackend(this);
Intent intent = getIntent();
ComponentName component = intent.getParcelableExtra(
- CardEmulationManager.EXTRA_SERVICE_COMPONENT);
- String category = intent.getStringExtra(CardEmulationManager.EXTRA_CATEGORY);
+ CardEmulation.EXTRA_SERVICE_COMPONENT);
+ String category = intent.getStringExtra(CardEmulation.EXTRA_CATEGORY);
setResult(RESULT_CANCELED);
if (!buildDialog(component, category)) {
@@ -75,7 +75,7 @@ public final class PaymentDefaultDialog extends AlertActivity implements
return false;
}
- if (!CardEmulationManager.CATEGORY_PAYMENT.equals(category)) {
+ if (!CardEmulation.CATEGORY_PAYMENT.equals(category)) {
Log.e(TAG, "Don't support defaults for category " + category);
return false;
}
diff --git a/src/com/android/settings/nfc/PaymentSettings.java b/src/com/android/settings/nfc/PaymentSettings.java
index 41bcc2ccf56..af569ac1061 100644
--- a/src/com/android/settings/nfc/PaymentSettings.java
+++ b/src/com/android/settings/nfc/PaymentSettings.java
@@ -55,23 +55,10 @@ public class PaymentSettings extends SettingsPreferenceFragment implements
for (PaymentAppInfo appInfo : appInfos) {
PaymentAppPreference preference =
new PaymentAppPreference(getActivity(), appInfo, this);
- // If for some reason isAuto gets out of sync, clear out app default
preference.setIcon(appInfo.icon);
preference.setTitle(appInfo.caption);
screen.addPreference(preference);
}
- if (appInfos.size() > 1) {
- PaymentAppInfo appInfo = new PaymentAppInfo();
- appInfo.icon = null;
- appInfo.componentName = null;
- appInfo.isDefault = !(mPaymentBackend.getDefaultPaymentApp() != null);
- // Add "Ask every time" option
- PaymentAppPreference preference =
- new PaymentAppPreference(getActivity(), appInfo, this);
- preference.setIcon(null);
- preference.setTitle(R.string.nfc_payment_ask);
- screen.addPreference(preference);
- }
}
setPreferenceScreen(screen);
}
@@ -82,8 +69,6 @@ public class PaymentSettings extends SettingsPreferenceFragment implements
PaymentAppInfo appInfo = (PaymentAppInfo) v.getTag();
if (appInfo.componentName != null) {
mPaymentBackend.setDefaultPaymentApp(appInfo.componentName);
- } else {
- mPaymentBackend.setDefaultPaymentApp(null);
}
refresh();
}