Loading src/com/android/documentsui/dirlist/DirectoryFragment.java +10 −7 Original line number Diff line number Diff line Loading @@ -321,8 +321,6 @@ public class DirectoryFragment extends Fragment implements SwipeRefreshLayout.On } mActivity.refreshCurrentRootAndDirectory(AnimationView.ANIM_NONE); } } else { checkUriAndScheduleCheckIfNeeded(userId); } } Loading Loading @@ -1387,12 +1385,17 @@ public class DirectoryFragment extends Fragment implements SwipeRefreshLayout.On // Remove thumbnail cache. We do this not because we're worried about stale thumbnails as it // should be covered by last modified value we store in thumbnail cache, but rather to give // the user a greater sense that contents are being reloaded. ThumbnailCache cache = DocumentsApplication.getThumbnailCache(getContext()); Context context = getContext(); if (context == null) { Log.w(TAG, "Fragment is not attached to an activity."); } else { ThumbnailCache cache = DocumentsApplication.getThumbnailCache(context); String[] ids = mModel.getModelIds(); int numOfEvicts = Math.min(ids.length, CACHE_EVICT_LIMIT); for (int i = 0; i < numOfEvicts; ++i) { cache.removeUri(mModel.getItemUri(ids[i]), mModel.getItemUserId(ids[i])); } } final DocumentInfo doc = mActivity.getCurrentDirectory(); if (doc == null && !mActivity.getSelectedUser().isQuietModeEnabled(mActivity)) { Loading Loading
src/com/android/documentsui/dirlist/DirectoryFragment.java +10 −7 Original line number Diff line number Diff line Loading @@ -321,8 +321,6 @@ public class DirectoryFragment extends Fragment implements SwipeRefreshLayout.On } mActivity.refreshCurrentRootAndDirectory(AnimationView.ANIM_NONE); } } else { checkUriAndScheduleCheckIfNeeded(userId); } } Loading Loading @@ -1387,12 +1385,17 @@ public class DirectoryFragment extends Fragment implements SwipeRefreshLayout.On // Remove thumbnail cache. We do this not because we're worried about stale thumbnails as it // should be covered by last modified value we store in thumbnail cache, but rather to give // the user a greater sense that contents are being reloaded. ThumbnailCache cache = DocumentsApplication.getThumbnailCache(getContext()); Context context = getContext(); if (context == null) { Log.w(TAG, "Fragment is not attached to an activity."); } else { ThumbnailCache cache = DocumentsApplication.getThumbnailCache(context); String[] ids = mModel.getModelIds(); int numOfEvicts = Math.min(ids.length, CACHE_EVICT_LIMIT); for (int i = 0; i < numOfEvicts; ++i) { cache.removeUri(mModel.getItemUri(ids[i]), mModel.getItemUserId(ids[i])); } } final DocumentInfo doc = mActivity.getCurrentDirectory(); if (doc == null && !mActivity.getSelectedUser().isQuietModeEnabled(mActivity)) { Loading