Extract TaskbarViewCallbacks to a separate class + factory.

Also log long presses on the taskbar all apps button.

Test: Manual
Flag: NA
Change-Id: Id2bf194f09007bfccff9f83162e4bcfb6562580f
This commit is contained in:
Andy Wickham committed 2024-02-13 18:51:48 -08:00
1 parent c2ec07da51
commit 0ae51bcdb9
8 files changed
+163 -69

No files matched your search

@@ -85,7 +85,7 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
private final TaskbarActivityContext mActivityContext;
// Initialized in init.
private TaskbarViewController.TaskbarViewCallbacks mControllerCallbacks;
private TaskbarViewCallbacks mControllerCallbacks;
private View.OnClickListener mIconClickListener;
private View.OnLongClickListener mIconLongClickListener;
@@ -258,7 +258,7 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
return mIconTouchSize;
}
protected void init(TaskbarViewController.TaskbarViewCallbacks callbacks) {
protected void init(TaskbarViewCallbacks callbacks) {
// set taskbar pane title so that accessibility service know it window and focuses.
setAccessibilityPaneTitle(getContext().getString(R.string.taskbar_a11y_title));
mControllerCallbacks = callbacks;
@@ -267,6 +267,10 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
if (mAllAppsButton != null) {
mAllAppsButton.setOnClickListener(mControllerCallbacks.getAllAppsButtonClickListener());
mAllAppsButton.setOnLongClickListener(
mControllerCallbacks.getAllAppsButtonLongClickListener());
mAllAppsButton.setHapticFeedbackEnabled(
mControllerCallbacks.isAllAppsButtonHapticFeedbackEnabled());
}
if (mTaskbarDivider != null) {
mTaskbarDivider.setOnLongClickListener(