am e92ccbbd: am 2473c1e8: am 66372895: am 866545aa: Don\'t crash on empty adapters
* commit 'e92ccbbd8ded100158599a6a78c062e7e7a71194':
Don't crash on empty adapters
diff --git a/src/com/android/mail/ui/SeparatedFolderListAdapter.java b/src/com/android/mail/ui/SeparatedFolderListAdapter.java
index b79dd5c..0df74de 100644
--- a/src/com/android/mail/ui/SeparatedFolderListAdapter.java
+++ b/src/com/android/mail/ui/SeparatedFolderListAdapter.java
@@ -44,7 +44,7 @@
int size = adapter.getCount();
// check if position inside this section
- if (position == 0 || position < size)
+ if (position < size)
return adapter.getItem(position);
// otherwise jump into next section
@@ -78,7 +78,7 @@
for (FolderSelectorAdapter adapter : mSections) {
int size = adapter.getCount();
// check if position inside this section
- if (position == 0 || position < size) {
+ if (position < size) {
return type + adapter.getItemViewType(position);
}
@@ -94,7 +94,7 @@
public View getView(int position, View convertView, ViewGroup parent) {
for (FolderSelectorAdapter adapter : mSections) {
int size = adapter.getCount();
- if (position == 0 || position < size) {
+ if (position < size) {
return adapter.getView(position, convertView, parent);
}
// otherwise jump into next section