Remove floating task button from taskbar

Not POR to have a button in taskbar for this so removing this bit
of the prototype.

Test: manual - enable floating tasks on tablet and check if there's
               a button in taskbar (there shouldn't be).
Bug: 237678727
Change-Id: Ifb57f6528946f89592649afda84101e4f9cbb198
This commit is contained in:
Mady Mellor
2022-10-27 17:00:43 -07:00
parent 276e72c249
commit 10856068bc
8 changed files with 3 additions and 220 deletions

View File

@@ -16,14 +16,11 @@
package com.android.launcher3.taskbar;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.os.SystemProperties;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
@@ -85,12 +82,6 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
private View mQsb;
// Only non-null when device supports having a floating task.
private @Nullable View mFloatingTaskButton;
private @Nullable Intent mFloatingTaskIntent;
private static final boolean FLOATING_TASKS_ENABLED =
SystemProperties.getBoolean("persist.wm.debug.floating_tasks", false);
public TaskbarView(@NonNull Context context) {
this(context, null);
}
@@ -139,17 +130,6 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
// TODO: Disable touch events on QSB otherwise it can crash.
mQsb = LayoutInflater.from(context).inflate(R.layout.search_container_hotseat, this, false);
if (FLOATING_TASKS_ENABLED) {
mFloatingTaskIntent = FloatingTaskIntentResolver.getIntent(context);
if (mFloatingTaskIntent != null) {
mFloatingTaskButton = LayoutInflater.from(context)
.inflate(R.layout.taskbar_floating_task_button, this, false);
mFloatingTaskButton.setPadding(mItemPadding, mItemPadding, mItemPadding,
mItemPadding);
} else {
Log.d(TAG, "Floating tasks is enabled but no intent was found!");
}
}
}
private int getColorWithGivenLuminance(int color, float luminance) {
@@ -177,10 +157,6 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
if (mAllAppsButton != null) {
mAllAppsButton.setOnClickListener(mControllerCallbacks.getAllAppsButtonClickListener());
}
if (mFloatingTaskButton != null) {
mFloatingTaskButton.setOnClickListener(
mControllerCallbacks.getFloatingTaskButtonListener(mFloatingTaskIntent));
}
}
private void removeAndRecycle(View view) {
@@ -205,9 +181,6 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
}
removeView(mQsb);
if (mFloatingTaskButton != null) {
removeView(mFloatingTaskButton);
}
for (int i = 0; i < hotseatItemInfos.length; i++) {
ItemInfo hotseatItemInfo = hotseatItemInfos[i];
@@ -290,11 +263,6 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
mQsb.setVisibility(View.INVISIBLE);
}
if (mFloatingTaskButton != null) {
int index = Utilities.isRtl(getResources()) ? 0 : getChildCount();
addView(mFloatingTaskButton, index);
}
mThemeIconsBackground = calculateThemeIconsBackground();
setThemedIconsBackgroundColor(mThemeIconsBackground);
}