Commit Graph

10 Commits

Author SHA1 Message Date
Treehugger Robot
e5cebbd9ca Merge "Do not notify desk mode changes on visible desk tasks count changes" into main 2025-03-17 18:29:02 -07:00
Sukesh Ram
16e04e84eb [CD Taskbar] Move DisplayController method calls to BaseTaskbarContext
To ensure consistent, controllable Taskbar in Connected Displays Behavior, move all independent calls to the singleton DisplayController's various methods into one place in BaseTaskbarContext, where we have access to the parent context and can override default behaviors of these methods throughout taskbar if in external display.

Flag: EXEMPT not adding new behavior
Bug: 401553128
Test: m
Change-Id: If9efc0cfc18bac3ee75bb64bf5280ea979d1faa2
2025-03-17 03:15:45 -07:00
minch
c48f662c7d Do not notify desk mode changes on visible desk tasks count changes
1. Trigger `notifyIsInDesktopModeChanged` on
   `visibleDesktopTasksCount` changes only when the multi-desks
   flags are disabled.
2. Make `DesktopVisibilityController.isInDesktopMode` variable
   private and legacy, which should only be used when the multi-desks
   feature is disabled. All the call sites should go to check
   `DesktopVisibilityController.isInDesktopMode(displayId)`, which
    works both with and without the multi-desks feature enabled.

Bug: 402222877
Test: m
Flag: com.android.window.flags.enable_multiple_desktops_frontend
Flag: com.android.window.flags.enable_multiple_desktops_backend
Change-Id: I291e2be6d99e81b0c918ae7f39c17a8cd4ea0918
2025-03-14 15:21:19 +00:00
Jagrut Desai
8b2e5eff9b Desktop Mode Taskbar Recreate Animation
This Cl includes
       - addition of entry/exit callback methods in DesktopVisibilityController.
       - taskbar manager now listens to desktop mode changes.
       - TaskbarBackrgroundRedererer can now individually animation backgrounds for transient and persistent taskbars
       - new channel for taskbar icon alpha added to TaskbarViewController
       - new animated float to handle background alpha while we are recreating taskbar with animation.

Solution:

we use the callabck we get from DekstopVisibilty for entry/exit to first change logic of when we are considered inDesktopMode. Upon entry/exit we notify display controller for info change.
we also at notify taskbar manager who is now a listener to the desktop mode change and start the recreate process. TaskbarManager first animates existing taskbar out of user view and then follows the original recreate flow.

Test: Presubmit
Bug: 343882478
Flag: com.android.window.flags.enable_desktop_windowing_mode
Change-Id: Ib827564cacd194f499e7d9b1965e2bb13e3548ab
2025-02-24 11:59:53 -08:00
Ahmed Fakhry
ad6fee6111 Implement isInDesktopMode*()
This CL does the following:
- Adds new methods `isInDesktopMode()` and
  `isInDesktopModeAndNotInOverview()` to `DesktopVisibilityController`.
- These two methods rely on the new multi-desks impl when the flags are
  enabled.
- Makes the existing `areDesktopTasksVisible()` and
  `areDesktopTasksVisibleAndNotInOverview()` private, and migrates all
  the usages to the new methods.
- The new methods uses the old methods if the flags are disabled.

A companion NexusLauncher CL is at ag/31601363.

Bug: 394182435
Test: m
Flag: com.android.window.flags.enable_multiple_desktops_frontend
Flag: com.android.window.flags.enable_multiple_desktops_backend
Change-Id: I29ff38f984bfe2f68a120f84e1a75fa36b739258
2025-02-12 21:18:51 +00:00
Toni Barzic
860c4ee680 Use pinned taskbar with desktop tasks on freeform displays
Bug: 390665752
Flag: com.android.window.flags.enable_desktop_taskbar_on_freeform_displays
Test: manual on desktop device. verify correct taskbar is shown
      on home screen, in overview, in desktop mode, with fullscreen
      app shown. Verify opening/launching apps from taskbar works
      as expected.

Change-Id: I5c1e21799609c28ec44cc190bfc681934907199f
2025-02-04 13:00:37 -08:00
Toni Barzic
f817372651 Show desktop tasks when taskbar is pinned on home
Updates taskbar and KQS to show (running) desktop tasks when taskbar is
shown on the home screen - adds `shouldShowDesktopTasksInTaskbar` method
to TaskbarDesktopModeController to be used instead of
`areDesktopTasksVisible*()` to determine whether to show desktop tasks
in the taskbar. The method, in addition to desktop tasks visibility,
also considers whether taskbar should be shown on the home screen, and
whether current launcher state is home.

The launcher state is fetched from `TaskbarStashController`, which
already keeps track of this state. This is likely not ideal, but can be
removed in the long term - see http://b/390665752.

Furthermore, updates ReventsModel login not to always filter out desktop
tasks with no non-minimized tasks (which is currently expected behavior
in overview) in `getTasks()`. The filtering is now done by the filter
passed to `getTasks()` method, instead of when processing tasks in the
background. The filter used by default is updated to filter out such
desktop tasks, but callsites from `KeyboardQuickSwitchController` and
`TaskbarRecentAppsController` are updated to use an empty filter, so
they can display desktop tasks when they're all minimized.

Bug: 376711722
Bug: 390665160
Test: Manual on desktop device - verify that taskbar and KQS when shown
on home screen display desktop tasks, including the case all tasks are
minimized.
Flag: com.android.window.flags.enter_desktop_by_default_on_freeform_displays

Change-Id: Iabc22e20bf64aa9a826b4a5952f1edc6ea639cdc
2025-01-22 22:36:02 +00:00
Jagrut Desai
2f1c1e10de Don't recreate taskbar in Overview
This cl includes
	- when going to overview from Launcher or Desktop Mode don't recreate taskbar and keep it a same variant as the context user was in.
        - user will still be able to pin/unpin taskbar in overview, but it will be recreated to the launcher context.
	- opening app from taskbar context is now aware of if taskbar is in desktop mode and opens app in Desktop Mode when user oepn any app.
        - This cl will not include the animation when taskbar variant is changing between launcher and desktop mode.

Solution
    - if desktop tasks are visible we will open any app from taskbar context into Desktop windowing mode after launching the DesktopTaskView manually. We will launch desktop task from recentview first and upon end of recent animation we will launch the app.

Bug: 343882478
Test: Manual
Flag: com.android.window.flags.enable_desktop_windowing_mode
Change-Id: Ib67e1e7150670f901c07c2df188cde81e7d725dc
2024-12-19 10:50:20 -08:00
Schneider Victor-Tulias
2b46c945a7 Move DesktopVisibilityController to TouchInteractionService
Moved DesktopVisibilityController to TIS for 3P launcher support.

Flag: EXEMPT bug fix
Fixes: 338063030
Fixes: 357859025
Test: Launched overview and resumed desktop task from desktop mode on 1P and 3P launchers
Change-Id: I64e99a32ed13bcb6e4a81a18c29df2643373dc35
2024-09-11 09:56:35 -07:00
Jagrut Desai
e62cb76491 Extend DesktopVisibilityController Funcationality to handle taskbar corner radius in desktop windowing mode
This cl includes
	- adding support for listenting into when desktop window mode task is resizing and we need to adjust taskbar corner radius.

Test: Presubmit
Bug: 348335379
Flag: com.android.window.flags.enable_desktop_windowing_mode
Change-Id: Ic6ea3dc1353df7fa4b8079106f20fade0f740683
2024-08-26 11:39:40 -07:00