Loading quickstep/res/values/colors.xml +1 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ <color name="taskbar_nav_icon_dark_color_on_home">#99000000</color> <color name="taskbar_stashed_handle_light_color">#EBffffff</color> <color name="taskbar_stashed_handle_dark_color">#99000000</color> <color name="taskbar_running_app_indicator_color">#646464</color> <!-- Floating rotation button --> <color name="floating_rotation_button_light_color">#ffffff</color> Loading quickstep/res/values/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -353,6 +353,9 @@ <dimen name="taskbar_back_button_suw_start_margin">48dp</dimen> <dimen name="taskbar_back_button_suw_bottom_margin">1dp</dimen> <dimen name="taskbar_back_button_suw_height">72dp</dimen> <dimen name="taskbar_running_app_indicator_height">4dp</dimen> <dimen name="taskbar_running_app_indicator_width">14dp</dimen> <dimen name="taskbar_running_app_indicator_top_margin">2dp</dimen> <!-- Transient taskbar --> <dimen name="transient_taskbar_padding">12dp</dimen> Loading quickstep/src/com/android/launcher3/taskbar/DesktopTaskbarRunningAppsController.kt +7 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,13 @@ class DesktopTaskbarRunningAppsController( return newHotseatItemInfos.toTypedArray() } override fun getRunningApps(): Set<String> { if (!isInDesktopMode) { return emptySet() } return allRunningDesktopAppInfos?.mapNotNull { it.targetPackage }?.toSet() ?: emptySet() } @VisibleForTesting public override fun updateRunningApps(hotseatItems: SparseArray<ItemInfo>?) { if (!isInDesktopMode) { Loading quickstep/src/com/android/launcher3/taskbar/TaskbarModelCallbacks.java +11 −2 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.function.Predicate; /** Loading Loading @@ -233,13 +234,21 @@ public class TaskbarModelCallbacks implements } hotseatItemInfos = mControllers.taskbarRecentAppsController .updateHotseatItemInfos(hotseatItemInfos); Set<String> runningPackages = mControllers.taskbarRecentAppsController.getRunningApps(); if (mDeferUpdatesForSUW) { ItemInfo[] finalHotseatItemInfos = hotseatItemInfos; mDeferredUpdates = () -> mContainer.updateHotseatItems(finalHotseatItemInfos); mDeferredUpdates = () -> commitHotseatItemUpdates(finalHotseatItemInfos, runningPackages); } else { mContainer.updateHotseatItems(hotseatItemInfos); commitHotseatItemUpdates(hotseatItemInfos, runningPackages); } } private void commitHotseatItemUpdates( ItemInfo[] hotseatItemInfos, Set<String> runningPackages) { mContainer.updateHotseatItems(hotseatItemInfos); mControllers.taskbarViewController.updateIconViewsRunningStates(runningPackages); } /** Loading quickstep/src/com/android/launcher3/taskbar/TaskbarRecentAppsController.java +13 −2 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ */ package com.android.launcher3.taskbar; import static java.util.Collections.emptySet; import android.util.SparseArray; import androidx.annotation.CallSuper; Loading @@ -22,6 +24,8 @@ import androidx.annotation.CallSuper; import com.android.launcher3.model.data.AppInfo; import com.android.launcher3.model.data.ItemInfo; import java.util.Set; /** * Base class for providing recent apps functionality */ Loading @@ -43,7 +47,8 @@ public class TaskbarRecentAppsController { } /** Stores the current {@link AppInfo} instances, no-op except in desktop environment. */ protected void setApps(AppInfo[] apps) { } protected void setApps(AppInfo[] apps) { } /** * Indicates whether recent apps functionality is enabled, should return false except in Loading @@ -59,5 +64,11 @@ public class TaskbarRecentAppsController { } /** Called to update the list of currently running apps, no-op except in desktop environment. */ protected void updateRunningApps(SparseArray<ItemInfo> hotseatItems) { } protected void updateRunningApps(SparseArray<ItemInfo> hotseatItems) { } /** Returns the currently running apps, or an empty Set if outside of Desktop environment. */ public Set<String> getRunningApps() { return emptySet(); } } Loading
quickstep/res/values/colors.xml +1 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ <color name="taskbar_nav_icon_dark_color_on_home">#99000000</color> <color name="taskbar_stashed_handle_light_color">#EBffffff</color> <color name="taskbar_stashed_handle_dark_color">#99000000</color> <color name="taskbar_running_app_indicator_color">#646464</color> <!-- Floating rotation button --> <color name="floating_rotation_button_light_color">#ffffff</color> Loading
quickstep/res/values/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -353,6 +353,9 @@ <dimen name="taskbar_back_button_suw_start_margin">48dp</dimen> <dimen name="taskbar_back_button_suw_bottom_margin">1dp</dimen> <dimen name="taskbar_back_button_suw_height">72dp</dimen> <dimen name="taskbar_running_app_indicator_height">4dp</dimen> <dimen name="taskbar_running_app_indicator_width">14dp</dimen> <dimen name="taskbar_running_app_indicator_top_margin">2dp</dimen> <!-- Transient taskbar --> <dimen name="transient_taskbar_padding">12dp</dimen> Loading
quickstep/src/com/android/launcher3/taskbar/DesktopTaskbarRunningAppsController.kt +7 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,13 @@ class DesktopTaskbarRunningAppsController( return newHotseatItemInfos.toTypedArray() } override fun getRunningApps(): Set<String> { if (!isInDesktopMode) { return emptySet() } return allRunningDesktopAppInfos?.mapNotNull { it.targetPackage }?.toSet() ?: emptySet() } @VisibleForTesting public override fun updateRunningApps(hotseatItems: SparseArray<ItemInfo>?) { if (!isInDesktopMode) { Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarModelCallbacks.java +11 −2 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.function.Predicate; /** Loading Loading @@ -233,13 +234,21 @@ public class TaskbarModelCallbacks implements } hotseatItemInfos = mControllers.taskbarRecentAppsController .updateHotseatItemInfos(hotseatItemInfos); Set<String> runningPackages = mControllers.taskbarRecentAppsController.getRunningApps(); if (mDeferUpdatesForSUW) { ItemInfo[] finalHotseatItemInfos = hotseatItemInfos; mDeferredUpdates = () -> mContainer.updateHotseatItems(finalHotseatItemInfos); mDeferredUpdates = () -> commitHotseatItemUpdates(finalHotseatItemInfos, runningPackages); } else { mContainer.updateHotseatItems(hotseatItemInfos); commitHotseatItemUpdates(hotseatItemInfos, runningPackages); } } private void commitHotseatItemUpdates( ItemInfo[] hotseatItemInfos, Set<String> runningPackages) { mContainer.updateHotseatItems(hotseatItemInfos); mControllers.taskbarViewController.updateIconViewsRunningStates(runningPackages); } /** Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarRecentAppsController.java +13 −2 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ */ package com.android.launcher3.taskbar; import static java.util.Collections.emptySet; import android.util.SparseArray; import androidx.annotation.CallSuper; Loading @@ -22,6 +24,8 @@ import androidx.annotation.CallSuper; import com.android.launcher3.model.data.AppInfo; import com.android.launcher3.model.data.ItemInfo; import java.util.Set; /** * Base class for providing recent apps functionality */ Loading @@ -43,7 +47,8 @@ public class TaskbarRecentAppsController { } /** Stores the current {@link AppInfo} instances, no-op except in desktop environment. */ protected void setApps(AppInfo[] apps) { } protected void setApps(AppInfo[] apps) { } /** * Indicates whether recent apps functionality is enabled, should return false except in Loading @@ -59,5 +64,11 @@ public class TaskbarRecentAppsController { } /** Called to update the list of currently running apps, no-op except in desktop environment. */ protected void updateRunningApps(SparseArray<ItemInfo> hotseatItems) { } protected void updateRunningApps(SparseArray<ItemInfo> hotseatItems) { } /** Returns the currently running apps, or an empty Set if outside of Desktop environment. */ public Set<String> getRunningApps() { return emptySet(); } }