diff options
author | Marco Nelissen <marcone@google.com> | 2011-04-20 13:42:25 -0700 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2011-04-20 13:42:25 -0700 |
commit | 63f9689627b8fd9b94afd35b1274939c56e5642f (patch) | |
tree | d610b75c6ff8aa782d21ed29ff8a230fc967c058 /core/java | |
parent | 7454253d9192009f47d2d92152fcfb59d1501e09 (diff) | |
download | frameworks_base-63f9689627b8fd9b94afd35b1274939c56e5642f.zip frameworks_base-63f9689627b8fd9b94afd35b1274939c56e5642f.tar.gz frameworks_base-63f9689627b8fd9b94afd35b1274939c56e5642f.tar.bz2 |
Revert recently added check to addFooterView
b/4319206
Change-Id: Ic89b2166bdc7a878ae2983d393a1d01aaa3b7d23
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/widget/ListView.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java index 9d29a60..d76a956 100644 --- a/core/java/android/widget/ListView.java +++ b/core/java/android/widget/ListView.java @@ -337,10 +337,10 @@ public class ListView extends AbsListView { */ public void addFooterView(View v, Object data, boolean isSelectable) { - if (mAdapter != null && ! (mAdapter instanceof HeaderViewListAdapter)) { - throw new IllegalStateException( - "Cannot add footer view to list -- setAdapter has already been called."); - } + // NOTE: do not enforce the adapter being null here, since unlike in + // addHeaderView, it was never enforced here, and so existing apps are + // relying on being able to add a footer and then calling setAdapter to + // force creation of the HeaderViewListAdapter wrapper FixedViewInfo info = new FixedViewInfo(); info.view = v; |