.toList() was only introduced to android in api level 34, which is newer than
this module's min_sdk_version. Replace it with .collect().
This was found while updating android lint.
Flag: EXEMPT refactor
Bug: 394096385
Test: Presubmits
Change-Id: Id8d1de1531b67a7daf448e45592b7ef78f685fc2
ag/30344959 showed the recommendations if available, to avoid the issue
of widgets list flashing when exiting search mode. However, we usually
hide recommendations in phone landscape due to the sticky header layout
not having enough space. In this fix, instead, we rebind recommendations
as before (to let the logic there decide whether to show or hide them),
and in order to fix the flashing problem that the earlier change was handling, we reset the recycler view.
Bug: 391231345
Flag: EXEMPT bugfix
Test: Manual, we don't have tests for interactions between screens
Change-Id: I535aa43cc553c9287c5d38ef7cde30f01e84d347
Discussed with folks who worked on IME animation, and root cause seemed
to be picker unconditionally clearing the focus. Also, there is no
in-built way for clearing focus on other user interactions. So, had to
write custom logic to conditionally clear the focus.
Bug: 369933372
Test: See screencast (tested back, and other user interactions)
Flag: EXEMPT BUGFIX
Change-Id: I693bd27662563e5320159c082eb955a3bd5386f8
Bug: 378417297
Flag: EXEMPT BUGFIX
Test: Installed app in bg with picker open and verified no scroll to top
Change-Id: I9b3c6a22c9b971f4d11bc6a6e534d4b6e0ca60bf
Screenshot test in follow up to include the button.
Bug: 356127021
Flag: com.android.launcher3.enable_tiered_widgets_by_default_in_picker
Test: Manual
Change-Id: Iac847361a0fa4a4b57d37e802ce6a7a5d8bb17d7
- The function used is a raised cosine function to determine the sections to animate.
Tested flag: adb shell device_config put launcher com.android.launcher3.letter_fast_scroller true
Based on recent figmaspec, size of selected letter is 28dp and regular is 20dp. That means scaling should be 28/20.
Colors are:
onSurface for letter
surfaceContainer for background.
Figma shows selected colors are materialColorOnSecondary
bug:358673724
Test manually: https://drive.google.com/file/d/1gvJd5KoK8X_Sv8jXg1cZ65R4AuqHuvcd/view?usp=sharing
Flag: com.android.launcher3.letter_fast_scroller
Change-Id: Ia86eb0e8c41bc043fda3c44aeaf59e204429f337
Covers the UI references related to widget picker or its shortcut.
Test: Existing tests
Flag: EXEMPT minor refactoring
Bug: 353347512
Change-Id: Ifed1b7600ca9836df147949f3740ca1e89acd04a
Makes the search related code separate from popup provider.
Bug: 347288851
Flag: EXEMPT flag in sysui
Test: Unit tests
Change-Id: I4534d5f70876ec0cf4e2d78030864f78a8bfabb9
We already know the details used to calculate the insets while in
onMeasure, so, instead of measuring everything twice, we initialize
the maxSpansPerRow in onMeasure and then call doMeasure.
Bug: 346341156
Flag: EXEMPT bugfix
Test: Manual and screenshot
Change-Id: If080f1f91c69d2d54139d876c36eac8743a224ee
The flake happened to be due to rebinding triggered on attachToWindow that reset the icon cache with placeholder icon
Based on what I see, instead of calling refresh and bind, just triggerring onWidgetsBound should be okay - assuming it was trying to bind view for case when theme or display size was changed while picker was open.
Bug: 337916664
Change-Id: Ic6f3ff9188e4c5eda141a948ffa0c2c7c685162e
Test: Screenshot test
Flag: EXEMPT bugfix for test
This change removes the widget education tip dialog, and the arrow
tip view. These are no longer needed now that taps are handled by
showing an add button.
Bug: 335318980
Test: `pm clear com.google.android.apps.nexuslauncher` and open widget
picker
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add NEXTFOOD
Change-Id: I9b24a41604880f5f94939c02b94f1a9f6a6c83d5
Issue - http://screen/AYyCKCWZH4uYeBp
* Before - http:/screencast/cast/NTc1NzE0MTg1NDk3ODA0OHwyNjA4ZmU5OC02ZQ
* After - http://screencast/cast/NDcyNTkzNzcyMjYyMTk1MnwxNmU1MTRmNy1jMw
Additionally, also fixes problem that fade in for some expanded sections
didn't always happen.
Bug: 332457155
Flag: N/A
Test: Manual (see video)
Change-Id: Iad3a341d9b992c72b61492d57db4faa96a06ecfa
Bug: 335467443
Test: manual - took a video
Flag: aconfig com.android.launcher3.enable_predictive_back_gesture TRUNKFOOD
Change-Id: I45980329f70ac1a8a8fc0e84be007f3385e40f58
This will help indicate that we will be navigating within widget picker's bottom sheet.
Fix: 333524244
Test: manual - took a video
Flag: aconfig com.android.launcher3.enable_predictive_back_gesture TEAMFOOD
Change-Id: If29806a474d35c0fdd5789cb67fa62dfbb313313
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
After exiting the search, we clear the search results and hide the
results lists (because that recycler view shouldn't be accessible after it). However, it often doesn't get chance to layout the empty data.
So, the next time we show the search results list again with new data,
it first animates to clear the old results and then animates in the new
ones. In this fix,
[demo](http://screencast/cast/NDg5OTg2NzIyMTU1NzI0OHxhMTk0NzEzZS1hYw), we swap the adapter to remove any old views, because old search results aren't valid anymore. Spoke with yigit who worked on RV in past and they suggested swapAdapter
was fine for this.
Other options explored:
1. set item animator = null; so, it doesn't animate flushing out old
results -> but we want animations
2. delay the visibility update to let layout happen -> but, if we are
hiding the section, why wait making the other UI updates until
layout?
Bug: 274051332
Flag: N/A
Test: Manual
Change-Id: I9f9c5a67b47b5415b2d9e4caa23fd4b6daf7cdea
Picker rebinds recommendations when size constraints change or
fold/unfold, but recommendations from popup provider may have changed.
This is an attempt at trying to maintain currently shown items
as much possible.
Also, align the pagination and title to the top in two pane picker
(confirmed with David that we prefer this version)
Additionally, we don't show the widgets count for suggestions.
Bug: 318410881
Flag: ACONFIG com.android.launcher3.enable_categorized_widget_recommendations DEVELOPMENT
Test: Manual
Change-Id: I60799f9ad38da913c3e084d758f5b82c79cd641c
- This makes the suggestion section non-overwhelming
- Currently it shows too many suggestions for user to find any value
- Limiting the height also allows pagination to feel smooth when showing
in categories
Bug: 318410881
Flag: ACONFIG com.android.launcher3.enable_categorized_widget_recommendations DEVELOPMENT
Test: Manual
Change-Id: Iab1f9a15bdd46ee1560734e30551bfb7c8a74a82
Fix: 328639347
Test: Manual - took a video
Flag: aconfig com.android.launcher3.enable_predictive_back_gesture TEAMFOOD
Change-Id: I909cca47477d75c2dd9b861e3c7812b9540e6fa1
Ordering changes and some more UI changes in follow-up.
Bug: 318410881
Test: See screenshots
Flag: ACONFIG com.android.launcher3.enable_categorized_widget_recommendations DEVELOPMENT
Change-Id: I77e7f4dcdda32e2921ae56721cddbe261832f0d8
The change is really for enabling display of categorical suggestions,
so using the same flag.
Bug: 315055849
Bug: 318410881
Test: See screenshots
Flag: ACONFIG com.android.launcher3.enable_categorized_widget_recommendations DEVELOPMENT
Change-Id: Ia98fdd6b827f31a63264128617f6a16ee0716bcc
When differently-sized widgets OR widgets of same size but not filling
space in previews are shown side by side, the top alignment looks odd.
Besides, in the updated UX, we want them to be center aligned.
Bug: 318410881
Bug: 319152349
Flag: N/A
Test: Screenshot update in cl chain.
Change-Id: I52cd7d6a1b5397a3c4c9dea8b072792b3211a8d3
Here we:
-Move no widgets text outside of the right pane so that we can center it
-setInset and change the clipping of children in the views so that we can fix the padding at the bottom when we have 3 button nav
-create selectedHeader where we keep track of the currently selected header in order to refresh the widgets for the selected header on rotation
-when widgets are bound we check if there are no recommended widgets, and if there aren't we select the first visible header
Fix: 324002996
Fix: 324001940
Fix: 323417968
Fix: 323460545
Fix: 323409306
Test: WidgetPickerImageTest
Flag: NONE
Change-Id: Ibd85cb086bb6c2aede6cf79da0c688a1fdaec4e5
The filter was missing from the refactor in ag/25502473.
There aren't currently WidgetPicker tests that would catch this behavior
but there should be.
Bug: 317452407
Test: Ran existing widget tests, looking at adding work profile tests.
Flag: none
Change-Id: I2ce8464a1c76505bfe7ce8cf4280bb5b576cdb1d
There are test failures when using ConstraintLayout without a known solution, see https://chat.google.com/room/AAAACwktJi8/2OogGWfbLvI. Switching back to a relativelayout to resolve those issues.
Bug: 301918659
Test: WidgetPickerImageTest
Flag: ACONFIG com.android.launcher3.enable_unfolded_two_pane_picker DEVELOPMENT
Change-Id: I004c2d77ca308d85b29217d4f1e548067126556f
Currently the work widget matcher matches against all
non-foreground user profiles, due to which the work
tab is incorrectly shown in widgets full screen, when
PS is present.
This was missed in ag/25129268 where a bunch of work
matcher fixes were done.
Flag: ACONFIG com.android.launcher3.Flags.enable_private_space DEVELOPMENT
Bug: 312900122
Test: Launcher3 tests
Change-Id: I80d33e851ea3366dc3897bb1f5cc17fcd6b34520
This Cl adds the following:
1. Fixes for Quite Mode check maintained by Launcher
2. Addition of new Quite Mode broadcasts
3. Fixes for determining work profile user correctly.
Flag: ACONFIG com.android.launcher3.Flags.enable_private_space DEVELOPMENT
Bug: 289223923
Test: Ran Launcher3 tests
Change-Id: I5f6158b213723339e70ff99e66c5f439f5879e12
In some cases the controller can be null if the view is no longer
connected to the window.
Also, this issue seems to only happen in cuttlefish instances so there
might be a weird behaviour going on there but in any case is good to check
for nulls.
Test: No testing require is only null checkin, just making sure it compiles.
Bug: 302869930
Change-Id: I88d6091b57293e9493385185bfeb3e470c9bad84