Commit Graph

175 Commits

Author SHA1 Message Date
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
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
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
Jon Miranda a28e0f474a Fix NPE when closing folder.
There is a race condition where Folder is closing, it unbinds, and then
another call to AbstractFloatingView.closeAllOpenViews tries to close the
Folder again. But since the contents are unbound and removed from the folder,
it produces a NPE.

Bug: 153625271
Change-Id: Ia6c55f15cf7517e26af8f499bc0c1a4828737480
2020-04-17 15:03:33 -07:00
jayaprakashs 86932724e7 Don't open the Folder and IME when Folder is created.
Bug: 153751859
Change-Id: I8169d0890a43b614b293ca29f504e19c532b90ee
(cherry picked from commit 09066ffeb2)
2020-04-16 02:43:36 +00:00
Sunny Goyal e396abf502 Moving model data structures to a separate file
Change-Id: I77ad7a5219e72d2e0d6c1803de2ac3ed6a65a8f7
2020-04-09 13:20:39 -07:00
thiruram 73d0bb99fd Add new FolderLabelStates to better understand smart folder acceptance rate based on primary suggestion.
Bug: 153358870

Change-Id: I863536f0f2563aab33484d45e9bb518e08a9ebe5
2020-04-06 19:15:13 +00:00
thiruram 1de8b5cfe6 Fixes smart folder logging bug when creating new folder.
Bug: 153159419

Change-Id: I5d41bdf6d83b091ee641a8160b026c6bff919417
2020-04-06 01:49:19 +00:00
Sunny Goyal 8b37c57804 Fixing widget sheet not scrolled using external mouse
> Fixing crash when some properties are not initialized if draw is not called
> Adding robolectic support for UI testing
> Adding robo tests to verify workspace, all-apps, widgets and folder scrolling

Bug: 147312357
Change-Id: Id7756e07f06396359e441cdff2e4f992bdcb97bb
2020-03-31 12:17:09 -07:00
Sunny Goyal 7fb01cc6b3 Restring the item rank to valid range since the folder contents
change during drag operation

Bug: 152193591
Change-Id: I71a3c44e84fe8c3bf787ad28c2f2fad48f0ad70a
2020-03-23 21:19:07 +00:00
TreeHugger Robot dfa091c0e9 Merge "Decoupling some drag and drop code handling" into ub-launcher3-master 2020-03-18 20:43:38 +00:00
Sunny Goyal 9b18010990 Decoupling some drag and drop code handling
> Removing some special checks around accessibility drag
> Unifying folder alarm code path for accessible and normal DnD
> Maintaining mDragStartTime inside the dragDriver instead of the callers
> Simplifying some accessibility callbacks

Future cl will create a Accessibility DragDriver and unify it with
other DnD flow

Change-Id: I1919ef218de0174678110f271b450bcb9aaf4a5c
2020-03-18 12:41:42 -07:00
Jon Miranda 9794d4d52a Ensure current animation is cancelled before building new folder animation.
Fixes bug where folder clip padding gets stuck as false.

Bug: 146884730
Change-Id: I3a24e561d15fbc46837bb21cd8f97283e69f9ce1
2020-03-18 12:26:37 -07:00
jayaprakashs 9c05d2db04 Show IME suggestions while tapping on Folder EditText
Current behaviour doesn't show the suggestions in IME if the folder
name is non-empty (Shown only if the folder name is empty).

This change shows the IME suggestions always, but primary suggestions
are shown only if the folder name is empty (not overwritting the
current folder name with suggestion).

Bug: 151762006

Tested: on phone. (created a folder name, assigned custom name, added
    the third app to Folder, tap on Folder EditText and it shows IME
    suggestions)
Change-Id: Ic4d43660a371b8dd7d18acb42fe3dee06a730347
2020-03-17 16:20:05 -07:00
Samuel Fufa a579ddc9c8 Refactor logging to capture Target hierarchy
Instead of creating a fixed number of targets, we now pass an ArrayList
of targets to. Any class implementing
LogContainerProviders#fillInLogContainerData can setup it's own target
and add it to the ArrayList, It can also pass the ArrayList to other
LogContainerProvider to capture full Target hierarchy.

Bug: 147305863
Change-Id: I0063c692120fb9e1cff2d8902c5da972d0623418
2020-03-06 13:49:19 -08:00
vadimt 5a07aadf86 Feature flag for using hardware optimization for folder animations
Bug: 144338174
Change-Id: I92cc399da077c4c4da8264c20136302ede25ed01
2020-03-04 18:34:07 -08:00
thiruram 15d79a9b85 Fixes incorrect FromFolderLabelState in clearcut log when updating folder label.
Bug description: When folder label is updated from a suggested label to a custom label,
EditFolderLabelEvent log expected to have FromFolderLabelState = FROM_SUGGESTED.
Currently FromFolderLabelState is logged as FROM_CUSTOM in such scenarios.

Root cause: Folder label state is decided based on whether IME has entered into compose mode while editing.
This works fine for initial folder creation and also updated to non-empty label(to both custom or suggested).
But when folder is edited from suggested to empty label, its internal state changes from SUGGESTED to CUSTOM as expected.
Later when empty label is updated to suggested again, its internal state remains custom forever.

Fix: Instead of setting folder's internal state based on IME's compose mode, comparing actual folder label with suggestions
and set it to SUGGESTED if any suggestion matches else CUSTOM.

Change-Id: Ieea572ee93fd5567e3128c9bbcea3b670f0f01d9
2020-02-21 16:24:21 -08:00
Hyunyoung Song 621c1a8be7 Merge "Update the suggestFolderName when items are added and deleted from folders" into ub-launcher3-master 2020-02-21 20:08:20 +00:00
thiruram 888b516a22 Fixes NPE when creating folder with null suggestedFolderNames.
Bug: 149993849

Change-Id: Ia2758b76aef1812dab225c8a95e7141fcdeefab4
2020-02-21 11:05:37 -08:00
Hyunyoung Song 6d3e5465e2 Update the suggestFolderName when items are added and deleted from folders
Bug: 149935239
Bug: 149967272
Bug: 148900990

Change-Id: I0ed27236ad22579a1f3dcfd35a32252c5b1f6691
2020-02-21 11:00:48 -08:00
jayaprakashs 9ac4b580a1 null check in showLableSuggestion().
It throws NPE when the data is missing for all the packages and all the suggestions are null.

Change-Id: I4aa36969e1aee00bcfc577a839d6da01d4e67a75
2020-02-19 13:00:01 -08:00
Hyunyoung Song 356a9f05c4 Fix folder UI open regression when tapping edit text / Fix NPE
Bug: 149835166
Bug: 149839789



Change-Id: I295cc72e4228249794eae11f177226179f2a175f
2020-02-19 11:15:12 -08:00
Hyunyoung Song 0580b4a5c1 Change hint text on folders
Bug: 135182686

Change-Id: I8e21384242b9d890a0f698fdaaf722b205967349
2020-02-17 12:38:58 -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
thiruram c1c2bfa7fb Initial draft of smart folder logging to clearcut pipeline.
* Adds additional fields to launcher_log.proto to capture smart folder related information.
* Uses ProtoLite to generate log object using builder pattern and converts to nano version before writing to clearcut. Hence not making drastic change to existing logging pattern.

Change-Id: I89b10da8d4e35e3abc7ddb553046946f91b43445
2020-02-13 13:32:21 -08:00
Hyunyoung Song 6e3120cf06 Merge "Introduce FolderNameInfo class." into ub-launcher3-master 2020-02-12 18:26:56 +00:00
jayaprakashs e534d3b5f9 Introduce FolderNameInfo class.
* Introduce FolderNameInfo class for passing down the folder name
suggestions from FolderNameProvider.
* Use FolderNameInfo for storing the serialized suggested names for
Folders. It is parsed and used in FolderEdit.

Bug: 148417030
Bug: 148916551
Bug: 148432151

Change-Id: Idaa81e203cc42889be15d0845230b4508521041c
2020-02-11 11:36:28 -08:00
Samuel Fufa 28c3e4553a Sync prediction client and folders
- Notifies prediction client when a folder is converted into workspace
item as a result of losing all items but one.
- Notifies predction client when a folder is created from an item in the
workspace with no duplicates.

Bug: 148749638
Test: Manual
Change-Id: Ifd51a6fe2a40c8baf4d88e2dba1e5bdc925e1608
2020-02-08 16:19:53 -08:00
Hyunyoung Song 1ae42423ca Load folder names during LoaderTask
Bug: 147359653

Change-Id: I4d1b53c3a72d0773d4bc8819ee8118fc719944ad
2020-01-28 22:06:05 -08:00
Hyunyoung Song 48e6489871 Introduce folder name type (auto vs manual).
Bug: 147769158

- Use both InputConnectionWrapper and TextWatcher to detect
manual input
- Also fix a bug in FolderNameProvider

Change-Id: I7bc0f380c6641481d934a53e9feb77caa19c674a
2020-01-26 22:34:31 -08:00
Hyunyoung Song 54d1f88ae6 Show suggestion when user taps on folder's edit text
Also, enabled preloading of the folder name db
Bug: 147523650
Bug: 147359653

Change-Id: Ia77e12d2b2bc428263c2b2821a96894a6004d82e
2020-01-11 23:39:02 -08:00
Thiru Ramasamy 652385d2ea Fixes duplicate "TAP" launcher event when new smart folder is created by drag and drop event.
Bug:147305113

Change-Id: I5d26df6a594b1d222e0db2e40c039c6661146d3a
2020-01-08 20:10:38 +00:00
Pinyao Ting eacbdd3cde allow smart folder to support more than 2 items
Bug: 144975153
Test: Manual
Change-Id: Ib5ff34863312d8b8da7615371e353bb697261790
2019-12-05 11:35:14 -08:00
Hyunyoung Song 5fcd8f9647 Provide up to 3 folder name suggestions to active IME
Bug: 144973594

Change-Id: I92078fffd68a1230fd87d2387404c8a2fed55bc0
2019-11-22 08:19:17 +00:00
Jon Miranda 4744701f60 Fix folder open/close animation when grid size is small.
The issue was that the scaled folder size was smaller than the clip size.
To ensure that the folder size is always larger than the clip size, we
instead scale the contents of the folder instead of the folder itself.

Bug: 143703075
Change-Id: I6eadcc487148fe7e2b7dd9f0ff94a9205048b992
2019-11-19 14:42:48 -08:00
Samuel Fufa 9353b00616 Merge "Fix folder available height calculation" into ub-launcher3-qt-future-dev 2019-11-18 18:19:14 +00:00
Thiru Ramasamy 9d9c42ef38 Merge "Fixes missing LauncherEvent for TAP action on FOLDER_ICON" into ub-launcher3-qt-future-dev 2019-11-14 22:02:09 +00:00
Samuel Fufa 1c8d90aed0 Fix folder available height calculation
Bug: 139456471
Test: Manual
Change-Id: Ic86c481e76f8b6629ad74109ef98900f1c00e16c
2019-11-14 11:02:49 -08:00
Thiru Ramasamy aea8820229 Fixes missing LauncherEvent for TAP action on FOLDER_ICON
Bug: 143969621

Change-Id: I8d08d1c55f90c6aeacd63ced8235de851ec2cad9
2019-11-12 14:38:56 -08:00
Hyunyoung Song 7564d3b8bd [DO NOT MERGE] Folder name suggest
Bug: 142498588

Change-Id: I735c842522f08db1fb9a11f731b63f8dba5a298f
Signed-off-by: Hyunyoung Song <hyunyoungs@google.com>
2019-11-06 23:06:01 +00:00
TreeHugger Robot 0a07dfa25d Merge "resolve merge conflicts of 1bd96b1e96 to ub-launcher3-qt-future-dev" into ub-launcher3-qt-future-dev 2019-09-09 20:47:27 +00:00
Jon Miranda a87abbad31 resolve merge conflicts of 1bd96b1e96 to ub-launcher3-qt-future-dev
Test: I solemnly swear I tested this conflict resolution.
Bug: None
Change-Id: Ide6c914d4e69eb4fa70d6634780324cd45a21610
2019-09-06 11:35:34 -07:00
Sunny Goyal ac6f69f78d Lazily binding folder pages and icons
Folders are bound before they are opened and unbound on close. This
allows us to recycle the views in folders

Bug: 139051851
Change-Id: Ic1ed3265c0f583af54d73dab6f2751bc95266ea9
2019-09-05 17:17:11 +00:00
Jon Miranda 9b78e190fa Update app open/close animations.
- For app open, the icon text remains where it is and only the icon moves.
- Similarly for app close, the icon text remains where it is and fades in
  with the rest of the other icons text.

- With this change, the original view is always "VISIBLE"
  (if BubbleTextView/FolderIcon) but we hide certain elements.

Added video to bug.

Bug: 137200188
Bug: 139885365
Change-Id: I3d20c5f05bc7c0b9d052d8074ac3bfc21531c83d
Merged-In: I3d20c5f05bc7c0b9d052d8074ac3bfc21531c83d
2019-09-04 21:45:05 +00:00
Samuel Fufa 84245e84c8 Default name's language of folder won't change after changing the system language
Test: Manual - Create unnamed folder and change system language. Folder
name should pickup new language.
Bug:78611156
Change-Id: Ie06baebe5b9a64e91630c581b75b674f363b9973
2019-08-15 09:56:12 -07:00
Sunny Goyal 11a50747ed Refactoring some folder binding logic:
> Moving grid calcutation in a separate class
> Moving content saving logic to folder instead of relying on item bind

Bug: 139051851
Change-Id: I81b226dbebe13652482a767c992e8cc8f4f35a60
2019-08-14 12:03:09 -07:00
Jon Miranda e543818bb6 Fix bug where FolderIcon stays visible during swipe up to home animation.
This can happen when opening an app from a folder, and then immediately
swiping up back to home.

This happens because when we swipe up to go home, there's a race condition
where the folder close animation finishes and sets the FolderIcon to VISIBLE
right before FloatingIconView sets it to INVISIBLE.

To fix it, in OverviewState#onStateEnabled we call
AbstractFloatingView#closeAllOpenViews(animate=false). Then we added logic
to cancel any Folder closing animation (which there is,
from WindowTransformSwipeHandler#onLauncherStart) and to just close the
folder right then and there.

Bug: 132588097
Change-Id: I4379431815e7cbddede5ea0213fe9323f001484b
2019-05-20 10:01:15 -07:00
vadimt 04f356fe17 Fixing jank in folder animation.
This continues ag/6410337

Bug: 69236787
Test: Manual
Change-Id: Iac9f7ab21bf3741846b9721d4c8235e8fc49f7fb
2019-05-02 15:40:18 -07:00