summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2013-11-19 00:11:15 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2013-11-19 00:11:15 -0800
commiteb4dc749de7f6ee45cae070db960890643e94aff (patch)
treeafbf3e263f027adcfd1ee0a5506424d3c2dc862a /packages
parentc7f7d1bf18dded61bcbf4015a4cfc9cf1ee45bd4 (diff)
parent6d0d4b5b5a66ea348c2cdd89a89d4ab7f0483829 (diff)
downloadframeworks_base-eb4dc749de7f6ee45cae070db960890643e94aff.zip
frameworks_base-eb4dc749de7f6ee45cae070db960890643e94aff.tar.gz
frameworks_base-eb4dc749de7f6ee45cae070db960890643e94aff.tar.bz2
am 6d0d4b5b: Merge "Mask OOBE when filtering recent documents." into klp-dev
* commit '6d0d4b5b5a66ea348c2cdd89a89d4ab7f0483829': Mask OOBE when filtering recent documents.
Diffstat (limited to 'packages')
-rw-r--r--packages/DocumentsUI/src/com/android/documentsui/FilteringCursorWrapper.java2
-rw-r--r--packages/DocumentsUI/src/com/android/documentsui/RecentLoader.java4
2 files changed, 5 insertions, 1 deletions
diff --git a/packages/DocumentsUI/src/com/android/documentsui/FilteringCursorWrapper.java b/packages/DocumentsUI/src/com/android/documentsui/FilteringCursorWrapper.java
index 55d73f2..1cbc221 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/FilteringCursorWrapper.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/FilteringCursorWrapper.java
@@ -51,7 +51,7 @@ public class FilteringCursorWrapper extends AbstractCursor {
mPosition = new int[count];
cursor.moveToPosition(-1);
- while (cursor.moveToNext()) {
+ while (cursor.moveToNext() && mCount < count) {
final String mimeType = getCursorString(cursor, Document.COLUMN_MIME_TYPE);
final long lastModified = getCursorLong(cursor, Document.COLUMN_LAST_MODIFIED);
if (rejectMimes != null && MimePredicate.mimeMatches(rejectMimes, mimeType)) {
diff --git a/packages/DocumentsUI/src/com/android/documentsui/RecentLoader.java b/packages/DocumentsUI/src/com/android/documentsui/RecentLoader.java
index 3a8a3fb..34ce42d 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/RecentLoader.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/RecentLoader.java
@@ -55,6 +55,10 @@ import java.util.concurrent.TimeUnit;
public class RecentLoader extends AsyncTaskLoader<DirectoryResult> {
private static final boolean LOGD = true;
+ // TODO: clean up cursor ownership so background thread doesn't traverse
+ // previously returned cursors for filtering/sorting; this currently races
+ // with the UI thread.
+
private static final int MAX_OUTSTANDING_RECENTS = 4;
private static final int MAX_OUTSTANDING_RECENTS_SVELTE = 2;