Loading quickstep/src/com/android/launcher3/taskbar/DesktopTaskbarUIController.java +9 −0 Original line number Original line Diff line number Diff line Loading @@ -16,7 +16,10 @@ package com.android.launcher3.taskbar; package com.android.launcher3.taskbar; import androidx.annotation.Nullable; import com.android.launcher3.uioverrides.QuickstepLauncher; import com.android.launcher3.uioverrides.QuickstepLauncher; import com.android.quickstep.util.TISBindHelper; /** /** * A data source which integrates with a Launcher instance, used specifically for a * A data source which integrates with a Launcher instance, used specifically for a Loading Loading @@ -50,4 +53,10 @@ public class DesktopTaskbarUIController extends TaskbarUIController { public boolean supportsVisualStashing() { public boolean supportsVisualStashing() { return false; return false; } } @Nullable @Override protected TISBindHelper getTISBindHelper() { return mLauncher.getTISBindHelper(); } } } quickstep/src/com/android/launcher3/taskbar/FallbackTaskbarUIController.java +9 −0 Original line number Original line Diff line number Diff line Loading @@ -21,11 +21,14 @@ import static com.android.launcher3.taskbar.TaskbarStashController.FLAG_IN_STASH import android.animation.Animator; import android.animation.Animator; import androidx.annotation.Nullable; import com.android.launcher3.popup.SystemShortcut; import com.android.launcher3.popup.SystemShortcut; import com.android.launcher3.statemanager.StateManager; import com.android.launcher3.statemanager.StateManager; import com.android.quickstep.RecentsActivity; import com.android.quickstep.RecentsActivity; import com.android.quickstep.TopTaskTracker; import com.android.quickstep.TopTaskTracker; import com.android.quickstep.fallback.RecentsState; import com.android.quickstep.fallback.RecentsState; import com.android.quickstep.util.TISBindHelper; import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.RecentsView; import java.util.stream.Stream; import java.util.stream.Stream; Loading Loading @@ -124,4 +127,10 @@ public class FallbackTaskbarUIController extends TaskbarUIController { .get(mControllers.taskbarActivityContext).getCachedTopTask(true); .get(mControllers.taskbarActivityContext).getCachedTopTask(true); return topTask.isHomeTask() || topTask.isRecentsTask(); return topTask.isHomeTask() || topTask.isRecentsTask(); } } @Nullable @Override protected TISBindHelper getTISBindHelper() { return mRecentsActivity.getTISBindHelper(); } } } quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchView.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -147,7 +147,7 @@ public class KeyboardQuickSwitchView extends ConstraintLayout { KeyboardQuickSwitchTaskView taskView = (KeyboardQuickSwitchTaskView) layoutInflater.inflate( KeyboardQuickSwitchTaskView taskView = (KeyboardQuickSwitchTaskView) layoutInflater.inflate( R.layout.keyboard_quick_switch_taskview, mContent, false); R.layout.keyboard_quick_switch_taskview, mContent, false); taskView.setId(View.generateViewId()); taskView.setId(View.generateViewId()); taskView.setOnClickListener(v -> mViewCallbacks.launchTappedTask(index)); taskView.setOnClickListener(v -> mViewCallbacks.launchTaskAt(index)); LayoutParams lp = new LayoutParams(width, mTaskViewHeight); LayoutParams lp = new LayoutParams(width, mTaskViewHeight); // Create a left-to-right ordering of views (or right-to-left in RTL locales) // Create a left-to-right ordering of views (or right-to-left in RTL locales) Loading Loading @@ -186,7 +186,7 @@ public class KeyboardQuickSwitchView extends ConstraintLayout { KeyboardQuickSwitchTaskView overviewButton = KeyboardQuickSwitchTaskView overviewButton = (KeyboardQuickSwitchTaskView) layoutInflater.inflate( (KeyboardQuickSwitchTaskView) layoutInflater.inflate( R.layout.keyboard_quick_switch_overview, this, false); R.layout.keyboard_quick_switch_overview, this, false); overviewButton.setOnClickListener(v -> mViewCallbacks.launchTappedTask(MAX_TASKS)); overviewButton.setOnClickListener(v -> mViewCallbacks.launchTaskAt(MAX_TASKS)); overviewButton.<TextView>findViewById(R.id.text).setText(overflowString); overviewButton.<TextView>findViewById(R.id.text).setText(overflowString); Loading quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchViewController.java +10 −6 Original line number Original line Diff line number Diff line Loading @@ -22,7 +22,6 @@ import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR; import android.animation.Animator; import android.animation.Animator; import android.app.ActivityOptions; import android.app.ActivityOptions; import android.view.KeyEvent; import android.view.KeyEvent; import android.view.View; import android.view.animation.AnimationUtils; import android.view.animation.AnimationUtils; import android.window.RemoteTransition; import android.window.RemoteTransition; Loading Loading @@ -137,7 +136,6 @@ public class KeyboardQuickSwitchViewController { } } // Even with a valid index, this can be null if the user tries to quick switch before the // Even with a valid index, this can be null if the user tries to quick switch before the // views have been added in the KeyboardQuickSwitchView. // views have been added in the KeyboardQuickSwitchView. View taskView = mKeyboardQuickSwitchView.getTaskAt(index); GroupTask task = mControllerCallbacks.getTaskAt(index); GroupTask task = mControllerCallbacks.getTaskAt(index); if (task == null) { if (task == null) { return Math.max(0, index); return Math.max(0, index); Loading Loading @@ -198,13 +196,18 @@ public class KeyboardQuickSwitchViewController { && keyCode != KeyEvent.KEYCODE_DPAD_RIGHT && keyCode != KeyEvent.KEYCODE_DPAD_RIGHT && keyCode != KeyEvent.KEYCODE_DPAD_LEFT && keyCode != KeyEvent.KEYCODE_DPAD_LEFT && keyCode != KeyEvent.KEYCODE_GRAVE && keyCode != KeyEvent.KEYCODE_GRAVE && keyCode != KeyEvent.KEYCODE_ESCAPE) { && keyCode != KeyEvent.KEYCODE_ESCAPE && keyCode != KeyEvent.KEYCODE_ENTER) { return false; return false; } } if (keyCode == KeyEvent.KEYCODE_GRAVE || keyCode == KeyEvent.KEYCODE_ESCAPE) { if (keyCode == KeyEvent.KEYCODE_GRAVE || keyCode == KeyEvent.KEYCODE_ESCAPE) { closeQuickSwitchView(true); closeQuickSwitchView(true); return true; return true; } } if (keyCode == KeyEvent.KEYCODE_ENTER) { launchTaskAt(mCurrentFocusIndex); return true; } if (!allowTraversal) { if (!allowTraversal) { return false; return false; } } Loading Loading @@ -234,9 +237,10 @@ public class KeyboardQuickSwitchViewController { mCurrentFocusIndex = index; mCurrentFocusIndex = index; } } void launchTappedTask(int index) { void launchTaskAt(int index) { KeyboardQuickSwitchViewController.this.launchTaskAt(index); mCurrentFocusIndex = Utilities.boundToRange( closeQuickSwitchView(true); index, 0, mKeyboardQuickSwitchView.getChildCount() - 1); mControllers.taskbarActivityContext.launchKeyboardFocusedTask(); } } void updateThumbnailInBackground(Task task, Consumer<ThumbnailData> callback) { void updateThumbnailInBackground(Task task, Consumer<ThumbnailData> callback) { Loading quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java +7 −0 Original line number Original line Diff line number Diff line Loading @@ -52,6 +52,7 @@ import com.android.launcher3.util.OnboardingPrefs; import com.android.quickstep.LauncherActivityInterface; import com.android.quickstep.LauncherActivityInterface; import com.android.quickstep.RecentsAnimationCallbacks; import com.android.quickstep.RecentsAnimationCallbacks; import com.android.quickstep.util.GroupTask; import com.android.quickstep.util.GroupTask; import com.android.quickstep.util.TISBindHelper; import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.RecentsView; import java.io.PrintWriter; import java.io.PrintWriter; Loading Loading @@ -428,6 +429,12 @@ public class LauncherTaskbarUIController extends TaskbarUIController { mTaskbarLauncherStateController.resetIconAlignment(); mTaskbarLauncherStateController.resetIconAlignment(); } } @Nullable @Override protected TISBindHelper getTISBindHelper() { return mLauncher.getTISBindHelper(); } @Override @Override public void dumpLogs(String prefix, PrintWriter pw) { public void dumpLogs(String prefix, PrintWriter pw) { super.dumpLogs(prefix, pw); super.dumpLogs(prefix, pw); Loading Loading
quickstep/src/com/android/launcher3/taskbar/DesktopTaskbarUIController.java +9 −0 Original line number Original line Diff line number Diff line Loading @@ -16,7 +16,10 @@ package com.android.launcher3.taskbar; package com.android.launcher3.taskbar; import androidx.annotation.Nullable; import com.android.launcher3.uioverrides.QuickstepLauncher; import com.android.launcher3.uioverrides.QuickstepLauncher; import com.android.quickstep.util.TISBindHelper; /** /** * A data source which integrates with a Launcher instance, used specifically for a * A data source which integrates with a Launcher instance, used specifically for a Loading Loading @@ -50,4 +53,10 @@ public class DesktopTaskbarUIController extends TaskbarUIController { public boolean supportsVisualStashing() { public boolean supportsVisualStashing() { return false; return false; } } @Nullable @Override protected TISBindHelper getTISBindHelper() { return mLauncher.getTISBindHelper(); } } }
quickstep/src/com/android/launcher3/taskbar/FallbackTaskbarUIController.java +9 −0 Original line number Original line Diff line number Diff line Loading @@ -21,11 +21,14 @@ import static com.android.launcher3.taskbar.TaskbarStashController.FLAG_IN_STASH import android.animation.Animator; import android.animation.Animator; import androidx.annotation.Nullable; import com.android.launcher3.popup.SystemShortcut; import com.android.launcher3.popup.SystemShortcut; import com.android.launcher3.statemanager.StateManager; import com.android.launcher3.statemanager.StateManager; import com.android.quickstep.RecentsActivity; import com.android.quickstep.RecentsActivity; import com.android.quickstep.TopTaskTracker; import com.android.quickstep.TopTaskTracker; import com.android.quickstep.fallback.RecentsState; import com.android.quickstep.fallback.RecentsState; import com.android.quickstep.util.TISBindHelper; import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.RecentsView; import java.util.stream.Stream; import java.util.stream.Stream; Loading Loading @@ -124,4 +127,10 @@ public class FallbackTaskbarUIController extends TaskbarUIController { .get(mControllers.taskbarActivityContext).getCachedTopTask(true); .get(mControllers.taskbarActivityContext).getCachedTopTask(true); return topTask.isHomeTask() || topTask.isRecentsTask(); return topTask.isHomeTask() || topTask.isRecentsTask(); } } @Nullable @Override protected TISBindHelper getTISBindHelper() { return mRecentsActivity.getTISBindHelper(); } } }
quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchView.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -147,7 +147,7 @@ public class KeyboardQuickSwitchView extends ConstraintLayout { KeyboardQuickSwitchTaskView taskView = (KeyboardQuickSwitchTaskView) layoutInflater.inflate( KeyboardQuickSwitchTaskView taskView = (KeyboardQuickSwitchTaskView) layoutInflater.inflate( R.layout.keyboard_quick_switch_taskview, mContent, false); R.layout.keyboard_quick_switch_taskview, mContent, false); taskView.setId(View.generateViewId()); taskView.setId(View.generateViewId()); taskView.setOnClickListener(v -> mViewCallbacks.launchTappedTask(index)); taskView.setOnClickListener(v -> mViewCallbacks.launchTaskAt(index)); LayoutParams lp = new LayoutParams(width, mTaskViewHeight); LayoutParams lp = new LayoutParams(width, mTaskViewHeight); // Create a left-to-right ordering of views (or right-to-left in RTL locales) // Create a left-to-right ordering of views (or right-to-left in RTL locales) Loading Loading @@ -186,7 +186,7 @@ public class KeyboardQuickSwitchView extends ConstraintLayout { KeyboardQuickSwitchTaskView overviewButton = KeyboardQuickSwitchTaskView overviewButton = (KeyboardQuickSwitchTaskView) layoutInflater.inflate( (KeyboardQuickSwitchTaskView) layoutInflater.inflate( R.layout.keyboard_quick_switch_overview, this, false); R.layout.keyboard_quick_switch_overview, this, false); overviewButton.setOnClickListener(v -> mViewCallbacks.launchTappedTask(MAX_TASKS)); overviewButton.setOnClickListener(v -> mViewCallbacks.launchTaskAt(MAX_TASKS)); overviewButton.<TextView>findViewById(R.id.text).setText(overflowString); overviewButton.<TextView>findViewById(R.id.text).setText(overflowString); Loading
quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchViewController.java +10 −6 Original line number Original line Diff line number Diff line Loading @@ -22,7 +22,6 @@ import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR; import android.animation.Animator; import android.animation.Animator; import android.app.ActivityOptions; import android.app.ActivityOptions; import android.view.KeyEvent; import android.view.KeyEvent; import android.view.View; import android.view.animation.AnimationUtils; import android.view.animation.AnimationUtils; import android.window.RemoteTransition; import android.window.RemoteTransition; Loading Loading @@ -137,7 +136,6 @@ public class KeyboardQuickSwitchViewController { } } // Even with a valid index, this can be null if the user tries to quick switch before the // Even with a valid index, this can be null if the user tries to quick switch before the // views have been added in the KeyboardQuickSwitchView. // views have been added in the KeyboardQuickSwitchView. View taskView = mKeyboardQuickSwitchView.getTaskAt(index); GroupTask task = mControllerCallbacks.getTaskAt(index); GroupTask task = mControllerCallbacks.getTaskAt(index); if (task == null) { if (task == null) { return Math.max(0, index); return Math.max(0, index); Loading Loading @@ -198,13 +196,18 @@ public class KeyboardQuickSwitchViewController { && keyCode != KeyEvent.KEYCODE_DPAD_RIGHT && keyCode != KeyEvent.KEYCODE_DPAD_RIGHT && keyCode != KeyEvent.KEYCODE_DPAD_LEFT && keyCode != KeyEvent.KEYCODE_DPAD_LEFT && keyCode != KeyEvent.KEYCODE_GRAVE && keyCode != KeyEvent.KEYCODE_GRAVE && keyCode != KeyEvent.KEYCODE_ESCAPE) { && keyCode != KeyEvent.KEYCODE_ESCAPE && keyCode != KeyEvent.KEYCODE_ENTER) { return false; return false; } } if (keyCode == KeyEvent.KEYCODE_GRAVE || keyCode == KeyEvent.KEYCODE_ESCAPE) { if (keyCode == KeyEvent.KEYCODE_GRAVE || keyCode == KeyEvent.KEYCODE_ESCAPE) { closeQuickSwitchView(true); closeQuickSwitchView(true); return true; return true; } } if (keyCode == KeyEvent.KEYCODE_ENTER) { launchTaskAt(mCurrentFocusIndex); return true; } if (!allowTraversal) { if (!allowTraversal) { return false; return false; } } Loading Loading @@ -234,9 +237,10 @@ public class KeyboardQuickSwitchViewController { mCurrentFocusIndex = index; mCurrentFocusIndex = index; } } void launchTappedTask(int index) { void launchTaskAt(int index) { KeyboardQuickSwitchViewController.this.launchTaskAt(index); mCurrentFocusIndex = Utilities.boundToRange( closeQuickSwitchView(true); index, 0, mKeyboardQuickSwitchView.getChildCount() - 1); mControllers.taskbarActivityContext.launchKeyboardFocusedTask(); } } void updateThumbnailInBackground(Task task, Consumer<ThumbnailData> callback) { void updateThumbnailInBackground(Task task, Consumer<ThumbnailData> callback) { Loading
quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java +7 −0 Original line number Original line Diff line number Diff line Loading @@ -52,6 +52,7 @@ import com.android.launcher3.util.OnboardingPrefs; import com.android.quickstep.LauncherActivityInterface; import com.android.quickstep.LauncherActivityInterface; import com.android.quickstep.RecentsAnimationCallbacks; import com.android.quickstep.RecentsAnimationCallbacks; import com.android.quickstep.util.GroupTask; import com.android.quickstep.util.GroupTask; import com.android.quickstep.util.TISBindHelper; import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.RecentsView; import java.io.PrintWriter; import java.io.PrintWriter; Loading Loading @@ -428,6 +429,12 @@ public class LauncherTaskbarUIController extends TaskbarUIController { mTaskbarLauncherStateController.resetIconAlignment(); mTaskbarLauncherStateController.resetIconAlignment(); } } @Nullable @Override protected TISBindHelper getTISBindHelper() { return mLauncher.getTISBindHelper(); } @Override @Override public void dumpLogs(String prefix, PrintWriter pw) { public void dumpLogs(String prefix, PrintWriter pw) { super.dumpLogs(prefix, pw); super.dumpLogs(prefix, pw); Loading