Loading res/values/strings.xml +1 −1 Original line number Diff line number Diff line Loading @@ -4659,7 +4659,7 @@ <string name="global_font_change_title">Change font size</string> <!-- NFC payment settings --><skip/> <string name="nfc_payment_settings_title">Tap and Pay</string> <string name="nfc_payment_settings_title">Payments</string> <!-- Option to tell Android to ask the user which payment app to use every time a payment terminal is tapped --> <string name="nfc_payment_ask">Ask every time</string> Loading src/com/android/settings/nfc/PaymentBackend.java +0 −13 Original line number Diff line number Diff line Loading @@ -86,17 +86,4 @@ public class PaymentBackend { Settings.Secure.NFC_PAYMENT_DEFAULT_COMPONENT, app != null ? app.flattenToString() : null); } public boolean isAutoPaymentMode() { String mode = Settings.Secure.getString(mContext.getContentResolver(), Settings.Secure.NFC_PAYMENT_MODE); return (!CardEmulationManager.PAYMENT_MODE_MANUAL.equals(mode)); } public void setAutoPaymentMode(boolean enable) { Settings.Secure.putString(mContext.getContentResolver(), Settings.Secure.NFC_PAYMENT_MODE, enable ? CardEmulationManager.PAYMENT_MODE_AUTO : CardEmulationManager.PAYMENT_MODE_MANUAL); } } No newline at end of file src/com/android/settings/nfc/PaymentDefaultDialog.java +1 −3 Original line number Diff line number Diff line Loading @@ -62,7 +62,6 @@ public final class PaymentDefaultDialog extends AlertActivity implements switch (which) { case BUTTON_POSITIVE: mBackend.setDefaultPaymentApp(mNewDefault); mBackend.setAutoPaymentMode(true); setResult(RESULT_OK); break; case BUTTON_NEGATIVE: Loading Loading @@ -98,7 +97,6 @@ public final class PaymentDefaultDialog extends AlertActivity implements } // Get current mode and default component boolean isAuto = mBackend.isAutoPaymentMode(); ComponentName defaultComponent = mBackend.getDefaultPaymentApp(); if (defaultComponent != null && defaultComponent.equals(component)) { Log.e(TAG, "Component " + component + " is already default."); Loading Loading @@ -128,7 +126,7 @@ public final class PaymentDefaultDialog extends AlertActivity implements // Compose dialog; get final AlertController.AlertParams p = mAlertParams; p.mTitle = getString(R.string.nfc_payment_set_default); if (defaultAppInfo == null || !isAuto) { if (defaultAppInfo == null) { p.mMessage = "Always use " + newAppInfo.loadLabel(pm) + " when you tap and pay?"; } else { p.mMessage = "Always use " + newAppInfo.loadLabel(pm) + " instead of " + Loading src/com/android/settings/nfc/PaymentSettings.java +1 −6 Original line number Diff line number Diff line Loading @@ -48,8 +48,6 @@ public class PaymentSettings extends SettingsPreferenceFragment implements PreferenceManager manager = getPreferenceManager(); PreferenceScreen screen = manager.createPreferenceScreen(getActivity()); boolean isAuto = mPaymentBackend.isAutoPaymentMode(); // Get all payment services List<PaymentAppInfo> appInfos = mPaymentBackend.getPaymentAppInfos(); if (appInfos != null && appInfos.size() > 0) { Loading @@ -58,7 +56,6 @@ public class PaymentSettings extends SettingsPreferenceFragment implements PaymentAppPreference preference = new PaymentAppPreference(getActivity(), appInfo, this); // If for some reason isAuto gets out of sync, clear out app default appInfo.isDefault &= isAuto; preference.setIcon(appInfo.icon); preference.setTitle(appInfo.caption); screen.addPreference(preference); Loading @@ -67,7 +64,7 @@ public class PaymentSettings extends SettingsPreferenceFragment implements PaymentAppInfo appInfo = new PaymentAppInfo(); appInfo.icon = null; appInfo.componentName = null; appInfo.isDefault = !isAuto; appInfo.isDefault = !(mPaymentBackend.getDefaultPaymentApp() != null); // Add "Ask every time" option PaymentAppPreference preference = new PaymentAppPreference(getActivity(), appInfo, this); Loading @@ -85,10 +82,8 @@ public class PaymentSettings extends SettingsPreferenceFragment implements PaymentAppInfo appInfo = (PaymentAppInfo) v.getTag(); if (appInfo.componentName != null) { mPaymentBackend.setDefaultPaymentApp(appInfo.componentName); mPaymentBackend.setAutoPaymentMode(true); } else { mPaymentBackend.setDefaultPaymentApp(null); mPaymentBackend.setAutoPaymentMode(false); } refresh(); } Loading Loading
res/values/strings.xml +1 −1 Original line number Diff line number Diff line Loading @@ -4659,7 +4659,7 @@ <string name="global_font_change_title">Change font size</string> <!-- NFC payment settings --><skip/> <string name="nfc_payment_settings_title">Tap and Pay</string> <string name="nfc_payment_settings_title">Payments</string> <!-- Option to tell Android to ask the user which payment app to use every time a payment terminal is tapped --> <string name="nfc_payment_ask">Ask every time</string> Loading
src/com/android/settings/nfc/PaymentBackend.java +0 −13 Original line number Diff line number Diff line Loading @@ -86,17 +86,4 @@ public class PaymentBackend { Settings.Secure.NFC_PAYMENT_DEFAULT_COMPONENT, app != null ? app.flattenToString() : null); } public boolean isAutoPaymentMode() { String mode = Settings.Secure.getString(mContext.getContentResolver(), Settings.Secure.NFC_PAYMENT_MODE); return (!CardEmulationManager.PAYMENT_MODE_MANUAL.equals(mode)); } public void setAutoPaymentMode(boolean enable) { Settings.Secure.putString(mContext.getContentResolver(), Settings.Secure.NFC_PAYMENT_MODE, enable ? CardEmulationManager.PAYMENT_MODE_AUTO : CardEmulationManager.PAYMENT_MODE_MANUAL); } } No newline at end of file
src/com/android/settings/nfc/PaymentDefaultDialog.java +1 −3 Original line number Diff line number Diff line Loading @@ -62,7 +62,6 @@ public final class PaymentDefaultDialog extends AlertActivity implements switch (which) { case BUTTON_POSITIVE: mBackend.setDefaultPaymentApp(mNewDefault); mBackend.setAutoPaymentMode(true); setResult(RESULT_OK); break; case BUTTON_NEGATIVE: Loading Loading @@ -98,7 +97,6 @@ public final class PaymentDefaultDialog extends AlertActivity implements } // Get current mode and default component boolean isAuto = mBackend.isAutoPaymentMode(); ComponentName defaultComponent = mBackend.getDefaultPaymentApp(); if (defaultComponent != null && defaultComponent.equals(component)) { Log.e(TAG, "Component " + component + " is already default."); Loading Loading @@ -128,7 +126,7 @@ public final class PaymentDefaultDialog extends AlertActivity implements // Compose dialog; get final AlertController.AlertParams p = mAlertParams; p.mTitle = getString(R.string.nfc_payment_set_default); if (defaultAppInfo == null || !isAuto) { if (defaultAppInfo == null) { p.mMessage = "Always use " + newAppInfo.loadLabel(pm) + " when you tap and pay?"; } else { p.mMessage = "Always use " + newAppInfo.loadLabel(pm) + " instead of " + Loading
src/com/android/settings/nfc/PaymentSettings.java +1 −6 Original line number Diff line number Diff line Loading @@ -48,8 +48,6 @@ public class PaymentSettings extends SettingsPreferenceFragment implements PreferenceManager manager = getPreferenceManager(); PreferenceScreen screen = manager.createPreferenceScreen(getActivity()); boolean isAuto = mPaymentBackend.isAutoPaymentMode(); // Get all payment services List<PaymentAppInfo> appInfos = mPaymentBackend.getPaymentAppInfos(); if (appInfos != null && appInfos.size() > 0) { Loading @@ -58,7 +56,6 @@ public class PaymentSettings extends SettingsPreferenceFragment implements PaymentAppPreference preference = new PaymentAppPreference(getActivity(), appInfo, this); // If for some reason isAuto gets out of sync, clear out app default appInfo.isDefault &= isAuto; preference.setIcon(appInfo.icon); preference.setTitle(appInfo.caption); screen.addPreference(preference); Loading @@ -67,7 +64,7 @@ public class PaymentSettings extends SettingsPreferenceFragment implements PaymentAppInfo appInfo = new PaymentAppInfo(); appInfo.icon = null; appInfo.componentName = null; appInfo.isDefault = !isAuto; appInfo.isDefault = !(mPaymentBackend.getDefaultPaymentApp() != null); // Add "Ask every time" option PaymentAppPreference preference = new PaymentAppPreference(getActivity(), appInfo, this); Loading @@ -85,10 +82,8 @@ public class PaymentSettings extends SettingsPreferenceFragment implements PaymentAppInfo appInfo = (PaymentAppInfo) v.getTag(); if (appInfo.componentName != null) { mPaymentBackend.setDefaultPaymentApp(appInfo.componentName); mPaymentBackend.setAutoPaymentMode(true); } else { mPaymentBackend.setDefaultPaymentApp(null); mPaymentBackend.setAutoPaymentMode(false); } refresh(); } Loading