Loading quickstep/src/com/android/quickstep/views/TaskView.java +12 −33 Original line number Diff line number Diff line Loading @@ -135,8 +135,6 @@ import java.util.stream.Stream; public class TaskView extends FrameLayout implements Reusable { private static final String TAG = TaskView.class.getSimpleName(); private static final boolean DEBUG = false; public static final int FLAG_UPDATE_ICON = 1; public static final int FLAG_UPDATE_THUMBNAIL = FLAG_UPDATE_ICON << 1; public static final int FLAG_UPDATE_CORNER_RADIUS = FLAG_UPDATE_THUMBNAIL << 1; Loading Loading @@ -184,7 +182,7 @@ public class TaskView extends FrameLayout implements Reusable { Collections.singletonList(new Rect()); public static final FloatProperty<TaskView> FOCUS_TRANSITION = new FloatProperty<TaskView>("focusTransition") { new FloatProperty<>("focusTransition") { @Override public void setValue(TaskView taskView, float v) { taskView.setIconsAndBannersTransitionProgress(v, false /* invert */); Loading @@ -197,7 +195,7 @@ public class TaskView extends FrameLayout implements Reusable { }; private static final FloatProperty<TaskView> SPLIT_SELECT_TRANSLATION_X = new FloatProperty<TaskView>("splitSelectTranslationX") { new FloatProperty<>("splitSelectTranslationX") { @Override public void setValue(TaskView taskView, float v) { taskView.setSplitSelectTranslationX(v); Loading @@ -210,7 +208,7 @@ public class TaskView extends FrameLayout implements Reusable { }; private static final FloatProperty<TaskView> SPLIT_SELECT_TRANSLATION_Y = new FloatProperty<TaskView>("splitSelectTranslationY") { new FloatProperty<>("splitSelectTranslationY") { @Override public void setValue(TaskView taskView, float v) { taskView.setSplitSelectTranslationY(v); Loading @@ -223,7 +221,7 @@ public class TaskView extends FrameLayout implements Reusable { }; private static final FloatProperty<TaskView> DISMISS_TRANSLATION_X = new FloatProperty<TaskView>("dismissTranslationX") { new FloatProperty<>("dismissTranslationX") { @Override public void setValue(TaskView taskView, float v) { taskView.setDismissTranslationX(v); Loading @@ -236,7 +234,7 @@ public class TaskView extends FrameLayout implements Reusable { }; private static final FloatProperty<TaskView> DISMISS_TRANSLATION_Y = new FloatProperty<TaskView>("dismissTranslationY") { new FloatProperty<>("dismissTranslationY") { @Override public void setValue(TaskView taskView, float v) { taskView.setDismissTranslationY(v); Loading @@ -249,7 +247,7 @@ public class TaskView extends FrameLayout implements Reusable { }; private static final FloatProperty<TaskView> TASK_OFFSET_TRANSLATION_X = new FloatProperty<TaskView>("taskOffsetTranslationX") { new FloatProperty<>("taskOffsetTranslationX") { @Override public void setValue(TaskView taskView, float v) { taskView.setTaskOffsetTranslationX(v); Loading @@ -262,7 +260,7 @@ public class TaskView extends FrameLayout implements Reusable { }; private static final FloatProperty<TaskView> TASK_OFFSET_TRANSLATION_Y = new FloatProperty<TaskView>("taskOffsetTranslationY") { new FloatProperty<>("taskOffsetTranslationY") { @Override public void setValue(TaskView taskView, float v) { taskView.setTaskOffsetTranslationY(v); Loading @@ -275,7 +273,7 @@ public class TaskView extends FrameLayout implements Reusable { }; private static final FloatProperty<TaskView> TASK_RESISTANCE_TRANSLATION_X = new FloatProperty<TaskView>("taskResistanceTranslationX") { new FloatProperty<>("taskResistanceTranslationX") { @Override public void setValue(TaskView taskView, float v) { taskView.setTaskResistanceTranslationX(v); Loading @@ -288,7 +286,7 @@ public class TaskView extends FrameLayout implements Reusable { }; private static final FloatProperty<TaskView> TASK_RESISTANCE_TRANSLATION_Y = new FloatProperty<TaskView>("taskResistanceTranslationY") { new FloatProperty<>("taskResistanceTranslationY") { @Override public void setValue(TaskView taskView, float v) { taskView.setTaskResistanceTranslationY(v); Loading @@ -301,7 +299,7 @@ public class TaskView extends FrameLayout implements Reusable { }; public static final FloatProperty<TaskView> GRID_END_TRANSLATION_X = new FloatProperty<TaskView>("gridEndTranslationX") { new FloatProperty<>("gridEndTranslationX") { @Override public void setValue(TaskView taskView, float v) { taskView.setGridEndTranslationX(v); Loading @@ -314,7 +312,7 @@ public class TaskView extends FrameLayout implements Reusable { }; public static final FloatProperty<TaskView> SNAPSHOT_SCALE = new FloatProperty<TaskView>("snapshotScale") { new FloatProperty<>("snapshotScale") { @Override public void setValue(TaskView taskView, float v) { taskView.setSnapshotScale(v); Loading Loading @@ -602,10 +600,7 @@ public class TaskView extends FrameLayout implements Reusable { if (event.getAction() == MotionEvent.ACTION_DOWN) { computeAndSetIconTouchDelegate(mIconView, mIconCenterCoords, mIconTouchDelegate); } if (mIconTouchDelegate != null && mIconTouchDelegate.onTouchEvent(event)) { return true; } return false; return mIconTouchDelegate != null && mIconTouchDelegate.onTouchEvent(event); } protected void computeAndSetIconTouchDelegate(TaskViewIcon view, float[] tempCenterCoords, Loading Loading @@ -647,9 +642,6 @@ public class TaskView extends FrameLayout implements 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) { cancelPendingLoadTasks(); Loading Loading @@ -1594,19 +1586,6 @@ public class TaskView extends FrameLayout implements Reusable { mEndQuickswitchCuj = endQuickswitchCuj; } private int getExpectedViewHeight(View view) { int expectedHeight; int h = view.getLayoutParams().height; if (h > 0) { expectedHeight = h; } else { int m = MeasureSpec.makeMeasureSpec(MeasureSpec.EXACTLY - 1, MeasureSpec.AT_MOST); view.measure(m, m); expectedHeight = view.getMeasuredHeight(); } return expectedHeight; } @Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); Loading Loading
quickstep/src/com/android/quickstep/views/TaskView.java +12 −33 Original line number Diff line number Diff line Loading @@ -135,8 +135,6 @@ import java.util.stream.Stream; public class TaskView extends FrameLayout implements Reusable { private static final String TAG = TaskView.class.getSimpleName(); private static final boolean DEBUG = false; public static final int FLAG_UPDATE_ICON = 1; public static final int FLAG_UPDATE_THUMBNAIL = FLAG_UPDATE_ICON << 1; public static final int FLAG_UPDATE_CORNER_RADIUS = FLAG_UPDATE_THUMBNAIL << 1; Loading Loading @@ -184,7 +182,7 @@ public class TaskView extends FrameLayout implements Reusable { Collections.singletonList(new Rect()); public static final FloatProperty<TaskView> FOCUS_TRANSITION = new FloatProperty<TaskView>("focusTransition") { new FloatProperty<>("focusTransition") { @Override public void setValue(TaskView taskView, float v) { taskView.setIconsAndBannersTransitionProgress(v, false /* invert */); Loading @@ -197,7 +195,7 @@ public class TaskView extends FrameLayout implements Reusable { }; private static final FloatProperty<TaskView> SPLIT_SELECT_TRANSLATION_X = new FloatProperty<TaskView>("splitSelectTranslationX") { new FloatProperty<>("splitSelectTranslationX") { @Override public void setValue(TaskView taskView, float v) { taskView.setSplitSelectTranslationX(v); Loading @@ -210,7 +208,7 @@ public class TaskView extends FrameLayout implements Reusable { }; private static final FloatProperty<TaskView> SPLIT_SELECT_TRANSLATION_Y = new FloatProperty<TaskView>("splitSelectTranslationY") { new FloatProperty<>("splitSelectTranslationY") { @Override public void setValue(TaskView taskView, float v) { taskView.setSplitSelectTranslationY(v); Loading @@ -223,7 +221,7 @@ public class TaskView extends FrameLayout implements Reusable { }; private static final FloatProperty<TaskView> DISMISS_TRANSLATION_X = new FloatProperty<TaskView>("dismissTranslationX") { new FloatProperty<>("dismissTranslationX") { @Override public void setValue(TaskView taskView, float v) { taskView.setDismissTranslationX(v); Loading @@ -236,7 +234,7 @@ public class TaskView extends FrameLayout implements Reusable { }; private static final FloatProperty<TaskView> DISMISS_TRANSLATION_Y = new FloatProperty<TaskView>("dismissTranslationY") { new FloatProperty<>("dismissTranslationY") { @Override public void setValue(TaskView taskView, float v) { taskView.setDismissTranslationY(v); Loading @@ -249,7 +247,7 @@ public class TaskView extends FrameLayout implements Reusable { }; private static final FloatProperty<TaskView> TASK_OFFSET_TRANSLATION_X = new FloatProperty<TaskView>("taskOffsetTranslationX") { new FloatProperty<>("taskOffsetTranslationX") { @Override public void setValue(TaskView taskView, float v) { taskView.setTaskOffsetTranslationX(v); Loading @@ -262,7 +260,7 @@ public class TaskView extends FrameLayout implements Reusable { }; private static final FloatProperty<TaskView> TASK_OFFSET_TRANSLATION_Y = new FloatProperty<TaskView>("taskOffsetTranslationY") { new FloatProperty<>("taskOffsetTranslationY") { @Override public void setValue(TaskView taskView, float v) { taskView.setTaskOffsetTranslationY(v); Loading @@ -275,7 +273,7 @@ public class TaskView extends FrameLayout implements Reusable { }; private static final FloatProperty<TaskView> TASK_RESISTANCE_TRANSLATION_X = new FloatProperty<TaskView>("taskResistanceTranslationX") { new FloatProperty<>("taskResistanceTranslationX") { @Override public void setValue(TaskView taskView, float v) { taskView.setTaskResistanceTranslationX(v); Loading @@ -288,7 +286,7 @@ public class TaskView extends FrameLayout implements Reusable { }; private static final FloatProperty<TaskView> TASK_RESISTANCE_TRANSLATION_Y = new FloatProperty<TaskView>("taskResistanceTranslationY") { new FloatProperty<>("taskResistanceTranslationY") { @Override public void setValue(TaskView taskView, float v) { taskView.setTaskResistanceTranslationY(v); Loading @@ -301,7 +299,7 @@ public class TaskView extends FrameLayout implements Reusable { }; public static final FloatProperty<TaskView> GRID_END_TRANSLATION_X = new FloatProperty<TaskView>("gridEndTranslationX") { new FloatProperty<>("gridEndTranslationX") { @Override public void setValue(TaskView taskView, float v) { taskView.setGridEndTranslationX(v); Loading @@ -314,7 +312,7 @@ public class TaskView extends FrameLayout implements Reusable { }; public static final FloatProperty<TaskView> SNAPSHOT_SCALE = new FloatProperty<TaskView>("snapshotScale") { new FloatProperty<>("snapshotScale") { @Override public void setValue(TaskView taskView, float v) { taskView.setSnapshotScale(v); Loading Loading @@ -602,10 +600,7 @@ public class TaskView extends FrameLayout implements Reusable { if (event.getAction() == MotionEvent.ACTION_DOWN) { computeAndSetIconTouchDelegate(mIconView, mIconCenterCoords, mIconTouchDelegate); } if (mIconTouchDelegate != null && mIconTouchDelegate.onTouchEvent(event)) { return true; } return false; return mIconTouchDelegate != null && mIconTouchDelegate.onTouchEvent(event); } protected void computeAndSetIconTouchDelegate(TaskViewIcon view, float[] tempCenterCoords, Loading Loading @@ -647,9 +642,6 @@ public class TaskView extends FrameLayout implements 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) { cancelPendingLoadTasks(); Loading Loading @@ -1594,19 +1586,6 @@ public class TaskView extends FrameLayout implements Reusable { mEndQuickswitchCuj = endQuickswitchCuj; } private int getExpectedViewHeight(View view) { int expectedHeight; int h = view.getLayoutParams().height; if (h > 0) { expectedHeight = h; } else { int m = MeasureSpec.makeMeasureSpec(MeasureSpec.EXACTLY - 1, MeasureSpec.AT_MOST); view.measure(m, m); expectedHeight = view.getMeasuredHeight(); } return expectedHeight; } @Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); Loading