Commit Graph

12409 Commits

Author SHA1 Message Date
Randy Pfohl
31aefc3290 Merge changes from topic "windowRecents" into main
* changes:
  Cleaning up unusued handlers
  Moving RecentsWindowManager away from the singleton pattern
  Limited recents in window introductory cl
  abstracting fallback views to support container instead of activity
2024-09-24 16:13:30 +00:00
Treehugger Robot
3227a4ecf7 Merge "Don't return TYPE_RECENTS task in TopTaskTracker.getCachedTopTask" into main 2024-09-24 11:37:22 +00:00
Treehugger Robot
91af098288 Merge "[Predictive Back] Enable predictive back in AndroidManifest.xml" into main 2024-09-24 04:08:06 +00:00
Treehugger Robot
e792bc3a5c Merge "Revert "Add support for taskbar background to wrap around hotseat"" into main 2024-09-24 00:57:04 +00:00
Jeremy Sim
26a0afe14f Merge "Fix bug with over-expanding split task tile" into main 2024-09-24 00:52:24 +00:00
Fengjiang Li
45d79db4d7 [Predictive Back] Enable predictive back in AndroidManifest.xml
Calling "getApplicationInfo().setEnableOnBackInvokedCallback(true)" is only suggested in tests.

Fix: 337985862
Flag: NONE - release feature fix
Test: manual
Change-Id: I336bdbe31c726b518d9342b1d39ef9e92f4dd498
2024-09-23 16:11:28 -07:00
Jon Miranda
9c09196dfd Revert "Add support for taskbar background to wrap around hotseat"
This reverts commit 5dc07d786f.

Reason for revert: b/360116669

Bug: 345768019
Change-Id: Id70ceed141e2106f746d4a0e68a09675ba45dd28
Fixes: 360116669
Test: open taskbar, open all apps w/ ime, use ime back button
Flag: com.android.launcher3.enable_scaling_reveal_home_animation
2024-09-23 22:38:35 +00:00
Jeremy Sim
803a4a5bb1 Fix bug with over-expanding split task tile
This CL changes GroupedTaskView#onMeasure() to return more robustly in the case where a single task from a GroupedTaskView is staged.

See bug for fine details, but basically we no longer allow onMeasure() to re-bound the split task to fullsize in split selection state -- we leave it in half size all the time (with scale and translation applied). To allow it to stay scaled-up and translated properly across rotations and stuff, we now avoid resetting translation and scale until split select is exited.

Fixes: 365476600
Test: Manual test with offscreen tiles, rotations, fake landscape and seascape
Flag: NONE bugfix
Change-Id: I0ee8d13d310ed1f134f3f396bb87541a5ea685ef
2024-09-23 15:31:02 -07:00
Jagrut Desai
d3460af469 Merge "Refctor DisplayController#handleInfoChange" into main 2024-09-23 19:43:02 +00:00
Jagrut Desai
94c9fb7cf5 Refctor DisplayController#handleInfoChange
Test: Presubmit
Bug: 369140181
Flag: EXEMPT refactor DisplayController#handleInfoChange
Change-Id: I196fe0e843a60c518d882c25f9fbdcd3cb775ba6
2024-09-23 09:58:30 -07:00
Alex Chau
6deccd8ef2 Don't return TYPE_RECENTS task in TopTaskTracker.getCachedTopTask
- We have no use-case to show TYPE_RECENTS (NexusLauncher or RecentsActivity) in Overview, stripping TYPE_RECENTS avoids accidentally showing RecentsAcitivty as a tile on swipe up

Fix: 355263037
Test: manually verify it doesn't break 3P Launcher; the bug itself cannot be verified as it cannot be easily reproduced
Flag: EXEMPT BUG_FIX
Change-Id: Id1b8e43dc7ddb9ad9c781b9a860fe4fba97d4be6
2024-09-23 16:15:01 +01:00
Treehugger Robot
344bf3fd24 Merge "Simple implementation of Taskbar Overflow." into main 2024-09-21 06:36:15 +00:00
Tracy Zhou
bce3fb1153 Merge "Skip stash animation when destroying LauncherTaskbarUIController" into main 2024-09-21 04:05:15 +00:00
Jon Miranda
7645ef2ebd Simple implementation of Taskbar Overflow.
- Adds placeholder view to represent the Overflow affordance.
- Overflow button will always appear as long as there are any
  recent apps.*
- Click / long click on the button will open KeyboardQuickSwitch
- Relevant code is Guarded by Flags.taskbarOverflow.

*Note that this is not up to spec. This change is only meant to
setup the codebase to support Taskbar Overflow.

Bug: 368119679
Test: open app, enter desktop windowing, click overflow button
Flag: com.android.launcher3.taskbar_overflow
Change-Id: I47f96797408fda09e8326ba8fb7981c91de80e36
2024-09-21 00:28:20 +00:00
Mykola Podolian
0e795f08f6 Merge "Fixed the navigation bar placement on device restart." into main 2024-09-21 00:09:36 +00:00
randypfohl
daf37eeb07 Cleaning up unusued handlers
Test: Built and tested locally

Flag: NONE Removing unused handler references

Bug:292269949

Change-Id: I83ec8299a82ea8f3db0dace7fb3b823a703b6b62
2024-09-20 16:09:52 -07:00
randypfohl
7ed1868d60 Moving RecentsWindowManager away from the singleton pattern
Test: Built and tested locally

Flag: com.android.launcher3.enable_fallback_overview_in_window

Bug:292269949

Change-Id: Ic70d9a3e65ffb86e369f52982891b94bef4cacd7
2024-09-20 16:09:52 -07:00
randypfohl
c50aa8bf31 Limited recents in window introductory cl
Test: Built and tested locally

Flag: com.android.launcher3.enable_fallback_overview_in_window

Bug:292269949

Change-Id: I5352ba0b6c5bc196fbd1322d435a7e27e884f7b5
2024-09-20 16:09:50 -07:00
Saumya Prakash
4cf02b8538 Merge "Add "New Window" option to Taskbar menu." into main 2024-09-20 18:20:36 +00:00
randypfohl
f29dc7c5ec abstracting fallback views to support container instead of activity
Test: Built and tested locally

Flag: NONE just abstracting in this cl

Bug:292269949

Change-Id: I0ce5efb4f193211216430f373605107c87de2c1a
2024-09-20 10:23:31 -07:00
Liran Binyamin
7b0c32567f Merge "Update bubble bar flyout according to spec" into main 2024-09-20 16:42:34 +00:00
Alina Zaidi
0dedf3e62d Merge "[dev_option] Use DesktopModeFlags from core instead of Shell" into main 2024-09-20 09:49:14 +00:00
Treehugger Robot
e9df8805bc Merge "Changing min-sdk version of Launcher to 31" into main 2024-09-20 08:12:32 +00:00
Tracy Zhou
a08548e075 Skip stash animation when destroying LauncherTaskbarUIController
Follow up to ag/28978773
It seems like mControllers == null doesn't work when folding. The launcher visibility change still triggers the stash animation from onLauncherVisibilityChanged
by LauncherTaskbarUIController#onDestroy

Bug: 362713428
Test: manually make sure that the stash animation isn't triggered from folding
Flag: EXEMPT bugfix
Change-Id: I04539e7a31d6c329eacb54946e3b3c211e47a709
2024-09-19 23:26:24 -07:00
Sunny Goyal
621918feda Changing min-sdk version of Launcher to 31
Bug: 368071216
Flag: EXEMPT refactor -> dead code removal
Test: Presubmit
Change-Id: I1f0113c56de56f12f3a174eb31c3f8e8a09407e6
2024-09-20 06:00:10 +00:00
Anushree Ganjam
f8c6763272 Annotate SettingsChangeLogger with @LauncherAppSingleton (5/n)
Missed annotating the SettingsChangeLogger as singleton in ag/29424931.

Tested with commands
> m statsd_testdrive
> $ANDROID_HOST_OUT/bin/statsd_testdrive -terse 10108

Verified logSnapshot is called on same instance of SettingsChangeLogger.

Bug: 361850561
Test: Manual
Flag: NONE Dagger Integration
Change-Id: Icdbe57623bb0ce1a2ef55cdab238e1f9bfbedf40
2024-09-19 22:13:34 -07:00
Anushree Ganjam
f2c65c289b Merge "Make sandboxContext extend LauncherApplication (4/n)" into main 2024-09-19 23:22:56 +00:00
Treehugger Robot
748c86d04b Merge "Clean-up waitForToggleCommandComplete logic" into main 2024-09-19 23:16:24 +00:00
Treehugger Robot
b8526d7798 Merge "Fix taskbarIconAlignment not being part of animToLauncher" into main 2024-09-19 22:27:56 +00:00
Saumya Prakash
8e0ed4b01b Add "New Window" option to Taskbar menu.
This change adds a new menu option to Taskbar that is invoked when long
pressing an icon. It createds a new instance for an app if the app
supports multi instance in Desktop Mode.

Bug: 315344726
Test: Manual
Flag: com.android.launcher3.enable_multi_instance_menu_taskbar
Change-Id: Ibc42fbb1ad485496cd938af730b86e051cea559a
2024-09-19 21:30:43 +00:00
mpodolian
b79e1742bd Fixed the navigation bar placement on device restart.
Moved logic that adjusts the hotseat position from the constructor of
the NavbarButtonsViewController to onTaskbarLayoutChange() method that
is called from the TaskbarViewController TaskbarView layout change
listener.

Test: Manual:
Moved the bubble bar to the default right position. Rebooted the device.
Navigation bar was placed on the left side of the screen.
Flag: com.android.wm.shell.enable_bubble_bar_in_persistent_task_bar
Bug: 367829539

Change-Id: Ife0c48a72b318d6051b7b09bde13818546e65d98
2024-09-19 11:42:29 -07:00
Anushree Ganjam
26a5f65afd Make sandboxContext extend LauncherApplication (4/n)
See
https://docs.google.com/drawings/d/1JHFi_nhmQt2xPT1N3FB_1mnaRK5TVqKZ9-fSl3EA7sU/edit?usp=sharing
and
https://docs.google.com/drawings/d/1bx4WURP4uHZGzZ1bWQgpw701jkTkVqlNfA02Yt-ZtSI/edit?usp=sharing&resourcekey=0-oySjsnaCsOSrNIPqqEa0gw
for design details.

We need to make SandboxContext extend LauncherApplication because we
want create MainThreadInitializedObjects in SandboxContext's
AppComponent scope. Since MainThreadInitiliazedObjects are closed in
SandboxContext's OnDestroy() , we need to replicate same thing using
dagger as well.

- DaggerSingletonObject is same as MainThreadInitializedObject but is
  used for fetching the dagger created singletons so that we can avoid
  major refactors for accessing singletons. This will be deleted soon.

- DaggerSingletonTracker to track dagger created singletons and call
  close() on those singleton objects created in SandboxContext scope.

- Annotate the singleton object SettingsChangeLogger constructor with @Inject and execute the statements in Main thread.
- Added createSandboxContextForTest(only for Test) to avoid creation of
  dagger component in test. As follow up, I will delete this method and
  introduce fakeDaggerComponents in test.

Bug: 361850561
Test: Manual
Flag: NONE Dagger Integration

Change-Id: I2d3762ea64e53baa4de190790568aec750b54201
2024-09-19 11:20:30 -07:00
Liran Binyamin
19a43fb7cf Update bubble bar flyout according to spec
Also add a triangle

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 277815200
Test: atest BubbleBarFlyoutViewScreenshotTest
Test: atest BubbleBarFlyoutControllerTest
Change-Id: I1a16ba6c9e1a2ca4efe01524ba3ef1d049f81d68
2024-09-19 14:02:43 -04:00
Alex Chau
977f8be14c Clean-up waitForToggleCommandComplete logic
- waitForToggleCommandComplete was a legacy logic to rate limit OverviewCommandHelper to avoid too many TOGGLE commands simulataneously
- As OverviewCommandHelper iterates, commands are now executed one by one and waitForToggleCommandComplete is no longer useful
- waitForToggleCommandComplete also caused a bug that when OverviewCommandHelper times out, we cancel the command completely, which causes waitForToggleCommandComplete to remain true, as a result all subsequent TOGGLE commands will be ignored

Fix: 368328461
Test: Aggressively keep tapping recents button, it should never get stuck
Test: 3 button Overview tests in presbumit
Flag: EXEMPT BUG_FIX
Change-Id: Ia9b64057ffb8ade6b964eb7f52c2fe72b9e7f77b
2024-09-19 17:37:24 +01:00
Helen Cheuk
e58dad0821 Merge "[Contextual Edu] Update Edu stats when going to overview and all apps from home" into main 2024-09-19 14:45:49 +00:00
Alina Zaidi
e05f1fc2dd [dev_option] Use DesktopModeFlags from core instead of Shell
Test: Current tests pass
Bug: 368055148
Flag: EXEMPT refactoring
Change-Id: I9d88ab95c168d970de488e7d098e060fcf8013e4
2024-09-19 10:04:50 +00:00
Tracy Zhou
5b569e764e Merge "Skip all stash animations in phone mode" into main 2024-09-19 01:55:28 +00:00
Tracy Zhou
ba6e8ef13d Skip all stash animations in phone mode
Bug: 362713428
Test: manual
Flag: EXEMPT bugfix
Change-Id: Ieab234fc9fc96322800e3e1fb4532c270187a0f5
2024-09-19 01:55:20 +00:00
Toshiki Kikuchi
f9ae7178cf Merge "Allow to show pinned taskbar when Launcher is visible" into main 2024-09-18 23:16:57 +00:00
Tony Wickham
0d1b9ea40a Fix taskbarIconAlignment not being part of animToLauncher
Previous sequence of events when swiping home:
- AbsSwipeUpHandler getParallelAnimationToLauncher() ->
  TaskbarLauncherStateController#createAnimToLauncher(NORMAL, ...)
  (but mLauncherState is still BACKGROUND_APP, so we don't play the
  icon alignment anim here)
- AbsSwipeUpHandler#createWindowAnimationToHome ->
  LauncherHomeAnimationFactory#createActivityAnimationToHome() sets the
  state to NORMAL.
- TaskbarLauncherStateController now animates the icon alignment in
  response to the state change, but it's a separate animation from the
  one created in createAnimToLauncher()
- If you touch down during the transition to home, we finish the
  animation that was returned by createAnimToLauncher(), but that
  doesn't include iconAlignment so that part still plays on top

To fix this, we set mLauncherState = toState in createAnimToLauncher so
that the applyState picks it up and does the iconAlignment as part of
that animation.

Test: manual: swipe to home and immediately swipe up to All Apps (or
down for notifications or right for -1), verify no Taskbar on top
Flag: EXEMPT bugfix
Fixes: 360116367

Change-Id: Icd9e4659812c9d77598b9214f51592ce2136b265
2024-09-18 22:59:15 +00:00
Jon Miranda
a01ec68f78 Merge "Clear overlay when swiping up to unstash taskbar." into main 2024-09-18 20:43:00 +00:00
Jon Miranda
ab0372e767 Clear overlay when swiping up to unstash taskbar.
Once taskbar is unstashed, the user cannot return back to the overlay. We can
clear it here to set the expected state once the user goes home.

Fixes: 359096594
Test: open -1, launch app, go home
Flag: EXEMPT bugfix
Change-Id: I8059c2c45f10d15701ff2961480aef002d273a06
2024-09-18 20:42:38 +00:00
Treehugger Robot
1880988d5f Merge "Make AllSetActivity IDP change-aware" into main 2024-09-18 19:21:18 +00:00
Schneider Victor-Tulias
e57c034554 Make AllSetActivity IDP change-aware
Flag: EXEMPT bug fix
Fixes: 366129654
Test: adb shell cmd overlay enable-exclusive --category com.android.internal.systemui.navbar.threebutton while in AllSetActivity
Change-Id: I42dec6a94bf445866828b7404ae5451d505fda02
2024-09-18 10:22:23 -04:00
Liran Binyamin
c2c7913134 Merge "Create BubbleBarFlyoutView" into main 2024-09-18 14:21:26 +00:00
Treehugger Robot
10505cdb7e Merge "Revert^2 "Use ConcurrentHashMap to make private maps thread safe"" into main 2024-09-18 12:40:32 +00:00
Toshiki Kikuchi
6ddfe9b179 Allow to show pinned taskbar when Launcher is visible
This CL allows freeform-first devices to lock the taskbar in a pinned
state when Launcher is visible.

Bug: 361419732
Flag: com.android.window.flags.enter_desktop_by_default_on_freeform_displays
Test: DisplayControllerTest
Test: manual

Change-Id: Ic0d2740e33fee19c676d88aa2bcf370eb64366e8
2024-09-18 10:49:52 +00:00
Uwais Ashraf
4c045988c1 Revert^2 "Use ConcurrentHashMap to make private maps thread safe"
This reverts commit f480cf371a.

Reason for revert: not the cause of b/367736714

Change-Id: If9b400c5474d9ec51f51f1de86c80b9337857fac
2024-09-18 05:47:29 +00:00
Mykola Podolian
13ffcc7242 Merge "Unstash hotseat immediately if go out of the launcher home." into main 2024-09-18 04:17:14 +00:00
mpodolian
bf7a4db0de Unstash hotseat immediately if go out of the launcher home.
When navigation mode is set to 3 buttons, it is possible for user to
click on recent apps button, so for such scenario taskbar should be
immediately un-stashed

Test: Manual
Set 3 buttons navigation mode. Go to Launcher home. Expand bubble bar.
Press recent apps button. Press the home button. Observe hotseat is
visible. Video:
http://recall/-/gx8ASgewUeUS3QYohfrd1J/fX0gSp18Riw8mYYAw0wj8W

Bug: 367488218
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: Id65fd9add720125a340294311d470f2be50d43f8
2024-09-17 15:47:42 -07:00