summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNancy Chen <nancychen@google.com>2014-08-15 22:49:56 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-08-15 19:21:54 +0000
commitfa88947e17223d1e52eb8bfbac2f1cab7f2e56ba (patch)
tree724dbfe3aa4986d9870578c46df02d92b29facdb
parent3d6e5018ff8d64ac1815477fe0172f62f91727a2 (diff)
parente93a23581cbb9da2282b5897ffc167f86836afae (diff)
downloadandroid_frameworks_ex-fa88947e17223d1e52eb8bfbac2f1cab7f2e56ba.tar.gz
android_frameworks_ex-fa88947e17223d1e52eb8bfbac2f1cab7f2e56ba.tar.bz2
android_frameworks_ex-fa88947e17223d1e52eb8bfbac2f1cab7f2e56ba.zip
Merge "Add public method to check if the partition is empty." into lmp-dev
-rw-r--r--common/java/com/android/common/widget/CompositeCursorAdapter.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/java/com/android/common/widget/CompositeCursorAdapter.java b/common/java/com/android/common/widget/CompositeCursorAdapter.java
index 114065f..dddbcf6 100644
--- a/common/java/com/android/common/widget/CompositeCursorAdapter.java
+++ b/common/java/com/android/common/widget/CompositeCursorAdapter.java
@@ -54,6 +54,10 @@ public abstract class CompositeCursorAdapter extends BaseAdapter {
public boolean getHasHeader() {
return hasHeader;
}
+
+ public boolean isEmpty() {
+ return count == 0;
+ }
}
private final Context mContext;
@@ -110,7 +114,7 @@ public abstract class CompositeCursorAdapter extends BaseAdapter {
/**
* Removes cursors for all partitions.
*/
- // TODO: Is this really what this is supposed to do? Just remove the cursors? Not close them?
+ // TODO: Is this really what this is supposed to do? Just remove the cursors? Not close them?
// Not remove the partitions themselves? Isn't this leaking?
public void clearPartitions() {