Fix bug where folder items preview remain in low res state.

- We update the ranks of all folder items after loading, to ensure there are
  no gaps caused by removed folder items. This also ensures that we load
  the high resolution icons for all preview items.
- FolderIconPreviewVerifier#setFolderInfo was not always called
- Init mGridSize with [1, 1] to prevent divide by zero error in case
  setFolderInfo is not called

Bug: 126268196
Change-Id: I856489968665a39303e2922c78cf90f2b3ee6ebb
This commit is contained in:
Jon Miranda
2019-03-04 09:14:40 -08:00
parent 2ca0aa7076
commit e6f3fa47d6
5 changed files with 40 additions and 21 deletions

View File

@@ -321,6 +321,7 @@ public class FolderPagedView extends PagedView<PageIndicatorDots> {
FolderIconPreviewVerifier verifier = new FolderIconPreviewVerifier(
Launcher.getLauncher(getContext()).getDeviceProfile().inv);
verifier.setFolderInfo(mFolder.getInfo());
rank = 0;
for (int i = 0; i < itemCount; i++) {
View v = list.size() > i ? list.get(i) : null;