Commit Graph

606 Commits

Author SHA1 Message Date
Sebastian Franco 5353cd8626 Making the QSB align in Fixed Landscape
Fix: 378959186
Fix: 378959255
Bug: 364711735
Test: HomeScreenImageTest
Flag: com.android.launcher3.one_grid_specs
Change-Id: I36612949006f12929cdc5b21f27f20ebc9751201
2024-11-16 00:39:44 +00:00
Sebastian Franco 9e4c99befd Adding Launcher Mode settings to Launcher settings
Bug: 364711735
Test: NA
Flag: com.android.launcher3.one_grid_specs
Change-Id: Iab688ebdb8449f9258b61f59a0afe97875f82a81
2024-11-07 21:17:10 -08:00
Andy Wickham 1f6a7b46be Adds all_apps_sheet_for_handheld flag.
This flag causes All Apps to render on a background panel in
handheld mode similarly to how it does on tablets.

Demo: https://drive.google.com/file/d/11K8yueTb9Xr8oRJCM3TxcFH8V3rRFJrJ/view?usp=sharing&resourcekey=0-hMNEGzMQ5KC9D7may2Gb-g

Bug: 374186088
Bug: 372618421
Test: Manual
Flag: com.android.launcher3.all_apps_sheet_for_handheld
Change-Id: Ie0b1e784d4330fd71f7f36f39e5dd85e8ee14933
2024-11-06 16:05:25 +00:00
Brandon Dayauon aebe733849 Merge "Set twoline toggle to false when not in english language." into main 2024-10-24 15:09:08 +00:00
mpodolian f230eee2ff Updated bubble bar position to be center aligned with the hotseat
Added a method to the device profile to calculate the vertical center of
the hotseat icons. Simplified the logic for positioning the bubble bar.

Test: TransientBubbleStashControllerTest
Test: PersistentBubbleStashControllerTest
Test: Visual. Go to home page, check that bubble bar is vertically
center aligned with the hotseat
Bug: 345491493
Flag: com.android.wm.shell.enable_bubble_bar

Change-Id: I52f1b94de79f6c912f43a88fcc5c884e20e56310
2024-10-23 14:44:40 -07:00
Brandon Dayauon 9c65174760 Set twoline toggle to false when not in english language.
Set toggle preference in deviceProfile as this is the first step after the locale change before any binding/inflation happens.
Otherwise the toggle will be stale if we set this false during "apply"/bind which can cause complexities.

bug:373670311
Test manually vid: https://drive.google.com/file/d/1WXl_fMU8eynwlxdwYBamEnqP1tU_q0kb/view?usp=sharing
Flag: NONE bugfix

Change-Id: Iaf9e88ef76ebda6b62942b7bc3f4e39b4ced5116
2024-10-22 09:57:23 -07:00
mpodolian 1d4e75c777 Refactored hotseat translation X logic
Made retrieval of the hotseat translation X easier to use.

Test: Manual. Set the navigation mode to 3-button. Moved the bubble bar
from one side to the other. Switched the navigation mode to gestures.
Moved the bubble bar from one side to the other again.
Bug: 373422448
Flag: EXEMPT refactoring

Change-Id: Ie69f1ecf178244008e5c752882c4b91a30928756
2024-10-17 09:46:47 -07:00
mpodolian 51e2bb31ed Created a helper method that calculates the hotseat icons shift X.
Moved out logic that computes the translation X for the hotseat icons.

Fixes: 368379159
Test: Manual. Have the hotseat adjusted. Open any application from the
hotseat bar. Go back to home.
Flag: EXEMPT refactoring

Change-Id: If9dfa70be537f87b075bd865e7f9c5cd1ae78f00
2024-10-09 12:17:01 -07:00
mpodolian 3dcb19f33a Fixed the hotseat placement in RTL mode
Updated logic that computest the hotseat shift.

Fixes: 372014534
Flag: com.android.wm.shell.enable_bubble_bar
Test: Manual. Put device into 3 buttons navigation mode, force RTL.
Hotseat is placed next to the navigation buttons bar.

Change-Id: Ie7b6be11a093ffa4006182bdc0b73018ba799246
2024-10-07 10:34:42 -07:00
mpodolian 518d404509 Added nav bar properties to DeviceProfile dump() method
Added logging of inlineNavButtonsEndSpacingPx and
navButtonsLayoutWidthPx

Test: DeviceProfileDumpTest
Bug: 346381754
Flag: com.android.wm.shell.enable_bubble_bar_in_persistent_task_bar
Change-Id: I9e537db3d8edf815c131fa9f872193f0d16c259d
2024-09-27 14:06:20 -07:00
Mykola Podolian 6f231f694d Merge "Update placement of the hotseat according to the bubble bar location." into main 2024-09-27 15:45:04 +00:00
mpodolian dfb48214ea Update placement of the hotseat according to the bubble bar location.
Update the hotseat and Qsb placement according to the 3 nav buttons bar.

Test: Manual.
Set navigation mode to 3 buttons.
On launcher home screen move the bubble bar from one side to another.
Observe that the Hotseat and Qsb moving together with the navigation
bar.
Once moved the bubble bar, expand the bubble bar and collapse it.
Observe how the Hotseat is stashing and un-stashing.
After bubble bar changes position hit the recent apps button, observe
the transition.
On launcher home screen start application with the hotseat icon and exit
opened application. Observe that flying icon comes back to the correct
position in the hotseat.
Video with the above scenarios:
http://recall/-/gx8ASgewUeUS3QYohfrd1J/blTYrKopTyufOcRoPuVpYK
Bug: 346381754
Flag: com.android.wm.shell.enable_bubble_bar_in_persistent_task_bar

Change-Id: Ic8c6acdffbbb111cbe4f3fd6bc60195578d7035d
2024-09-26 19:04:01 -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
Treehugger Robot a926663c46 Merge "Removing obsolete flags" into main 2024-09-10 09:25:51 +00:00
Sunny Goyal 35dc8758fb Removing obsolete flags
Flag: EXEMPT legacy ENABLE_ALL_APPS_FROM_OVERVIEW and ENABLE_MULTI_DISPLAY_PARTIAL_DEPTH
Test: Verified manually
Bug: 270395073
Bug: 275132633
Change-Id: Ifa1db64dc037183faaef9e014d7c56275d61ed60
2024-08-30 12:34:55 -07:00
Schneider Victor-tulias f5035847b1 Add a test base for AbsSwipeUpHandler and its subclasses
- Added a few basic tests for scenarios that should be contant across subclasses. These tests will not run on their own, they will only run when a subclass' test suite is run.
- Added test suites for LauncherSwipeHandlerV2 and FallbackSwipeHandler

Flag: EXEMPT adding tests
Bug: 353763639
Test: LauncherSwipeHandlerV2Test, FallbackSwipeHandlerTest
Change-Id: Ib44199f5d5281a544b433649d6ed49ae2a65ed70
2024-08-30 14:14:03 -04:00
Riddle Hsu 9164534fb9 Merge "Use rotation hint to update layout" into main 2024-08-06 11:39:03 +00:00
Riddle Hsu a3c17fc075 Use rotation hint to update layout
The info from DisplayController is the rotation of display.
While the rotation hint is from the current configuration of
the activity. Because system supports to display activities
with individual rotation at the same time, it is more accurate
to use the hint for layout.

Because there are 4 DeviceProfile instances for 4 rotations.
The instance will be used for corresponding rotation. So the seascape
attributes is a final state which no longer needs to be updated.

Bug: 356164050
Flag: EXEMPT bugfix
Test: Enable auto rotation. Enable home rotation.
      Launch a fixed portrait activity.
      Rotate device to 270 degree (seascape).
      Swipe navigation to return to home.
      Home should use 270 layout directly instead of 90
      and then change to 270 after animation is finished.

Change-Id: Iad0f6ada0ec1cb7f0b5281b508d58276332076fb
2024-08-02 16:40:24 +08:00
Jon Miranda e8b47c540f Merge "Add support for taskbar background to wrap around hotseat" into main 2024-07-30 15:59:48 +00:00
Jon Miranda 5dc07d786f Add support for taskbar background to wrap around hotseat
Currently only enabled for app launch animation

Future work is planned:
- Overview to home
- App dismiss
- When QSB is drawn inline

Bug: 345768019
Test: Launch an app, taskbar background and stashed handle will
      first wrap around hotseat before transforming into the
      stashed handle.
      Verified by locally forcing taskbar background and
      stashed handle to always draw.
Flag: com.android.launcher3.enable_scaling_reveal_home_animation
Change-Id: I9ab1870f87247b6a1b53a352ac3eb0183b7a1a1d
2024-07-26 08:10:50 -07:00
Andy Wickham cfafb55331 Convert ENABLE_FLOATING_SEARCH_BAR to aconfig.
Flag: com.android.launcher3.floating_search_bar
Test: Build (existing code unchanged)
Bug: 346408388
Fix: 346406981
Change-Id: Ia8d15ceb1b2b4754657844d602cb95b9555a4ece
2024-06-12 01:24:36 +00:00
Sunny Goyal b03d274375 Merge "Fixing some missing swipecancelled events" into main 2024-05-25 08:11:56 +00:00
Sunny Goyal 97ceed42e6 Fixing some missing swipecancelled events
Updating NavBarPosition to expose more constructor and getters

Flag: com.android.launcher3.use_activity_overlay
Test: atest SwipeTransitionTest
Bug: 340432854
Change-Id: I86193fa26c0337d50e366cecb2d7debf37940fe1
2024-05-24 17:34:36 -07:00
Brian Isganitis e1eaefd537 Initial prototype of tiny taskbar.
Introducing isTinyTaskbar and using in a few places to show Taskbar on
phones.

Disabling for three button mode since the buttons will take up most of
the space. Could also prototype adding meta key as a 4th button in
this case if we feel like it.

Flag: com.android.wm.shell.enable_tiny_taskbar
Test: Manual
Bug: 341784466
Change-Id: Iba07382d9bd5d14fc29ef080a390db561f6fd454
2024-05-23 16:40:58 -04:00
Federico Baron 6188ec4157 Merge "Make hotseat column span responsive" into main 2024-04-16 17:17:55 +00:00
fbaron e4b0b71faa Make hotseat column span responsive
Flag: NONE
Test: DeviceProfileDumpTest, DeviceProfileAlternativeDumpTest, HomeScreenImageTest
Bug: 325084912
Change-Id: Ifa9e8066662a1ab053f66b8800b739d813d2dab8
2024-04-16 06:19:16 +00:00
Sunny Goyal 11117d9b2a Using resource override instead of code-swap for ApiWrapper
Bug: 330920490
Flag: None
Test: Presubmit
Change-Id: Iac19f32e64d2c76ed5b4f8592943ee4ae7af51b5
2024-04-09 11:14:44 -07:00
Fengjiang Li 00711e68a5 Merge "Enable predictive back in TAPL tests" into main 2024-03-15 14:52:58 +00:00
Fengjiang Li e90f098d4f Enable predictive back in TAPL tests
With ag/26349940 we have fixed the bug where back swipe is not working

Fix: 326118348
Test: this is the test
Flag: NONE
Change-Id: I7e826f6ba3022a04d016d4a0a2134e287d85e8be
2024-03-15 00:00:37 -07:00
Luca Zuccarini bb937b2556 Merge "Introduce a new Home animation for workspace and the outgoing task." into main 2024-03-14 16:11:46 +00:00
Luca Zuccarini c9cbc9d5a1 Introduce a new Home animation for workspace and the outgoing task.
The values are currently the same for all display and orientation
configurations, but they might change before launch.

There are a couple known imperfections:
* Swiping out of a hotseat app with very low velocity doesn't look
  great
* Sometimes, if the window movement reaches its final location faster
  than the background is done scaling, there is a small snap in icon
  position

Bug: 298089923
Flag: ACONFIG com.android.launcher3.enable_scaling_reveal_home_animation DISABLED
Test: verified with the flag on and off

Change-Id: Id54c7f0a76f62108d8b92a3b5e78634fff64dbef
2024-03-14 10:48:02 +00:00
Brandon Dayauon 68c18236ad Disable two line text legacy flag.
Will now repurpose the twolinetoggle flag to be the flag that will
make twoline text enabled/disabled.

bug: 316027081
Test: presubmit
manually: https://screenshot.googleplex.com/BsZGCm7DrTZLwG4
Flag: com.android.launcher3.enable_twoline_toggle Staging
Change-Id: Idef427bad6551ae56b13e35393e076b8e000af5a
2024-03-08 21:32:22 -08:00
Federico Baron 835b9610bc Merge "Update some dimens for portrait edit state" into main 2024-02-29 17:17:19 +00:00
fbaron 3bb6d4bd81 Update some dimens for portrait edit state
Fix: 324133830
Flag: NONE
Test: HomeScreenEditImageTest
Change-Id: I7f42664b63e6981bcef5db2e76129bd3fe567102
2024-02-27 06:57:55 +00:00
Brandon Dayauon 0fa9113028 Merge "Add home settings toggle featureflag for enablingTwoLineText" into main 2024-02-21 18:14:21 +00:00
Shamali P 5fbb0cccad Use derived padding instead of static 300dp for large portrait displays
In tablet, portrait mode, a padding of 300dp was applied to make it
less elongated, but that doesn't scale well across different devices.

So, we use 1/6th of height as the additional padding. This fixes the
existing logic.

Bug: 318410881
Bug: 315055849
Flag: N/A
Test: Screenshot update in cl chain.
Change-Id: Ia9cfe481131f086b66f625069cbf9a7c0343c2c9
2024-02-15 18:32:21 +00:00
Brandon Dayauon 5787a2710c Add home settings toggle featureflag for enablingTwoLineText
- Have shouldUseTwoLine() be decided with the home settings toggle value

bug:316027081
spec: https://www.figma.com/file/uMzPkNMZpb7EyfHDo8usIa/V-%E2%80%A2-Toast-Butter?type=design&node-id=405-384593&mode=design&t=UBkdeuNlAdRh2FGU-0
Test:
Video: https://drive.google.com/file/d/15VUhNVro2fiwv3SzMda1StiPb3PV1eMT/view?usp=sharing
before searchPreferenceScreen: https://screenshot.googleplex.com/3uqdMsZoGSBYb6c
after searchPreferenceScreen: https://drive.google.com/file/d/15dswiHRTnafyhgQA_tL2tRc7vHFWdHbZ/view?usp=sharing
before homeSettingsPage: https://screenshot.googleplex.com/7wsNevxGun2KCCB
after homeSettingsPage: https://drive.google.com/file/d/15m5bjEyewlNHI_h26aygHa7zrgZ5qDF6/view?usp=sharing
AppListSettingsPage: https://drive.google.com/file/d/15hl4ScHBOLgKv3M38HtatMxQw85pgl7t/view?usp=sharing
Flag: enableTwolineToggle DEVELOPMENT

Change-Id: I3ad133dd51dcb97e14ccded730e7737c5049261a
2024-02-12 09:24:48 -08:00
Uwais Ashraf c2f73d9091 Merge "App chip refactor" into main 2024-02-09 13:43:03 +00:00
Uwais Ashraf 99fdf7a75e App chip refactor
- Adds background outline replacing 2 circles + rect approach. This
enables easier shadow drawing code.
- Simplify structure of AppChipView.
- Adds an anchor View to simplify laying out of menu around app chip

Bug: 313644427
Bug: 317007147
Fix: 322760765
Flag: ACONFIG com.android.launcher3.enable_grid_only_overview TEAMFOOD
Flag: ACONFIG com.android.launcher3.enable_overview_icon_menu TEAMFOOD
Test: OverviewImageTest
Change-Id: I56c2644779863c083ae475a740a84321b1d0c396
2024-02-09 12:09:42 +00:00
fbaron fc6bbcfed2 Align workspace and hotseat icons in landscape
Fix: 311381639
Test: Verified on device
Flag: NONE
Change-Id: I4e2c74f59e8492042c3c7f8eccc98921d92d685f
2024-02-01 01:04:40 +00:00
Shamali P be55f82fab Fix issue that widget picker is only half of screen in foldable.
Apply the extra top padding only if device is in portrait and aspect
 ratio is beyond 1.5 to keep the original intent of avoiding showing
 a single pane widget picker in super elongated form. In b/214215594,
 a top padding was applied for w720, but in fold, it ended up showing
 the picker only half way up. So, changed it to consider aspect ratio.

In b/315055849 the tablet portrait will use full width two pane picker,
and then, it will also not need this extra top padding. In that change,
we will use the flag to guard applying this extra padding.

See screen/cast/NTYwMjU1MzY4NDI5NTY4MHw3NDIxYzU0Mi1lNg

Test: WidgetPickerImageTest and Manual (screencast above)
Bug: 317013493
Flag: N/A
Change-Id: I90e0c416f0f05460960983588edf0068d99cd1a6
2024-01-16 16:04:00 +00:00
Jordan Silva 07af3b06ac Merge "Update responsive grid spec cell size remainderSpace logic" into main 2024-01-09 12:52:10 +00:00
Jordan Silva 2de6a277b7 Update responsive grid spec cell size remainderSpace logic
Refactoring the cellSize spec of responsive grid to divide the remainder space in code instead of dividing by cols/rows in the spec definition. For example, instead of using 0.2 in the spec for 5x5 grid (1 / number of rows), it is going to use 1 (100% of the remainder space) and divide the percentage by the number of cols or rows in code.

Fix: 313621277
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: NexusLauncherImageTests
Test: CalculatedWorkspaceSpecTest
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Change-Id: Ifaec838ac9751562ecedc1fe39b966ee3d092de3
2024-01-08 19:40:01 -03:00
Jordan Silva dd612687cc Step down icon size when isVerticalBarLayout for responsive grids
Fix the icon step down logic to resize the icons to fit when isVerticalBarLayout and the iconSize does not fit inside the cellHeight.

Bug: 316087877
Bug: 314285621
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Change-Id: I3a1fd28b729435eaf2dbbff650e4d13d33d77ff8
2024-01-08 14:09:23 -03:00
Andy Wickham 99d7d4f2cb Better handling of insets for All Apps.
Changes:
 - For tablet, always center All Apps without applying additional
   insets for things like cutouts.
 - For tablet, allow the panel to span the full height of the
   screen (minus system bars), rather than 5.5 app rows. This also
   ensures the panel fully closes even if there are cutouts.
 - Remove additional padding for vertical bar mode (landscape on
   phones). This was double counting the cutout insets, but only
   for some views, so things were not aligned. Now the apps line
   up with the search bar, and the scroll bar still makes room for
   any side insets.

Before and after examples:
https://drive.google.com/drive/folders/1k0vSzisf4ZuGyp-qR-IF0QwM-IcHBFrZ?resourcekey=0-uxjzuVQ1KA3WwOQ4v6Dh2w&usp=drive_link

Bug: 299923399
Bug: 259617884
Fix: 300761324
Test: Manual
Flag: NA
Change-Id: I136d516260a1343b1198693c73fa389fe0e11cc9
2024-01-03 19:21:01 +00:00
fbaron e69b6f49f7 Align QSB with hotseat and workspace icons
The QSB was a bit wider becuase icons visible size is a bit smaller than their actual size due to b/235886078 so we add a workaround to adjust QSB size based on the visible icon size

Bug: 281587788
Test: atest HomeScreenImageTest
Flag: NONE
Change-Id: I593ca2d588f08b830be0b2ac389c747b6f558b91
2023-12-19 13:52:45 -08:00
Charlie Anderson 97eedb9570 Merge "fix font-scaling from clipping folder child icons" into main 2023-12-14 03:30:55 +00:00
Charlie Anderson 7bb10974d7 fix font-scaling from clipping folder child icons
Bug: 310850491
Test: verify locally and through screenshot tests
Flag: N/A

Change-Id: Iea7319e82ddffed16903e5112848cf089e5d52f2
2023-12-11 20:07:44 +00:00
Thales Lima 1faa4edc42 Make numFolderRows/Columns accept more values
InvariantDeviceProfile hold values that are not related to current DP in use. Now other classes get the value correctly from DeviceProfile, and each posture can hold different values, making it akin to iconSize.

Fix: 309800141
Test: DeviceProfileResponsiveDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Change-Id: I32295738585de67205dcd6c8942d08a3d07d169a
2023-12-08 22:00:48 +00:00
Jordan Silva 3e5688af97 Fix folder icon drawable padding for responsive grid
Bug: 314285621
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: NexusLauncherImageTests
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Change-Id: I502a112a0c7d1e6ec1de8501efb8d2893436e880
2023-12-05 15:12:29 -03:00