Remove unused code and fix warnings
Bug: 330326121 Test: Presubmit - change is a no-op Flag: NA Change-Id: If656113fce6bae82466d9482a92a15f689da00b6
This commit is contained in:
@@ -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;
|
||||
@@ -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 */);
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
@@ -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,
|
||||
@@ -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();
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user