Commit Graph

33 Commits

Author SHA1 Message Date
Suphon Thanakornpakapong
f4bf92034b Remove enhanced smartspace flag 2022-05-18 18:46:49 +07:00
Suphon Thanakornpakapong
659639842c Add smartspace to widgets picker 2022-05-13 16:33:13 +07:00
Steven Ng
43859f10bc Group weather widgets under the widget category
Test: manual (see video in bug) and added PackageUserKeyTest
      Also tested pending conversation widget to ensure the right icon
      is shown.
Fix: 201062480
Change-Id: If23c28bd93c54fb1747648309ab3c238a1810902
2021-09-30 14:22:21 +01:00
Sunny Goyal
ed2a55f413 Removing widget preview caching
> All previews are generated on demand when the corresponding
  header expands
> Using ItemAnimator to animate layout changes when preview loads

Bug: 196238313
Test: Manual
Change-Id: I0cb859c8443c2c536399e4063f58baecfc7416ad
2021-08-17 17:50:30 -07:00
Steven Ng
12f7a59e5c Use category icon for pending conversation widgets
Fix: 192333050
Test: Manual
Change-Id: Ie3895cd4747f1bec1c8ca9af82347bb0eafa7415
2021-06-29 18:04:09 +01:00
Stevie Kideckel
69af278f8a Refresh widgets in the model when packages change
Fix: 191163748
Test: local sample app
Change-Id: Ic09ad11cabf6efa471fb6e685cb255c4a17493ee
2021-06-17 13:08:53 +00:00
Steven Ng
1d47d8c705 Use grid size as the upper bound for widgets' default size in initSpans
Test: In Pixel 4, drag a monthly view Google calendar widget to a new
      home page from the full widgets picker. The widget outline is
      correctly shown.
Bug: 189060113
Change-Id: I33113b29cc8923098de95f1d5eb14c2b02429de1
2021-06-08 14:15:50 +01:00
Steven Ng
833a0b9fa9 Add a widget conversations category for grouping widgets in the picker
Bug: 184878454
Test: Open the full widget picker and observe the conversation widget
      from SystemUi is listed under conversations.
Change-Id: I53cd74d80ce3c4ff77a92cd660ca9283416e9fd3
2021-04-08 22:35:55 +01:00
Steven Ng
1a4670eeff Only clear widgets list upon all widgets & shortcuts update
Test: Install BBC News. Then, quickly go to all widgets tray.
      BBC News widgets is added to the all widgets tray without
      removing other widgets.

Bug: 182897740
Change-Id: I17b50f5128e24c346354b8fb7817a318a94efb62
2021-03-16 19:30:04 +00:00
Steven Ng
3a8353256a Widgets recommendation backend
Add a widgets recommendation mechanism based on AiAI app predication
ranking with the following changes:

1. Only one widget is picked from one app.
2. Widgets that are already added to the workspace are excluded from
   the recommendation.

Test: run PredicationUpdateTaskTest

Bug: 179797520
Change-Id: Ia697bc6df0bae75969e68b7b3de32d57901f7461
2021-03-08 23:37:51 +00:00
Yogisha Dixit
741fae9ea2 Move widget files into widget folder + add tests.
I will use the newly created LauncherAppWidgetProviderInfoTest in a follow-up CL to add tests for the newly added widget sizing APIs.

Test: Automatic: Ran all robolectric tests in launcher3,
      Manual: Added a widget, edited the widget, removed the widget
Bug: 179807199
Change-Id: I540b2dbe284c6eb5aa2466a1d13a9581ee59425b
2021-03-01 13:59:52 +00:00
Steven Ng
391404fcb7 Add personal / work tabs for work profile widgets
Video: https://drive.google.com/file/d/1TORRNcvVM7fIvNd_WZaajLbI7D9z4VFA/view?usp=sharing


Test: Main profile only: run AddConfigWidgetTest.
      With work profile: manually launch the full widgets sheet.
      Go to the personal tab: only personal widgets are shown.
      Go to the work tab: only work widgets are shown
      Successfully add personal / work widgets from the full widgets
      sheet.

Bug: 179797520

Change-Id: Iad8b90c2af35e0580319d7a05510ec88e4f8b86c
2021-02-22 16:10:09 +00:00
Steven Ng
e92bc55d12 Make all widgets collapsed in the full widget picker by default
Changes:
1. Add a WidgetListHeader view for showing icon, app name and a subtitle.
2. Only WidgetListHeaders are always visible to users in the full widget
   picker.
3. Only one widgets list from an app is visible in the full widget picker
   at any one time.

Test: Auto: run add robolectric tests under widget/picker
      Manual: Open full widgets picker. Then, expand and collapse apps.
      Video: https://drive.google.com/file/d/1gzfeEm5IOAu0qHsO77OTS2eMfU7CHJiL/view?usp=sharing

Bug: 179797520
Change-Id: Idac58be23dfeafcb79b3c61b4972d3addb462de1
2021-02-15 17:46:38 +00:00
Steven Ng
2f5648a911 Refactoring before adding a new view type in the WidgetsListAdapter
Changes made:
1. Model: added an abstract class for storing common information for
   entries shown in the full page widgets picker.
2. Introduced a ViewHolderBinder interface to split the logic of binding
   data to ViewHolder into separate classes.
3. Move the view holder binding of WidgetsListRow from WidgetListAdapter
   to its new class.
4. Move some widgets picker classes into a new picker package.

Test: Auto: Run WidgetsListAdapterTest, WidgetsListRowEntryTest and
      WidgetsListRowViewHolderBinderTest.
      Manual: open the all apps widgets tray and navigate the list.

Bug: 179797520
Change-Id: Iab29557842bb79156cad84d00a4c5d0db0c5aa06
2021-02-10 21:23:40 +00:00
Sunny Goyal
4484015f48 Simplifying AppFilter
Change-Id: I36217a42aa67f2b3bc3a3226ace2ef7e194956a6
2020-09-08 16:31:17 -07:00
Sunny Goyal
d4d2a73b67 Removing MultiHashMap and using java-streams instead
This makes it easier to choose different collection
implementations

Change-Id: Ic44e128b7478fcbbb1b546027685e058945af3f9
2020-08-27 15:26:18 -07:00
Sunny Goyal
63d327442c Disabling notification dots for Launcher3Go
Bug: 164457095
Change-Id: If751719a698785957d37b4656a0132d2b56b64f9
2020-08-19 17:04:38 -07:00
Sunny Goyal
5fb83a47f2 Removing icon recents version
Change-Id: Ibdc88715e38590cedf8a7b5174061bb2c6ef9533
2020-08-14 10:49:19 -07:00
Sunny Goyal
e396abf502 Moving model data structures to a separate file
Change-Id: I77ad7a5219e72d2e0d6c1803de2ac3ed6a65a8f7
2020-04-09 13:20:39 -07:00
Tracy Zhou
bd22546683 Render user's actual workspace in ThemePicker preview (Part 6)
Didn't test out widgets in Part 5. So in this change,
- Added some widget classes to the PreviewContext WHITELIST
- Manually update widget model after loading workspace since we do not attach widget listeners to the LauncherAppModel for preview.

Change-Id: I0a555b2319b2e91432dbd58289ddb66aca1384df
2020-03-02 00:44:55 -08:00
Tracy Zhou
7be160170d Merge "Render user's actual workspace in ThemePicker preview (Part 5)" into ub-launcher3-master 2020-02-20 05:53:45 +00:00
Tracy Zhou
10a285dc24 Render user's actual workspace in ThemePicker preview (Part 5)
This change takes care of rendering widgets using widget provider's layout info.

Test: manual
Bug: 144052839

Change-Id: I7002d8bf653513cdd317736d550a47f61f0ee474
2020-02-19 16:46:25 -08:00
Zak Cohen
3eeb41de9a Rename flag IS_DOGFOOD to IS_STUDIO.
The flag is only set when building from Android Studio... and is never
used for dogfood.

Test: local
Change-Id: I898d585f4558c2437f0152ef102bea59c351f80b
2020-02-14 14:19:59 -08:00
Sunny Goyal
18204e4eea Various icon cache fixes
> Multiple instances of LauncherIcon created when
    LauncherIcons refers IconCache which in turn creates new LauncherIcons
> Widget icons are never cached as they were using low res icons
> Shortcut drag icons are not loaded synchronously
    when using PinItemRequest flow
> Wrong lastUpdatedTime is used in iconCache for shortcuts
> IconUpdateHandler does not ignore managedUser promise icons

Change-Id: Ie7eed68a30fad11d1861b6c70c380953a15ae1cf
2020-02-06 14:16:34 -08:00
Sunny Goyal
a7a5bf3101 Adding support for multiple Model clients
Bug: 137568159
Change-Id: Ia4db800b19cc80c695fcb9ea28e07709dfd08c6a
2020-01-10 12:23:27 -08:00
Sunny Goyal
337c81f664 Removing static instances of UserManagerCompat and AppWidgetManager
> Changing the lifecycle to follow other static objects in Launcher
> Removing compat interface and inlining everything to helpers

Bug: 141376165
Change-Id: I82bd5db1969101de9a7eac77f32728d70195bb35
2019-12-11 10:03:19 -08:00
Sunny Goyal
e7b00128c7 Removing static instance of LauncherAppsCompat and unnecessary wrapper classes
Bug: 141376165
Change-Id: I8c1f1ab7d83ec50fe9c7bf39960ef9c360025ec7
2019-10-02 16:20:22 -07:00
Sunny Goyal
3e3d759db2 Removing flag overrides. All flags should be defined as togglable flags instead.
Change-Id: Ia7b9ff84413096cd5b0c4a9a81a232019f2522d2
2019-09-12 10:17:14 -07:00
Sunny Goyal
87dcde6d6c Separating apps list callback from model callback and simplifying various events
Bug: 137568159
Change-Id: I4d8bb5c01cabe642731ebd3f57fe15bdc5a569b7
2019-07-25 11:29:16 -07:00
Hyunyoung Song
cbd01fc3dc Handle null ItemInfo.title for widget list
Bug: 122809947
Change-Id: I2f72fb0e152e93adbb4bc4204d5d688b273452ad
2019-01-15 11:45:33 -08:00
Sunny Goyal
9dbdd72498 Migrating some runnables to lambda operations
Change-Id: Ied7b6ca14594c72bc671127baf4f84fdcdb35b93
2018-12-27 13:29:34 -08:00
Rajeev Kumar
1baf8a78c6 Create a launcher LoaderResults override.
This change disables shortcuts/widgets binding on Android Go devices.
Bug: 112904271
Test: Manual test

Change-Id: I3dbcd23dc448ff9ca5fe6c32958dcffb51c4bcf5
2018-11-05 15:43:53 -08:00
Rajeev Kumar
0a926c1d67 Create a launcher model override.
This change disables shortcuts/widgets loading on Android Go devices.
Bug: 112904271
Test: Manual test

Change-Id: I2c40f87a8f5d752525c99d254693a4e0a9eeeb2b
2018-11-02 15:25:25 -07:00