Commit Graph

4768 Commits

Author SHA1 Message Date
Winson Chung
8c573d920f Merge "Adding some Shell documentation" into tm-qpr-dev am: 5ff3c0e94c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19230676

Change-Id: I06610ee9728720bd2fe7e230bf9b1734c2960b15
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-12 16:46:45 +00:00
Winson Chung
5ff3c0e94c Merge "Adding some Shell documentation" into tm-qpr-dev 2022-07-12 16:32:38 +00:00
Winson Chung
25ee89511f Adding some Shell documentation
- First pass at some docs on sysui integration, dagger, threading etc.

Test: Just documentation changes
Bug: 238683303

Change-Id: Ib4bda43d4ac8771a6d6f1b87807b7c39dfbe8d5b
2022-07-12 00:34:17 +00:00
Winson Chung
18f2a05ba1 Merge "Skip cancel of physics animators if not needed" into tm-qpr-dev am: ea4a7a6cf9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19237416

Change-Id: I0296265e2993f0570ee69b4266b2207b63c6e9dd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-11 15:24:35 +00:00
Winson Chung
ea4a7a6cf9 Merge "Skip cancel of physics animators if not needed" into tm-qpr-dev 2022-07-11 15:10:17 +00:00
Jeff Chang
bef1e16c59 Merge "Handle the uncontrolled task in split-screen" into tm-qpr-dev am: 9e73750458
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19166690

Change-Id: Id239035fb76ebfc0b7eff00c8686e87a8af93131
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-11 06:08:56 +00:00
Jeff Chang
9e73750458 Merge "Handle the uncontrolled task in split-screen" into tm-qpr-dev 2022-07-11 05:47:58 +00:00
Winson Chung
b41f317dd9 Skip cancel of physics animators if not needed
- For some reason calling cancelAction() with no animations still takes
  ~2s while testing, which causes tests to take multiple seconds to tear
  down

Without change:
[76/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testAnimationsUpdatedWhileInMotion: PASSED (4.743s)
[77/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testFling: PASSED (4.441s)
[78/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testFlingRespectsMinMax: PASSED (4.090s)
[79/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testFlingThenSpring: IGNORED (0ms)
[80/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testSpringOneProperty: PASSED (4.517s)
[81/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testIsPropertyAnimating: PASSED (4.768s)
[82/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testUpdateListeners: PASSED (4.795s)
[83/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testFlingThenSpring_objectOutsideFlingBounds: PASSED (4.741s)
[84/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testListenersNotCalledOnSubsequentAnimations: PASSED (4.818s)
[85/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testAnimationsUpdatedWhileInMotion_originalListenersStillCalled: IGNORED (0ms)
[86/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testSpringMultipleProperties: PASSED (4.491s)
[87/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testFlingToMinMaxThenSpring: PASSED (4.743s)
[88/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testExtensionProperty: PASSED (4.365s)
[89/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testOneAnimatorPerView: PASSED (8.053s)
[90/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testEndListenersAndActions: IGNORED (0ms)

With change:
[76/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testAnimationsUpdatedWhileInMotion: PASSED (755ms)
[77/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testFling: PASSED (427ms)
[78/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testFlingRespectsMinMax: PASSED (126ms)
[79/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testFlingThenSpring: IGNORED (0ms)
[80/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testSpringOneProperty: PASSED (503ms)
[81/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testIsPropertyAnimating: PASSED (756ms)
[82/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testUpdateListeners: PASSED (804ms)
[83/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testFlingThenSpring_objectOutsideFlingBounds: PASSED (779ms)
[84/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testListenersNotCalledOnSubsequentAnimations: PASSED (804ms)
[85/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testAnimationsUpdatedWhileInMotion_originalListenersStillCalled: IGNORED (1ms)
[86/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testSpringMultipleProperties: PASSED (502ms)
[87/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testFlingToMinMaxThenSpring: PASSED (728ms)
[88/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testExtensionProperty: PASSED (326ms)
[89/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testOneAnimatorPerView: PASSED (50ms)
[90/665] com.android.wm.shell.animation.PhysicsAnimatorTest#testEndListenersAndActions: IGNORED (0ms)

Bug: 238577469
Test: atest WMShellUnitTests
Change-Id: Id378ababb9b0542bbc5a17caebaa42f2f9fb4f33
2022-07-11 05:47:04 +00:00
Tony Huang
1b8383ca2b Merge "Avoid re-launch button show after split switching" into tm-qpr-dev am: 2b9d5ac7cc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19095358

Change-Id: I02f267a7fffbe44d38645425ed1575430af0aa3a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-11 04:23:25 +00:00
Tony Huang
2b9d5ac7cc Merge "Avoid re-launch button show after split switching" into tm-qpr-dev 2022-07-11 04:03:00 +00:00
Winson Chung
b2f1d15e3a Merge "Support running WMShellUnitTests from studio" into tm-qpr-dev am: d69a267b95
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19221969

Change-Id: I85fef8d8468458e50b020a2c2f6f1bf526959d1d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-09 02:54:08 +00:00
Winson Chung
d69a267b95 Merge "Support running WMShellUnitTests from studio" into tm-qpr-dev 2022-07-09 02:36:24 +00:00
Winson Chung
b91392d3b4 Support running WMShellUnitTests from studio
- Remove unnecessary @Presubmit annotation
- Fix issue with test activity referencing wrong resources
- Disable protolog requirement for tests when running under studio
  (like we do for SysUI studio builds)
- Ensure all tests extend ShellTestCase

Test: Run tests from studio, and also from atest WMShellUnitTests
Bug: 238444377
Change-Id: I60a96dfcbbf119d6736e96193f5a7d41611e2fd1
2022-07-08 19:59:48 +00:00
Mateusz Cicheński
96a0edc65a Merge "Mark the test as flaky, to unblock presubmit." into tm-qpr-dev am: ae9ad2d4fa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19214301

Change-Id: I8a5f649b7fcaa56b3a7619b09b6a43af0448184d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-08 17:20:05 +00:00
Mateusz Cicheński
ae9ad2d4fa Merge "Mark the test as flaky, to unblock presubmit." into tm-qpr-dev 2022-07-08 16:57:59 +00:00
Winson Chung
9965ae15ef Merge "Don't copy null surface control and remove lingering references to leashes" into tm-qpr-dev am: 7411c42f3d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19203597

Change-Id: Ie68614b1e4392ae966330cea0a7a21ba740070bc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-08 16:36:36 +00:00
Winson Chung
7411c42f3d Merge "Don't copy null surface control and remove lingering references to leashes" into tm-qpr-dev 2022-07-08 16:17:05 +00:00
Jeff Chang
89f86c1813 Handle the uncontrolled task in split-screen
Exit the split-screen in case users put the uncontrolled task into
split-screen. This CL do below change to support handling this task.
   1. If no controlling activity appeared, dismiss the split screen
      and show a toast to inform users.
   2. Reparent all tasks out of split root when dismissing instead of
      just reparent controlling tasks.
   3. Disable the split-item from launcher for tasks that are
      uncontrolled.

Bug: 230461945
Bug: 208646963
Bug: 238032411
Test: atest MultiWindowTests
      atest WMShellUnitTests
Change-Id: Iab59561e9d532b10dab8f5063047c4b68b73eb87
2022-07-08 12:40:27 +08:00
Mateusz Cicheński
d41b50df47 Mark the test as flaky, to unblock presubmit.
Turns out class inheritance doesn't work well with annotations, they are not being overriden.

Test: n/a, since it's annotations, but also: atest WMShellFlickerTests:AutoEnterPipOnGoToHomeTest
Bug: 238367575
Bug: 238255886
Change-Id: I337742b75643e633e4bc0e2815da1eab19c4441c
2022-07-07 23:52:38 +00:00
Shan Huang
94ec055507 Merge "Skip launcher animation when top window is already animating." into tm-qpr-dev am: e9ff71ec1b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18411178

Change-Id: Idc44de6f2ce31e72755af4c588fa9944368d4c72
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 21:46:36 +00:00
Shan Huang
e9ff71ec1b Merge "Skip launcher animation when top window is already animating." into tm-qpr-dev 2022-07-07 21:30:14 +00:00
TreeHugger Robot
4a00852442 Merge "Stop assuming the existence of displays when tasks appear" into tm-qpr-dev am: 54300c5851
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19089829

Change-Id: I2a71d231dfa192f7ce285774f485038290cde964
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 18:02:59 +00:00
TreeHugger Robot
54300c5851 Merge "Stop assuming the existence of displays when tasks appear" into tm-qpr-dev 2022-07-07 17:46:38 +00:00
Shan Huang
5b837170ec Skip launcher animation when top window is already animating.
Currently we invoke the launcher back callback even
when the top window leash is not created (which could happen when it
already has an animation in progress, such as activity launch
animation).

Bug:231636972
Test: Swipe back during activity launch animation. m

Change-Id: Icf9a39bf68cb862defde3c2cfa5960eada41d277
2022-07-07 15:49:08 +00:00
Tony Huang
459a643783 Merge "Update when display change callback on legacy transition" into tm-qpr-dev am: c2df8ddade
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19084695

Change-Id: I2e1bb593b11c47babd770e165d373b3c93f2d685
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 09:43:10 +00:00
Tony Huang
c2df8ddade Merge "Update when display change callback on legacy transition" into tm-qpr-dev 2022-07-07 09:38:10 +00:00
Tony Huang
062f149035 Merge "Remove using of setResizing in split screen" into tm-qpr-dev am: 4d18194054
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18914371

Change-Id: I980a8d5926abafbd6cca2a8f5c7d1f9ebb5732c9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 09:22:05 +00:00
Jerry Chang
729976c548 Merge "Support to launch multi-instance when long press to split on an app icon" into tm-qpr-dev am: 312e15b0f7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19008926

Change-Id: Iaa99b65d0c6f4edd0723da9e2ec206ce0fa634fe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 09:20:52 +00:00
Tony Huang
4d18194054 Merge "Remove using of setResizing in split screen" into tm-qpr-dev 2022-07-07 08:58:31 +00:00
Jerry Chang
312e15b0f7 Merge "Support to launch multi-instance when long press to split on an app icon" into tm-qpr-dev 2022-07-07 08:53:39 +00:00
Winson Chung
c40e75b6d3 Don't copy null surface control and remove lingering references to leashes
- If a task that should otherwise be organized but does not yet have a
  surface when the task organizer is registered, then skip trying to
  return that task as we can not leash it.  Existing logic will send the
  task to the organizer once a surface control is set on it.
- In the entry points to the shell where leashes are given from WM core
  (ie. the organizers), ensure that we release them when we are notified
  that they are no longer organized

Bug: 235858985
Test: atest ShellTaskOrganizerTests
Test: atest WindowOrganizerTests
Change-Id: I16d29315b615b9756a78310d6a62fb6f21ba1184
2022-07-07 06:05:50 +00:00
Bidhya Sharma
874141e6a9 Merge "Revert "Don't copy null surface control and remove lingering references to leashes"" into tm-qpr-dev am: d69caeeeda
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19200764

Change-Id: I29da73d083c9638f3af0cb2966bc71aa1edd7c4d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 00:54:47 +00:00
Bidhya Sharma
d69caeeeda Merge "Revert "Don't copy null surface control and remove lingering references to leashes"" into tm-qpr-dev 2022-07-07 00:37:20 +00:00
Bidhya Sharma
ad41a1e805 Revert "Don't copy null surface control and remove lingering references to leashes"
This reverts commit c6ab8e8cc6.

Reason for revert: Breaking CtsWindowManagerDeviceTestCases

Change-Id: I4a4f3bf96061757acf4f68ced20ffa7351f60859
2022-07-07 00:27:12 +00:00
Mateusz Cicheński
16ad5b719d Merge "Add a unit test for auto-enter PiP by navigating to home" into tm-qpr-dev am: c11694a358
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18418388

Change-Id: Ide54dc3207a45fef0cc70932ebc9d08792096f28
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 22:20:48 +00:00
Winson Chung
8f8a1212d2 Merge "Don't copy null surface control and remove lingering references to leashes" into tm-qpr-dev am: 9693a78322
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19125218

Change-Id: Iaa6c9b3eb737b04b0268e9201c76b04e7df60f3d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 22:14:10 +00:00
Mateusz Cicheński
c11694a358 Merge "Add a unit test for auto-enter PiP by navigating to home" into tm-qpr-dev 2022-07-06 21:55:35 +00:00
Winson Chung
9693a78322 Merge "Don't copy null surface control and remove lingering references to leashes" into tm-qpr-dev 2022-07-06 21:30:49 +00:00
Mateusz Cicheński
075f8b36ad Add a unit test for auto-enter PiP by navigating to home
Test: atest WMShellFlickerTests:AutoEnterPipOnGoToHomeTest
Bug: 234164339

Change-Id: Ifa4644264900da003b873b940743188e0310ff7d
2022-07-06 16:31:35 +00:00
Tony Huang
ac5d2862d9 Remove using of setResizing in split screen
We use setResizing to draw app bottom background for reducing flicker
while split decor screen fade-in. But this cause another flicker after
resizing finished. Use split decor to draw a fill up background to
reduce flicker mentioned at first and remove using of setResizing.

Do some temp rect optimization in this CL too.

Fix: 235451160
Fix: 237040271
Fix: 238045271
Test: manual
Test: pass existing tests
Change-Id: I6b70f35d47ced78eaacc9ecd9ae1ebf3a11dbc1f
2022-07-06 07:15:33 +00:00
Jerry Chang
5b6d53e8c5 Support to launch multi-instance when long press to split on an app icon
Fix: 233174334
Test: atest WMShellUnitTests
Test: manual check the behavior of long press to split
Change-Id: I779569a0781be613e3223cc473705d235cb48363
2022-07-05 01:32:31 +00:00
Bill Yi
3ce14fe5bb Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I4773a9d35f29824854f19fb0e8e5a83f904273f3
2022-07-03 21:04:53 -07:00
Mateusz Cicheński
cb7370b10f Merge "Remove the FlakyTest annotation from no-longer flaky test." into tm-qpr-dev am: 6e5aa44ad8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19099241

Change-Id: I0ce6f86b4494156473287c8d7b5730591ac8fb58
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 17:02:49 +00:00
Mateusz Cicheński
6e5aa44ad8 Merge "Remove the FlakyTest annotation from no-longer flaky test." into tm-qpr-dev 2022-07-01 16:42:39 +00:00
TreeHugger Robot
e003bebecc Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-qpr-dev 2022-07-01 11:31:00 +00:00
Iris Yang
1e51061a30 Merge "Take the snapshot if the thumbnail cache returns empty." into tm-qpr-dev am: 483981c639
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19085009

Change-Id: I96a5182c58bfe3b41c0088d502e501bd43309c43
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 06:11:41 +00:00
Iris Yang
483981c639 Merge "Take the snapshot if the thumbnail cache returns empty." into tm-qpr-dev 2022-07-01 05:52:34 +00:00
Mateusz Cicheński
62c8628d41 Remove the FlakyTest annotation from no-longer flaky test.
Effectively removing override, given that it always simply calls super method.

Test: atest WMShellFlickerTests
Bug: 206753786

Change-Id: I5b266b9aa46d3d5464dc8ad3b602b08df4a56799
2022-06-30 22:56:21 +00:00
Garfield Tan
053341fa89 Stop assuming the existence of displays when tasks appear
WM shell may not receive the display added notifications when it
receives tasks appearing, so we need to wait for the display to show up
when it doesn't exist.

It's fairly difficult to test the case in real life, but it's a good
case for a unit test. Therefore this CL also makes WindowDecoration unit
tests friendly.

Bug: 236215336
Test: Caption in shell looks OK.
Test: atest WMShellUnitTests:WindowDecorationTests
Test: atest WMShellUnitTests:PipTaskOrganizerTest
Test: atest WMShellUnitTests:PipAnimationControllerTest
Change-Id: Ife0f85fdbd59b84303fc50f4ec896c53a259cec6
2022-06-30 11:38:54 -07:00
Winson Chung
c6ab8e8cc6 Don't copy null surface control and remove lingering references to leashes
- If a task that should otherwise be organized but does not yet have a
  surface when the task organizer is registered, then skip trying to
  return that task as we can not leash it.  Existing logic will send the
  task to the organizer once a surface control is set on it.
- In the entry points to the shell where leashes are given from WM core
  (ie. the organizers), ensure that we release them when we are notified
  that they are no longer organized

Bug: 235858985
Test: atest ShellTaskOrganizerTests
Test: atest WindowOrganizerTests

Change-Id: I863ab057a4a566060a1efbe8a20f2dd854fa8c74
2022-06-30 18:30:18 +00:00