Commit Graph

387 Commits

Author SHA1 Message Date
Jonathan Miranda
1536248f3d Merge "Snap to destination page before animating folder close." into sc-dev 2021-03-31 19:14:56 +00:00
Sunny Goyal
572aca4ce2 Moving some common functionality to IconLoaderLib
Bug: 183641907
Test: Manual
Change-Id: Icfc7ebb140e4e1678b0715beee2e0e513e707b9e
2021-03-25 10:06:53 -07:00
Jon Miranda
0369cd5470 Folder updates.
- 3 item folder preview has the first item on top of the other 2
- Skip first frame of the folder open animation as there is no
  visual change in that first frame.

Bug: 175329686
Test: visual
Change-Id: Ida9a55ee5093c49f230cdf22d7943b2a6a7ed42d
2021-03-19 12:07:19 -04:00
Jon Miranda
01554536a9 Snap to destination page before animating folder close.
This ensures the X page animation runs in the preview.

Bug: 175329686
Test: Scroll to 2nd page, and close folder before scroll finishes
Change-Id: Id4820a212dcc945b0134b79f3d42c68954b17275
2021-03-17 12:15:48 -04:00
Jon Miranda
c1e66b523e Fix folder outline not matching the v28 radius.
Bug: 175329686
Test: manual, open folder and verify no visual artifacts
Change-Id: If7cfaf6f95e43ad6f2636b136bc98961554ebf36
2021-03-11 19:05:45 -05:00
Jon Miranda
e126d72fa8 More grid changes, closer to final specs.
* Added isScalable, minCellWidth, minCellHeight, and borderSpacing attrs

When isScalable is true, we use set workspace cell values to
minCellWidth/minCellHeight and then scale the cell values to
fit the available space. This allows us to have consistent
aspect ratios when two devices match the display/grid options.

This is different from the dynamic grid, which calculates
cell values based on iconSize/textSize/etc and then allows
the cell width to be as wide as space allows.

I adjusted some variables so that they will auto adjust
based on another value, indepenent from whether the
grid isScalable or not. An example of this is the folder
label text, where it's always set to be 1.14x of whatever
the workspace icon text size is. This is so we don't need
to add a bunch of more variables to DisplayOption/GridOption.

Bug: 175329686
Test: - switching between device profiles,
      - testing folder open/close
      - testing in multiwindow
      - testing in landscape
Change-Id: Ia469ae0d65b518469ef264b726db46f4a3210056
2021-02-25 17:34:56 -05:00
Tony Wickham
bb4de85c25 Draw folder leave-behind when opening folder in taskbar
Previously there was only support for CellLayout to draw the
leave-behind. Added FolderIconParent interface so any parent can
draw the leave-behind, and implement that by TaskbarView.

Test: Open folder in Taskber, ensure leave-behind draws

Bug: 171917176
Change-Id: I08d1d939a34f971f893994fe05cac972d165ef53
2021-02-16 15:10:05 -08:00
Tony Wickham
7ba547cd2d Folder support in Taskbar
- Add TaskbarActivityContext which allows shared Launcher elements to
  "just work" using existing generic ActivityContext.
- TaskbarContainerView extends BaseDragLayer<TaskbarActivityContext>.
- Inflate FolderIcon and Folder using TaskbarActivityContext to be
  shown in TaskbarContainerView.
- Use TaskbarActivityContext's DeviceProfile to determine icon size
  instead of overriding in styles. This also ensures that normal
  BubbleTextView icons have the same size as FolderIcons.

Test: Place a folder in home screen hotseat, ensure it shows up in
taskbar and can be opened, and that apps inside it can be launched
or dragged.
Bug: 171917176

Change-Id: Ic25d2f84bcd7e3399c88989305ea565497c030d9
2021-02-16 15:07:01 -08:00
Tony Wickham
1906cc33f9 Refactor Folder to use ActivityContext and BaseDragLayer
These are the more generic versions of Launcher and DragLayer, so
that Folders can be used in other surfaces.

Test: Open and close Folders on home screen, ensure works properly
Bug: 171917176
Change-Id: I39b9aedbd8319ca61ea0e776bc95eab585e023d5
2021-02-16 15:06:50 -08:00
Jonathan Miranda
8dd4ddc7ae Merge "Add border spacing and fixed cell height to grid." into sc-dev 2021-02-16 18:38:38 +00:00
Jon Miranda
228877d37c Add border spacing and fixed cell height to grid.
- Border spacing is the spacing between the cells.
- Workspace cell height is now fixed, and we allocate
  all the "extra" space to three different variable height
  areas.

* Built behind ENABLE_FOUR_COLUMNS flag because it hinders the
default grid.

Bug: 175329686
Test: - set border spacing to 0 and confirm matches prior layout
      - test drag and drop still worked
      - test reordering
      - test widgets
      - test folders
      - test multiwindow

Change-Id: Ic6f3dff577d28ff214bda4b0a787ec7fd08c108b
2021-02-10 17:22:37 -05:00
thiruram
03f8dcb8a4 Add instanceId to LAUNCHER_FOLDER_CONVERTED_TO_ICON log event.
Bug: 179534152
Change-Id: I0e4cedbfc2310258ec83f5dd756f8eb71189206b
2021-02-10 10:31:24 -08:00
Sunny Goyal
bfc0c38157 Updating ItemInfoMatcher to work with java streams
Adding support for bulk removing items from a folder icon.
This fixes workspace item removal when a folder gets replaced
to an icon during the delete operation.

- Lets say user has a folder with the same app twice.
- User disables that app.
- Launcher removes all shorcuts of that app

However, because we call "replaceFolderWithFinalItem" during
this removal, we end up creating a new shortcut that does
not get tracked by the removal, so the user is left with
an enabled icon of the disabled app.

Bug: 162378169
Test: manual test, repo steps in bug
Change-Id: Iaf6550894c156b3b5ec2a5aa58bab76a4a28819e
2021-01-27 15:19:56 -08:00
Schneider Victor-tulias
6a5f431a7b Revert "Revert "Add UI updates for incremental app installs.""
This reverts commit 229497d182.

Reason for revert: Patching bugs

Fixes: 176901235, 176992421, 176884453

Test: manual

Change-Id: I57e13a15e72284564a10761966732ee31d15fd08
2021-01-12 12:22:33 -08:00
Schneider Victor-tulias
229497d182 Revert "Add UI updates for incremental app installs."
This reverts commit 84269d349d.

Reason for revert: causes b/176884453 and b/176992421

Change-Id: I3398674a0acbad8329df5d341ae074ac073a6bf9
2021-01-07 19:44:44 +00:00
Schneider Victor-tulias
84269d349d Add UI updates for incremental app installs.
1. Changed Preload Icon UI to be grayscale while the app is not startable.
2. Added progress bar for when app is installed but still ownloading.
3. Updated Preload Icon progress and click handling to use new incremental api.

Progress bar color updates will follow in a separate CL.

Demo: https://drive.google.com/file/d/1H1EvtTorLeJwC1eiq10tm-TT81YZ6osk/view?usp=sharing

Bug: 171008815

Test: manual

Change-Id: I5874a5146d79a8c91d7d90ff0b9c1c427a3c95dd
2021-01-05 15:17:26 -05:00
Winson Chung
f99351888c Revert "Revert "Merge commit '8d14dbe041199d611839140f1c9285fd4174e9f4' ...""
This reverts commit 087a9e39b6.

Change-Id: I05b17a6e4aaaef6de3c2fa26aad45a39eb2833f9
2020-10-23 09:27:48 -07:00
Alistair Delva
087a9e39b6 Revert "Merge commit '8d14dbe041199d611839140f1c9285fd4174e9f4' ..."
Revert "Merging from ub-launcher3-master @ build 6877130"

Revert "Merging from ub-launcher3-master @ build 6877130"

Revert "Merging from ub-launcher3-master @ build 6877130"

Revert submission 12738409-merge_ub-launcher3-master_6877130

Reason for revert: Introduced crashes to global presubmit

Reverted Changes:
I624658ce6:Merge commit '8d14dbe041199d611839140f1c9285fd4174...
Iccd2f1e3a:Merging from ub-launcher3-master @ build 6877130
I791d64951:Merging from ub-launcher3-master @ build 6877130
Icdd32ab01:Merging from ub-launcher3-master @ build 6877130

Bug: 169963211
Change-Id: I77a4ae59e823147beae8dd7cb9b54ccdace2c7f4
2020-10-05 14:46:26 +00:00
Hyunyoung Song
95786e077d Good riddance UserEventDispatcher
Bug: 165675920
Bug: 161381246

TL;DR;;
- nano -> lite proto
- add all the missing logs to WW
- pin item related logging fix
- Removed logging for assistant

sgrep "com.android.launcher3.userevent.nano." | cut -f1 -d: | xargs sed -i -e 's/userevent\.nano\./userevent\./g'

Change-Id: Ie2a49fdd891cacbd7ef40a1dc9e41ff0574c7517
2020-09-27 13:41:49 -07:00
Schneider Victor-tulias
c238e1d71a Fix folder close animation.
Closing a folder at the same time as the keyboard closes causes the
folder close animation to jump. Fixed the animation.

Test: manual
Change-Id: I0785260f280ffc2932cd92d40073009a8c032b1d
2020-09-16 11:24:18 -07:00
Schneider Victor-tulias
8a35c76427 Add folder UI animation.
Test: manual

Fixing b/144948355. The entire launcher was panning up when the user
would try to edit a folder name if that folder's name field would have
otherwise been obscured by the keyboard. This had the effect of
obscuring the smartspace. Added an animation to the folder UI to bring
it above the keyboard during text editing.

Change-Id: I0f95aae27fc7426f1025135ea6d4fa142a21cf43
2020-09-03 18:19:06 -07:00
Hyunyoung Song
516da83f62 Merge "Good riddance UserEventDispatcher [1/n]" into ub-launcher3-master 2020-08-25 09:25:55 +00:00
Hyunyoung Song
6b670d62df Good riddance UserEventDispatcher [1/n]
Bug: 165675920
Change-Id: I237ed4243e1724b3c370c5660673bb3966bf4811
2020-08-24 21:19:09 -07:00
Sunny Goyal
0fc3d1275a Moving hotseat predictions to ModelDelegate
Bug: 160748731

Change-Id: I8db7856a17e0b6ca45b4d5ec3513f788f22db11a
2020-08-17 08:43:07 -07:00
TreeHugger Robot
1a32f951f7 Merge "Pass through touches in FolderIcon padding area" into ub-launcher3-rvc-qpr-dev 2020-07-23 18:47:26 +00:00
Samuel Fufa
3c3116826b Pass through touches in FolderIcon padding area
Pass touch events happening in padding of folder icon to workspace. BubbleTextView already does this.

Bug: 161014416
Test: Manual
Change-Id: Ibfa24adb2d84efbfab36f02a2240837f03858e43
2020-07-23 11:09:20 -07:00
Jonathan Miranda
20d3187d88 Merge "Fix folder crash where view is added when it already has a parent." into ub-launcher3-rvc-qpr-dev 2020-07-21 20:13:06 +00:00
Jon Miranda
447ea429cd Fix folder crash where view is added when it already has a parent.
The fix is to prevent re-arrangement if the views are already unbound.

This is caused when:
- Folder is open
- Item has deep shortcuts
- Long press on deep shortcut to create DragView that could land in the
  folder if the folder did not auto close. This is important because it
  starts a drag within the folder

The folder unbinds all views as part of the Folder close complete callback.
And then the folder exit alarm gets triggered (because we drag DragView
outside of the folder) which causes the folder items to get
rearranged and added back to the folder's CellLayout.

Bug: 161559911
Change-Id: I142589b2c541dc21c47a67c20a93e627732107ef
2020-07-20 16:54:17 -07:00
Jon Miranda
0f620500b0 Fix bug where realtimeReorder is called after views have been unbound.
Bug: 161498651
Change-Id: I89beaad9a91bfa1763454965bf95ba1a94d29902
2020-07-20 15:28:25 -07:00
Andy Wickham
f865551ff0 Focuses on folder container for Accessibility when no contents to focus on.
This happens when you drag an app into a folder when the current page is
already full. The new page has no apps in it until you drop the one you
want to add.

Fixes: 161040039
Change-Id: Iaa857e7a114e859fa7e6a0653028856a3a8a94a6
2020-07-13 20:56:38 -07:00
Hyunyoung Song
37bda2bcc9 Disable auto correct/suggest on folder edit text
Bug: 160075575

TL;DR;; displayCompletions still work

Change-Id: I0a7cd06d25ae3976371be0707a2783702b92e8cc
2020-06-29 00:26:14 -07:00
thiruram
ec75cbd85a Adds additional folder label states (UNLABELED & EMPTY_LABEL)
UNLABELED -> title==null and EMPTY_LABEL -> title=="". When adding new items for the folder if the folder is in UNLABELED state, auto-labeling will be enabled.
This change also addresses auto-labeling issue due to false edit from UNLABELED to EMPTY.

Bug: 159164315

Change-Id: Ia17cd27b4afb60420dc15c544f544061fc46ad33
2020-06-22 13:24:07 -07:00
Jayaprakash Sundararaj
1d96ba03ab Refactor FolderNameInfos.
Bug: 159508969

Change-Id: I984e7a4fc321392d06157c705392c1ba5672f348
2020-06-19 23:12:22 -07:00
thiruram
8bcb48cc1b Log LAUNCHER_FOLDER_AUTO_LABELING_SKIPPED events.
These events will help to understanding recall reduction is due to data coverage vs label coverage.

Bug: 159495871
Change-Id: Ia5e2cbab86f5f2072f9674fbd6abcdbc049929ee
2020-06-19 17:58:55 -07:00
thiruram
b53764bd4b Fixes folder logging.
Only LAUNCHER_FOLDER_LABEL_UPDATED events will have FromState, ToState
and FolderLabelInfo. Other folder events such as OPEN, DRAG etc will have
basic fields only populated.

Sample Log: https://paste.googleplex.com/5468394805526528
Screencast: http://rcll/hSUQjtQXfQM5i9DjjAQTf2/Zn5FeiVDONaQj0mK1JNjg

Bug: 159164315
Change-Id: I903fc7b62bcee748aa3ef695453be3e14d388712
2020-06-19 17:06:46 -07:00
Hyunyoung Song
d98d5ebedc Fix a potential concurrency issue for loading CDB file
Bug: 158919530

Change-Id: I00ddbaeebaed3aa669948cde7fbac0cf4ad86301
2020-06-19 02:09:15 -07:00
thiruram
c6a38ba5d8 Replaces StatsLogManager.log with StatsLogManager.logger()
Bug: 159170445
Change-Id: Ice6c8a9ae30d8e6b3843bfe42926053849bf9fe0
2020-06-17 17:32:54 +00:00
Hyunyoung Song
730c238b8d Call displayCompletions couple frames after selectAll is called
Bug: 158710542

Change-Id: I295adce9d84bb82c4af27b7e54693ce4c64004cc
2020-06-15 13:54:54 -07:00
TreeHugger Robot
161ed5ad9b Merge "Announce folder content size with folder title" into ub-launcher3-rvc-dev 2020-06-12 21:55:33 +00:00
Samuel Fufa
1150ab3825 Announce folder content size with folder title
Bug: 144094885
Test: Manual
Change-Id: I340f9292b62163e1d72778024f1765c7618084c2
2020-06-12 11:25:32 -07:00
Hyunyoung Song
13c2bc7303 LAUNCHER_APP_LAUNCH_TAP should log correctly for icons inside folder
Bug: 137777105

Change-Id: I5c1552481fc1b788ba41c57bfe97f126f55e5b16
2020-06-11 23:51:17 -07:00
Andy Wickham
bc83edbf4d Allows Accessibility to focus on specified view in AbstractFloatingView.
Here, the first item in an ArrowPopup or Folder are focused on.

Note: There's another pre-existing bug where it announces
"Home screen x of y" when the floating view appears; this
change doesn't address that.

Fixes: 147470419
Change-Id: I1dc70edc21ea7c19a5742208512738d6c4a94067
2020-06-10 12:03:43 -07:00
Hyunyoung Song
75dedacfc4 When tap on empty string edittext, and suggestion is made, select all the string
Bug: 157771174
Change-Id: I4a274333d897693bc214d50edcea30cf012ce859
2020-05-29 17:36:40 -07:00
thiruram
f95f152971 Add LAUNCHER_FOLDER_LABEL_CHANGED events for folder label updates.
Sample Logs for all update combinations: https://docs.google.com/document/d/1CBP2yTcXdFhPdNG5ZmWFKSgd8mDbMevY-akVlUXPLDo/edit#bookmark=id.7y1p8n2dz8ge

Bug: 155410872
Bug: 152978018
Change-Id: I296b124b16aa07878f2cf7b74ab91f13b8e6cfbf
2020-05-13 17:36:10 -07:00
thiruram
6524cc7237 Adds LAUNCHER_FOLDER_LABEL_CHANGED event.
Sample Log: https://docs.google.com/document/d/1CBP2yTcXdFhPdNG5ZmWFKSgd8mDbMevY-akVlUXPLDo/edit#bookmark=id.qwjknn6acmx6

Bug: 155410872
Bug: 152978018

Change-Id: Ib7641d3d42a3f4fd002d1dbb36dc4b9ea0f885fc
2020-05-13 18:40:48 +00:00
Adam Cohen
b70e7d1c1c Fix animation for non-default grids when dragging icon from All Apps into a Folder
Test: manual

Change-Id: I72b84ead68c6e415c91dd2b801fc05654a97cd96
2020-05-09 00:54:04 +00:00
Adam Cohen
c77bc45fa5 Fix issues with drag and drop from All Apps in non-default grids
=> Also fix the widget tray in these non-default grids, and the external shortcut addition flow. The layout was broken as it was scaling with the icon size. Instead keep it fixed which looks much better, similar to how we maintain all apps.
=> This also fixes a small jump when dragging shortcuts external to Launcher.

issue 154169001

Change-Id: Iad1e3859dd6fedccce9b5c6633e64426a4630c31
2020-05-08 16:00:08 -07:00
thiruram
5a01f0ec51 Implements LAUNCHER_ITEM_DROP_FOLDER_CREATED event.
When item is dropped on a existing item resulting in new folder creation, triggers LAUNCHER_ITEM_DROP_FOLDER_CREATED event with details of the destination package.
This change also introduces new FolderIcon item to launcher_atom.proto to represent folder icon.

Screencast and sample logs: https://docs.google.com/document/d/1CBP2yTcXdFhPdNG5ZmWFKSgd8mDbMevY-akVlUXPLDo/edit#bookmark=id.tmbucd1f44qp

Bug: 152978018

Change-Id: Ib4d343ba9075aa8853652f128457c4638541ec59
2020-05-06 17:24:09 -07:00
Adam Cohen
1d13c0bf13 Cleanup reorder animations to not require layout on every frame
=> Extending on previous CL to separate multiple translation properties
   and avoiding expensive layout pass

Test: manual

Change-Id: I058da7367fb320b9f432bef9482be2966d3a7d42
2020-04-24 01:28:39 +00:00
thiruram
f065fdf311 Updates folder creation logging.
After ag/11020901, folder creation process will not open gboard and hence drag and drop events resulting in folder creation should send additional folder creation event.

Fixes NPE with ItemInfo.java.

Bug: 153768241

Change-Id: I52c996a62dee52bf07feef4252aadc2a28c79752
(cherry picked from commit 9a3671e80e)
2020-04-22 17:36:07 +00:00