Commit Graph

18194 Commits

Author SHA1 Message Date
Willie Koomson 0a6e9d765d Fix issue with tap-to-add on recycled WidgetCells
Updates BaseWidgetSheet to check if the last recorded widget cell
to show an add button is still showing an add button before deciding
how to handle the current click.

When a widget is recycled or loses focus, it will reset to the default
state of hiding the add button. However, BaseWidgetSheet still tracks
it. If that cell is clicked again after being reset, we want to show
the add button.

Bug: TODO
Test: manual
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add TEAMFOOD
Change-Id: I4614674948a52b8908fabf5c0e5734bf76b9282b
2024-04-15 22:32:51 +00:00
Willie Koomson 1d439df9b1 Show add button when WidgetCell text is tapped
This change adds the click listener to the cell itself as well as
the preview, so that clicks anywhere in the cell will show the add
button. Only long clicks on the preview image will start the
drag-and-drop (current behavior).

Bug: 323886237
Test: manual tap on Widget cell
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add TEAMFOOD
Change-Id: I23b9b1261979971deffcf1132d95bd6a03c92c47
2024-04-15 22:32:51 +00:00
Willie Koomson dcc2d82d4e Scroll to show WidgetCell when it is tapped.
Scroll to show WidgetCell when it is tapped in a widget sheet.
Otherwise, the add button may show/hide without the user seeing
it if the bottom is clipped.

Bug: 329861721
Test: manual- tap WidgetCell when top or bottom is scrolled out of view
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add TEAMFOOD

Change-Id: Ie21730c193e845cb1c1fa447b7c0a7e719984a8f
2024-04-15 22:32:48 +00:00
Andy Wickham e0b23658d8 Merge "Cancel manual animation if LauncherState changes during drag." into main 2024-04-15 18:14:45 +00:00
Andrew Cole f2ae4d309f Merge "Removing Shrink Adaptive Icons" into main 2024-04-15 16:19:33 +00:00
Liana Kazanova 1c0b61377d Merge "Revert "Wait for LauncherModel loaded in waitForLauncherInitialized"" into main 2024-04-12 22:29:53 +00:00
Liana Kazanova b80c6c347a Revert "Wait for LauncherModel loaded in waitForLauncherInitialized"
This reverts commit f8f00f4233.

Reason for revert: DroidMonitor: Potential culprit for http://b/334162623.  verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Change-Id: Id165df41a87af4757abd3266b8643949ce012a08
2024-04-12 21:30:50 +00:00
Sunny Goyal 4396a935c2 Merge "Using resource overrides for PluginManager instead of code-swap" into main 2024-04-12 20:29:36 +00:00
Schneider Victor-tulias aec9ae92ea Merge "Wait for LauncherModel loaded in waitForLauncherInitialized" into main 2024-04-12 18:49:52 +00:00
Sunny Goyal 4a22ed81ea Using resource overrides for PluginManager instead of code-swap
Bug: 330920490
Test: Presubmit
Flag: None
Change-Id: Ib1cd50f95873928b9ce104e8e95d21f1dca9c6e3
2024-04-12 11:38:32 -07:00
Brandon Dayauon c1de065650 Merge "Fix stale header height being used in scroll to header calculation" into main 2024-04-12 17:00:40 +00:00
Sebastián Franco 7afe302bda Merge "If the user only had the default db, then migrate to the new default" into main 2024-04-12 16:55:13 +00:00
Schneider Victor-tulias f8f00f4233 Wait for LauncherModel loaded in waitForLauncherInitialized
Flag: N/A
Fixes: 326737440
Test: Launcher TAPL tests
Change-Id: I631b370198c393ad84419930c026b6a0ce63ec2b
2024-04-12 12:48:48 -04:00
Brandon Dayauon 5da04b231f Fix stale header height being used in scroll to header calculation
- This fixes the inconsistency of how far down is needed to scroll to since
the values used to calculate the header during drawOnScrimWithScaleAndBottomOffset() is faulty.
- Tweaked the row to scroll to when there are tabs vs no tabs. When there are no tabs, its possible the
header gets cut off most of the time hence subtracting by 1 will help this problem.

bug:332543940
Test locally: https://screenshot.googleplex.com/5y4vYiQcnSMKcA6
manual - before: https://drive.google.com/file/d/14Zj_FyO-3bVfXwuxaqgG_DXMELYS5bQn/view?usp=sharing
after with tabs:
after 5x5: https://drive.google.com/file/d/16rjaut6VqBMxG6uLQSnVTLRhUQnAANZ5/view?usp=sharing
after 4x5: https://drive.google.com/file/d/16jCPN8BewwuIQobt0t6tdVouUKpp1CdI/view?usp=sharing
after 4x4: https://drive.google.com/file/d/16VFQb5s6IfrpjRU9PmLlAJWjh1zIo77o/view?usp=sharing
after 3x3: https://drive.google.com/file/d/16VFQb5s6IfrpjRU9PmLlAJWjh1zIo77o/view?usp=sharing
after 2x2: https://drive.google.com/file/d/16N6Myuv9VtXgI1p4sIuV23iupea7jYLQ/view?usp=sharing

after no tabs:
after 5x5: https://drive.google.com/file/d/17H1oF_9fJnrtSqmJJqQyyn4upuM2CsoG/view?usp=sharing
after 4x5: https://drive.google.com/file/d/178Vu3SvnvSPODIfaR0oz6-jPVYDDNMaA/view?usp=sharing
after 4x4: https://drive.google.com/file/d/16yt_5ePPR7kwSrZlo5Sj3x0DqHoQKqYP/view?usp=sharing
after 3x3: https://drive.google.com/file/d/17HqebtHWcEHg-i9AfqHEVdl4YnQhX06P/view?usp=sharing
after 2x2: https://drive.google.com/file/d/17HqebtHWcEHg-i9AfqHEVdl4YnQhX06P/view?usp=sharing

after tablet:
landscape: https://drive.google.com/file/d/16JQGs0A3ifKpgqrpQwIzssrXbH-OC0Ej/view?usp=sharing
portrait: https://drive.google.com/file/d/16LmLnOEB6XkuAkAcgvP2mKHe5QQqG1oh/view?usp=sharing

Flag: ACONFIG com.android.launcher3.Flags.private_space_animation TRUNKFOOD

Change-Id: If8a70cc71e9cff4a7f8d3b648e3e59c414e40ee5
2024-04-11 16:22:11 -07:00
Andy Wickham 22dee942b5 Cancel manual animation if LauncherState changes during drag.
Previously, the following would cause the All Apps panel to appear
in NORMAL state:

1. Start dragging to all apps
2. During the drag, something sets Launcher to NORMAL
3. Release finger  -> animation to all apps completes, but state
   is still NORMAL

Side effects of this:
 - On large screens, All Apps draws its background on Launcher's
   ScrimView only if the current state is All Apps. So in this
   case, the apps just floated above the workspace.
 - On handheld, touches are handled by workspace even though you
   can see the All Apps list. So e.g. if you swipe down, the
   notification shade appears rather than all apps panel hiding
   (although it seems this touch issue was addressed separately).

I'm not sure if this is the main/only case of this state mismatch
happening, but verified with local async state changes that this
could in theory happen. We haven't been able to organically repro
the bug reliably. That being said, it feels plausible that a well
timed screen lock during the all apps transition could also hit
this case.

Demo videos with hard-coded state change to NORMAL 2 seconds after
you start swiping up to all apps (note I release my finger at the
end of each video):
https://drive.google.com/drive/folders/1ul8ep9N2M5oc6ZSbf_ZHQwp9IwTpz7GB?resourcekey=0-4LAufl0rkvtjvgZC0L-eMQ&usp=drive_link

Bug: 239394946
Bug: 331600490
Test: Manual with local async launcher state changes
Flag: NA
Change-Id: I6364dbde8aea67f5d1c525edf57ed7eb26096cf9
2024-04-11 16:00:34 -07:00
Jeremy Sim 130be57171 Merge "Set camera icon as gray when app is unlaunchable" into main 2024-04-11 21:41:21 +00:00
Andrew Cole 64dfdce2c1 Removing Shrink Adaptive Icons
This function is now obsolete and we can remove this and default to always shrinking non-adaptive (legacy) icons

Test: AllAppsSearchImageTest
Bug: 318867282
Flag: None
Change-Id: I1ba1566e362c55eb04871a7515fdc76fbc689d60
2024-04-11 20:28:10 +00:00
Randy Pfohl 819b835519 Revert "Revert "abtracting Activity from recentsView through rec..."
Revert submission 26911513-revert-26414135-RecentsViewContainer-MEROZZOKJQ

Reason for revert: Fix for issue has been found and will be included in this revert.

Reverted changes: /q/submissionid:26911513-revert-26414135-RecentsViewContainer-MEROZZOKJQ

Change-Id: I517e7d2fc0d82d250a6ed40862dd31c194d0a302
2024-04-11 08:58:08 -07:00
Jeremy Sim a5e838d61c Set camera icon as gray when app is unlaunchable
This CL is a follow-up to ag/26825455. Now that we are changing app pairs' disabled appearance back to icon-only, the case where a camera icon should be grayed out on an app pair on a small screen needs to be reinstated.

Fixes: 333137187
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual
Change-Id: I64ae3db28293fa0adc249d700e9e03c074b6854f
2024-04-11 11:25:27 -04:00
Shamali Patwa 2a51fc6420 Merge "Fix issue that widgets with config activity jump" into main 2024-04-11 14:08:54 +00:00
Danny Burakov 174e2224b6 Merge "Update predictive back progress interpolator" into main 2024-04-11 08:06:50 +00:00
Priyanka Advani 1d6851083b Merge changes from topic "revert-26414135-RecentsViewContainer-MEROZZOKJQ" into main
* changes:
  Revert "abtracting Activity from recentsView through recentsview..."
  Revert "fixing tests to match new abstraction"
2024-04-10 23:58:09 +00:00
Sunny Goyal 63bf93cf65 Merge "Freezing legacy feature flags" into main 2024-04-10 22:29:24 +00:00
Priyanka Advani 3c71346147 Revert "abtracting Activity from recentsView through recentsview..."
Revert submission 26414135-RecentsViewContainer

Reason for revert: Probable culprit for b/333767026. Will be verifying through ABTD for confirmation and before submitting the revert.

Reverted changes: /q/submissionid:26414135-RecentsViewContainer

Change-Id: I25775cd6531355f1dc042ddb7a8d442ee0b36e58
2024-04-10 21:31:07 +00:00
Sebastian Franco 12678a536b If the user only had the default db, then migrate to the new default
We also check if the new default is bigger than or equal to the
previous one.

Flag: ACONFIG enable_grid_migration_fix enabled
Flag: ACONFIG enable_narrow_grid_restore enabled
Bug: 325286145
Bug: 325285743
Test: BackupAndRestoreDBSelectionTest.kt
Test: GridMigrationTest.kt
Change-Id: I98315a4e4c112ca96a74200dd76016803dfaf820
2024-04-10 10:28:52 -07:00
randypfohl 547d6fc472 abtracting Activity from recentsView through recentsviewcontainer and basecontainerinterface interfaces
This change will let us move from activity to other parent views for recent views.

Summary: In prep for new recentsview containers outside of activity we needed to decouple recentsview from activity and state.
This change will let us move from activity to other parent views for recent views.

Test: Built and tested locally for 1p and 3p launchers on tablet, and portrait modes. Verified working functionality.

Bug: 292269949

Flag: NONE

Change-Id: I5c72745f438d466362ece988c35a97d829e9c1b4
2024-04-10 09:14:28 -07:00
Holly Jiuyu Sun c2ee3f5001 Merge "[omni] Implement 2-stage for LPNH." into main 2024-04-10 15:35:54 +00:00
Shamali P 9f2a4fe816 Fix issue that widgets with config activity jump
This also linked to the overlap we were seeing in
bug 331816144 (as can be seen in before and after video)

Bug: N/A
Test: See videos
Flag: aconfig launcher.enable_add_app_widget_via_config_activity_v2 NEXTFOOD
Change-Id: I21717e0c4d4eab7efa1746e46d3218b8b3cee4ef
2024-04-10 14:53:46 +00:00
Alina Zaidi 0580379e30 Rename freeform tasks to desktop tasks
Bug: b/332878426
Test: refactoring CL. Existing unit tests still pass.
Flag: NONE

Change-Id: I24ad9699223dd383ff794ef3b028bf32beca96d7
2024-04-10 12:30:50 +00:00
Brian Isganitis 3f4e5812ce Merge "Prevent meta shortcut from cancelling split select state." into main 2024-04-10 07:34:47 +00:00
Holly Sun deee0d06f6 [omni] Implement 2-stage for LPNH.
Use existing override duration and touch slop multiplier values for the 1st stage. Times `TWO_STAGE_MULTIPLIER` for the 2nd stage.
See http://shortn/_WqYj0buH7R

Bug: 330446193
Test: manual
Flag: legacy ENABLE_LPNH_TWO_STAGES disabled
Change-Id: Ic200f431524578d17fd98ebfbc65e44e0971e31c
2024-04-09 17:00:15 -07:00
Brian Isganitis 84fbec0b16 Prevent meta shortcut from cancelling split select state.
There are two things that need to be changed for this to work:

1. Make the isInOverview condition check for any Overview UI (including
   the split select state, modal, etc.)
2. Toggle Home All Apps directly, because firing the intent will cause
   Launcher to pause and resume before the intent is handled. We
misinterpret the pause as a request to cancel split screen. Since
TaskbarManager has a reference to Launcher, we might as well call the
method directly.

Test: Manual
Fix: 319076403
Flag: N/A
Change-Id: Ib8899188f593a168a054a16717df4a95be098557
2024-04-09 16:10:56 -07:00
Treehugger Robot 4fc8a9f965 Merge "[2/2] Fix widget resize frame show up at skewed location." into main 2024-04-09 22:26:55 +00:00
Sunny Goyal 8049369af8 Freezing legacy feature flags
Legacy feature flags will be locked to their current values in code.
All new feature development should use aconfig flags

Bug: 332588958
Flag: None
Test: Presubmit
Change-Id: Ie72dd8276b7135620de279835d6721a34f82ede4
2024-04-09 15:26:07 -07:00
Song Chun Fan ab21ddb2da Merge "[Launcher/Archive] remove all checks for the archiving system property" into main 2024-04-09 22:05:08 +00:00
Fengjiang Li 59091e4612 [2/2] Fix widget resize frame show up at skewed location.
Wait until launcher is not animating to show resize frame

Fix: 331433240
Test: manual - took a photo
Flag: NONE
Change-Id: I3aec7f8bf2b6081134004b30de3d389e5b1ab253
2024-04-09 13:43:36 -07:00
Sunny Goyal 3b00e7909a Merge "Using resource override instead of code-swap for ApiWrapper" into main 2024-04-09 20:33:20 +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
Alex Chau 3c0729c462 Add task menu item to move task to Desktop
- Call SystemUiProxy.moveToDesktop to move existing Overview tasks to desktop
- Animation polish will be handled separately
- Refactored AbstractFloatingView method into a helper to allow testing

Fix: 320310347
Test: DesktopSystemShortcutTest, AbstractFloatingViewHelperTest
Flag: ACONFIG com.android.window.flags.enable_desktop_windowing_mode DEVELOPMENT
Change-Id: I2e4e04182e46ba4750e0683ee1789ba8fada06ea
2024-04-09 16:35:55 +01:00
Johannes Gallmann 75dd62fd22 Update predictive back progress interpolator
Bug: 332512902
Flag: ACONFIG com.android.systemui.predictive_back_sysui TRUNKFOOD
Test: Manual, i.e. analysing screenrecordings and verify that there are no more animation jumps at the start/end of the back animations
Change-Id: I99b13199032f7098fedb1cbd02cfe478d6fbb1f7
2024-04-09 14:11:40 +00:00
Sunny Goyal 8ecbaa422f Merge "Moving various nav-bar configs out of feature flags" into main 2024-04-09 05:45:21 +00:00
Jeremy Sim be2a18d3fc Merge "Delete app pairs on model load if flag is turned off" into main 2024-04-09 00:38:42 +00:00
Jeremy Sim fa3eae99a5 Merge "Fix bug where app pair title was not updating with language" into main 2024-04-09 00:22:19 +00:00
Sunny Goyal 89931316a2 Moving various nav-bar configs out of feature flags
Bug: 332588958
Test: Presubmit
Flag: None
Change-Id: Ia4dc5b69bcf4d461e3444b9e37bb7334bb74aae4
2024-04-08 16:54:04 -07:00
Song Chun Fan e5ad96ce10 [Launcher/Archive] remove all checks for the archiving system property
No longer needed

Change-Id: I62c8843aa04a245d1dcc30f7787c71d17993f5d1
BUG: 331165939
Test: builds
2024-04-08 23:14:07 +00:00
Shamali P 168d420440 Maintain the recommendations that were initially displayed
- The component names of the widgets shown on first opening the picker
are saved across orientation change - and only those shown initially are
displayed.

* http://screencast/cast/NDkyMDQ0OTg3OTI0NDgwMHw4ZGU1ZjRmNy0zNQ
* https://screencast/cast/NTc1NjQ1NDI5MTExMTkzNnxiZGJlMjQ2Yi01Ng

Bug: 331776686
Flag: ACONFIG com.android.launcher3.enable_categorized_widget_suggestions TEAMFOOD
Test: Manual - see videos.
Change-Id: I6af7421c2757fde321d06406514ab2576a48fb47
2024-04-08 16:02:05 +00:00
Saumya Prakash 83646f9b82 Merge "Add Taskbar education for Circle to Search for pinned taskbar" into main 2024-04-06 05:39:28 +00:00
Saumya Prakash 5453c053b9 Add Taskbar education for Circle to Search for pinned taskbar
This change adds a new education tooltip for pinned taskbar that teaches
users how to use Circle to Search invoked through the action key. It won't run on
transient taskbar or if the user is in 3 button mode. The disclosures at
the bottom of the tooltip link to localized legal agreements for the feature.

Fix: 330401405
Test: Pin the taskbar and observe that the next time an app is launched
the edu shows up. After dismissal it shouldn't show up again.
Additionally, click on the disclosures and ensure they launch.
Flag: ACONFIG com.android.launcher3.enable_taskbar_pinning NEXTFOOD

Change-Id: I64aea3004aca77c3ec81b81dea0cfab7a9c1e272
2024-04-06 01:52:49 +00:00
Willie Koomson 2041fd04a4 Merge "Fix resize frame for widgets added with tap-to-add button" into main 2024-04-06 00:45:37 +00:00
Sunny Goyal 8e1f37181d Merge "Allowing base class for ResourceBasedOverride to have Context based constructors" into main 2024-04-05 23:20:38 +00:00