Merge "Use DeviceProfile to check multiWindowMode" into ub-launcher3-rvc-dev am: 482435c01b
Change-Id: I877e06a3c2a22741ff1892bb5ed347c266de15c2
This commit is contained in:
@@ -70,6 +70,7 @@ import android.text.StaticLayout;
|
||||
import android.text.TextPaint;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.FloatProperty;
|
||||
import android.util.Log;
|
||||
import android.util.Property;
|
||||
import android.util.SparseBooleanArray;
|
||||
import android.view.HapticFeedbackConstants;
|
||||
@@ -694,7 +695,7 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
|
||||
final int pageIndex = requiredTaskCount - i - 1 + mTaskViewStartIndex;
|
||||
final Task task = tasks.get(i);
|
||||
final TaskView taskView = (TaskView) getChildAt(pageIndex);
|
||||
taskView.bind(task, mOrientationState);
|
||||
taskView.bind(task, mOrientationState, mActivity.getDeviceProfile().isMultiWindowMode);
|
||||
}
|
||||
|
||||
if (mNextPage == INVALID_PAGE) {
|
||||
@@ -1071,7 +1072,8 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
|
||||
new ComponentName(getContext(), getClass()), 0, 0), null, null, "", "", 0, 0,
|
||||
false, true, false, false, new ActivityManager.TaskDescription(), 0,
|
||||
new ComponentName("", ""), false);
|
||||
taskView.bind(mTmpRunningTask, mOrientationState);
|
||||
taskView.bind(mTmpRunningTask, mOrientationState,
|
||||
mActivity.getDeviceProfile().isMultiWindowMode);
|
||||
}
|
||||
|
||||
boolean runningTaskTileHidden = mRunningTaskTileHidden;
|
||||
|
||||
+5
-2
@@ -36,6 +36,7 @@ import android.graphics.RectF;
|
||||
import android.graphics.Shader;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.FloatProperty;
|
||||
import android.util.Log;
|
||||
import android.util.Property;
|
||||
import android.view.Surface;
|
||||
import android.view.View;
|
||||
@@ -104,6 +105,7 @@ public class TaskThumbnailView extends View implements PluginListener<OverviewSc
|
||||
|
||||
private boolean mOverlayEnabled;
|
||||
private OverviewScreenshotActions mOverviewScreenshotActionsPlugin;
|
||||
private boolean mIsMultiWindowMode;
|
||||
|
||||
public TaskThumbnailView(Context context) {
|
||||
this(context, null);
|
||||
@@ -125,7 +127,8 @@ public class TaskThumbnailView extends View implements PluginListener<OverviewSc
|
||||
mPreviewPositionHelper = new PreviewPositionHelper(context);
|
||||
}
|
||||
|
||||
public void bind(Task task) {
|
||||
public void bind(Task task, boolean isMultiWindowMode) {
|
||||
mIsMultiWindowMode = isMultiWindowMode;
|
||||
mOverlay.reset();
|
||||
mTask = task;
|
||||
int color = task == null ? Color.BLACK : task.colorBackground | 0xFF000000;
|
||||
@@ -351,7 +354,7 @@ public class TaskThumbnailView extends View implements PluginListener<OverviewSc
|
||||
mPreviewRect.set(0, 0, mThumbnailData.thumbnail.getWidth(),
|
||||
mThumbnailData.thumbnail.getHeight());
|
||||
mPreviewPositionHelper.updateThumbnailMatrix(mPreviewRect, mThumbnailData,
|
||||
mActivity.isInMultiWindowMode(), getMeasuredWidth(), getMeasuredHeight());
|
||||
mIsMultiWindowMode, getMeasuredWidth(), getMeasuredHeight());
|
||||
|
||||
mBitmapShader.setLocalMatrix(mPreviewPositionHelper.mMatrix);
|
||||
mPaint.setShader(mBitmapShader);
|
||||
|
||||
@@ -295,11 +295,14 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable {
|
||||
|
||||
/**
|
||||
* Updates this task view to the given {@param task}.
|
||||
*
|
||||
* TODO(b/142282126) Re-evaluate if we need to pass in isMultiWindowMode after
|
||||
* that issue is fixed
|
||||
*/
|
||||
public void bind(Task task, RecentsOrientedState orientedState) {
|
||||
public void bind(Task task, RecentsOrientedState orientedState, boolean isMultiWindowMode) {
|
||||
cancelPendingLoadTasks();
|
||||
mTask = task;
|
||||
mSnapshotView.bind(task);
|
||||
mSnapshotView.bind(task, isMultiWindowMode);
|
||||
setOrientationState(orientedState);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user