Commit Graph

193 Commits

Author SHA1 Message Date
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
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
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 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 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
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