Commit Graph

595 Commits

Author SHA1 Message Date
Andy Wickham
8e3131898f Merge "Utilities.trim never returns null." 2022-01-28 00:35:50 +00:00
TreeHugger Robot
d7757f5aed Merge "Enable bulk icon loading on master" 2022-01-26 09:04:40 +00:00
Schneider Victor-tulias
1702a0ea90 Enable bulk icon loading on master
Bug: 195674813
Test: none
Change-Id: I01fb4b77e652b2fd71e8a7a0edf5ddbe024f9d48
2022-01-25 13:03:37 -08:00
Sunny Goyal
7dece749a3 Updating logic to check if icon needs badging
Bug: 209503720
Test: Manual
Change-Id: I66f0dbaf81be3190a106323fe3ce87717626d8e7
2022-01-19 17:22:46 +05:30
Andy Wickham
56be73be80 Utilities.trim never returns null.
This fixes a crash loop I was seeing on my device and also
preemptively fixes similar NullPointerExceptions.

Bug: 213931730
Test: Manually verified crash loop stopped with this change.
Change-Id: I8d2fc8475d42ac60b7fdc9219421a8c9733c7b9f
2022-01-18 09:13:43 -08:00
Alex Chau
e09067c2f4 Allow items to be added alongside smartspace
- Allow icons to be added to first row where search container does not occupy
- On upgrade, clean up first row of screen 0 which may have junk data, as we used to assume first forw of screen 0 is always occupied

Bug: 210127246
Test: manual
Change-Id: I835a321964984e02632c8a70474a6551b5e360f7
2022-01-10 18:24:15 +00:00
Alex Chau
f3dbb049dc Add 6 col grid to UIEvents
Bug: 210118169
Test: manual
Change-Id: I811c970ba41641a0abfae0d0a395a6b31a9da5dd
2022-01-06 14:53:51 +00:00
TreeHugger Robot
61da68ed8c Merge "Set default value for rank field in launcher logs to ItemInfo.rank." into sc-v2-dev am: ed6cbbc9a6 am: 67daf300e2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16360368

Change-Id: I9deab9ebbb33ac8ed8f6708120416679cb0f2647
2021-12-13 19:39:44 +00:00
TreeHugger Robot
ed6cbbc9a6 Merge "Set default value for rank field in launcher logs to ItemInfo.rank." into sc-v2-dev 2021-12-13 18:48:09 +00:00
TreeHugger Robot
890bfc8914 Merge "Allow restore across form factors" into sc-v2-dev am: 5599b02141 am: 7f4adf679e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16440220

Change-Id: Ic4b2b4cb76e646ed750b5a9bccbf14b07310f59a
2021-12-11 00:50:38 +00:00
Alex Chau
ab26c62c4a Allow restore across form factors
- Removed deviceTypeCompatible check and allow restore across for mfactors
- In AOSP default device_profile, mark 3x3, 4x4, and 5x5 as phone only. On tablets they'll reflow to 6x5.

Bug: 198575341
Bug: 210129187
Test: Only 3x3, 4x4 and 5x5 are enabled on phone
Test: Only 6x5 is enabled on tablet
Test: Phone backup of 4x4 get restored and reflow to 6x5 on tablet
Change-Id: I36a641d47fcee86ace0fea3d9194d61d12517f13
2021-12-10 22:00:49 +00:00
TreeHugger Robot
2636a5d5b2 Merge "Add launcher grid spec for tablet" into sc-v2-dev am: b1ae1ca124 am: 287d976c91
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16371727

Change-Id: I609dbebde278dfb335a5a66c6bd71fcfa62a3102
2021-12-08 23:30:14 +00:00
Alex Chau
1c883d861e Add launcher grid spec for tablet
- Introduced device_category to allow grids to be only enabled for certain device types. By default grids are enabled for all device types, so old OEM device_profiles aren't affected
  - Removed device_profiles_split.xml as a result and merged with device_profiles.xml
- Added deviceType in InvariantDeviceProfile to replace isSplitDisplay and centralize the logic
- Only has 6x5 grid with new default layout that works better for tablets

Bug: 198575341
Test: manual
Change-Id: I03f6727ce837ffeee6321b6d7c53942338d0cf30
2021-12-08 18:22:34 +00:00
Brian Isganitis
79efba935f Adding support for logging wallpaper container info.
Test: https://paste.googleplex.com/5350571797118976 shows logging carousel size and index of wallpaper tapped. If the wallpaper is a live wallpaper, we also log its application info.
Bug: 188222480
Change-Id: I6dd7ac20af7afd675d8a886d5b838263680f773e
Merged-In: I6dd7ac20af7afd675d8a886d5b838263680f773e
2021-12-08 00:22:59 +00:00
Brian Isganitis
111a5c5df5 Adding support for logging wallpaper container info.
Test: https://paste.googleplex.com/5350571797118976 shows logging carousel size and index of wallpaper tapped. If the wallpaper is a live wallpaper, we also log its application info.
Bug: 188222480
Change-Id: I6dd7ac20af7afd675d8a886d5b838263680f773e
2021-12-06 18:37:07 +00:00
Sunny Goyal
331e6e94f9 Merge "Updating icon badging logic" 2021-12-03 02:14:42 +00:00
Sunny Goyal
d872a97bd0 Updating icon badging logic
Bug: 201682172
Test: Manual
Change-Id: I57421b0c77e12f1cd464e532d2a1383c2cf93981
2021-12-02 22:14:25 +00:00
Schneider Victor-tulias
c817dac4cd Merge ag/16307859 into master without bug fix.
- Copied ag/16307859, with a modification to QuickstepModelDelegate#getContainer. This allows the crash from b/173838775 to continue occuring with additional debuging logs.

Bug: 173838775
Test: manual
Change-Id: Ic96a25665457c80f5c9ab45a896fada34a3a68ff
2021-11-30 12:08:23 -08:00
Thiru Ramasamy
24fbda5448 Set default value for rank field in launcher logs to ItemInfo.rank.
Bug: 188222480
Test: wwdebug & wwlogcat
Change-Id: I16786eb2e6f1d4ce44dbda5eff27b1cd7f50ee8e
2021-11-29 16:14:02 -08:00
Schneider Victor-tulias
8664cb1261 Revert "Fix ClassCastException in QuickstepModelDelegate"
This reverts commit 380f8fd890.

Reason for revert: remove bug fix on master

Bug: 173838775
Change-Id: I3cbb3e383c52095a10b3e22ea4c586c0c3c8d7a9
2021-11-29 22:34:04 +00:00
TreeHugger Robot
32ebd9f94f Merge "Fix ClassCastException in QuickstepModelDelegate" into sc-v2-dev 2021-11-25 04:00:37 +00:00
Schneider Victor-tulias
380f8fd890 Fix ClassCastException in QuickstepModelDelegate
- Added a casting check as an immediate fix to b/173838775
- Added logging to help debug the corrupt state where an item of type other than FolderInfo is used as an other item's container.
- Added LoaderMemoryLogger for adding large logs that are only conditionally printed.

Bug: 173838775
Test: manually checked logs
Change-Id: I9491cb421b9fb807d5fb110b04ad069481de768f
2021-11-24 14:26:45 -08:00
Andras Kloczl
953eb8041e Fix LauncherProvider newScreenId issue
Remove maxScreenId from LauncherProvider and whenever we need
a new screenId, query the database to calculate a new screenId.
Also converted and refactored AddWorkspaceItemsTaskTest
and added some extra test cases.

Test: manual & AddWorkspaceItemsTaskTest.kt
Bug: 199160559
Change-Id: I185f6823fed171d778af0130497f5ffaf89c0a70
2021-11-12 19:56:07 +00:00
Becky Qiu
1fc202867e [AA+ Search] Add logging for header search icon tapping events.
Logging example for the search icon tapping event: https://paste.googleplex.com/4809431536631808

Bug: 198507048
Test: tested with AiAi apk with search icon sent as child of header.
Change-Id: Ibbaec61b93c30a99ea2ffef8d7342490ba37335d
2021-11-09 16:50:47 -08:00
Alina Zaidi
08c3e8f526 Use equals() to compare UserHandle when building LauncherAtom#ItemInfo.
Bug: 204756057
Test: Manually verified correct behave through logs
Change-Id: Ic314e38978893984bac89988bfc3229a21d0214e
2021-11-02 14:10:37 +00:00
Pinyao Ting
35c5755b71 Fix the fallback logic for shortcut icons when icons are missing
The icons of shortcuts in general are not persisted in backup payload
and thus are not available on the new device, apps are reposponsible for
republishing those shortcuts on the new device, with the only exception
being pinned shortcuts, whose icons are stored in launcher.db as a
fallback when icons are not avaialble in the shortcut themselves.

A previous CL unexpected excluded deep shortcuts from loading their
fallback icons in launcher.db, causes pinned shortcut to fallback
further to default droid icons, this CL restores the original behavior.

Bug: 202346722
Test: manual
Change-Id: Ie09becd3a0dc1ca1e7c2573fe1b68b61a58c2091
2021-10-26 18:02:08 +00:00
Schneider Victor-tulias
8d8412f5b0 Update logging to help debug b/200572078
The class name logged in a repro of b/200572078 was insufficient after updated logs. Added more logging to get a pointer and stack trace when callbacks are added.

Test: ran launcher and checked logs
Bug: 200572078
Change-Id: I01bf98f488204311415a3946d66d99f656387cc4
2021-10-13 15:02:12 -07:00
Samuel Fufa
3aae069e2b Merge "[Work profile] Fix flickering work mode switch" into sc-v2-dev 2021-10-07 23:42:42 +00:00
sfufa@google.com
01e0009b71 [Work profile] Fix flickering work mode switch
Since there is no system broadcast with Intent.ACTION_MANAGED_PROFILE_ADDED, UserCache's user list does not get updated when a new profile is installed until launcher is restarted. This change fixes that problem by getting the freshest list of users directly from UserManager.

This change also applies the proper padding to work apps recycler-view after work mode switch is attached.

Test: Manual
Bug: 201191227
Change-Id: I0f570eba44ebb845d0d6f8c5f14a63f9a8c18539
2021-10-06 14:27:55 -07:00
TreeHugger Robot
feeb788941 Merge "Update logging to help debug b/200572078" into sc-v2-dev 2021-10-05 21:33:55 +00:00
Thales Lima
9a6b20f0cb Merge "launcher: create more space options" into sc-v2-dev 2021-10-05 15:38:57 +00:00
Thales Lima
78d00adcbe launcher: create more space options
The grid doesn't have a constant space between cells anymore, so we need
new attributes for the different spaces in different situations.

Bug: 191879424
Test: checking cell size and extra space in dumpsys
Change-Id: I4b6aae5b3fea281490c00cd13d0cd3a25372f21b
2021-10-05 12:26:05 +01:00
Schneider Victor-tulias
cd1ef70350 Update logging to help debug b/200572078
The class name logged in a repro of b/200572078 was shortened too much to find the class. Updated logging to get the full name.

Test: ran launcher and checked logs
Bug: 200572078
Change-Id: I12324348b4a8a56d4ab06ca54f13a90f8cbea955
2021-10-04 21:12:26 +00:00
sfufa@google.com
ca76de0e6e Support drag/drop on search results
Bug: 199341710
Test: manual
Change-Id: I9879c2a3769d4f930ab0289d2f26e4757971549d
2021-10-04 13:14:12 -07:00
Sunny Goyal
954a3dd0cc Merge "Ignoring display size change when display is off" into sc-v2-dev 2021-10-01 17:54:08 +00:00
Steven Ng
9114f280a2 Merge "Group weather widgets under the widget category" into sc-v2-dev 2021-10-01 10:17:47 +00:00
Schneider Victor-tulias
858d82b8be Merge "Improve all apps loading times." into sc-v2-dev 2021-10-01 07:01:48 +00:00
Sunny Goyal
807de418e9 Ignoring display size change when display is off
Bug: 198965093
Test: Verified with the script provided on the bug
Change-Id: I0efaa5a9b7be94f406a9c283219c715a6c430256
2021-09-30 11:43:26 -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
Schneider Victor-tulias
dccfe04a3a Improve all apps loading times.
Updated loadAllApps to load all required icons in a series of bulk sql queries. This reduces the cost of SQL lookups (up to two lookups per user, rather than one lookup per icon)

Bug: 195674813
Test: Added all icons to workspace, added duplicate icons, added icons for same component name from different users
Change-Id: Ifda8980386084999c53d7f881e8967be0d57d263
2021-09-29 12:37:40 -07:00
Schneider Victor-tulias
0021338461 Add logging to help debug b/200572078.
Bug: 200572078
Test: ran launcher and checked logs
Change-Id: If59d850021df226d645aa6a72da2b5bb7ec63782
2021-09-28 12:02:51 -07:00
Schneider Victor-tulias
f4f17df565 Merge "Add logging to help debug invalid icon state and UI." into sc-v2-dev 2021-09-22 19:26:59 +00:00
Samuel Fufa
964c7641ad Merge "Support Accessibility workspace addition for WorkspaceItemInfo" into sc-v2-dev 2021-09-20 22:00:51 +00:00
Alex Chau
e35ef91c3e Workaround: don't migrate grid when hotseat size or device type changes in multi display
Bug: 198965093
Test: manual
Change-Id: I804ec854b98d27717c32723028f892ca2556d327
2021-09-20 12:29:00 +01:00
sfufa@google.com
6a12ec34fb Support Accessibility workspace addition for WorkspaceItemInfo
Bug: 192678946
Test: Manual using TalkBack
Change-Id: I1d0d06ccac934eb80dba7670e93ec631c12e5074
2021-09-20 01:15:08 -07:00
András Klöczl
25e84690b3 Merge "Add logging to catch rare launcher wipe issue" into sc-v2-dev 2021-09-16 16:29:11 +00:00
Andras Kloczl
971da6c3aa Add logging to catch rare launcher wipe issue
Test: not necessary
Bug: 200010396
Change-Id: If7c478e220c2c0ee9f6479b18bf05bf39811b451
2021-09-16 17:26:04 +01:00
Schneider Victor-tulias
b988ab77cb Improve workspace loading times.
Updated loadWorkspace to load all required icons in a series of bulk sql queries. This reduces the cost of SQL lookups (up to two lookups per user, rather than one lookup per icon)

Bug: 195674813
Test: Added all icons to workspace, added duplicate icons, added icons for same component name from different users

Change-Id: I56afaa04e7c7701f0d3c86b31c53f578dfa73fe6
2021-09-15 17:09:06 -07:00
Schneider Victor-tulias
927d6dcc6c Add tracing to help in launcher load time profiling.
Bug: 195674813
Test: None
Change-Id: I895a64bbba515ce7b7df8d093d40e0a5b6056d2e
2021-09-15 17:08:53 -07:00
Schneider Victor-tulias
fbf4178ab7 Add logging to help debug invalid icon state and UI.
PackageInstallStateChangedTask had some redundant state handling that could lead to invalid states. Removed state handling (potential fix to b/198924992) along with logging to help debug b/198924992.

Test: Started and canceled an app download
Bug: 198924992
Change-Id: I8b8202ceb62a3265186d8d46a0e1be6afc83c080
2021-09-14 16:17:04 -07:00