resolve merge conflicts of 26b174659 to ub-launcher3-master

Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ifb24f291b096b979044e5c87ec58c24e9c479728
This commit is contained in:
Tony
2017-03-30 18:10:05 -07:00
24 changed files with 491 additions and 97 deletions

View File

@@ -91,11 +91,12 @@ public class WidgetPreviewLoader {
* @return a request id which can be used to cancel the request.
*/
public CancellationSignal getPreview(WidgetItem item, int previewWidth,
int previewHeight, WidgetCell caller) {
int previewHeight, WidgetCell caller, boolean animate) {
String size = previewWidth + "x" + previewHeight;
WidgetCacheKey key = new WidgetCacheKey(item.componentName, item.user, size);
PreviewLoadTask task = new PreviewLoadTask(key, item, previewWidth, previewHeight, caller);
PreviewLoadTask task = new PreviewLoadTask(key, item, previewWidth, previewHeight, caller,
animate);
task.executeOnExecutor(Utilities.THREAD_POOL_EXECUTOR);
CancellationSignal signal = new CancellationSignal();
@@ -522,17 +523,19 @@ public class WidgetPreviewLoader {
private final int mPreviewHeight;
private final int mPreviewWidth;
private final WidgetCell mCaller;
private final boolean mAnimatePreviewIn;
private final BaseActivity mActivity;
@Thunk long[] mVersions;
@Thunk Bitmap mBitmapToRecycle;
PreviewLoadTask(WidgetCacheKey key, WidgetItem info, int previewWidth,
int previewHeight, WidgetCell caller) {
int previewHeight, WidgetCell caller, boolean animate) {
mKey = key;
mInfo = info;
mPreviewHeight = previewHeight;
mPreviewWidth = previewWidth;
mCaller = caller;
mAnimatePreviewIn = animate;
mActivity = BaseActivity.fromContext(mCaller.getContext());
if (DEBUG) {
Log.d(TAG, String.format("%s, %s, %d, %d",
@@ -588,7 +591,7 @@ public class WidgetPreviewLoader {
@Override
protected void onPostExecute(final Bitmap preview) {
mCaller.applyPreview(preview);
mCaller.applyPreview(preview, mAnimatePreviewIn);
// Write the generated preview to the DB in the worker thread
if (mVersions != null) {