Commit e714cdc4 authored by Finnur Thorarinsson's avatar Finnur Thorarinsson Committed by Commit Bot

Android Photo Picker: Cancel outdated requests again.

Somewhere along the way we stopped listening to recycler
events, which breaks the mechanism that invalidates old
(outdated) requests for decoding. This CL reinstates
that.

Bug: 793934, 656015
Change-Id: I0df070c851bb75a1dccd1e7b5854c8846905ceb9
Reviewed-on: https://chromium-review.googlesource.com/827015Reviewed-by: default avatarTheresa <twellington@chromium.org>
Commit-Queue: Theresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524095}
parent f2ac1860
...@@ -158,6 +158,7 @@ public class PickerCategoryView extends RelativeLayout ...@@ -158,6 +158,7 @@ public class PickerCategoryView extends RelativeLayout
mRecyclerView.setLayoutManager(mLayoutManager); mRecyclerView.setLayoutManager(mLayoutManager);
mSpacingDecoration = new GridSpacingItemDecoration(mColumns, mPadding); mSpacingDecoration = new GridSpacingItemDecoration(mColumns, mPadding);
mRecyclerView.addItemDecoration(mSpacingDecoration); mRecyclerView.addItemDecoration(mSpacingDecoration);
mRecyclerView.setRecyclerListener(this);
final long maxMemory = ConversionUtils.bytesToKilobytes(Runtime.getRuntime().maxMemory()); final long maxMemory = ConversionUtils.bytesToKilobytes(Runtime.getRuntime().maxMemory());
mCacheSizeLarge = (int) (maxMemory / 2); // 1/2 of the available memory. mCacheSizeLarge = (int) (maxMemory / 2); // 1/2 of the available memory.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment