Commit Graph

1984 Commits

Author SHA1 Message Date
Mady Mellor
8f368c5358 DO NOT MERGE Fix issue with bubble stack & bubble data expanded bit being out of sync
If onBackPressed was used while the stack was expanded, it was calling
setExpanded on BubbleStackView (BSV) and NOT BubbleData. This results in
BSV and BubbleData being out of sync which can lead to incorrect behavior.
(e.g. using individual bubble dismiss method instead of the stack dismiss
method).

Test: atest BubblesTest NewNotifPipelineTest
Fixes: 217361258
Change-Id: I748fdd49626acaa0e986a9d8038039cada6faa60
Merged-In: I748fdd49626acaa0e986a9d8038039cada6faa60
2022-02-07 19:02:10 +00:00
Hongwei Wang
d208a46d52 Merge "Add leash check in PipTaskOrganizer#fadeExistingPip" into sc-v2-dev 2022-02-02 01:31:37 +00:00
Mady Mellor
b73f1acdab Use the orientation from the config object not resources
Test: manual - reboot the device, rotate, drag stuff into split
             => verify that the orientation of split while dragging is
                correct
Bug: 216643100
Change-Id: I300ad7263bf2ac18575d92f057fdd9c13ef736a7
(cherry picked from commit 4a79d7cb97)
2022-01-31 18:11:06 +00:00
TreeHugger Robot
0b193b27b4 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-v2-dev 2022-01-27 13:11:00 +00:00
TreeHugger Robot
9e23d9d309 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-v2-dev 2022-01-27 12:13:37 +00:00
Winson Chung
dcca7075d9 Merge "Remove the previous animation split tasks container when recreating" into sc-v2-dev 2022-01-26 07:52:23 +00:00
Bill Yi
af1516e0a0 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I0279f475b5e3e1fbc32e3d2c29b0d31931a18b9b
2022-01-26 01:36:20 +00:00
Bill Yi
e199f3d903 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Id9ade68095a8101384cd4a000da706d33155ddae
2022-01-26 01:31:06 +00:00
Winson Chung
ea468e0a95 Remove the previous animation split tasks container when recreating
Bug: 197919703
Test: Invoke split and swipe up a couple times, ensure the sf dump
      doesn't show multiple lingering split containers layers
Change-Id: Iad8b9d9a0d75bdaaa2a7255a33208c2c0c3fc25b
Merged-In: Iad8b9d9a0d75bdaaa2a7255a33208c2c0c3fc25b
2022-01-25 23:24:15 +00:00
Hongwei Wang
4353053c87 Add leash check in PipTaskOrganizer#fadeExistingPip
Bug: 197319184
Test: N/A, not sable to reproduce the issue, adding protection based on
      the stack trace
Change-Id: I6363dd425eac6332f59fe1fed074c6518227580f
2022-01-25 13:21:14 -08:00
Tony Huang
7214fd7e2e DO NOT MERGE Fix divider animation from overview screen
Divider leash is create too quickly to make it show before the
animtation. Fix it by only create leash but don't show it before
animation start and set it to visible after animation end.

Fix: 215322621
Test: manual
Test: pass existing tests
Change-Id: Iaa068d5a6186cac1e1aad4b30d6f5e76943ebd08
2022-01-21 10:03:17 +00:00
Ben Lin
eab029ce8d PiP: Disable enterSplit for now.
Bug: 206645013
Test: Enter split button no longer appears
Change-Id: I6237dd1c88f50733ab24e45806c413d5777032e9
2022-01-20 02:15:21 +00:00
Bill Yi
c8a4f437c8 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Iaf42323ce36547d1209961307cdc93c65a64066e
2022-01-14 02:14:50 +00:00
Mariia Sandrikova
04ce06bb79 Merge changes from topic "revert-16468379-CXJTAENUWN" into sc-v2-dev
* changes:
  DO NOT MERGE Revert "[2/n] Camera Compat UI: Add interfaces for client-server..."
  DO NOT MERGE Revert "[3/n] Camera Compat UI: Add a camera compat control."
  DO NOT MERGE Revert "Log the CameraCompatControlEventReported atom."
2022-01-13 22:41:22 +00:00
Mariia Sandrikova
7617679a61 DO NOT MERGE Revert "[2/n] Camera Compat UI: Add interfaces for client-server..."
Revert submission 16468379

Reason for revert: Feature development is moving to T.

Reverted Changes:
Id9b9a8930:[3/n] Camera Compat UI: Add a camera compat contro...
Id6be4a954:Enable a camera app compat control on Large screen...
I083aa6718:[2/n] Camera Compat UI: Add interfaces for client-...

Bug: 206602997

Change-Id: I9ad876043fd61f708a8f468fffd1ef371bfa0866
2022-01-13 15:21:38 +00:00
Aurimas Liutikas
aec26c4f68 DO NOT MERGE Revert "[3/n] Camera Compat UI: Add a camera compat control."
Revert submission 16468379

Reason for revert: Feature development is moving to T.

Reverted Changes:
Id9b9a8930:[3/n] Camera Compat UI: Add a camera compat contro...
Id6be4a954:Enable a camera app compat control on Large screen...
I083aa6718:[2/n] Camera Compat UI: Add interfaces for client-...

Bug: 206602997

Change-Id: I318b89b87cd3b05a3f3dcd428e3d80fe81465011
2022-01-13 15:16:51 +00:00
Winson Chung
a76e46ee03 Merge "Return non-null empty list if the controller is already invalidated" into sc-v2-dev 2022-01-13 01:42:19 +00:00
Tony Huang
fcfa227cf7 Merge "Avoid NPE while drag divider bar" into sc-v2-dev 2022-01-12 01:21:28 +00:00
Winson Chung
d0823fc830 Return non-null empty list if the controller is already invalidated
- In the off chance that the controller is already invalidated (due to
  service reconnection to launcher for example), then any calls through
  the previous binder should just return an empty task list.

Bug: 206648922
Test: Manual (haven't been able to repro)
Change-Id: Iff6193fa89c2baecc527e589f17ae41b82575a48
2022-01-11 19:57:26 +00:00
Mady Mellor
d76f9c199c Merge "Fix possible NPE" into sc-v2-dev 2022-01-11 17:36:43 +00:00
Tony Huang
f0d69e7d47 Avoid NPE while drag divider bar
Task topActivityInfo is nullable, we should check it is null or
not before access it.

Bug: 213894166
Test: pass existing tests
Change-Id: Iedda57145586b6d5c2e151308ddca1e2e36035c0
2022-01-11 14:58:17 +08:00
Winson Chung
f92999a5e1 Merge "Ensure only single pip dismiss magnetized target exists" into sc-v2-dev 2022-01-11 06:08:29 +00:00
Winson Chung
b5e0878776 Ensure only single pip dismiss magnetized target exists
- If init() is called multiple times, the previous magnetized targets
  can cause the wrong target position to be calculated when trying (or
  not trying) to dismiss

Bug: 213348722
Test: Manual
Change-Id: Ic1f972cc60eafca2302ad168065c974c8a0ee924
2022-01-11 00:22:42 +00:00
Mady Mellor
0be1b45d64 Fix possible NPE
Test: manual - make sure dot works normally / no regression
Bug: 213027822
Change-Id: I819f73cb8c7d613796c3d3bb4b55b80b337c6126
2022-01-10 21:07:31 +00:00
TreeHugger Robot
581ad142f9 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-v2-dev 2022-01-09 05:21:03 +00:00
TreeHugger Robot
34171e053d Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-v2-dev 2022-01-09 05:20:12 +00:00
Bill Yi
9f612755b6 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ifab08e6f5047b918b9d9eb318085f9e281b7fb4a
2022-01-08 05:06:10 +00:00
Bill Yi
301d5c5963 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I97d5ca669c13fda5f3c25b97f42ee359953fe172
2022-01-08 05:00:53 +00:00
Mariia Sandrikova
b6c52ec273 Merge "[5/n] Camera Compat UI: Unify margins logic for camera and size compat controls." into sc-v2-dev 2022-01-07 10:49:20 +00:00
Tony Huang
588771a9de Merge "Fix updateRecentTasksSplitPair unexpectly" into sc-v2-dev 2022-01-05 03:58:53 +00:00
Tony Huang
b5fe809adf Fix updateRecentTasksSplitPair unexpectly
While split pair switching, split remain as active so it might
record new bounds with old top task pair unexpectly.
Fix this by set flag to false on startTasksWithLegacyTransition
and reset to true after remote animation finished.

Fix: 213128767
Test: manual
Test: pass existing tests
Change-Id: I42b4c79558467dec23b789a3b5cc2f8f38cd1c36
Merged-In: I42b4c79558467dec23b789a3b5cc2f8f38cd1c36
2022-01-04 10:26:51 +00:00
Tony Huang
adae4870fb Fix toucn unresponsive after half fold in split
After fold animation finished, it will always set null bounds crop
to surface and cause root task surface bounds abnormal.
Fix by ignoring root task surface in StageTaskUnfoldController
because it would not effect animation.

Fix: 211132158
Test: manual
Test: pass existing tests
Change-Id: Iece8f7e7d437bdff1cf9e738df3acc075729b993
2022-01-03 19:03:02 +08:00
TreeHugger Robot
a9831fcd24 Merge "Adding additional log to track down crash" into sc-v2-dev 2021-12-30 22:47:08 +00:00
Winson Chung
b86d3723c9 Adding additional log to track down crash
Bug: 206648922
Test: Manual
Change-Id: If34dfc40183729a942e3c8433f3b5ee00ad8e079
2021-12-30 05:50:42 +00:00
Tony Huang
5289f17a80 Fix launcher crash and correct split behavior
Fix laucher crash while swipe up in split screen. This issue caused
by launcher will request 3 runningTaskInfos to do some action,
however, it cannot ensure 3 info actually include both splits because
only one got focused. Fix this by WA on RunningTasks, update the
adjacent task of the focus one too to make sure both split task
will be top two while calling getTasks.

Correct some split behavior while startTasksWithLegacyTransition
too.

Bug: 211716649
Test: pass existing tests.
Test: Make many split pair then swipe up
Change-Id: I2e6deb2ac607b454ca8fc760f0399135a1e8e901
Merged-In: I2e6deb2ac607b454ca8fc760f0399135a1e8e901
2021-12-29 11:57:37 +00:00
Mariia Sandrikova
d8cbcc46be [5/n] Camera Compat UI: Unify margins logic for camera and size compat controls.
Before this change, margin between a hint and a camera compat control was smaller than required 8 dp while for a size compat control it was bigger than 8dp (since ag/16420818). This change makes them consistent and also simplifies layout definition for the size compat button by declaring margings explicitly rather than including them in width and height implicitly.

Test: manual
Bug: 206602997
Change-Id: I09839e764d2c8904954a594433888bfdc21d56ba
2021-12-23 18:37:59 +00:00
TreeHugger Robot
e11f54565e Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-v2-dev 2021-12-23 18:24:14 +00:00
Tony Huang
e1f575dee2 Merge "Make sure launcher side can animate divider" into sc-v2-dev 2021-12-22 02:47:05 +00:00
Bill Yi
6eefdeebae Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I2e74699a2c1affb6982cf1142cfaa1b199fc93c0
2021-12-22 01:02:17 +00:00
Winson Chung
cb1f78f054 Merge "Add debug logging for null task list" into sc-v2-dev 2021-12-21 17:35:08 +00:00
Winson Chung
f4cc0faac1 Add debug logging for null task list
Bug: 206648922
Test: Adding logs
Change-Id: If2eec374eafd1287253404ba9d6af00612d9be5c
2021-12-21 06:09:57 +00:00
Tony Huang
f3741120c1 Make sure launcher side can animate divider
Fix divider target should pass to remote animation runner and add
mIsDividerRemoteAnimating flag to eusure launcher side controlling
the divider surface and shell side do not controll until remote
animation finished.

Bug: 202914644
Test: manual
Test: pass existing tests
Merged-In: I6411a609268274355a38c72fcb5d628b76b2340c
Change-Id: I6411a609268274355a38c72fcb5d628b76b2340c
2021-12-21 04:18:02 +00:00
Mariia Sandrikova
3486eacda3 Merge changes from topic "camera-compat" into sc-v2-dev
* changes:
  [3/n] Camera Compat UI: Add a camera compat control.
  [2/n] Camera Compat UI: Add interfaces for client-server communication.
2021-12-18 21:39:13 +00:00
Mariia Sandrikova
13e80fd997 [3/n] Camera Compat UI: Add a camera compat control.
Test: atest WMShellUnitTests
Bug: 206602997
Change-Id: Id9b9a89303387c4ac797fc1382967151a13d38ef
2021-12-17 00:20:19 +00:00
Mariia Sandrikova
24f4d8a952 [2/n] Camera Compat UI: Add interfaces for client-server communication.
Changes:
- Listens to changes from the client coming through IActivityClientController#requestCompatCameraControl to ActivityRecord#updateCameraCompatState
- ActivityRecord#updateCameraCompatState sends updated state via TaskInfo to WM Shell
- ITaskOrganizerController#updateCameraCompatControlState to dispatch the user interactions with the control from WM Shell triggers callback to ActivityRecord#updateCameraCompatStateFromUser
- ActivityRecord#updateCameraCompatStateFromUser remembers the user's choice and asks client to apply treatment through ICompatCameraControlCallback

Feature is guarded with config_isCameraCompatControlForStretchedIssuesEnabled

Test: atest WMShellUnitTests:ShellTaskOrganizerTests, atest WmTests:ActivityRecordTests
Bug: 206602997
Change-Id: I083aa6718bd67456bedd9444e9b78740c041f870
2021-12-17 00:18:57 +00:00
Mady Mellor
4b3ea38f9b Merge "Fix a potential NPE" into sc-v2-dev 2021-12-15 18:09:31 +00:00
Mady Mellor
447e4f16e2 Fix a potential NPE
I've never been able to reproduce this and the stack traces I have
of it don't match existing code, but looking at the code paths I think
this could still happen, there are a couple of places where the
mMagnetizedBubbleDraggingOut gets nulled out (e.g. on child removed)
I've tried to repro by:
 - canceling the bubbles in the middle of dragging to dismiss
 - trying to snap the bubble back and then drag it again to dismiss
   (snap back also nulls it)

I see a recent stack of it in pitot so I think it's worth adding the
null check.

Test: atest ExpandedAnimationControllerTest
Bug: 201866808
Change-Id: Ib9425a2b63410c95fddaaea59761dfd18557ed54
2021-12-14 15:21:41 -08:00
Ben Lin
c34133ad93 Merge "Update PiP exclusion bounds in TaskBarDelegate." into sc-v2-dev 2021-12-14 20:49:06 +00:00
Ben Lin
82865fe924 Update PiP exclusion bounds in TaskBarDelegate.
Navigation bar is only created and used when taskbar is not available.
When taskbar is available, we will use TaskbarDelegate to be the one
responsible to update pip exclusion bounds as PiP moves.

Bug: 210038947
Test: Unfold, enter PiP, stash - PiP can be yanked out
Change-Id: I8f789d3b603e41c3d15494afdadce2cddc4d4b9c
2021-12-14 10:35:50 -08:00
Mady Mellor
90db2335da Merge changes I3c7a2886,Ib959f44b into sc-v2-dev
* changes:
  Update dropzones to match the size of the existing split
  Fix how task info is retrieved for split screen
2021-12-14 15:18:52 +00:00