Commit Graph
28165 Commits
Author SHA1 Message Date
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 245d7d4f89 Merge "Fix NPE / add downX,Y location for all swipes/ add extra debugging info Bug: 122700646 Bug: 127840207" into ub-launcher3-qt-dev
am: a6f1969981

Change-Id: I8efd9fc45d03e40056dab866ecba88ea52d0c267
2019-04-24 16:52:08 -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 56a0436e26 Removing left over experimental overlays and frame width (2/2)
am: 6b435c2a6a

Change-Id: I89813ff37ad8cd23472bde5df3525b1070b7eb85
2019-04-24 15:57:51 -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 d620e12499 Merge "Removing left over experimental overlays and frame width (2/2)" into ub-launcher3-master 2019-04-24 22:28:35 +00:00
Adam Cohen f2f0b16511 Merge "Play haptic on Assistant gesture invoked" into ub-launcher3-qt-dev
am: b0c81fc031

Change-Id: If36f56d0386b117d6848ad0098b8e2d544088e4e
2019-04-24 14:46:41 -07: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
Adam Cohen bc59418925 Merge "Additional Assistant gesture tuning" into ub-launcher3-qt-dev
am: ab184166aa

Change-Id: I79925088062af426455b83d02899b51d04d91b20
2019-04-24 14:06:33 -07: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 4c353cd238 Rename launcher:iconSize attribute to prevent overriding material
am: 01b8b68db7

Change-Id: I00113c28bc4f668a23384650340672f93f0d261f
2019-04-24 09:49:01 -07: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
Ryan Mitchell 09328442d6 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:14 +00:00
Vadim Tryshev bb6133178f Merge "Logging requestLayout()" into ub-launcher3-qt-dev
am: 5caa017236

Change-Id: I84649776437adfc818f80d310f50f4dde5acff61
2019-04-23 18:31:30 -07:00
Kevin b4f427b245 Merge "Use custom drawable for Recents Go thumbnails (2/2)" into ub-launcher3-qt-dev
am: 648d088e6e

Change-Id: I45e60a3604fc3bb01f7ccb9a86b241c5d9a8bbec
2019-04-23 18:30:59 -07: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 773d19815e Merge "Tweak clear all button layout UI" into ub-launcher3-qt-dev
am: c1275a34a8

Change-Id: I6a2b122bb76e7f18938e608759d996ceb9890ac5
2019-04-23 15:44:01 -07: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
Sunny Goyal d15cb9c4fa Merge "Adding support for showing predicted apps as a floating row in all-apps and overview" into ub-launcher3-qt-dev
am: b31b38c942

Change-Id: Id5c4e1b1e1732b517d6f5cde5a191f376cc16dc1
2019-04-23 15:03:52 -07: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
Siarhei Vishniakou 3afd9007ae Merge "Use GestureDetector in WorkspaceTouchListener" into ub-launcher3-qt-dev
am: dcacfd7d42

Change-Id: Ie5045135cf455b8f7a7ddd559572f67c8754d2ff
2019-04-23 13:40:33 -07:00
TreeHugger Robot dcacfd7d42 Merge "Use GestureDetector in WorkspaceTouchListener" into ub-launcher3-qt-dev 2019-04-23 20:27:35 +00:00
vadimt fbe635fd73 Merge "Add tracing for non-loading model" into ub-launcher3-qt-dev
am: 4ec6e44c72

Change-Id: I2d198d77e27fee89a58052bb737b14f39ee5cede
2019-04-23 13:22:56 -07:00
Rajeev Kumar 6cc1765d7e Merge "Move Launcher3GoIconRecents to /product partition and update local override package." into ub-launcher3-qt-dev
am: 6503757ac4

Change-Id: I7b697aef6eab2e8b20ded4cc5e3da7a0fa819f27
2019-04-23 13:22:27 -07:00
TreeHugger Robot 4ec6e44c72 Merge "Add tracing for non-loading model" into ub-launcher3-qt-dev 2019-04-23 20:17:36 +00:00
Kevin e0d2272fc8 Merge changes I0ab00c03,Ib4e83e36,I72b17568,If4ea3575,If63bf25f, ... into ub-launcher3-qt-dev
am: 61aa79903c

Change-Id: Ie16ecd60c62418adf7d0aff7fadab1f573d54ef2
2019-04-23 13:07:31 -07:00
Tony Wickham 753d6f40e3 Move system gesture exclusion rect to LauncherRootView
am: 12e8a34ef6

Change-Id: I16618086081509c25aeaa009a2b27bfd423cbd49
2019-04-23 13:06:09 -07: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
Kevin 5f4e2fead0 Enable landscape mode for Recents Go.
Set rotate state to request rotate on the overview state being enabled

Bug: 114136250
Test: Go to recents go, rotate screen
Test: Go to recents from app
Change-Id: If63bf25f61b873f67986e463a980e6d67a9b5ae4
(cherry picked from 20e1f17340)
2019-04-23 19:27:30 +00:00
Kevin 6af38e14aa Remove old recyclerview layout logic
Remove old layout logic for recycler view as there is no need for the
recycler view height to change based off device profile. Instead the
task items themselves will change.

Bug: 114136250
Test: Builds
Change-Id: Ia6dae22e3e73fafe46d4adf834bf7d24af36a607
(cherry picked from commit cacf7df2d4)
2019-04-23 19:26:21 +00:00
Kevin 1834728db6 Calculate task height directly off portrait height
Change task height calculation implementation to be directly based off
device height in portrait mode. This allows the recycler view
layout manager's job to be simpler while still ensuring that task height
changes dynamically based off device configuration changes.

Bug: 114136250
Test: Go to recents Go, task height is based off portrait mode height
Change-Id: I9c7cada3b89d2b2cea5ece8c357a40ce5974a2e6
(cherry picked from commit 3172c6811b)
2019-04-23 19:26:10 +00:00
Kevin b6519e1036 Fix task adapter notify merge conflict
Resolved merge conflict of ag/7093095 incorrectly and accidentally kept
both HEAD and CL changes. Resolved in this CL.

Test: Manual test
Change-Id: Iad42ab12b486201f496c83f99c8c6094273543f3
(cherry picked from 420115e7f1)
2019-04-23 19:25:50 +00:00
Kevin 4ba81d1c6f Move clear all to recycler view (2/2)
This finishes moving the clear all button to the recycler view.
Primarily, this CL deals with changes to calls that depended on recycler
children being task item views and starting at the 0th index.

Bug: 114136250
Test: Build, manual test
Change-Id: Icecf257409207de351345997205def11e1048ab0
(cherry picked from 8659925532)
2019-04-23 19:25:14 +00:00