Commit Graph

17611 Commits

Author SHA1 Message Date
Charlie Anderson a4240c72c0 Adds a legacy flag to enable Launcher BR metrics.
This is necessary because the aconfig flag requires reboot to enable, however backup/restore happens on the first load so the flag will not be ready.

Flag: LEGACY ENABLE_LAUNCHER_BR_METRICS TEAMFOOD
Test: compilation / presubmit
Bug: 305984208
Change-Id: Ida90b1bd485fb037ebf3dde7ad17bf4e462661e6
2024-01-04 17:40:51 -05:00
Charlie Anderson f0b1ddc038 Merge "Adds restore metrics to RestoreDbTask.java" into main 2024-01-04 22:25:09 +00:00
Andy Wickham 93504b4225 Merge "Ensure header view expected height accounts for tabs." into main 2024-01-04 21:32:13 +00:00
Sergey Pinkevich f78644b4eb Merge "Revert "Wrong app icon position in seascape mode for RTL layout"" into main 2024-01-04 17:54:32 +00:00
Tony Wickham 97e6c9c214 Merge "Fix KI in test and re-enable for postsubmit." into main 2024-01-04 17:50:35 +00:00
Sergey Pinkevich 387e99f4bc Revert "Wrong app icon position in seascape mode for RTL layout"
This reverts commit 9b6587d80f.

Reason for revert: Show app icons in wrong order

Change-Id: I0fcc6b6f6431a8e596a504f5f7eb2c2d533be887
2024-01-04 14:54:30 +00:00
Jordan Silva 873d49937c Merge "Add ESCAPE key to dismiss Overview" into main 2024-01-04 14:12:28 +00:00
Jordan Silva 9878a7206e Add ESCAPE key to dismiss Overview
This CL adds the functionality of escape key to Overview. It dismisses Overview when the esc key is pressed.
When Overview is showing a Modal Task, it will return to Overview state instead of the Normal state.

Fix: 315283507
Flag: N/A
Test: TaplTestsQuickstep
Change-Id: I02e02f623d9a4aad1c2d6188fdea4e3fc4f96d64
2024-01-04 09:08:44 -03:00
Sergey Pinkevich e8f4fbf012 Merge "Wrong app icon position in seascape mode for RTL layout" into main 2024-01-04 12:07:40 +00:00
Andy Wickham f495102326 Ensure header view expected height accounts for tabs.
This was already handled except for the case where there were no
predicted apps and no all apps divider, i.e. suggested apps are
disabled and a work profile is added (so tabs show instead of the
divider).

Why did the other cases work? Predicted apps and the divider are
FloatingHeaderRows which call FloatingHeaderView#onHeightUpdated
whenever they are updated (triggering updateExpectedHeight()).

And why did this sometimes "fix itself" until a reboot? When the
search bar is tapped, the search transition causes the expected
height to be updated. So that is my guess.

The key to this change is to wait to update the expected height
until after we have defined mTabsHidden during setup(). It is
normal for the header to be initialized without tabs and then
updated to show the tabs when the work apps are available. So
this was previously incorrectly using mTabsHidden=true for the
calculations.

Fix: 245516031
Test: Manual (force stop launcher and verify tabs scroll correctly)
Flag: NA
Change-Id: Ifcc2f39649c5494b5f3ebefc1cdddfbefbe5d9a0
2024-01-03 18:54:24 -06:00
Tony Wickham c5d4e4dcf5 Fix KI in test and re-enable for postsubmit.
- The taskbar stashing logic with hardware keyboards was different
  between tests and user experience; aligned the test to be the
  same.
- There is still a previous test failure that only occurred in
  post submit, so also add ScreenRecord to diagnose it
- Once that is resolved, can promote the test to PRESUBMIT.

Test: testQuickSwitchToPreviousAppForTablet
Flag: NA
Fixes: 318544733
Bug: 314873201
Change-Id: Ia813eb0294d759c40d90cec7a8e9a7e0aea2d917
2024-01-03 23:27:18 +00:00
Andy Wickham 60dcb19a48 Merge "Better handling of insets for All Apps." into main 2024-01-03 22:34:36 +00:00
Federico Baron 8d23a6762d Merge "Fix IllegalArguemntException for ClipIconView#update" into main 2024-01-03 22:28:00 +00:00
Charlie Anderson 1fcf8da4e5 Adds restore metrics to RestoreDbTask.java
Bug: 307527314
Flag: ACONFIG enable_launcher_br_metrics TEAMFOOD
Test: locally verified
Change-Id: I105b17276cf7e2c270c819854a8fbc269b7c81b4
2024-01-03 22:06:44 +00:00
fbaron 3b894e1f70 Fix IllegalArguemntException for ClipIconView#update
The scale was infinity sometimes which means that the view minSize is probably getting set to 0 due to lp height and width being 0, so we do not update the views as they are no longer laid out

Flag: NONE
Test: Opening apps should work fine, but i wasn't able to repro this exception before or after this fix
Fix: 318099222
Change-Id: I1c08346c7ee1d4e89d9c3ba23ee2aa51a451cb31
2024-01-03 12:44:10 -08:00
Sergey Pinkevich 9b6587d80f Wrong app icon position in seascape mode for RTL layout
Bug: 317072320
Test: manual
Flag: NONE

Change-Id: If998033d6008626941eb766dcc96803c25b8bf02
2024-01-03 19:28:52 +00: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
Vinit Nayak 05d5424049 Merge changes I21801b63,I017f1d55 into main
* changes:
  App pairs: themed icons
  Fix bug where app pair icons were appearing empty
2024-01-03 18:26:04 +00:00
Jagrut Desai 39e4b611b5 Merge "Refactor TaskbarDividerPopup Open/close animation" into main 2024-01-03 17:00:52 +00:00
Jeremy Sim 14424e9e1f App pairs: themed icons
App pairs now use themed icons when theming is enabled.

Fixes: 312452183
Test: Manual and presubmit tested
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TEAMFOOD
Change-Id: I21801b63bc3b52da9b2dfff02cc9ec70e679b300
2024-01-03 15:14:31 +00:00
Jeremy Sim d36d4f3f94 Fix bug where app pair icons were appearing empty
Using similar logic as other BubbleTextViews, checks for PlaceholderIconDrawables and redraws the icons if needed.

Fixes: 316041983
Test: Manual and presubmit tested
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TEAMFOOD
Change-Id: I017f1d5597fd28d37ca9a8a5758f33468e46f384
2024-01-03 15:13:48 +00:00
Vinit Nayak a85fa48883 Merge "Improve null safety for app pairs" into main 2024-01-03 15:11:27 +00:00
Vinit Nayak d6493f4558 Improve null safety for app pairs
- Improves crash safety in AppPairIcon.java. An app pair should never have more or fewer than 2 app members, but if it happens somehow and there is an app pair on the home screen, the device will enter a crash loop that is hard to recover from. Added some safety checks so that it doesn't happen.

Fixes: 317283244
Test: Manual and presubmit tested
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TEAMFOOD
Change-Id: I2cbd90f028f7c31af6e832b5515502ba992f0b54
2024-01-02 22:22:02 -08:00
Charlie Anderson 81b6b21faf Merge "Adding extensions for backup restore test" into main 2024-01-02 23:30:55 +00:00
Jagrut Desai 25cb918a37 Refactor TaskbarDividerPopup Open/close animation
Test: Manual
Bug: 315848479
Flag: ACONFIG com.android.launcher3.enable_taskbar_pinning DISABLED
Change-Id: I3c43bd718cef24ec334f7f4884167ecb2ce0cfd5
2024-01-02 15:25:42 -08:00
Charlie Anderson d6fc23f230 Adding extensions for backup restore test
Bug: 294386159
Test: presubmit
Flag: N/A
Change-Id: I4acc48c0bdd967d3c5463c85acd275a57d4a28ba
2024-01-02 16:19:32 -05:00
Jagrut Desai 2107717252 Merge "Change Tracking Bug for Taskbar pinning feature flag" into main 2024-01-02 20:52:50 +00:00
Fengjiang Li abd3d6ddcc Merge "Revert " ALLAPPS PREINFLATION to TEAMFOOD"" into main 2024-01-02 20:00:35 +00:00
Jeremy Sim 0c8a38d181 Merge "Fix crash with app pairs and grid migration" into main 2023-12-21 00:07:47 +00:00
Jagrut Desai 5bcad413ec Change Tracking Bug for Taskbar pinning feature flag
Test: Presubmit
Bug: 296231746
Flag: ACONFIG com.android.launcher3.enable_taskbar_pinning DISABLED
Change-Id: I4be1d2a247f0aa6b39854a667b576a523a8a776a
2023-12-20 11:09:50 -08:00
Federico Baron 1abb9a47b4 Merge "Align QSB with hotseat and workspace icons" into main 2023-12-20 17:36:12 +00:00
Sergey Pinkevich 4d2515b4e2 Merge "Wrong app chip menu position for RTL layout" into main 2023-12-20 12:21:25 +00:00
Sergey Pinkevich 3030a6d74a Wrong app chip menu position for RTL layout
Bug: 315787393
Test: manual
Flag: icon_app_chip_menu
Change-Id: I26846262ada3704afb0da58748df3dae36da5655
2023-12-20 12:20:42 +00:00
Jeremy Sim ee596789de Fix crash with app pairs and grid migration
This CL makes it so that app pair contents are loaded properly during grid migration, like folder contents.

Fixes: 316052056
Test: Have app pairs on home screen, change home grid (e.g. 4x5 to 5x5), launcher does not crash
Flag: ACONFIG com.android.wm.shell.enable_app_pairs DEVELOPMENT
Change-Id: I6a531d0d29d15ed7b8dfe7933690effe5344d941
2023-12-19 22:44:46 -08: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
Helen Cheuk c225b99be2 Merge "Add radius to widget internal focus to fit new focus outline design" into main 2023-12-19 16:59:50 +00:00
Tony Wickham 054d953a0d Merge "Log app launches via taskbar drag and drop" into main 2023-12-19 16:17:21 +00:00
Himanshu Gupta ce2b013d31 Merge "Adding methods to access LauncherApps APIs." into main 2023-12-19 11:27:09 +00:00
helencheuk 1b3b67d004 Add radius to widget internal focus to fit new focus outline design
Bug: 310953377
Test: Manual
Flag: ACONFIG com.android.launcher3.enable_focus_outline Development
Change-Id: I9b11e8bf21dbb5045586907f0fc13577e236c8e7
2023-12-19 11:27:04 +00:00
Sergey Pinkevich 102e54ba05 Merge "Split tasks in RTL mode" into main 2023-12-19 10:19:02 +00:00
Tony Wickham 1a8cf0a9f6 Log app launches via taskbar drag and drop
- This also goes through the app predictions pipeline to update
  hotseat predictions

Fixes: 316940471
Test: Drag apps to split screen, ensure taskbar predictions update
      (also verify by logging AppPredictor#notifyAppTargetEvent)
Flag: None
Change-Id: I844414ecb56b4e36a2c94d913c1fb37abf056593
2023-12-18 23:30:59 +00:00
Himanshu Gupta 6c25654e84 Adding methods to access LauncherApps APIs.
These methods are added to ApiWrapper class
so that Launcher can acess these APIs.

Bug: 308054233
Test: Presubmit
Flag: ACONFIG com.android.launcher3.Flags.private_space_sys_apps_separation DEVELOPMENT
Change-Id: Ic2e64b38cc8b0d262d3f6e9614e2b3fceb9d82a0
2023-12-18 19:47:13 +00:00
Charlie Anderson 511421c12f Adds logging for Launcher restore metrics in Launcher and LoaderTask
- Adds flag for indicating when we are loading after a restore, separate from the pending restore flag
- Adds many success/failure scenario metrics when loading and binding items

Flag: ACONFIG enable_launcher_br_metrics DEVELOPMENT
Test: locally verified
Bug: 307527314
Change-Id: I9d2660f6d9d7cd5813072201e96b1a64aec4ea4b
2023-12-18 19:32:02 +00:00
Sergey Pinkevich e0ccb4e618 Split tasks in RTL mode
For `translationX` in RTL (right to left layout) mode we should take into account `secondarySnapshotWidth`, not the primary one.

The same for `translationY` for foldable phone in folded mode

Known issue: there is still a wrong position for overview app icon, but it is not related to the task thumbnail, and will be fixed in a dedicated task
(Screenshot of the issue: https://screenshot.googleplex.com/9GHNWxQ5H6vJPn5)
Known issue task: b/315787393

Bug: 309452423
Flag: NONE
Test: manual

Tablet: https://drive.google.com/file/d/1WGUVcFq0sFTJYsAwcjE6E1SHMRe7_TaV/view?usp=sharing
Foldable phone: https://drive.google.com/file/d/1GvDgYg8R9OEoMSDKZaZVXSlsxh_qS-wW/view?usp=sharing

Change-Id: Iefe7fec586592e6a72c0f3be5933307213d92c7f
2023-12-18 18:41:27 +00:00
Federico Baron a06a171874 Merge "Remove unused flag UNFOLDED_WIDGET_PICKER" into main 2023-12-18 17:57:21 +00:00
Greg Kaiser 486c96be87 Merge "Revert "App Pairs: Implement Overview Actions View button"" into main 2023-12-18 15:15:59 +00:00
Greg Kaiser 45ba84268c Revert "App Pairs: Implement Overview Actions View button"
Revert submission 25143701-app-pairs-action-button

Reason for revert: Causes P0 b/315292030

Reverted changes: /q/submissionid:25143701-app-pairs-action-button

Change-Id: I1fcbb9f333ca29c5db255232dc9475dec465ac81
2023-12-18 14:53:19 +00:00
Jeremy Sim 789414190f Merge "App Pairs: Implement Overview Actions View button" into main 2023-12-18 05:07:36 +00:00
Jeremy Sim e1fcb5390b App Pairs: Implement Overview Actions View button
[App Pairs 6/?]

This patch includes:
- Ability to "save app pair" from Overview Actions
- The actions bar is not longer hidden for GroupedTasks; instead the individual buttons for "Select", "Screenshot", and "Split screen" are toggled off and "Save app pair" is toggled on.

Note: This patch introduces a slight regression (b/315545418) where users are now able to long-press to select text on task 1 of a paired GroupedTaskView (previously we did not let them select text on either task for consistency.) Will follow up with a fix -- see bug for details.

Flag: ACONFIG com.android.wm.shell.enable_app_pairs DEVELOPMENT
Bug: 315545418
Bug: 315292030
Test: Manual, all action buttons still work and "Save app pair" appears and disappears correctly
Change-Id: I0eb1fa9520ba14074ede3480e771b340cf2f6e2c
2023-12-18 02:25:22 +00:00
William Leshner c43435c063 Merge "Handle widget taps in WidgetPickerActivity." into main 2023-12-15 23:20:23 +00:00