From: Jason Monk Date: Tue, 10 Nov 2015 20:22:57 +0000 (-0500) Subject: Various small crash fixes and guards X-Git-Tag: android-x86-7.1-r1~1741^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=2fe90293a16352c119acd6014ad0b9583896cd5e;p=android-x86%2Fpackages-apps-Settings.git Various small crash fixes and guards Bug: 25501551 Bug: 25583654 Bug: 25510495 Bug: 23575961 Change-Id: Id0e7f6aacdf763bf95b49d281aa8755afcd2e5ef --- diff --git a/AndroidManifest.xml b/AndroidManifest.xml index b71e964d71..774cb45de2 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); @@ -76,6 +64,16 @@ public class PaymentSettings extends SettingsPreferenceFragment { } @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(); mPaymentBackend.onResume();