Commit Graph

261 Commits

Author SHA1 Message Date
Fengjiang Li
cb640da2bb [Predictive Back] Widget to home polish: show extra rows at bottom during animation
1. setClipChildren(false) for WidgetFullSheet and content view during animation
2. setClipToOutline(true) for WidgetsRecyclerView and provide ViewOutlineProvider to expand bottom by 5% of height
3. Override calculateExtraLayoutSpace() for ScrollableLayoutManager
4. Manually modify AbstractSlideInView#mContent's background drawable during scale animation

bug: b/260956481
Test: manual

Change-Id: Ic391639de887cf4a70bc4965dc0b1fd9bc12dd2c
2023-02-15 15:33:29 -08:00
Brandon Dayauon
f4437f742e Merge "Implement diff haptics going into all apps" into tm-qpr-dev 2023-02-09 00:45:24 +00:00
Brandon Dayauon
12c193e6c5 Implement diff haptics going into all apps
Notes:
* the reason why 0.6 -> 1 never happened was because of AllAppsSwipeController where
it had a clampToProgress. By changing lowerbound to 0 the progress actually shows fully 0->1

- composed the haptics in the constructor
- added new listener class in AATransitionController

Added featureflag

bug: 233751149
test: Manually - presubmit, ran “make -j7 Launcher3” from master branch  photo: https://screenshot.googleplex.com/8r5FZh6buzkQMjk
Change-Id: I5e1a24170fdbfdd35b8d8f24af0ec5e8586641a2
2023-02-07 11:36:42 -08:00
Fengjiang Li
d080b98b76 [Predictive Back] Revert all apps scale when exiting from search
Bug: b/267522879
Test: manual, see before after videos in bug
Change-Id: I7b14739fee23a22920d71841fc1c3c12b34a3d0c
2023-02-03 10:28:46 -08:00
Fengjiang Li
201848bff3 [Predictive Back] Remove animation on cancel for all apps to home
Framework has supported (ag/20876922) sending back progress on cancel. So no need to re-do the work on app side.

Bug: b/267664388
Test: manual, this CL has no visual change
Change-Id: I47c751d12a9b2c602ac6f3028665b996990fbd7e
2023-02-02 13:06:18 -08:00
Sunny Goyal
7450874e28 Fixing while navication bar in all-apps in 3-button mode.
Launcher was not accounting for all-apps-nav-bar-scrim when
computing sysui-flags

Bug: 194486821
Test: Verified on device
Change-Id: I692977fba5999bbab9737bac4b27c15c2912e6af
2023-01-18 15:36:28 -08:00
Fengjiang Li
3774824cea Predictive swipe: show extra app icons at bottom of All Apps's RecyclerViews
The maximum center scale of All Apps to Home is 90%. It means we should add 5% height to All Apps's RecyclerView to render extra app icons.

Test: manual
bug: b/264906511
Change-Id: I2e970580810220e25d7fc3a86c19abaf87ba2c6e
2023-01-13 15:55:17 -08:00
Fengjiang Li
e884c2c79f Support predictive back from all apps to home
bug: b/238475505
Test: manual

Change-Id: Ibf4f7f41a26b044a538e2cd566d2297ed88f1b99
2023-01-11 22:55:28 +00:00
Luca Zuccarini
81f5cee2cb Fix IME sync flicker with 3-button navigation.
With keyboard sync, the dismissal is handled by the animator. Calling
hideKeyboard() on top of that causes the two signals to conflict with
each other, resulting in the visible flicker and extra delayed hiding
animation.

Fixes: 251185052
Test: manual, see videos in the bug

Change-Id: Ic12ad304ef9e4b6a51279ce18d6c09ba93bd59be
2022-11-08 17:26:46 +00:00
Alex Chau
b3ab6f5014 Merge "Update pullback animation to use reset FloatProperty for non-active state" into tm-qpr-dev 2022-10-27 12:38:15 +00:00
Becky Qiu
6a2dd438da Merge "[Toast] Use a BaseSearchConfig for launcher3 to read allapps device config." into tm-qpr-dev 2022-10-26 20:33:05 +00:00
Alex Chau
ee6a99b798 Update pullback animation to use reset FloatProperty for non-active state
Fix: 246733229
Test: Change display between phone and tablet, use home gesture in AllApps
Change-Id: I20bdef9dcf9a60475f482261501ad39106b8b107
2022-10-26 16:03:15 +01:00
Sunny Goyal
d859060860 Merging MultiValueAlpha with MultiPropertyFactory
Bug: 246644619
Test: Presubmi
Change-Id: Id5abc5f3169544656f1139ae17ca59e34ac65dac
2022-10-24 14:38:18 -07:00
Becky Qiu
4ed3dfc28a [Toast] Use a BaseSearchConfig for launcher3 to read allapps device config.
Bug: 251387263
Test: local
Change-Id: I92c52caff377e627305bc7999ae0205fe6269968
2022-10-21 17:11:38 -07:00
Luca Zuccarini
bda972b2c9 [Toast] Switch to using device config to control keyboard sync.
Bug: 234812580
Test: followed the existing pattern and tested by manually setting and
unsetting the flag through command line - `adb shell device_config put
launcher enable_web_suggest_on_default_browser <true|false>`

Change-Id: Idd479e93b628b78fdf55d826c56f69c5cfdaf46e
2022-10-06 10:26:42 +00:00
Anushree Ganjam
2043d36b86 HideKeyboard when animations are disabled.
ValueAnimator.areAnimatorsEnabled() returns false

- When talkback is turned on.
- when "Settings -> Accessibility -> remove animations" are turned on.

In launcher code, when launcherstate goes from ALLAPPS -> NORMAL, AllAppsTransitionController.setStateWithAnimation is called only when animations are enabled and this function hides keyboard as well.

However, when animations are disabled
AllAppsTransitionController.setState -> onProgressAnimationEnd() is called which is where we need to hide keyboard. But the condition "if (FeatureFlags.ENABLE_DEVICE_SEARCH.get()) return;" caused the keyboard to not hide instead just return from onProgressAnimationEnd().

See https://source.corp.google.com/android-internal/packages/apps/Launcher3/src/com/android/launcher3/statemanager/StateManager.java;l=221-235;rcl=08a9bcac1f8400b44356ad4da445de8d7f360578

Bug: 239610759
Test: Manual
Video : https://drive.google.com/drive/folders/1Tif2uf13dYxIgtDlELkE4SiRthr_w-dZ?resourcekey=0-7Po8nbQPxhsgLqeMJGgKIw&usp=sharing

Change-Id: Ice9a0f951435d2fc1594d09414f299ce0cff775c
2022-09-22 00:04:13 +00:00
Luca Zuccarini
3fe8d2c9fa Merge "Fix issue with keyboard disappearing too late." into tm-qpr-dev 2022-09-19 15:36:59 +00:00
Alex Chau
3d2c062567 Change wallpaper depth in widget picker
- Also changed widget picker open/close duration, refactored the values into DeviceProfile
- Generalized MultiAdditivePropertyFactory to accept aggregator as parameter

Bug: 240580498
Test: manual
Change-Id: I6886ca514593e404b8d7b0e8ed44f20ec2b77c73
2022-09-13 12:20:56 +08:00
Luca Zuccarini
ce03c9972b Fix issue with keyboard disappearing too late.
This seems to have been caused by a bad merge which removed the call
from outside the end listener. We reintroduce it for atomic animations
only, as for manual ones we want the keyboard to animate in sync with
All Apps (note that this is how it used to be, and doesn't depend on the
keyboard sync flag).

Fixes: 243632287
Fixes: 240116666
Test: manual
Change-Id: I9d226a4bd7cbde0692ae82b5a138b0d523fd5f25
2022-09-12 11:01:31 +00:00
Aurélien Pomini
687c6e415c Merge "Hide keyboard when transitioning from all-apps state to overview state." into tm-qpr-dev 2022-09-09 14:25:16 +00:00
Aurélien Pomini
192a014cde Hide keyboard when transitioning from all-apps state to overview state.
Sample video: http://shortn/_Jy0ynsszTd (tablet),
http://shortn/_BoBSuQGdMT (mobile phone)

Test: manual
Bug: b/240637768
Change-Id: I4c1e9f779f8c7dbe7acdb306c22d5b18965da163
2022-08-10 14:54:24 +00:00
Luca Zuccarini
c7114defc7 Update keyboard dismissal logic in the AllAppsTransitionController.
Dismissing the keyboard immediately interferes with the synchronized
keyboard animation. Instead, we wait until the end of the animation and
if it is successful (transition actually happened and wasn't
interrupted) we hide the keyboard. This call does nothing if the
keyboard was already hidden through the synchronized animation, and
hides it otherwise.

Bug: 234812580
Test: manual
Change-Id: Idabbc707dd0244bdf75316777e945624a8e8bdfc
2022-08-05 12:20:08 +00:00
Hyunyoung Song
026ddc4460 Merge "Fix testSearchDeadzoneForTablets failure" into tm-qpr-dev 2022-07-25 16:59:00 +00:00
hyunyoungs
4ba188aa5f Fix testSearchDeadzoneForTablets failure
Bug: 239868630
Bug: 240116666
Test: testSearchDeadzoneForTablets passes

Change-Id: I8b20cf56191058b6033ae929be6726a2c88825c8
2022-07-25 09:53:25 +00:00
hyunyoungs
eef16895a6 Move hideKeyboard call to end of the all apps transition controller animation
Bug: 236685775
Bug: 235951830

Test: manual
Change-Id: Iae808a82eb4a10a554aef1cb5d87fc806efb0279
2022-07-20 00:21:03 -07:00
Sunny Goyal
24b441051e Fixing wrong flags used by AllAppsController in SystemUiController
Bug: 236857339
Test: Verified the UI manually
Change-Id: I2773837932ed50a59ebc9d2810f9e7ee501b6f6b
2022-06-22 12:09:22 -07:00
Andy Wickham
2ba7797edb Moves Search results into a separate RV (take 2).
Bug: 206905515
Test: Manually verified b/230648542 did not resurface. Tested
on phone and tablet with and without work profile.

Change-Id: If724f635286b9dff2c64255f9ece3568a5cb4ea9
2022-05-24 17:10:24 -07:00
TreeHugger Robot
f1a4296cd0 Merge "Tune AllApps dismiss animation" into tm-dev 2022-05-03 11:23:46 +00:00
Schneider Victor-tulias
9b6babf839 Translate the 3 navigation buttons to/from their in-app position when animating to/from the -1 screen, all apps and widgets.
Bug: 221455508
Test: opened all apps, widgets, -1 screen, notifications shade and keyboard in various combinations and orders; locked screen, launched app, returned home with the back/home buttons, opened overview
Change-Id: Ia0b406aacf72b34bd6b7ff1c01278ab6895a7da4
Merged-In: Ia0b406aacf72b34bd6b7ff1c01278ab6895a7da4
(cherry picked from commit 9c1a452a1d)
2022-05-02 18:45:01 +00:00
Alex Chau
f39cc126bf Tune AllApps dismiss animation
- Avoid overriding interpolator in AllAppsTransitionController.setStateWithAnimation as it's no longer needed and it'll wrongly override interpolator for ANIM_ALL_APPS_FADE
- Override ANIM_ALL_APPS_FADE to FINAL_FRAME in QuickstepAtomicAnimationFactory for tap deadzone to dismiss animation, also added EMPHASIZED_ACCELERATE for the dismiss animation
- Tuned dismiss animation across form factors to 300ms

Fix: 220336617
Test: manual
Change-Id: I4b3e827b503dcb1dd39f0bd99d4c1dd5ffdba0f3
2022-04-29 20:31:26 +01:00
Anushree Ganjam
5cc7ff0990 Revert "Refactors Search results into separate RV for Toast."
This reverts commit 6729f0b950.

Reason for revert: This change caused b/230648542.

Please see https://b.corp.google.com/issues/230648542#comment5 for the video after reverting this change.

Bug: 206905515
Bug: 230648542

Change-Id: I85f063c56cad137c05b810204244bba7e8f94ee7
2022-04-28 01:37:49 +00:00
Andy Wickham
6729f0b950 Refactors Search results into separate RV for Toast.
This will help enable transitions between A-Z apps lists and
search results because both can be seen simultaneously and
manipulated independently.

Some high level items of the refactor:
 - SearchRecyclerView is added; logic that populated the main
   (personal) tab with search results was simply redirected to
   this RV instead.
 - BaseAllAppsContainerView added isSearching() method. Returns
   false, and ActivityAllAppsContainerView overrides (as search
   is handled there).
 - Renamed BaseRecyclerView to FastScrollRecyclerView to better
   describe what it does. SearchRecyclerView extends this, but
   returns false for supportsFastScrolling().
 - AlphabeticalAppsList#mAllAppsStore is now optional, so the
   Search RV doesn't need to store/listen to apps. Note this
   doesn't affect the predicted app row which is still updated
   if one of the predicted apps is uninstalled (I tested this).

Future work:
 - Determine why dispatchRestoreInstanceState is not called for
   BaseAllAppsContainerView. Save is called, e.g. on rotation.
   Effect of restore not called: rotating while searching goes
   back to A-Z list.
 - Keep suggested apps in Header while searching. Currently they
   are rendered in the SearchRV above search results, as before.
 - Potentially extract Personal/Work tabs to move independently of
   header.
 - AlphabeticalAppsList is a misleading name because it can also
   contains search results. However, things are pretty intertwined
   between that and BaseAllAppsAdapter (effectively a circular
   dependency), so I figured cleaning all that up was out of the
   immediate scope of this refactor, which is mainly meant to
   unblock transition work.

Bug: 206905515
Test: Manually checked for regressions, ran tests.
Change-Id: I4d3757c8a8f9b774956ca6be541dd4fcdad1de13
2022-04-24 17:36:48 -07:00
Alex Chau
e3b806366a Update pull back animation for tablet AllApps
- This is a follow-up of http://ag/17636490
- Introduced animation property specifically for pullback translation and alpha, which will invoke getRecyclerViewContainer directly on tablet, and invoke aggregate setter of appsView on phones
- Delay reset of pullback animation to after dismiss animation to avoid jump in value during state transition animation
- Introduced property factory for addictive properties similar to MultiScalePropertyFactory

Fix: 220345008
Test: manual on small and large screen
Change-Id: I7b5c0019c1d4d36c3c7ca4ec79e38e4eb09c32ca
2022-04-22 16:27:25 +01:00
Alex Chau
a74a8595fb Creaet separate pull back animation for AllApps
- In tablet, only animate recyclerView on pullback to be consistent with widget bottom sheet, and avoid showing a gap below mAppsView

Fix: 220345008
Test: manual on small and large screen
Change-Id: I1f7d03b6bd16af7a91a51a0985ef163d9e365261
2022-04-14 11:01:25 +01:00
Alex Chau
59120581e4 Dismiss keyboard when leaving AllApps state
Fix: 221024791
Test: Launcher3 dismiss keyboard when leaving AllApps
Test: NexusLauncher can still open keyboard automatically in AllApps
Change-Id: I61b50e3fc4c6ed83bd5234c5daef3b2cb428b520
2022-04-13 18:48:23 +01:00
Alex Chau
b8c22e1155 Tune AllApps bottom sheet VisD and motion
- Make AllApps bottom sheet solid and appears from bottom
- Teleport AllApps bottom sheet as user drag to reduce drag range
  - Consider teleport interpolation for state transition sdetection
- Tuned workspace motions for AllApps bottom sheet (no translate, shrink)
- Add portrait vertical translate for tablet portrait including taskbar AllApps
- Updated bottom sheet handle and created common variables for other bottom sheets

Bug: 208599118
Test: manual on tablet AllApps, taskbar Allapps and handheld AllApps
Change-Id: I69dba5f155914cd012cc8ef3be1ef71fb2be5a40
2022-02-23 17:08:06 +00:00
Brian Isganitis
1664c9f418 Refactor all apps to depend on activity context.
The current AllAppsContainerView has been split into a base class and a
subclass for activities. The base class allows using all apps with an
activity context. A-Z and work profile tabs are supported, but search
and the hotseat still require an Activity.

Test: Manual. All apps should work the same.
Bug: 204696617
Change-Id: I3b146714bc11b3b3555d97623aab5d78ac836482
2022-01-24 20:24:20 -05:00
TreeHugger Robot
0f4e4856a2 Merge "[AllApps] NORMAL <-> ALL_APPS motion clean fixes for AOSP" into sc-v2-dev 2021-09-20 21:50:58 +00:00
Hyunyoung Song
862415a142 Introduce haptic when all apps state transition happens.
Bug: 195679234
Test: manual
Change-Id: Id923f1641bb49579c972e3dbb9de094293d00f93
Merged-In: Id923f1641bb49579c972e3dbb9de094293d00f93
2021-09-12 21:48:52 +00:00
Samuel Fufa
776443b337 [AllApps] NORMAL <-> ALL_APPS motion clean fixes for AOSP
- Avoids drawing on scrim when headerProtection is not enabled.
- Defines a default staggered animation for all apps scrim and content per S design guidelines

[preview attached to bug]

Bug: 191259805
Test: visual
Change-Id: I0d625c9f0caba158ff58f12a39b4f18aedead84b
2021-09-10 18:30:33 -07:00
Hyunyoung Song
54a44d4c44 All apps motion
Bug: 189970327
Test: manual

TL;DR;;

equation: settleVelocity = releaseVelocity + interpolator 2nd deritive * t

Change-Id: I86fec339523fbc3bb347dec4affbd2d1c063d13d
2021-06-16 11:17:59 -07:00
Samuel Fufa
41f15a107f [Search] Resolve afterimage when closing allapps
Preview: https://drive.google.com/file/d/1AM6WAY4kImCgHueNvH6eXUtnHgK3U6vo/view?usp=sharing&resourcekey=0-3mzBobzFuzQXCNZRUlToYA
Test: Manual
Bug: 184711608
Bug: 188556051
Change-Id: Ib43c71083460c236347dd1f340b1ad95d7d4aa15
2021-05-25 17:34:18 -05:00
Sunny Goyal
01b32466c3 Revert "Revert "Exposing AnimatorListeners in StateManager to receive both success and failure callback""
This reverts commit d7f11d5fb9.

Reason for revert: Fixed initial error
Bug: 185554764

Change-Id: I32cc49f9b3820166736ceb347f33577939aa6efa
2021-05-13 10:23:35 -07:00
TreeHugger Robot
7c58b4c7dc Merge "Revert "Exposing AnimatorListeners in StateManager to receive both success and failure callback"" into sc-dev 2021-05-12 23:37:33 +00:00
Winson Chung
d7f11d5fb9 Revert "Exposing AnimatorListeners in StateManager to receive both success and failure callback"
This reverts commit a75f576890.

Reason for revert: b/187887269
Bug: 187887269

Change-Id: I8a56ff7054e71cf30b113fdaa213397dae0c53cb
2021-05-12 21:25:22 +00:00
Hyunyoung Song
afd470fc69 Merge "Implement overshoot and squish motion in all apps open" into sc-dev 2021-05-12 17:51:31 +00:00
Sunny Goyal
a75f576890 Exposing AnimatorListeners in StateManager to receive both success and failure callback
Updating various callers to use onSuccess or onEnd appropriately

Test: Manual
Bug: 185554764
Change-Id: I357dd1fdbe111e7a30d4c8dee520fbd7d9956b7d
2021-05-11 13:53:14 -07:00
Hyunyoung Song
222a59e79a Implement overshoot and squish motion in all apps open
Bug: 187475924
Bug: 183062683
Test: manual

Change-Id: I33b6c647c45ff467c6d49cf3796f92ca366ab3f1
2021-05-11 13:49:45 -07:00
Samuel Fufa
acebd1f69a [Search][Motion] Introduce header protection in AllApps
ScrimView exposes ScrimDrawingController that allow FloatingHeaderView to observe AllApps scroll progress and draw header protection on Scrim. In addition, search box independently adopts header protection background to ensure proper clipping behavior.

Test: local
preview: https://drive.google.com/file/d/1_E577AAJ0LBg0zrKJQSEJK9GQnrtx7uv/view?usp=sharing&resourcekey=0-MTxjlB3xWyJ3qPvr4qMdig
Bug: 184946772
Change-Id: I64c0f4f50d26c475d31542148a15c7c145588d3f
2021-05-07 11:15:05 -05:00
Hyunyoung Song
96d4ec4544 All apps motion tuning [1/n]
- reverse spring direction to enable overshoot
- change master interpolators for swipe / fling

Test: manual
Bug: 183001675
Bug: 186121789
Change-Id: I5869d84daab99594cc2a261cb8f5d28e0293afe1
2021-05-04 23:59:48 +00:00