diff options
author | Jay Shrauner <shrauner@google.com> | 2015-04-03 17:54:34 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-04-03 17:54:35 +0000 |
commit | c9c41794b77da22576e42fb85336a034a1d570ec (patch) | |
tree | d5f6a93ac4131ec9c3e7bf907f61828d430bb7f6 | |
parent | 3b108af8b10f11a6186c130dcd1ab647369b1985 (diff) | |
parent | 62e75fbd7d174d511e35a19a882a249490daa2cd (diff) | |
download | android_frameworks_ex-c9c41794b77da22576e42fb85336a034a1d570ec.tar.gz android_frameworks_ex-c9c41794b77da22576e42fb85336a034a1d570ec.tar.bz2 android_frameworks_ex-c9c41794b77da22576e42fb85336a034a1d570ec.zip |
Merge "Fix StaleDataException in isPartitionEmpty"
-rw-r--r-- | common/java/com/android/common/widget/CompositeCursorAdapter.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/java/com/android/common/widget/CompositeCursorAdapter.java b/common/java/com/android/common/widget/CompositeCursorAdapter.java index 8a3fa9b..03443d9 100644 --- a/common/java/com/android/common/widget/CompositeCursorAdapter.java +++ b/common/java/com/android/common/widget/CompositeCursorAdapter.java @@ -233,7 +233,7 @@ public abstract class CompositeCursorAdapter extends BaseAdapter { */ public boolean isPartitionEmpty(int partition) { Cursor cursor = mPartitions.get(partition).cursor; - return cursor == null || cursor.getCount() == 0; + return cursor == null || cursor.isClosed() || cursor.getCount() == 0; } /** |