summaryrefslogtreecommitdiffstats
path: root/core/java/com/android
diff options
context:
space:
mode:
authorDianne Hackborn <>2009-03-24 20:26:37 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-24 20:26:37 -0700
commitd906b720b8a8e6e527325f106ed87246d51a3571 (patch)
treefd7fde238b6463ee6a5bd7d04dde0f39fa342be6 /core/java/com/android
parent4cf7abeed2c748314327462986e452fc1ccc6e99 (diff)
downloadframeworks_base-d906b720b8a8e6e527325f106ed87246d51a3571.zip
frameworks_base-d906b720b8a8e6e527325f106ed87246d51a3571.tar.gz
frameworks_base-d906b720b8a8e6e527325f106ed87246d51a3571.tar.bz2
Automated import from //branches/donutburger/...@141515,141515
Diffstat (limited to 'core/java/com/android')
-rw-r--r--core/java/com/android/internal/database/SortCursor.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/java/com/android/internal/database/SortCursor.java b/core/java/com/android/internal/database/SortCursor.java
index af0efc9..99410bc 100644
--- a/core/java/com/android/internal/database/SortCursor.java
+++ b/core/java/com/android/internal/database/SortCursor.java
@@ -253,7 +253,15 @@ public class SortCursor extends AbstractCursor
if (mCursor != null) {
return mCursor.getColumnNames();
} else {
- return new String[0];
+ // All of the cursors may be empty, but they can still return
+ // this information.
+ int length = mCursors.length;
+ for (int i = 0 ; i < length ; i++) {
+ if (mCursors[i] != null) {
+ return mCursors[i].getColumnNames();
+ }
+ }
+ throw new IllegalStateException("No cursor that can return names");
}
}