NFC Tap&Pay: deal with changes from API review.

Also, removed "Ask every time" mode.

Bug: 10550349
Change-Id: If7c300f9f446e3c31d594116ac8e20fb50d9ec3f
This commit is contained in:
Martijn Coenen
2013-08-30 12:57:42 -07:00
parent 573a21ada2
commit a73aa32278
4 changed files with 13 additions and 23 deletions

View File

@@ -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();
}