Commit Graph

3831 Commits

Author SHA1 Message Date
Tony Wickham 61fa23ab3a Don't reset GestureState when touching outside of swipe region
We were setting mGestureState = DEFAULT_STATE when touching outside
of the swipe region. Instead, we should only set mGestureState when
starting a new gesture, and only set it to DEFAULT_STATE on reset.

This also makes it clearer that mGestureState always refers to the
current gesture state, rather than sometimes being the current
gesture and sometimes being the previous gesture depending on
where it was used. Now previousGestureState is passed when needed.

Bug: 159494933
Change-Id: Ib62278b7c591ca4c6b99b26e058a34772e6cec2a
2020-06-20 12:04:12 -05:00
Tony Wickham e19b065c7c Merge "Remove progress != mFullscreenProgress optimization" into ub-launcher3-rvc-dev 2020-06-19 18:45:44 +00:00
Zak Cohen aef8b86b4a Image actions - fix uri permissions.
Feedback wasn't working, also Share wasn't showing its preview.

Bug: 159122067
Test: built and run locally
Change-Id: Iccea012a8fc0009a6a980f6233f42c4e7619f4ec
2020-06-19 18:02:44 +00:00
Tony Wickham 6a8ba169f2 Remove progress != mFullscreenProgress optimization
Sometimes other methods modify things like icon scale that setting
the fullscreen progress should override.

Test: open Calculator, open Clock, quick switch to Calculator and
ensure its task icon is not showing

Bug: 157105795
Change-Id: Iaed3e42f540fdff3648e9db7e6d7dc0b0d0a75df
2020-06-19 12:20:38 -05:00
Vadim Tryshev 84aaecca64 Merge "Removing debug requests from non-debug test info handlers" into ub-launcher3-rvc-dev 2020-06-19 16:37:41 +00:00
TreeHugger Robot a5e45ad485 Merge "Fixing jump when swiping up in landscape and in waterfall cutout" into ub-launcher3-rvc-dev 2020-06-19 07:17:02 +00:00
Tony Wickham f13a51c4b8 Merge "Inline TaskView#resetVisualProperties() into RecentsView" into ub-launcher3-rvc-dev 2020-06-19 05:26:32 +00:00
TreeHugger Robot 5c33e250fc Merge "Follow up for ag/11916646" into ub-launcher3-rvc-dev 2020-06-19 01:42:09 +00:00
TreeHugger Robot 92b0b1d0a1 Merge "Add spring to workspace scale when going from Hint state to Normal state." into ub-launcher3-rvc-dev 2020-06-19 01:28:25 +00:00
Tony Wickham d2fffa6ea5 Inline TaskView#resetVisualProperties() into RecentsView
- This was only used in RecentsView#resetTaskVisuals() anyway
- Previously resetVisualProperties() just called resetViewTransforms()
  plus setFullscreenProgress(0) and setModalness(0)
- The latter 2, specificially setFullscreenProgress(0) led to problems
  such as the bug below. Instead, we should reset to the current
  mFullscreenProgress and mTaskModalness.

Bug: task view sometimes shifted up during quick switch
Steps:
- Do the quick switch gesture very quickly
- At the start of the gesture, we call getTasks(), which calls
  applyLoadPlan() asynchronously
- applyLoadPlan() calls resetTaskVisuals(), so if this happened
  after the gesture ended, we would setFullscreenProgress(0) on all
  the task views, hence the upwards shift (if the gesture was still in
  progress, it would reapply the real fullscreen progress)

Fixes: 157105795
Change-Id: Idb9d91ff89701d726838b47f955d4300f5ef13bd
2020-06-18 20:25:34 -05:00
Samuel Fufa 1d08cc681c Follow up for ag/11916646
- Fixes launcher breakage

Bug: 159170242
Change-Id: Ib21bfee8d5f63d31a8807ad87ac47d600fb62e7a
2020-06-18 17:57:39 -07:00
Jon Miranda 271638574f Add spring to workspace scale when going from Hint state to Normal state.
Bug: 151768994
Change-Id: If03d39e5ef6319355a7691d60fc0152de2fc3cec
2020-06-18 17:53:07 -07:00
Samuel Fufa a529cd0f5f Merge "Allow Users to migrate their hotseat when returning from AiAi" into ub-launcher3-rvc-dev 2020-06-19 00:51:18 +00:00
Samuel Fufa d25a112b0e Allow Users to migrate their hotseat when returning from AiAi
- If a user has mostly predicted hotseat, show a snack bar. otherwise, show migration option.
- Guard onboarding activity with permission `com.google.android.apps.nexuslauncher.permission.HOTSEAT_EDU`

Bug: 158569583
Test: Manual
Change-Id: Id0c1c812233fcf288a2f49848720199dedd2015d
2020-06-18 16:38:58 -07:00
TreeHugger Robot c471a9a6bb Merge "Show a snackbar on predicted icon longpress" into ub-launcher3-rvc-dev 2020-06-18 23:34:58 +00:00
thiruram ffb55ddece Deprecates LAUNCHER_ALL_APPS_RANKED event.
LauncherUiChanged.rank field is repurposed to store all apps rank.

Change-Id: Iabad98312589d8f53b6547433540f3ec9dff0b3f
2020-06-18 15:08:16 -07:00
TreeHugger Robot 8e9405d7cd Merge "Fix bug where All Apps Edu gets closed via user input before animation ends." into ub-launcher3-rvc-dev 2020-06-18 21:20:36 +00:00
TreeHugger Robot d4de6d4bba Merge "Avoid hotseat edu button overlapping" into ub-launcher3-rvc-dev 2020-06-18 21:06:44 +00:00
TreeHugger Robot 3b80398889 Merge "Add flag Intent.FLAG_ACTIVITY_NEW_TASK when launching suggestion settings" into ub-launcher3-rvc-dev 2020-06-18 20:48:52 +00:00
Jon Miranda 1bbd2831f3 Fix bug where All Apps Edu gets closed via user input before animation ends.
Also fixes bug where user continuously swipes to hint view causes count
to increase more than the max count which prevents all apps edu from showing.

Bug: 151768994
Change-Id: I3186398d441e723a2cfb6e396b03944502a65cf5
2020-06-18 13:40:33 -07:00
Samuel Fufa 9058e305e5 Avoid hotseat edu button overlapping
Screenshot: https://screenshot.googleplex.com/cCNn6hdrqu1
Bug: 158194467
Change-Id: I465ab73be2079f20994b3f2bbe57f64e46d05777
2020-06-18 13:32:17 -07:00
Samuel Fufa c376a1de2c Add flag Intent.FLAG_ACTIVITY_NEW_TASK when launching suggestion settings
Bug: 158604370
Test: Manual
Change-Id: I01e313d29cbc9b7ea2413547d9a7b4940d126ce8
2020-06-18 13:13:45 -07:00
Samuel Fufa 44c1b5e03d Show a snackbar on predicted icon longpress
The first time a user long presses a predicted icon, suppress drag/drop and show a snackbar about app predictions.

Bug: 159170242
Test: Manual
Change-Id: I5f853a9774b38ad9fad22ff55feff417a801f52c
2020-06-18 10:57:32 -07:00
TreeHugger Robot fcc4a2d83f Merge "Avoid Crash when longpressing disabled predicted item" into ub-launcher3-rvc-dev 2020-06-18 17:45:57 +00:00
Jonathan Miranda 42dd4f4afd Merge "Use screenSpaceBounds to position the target window for recents mw animation." into ub-launcher3-rvc-dev 2020-06-18 17:03:18 +00:00
Sunny Goyal b64fc6c26f Fixing jump when swiping up in landscape and in waterfall cutout
> Adding tests for TaskViewSimulator to ensure proper calculations
> Disabling orientation listener while user is interacting with quickstep

Bug: 158781568
Bug: 156891776
Change-Id: I299c3b1243ac0dbf28faee1b8566c77ea3954e33
2020-06-18 00:29:00 -07:00
Hyunyoung Song 714659f6d0 Add LAUNCHER_WORKSPACE_SNAPSHOT event_id
Bug: 159210161
Change-Id: Ie8e843ee10bf4ab0761232a3e61eb28e487666ab
2020-06-17 22:39:36 -07:00
TreeHugger Robot adb6352bac Merge "Don't rely on nav mode change listener for oriented state" into ub-launcher3-rvc-dev 2020-06-18 04:44:31 +00:00
TreeHugger Robot 9c126682d7 Merge "Snapshot logging only use cloned model thread folder contents Bug: 158826147" into ub-launcher3-rvc-dev 2020-06-18 04:34:56 +00:00
Hyunyoung Song 398c42fe6b Snapshot logging only use cloned model thread folder contents
Bug: 158826147

Change-Id: I9aea9fbc706b0dffa3f6abeaac663b072d62ad58
2020-06-17 20:59:45 -07:00
TreeHugger Robot 27ed32ac7e Merge "Updated recents oriented state on split screen" into ub-launcher3-rvc-dev 2020-06-18 02:35:16 +00:00
Jon Miranda 2a8093e5fd Use screenSpaceBounds to position the target window for recents mw animation.
Verified window is moving as expected using winscope.

Note: Position is off when launching non-center task.

Bug: 159171509
Change-Id: Ib11ed7df9a877348d76543279203f9bfc25f7829
2020-06-17 17:55:26 -07:00
Andy Wickham 4a85948843 Merge "Removes Sandbox from launcher task." into ub-launcher3-rvc-dev 2020-06-17 22:56:44 +00:00
TreeHugger Robot c0c0991231 Merge "Disabling OverviewActions when rotated." into ub-launcher3-rvc-dev 2020-06-17 20:40:56 +00:00
TreeHugger Robot d6e3775726 Merge "Fixing broken tests on 2 and 3 button devices." into ub-launcher3-rvc-dev 2020-06-17 20:38:25 +00:00
Sreyas f91c1d0ef1 Disabling OverviewActions when rotated.
Bug: 157272300
Bug: 159135247
Change-Id: I9c9eeb49b7d18c1c81a830b7a35113070e7ac793
2020-06-17 12:37:14 -07:00
TreeHugger Robot 1f325ab01e Merge "Don't reset RecentsView in onIdpChanged()" into ub-launcher3-rvc-dev 2020-06-17 18:15:39 +00:00
TreeHugger Robot 349194569f Merge "Replaces StatsLogManager.log with StatsLogManager.logger()" into ub-launcher3-rvc-dev 2020-06-17 18:11:32 +00:00
Becky Qiu ff6bc2ab5f [Overview Actions] For in-place landscape, add select only when aiai works.
When display orientation is not the same as device orientation, aiai won't work for select mode highlight. So we should only show the select button in task menu for in-place landscape when the display rotation is the same as the device rotation which is portrait.

Screenshot would be in the task menu for in-place landscape all the time.

Test: demo video: https://drive.google.com/file/d/1OQrjww2lFTTsthz4dB3BSa-jw943KLWp/view?usp=sharing
Change-Id: I58b6f6da234ea36eef0af5bb966c33ebda3625b8
2020-06-17 17:39:56 +00:00
thiruram c6a38ba5d8 Replaces StatsLogManager.log with StatsLogManager.logger()
Bug: 159170445
Change-Id: Ice6c8a9ae30d8e6b3843bfe42926053849bf9fe0
2020-06-17 17:32:54 +00:00
TreeHugger Robot 4de12a2424 Merge "Fixing OAV buttons not working and removing logs." into ub-launcher3-rvc-dev 2020-06-17 17:26:14 +00:00
vadimt d8e5660b13 Fixing broken tests on 2 and 3 button devices.
Bug: 143488140
Change-Id: I30886da129825b800984baa08742ac4dfcf4a599
2020-06-17 10:19:51 -07:00
thiruram d8405a63d2 Replace StatsLogManager with builder pattern.
Follow up CLs will remove the deprecating log methods and update their references.

Bug: 159170445
Change-Id: I5dfd30209eeba561df1b528a6305ca5923ba42a2
2020-06-17 08:46:43 -07:00
Vinit Nayak 8401308c14 Don't rely on nav mode change listener for oriented state
When nav mode state changes, launcher gets
re-instantiated, which means the listener for
nav mode changes often gets destroyed before it
even gets fired. Rely on the initial setup to
set the correct nav mode.

The other bug with relying
on the initial value was that we were initially
getting the old nav mode when initFlags was called
from the ctor, but then the correct updated nav
mode when called from initListeners(). The first
call would enable rotation but then the second
call wasn't disabling it. Now we toggled based on
nav mode each time.

Another bug fix in RecentsView was not calling
update when launcher rotation is enabled. That was
added when previously we were using HOME_ROTATED
and PORTRAIT as different PagedViewHandlers to
differentiate when launcher rotation was enabled.
HOME_ROTATED is now removed, so we no longer need
to change the internal state of RecentsOrientedState.

Fixes: 159176222
Change-Id: I2a37880ce3cf835ca5b9b165ce3840537facee6c
2020-06-16 19:41:16 -07:00
Samuel Fufa e8c0f83fb2 Avoid Crash when longpressing disabled predicted item
If a view does not handle its long press and return true, View.java calls getParent().showContextMenuForChild(this). However, in Hybrid hotseat case, predicted icons are removed from the hotseat when user long presses an icon. This will result in getParent() returning null.

Bug: 159064799
Change-Id: I80d8f27cbc20b94b0381e767584a1f6854d17e2c
2020-06-16 16:28:37 -07:00
TreeHugger Robot cbe1251ce7 Merge "[Overview Actions] Disable swiping on modal recentsView for talkback." into ub-launcher3-rvc-dev 2020-06-16 23:23:12 +00:00
TreeHugger Robot ded59ac331 Merge "Increase Predicted app icon sing size" into ub-launcher3-rvc-dev 2020-06-16 23:18:45 +00:00
Becky Qiu 8798440600 [Overview Actions] Disable swiping on modal recentsView for talkback.
When it is select mode, disabling swiping on the parent container for a11y to avoid exiting select mode UI.
This will only disable swiping and talkback on other tasks and the cleanall button, but will keep the modal task container app info and content description, also keep the action buttons description working.

Test: local
Bug: 155947513
Change-Id: I6d513c7eb3e7deeaa233550749f8be0d95e56daf
2020-06-16 15:47:20 -07:00
Tony Wickham f2b8c927a9 Merge "Fix qsb when flinging to home during gesture to overview from home" into ub-launcher3-rvc-dev 2020-06-16 22:12:28 +00:00
TreeHugger Robot 89e39a6dfa Merge "Create hotseat predictor onCreate" into ub-launcher3-rvc-dev 2020-06-16 22:11:56 +00:00