Commit Graph

10644 Commits

Author SHA1 Message Date
Samuel Fufa
6e5efb0929 Consolidate Hero search result with SearchResultIconRow
With this, we can now show app title and support drag/drop for shortcut results.

Bug: 172245107
preview: https://drive.google.com/file/d/1A4eKKTDPht-MDbfA2VFI3OuAO36fc3AS/view?usp=sharing
Change-Id: Icf94a2d23b44bfe5527aea71e27178906e5deb3e
2020-11-05 11:57:35 -06:00
TreeHugger Robot
a1733bceb7 Merge "fix the issue widget id can be wrong after restore" into ub-launcher3-master 2020-10-29 17:30:35 +00:00
TreeHugger Robot
90faddeff3 Merge "Quick fix from ag/12914139" into ub-launcher3-master 2020-10-29 06:38:13 +00:00
Tracy Zhou
991e8208cc Quick fix from ag/12914139
Test: N/A
Change-Id: I0b8274f8a912d091cfbbebafdee220b5e46ee74f
2020-10-28 22:34:23 -07:00
Pinyao Ting
f39f351a0d fix the issue widget id can be wrong after restore
Bug: 171774227
Test: manual testing
1. randomly add/remove widgets to workspace
2. create a backup (Settings > System > Backup)
3. reset the device
4. restore from the backup
5. verify all of the widgets are restored properly

Change-Id: Id65e474dd9349aca715d7e6b88f8d58bc63066ae
2020-10-28 22:04:35 -07:00
TreeHugger Robot
a90ddeea57 Merge "Settings/Play/Suggest layout polish" into ub-launcher3-master 2020-10-28 22:12:52 +00:00
TreeHugger Robot
8f48f23039 Merge "IME bounds after DOWN->UP Motion event sequence" into ub-launcher3-master 2020-10-28 21:22:51 +00:00
Hyunyoung Song
a34766a176 IME bounds after DOWN->UP Motion event sequence
Bug: 170739594

Change-Id: I1aa8dd2ced7c017e57d3c14c02d5b78900a46caa
2020-10-28 12:49:56 -07:00
TreeHugger Robot
426f6ac276 Merge "Use event time of app side for latency metrics" into ub-launcher3-master 2020-10-28 10:40:27 +00:00
Riddle Hsu
b30adcb232 Use event time of app side for latency metrics
There are 2 reasons not to use MotionEvent#getEventTime:
1. There is an existing TouchEventReported metric for touch latency.
2. In instrumentation test, the event time is set when creating
   the motion event for injection. It may cause the results to be
   5 times slower than the real case. That may lead to miss the
   cost from app to system.

Bug: 166614700
Test: Enable statsd log: "adb shell cmd stats print-logs"
      Touch gesture navigation bar or launch app from launcher.
      adb logcat | grep statsd | grep "(48)"
Change-Id: Ica5e7df685fe737bbc3ac60c3ec35bad15466726
2020-10-28 09:13:48 +00:00
Tracy Zhou
55940ecfc7 Render and track live tile position when launching another app from Overview
Fixes: 165394366
Fixes: 170338328
Test: Manual
Change-Id: Idfcd423cbe062af33564eaa9e83ec21fbac0cdf9
2020-10-27 15:45:01 -07:00
TreeHugger Robot
a48f6efbe1 Merge "Integrating snapshot logging in Launcher" into ub-launcher3-master 2020-10-27 19:08:01 +00:00
Sunny Goyal
b694a69f53 Integrating snapshot logging in Launcher
> Workspace snapshot is logged when the workspace loads (at most once a day)
> Removing unnecessary thread jumping when logging folders
> Preference snapshot is logged on process start and whenever something changes

Change-Id: I93767de89b11522d843c0e8300d1f108c78f6d90
2020-10-27 11:25:43 -07:00
Hyunyoung Song
9fc27da5f8 Settings/Play/Suggest layout polish
Bug: 170792963
Bug: 170750779
Change-Id: I69b09f5360e165c3b1b33e259cdd0f390ce6fa60
2020-10-27 16:45:54 +00:00
Schneider Victor-tulias
47dfc3a3ca Merge "Fix All Apps Search plugin shortcut icon redrawing issue." into ub-launcher3-master 2020-10-26 20:57:17 +00:00
TreeHugger Robot
f9317597ef Merge "Add a feature flag to expand smartspace to three rows" into ub-launcher3-master 2020-10-26 18:37:26 +00:00
Schneider Victor-tulias
3ee7018227 Fix All Apps Search plugin shortcut icon redrawing issue.
BubbleTextViews animate the update from their placeholder icons to their high res icons. Added a field to allow restricting what BubbleTextViews' icon updates should be animated. Updated SearchResultIconRow to store the icon Drawable rather than the resource id to prevent unecessary redrawing.

Fixes: 170966269

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

Change-Id: Ib55dafdf5b5fed00d343af5f95f3dd3f08c4ee8e
2020-10-26 14:25:35 -04:00
TreeHugger Robot
bc3a5d516e Merge "[pixel-search] URGENT: bug fix for teamfood: fix crash when tapping on a screenshot result" into ub-launcher3-master 2020-10-23 23:23:52 +00:00
Hilary Huo
9c43bfa798 [pixel-search] URGENT: bug fix for teamfood: fix crash when tapping on a screenshot result
Bug: b/171596755
Change-Id: I125404dbe5a4e5f8e3bdc233e3a82db3dca48f42
2020-10-23 15:48:12 -07:00
TreeHugger Robot
4c3952dc60 Merge "Minor stylistic changes in Workspace.java." into ub-launcher3-master 2020-10-23 00:27:39 +00:00
Pinyao Ting
cb403d9e52 flip default value of minimal device feature flag
Test: manual
Change-Id: Iaf46dffb935bdf4b46e7c57d547bdc697250ec56
2020-10-22 16:07:08 -07:00
Hilary Huo
f5ce80b8a0 [pixel-search] Latency analysis, add logging statement in launcher
Bug: b/170675311
Change-Id: I229ace399085bea1c3f9535eb713edd329dff8bd
2020-10-21 18:00:06 -07:00
Andy Wickham
70e8b15721 Minor stylistic changes in Workspace.java.
Change-Id: Ib07611f27cbc427d11abccd8b74ea144485752f7
2020-10-20 15:36:18 -07:00
Alex Chau
acfac6187d Use Diplay.getMetrics in DisplayController
- This is a workaround of b/163815566, where DisplayMetrics is stale
  when onDisplayChanged is called.
- Instead of relying on stale DisplayConext, get the DisplayMetrics
  from the Display directly.
- Also optimized how DisplayController.Info is created by passing in
  Display only
- Use mDisplayContext.getDisplay directly if availalbe

Bug: 163815566, 160544577
Test: DPI looks correct on device boot
Change-Id: I2a7454bb8cf2073ce592e8662781b87fc998444f
(cherry picked from commit 177c38243dc3bf245d1f7db3c265dfb56522f441)
2020-10-20 20:19:57 +01:00
alexmang
6c666fb196 Add a feature flag to expand smartspace to three rows
In order to experiment with presenting more predicted content to the
workspace I have added a flag to expand smartspace to two rows.

This CL does not include any app relocation. If an app lives in a space
the expanded smartspace will occupy, it will be removed from workspace.

Change-Id: I38354dc81a34a495828cf7a69ddb04cc137e2e4e
2020-10-20 09:32:29 -07:00
Hyunyoung Song
b03d2b4161 Merge "Search query method should support multiple consumers" into ub-launcher3-master 2020-10-20 15:25:56 +00:00
Schneider Victor-tulias
fb79f5541d Merge "Add the ability to specify a list of tutorial steps in the gesture sandbox tutorial intent." into ub-launcher3-master 2020-10-20 13:51:06 +00:00
Hyunyoung Song
f6b05068d9 Invert the badging
Bug: 171171594
Change-Id: If84fdc03254105c843e16f39f479505b16e1cd5f
2020-10-20 00:19:29 -07:00
Hyunyoung Song
caa1e9c399 Search query method should support multiple consumers
Bug: 170488559
Change-Id: I64bef9523d3c3950c4ca3a4b9ce1d506d1672200
2020-10-19 22:09:10 -07:00
TreeHugger Robot
744a0fbeae Merge "Call click event on IME quick select for SearchResultIcon" into ub-launcher3-master 2020-10-19 22:17:26 +00:00
Samuel Fufa
71f24588c0 Call click event on IME quick select for SearchResultIcon
Bug: 171131394
Change-Id: I8a703e8d0ca10570e3f774510610d3fb4c0eaab8
2020-10-19 10:19:31 -07:00
Samuel Fufa
13a2a010de Handle IME event for SearchResultIcon
Bug: 171131394
Test: Manual
Change-Id: I2ed1c61053c78aaecc3324418229d69634a72ae4
2020-10-18 21:19:57 -07:00
Samuel Fufa
1f79eeda76 Remove hardcoded itemTypes from SearchTarget
- Introduces componentName and userHandle members to SearchTarget
- SearchTargetEvent now has searchTarget member
- Builder pattern for SearchTarget and SearchTargetEvent
- Search backend should add headers manually instead of launcher inferring sections

Bug: 171026321
Test: Manual
Change-Id: I28e0455e82b925277a17703b9aa061c8f9f15262
2020-10-17 15:41:45 -07:00
TreeHugger Robot
7a09177e50 Merge "Setup SearchResultIcon for single cell results" into ub-launcher3-master 2020-10-15 22:36:14 +00:00
Samuel Fufa
314761a808 Setup SearchResultIcon for single cell results
SearchResultIcon will be able to render apps, shortcuts and remote actions. It can also handle its own focused state drawing.

Screenshot: https://screenshot.googleplex.com/C3KgjJtLQTBPgaf

Bug: 170752716
Test: Manual
Change-Id: I460a9c128ea3f5814784e342c5d5fa5b7e310882
2020-10-15 14:32:19 -07:00
Pinyao Ting
702ed27886 Fix the issue where shortcuts are removed in minimal device mode
When loading the workspace, Launcher pins/unpins shortcuts in comply
with the loaded workspace. Since minimal device mode creates a mostly
empty workspace, existing shortcuts are getting unpinned as a result.

To mitigate the issue this CL compares the db name and only invoke
sanitizeData when it matches the one defined in InvariantDeviceProfile.

Bug: 170611866
Test: manual
1. add some deep shortcut in workspace (e.g. long tap on chrome, drag
"incognito tab" to workspace)
2. opt-in to sunshine fishfood (g/sunshine-teamfood)
3. enable bedtime mode with minimal device in Settings -> Digital
Wellbeing -> Show Your Data -> Bedtime mode -> Customize -> minimal
device
4. toggle bedtime mode, wait for apps in minimal device to show, then
toggle off bedtime mode
5. verify the deep shortcut still exist

Change-Id: Ie18216ecb288e7481aa2404c4cb3ea418aee85cb
2020-10-15 12:56:44 -07:00
Schneider Victor-tulias
cf0b275a48 Add the ability to specify a list of tutorial steps in the gesture sandbox tutorial intent.
Added tutorial_steps string array in the intent to allow specifying an ordered list of tutorial steps.

Change-Id: Ic42a65598a74a64f8441a22f58c6cd988a5762e3
2020-10-15 10:27:30 -04:00
Samuel Fufa
26c1105fa0 [search api part 1] Setup centralized SearchEventTracker
- Rename AdapterItemWIthPayload to SearchAdapterItem, PayloadResultHandler to SearchTargetHandler
- Setup SliceViewWrapper for self contained slices

Bug: 170702596
Change-Id: I0baf984ec8123c95011abcc17372f8d055e98ad7
2020-10-13 12:40:22 -07:00
TreeHugger Robot
4bb65ff516 Merge "Search UI clean up" into ub-launcher3-master 2020-10-13 00:07:36 +00:00
Samuel Fufa
2afcab804b Search UI clean up
- Resolve spacing issue when work profile is installed
- Cache play icons and use icon shape
- Only draw focus indicator for the first result

Bug: 170487752
Bug: 170665892
Change-Id: I864d2e796786637132e127ef9b418c0a76c74d6e
2020-10-12 16:19:41 -07:00
Riddle Hsu
979da64d82 Add app start source info of apps launched from launcher
Bug: 166614700
Test: Enable statsd log: "adb shell cmd stats print-logs"
      adb logcat | grep statsd | grep "(48)"
      The line may contain 0x100000->1[I] 0x110000->10[I]
      that means 1=from launcher and 10=latency 10ms.
Change-Id: Iddaff7066b66e241ba58ec87129ddbe2c531dc7e
(cherry picked from commit 7bdf3574a3)
2020-10-09 17:21:38 +00:00
Samuel Fufa
692d2109a6 invalidate itemDecoration on predictedRow focus draw
Change-Id: I66c731f00ae1c1292c51ff281957f05fd2d70dfa
2020-10-08 18:42:48 -07:00
Samuel Fufa
8d5b118060 Revert PredictionRow shuoldDraw check
+ Show Rounded play result icons

Bug: 168805872
Test: Manual
Change-Id: I663c7f7ca1f1ac072e5e9c441deabef7c3fbd97b
2020-10-08 17:49:22 -07:00
Hilary Huo
86f8df6cf9 Merge "[pixel-search] add escape hatch" into ub-launcher3-master 2020-10-08 18:43:51 +00:00
Samuel Fufa
4d19854b25 Merge "Search UI cleanup" into ub-launcher3-master 2020-10-08 18:40:56 +00:00
Hilary Huo
16045060c3 [pixel-search] add escape hatch
Change-Id: I33ffea1fc0859564955380d7d1db317293d1a2cb
2020-10-08 10:27:13 -07:00
Andy Wickham
0827e1e32a Merge "Adds feature flag for BC Smartspace." into ub-launcher3-master 2020-10-08 16:53:29 +00:00
Samuel Fufa
ab9ad20be6 Search UI cleanup
- offset all apps header padding with search input margin
- avoid check shouldDraw check on HeaderRow. (race condition)

Bug: 170263425
Change-Id: I11a1fbb448aa6afd18ec0984af9bb8b1d7600f69
2020-10-07 15:22:15 -07:00
Andy Wickham
68d7a6e5b2 Adds feature flag for BC Smartspace.
Change-Id: Iaf9fb7507d0ccd004a4e00188c75dadd6a059246
2020-10-07 14:27:17 -07:00
Samuel Fufa
4b7f38b8fa Align fallback result query with result text
screenshot: https://screenshot.googleplex.com/6Daj5vdmz2jmznX
bug: 169438169
test: Manual
Change-Id: Ie621ed3c834aec5e9467607da4f685d05d152183
2020-10-07 10:31:06 -07:00