Commit Graph

21055 Commits

Author SHA1 Message Date
Winson Chung dfd8b5e07d Fix regression from ag/9518396
- Previously, we would only cancel the current animation if
  sharedState.canBeContinued which was only set when mGestureEndTarget
  was set, which is only calculated when the swipe gesture ends,
  and is only true if the end target is not Launcher.

  In ag//9518396 the check for the null end target was moved into
  isRunningAnimationToLauncher(), but that call actually bakes in two
  checks together, which means that even when tapping the home button
  (where there is no gesture and no end target), it would return false.
  Instead, we should ensure that the gesture target is set before trying
  to cancel the animation.
- Also fix an existing issue where if the consumer is cleaned up after
  the start callback is registered, but not before the callback has
  returned, that we may incorrectly set the wrong launcher state since
  the callback is made to the old gesture handler which tries to prepare
  the recents UI (this manifests as a blank launcher screen).

Bug: 141886704
Change-Id: I642f20d631924730e98d10bb2123bd9448793fc6
2019-10-17 16:20:15 -07:00
Winson Chung 89eb36405d Skip setting the deferred launch callback if activity is already destroyed
Bug: 141886704
Change-Id: Iaa151335e5a3994a46406df399f2d159afe2c75e
2019-10-17 12:01:58 -07:00
TreeHugger Robot 35903d2cb2 Merge "Reducing the time for expected launcher initialization back to 10 sec" into ub-launcher3-master 2019-10-17 07:18:37 +00:00
TreeHugger Robot da6b9f7429 Merge "Preparing to enabling Inproc launcher tests as presubmit" into ub-launcher3-master 2019-10-17 06:45:13 +00:00
vadimt 6332b7d73c Reducing the time for expected launcher initialization back to 10 sec
It was temporarily raised to 60 sec.

https://googleplex-android-review.git.corp.google.com/9563509
should've fixed some problems with loading time, but likely not all.

We need to observe whether this test starts flaking again.

testDragIcon will run only in Launcher postsubmit, and won't block
merges to platform if it fails.

Bug: 142514365
Change-Id: I2b9a9d043346ebda721221cefd6118a1a799501f
2019-10-16 17:49:29 -07:00
vadimt 3680357a67 Preparing to enabling Inproc launcher tests as presubmit
The plan:
1. Skip all tests that fail in inproc mode on CF (this CL)
2. Observe postsubmit and make sure no inproc tests are failing or too
flaky on CF
3. Enable presubmit
4. Switch to skipping tests from step 1 only for inproc presubmit;
they'll start failing in postsubmit
5. Gradually make all tests pass and not flaky and enable them back on
presubmit

Bug: 142828227
Change-Id: I6ea3d53771503e8fd968555bb2e4cb1be10d83ef
2019-10-16 17:35:18 -07:00
Winson Chung dd9d1ea1bf 12/ Clean up some ActivityInterface calls
- Require users of the activity interface to go through the interface to
  get the raw activity
- Remove calls that pass in the activity since the interface already can
  get the reference to it internally (and the interface always has the
  reference before the caller)

Bug: 141886704

Change-Id: I13e52caba593db918e8a7764c751044142fe7ece
Signed-off-by: Winson Chung <winsonc@google.com>
2019-10-16 17:18:12 -07:00
Winson Chung 981ef3a88a 11/ Update MultiStateCallbacks to support multiple callbacks
- Allow multiple callbacks to be set for the same state
- Expose method to set state on ui thread directly
- Ensure callbacks are made immediately if the state is already set
- Clarify that the one shot callbacks vs the state listeners

Bug: 141886704
Change-Id: I8ea0dcd2821ee18d071706eaddeb2852afa13f30
2019-10-16 17:18:11 -07:00
Winson Chung c80b3224aa 10/ Migrate shared state to the gesture state
- Instead of a shared state which is written into, gestures update their
  own gesture state and that state is passed to the next gesture.
- The existing shared state encoded the final end target (which is
  currently directly correlated with canGestureBeContinued). If we move
  the end target calculations to the GestureState, the handlers can listen
  for those changes and we can use the previous gesture state to decide
  which consumer to choose.  In addition, we move over the interrupted-
  finish-launch-task id.

Bug: 141886704

Change-Id: Icb6a3815c16b23692dbcde316114bd3cea06634e
Signed-off-by: Winson Chung <winsonc@google.com>
2019-10-16 17:17:34 -07:00
Winson Chung c9bf6d45ac 9/ Clean up swipe shared state
- Add TaskAnimationManager which keeps track of the animation state whose
  lifecycle can be longer than the gesture.  Move some of the logic related
  to cleaning up old animations into this class (called when the state is
  shared across gestures).
- Instead of calling into the shared state directly via UIFactory, add
  callback to cleanup the animation and shared state from Launcher

Bug: 141886704

Change-Id: Ib6140b37162f7460a20fa1046cfd4f4068e4a1c6
Signed-off-by: Winson Chung <winsonc@google.com>
2019-10-16 17:17:34 -07:00
Winson Chung 9196cb11a2 8.5/ Follow up to comments from previous CLs
Bug: 141886704
Change-Id: Ib583753e35e57eab3b1cc413a0f910cf10142e42
2019-10-16 17:17:34 -07:00
Jonathan Miranda 643598987b Merge "Have consistent All Apps UI between grid size changes." into ub-launcher3-qt-future-dev
am: c3a688a973

Change-Id: I6c9d825e85f55bd3160ab5e2a37e707f3f525459
2019-10-16 15:51:36 -07:00
Jonathan Miranda c3a688a973 Merge "Have consistent All Apps UI between grid size changes." into ub-launcher3-qt-future-dev 2019-10-16 22:36:17 +00:00
Pinyao Ting 7242db1a7c Revert "Revert "Revert "Revert "Revert "cache shourtcut image"""""
This reverts commit 28dc8de660.

Reason for revert: the code change introduces significant delay when saving deep shortcut icons in cache.

Change-Id: I5d67ac0c4c867a40e882b7a46be446f8f7f63ac7
2019-10-16 14:52:28 -07:00
TreeHugger Robot 55395ea8f6 Merge "Revert "fetch and update shortcut icons in background thread"" into ub-launcher3-master 2019-10-16 21:49:09 +00:00
Winson Chung 40f8756793 Merge "Fix a couple trace issues" into ub-launcher3-master 2019-10-16 20:54:43 +00:00
Pinyao Ting 01c80d7a00 Revert "fetch and update shortcut icons in background thread"
This reverts commit 4ec390e490.

Reason for revert: the code change introduces significant delay when saving deep shortcut icons in cache.

Bug: 142514365
Change-Id: If7a69844aba7f32690ff347f2db11f0a8041b9e4
2019-10-16 20:51:22 +00:00
Winson Chung 5cc62c7d0b Fix a couple trace issues
- Adding trace tokens since we can be starting/ending traces out of order
- Fixing issue with draw hitting twice causing the trace stack to be
  popped twice
- Fix issue with endFlagOverrides not removing from the stack

Bug: 142803200

Change-Id: I8649b94249910a352f00f2f2c2459c355d2bab00
2019-10-16 12:34:58 -07:00
Sunny Goyal 8409284b2c Merge "Cleaning up properly after RaceConditionReproducerTest" into ub-launcher3-master 2019-10-16 19:11:23 +00:00
Sunny Goyal bffbd7521d Cleaning up properly after RaceConditionReproducerTest
Change-Id: I43362fbc63789d3ce3468266a5189a9f9d209d00
2019-10-16 11:57:43 -07:00
Jon Miranda 64d7481597 Have consistent All Apps UI between grid size changes.
We build an IDP with no grid size override values. This
allows us to reference the profile measurements so that we can have a
consistent UI for areas that the grid size change should not affect.

Bug: 124967099
Change-Id: I6235862c95800d8f31dbf2de1d12b1fcf4dbd850
2019-10-16 11:21:36 -07:00
Tony Wickham 6b62f28ef9 Fix quick switch test gesture in landscape 2-button mode
am: a0f77c4449

Change-Id: I998081a53a94ff3b1559a7e77d4d470056cfab00
2019-10-15 21:20:24 -07:00
vadimt 36d7be7fc9 Implementing test stability attribute
Change-Id: I5d78a19039ab2bcdb217886fdaca29e3df412780
2019-10-15 18:40:53 -07:00
Tony Wickham a0f77c4449 Fix quick switch test gesture in landscape 2-button mode
It should swipe from the bottom right to top right when the nav bar is
on the right, rather than from the bottom left to bottom right.

For now, disable testQuickSwitchFromApp() because it seems to have
other failures as well.

Bug: 140252765
Change-Id: I1f4989f3ea5456c18bb9cbf42ea4b157cee500d7
2019-10-15 17:30:47 -07:00
Vadim Tryshev 984187b0a1 Merge "Increasing wait time for loading model to 60s" into ub-launcher3-master 2019-10-16 00:08:22 +00:00
vadimt 4565739fb7 Increasing wait time for loading model to 60s
Bug: 142514365
Change-Id: I15e0ff8e2a721f7ffdefdf2eb02e114212dded3b
2019-10-15 17:06:41 -07:00
TreeHugger Robot 3aefb6d776 Merge "temporarily disable a regression test to unblock merging to master" into ub-launcher3-master 2019-10-15 21:50:04 +00:00
Pinyao Ting b3d3ca87dd temporarily disable a regression test to unblock merging to master
The test case testDragCustomShortcut was created initially to prevent future regression on custom shortcut (b/141568904), which was caused by ag/9342399.

Some times after ag/9342399 was reverted on ub-launcher3-master, a different error is causing custom shortcut to not working intermittently (b/141528961). Since this is different from b/141568904, it should not be a blocker to merging to master.

Bug: 141568904
Change-Id: Ia11e1ae44d0ef86c16876c002954aa662f1edbc8
2019-10-15 21:32:47 +00:00
Sunny Goyal 514e67b14d Changing the taskAffinity for LockScreenRecentsActivity so that other activities do not get started in this task
am: 91ac68284e

Change-Id: I792985ae1447b4071c547fe8a49aebb7b438c57f
2019-10-15 14:24:30 -07:00
Sunny Goyal 91ac68284e Changing the taskAffinity for LockScreenRecentsActivity so that other activities do
not get started in this task

Bug: 138473688
Change-Id: I63b72236496a818d08ccb14e02e4fbf698a0cc49
(cherry picked from commit 657d3f8ca7)
2019-10-15 20:45:02 +00:00
TreeHugger Robot 377c5a3023 Merge "Changing the taskAffinity for LockScreenRecentsActivity so that other activities do not get started in this task" into ub-launcher3-master 2019-10-15 20:27:37 +00:00
Tony Wickham 5347f0c5f6 Merge "Fix mSubtractDisplacement when recatching" into ub-launcher3-qt-future-dev
am: ab732f0baa

Change-Id: I26ab6eb11e0ef1c53c96585ad069e1a0da629bca
2019-10-15 12:19:12 -07:00
TreeHugger Robot ab732f0baa Merge "Fix mSubtractDisplacement when recatching" into ub-launcher3-qt-future-dev 2019-10-15 19:09:49 +00:00
Sunny Goyal 657d3f8ca7 Changing the taskAffinity for LockScreenRecentsActivity so that other activities do
not get started in this task

Bug: 138473688
Change-Id: I63b72236496a818d08ccb14e02e4fbf698a0cc49
2019-10-15 12:06:46 -07:00
Tony Wickham 14b919e2fd Fix mSubtractDisplacement when recatching
Previously we correctly set mSubtractDisplacement when re-catching
during the SETTLING state, but then immediately overrode it to be
+/-mTouchSlop.

Test: Swipe up to all apps, catch it by touching down during the
transition, ensure there's no jump when starting to move again.

Change-Id: I5d543e8a8b027b68bafb26b752e70862f6ae0777
2019-10-15 11:35:15 -07:00
vadimt 6c484bc9bf More logging for a lab-only bug
Bug: 142514365
Change-Id: I9936415fc4f3bfd4676d607f2dfff44070409c0c
2019-10-15 10:55:58 -07:00
TreeHugger Robot 8099e194d7 Merge changes from topic "shortcut-worker-thread" into ub-launcher3-master
* changes:
  fetch and update shortcut icons in background thread
  Revert "Revert "Revert "Revert "cache shourtcut image""""
2019-10-15 17:42:40 +00:00
TreeHugger Robot d410c1b829 Merge "include error log to debug the issue custom shortcut not working" into ub-launcher3-master 2019-10-15 17:01:10 +00:00
Pinyao Ting 4ec390e490 fetch and update shortcut icons in background thread
Bug: 141568904
Test: Manually verified use cases from following call-site (with and
without delay)

LauncherAppsCompatVO
  1. (Custom Shortcut) Long click on google maps -> widgets ->
     drag driving mode to workspace.
  2. Open chrome -> add to home screen -> add -> add automatically.

InstallShortcutReceiver
  Removed the line that trigger above flow for android O and above,
  then open chrome -> add to home screen -> add -> add automatically.

ShortcutDragPreviewProvider
  qdb -> long press on suggested app that has deep shortcut -> drag
  to workspace.

Change-Id: I59a4d004913a8df697af1fcfe0a080b6da01eefd
2019-10-15 09:54:09 -07:00
Pinyao Ting 28dc8de660 Revert "Revert "Revert "Revert "cache shourtcut image""""
This reverts commit 52908c9adc.

Reason for revert: roll-forward and fixes the crash due to access icon cache on main thread

Bug: 141568904
Change-Id: I1274db349c4f508d9cf59735b5f15180bb0ec033
2019-10-15 09:54:09 -07:00
TreeHugger Robot 208f2018fb Merge "Tracing to determine why the model doesn't load" into ub-launcher3-master 2019-10-15 02:21:27 +00:00
vadimt 54e0c9e49c Tracing to determine why the model doesn't load
Bug: 142514365
Change-Id: I30ecaec5a5d0868db10157c61a2a8d7dd12872ca
2019-10-14 18:39:10 -07:00
Andy Wickham 2dd6bea5e6 [automerger skipped] Merge "Fades out Assistant when entering Overview." into ub-launcher3-qt-future-dev
am: bdf1687f57 -s ours
am skip reason: change_id Ia53c2407c82725c776f27b0d6e80a34554b4a303 with SHA1 68e01dda46 is in history

Change-Id: If01f0ac2dd97e86d647520af80996372ee982371
2019-10-14 17:09:11 -07:00
Andy Wickham bdf1687f57 Merge "Fades out Assistant when entering Overview." into ub-launcher3-qt-future-dev 2019-10-14 23:46:32 +00:00
Andy Wickham fb578e4528 Fades out Assistant when entering Overview.
This makes the transition smoother, since
the Assistant goes away at the end of it.

Note this only applies to the transition
while an app other than Launcher is live.

Before: https://drive.google.com/open?id=18SOWTtTUzt19TReAYnofQLIShJ2I-odP
After: https://drive.google.com/open?id=1hqsikXSlCnSvNg0ZQYHxP-OIbS5yt9aW

Bug: 136282913
Change-Id: Ia53c2407c82725c776f27b0d6e80a34554b4a303
Merged-In: Ia53c2407c82725c776f27b0d6e80a34554b4a303
Tested: Manually
2019-10-14 16:04:33 -07:00
Pinyao Ting b9f25e631b include error log to debug the issue custom shortcut not working
Bug: 141568904
Change-Id: I7e6b9aa4c3e1314aee18cbea81efa881b574923c
2019-10-14 15:55:21 -07:00
TreeHugger Robot 6a3a09940f Merge "Fades out Assistant when entering Overview." into ub-launcher3-master 2019-10-14 22:43:26 +00:00
Andy Wickham 68e01dda46 Fades out Assistant when entering Overview.
This makes the transition smoother, since
the Assistant goes away at the end of it.

Note this only applies to the transition
while an app other than Launcher is live.

Before: https://drive.google.com/open?id=18SOWTtTUzt19TReAYnofQLIShJ2I-odP
After: https://drive.google.com/open?id=1hqsikXSlCnSvNg0ZQYHxP-OIbS5yt9aW

Bug: 136282913
Change-Id: Ia53c2407c82725c776f27b0d6e80a34554b4a303
Tested: Manually
2019-10-14 15:33:59 -07:00
TreeHugger Robot 6c12641bee Merge "Unifying various tracing calls" into ub-launcher3-master 2019-10-14 22:29:59 +00:00
Sunny Goyal 17c72fbb60 Unifying various tracing calls
Change-Id: Iedf6662ad1d7281b850bdc43b3a1e373ce535ac6
2019-10-14 14:23:19 -07:00