Commit Graph

11271 Commits

Author SHA1 Message Date
Tony Wickham 7a19cccafe Override displacement for transient taskbar instead of mCurrentShift
mCurrentShift is based on displacement, but is used and set in different
places. To keep consistency throughout, we should override the
displacement at the source instead.

Test: manually swiped up between home/overview threshold and catch up
threshold; let go to go to overview and ensure no jump occurs.
Flag: teamfood (ENABLE_TRANSIENT_TASKBAR)
Fixes: 259981285

Change-Id: Id9f5b2bcdc2e56e15ddb6d93c4ee5d5ececc094d
2022-11-21 20:14:56 +00:00
Ats Jenk 1a8b95a9d4 Merge "Add onTaskMovedToFront to close floating views" into tm-qpr-dev 2022-11-21 19:04:15 +00:00
Brian Isganitis 0ccbd7334c Merge "Do not start drag from pre-drag if cancelled during animation." into tm-qpr-dev 2022-11-21 19:04:04 +00:00
Brian Isganitis 455eca41be Merge "Still launch disabled item if we can't handle its click." into tm-qpr-dev 2022-11-21 19:02:44 +00:00
Schneider Victor-tulias b9e03da563 Merge "Revert "Add debug logs to help identify when setRecentsAttachedToAppWindow will not animate properly."" into tm-qpr-dev 2022-11-21 19:01:04 +00:00
TreeHugger Robot 104517cefb Merge "Fix janky close animation when taskbar is unstashed" into tm-qpr-dev 2022-11-21 18:30:19 +00:00
TreeHugger Robot 8700307b23 Merge "Fix NPE from using DeviceLockedInputConsumer after the surface has been released" into tm-qpr-dev 2022-11-21 18:18:49 +00:00
Schneider Victor-tulias 1ba39205bc Fix NPE from using DeviceLockedInputConsumer after the surface has been released
Fixes: 243154747
Test: swipe up from camera app while device is locked
Change-Id: Ia92e3e3cccb37e0d14592b0f3094f5aba1073300
2022-11-19 12:26:34 -08:00
Brian Isganitis 4ff301eb9d Do not start drag from pre-drag if cancelled during animation.
This change affects the preDragCondition for icons that do not have a
popup menu. The condition assumes we are still in pre-drag after
DragView is finished animating, but the user can cancel the drag in this
time (e.g. by releasing their finger early).

Test: Manual. Holding and releasing on suspended icon does not crash,
while holding and dragging still works as expected.
Fix: 258233476

Change-Id: Ic76f785cffcbfe0fe51eb1473022f2dc34563070
2022-11-19 02:32:08 +00:00
Ikram Gabiyev 793c37153a Merge "Stash transient taskbar upon icon drag" into tm-qpr-dev 2022-11-19 02:19:25 +00:00
Jon Miranda e912742234 Merge "Prevent x-axis window movement during the initial swipe up to show transient taskbar" into tm-qpr-dev 2022-11-19 01:58:37 +00:00
Sihua Ma 7b516983bc Merge "Clear drag views during swipe up animation progress" into tm-qpr-dev 2022-11-18 22:59:10 +00:00
Brian Isganitis 543528594a Merge "Only allow one TaskbarRecentsAnimationsListener at a time." into tm-qpr-dev 2022-11-18 21:38:58 +00:00
Hawkwood Glazier d5ab17164d Merge "Update PluginManager Import" into tm-qpr-dev 2022-11-18 21:17:18 +00:00
Jon Miranda 08be3775f6 Prevent x-axis window movement during the initial swipe up to show transient taskbar
- If gesture starts and isLikelyToStartANewTask=true, we do not clamp
- If gesture starts and isLikelyToStartANewTask=false AND transient taskbar is not
  already showing, we clamp the scrolling

Bug: 258851206
Test: swipe up to show taskbar, no x-axis movement
      swipe left/right still works as expected

Change-Id: Iac194df63e03b4a28b49008983c88c165847aa31
2022-11-18 13:10:34 -08:00
Jon Miranda e3bcc7bf40 Merge "Fix home/overview threshold." into tm-qpr-dev 2022-11-18 21:02:01 +00:00
Schneider Victor-tulias e04a878709 Revert "Add debug logs to help identify when setRecentsAttachedToAppWindow will not animate properly."
This reverts commit a0be92c830.

Reason for revert: Bug fixed and logs are too verbose

Test: ran launcher and checked logs
Fixes: 244593270
Change-Id: Ia67ba96b0b2146308f9cad1df884144edf2ab186
2022-11-18 11:00:33 -08:00
Vinit Nayak 9de3256583 Merge "Update test for vertical split" into tm-qpr-dev 2022-11-18 18:21:10 +00:00
TreeHugger Robot 9b3aaf2b7d Merge "End live tile when quick settings expands, not just notification shade." into tm-qpr-dev 2022-11-18 16:45:30 +00:00
Jon Miranda 4b26e8f081 Merge "Use mContext instead of TaskbarActivityContex to enable transient taskbar." into tm-qpr-dev 2022-11-18 03:12:00 +00:00
Jon Miranda 21d4253c01 Fix home/overview threshold.
Fixes: 258836670
Test: Enable I06e16d78c179b7c3281f423ed8c7dd6cfc42229a to visually show
      thresholds on screen
      Swipe up to overview where taskbar not showing
      and also with taskbar already showing

Change-Id: Ie7487a5f869c0718d9ee08209dee8331a01d5989
2022-11-17 18:09:31 -08:00
Brian Isganitis 50b3b62eba Merge "Add a11y titles for taskbar windows." into tm-qpr-dev 2022-11-18 01:56:22 +00:00
TreeHugger Robot 3a801de233 Merge "Fix ConcurrentModificationExceptions during binding." into tm-qpr-dev 2022-11-18 01:44:01 +00:00
Brian Isganitis 424c7f4393 Still launch disabled item if we can't handle its click.
See where ItemClickHandler#handleDisabledItemClick returns false for
context. If we do not honor this return value, the framework will not
show a dialog in response to attempting launch the item.

Fix: 258232619
Test: Manual
Change-Id: Ie3b112eea17caf0a84defb331133bda9f3add5b6
2022-11-18 01:09:18 +00:00
Vinit Nayak 825ede3e92 Update test for vertical split
* Takes into account taskbar insets, not sure what
expected val should be so copied the same logic from code

Bug: 219411750
Test: Ran test, passes
Change-Id: I6230a3d043e41446c35c9b393abf4a2e0ea891af
2022-11-17 16:39:27 -08:00
Brian Isganitis 9390b500a9 Only allow one TaskbarRecentsAnimationsListener at a time.
If another animation is created while one is occurring, we should clean
up the previous one.

Test: Manual
Fix: 233868461
Change-Id: Idf0e33ae95cbf19741ee943e450d478b1e18716b
2022-11-18 00:02:53 +00:00
Stefan Andonian 3233010c5a Merge "Move SharedPreferences code to its own class." into tm-qpr-dev 2022-11-17 23:46:26 +00:00
TreeHugger Robot 4059ff0a0c Merge "Update All set page subtitle to use the same device name used acrss the SUW" into tm-qpr-dev 2022-11-17 23:03:31 +00:00
Jon Miranda 2049f3990a Use mContext instead of TaskbarActivityContex to enable transient taskbar.
Bug: 259586791
Bug: 259337908
Bug: 257549303
Test: TaplTestsTaskbar
Change-Id: Ibb0a8e8539946f3a496318a6a9cf4b553693d790
2022-11-17 14:20:33 -08:00
Ikram Gabiyev c06426164f Stash transient taskbar upon icon drag
Transient taskbar needs to be stashed upon
dragging the icon from it to create a
splitscreen.

Bug: 258850827

Test: manually reproduced the steps in the bug
Change-Id: I88f2b4b25cb4c12fbe7e646a8ed668921ef24ab9
2022-11-17 22:01:41 +00:00
Sihua Ma ff0f98dd03 Clear drag views during swipe up animation progress
This is to avoid clearing it too lately, at a point where the user starts to see a flicker on the screen.

There was already a report of this bug. Filing a bug report on my own because the original one is hard to find. I will mark that as fixed once I find it again.

Test: Manual
Fix: 259157574
Change-Id: Idc9bb67ebf6fc3ff6d78880f28c46d916a02ab77
2022-11-17 13:52:26 -08:00
Schneider Victor-tulias 193f8992f1 Merge "Fix null-pointer exception in all set activity first reveal animation" into tm-qpr-dev 2022-11-17 21:47:18 +00:00
Ats Jenk 4b4e4a39df Add onTaskMovedToFront to close floating views
Fixes a bug with allapps not being closed if the launching activity does
not trigger a onTaskStackChange callback. For example this is the case
when allapps launches a task in freeform mode. In this case the previous
task is still visible and won't be paused. The onTaskStackChange
callback is not triggered. Leaving the allapps view visible.

Bug: 259264346
Test: enable destop mode, open gmail, open allapps and open chrome,
  observe allapps view is closed
Change-Id: I5e60baa15ebc04b5094a84ed977eb9f3bc73d4a6
2022-11-17 13:09:19 -08:00
Brian Isganitis 61b01e2c2a Add a11y titles for taskbar windows.
Test: Manual with Talkback.
Fix: 228389333
Change-Id: If30311166fde155d04cf1c9a6865c98d380a93ea
2022-11-17 20:56:04 +00:00
Stefan Andonian a04de842d1 Fix ConcurrentModificationExceptions during binding.
The same lists of extra items stored in BgModelData are also stored in
UI components. This is causing ConcurrentModificationExceptions. The
solution is to clone these lists or mark them as immutable before storing
them in their respective components.

Bug: 206918543
Test: Verified that crash no longer occurs after fix.
Change-Id: I571a2c451af58137aa7513b372b6a8ecf9bd3ff6
2022-11-17 20:46:51 +00:00
Schneider Victor-tulias 6386d4b55b Update All set page subtitle to use the same device name used acrss the SUW
Fixes: 252972556
Test: launched the all set page on a large screen, foldable and phone
Change-Id: Id6cb86ff85aeb1453f96e707dc4921d23513c406
2022-11-17 10:58:55 -08:00
TreeHugger Robot 1eb1e03651 Merge "Check NPE and log error condition for enableBlockingTimeout in test harness." into tm-qpr-dev 2022-11-17 18:33:23 +00:00
Stefan Andonian 146701ca3e Move SharedPreferences code to its own class.
Bug: 251502424
Test: Code compiled correctly.
Change-Id: Iea0d6ab2999504117546ee0f7adc0c7b8b45c065
2022-11-17 17:22:47 +00:00
Pat Manning 33fa3ffeec End live tile when quick settings expands, not just notification shade.
This is needed for split-shade and for two-finger pull down of shade which goes directly to quick settings.

Fix: 256090552
Fix: 259417195
Test: manual
Change-Id: Ief28ae69d4142ddabb4d4b1a9f821abecd81be1e
2022-11-17 14:47:52 +00:00
Alex Chau aee9c12a8b Fix janky close animation when taskbar is unstashed
- Updated startRect for close animation when taskbar is unstashed

Fix: 258167450
Test: Use back gesture to close app when taskbarw is stashed or unstashed
Change-Id: I56913c2770024bcb47a74c28941bc59f60b4666b
2022-11-17 10:57:40 +00:00
Tracy Zhou a71d353ff8 Merge "Implement split from workspace to workspace" into tm-qpr-dev 2022-11-17 07:04:48 +00:00
Jeremy Sim c480c268e8 Merge "Allow user to tap on stashed app to launch task in fullscreen" into tm-qpr-dev 2022-11-17 04:19:04 +00:00
TreeHugger Robot 1b30bab1e1 Merge "Update transient taskbar transition duration to match spec (417ms)." into tm-qpr-dev 2022-11-17 02:58:33 +00:00
TreeHugger Robot 3ea398ecb7 Merge "Cleaning Utilities.java" into tm-qpr-dev 2022-11-17 02:39:38 +00:00
Sihua Ma c6bd4ad21f Merge changes If022ec8d,I34341937 into tm-qpr-dev
* changes:
  Move LauncherWidgetHolder to widget package
  Move most of the functions in LauncherAppWidgetHost to LauncherWidgetHolder
2022-11-17 01:46:55 +00:00
TreeHugger Robot 579ddc7aff Merge "Removing unnecessary event dispatching via touch-controller. Instead using a poll method similar to other touch controllers" into tm-qpr-dev 2022-11-17 01:22:54 +00:00
Sunny Goyal 47d4d81b4f Cleaning Utilities.java
> Removing some unused methods
> Moving some specialized methods to corresponding classes
> Removing GridProvider check as it is released

Bug: 257555083
Test: Presubmit
Change-Id: Ib0f8c673d018071d3f4b7d9247e0a35718ab009c
Merged-In: Ib0f8c673d018071d3f4b7d9247e0a35718ab009c
2022-11-17 01:06:16 +00:00
Jon Miranda 30cc324117 Check NPE and log error condition for enableBlockingTimeout in test harness.
Similar to enableTransientTaskbar changes in
ag/Ifa929dca18437ae101cf3290feda4209790604d2

This method differs from enableManualTaskbarStashing in that we call it during setup/teardown and so in these cases TaskbarActivityContext
being null may be valid. For instance, as part of the teardown,
taskbar may have already been destroyed so enabling blocking timeout
may be a moot point — adding logs can help verify that assumption.

Bug: 259337908
Bug: 257549303
Test: TaplTestsTaskbar
Change-Id: I2eeb02573670a503687ca7aa364d14f3124cd0ef
2022-11-16 23:52:11 +00:00
Hawkwood Glazier dc83786339 Update PluginManager Import
Bug: 258424862
Test: Rebuilt Launcher
Change-Id: I7a8b343533e8d8eb8fddc3683c57ece664af8736
2022-11-16 23:31:16 +00:00
Jeremy Sim 6692f78229 Allow user to tap on stashed app to launch task in fullscreen
This patch implements a new feature that allows the user to tap on the staged app rectangle in split staging mode. When the user does so, split selection will be canceled, and the staged app will animate out to fill the screen and launch in fullscreen.

Done by creating a new onClick listener on mFirstFloatingTaskView that sets up the screen-filling animation, and then calls a new RecentsView function, launchStagedTask(), that launches mSplitHiddenTaskView and cleans up RecentsView afterwards (similar to what happens when a split pair is selected, but only one app is launched).

Open issues:
- After the staged task animates out to fill the screen, the task itself loads instantly without animating in. Ideally, it should fade in, similar to what happens when two split tasks are loaded in.

Bug: 257513449
Test: Manual on tablet
Change-Id: I2ae8e13e1c9848aae1978a536766c370949fd08b
2022-11-16 15:28:31 -08:00