Merge "Remove obsolete ChipsContainer" into ub-launcher3-qt-dev
diff --git a/quickstep/recents_ui_overrides/res/layout/hint_container.xml b/quickstep/recents_ui_overrides/res/layout/hint_container.xml
deleted file mode 100644
index f8723fc..0000000
--- a/quickstep/recents_ui_overrides/res/layout/hint_container.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2019 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<com.android.quickstep.hints.ChipsContainer
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="@dimen/chip_hint_height"
- android:layout_gravity="bottom"
- android:gravity="center_horizontal"
- android:orientation="horizontal"/>
\ No newline at end of file
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsViewStateController.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
index 0d5574f..2267412 100644
--- a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
+++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
@@ -49,9 +49,6 @@
if (state.overviewUi) {
mRecentsView.updateEmptyMessage();
mRecentsView.resetTaskVisuals();
- mRecentsView.setHintVisibility(1);
- } else {
- mRecentsView.setHintVisibility(0);
}
}
@@ -62,7 +59,6 @@
if (!toState.overviewUi) {
builder.addOnFinishRunnable(mRecentsView::resetTaskVisuals);
- mRecentsView.setHintVisibility(0);
}
if (toState.overviewUi) {
@@ -74,7 +70,6 @@
updateAnim.setDuration(config.duration);
builder.play(updateAnim);
mRecentsView.updateEmptyMessage();
- builder.addOnFinishRunnable(() -> mRecentsView.setHintVisibility(1));
}
}
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/hints/ChipsContainer.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/hints/ChipsContainer.java
deleted file mode 100644
index 8fc89f2..0000000
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/hints/ChipsContainer.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.quickstep.hints;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.util.FloatProperty;
-import android.view.View;
-import android.widget.FrameLayout;
-
-public class ChipsContainer extends FrameLayout {
-
- private static final String TAG = "ChipsContainer";
-
- public static final FloatProperty<ChipsContainer> HINT_VISIBILITY =
- new FloatProperty<ChipsContainer>("hint_visibility") {
- @Override
- public void setValue(ChipsContainer chipsContainer, float v) {
- chipsContainer.setHintVisibility(v);
- }
-
- @Override
- public Float get(ChipsContainer chipsContainer) {
- return chipsContainer.mHintVisibility;
- }
- };
-
- private float mHintVisibility;
-
- public ChipsContainer(Context context) {
- super(context);
- }
-
- public ChipsContainer(Context context, AttributeSet attrs) {
- super(context, attrs);
- }
-
- public ChipsContainer(Context context, AttributeSet attrs, int defStyleAttr) {
- super(context, attrs, defStyleAttr);
- }
-
- public ChipsContainer(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
- super(context, attrs, defStyleAttr, defStyleRes);
- }
-
- public void setView(View v) {
- removeAllViews();
- addView(v);
- }
-
- public void setHintVisibility(float v) {
- if (v == 1) {
- setVisibility(VISIBLE);
- } else {
- setVisibility(GONE);
- }
- mHintVisibility = v;
- }
-}
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java
index 1ccc3f1..efe16c5 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java
@@ -39,11 +39,9 @@
import com.android.launcher3.LauncherState;
import com.android.launcher3.R;
import com.android.launcher3.anim.Interpolators;
-import com.android.launcher3.util.PendingAnimation;
import com.android.launcher3.views.BaseDragLayer;
import com.android.launcher3.views.ScrimView;
import com.android.quickstep.SysUINavigationMode;
-import com.android.quickstep.hints.ChipsContainer;
import com.android.quickstep.util.ClipAnimationHelper;
import com.android.quickstep.util.ClipAnimationHelper.TransformParams;
import com.android.quickstep.util.LayoutUtils;
@@ -55,7 +53,6 @@
public class LauncherRecentsView extends RecentsView<Launcher> {
private final TransformParams mTransformParams = new TransformParams();
- private ChipsContainer mChipsContainer;
public LauncherRecentsView(Context context) {
this(context, null);
@@ -76,14 +73,6 @@
}
@Override
- protected void onAttachedToWindow() {
- super.onAttachedToWindow();
- mChipsContainer = mActivity.findViewById(R.id.hints);
- BaseDragLayer.LayoutParams params = (BaseDragLayer.LayoutParams) mChipsContainer.getLayoutParams();
- params.bottomMargin = mActivity.getDeviceProfile().chipHintBottomMarginPx;
- }
-
- @Override
public void setTranslationY(float translationY) {
super.setTranslationY(translationY);
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
@@ -94,16 +83,6 @@
}
}
- public void setHintVisibility(float v) {
- if (mChipsContainer != null && ENABLE_HINTS_IN_OVERVIEW.get()) {
- mChipsContainer.setHintVisibility(v);
- }
- }
-
- public ChipsContainer getChipsContainer() {
- return mChipsContainer;
- }
-
@Override
public void draw(Canvas canvas) {
maybeDrawEmptyMessage(canvas);
@@ -155,37 +134,6 @@
}
@Override
- public PendingAnimation createTaskLauncherAnimation(TaskView tv, long duration) {
- PendingAnimation anim = super.createTaskLauncherAnimation(tv, duration);
-
- if (ENABLE_HINTS_IN_OVERVIEW.get()) {
- anim.anim.play(ObjectAnimator.ofFloat(
- mChipsContainer, ChipsContainer.HINT_VISIBILITY, 0));
- }
-
- return anim;
- }
-
- @Override
- public PendingAnimation createTaskDismissAnimation(TaskView taskView, boolean animateTaskView,
- boolean shouldRemoveTask, long duration) {
- PendingAnimation anim = super.createTaskDismissAnimation(taskView, animateTaskView,
- shouldRemoveTask, duration);
-
- if (ENABLE_HINTS_IN_OVERVIEW.get()) {
- anim.anim.play(ObjectAnimator.ofFloat(
- mChipsContainer, ChipsContainer.HINT_VISIBILITY, 0));
- anim.addEndListener(onEndListener -> {
- if (!onEndListener.isSuccess) {
- mChipsContainer.setHintVisibility(1);
- }
- });
- }
-
- return anim;
- }
-
- @Override
protected void getTaskSize(DeviceProfile dp, Rect outRect) {
LayoutUtils.calculateLauncherTaskSize(getContext(), dp, outRect);
}
diff --git a/res/layout/hint_container.xml b/res/layout/hint_container.xml
deleted file mode 100644
index 75aa913..0000000
--- a/res/layout/hint_container.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2019 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<merge/>
\ No newline at end of file
diff --git a/res/layout/launcher.xml b/res/layout/launcher.xml
index c9cea80..6ecc1f5 100644
--- a/res/layout/launcher.xml
+++ b/res/layout/launcher.xml
@@ -52,11 +52,6 @@
layout="@layout/overview_panel"
android:visibility="gone" />
- <include
- android:id="@+id/hints"
- layout="@layout/hint_container"
- android:visibility="gone"/>
-
<!-- Keep these behind the workspace so that they are not visible when
we go into AllApps -->
<com.android.launcher3.pageindicators.WorkspacePageIndicator