Commit Graph

18644 Commits

Author SHA1 Message Date
Hyunyoung Song efe8475093 Merge "Add important dump logging Bug: 130851537 Bug: 119992316" into ub-launcher3-qt-dev 2019-04-25 22:33:31 +00:00
Hyunyoung Song a310a80c7b Add important dump logging
Bug: 130851537
Bug: 119992316

Change-Id: I3de7c1d910d1aecd80b47a85284565c79fe0e2cc
2019-04-25 15:14:44 -07:00
Tony Wickham 03f27013bf Log undo button click
Also fix a bug where we logged workspace swipe upon clicking undo, since
rebinding the pages causes us to reset mCurrentPage = 0 followed by
setCurrentPage(pageBoundFirst). Since the page isn't actually visibly
changing, we shouldn't log in that case.

Bug: 118758133
Change-Id: Ie87164a8c7c278680f67dee75657210bd33408a4
2019-04-25 14:22:54 -07:00
Hyunyoung Song 1e4a43ac67 Merge "Add logging for Task Icon interaction" into ub-launcher3-qt-dev 2019-04-25 20:30:43 +00:00
TreeHugger Robot db4e713c18 Merge "Don't layout empty tasks in layout anim if we have the actual content." into ub-launcher3-qt-dev 2019-04-25 20:22:08 +00:00
Kevin 1335c36c15 Don't layout empty tasks in layout anim if we have the actual content.
When we load the task content (icons, snapshots, etc), oftentimes, we
are still in the middle of the layout animation where items are fading
in from bottom to top. At this point, we start a second content-fill
animation from bottom to top that fades from empty => filled after the
first animation.  However, we can improve this so that empty views
aren't shown for a split second for some of the later laid out views.

If the first animation has not finished and we would animate a content
change from empty => filled but the view is currently still not visible,
we should just complete the content transition on the spot so that the
layout animation lays out the filled version instead.

Bug: 131339235
Test: Go to recents, observe lay out animation does not continue to lay
out the empty view first

Change-Id: I936a81e6cf8b3552cdee90c183fc841f50ec9ea8
2019-04-25 12:53:20 -07:00
Vadim Tryshev a5ed906db8 Merge "Enable testStressSwipeToOverview()" into ub-launcher3-qt-dev 2019-04-25 19:11:26 +00:00
TreeHugger Robot 4fd2dff408 Merge "Use AccessibilityManager#getRecommendedTimeoutMillis for Snackbar" into ub-launcher3-qt-dev 2019-04-25 18:58:39 +00:00
vadimt ab03a7eb19 Enable testStressSwipeToOverview()
Underlying issue has been fixed.

Bug: 129723135
Change-Id: I336de8bb38360ee83023caa17bc90a601db3b9e2
2019-04-25 11:57:41 -07:00
Hyunyoung Song fd94cd5498 Add logging for Task Icon interaction
Bug: 129279637
Change-Id: I135bad16015129b3b60bb13e86783d623e504b1b
2019-04-25 11:56:04 -07:00
Tony Wickham 5519a0f6a8 Use AccessibilityManager#getRecommendedTimeoutMillis for Snackbar
Bug: 129806241
Change-Id: I4aabc3ee33560960f3117d82f9873fce60f1278a
2019-04-25 11:47:22 -07:00
Tony Wickham 2a3c936440 Merge "Call initTransitionEndpoints in constructor" into ub-launcher3-qt-dev 2019-04-25 18:46:45 +00:00
Sunny Goyal 587421adbf Merge "Filling in content values on the worker thread" into ub-launcher3-qt-dev 2019-04-25 17:38:13 +00:00
Sunny Goyal 2e4477accb Filling in content values on the worker thread
Writing to disk hapens on the worker thread, so if we create content values on
UI thread, some values can change before it is written to disk.
This happens in case of shortcuts, where the badge is applied after the icon is queued,
but before it is written

Bug: 131303610
Change-Id: Ic35b17071d4ed3e5c5fee9f003a225e4ffdc74f3
2019-04-25 07:08:15 -07:00
TreeHugger Robot 1c9d3974b5 Merge "Re-adding clear-all button logging" into ub-launcher3-qt-dev 2019-04-25 01:50:42 +00:00
Tony Wickham 56511361ba Merge "Pass correct value to updatePaused() in setDisallowPause()" into ub-launcher3-qt-dev 2019-04-25 01:34:22 +00:00
Tony Wickham 4f24370f72 Pass correct value to updatePaused() in setDisallowPause()
Change-Id: Iabc3a3aac85bcf426ab18437e006cc95fa89fbc0
2019-04-24 18:20:23 -07:00
TreeHugger Robot c2b14d9fc8 Merge "Fix overview cmd launching wrong task in landscape" into ub-launcher3-qt-dev 2019-04-25 01:17:06 +00:00
Kevin 71d3e30fd1 Fix overview cmd launching wrong task in landscape
Previously we used the bottom most view in recents list to launch the
recent task when the user pressed the overview button. However, if
the user is in landscape and scrolls up so the bottom view is not
attached, pressing overview command will launch whatever the bottom task
is visually which is incorrect. Instead, we get the actual task from the
model to launch and only use the "view => app" animation if the view for
that task is attached. If it isn't, we use the basic animation.

Bug: 130735711
Test: Go to landscape, scroll up, hit command, launches correct task
Change-Id: Idff88054443259e917bbec1b47d78efbb1544283
2019-04-24 18:01:08 -07:00
vadimt 325a48b01a Re-adding clear-all button logging
Bug: 131250710
Change-Id: If31a84bf6db37b295fc0e2c4d8db8ed4b7baa037
2019-04-24 17:50:29 -07:00
Tony Wickham d0d39f1769 Merge "Move logic that overrides MotionPauseDetector to callers" into ub-launcher3-qt-dev 2019-04-25 00:34:47 +00:00
TreeHugger Robot 23060080fe Merge "Hide Clear all button during quick switch" into ub-launcher3-qt-dev 2019-04-25 00:19:34 +00:00
Tony Wickham 5e58b447b0 Call initTransitionEndpoints in constructor
Before, the soonest we initTransitionEndpoints() is in
onRecentsAnimationStart(), which might be too late if launcher was
killed. (In that case, the gesture might end before we ever get
onRecentsAnimationStart(), and thus will never consider the distance
traveled great enough to trigger recents since we don't have endpoints.)

Bug: 129723135
Change-Id: I349f62244aaba8369926b14f90acd994fd40a93a
2019-04-24 17:19:07 -07:00
Tony Wickham 66d1c2fada Hide Clear all button during quick switch
- Add support for mMinScrollX to PagedView
- Add RECENTS_CLEAR_ALL_BUTTON as a state-specified visible element
- In BackgroundAppState, set Clear all invisible and bound RecentsView
  scroll to the last task

Test:
- Open an app, quick switch until reaching the end, ensure Clear all
  does not show up and an overscroll effect is performed
- Enter overview, scroll to the end and ensure Clear all shows up
- Same tests in RTL and 3rd party launcher

Bug: 130160876
Change-Id: I5fb958744d0055b83ced1f8b0d7face0e06a0cc5
2019-04-24 17:09:34 -07:00
Hyunyoung Song a6f1969981 Merge "Fix NPE / add downX,Y location for all swipes/ add extra debugging info Bug: 122700646 Bug: 127840207" into ub-launcher3-qt-dev 2019-04-24 23:34:12 +00:00
Hyunyoung Song bf44bc342f Fix NPE / add downX,Y location for all swipes/ add extra debugging info
Bug: 122700646
Bug: 127840207

Change-Id: I5862c8950565df172a933114e1fb2f9c4575593e
2019-04-24 16:16:51 -07:00
Tony bbea105be0 Move logic that overrides MotionPauseDetector to callers
There are 2 conditions that we force the MotionPauseDetector to treat
the motion as not paused:
1. If we haven't passed a small displacement (48dp before, 36dp now)
2. If we have moved mostly orthogonally

These existed soley for the OtherActivityInputConsumer case, because
1. We only need the displacement requirement to make room for the
   peeking shelf, which doesn't exist in other cases (it's already there on
   home for example)
2. We can only move orthogonally for quick switch, which again doesn't
   exist for other users of MotionPauseDetector.

So now instead of checking min displacement and orthogonal distance
inside MotionPauseDetector, we let callers setDisallowPause()
before adding positions to their MotionPauseDetector.

The only user visible change is that you no longer have to swipe up 48dp
before we allow pause to overview from home. This also paves the way to
using the same logic that determines to disallowPause to also detach
recents from the window while swiping up from an app.

Bug: 129985827
Change-Id: Ie690aa314da3260aff2209341a29638604f9501c
2019-04-24 16:10:40 -07:00
Matthew Ng 6b435c2a6a Removing left over experimental overlays and frame width (2/2)
Frame width is not used because navigation bar is always on the bottom.

Test: manual
Bug: 113952590
Change-Id: I48c29ffa4ca982a7aa20e2cced019e50580fe302
(cherry picked from commit 69a329e79e)
2019-04-24 22:32:38 +00:00
TreeHugger Robot b0c81fc031 Merge "Play haptic on Assistant gesture invoked" into ub-launcher3-qt-dev 2019-04-24 21:33:28 +00:00
Adam Cohen ad2b0a7261 Play haptic on Assistant gesture invoked
Change-Id: I32c5d406999b6086a928b0a232c955a52fe23019
2019-04-24 17:16:15 -04:00
TreeHugger Robot ab184166aa Merge "Additional Assistant gesture tuning" into ub-launcher3-qt-dev 2019-04-24 20:57:21 +00:00
Adam Cohen 9bc1431f37 Additional Assistant gesture tuning
=> Using the drag slop (currently 10dp), which is the appropriate slop when comparing to the other gestures. Touch slop (which was being used for the Assistant) is only being used for gestures starting from the back button. This means that the delegate was getting triggered much too often (unfair slop competition). This prevents that.

=> Fixed additional bugs with the consumer delegate / sharedState; the shared state notion really only applies to the OtherActivityInputConumer, and it wasn't being propagated from the AssistantConsumer.In addition, the isActive() method is only being used as a proxy for whether or not to use the shared state, so clarified the naming. This fixes another case where touch could become completely stuck and you could no longer swipe up.

=> Modified the effective angle to be 90 degrees down to 20 above the horizontal.

=> Reduced the drag threshold to 55 dps.

=> Known issue: the time threshold requires motion events to be triggered. In practice, this works because the finger doesn't stay completely still, but we should add a timer to update the progress smoothly.

=> Removed pause detector.

Change-Id: Ie23e836c6d778914594774b830c3cd2e7b94eca4
2019-04-24 16:46:03 -04:00
Ryan Mitchell 01b8b68db7 Rename launcher:iconSize attribute to prevent overriding material
A previous change [1] introduced the material library as a static library
for the SecondaryDisplayLauncher. The material library defines a
resource "attr/iconSize" with format="dimension" while Launcher3 defines
a resource of the same name with format="float". The material resource
is being overriden by the Launcher3 resource and is preventing aapt2
from disallowing multiple definitions of the same attribute with
different formats.

This change renames the Launcher3 iconSize so it will not collide with
the material resource.

[1] If183dd35a1d197c4a9a8225a021e36c4f1662587

Bug: 129146717
Test: build success and inspection of generated apk
Change-Id: I5eb54ea606ddcfb47d5150b44906a8707203e905
2019-04-24 16:22:51 +00:00
Vadim Tryshev 5caa017236 Merge "Logging requestLayout()" into ub-launcher3-qt-dev 2019-04-24 01:24:18 +00:00
vadimt bd0f116321 Logging requestLayout()
Bug: 129434166
Change-Id: Idd1a67523cb191775c4f871090489fce10ecc36e
2019-04-23 18:09:09 -07:00
TreeHugger Robot 648d088e6e Merge "Use custom drawable for Recents Go thumbnails (2/2)" into ub-launcher3-qt-dev 2019-04-24 01:06:25 +00:00
Kevin 483d2ddd41 Use custom drawable for Recents Go thumbnails (2/2)
Hook up the thumbnail drawable created in the first CL to the task
thumbnail so that the drawable automatically rotates and resizes based
off the device orientation.

Bug: 114136250
Bug: 131095241
Test: Go to app in landscape, go to recents, rotate => thumbnail rotates
Change-Id: Ib58e45ab3e94aeb080e47b1d5b38c221acce5ef3
2019-04-23 15:35:05 -07:00
TreeHugger Robot c1275a34a8 Merge "Tweak clear all button layout UI" into ub-launcher3-qt-dev 2019-04-23 22:34:35 +00:00
Kevin 8d5d17bf53 Tweak clear all button layout UI
Add vertical margins to clear all button and add horizontal padding.

Bug: 114136250
Test: Manual test on marlin_svelte and emulated tablet (1280 x 800)
Change-Id: Iae8d6609ca1031947e8e8d90f526d9cbda070ee5
2019-04-23 14:47:55 -07:00
TreeHugger Robot b31b38c942 Merge "Adding support for showing predicted apps as a floating row in all-apps and overview" into ub-launcher3-qt-dev 2019-04-23 21:47:38 +00:00
Sunny Goyal 77b3419ad5 Adding support for showing predicted apps as a floating row in all-apps
and overview

Bug: 130053407
Change-Id: Idb93a0ba6cfea8406f75ab86d9e0acde2fc04b3a
2019-04-23 14:26:44 -07:00
TreeHugger Robot dcacfd7d42 Merge "Use GestureDetector in WorkspaceTouchListener" into ub-launcher3-qt-dev 2019-04-23 20:27:35 +00:00
TreeHugger Robot 4ec6e44c72 Merge "Add tracing for non-loading model" into ub-launcher3-qt-dev 2019-04-23 20:17:36 +00:00
TreeHugger Robot 6503757ac4 Merge "Move Launcher3GoIconRecents to /product partition and update local override package." into ub-launcher3-qt-dev 2019-04-23 19:52:54 +00:00
TreeHugger Robot 61aa79903c Merge changes I0ab00c03,Ib4e83e36,I72b17568,If4ea3575,If63bf25f, ... into ub-launcher3-qt-dev
* changes:
  Clear all button should not be swipable
  Use custom drawable for Recents Go thumbnails (1/2)
  Add clear all view that scales off device height
  Ensure recents scrolled to first task in landscape
  Enable landscape mode for Recents Go.
  Remove old recyclerview layout logic
  Calculate task height directly off portrait height
  Fix task adapter notify merge conflict
  Move clear all to recycler view (2/2)
  Move clear all to recycler view (1/2)
  Only switch item animator on content fill if needed
  Fix NPE and make getTask return Optional
  Fix ViewTreeObserver crash on Recents Go
  Fix snapshots not updating on app => overview.
  Fix views not being visible on Recents Go.
  Smarter task laying out based off onMeasure
  Change layout size to be dependent on device size
  Update Go recents visibility based off adapter
  Animate content fill animation to Recents Go
  Animate to bottom view in app => overview
  Differentiate empty UI from default in recents Go
  Add task content animation property
  Fix transition progress not applying to drawables
  Change layout anim from Animation => Animator
  Add drawable for default thumbnail for Recents Go
2019-04-23 19:36:48 +00:00
Rajeev Kumar 30e5ce7cba Move Launcher3GoIconRecents to /product partition and update local override package.
This move resolves privapp-permissions whitelist issue and multiple Launcher3 apks on the device.  

Bug: 131102753
Test: Built, flashed crosshatch_svelte-eng target on a Pixel 3 device and the device boots successfully. 
Change-Id: Iee0e12737cd26acddf8d1d3e057a613febb3d7e0
2019-04-23 19:35:50 +00:00
Kevin 0eefc8530e Clear all button should not be swipable
Unlike other task items in the recycler view, the clear all button
should not be swipable as you obviously can't remove the button.

Bug: 114136250
Test: Go to recents, attempt to swipe clear all, does not work
Change-Id: I0ab00c03b697f2174431b69bbf758c3ff104db97
(cherry picked from commit cd88cf8d1c)
2019-04-23 19:28:17 +00:00
Kevin 072dcc3aeb Use custom drawable for Recents Go thumbnails (1/2)
In order to support rotated thumbnails based off the device orientation,
we should create a custom drawable that supports drawing a rotated
bitmap based off some requested orientation. This CL adds this class,
and we'll use it in a later CL.

By baking this directly into the drawable, we prevent unnecessary
allocations of rotated bitmaps.

Bug: 114136250
Bug: 131095241
Test: Builds
Change-Id: Ib4e83e3619028c583e10f1b8d743a365ec310346
(cherry picked from commit 518ff10856)
2019-04-23 19:28:05 +00:00
Kevin 728deff7c0 Add clear all view that scales off device height
Add a custom clear all view that scales its height based off the height
of the device in portrait. This view holds and lays out the actual
button.

Bug: 114136250
Test: Task items + clear all scale to fit flush with screen size
Change-Id: I72b175681c104588970d57cde34cebc0f06b55a0
(cherry picked from commit a2b8ca8830)
2019-04-23 19:27:53 +00:00
Kevin 52645638e9 Ensure recents scrolled to first task in landscape
The app should animate to the bottom view which means we should ensure
the bottom view is scrolled to be visible at the bottom when we animate
in. Note that this is only a consideration in landscape since in
portrait, all tasks are always visible and the recyclver view is not
scrollable.

Bug: 114136250
Test: Go to recents Go from app in landscape mode
Change-Id: If4ea35759cc881f2c32565368d031620b62a45dd
(cherry picked from commit 64bb5bbb78)
2019-04-23 19:27:42 +00:00