Guard against no payment app

Bug: 25990521
Change-Id: I3307fb197d1a38ff759628bf72f6b7e4afcb8001
This commit is contained in:
Jason Monk
2015-12-03 11:08:10 -05:00
parent fb2ca7c2e5
commit 91487434c0

View File

@@ -115,11 +115,13 @@ public class PaymentSettings extends SettingsPreferenceFragment {
PaymentBackend paymentBackend = new PaymentBackend(mContext); PaymentBackend paymentBackend = new PaymentBackend(mContext);
paymentBackend.refresh(); paymentBackend.refresh();
PaymentAppInfo app = paymentBackend.getDefaultApp(); PaymentAppInfo app = paymentBackend.getDefaultApp();
if (app != null) {
mSummaryLoader.setSummary(this, mContext.getString(R.string.payment_summary, mSummaryLoader.setSummary(this, mContext.getString(R.string.payment_summary,
app.label)); app.label));
} }
} }
} }
}
public static final SummaryLoader.SummaryProviderFactory SUMMARY_PROVIDER_FACTORY public static final SummaryLoader.SummaryProviderFactory SUMMARY_PROVIDER_FACTORY
= new SummaryLoader.SummaryProviderFactory() { = new SummaryLoader.SummaryProviderFactory() {