diff options
author | Jeff Sharkey <jsharkey@android.com> | 2013-10-25 17:12:49 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2013-10-25 17:51:04 -0700 |
commit | db5ef125007644daa94aeaf1bd8637f4e0095e94 (patch) | |
tree | 7b8121682fb4c74cc2794b844c593eaf2173a71c /packages/DocumentsUI | |
parent | 96c620595bd0585f934b0971b4552c57845e9a78 (diff) | |
download | frameworks_base-db5ef125007644daa94aeaf1bd8637f4e0095e94.zip frameworks_base-db5ef125007644daa94aeaf1bd8637f4e0095e94.tar.gz frameworks_base-db5ef125007644daa94aeaf1bd8637f4e0095e94.tar.bz2 |
Use inotify to update DocumentsUI.
While user is actively looking at a directory, subscribe to inotify
events and notify of content changes to trigger requeries. Reference
count the observers, since multiple cursors are regularly open during
requeries.
Fix leaking cursors on activity rotation; crazy loader ID generation
is no longer needed.
Bug: 10999396
Change-Id: Iddeb08a056fee80c93df8499874705bcd213a1e2
Diffstat (limited to 'packages/DocumentsUI')
-rw-r--r-- | packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java b/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java index fa8bc9d..775720e 100644 --- a/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java +++ b/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java @@ -84,7 +84,6 @@ import com.google.android.collect.Lists; import java.util.ArrayList; import java.util.List; -import java.util.concurrent.atomic.AtomicInteger; /** * Display the documents inside a single directory. @@ -127,9 +126,7 @@ public class DirectoryFragment extends Fragment { private static final String EXTRA_QUERY = "query"; private static final String EXTRA_IGNORE_STATE = "ignoreState"; - private static AtomicInteger sLoaderId = new AtomicInteger(4000); - - private final int mLoaderId = sLoaderId.incrementAndGet(); + private final int mLoaderId = 42; public static void showNormal(FragmentManager fm, RootInfo root, DocumentInfo doc, int anim) { show(fm, TYPE_NORMAL, root, doc, null, anim); |