From 2fe90293a16352c119acd6014ad0b9583896cd5e Mon Sep 17 00:00:00 2001 From: Jason Monk Date: Tue, 10 Nov 2015 15:22:57 -0500 Subject: [PATCH] Various small crash fixes and guards Bug: 25501551 Bug: 25583654 Bug: 25510495 Bug: 23575961 Change-Id: Id0e7f6aacdf763bf95b49d281aa8755afcd2e5ef --- AndroidManifest.xml | 21 ---------------- .../accessibility/AccessibilitySettings.java | 6 ++--- .../settings/dashboard/DashboardSummary.java | 1 + .../android/settings/nfc/PaymentSettings.java | 24 +++++++++---------- 4 files changed, 15 insertions(+), 37 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index b71e964d71c..774cb45de20 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -382,16 +382,6 @@ android:value="true" /> - - - - - - - - - - - - - - - - - - appInfos = mPaymentBackend.getPaymentAppInfos(); + List appInfos = mPaymentBackend.getPaymentAppInfos(); if (appInfos != null && appInfos.size() > 0) { NfcPaymentPreference preference = new NfcPaymentPreference(getPrefContext(), mPaymentBackend); @@ -75,6 +63,16 @@ public class PaymentSettings extends SettingsPreferenceFragment { setPreferenceScreen(screen); } + @Override + public void onViewCreated(View view, Bundle savedInstanceState) { + super.onViewCreated(view, savedInstanceState); + ViewGroup contentRoot = (ViewGroup) getListView().getParent(); + View emptyView = getActivity().getLayoutInflater().inflate( + R.layout.nfc_payment_empty, contentRoot, false); + contentRoot.addView(emptyView); + setEmptyView(emptyView); + } + @Override public void onResume() { super.onResume();