Commit Graph

7046 Commits

Author SHA1 Message Date
Winson Chung
0e1cd933ba Merge "Fix issue with grouped task rects being calculated slightly off" into sc-v2-dev 2021-11-17 19:42:53 +00:00
Winson Chung
9304879387 Fix issue with grouped task rects being calculated slightly off
- This was causing bleed through between split tasks and perhaps
  some rounded corners to be calculated incorrectly
- Also reset the translation after it is adjusted for dismissing
  in case the dismiss gesture is canceled.  This doesn't fix the
  issue with bleed through between the task views (to be fixed
  separately), but makes sure it isn't permanently set on the task

Bug: 206739664
Test: Split tasks, swipe up and check the bounds

Change-Id: I34430e958ca7a75f48621bc27a281e93fdf97179
2021-11-17 17:40:58 +00:00
Fedor Kudasov
3256e1e744 Add some more @Nullable annotations
Bug: 205828770
Test: m LauncherGoResLib
Change-Id: I6d2f269c4ec5f6cdee31ad68545c2720fbf1d8fc
(cherry picked from commit 9385170c1b)
2021-11-17 08:40:17 +00:00
TreeHugger Robot
b797ca77b2 Merge "Fix memory leak in TaskbarLauncherStateController" into sc-v2-dev 2021-11-16 21:34:52 +00:00
TreeHugger Robot
36705e6039 Merge "If hometask is last task to be dismissed, show empty recents instead of home screen" into sc-v2-dev 2021-11-16 20:25:06 +00:00
Tracy Zhou
1fdea66f16 Fix memory leak in TaskbarLauncherStateController
mIconAlphaForHome.setConsumer(null) in onDestroy()

Test: Run BinderTests#testSwitchToOverview locally
Bug: 206633573
Change-Id: I912cd66097b113ee84197f23a5862e333d7e63f2
2021-11-16 11:31:15 -08:00
Alex Chau
04309940c0 If hometask is last task to be dismissed, show empty recents instead of home screen
- http://ag/16221737 ensure homescren stub is always added if tasks hasn't been loaded in RecentsView. This introduced an edge case that after dismissing home task view, no task remains in overview and it get dismissed
- The fix is to show empty recents instead of home screen if last task dismissed is a home task (showing empty recents isn't always correct, as there might be unloaded tasks, but it's better than dismissing overview)
- Also tuned the timing of when mLoadPlanEverApplied is set

Fix: 206462357
Test: FallbackRecentsTest.goToOverviewFromHome
Change-Id: I0f395639f57a1a57fddf750623a8a74b8ede8555
2021-11-16 18:48:28 +00:00
Alex Chau
1c4871298e Merge "Crop letterbox insets when thumbnail is from different aspect ratio" into sc-v2-dev 2021-11-16 18:40:31 +00:00
Fedor Kudasov
72c8e71e06 Merge "Annotate RecentsView with @Nullable" into sc-v2-dev 2021-11-16 10:26:23 +00:00
Tracy Zhou
0200636585 Merge "Track LauncherState, RecentsAnimation, resumed state for task bar in one place" into sc-v2-dev 2021-11-16 09:41:58 +00:00
Fedor Kudasov
3a0f8a90bd Annotate RecentsView with @Nullable
Bug: 205828770
Test: m LauncherGoResLib
Change-Id: I44a4f7ce4258e54d43ca2c5a3937c81a4a686f80
(cherry picked from commit ac9cee5a7c)
2021-11-15 20:39:07 +00:00
Fedor Kudasov
9d6fb64f45 Simplify getTaskViewAt call
RecentsView getTaskViewAt method is nullable and is safe
to call for an out of bound index.

Bug: 205828770
Test: m LauncherGoResLib
Change-Id: I7709d63ad4490fd756a50caaf42ba70c4fad4d06
(cherry picked from commit 41edede1ee)
2021-11-15 20:37:12 +00:00
Fedor Kudasov
ba47b591c4 Merge "Add @Nullable annotations for simple cases" into sc-v2-dev 2021-11-13 09:00:32 +00:00
Winson Chung
ea77e49524 Merge "Freeze task list if requested when launching split tasks" into sc-v2-dev 2021-11-12 20:51:15 +00:00
Alex Chau
f75725830a Fix launch animation from grid
- Fixed calculateGridTaskSize to algin to taskRect instead of gridRect
- Extracted end of grid's scroll diff calculation to getOffsetFromScrollPosition to accurately calculate end of grid task's offset between its scroll and visual position (End of grid task's scroll is all the same at the position where ClearAllButton is just invisible)
- Extracted isGridTask in TaskView so TaskViewSimualtor can use the correct task size depedning if it's grid task or not

Bug: 200813202
Test: manual
Change-Id: I11a980345aee2680abf1c2563baadd9718a40192
2021-11-12 16:13:47 +00:00
Fedor Kudasov
2ca545c387 Add @Nullable annotations for simple cases
Add @Nullable annotations for the fields that are expected
to be null at arbitrary lifecycle time and are their usage
is protected by null checks.

Bug: 205828770
Test: m LauncherGoResLib
Change-Id: I9c31e1dc0d01cdd68dfff0a005ba1f40c257f8ea
(cherry picked from commit 920dc2f28f)
2021-11-12 10:01:33 +00:00
Fedor Kudasov
6c7c91fe86 Merge "Annotate AttributeSet with @Nullable" into sc-v2-dev 2021-11-12 08:17:55 +00:00
Hyunyoung Song
664f685336 Merge "Address AppEventProducer to correctly send search-result location on AppTargetEvent" into sc-v2-dev 2021-11-12 07:46:23 +00:00
Winson Chung
d0e6c8b2e7 Freeze task list if requested when launching split tasks
Bug: 206000278
Test: Quickswitch from app pair and back
Change-Id: I76af1396145e121e7f66f9e6b97f21a85c075e8e
2021-11-12 06:27:26 +00:00
Hyunyoung Song
1e5b621a50 Address AppEventProducer to correctly send search-result location on AppTargetEvent
Bug: 191362091
Test: logcat printout

11-10 20:27:02.290 32215 32237 D QuickstepModelDelegate: notifyAppTargetEvent action=1launchLocation=search-results

Change-Id: I16ef7679116e397a8a108cc291f5741febf2e453
2021-11-11 21:27:01 -08:00
Alex Chau
80836f637f Update corner radius of both snapshot in app pair
Fix: 206002609
Test: manual
Change-Id: I6af28c6948769eac53326d61e84ac39196bd840f
2021-11-11 19:40:42 +00:00
Fedor Kudasov
b498b648ae Annotate AttributeSet with @Nullable
Bug: 205828770
Test: m LauncherGoResLib
Change-Id: Ib8584e1bbcc7061aef2eb4813a8f6aa41d3c7362
(cherry picked from commit 96f8792c04)
2021-11-11 08:16:08 +00:00
Vinit Nayak
185da72e98 Merge "Finish recents animation for app-icon tap" into sc-v2-dev 2021-11-11 06:03:47 +00:00
Ryan Lin
b6e3caeb7a Merge "Fix the cutout of magnification border" into sc-v2-dev 2021-11-11 01:56:21 +00:00
TreeHugger Robot
0aadbc6b37 Merge "launcher: use a different task menu for foldables" into sc-v2-dev 2021-11-10 19:45:36 +00:00
Vinit Nayak
2db58f68ee Finish recents animation for app-icon tap
* There is a layering issue w/ live tile
* Also, order tasks for app-pair when binding

Bug: 205354856
Change-Id: I4fb5b9ed070e96299fd4b58d172ebba93789d009
2021-11-10 10:21:02 -08:00
Thales Lima
c335ad28a2 launcher: use a different task menu for foldables
Foldables use a different menu from phones, positioned either to the
right or left of the app icon, and display an arrow. Since TaskMenuView
is very specific for handhelds, it was cleaner to create another class
to handle foldables case extending from ArrowPopup.

This creates a working menu, the correct style will come in later CLs.

Bug: 193432925
Test: open Overview and tap the app icon

Fixes: 205298731
Test: atest NexusLauncherTests

Change-Id: I7a5c1fb4800a309f40fadb2df0f6c3a4c3f42679
2021-11-10 17:30:13 +00:00
Winson Chung
7ce4af988b Merge "Support multiple tasks in recentsaninmation onTaskAppeared" into sc-v2-dev 2021-11-10 17:05:46 +00:00
Vinit Nayak
524d6b83e9 Merge "Shows AppPairs in previous tasks" into sc-v2-dev 2021-11-10 16:33:50 +00:00
ryanlwlin
1ee6bd7bb6 Fix the cutout of magnification border
If the window is unmagnifiable, it might cause the cutout of
magnification region.
To fix it, we set the flag when the touchable region is not the
entier window frame.

To fix NexusLauncherTests, we add a flag to avoid updateViewLayout
too frequently that would impact memory test and have the performance
issue.

Bug: 196510717
Test: manual test on gestural and 3-button navigation
      presumbit test pass
      run atest NexusLauncherTests with foldables
Change-Id: Ifef81640fe6c08ee1b0dcd3915227fba3002ea43
Merged-In: Ifef81640fe6c08ee1b0dcd3915227fba3002ea43
(cherry picked from commit c8d588cff6)
2021-11-10 09:51:54 +00:00
Tracy Zhou
e89a83b65d Track LauncherState, RecentsAnimation, resumed state for task bar in one place
TODO:
- Consider delaying animating task bar to stashed towards all apps state until user releasing their finger (tho in this change heuristic is applied for stashing and unstashing respectively)
- Further consolidate some animation logic

Bug: 204220602
Test: manual

Change-Id: I58b4d035fcf65a9f5c68e69c129eae95b89b1c4a
2021-11-09 23:46:03 -08:00
Vinit Nayak
4d57e7091f Shows AppPairs in previous tasks
Fixes: 203006080
Change-Id: I63912a61e7617ec41f229c19cc267dc5a1857bae
2021-11-09 13:47:18 -08:00
Alex Chau
7c4bc7dd74 Don't skip adding stub home task if applyLoadPlan hasn't run
- In FallbackRecentsTest.goToOverviewFromHome, home task gesture starts before applyLoadPlan, causing shouldAddStubTaskView to return false because getTaskViewCount is 0. This falsely avoid home task to be added to RecentsView, causing the animation to be drastically different from what user sees outside the test
- Added a check on whether applyLoadPlan is ever called to solve the problem

Fix: 205580523
Test: FallbackRecentsTest.goToOverviewFromHome
Change-Id: I2e435e56008e916e8f7e1037d3fa3c8177437d13
2021-11-09 19:01:23 +00:00
TreeHugger Robot
055d9a5f07 Merge "Fix a case that task jump when dismissing" into sc-v2-dev 2021-11-09 16:03:45 +00:00
Evan Rosky
e4102c6ffe Support multiple tasks in recentsaninmation onTaskAppeared
Needed for app-pairs support

Bug: 204094785
Test: TODO
Change-Id: I3c5f8097b04b4033ba887e3c6d9e5ffd900df80e
2021-11-08 17:40:13 -08:00
TreeHugger Robot
ef18f8c5a2 Merge "Fixing allSet page not closed if recentsAnimation takes time to start" into sc-v2-dev 2021-11-09 01:35:48 +00:00
TreeHugger Robot
44fcfa5bfd Merge "Play fallback animation when overlay is shown." into sc-v2-dev 2021-11-08 20:49:58 +00:00
TreeHugger Robot
c010ea2f1b Merge "Add temporary logging to try and debug: b/202414125" into sc-v2-dev 2021-11-08 20:33:00 +00:00
Alex Chau
5885b074dc Fix a case that task jump when dismissing
- Fixed an edge case that RecentsView was not snapped to last tasks, but become snapped to last tasks after dismiss, as last pages' scroll is the position where ClearAllButton is barely invisible, instead of aligned to mLastComputedTaskSize.
- Fixed a case that misclassifed as split select

Fix: 202941373
Test: manual
Change-Id: Ib50dda471189da4325cd8ed57d600cc64907c978
2021-11-08 16:57:38 +00:00
TreeHugger Robot
3555ef3b31 Merge "Add to tapl quickswitch test for testing intermediate carousel." into sc-v2-dev 2021-11-08 13:15:44 +00:00
Pat Manning
04486f19bb Add to tapl quickswitch test for testing intermediate carousel.
Test: TaplTestsQuickstep.java
Fix: 197630182
Change-Id: I5f325995e22b76eee710154ca54a050eaf70b150
2021-11-08 11:32:56 +00:00
Jerry Chang
2e2f49e8a5 Merge "Accept snapshot list when cancelling recents animation" into sc-v2-dev 2021-11-08 10:22:34 +00:00
TreeHugger Robot
c2f320703c Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-v2-dev 2021-11-08 02:32:52 +00:00
Jerry Chang
331f46fab3 Accept snapshot list when cancelling recents animation
Bug: 200813008
Test: enter overview after activated split screen, observed task
      thumbnails showing with correct bounds after roation.
Change-Id: Ifea17d2c685d16db111c4fab88e131595254b9a5
2021-11-08 09:55:43 +08:00
Jon Miranda
4e5664ac28 Play fallback animation when overlay is shown.
Bug: 205086529
Test: go to -1, click to open app, swipe back
Change-Id: I905511e0ac7576d2134a10088289a5ca37d1b257
2021-11-05 16:16:12 -07:00
Bill Yi
1e479563d5 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I7998165953f478389339b0530be5b6a56e72950b
2021-11-05 22:09:01 +00:00
Zak Cohen
605d89af37 Add temporary logging to try and debug: b/202414125
Bug: 202414125
Test: Local
Change-Id: I4b3a9c9bfffe72990773344762187b6cd8bf09aa
2021-11-05 14:10:58 -07:00
Schneider Victor-tulias
2bfbf3bffa Add popup menu and click handling to taskbar.
- Added popup menu support to taskbar icons
- Added item click handling for taskbar icon popup menu items

Bug: 198438631
Test: long pressed taskbar icons, pressed popup menu items, dragged taskbar icons to start multi-window mode
Change-Id: Ibc59c1eada50a877a863c075fbfd3e4accaae008
2021-11-05 13:07:09 -07:00
Sunny Goyal
beefd1890c Fixing allSet page not closed if recentsAnimation takes time to start
> Also finishing the activity so that it doesn't show in home settings backstack

Bug: 204541138
Test: Manual
Change-Id: I7deec0d1ef7eec0464a0f21bf30b25cd5e18d02d
2021-11-05 13:05:49 -07:00
TreeHugger Robot
160b1357bf Merge "Show divider when GroupedTaskView expanded from recents" into sc-v2-dev 2021-11-05 19:50:24 +00:00