Commit Graph

3449 Commits

Author SHA1 Message Date
Bill Yi
77fe1a7c90 Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: I2a006876dfa9ef67f47ff5e29aa9e2bcd4ef328d
2020-05-05 22:50:24 -07:00
Zak Cohen
224ef0efe7 Merge "OverviewActions - make button ripple workspace text color." into ub-launcher3-rvc-dev 2020-05-05 19:11:21 +00:00
Tony Wickham
c0535b23f6 Merge "Fix continueComputingRecentsScrollIfNecessary() running infinitely" into ub-launcher3-rvc-dev 2020-05-05 17:14:03 +00:00
Sunny Goyal
cf19a92cde Merge "Not caching TaskView during quickswitch" into ub-launcher3-rvc-dev 2020-05-05 17:05:20 +00:00
Tony Wickham
49b57e955c Fix continueComputingRecentsScrollIfNecessary() running infinitely
When continuing a gesture during quick switch, we cancel the
previous animation but don't invalidate it (since the gesture
isn't fully finished), and the new gesture handler calls
mRecentsView.setOnPageTransitionEndCallback(), so the previous
handler will never get STATE_RECENTS_SCROLLING_FINISHED. Thus,
continueComputingRecentsScrollIfNecessary() will never end.

To fix this, also check !mCanceled, since that is set when
continuing the gesture. Also use postOnAnimation() instead of
post() since that has better guarantees that the next
computation will wait for the next animation frame, rather
than whenever the message queue is available, which might
happen too frequently.

Test: quick switch from A to B and back to A before settling
on B, ensure we stop calling computeScroll().

Bug: 153589287
Change-Id: I6b4389ef2cf5a818438c7ae36d8807b3e41c8501
2020-05-05 02:32:39 -05:00
Winson Chung
7ad937c78d Merge "Account for various launcher states when setting back button alpha" into ub-launcher3-rvc-dev 2020-05-05 04:37:38 +00:00
TreeHugger Robot
43e789ff9b Merge "Fixing max-zoom-scale not taking into account the the fullScreen scale" into ub-launcher3-rvc-dev 2020-05-05 02:01:00 +00:00
Sunny Goyal
a88ca7643a Not caching TaskView during quickswitch
RecentsList update case cause the TaskView to get unparented

Bug: 155568411
Change-Id: Ia05de9658ba2154f73311679a359a2eefeb73aec
2020-05-04 18:30:02 -07:00
Sunny Goyal
29e7a58f1a Fixing max-zoom-scale not taking into account the the fullScreen scale
Also fixing the issue where display info is is not correctly initialized

Bug: 155257023
Bug: 155682580
Change-Id: Ib2cc981c1900f3d14f158f4dbb60ae77311f339b
2020-05-04 18:11:15 -07:00
Becky Qiu
8f3b7e3249 [Overview Actions] Expose task corner radius to use in TaskOverlay.
Test: local
Bug: 153478940

Change-Id: I03d410edb5a55ce5eda5c703752daf0ef5d04500
2020-05-04 17:31:40 -07:00
Zak Cohen
b4ee058955 OverviewActions - make button ripple workspace text color.
Uses a theme to set the control highlight color.

Test: local on dark and light wallpaper
Change-Id: Iddb668fcbd3ab760faabd9c296274315d63e044f
2020-05-04 17:17:52 -07:00
TreeHugger Robot
f9ec6f670c Merge "Decouple feature flag and predictions" into ub-launcher3-rvc-dev 2020-05-04 23:12:37 +00:00
Samuel Fufa
49d0f64a9d Decouple feature flag and predictions
- Always default to true for ENABLE_HYBRID_HOTSEAT
- Allow launcher to show predictions anytime regardless of notification and on-boarding.
- Remove past beta specific plans
- Migrate if first screen can accommodate hotseat items otherwise show tip

Bug: 142753423
Test: Manual
Change-Id: I142cd95d779964822da07a96e5884a0c82813742
2020-05-04 15:20:39 -07:00
TreeHugger Robot
0dbbd8951d Merge "Use rotation based on PagedOrientationHandler instead of touch" into ub-launcher3-rvc-dev 2020-05-04 20:21:50 +00:00
Vinit Nayak
bb55f9e982 Use rotation based on PagedOrientationHandler instead of touch
Fixes: 154928106
Test: Tested overview w/ and w/o
home rotation enabled.

Change-Id: Ib7e91e51b2181824e5520ad69965ed3379302c27
2020-05-04 11:58:11 -07:00
Vinit Nayak
d079aed058 Revert drag factor calculation to pre-vertical overview
Fixes: 149609070
Test: Swiped up in landscape past
where thumbnail would be. Scaled accordingly.

Change-Id: Ib8e64af2d7a9e4ce517d5f56300d50b659217b71
2020-05-03 22:38:20 -07:00
TreeHugger Robot
4544af1996 Merge "[Overview Actions] Disable touching on the empty area when recent is modal." into ub-launcher3-rvc-dev 2020-05-01 20:43:03 +00:00
TreeHugger Robot
c6d8838c33 Merge "Sets icon invisible when alpha 0 (Cannot be tapped while TaskView modal)" into ub-launcher3-rvc-dev 2020-05-01 20:27:40 +00:00
Becky Qiu
2d9f8284ca [Overview Actions] Disable touching on the empty area when recent is modal.
Originally touching on the empty space would bring user back to homescreen. We will disable this for select mode.

Test: local
Bug: 154531538
Change-Id: Iee3780755fc2c32682ea0fa039ca5822a95fce2c
2020-05-01 12:51:07 -07:00
TreeHugger Robot
7a87f953a8 Merge changes from topic "widget-logging" into ub-launcher3-rvc-dev
* changes:
  Fixes missing components info when logging Widget item.
  Implement LAUNCHER_ITEM_DRAG_STARTED event.
2020-05-01 07:54:03 +00:00
TreeHugger Robot
e041a062a1 Merge "Fixing RecentsView translation is not reset on app-launch animation" into ub-launcher3-rvc-dev 2020-05-01 07:19:32 +00:00
Winson Chung
2a00f81327 Account for various launcher states when setting back button alpha
- Previously we only check for the flag which is always true in the
  normal launcher state, so if the animation starts, we could end up
  writing the back alpha value without accounting for window focus or
  any other states that launcher is in that affects back button
  visibility

Bug: 155129739
Test: Open -1 article and hit back
Change-Id: I42d27a192b23f394f8565a6893ce092603e31654
2020-04-30 23:03:52 -07:00
Sunny Goyal
9ae484a6ba Fixing RecentsView translation is not reset on app-launch animation
Bug: 155166631
Change-Id: I25b9783fb1ae0d1e3d477a9d9f5aedf60c3c575d
2020-04-30 17:05:23 -07:00
Winson Chung
bd49cea1ca Merge "Bound the thumbnail insets to the launcher insets" into ub-launcher3-rvc-dev 2020-04-30 22:48:44 +00:00
Winson Chung
7f534cf2a8 Merge "Fix issue with quickswitch not updating system bar flags" into ub-launcher3-rvc-dev 2020-04-30 22:48:43 +00:00
thiruram
f81e8b002a Implement LAUNCHER_ITEM_DRAG_STARTED event.
* Fixes null component issue when ItemInfo object copiedFrom.
* Fixes missing container when item is dragged from hybrid hotseat.

Sample Logs:
2020-04-30 14:09:45.499 30472-30472/com.google.android.apps.nexuslauncher D/StatsLogManager: LAUNCHER_ITEM_DRAG_STARTED
    # com.android.launcher3.logger.LauncherAtom$ItemInfo@260f31f8
    application {
      component_name: "com.android.chrome/com.google.android.apps.chrome.Main"
      package_name: "com.android.chrome"
    }
    container_info {
      workspace {
        grid_x: 2
        grid_y: 2
        page_index: 2
      }
    }
    is_work: false

2020-04-30 14:23:15.230 31320-31320/com.google.android.apps.nexuslauncher D/StatsLogManager: LAUNCHER_ITEM_DRAG_STARTED
    # com.android.launcher3.logger.LauncherAtom$ItemInfo@608f101
    application {
      component_name: "com.google.android.gm/.ConversationListActivityGmail"
      package_name: "com.google.android.gm"
    }
    container_info {
      hotseat {
        index: 1
      }
    }
    is_work: false

Bug: 152978018

Change-Id: I3d3ce213fd2fc6eb5ffb239e048ceb7c0fa88b53
2020-04-30 15:03:43 -07:00
Winson Chung
a7ac7192c3 Fix issue with quickswitch not updating system bar flags
- Separate the calls to minimize split and to update the flags (we only
  want to minimize in split when swiping up, but we want to update the
  flags when quickswitching as well)

Bug: 155410195
Change-Id: I56308cc0fbaa8a855383012738f129671d72feff
2020-04-30 13:58:22 -07:00
Zak Cohen
7f48b0aa34 Overview - position the modal task in the correct place.
video of new behavoir
https://drive.google.com/a/google.com/file/d/1vFTtjjpwamj5H7dhmB1-5JSFS6fv6vMw/view?usp=sharing


Test: local
Bug: 155205932
Change-Id: I7fe79c848af92013587de32a777645cc472ae910
2020-04-30 18:34:46 +00:00
Winson Chung
895f57f610 Bound the thumbnail insets to the launcher insets
- We currently end up using the launcher insets when swiping
  up into overview due to how we scale the target rect to
  the source bounds, but the thumbnail crop is calculated
  only from the task thumbnail insets.  For apps that are
  letterboxed, this results in a jump after the transition
  completes when we crop too far (including the letterbox)
  and end up showing the task background.

  For now, since we are just cropping by the launcher
  insets, we can also take the min of those and the
  thumbnail insets to calculate the thumbnail view crop.

Bug: 151770104
Test: Test swiping up with a normal app, a letterboxed app
      (like authenticator), an app that has no insets (like
Change-Id: I08342b19c54f9078be4613fca9024e2558403bc9
2020-04-30 11:30:05 -07:00
Lucas Dupin
20051e22e5 Merge "Do not blur if all apps is fully visible" into ub-launcher3-rvc-dev 2020-04-30 17:11:53 +00:00
Sunny Goyal
8f96546e79 Generalizing LauncherState definition so that it can be used in RecentsActivity
> Removing 'Launcher' as parameter from state methods called by StateManager
> Converting state properties to methods for easier abstraction
> Moving state handling drom state definition to activity class

Change-Id: I997627df606a7e0bb3bf32688d045a942a47fc94
2020-04-30 01:01:51 -07:00
TreeHugger Robot
2d60935e1c Merge "Various multi-window fixes" into ub-launcher3-rvc-dev 2020-04-29 23:43:57 +00:00
TreeHugger Robot
875f381dbb Merge "Dump RecentsOrientationState for bug reports" into ub-launcher3-rvc-dev 2020-04-29 19:56:54 +00:00
Vinit Nayak
3aed7aeb67 Merge "Use appropriate start padding for clear all button" into ub-launcher3-rvc-dev 2020-04-29 19:31:38 +00:00
Vinit Nayak
a5877307d1 Dump RecentsOrientationState for bug reports
Bug: 154951045
Test: New output shows up when running
"adb shell dumpsys activity
com.google.android.apps.nexuslauncher.NexusLauncherActivity
[--all]"

Change-Id: I5e9ace7d370eb0e9d278d7d9f7f9156674ca1a50
2020-04-29 12:19:49 -07:00
Sunny Goyal
0addbf0512 Various multi-window fixes
> Fixing scale up calculator for swipe-down
> Offsetting pivot so that the preview is aligned to bottom-right
> Allowing insets to be available in multi-window mode as well
> Offsetting taskViewSimulator appropriately in multi-window mode

Change-Id: I7da4c145efca72ef219a5ffcaf23d726812df270
2020-04-29 11:50:33 -07:00
Lucas Dupin
264cb2ff68 Do not blur if all apps is fully visible
Fixes: 155093795
Fixes: 155203546
Test: manual
Change-Id: I30f4c027e5107a199791e908acbb7ffed94e6a77
2020-04-29 17:49:02 +00:00
Jonathan Miranda
0d9a9b9336 Merge "Fix floating icon view positioning when in multiwindow mode." into ub-launcher3-rvc-dev 2020-04-29 17:26:33 +00:00
Jonathan Miranda
7a79edd48a Merge "Ensure final values are set when StaggeredWorkspaceAnim is cancelled/ended." into ub-launcher3-rvc-dev 2020-04-29 16:37:50 +00:00
Jon Miranda
db02b11340 Ensure final values are set when StaggeredWorkspaceAnim is cancelled/ended.
Was able to repo the bug reliably when calling cancel() and
end() immediately after starting the StaggeredWorkspaceAnim.

Bug: 153584267
Change-Id: I954d38ad69e72a83535f4dd1ec21dba0f61a3cfb
2020-04-29 15:51:10 +00:00
Jon Miranda
f6225830d5 Fix floating icon view positioning when in multiwindow mode.
The rect we passed in was in screen space to match the window, but needs to be
be local to launcher.

Also updated code/comments to make it more readable.

Note that the bounds of the targets being off is a separate issue b/153581126

Bug: 135195169
Change-Id: I4a8c0aa2f504bdf69342a927725cd440fb324a36
2020-04-28 21:29:51 -07:00
Becky Qiu
1f31915b5b [Overview Actions] Fix the animation duration issue.
Test: local
Bug: 155205932

Change-Id: Ic64762b0c7647a5c38d182c24a8cba4a354a9a83
2020-04-28 17:24:48 -07:00
Vinit Nayak
e8269b3944 Merge "Enable edge back gesture on app launch" into ub-launcher3-rvc-dev 2020-04-29 00:18:22 +00:00
Sreyas
43cf2f7925 Sets icon invisible when alpha 0 (Cannot be tapped while TaskView modal)
Bug: 155177299
Change-Id: Ibedbc271837441915580577986c10fa3f0de0ae6
2020-04-28 17:05:16 -07:00
Vinit Nayak
3f3cc3e96e Enable edge back gesture on app launch
We don't clear state on EdgeBackGestureHandler
when we go to Recents or Home.
A more robust solution is in the works with
WM team and will probably be built on top of this.
Needs ag/11273364 to work.

Bug: 154580671
Test: Launch app directly in landscape,
should be able to swipe home on first try.

Change-Id: Ia4c685e16645d0237f278a611f6c61f252f3b79c
2020-04-28 13:51:43 -07:00
Vinit Nayak
48ea9e9502 Use appropriate start padding for clear all button
This still shows up a bit strange with
notched phones because we are using
RecentsView padding to give ClearAll the
right amount of spacing. However, we're only
adding padding to the left and right and not
the top/bottom.
That's captured here: b/154436527

Fixes: 150389833
Test: Tested landscape/portrait/seascape
launcher, w/ RTL as well

Change-Id: I49defd58048e609a1f7a821abb97374bcbb94b9f
2020-04-27 22:44:05 -07:00
Zak Cohen
a39544d562 OverviewActions - Use launcher state to track modal state.
Test:local

Change-Id: I44e25b95095b9a7aac4b4172c9c91fbfbf4d9ec7
2020-04-27 16:29:44 -07:00
Sreyas Rangaraju
2f04a9d271 Merge "Assistive chip: Adding background scrim for chip." into ub-launcher3-rvc-dev 2020-04-27 21:43:49 +00:00
Vinit Nayak
b219eeab48 Merge "Revert "Hide shelf in 2-Button Landscape"" into ub-launcher3-rvc-dev 2020-04-27 21:24:53 +00:00
Vinit Nayak
48b28027c0 Revert "Hide shelf in 2-Button Landscape"
This reverts commit 9b5795a579.

Reason for revert: b/155090034

Change-Id: If7decd54965a680d50e4474fb279ebe0002441bb
2020-04-27 20:48:49 +00:00