Commit Graph

925 Commits

Author SHA1 Message Date
Ben Lin
8d5b4fa9bf PiP: Disable corner resizing.
This is done by disabling all the trigger points (the 4 corners). Will
hold off on removing the entire code until later in case needed.

Bug: 179299163
Test: Manual. Dragging from the corner no longer works
Change-Id: I4ed931245cbb49647feeff8b37174f6502fe9c5e
2021-04-02 10:21:00 -07:00
Ben Lin
085035f9cc Merge "PiP: Ensure PiP menu layout updates are on Shell main thread." into sc-dev 2021-04-01 17:44:52 +00:00
Hongwei Wang
313a5ed5fa Merge "Flicker test for PiP and launcher shelf height" into sc-dev 2021-04-01 16:26:44 +00:00
TreeHugger Robot
3c942191cb Merge "Don't reset Z order if the expanded view is temporarily animated out." into sc-dev 2021-04-01 15:35:55 +00:00
Tony Huang
c8b7266594 Merge "Fix black screen while pip to split screen" into sc-dev 2021-04-01 06:35:50 +00:00
Winson Chung
0aa964394e Merge "More minor menu changes" into sc-dev 2021-04-01 06:22:11 +00:00
Winson Chung
5cd74d3d26 Merge "Extend pip dismiss overlay to under cutout" into sc-dev 2021-04-01 05:42:48 +00:00
Bill Lin
f9d740b0dc Merge "1/ Make One handed mode support multiple user switch" into sc-dev 2021-04-01 02:02:39 +00:00
Bill Lin
9ad3b820be Merge "DisplayLayout set() include copy new mNavBarFrameHeight" into sc-dev 2021-04-01 00:31:22 +00:00
Josh Tsuji
47709b1d3a Don't reset Z order if the expanded view is temporarily animated out.
This resulted in a full opacity SurfaceView hanging out behind the bubble scrim. This was not visible when we had an opaque scrim but now that it's transparent again we can see it.

Bug: 184198137
Test: manual
Change-Id: If768ccc9f6dab56764227cffdbbda4f8738d56cc
2021-03-31 23:24:01 +00:00
Winson Chung
4bd615ffa0 Extend pip dismiss overlay to under cutout
Bug: 184196634
Test: Enable cutout, move pip and ensure the dismiss scrim ends under
      the cutout in landscape
Change-Id: I43003e6acf6b100597080898b162018823b203c5
2021-03-31 15:19:20 -07:00
Hongwei Wang
c5d831fea1 Flicker test for PiP and launcher shelf height
PipMovesInAllApps was intended to test the PiP window movement when the
shelf height of Launcher changes and breaks with the recent `Device
search` feature that opening all-apps in Launcher triggers both IME and
shelf height change.

Since PipKeyboardTest has covered PiP movement with IME, reimplement
this by launching a new app instead of going to all-apps and also rename
this test for its intention.

Bug: 184050344
Test: atest WMShellFlickerTests:PipShelfHeightTest
Change-Id: I102ea95e6e91c9707b73587282702b868eb705fb
2021-03-31 13:38:10 -07:00
Winson Chung
3e99b90ab1 More minor menu changes
- Don't wait for double tap timeout when clicking to unstash (you can't
  double tap while stashed to expand)
- Hide the menu when stashing so that it doesn't show again when
  unstashed
- Only log unstash if previously stashed

Bug: 183756396
Test: Tap to show unstashed pip/stash with menu showing
Change-Id: I693b67d38f32d28636ff6b5d0aaf096af78b825b
2021-03-31 13:21:01 -07:00
jorgegil@google.com
1965456d5b Account for OHM offset before possibly hiding the PIP menu
Menu actions were not clickable because the drag corner resize
handler did not take into account the OHM offset when comparing
the touch location to the PIP bounds, wrongly causing the menu
to be hidden on ACTION_DOWN and thus the menu actions never got
their click listeners fired on ACTION_UP.

Bug: 172839150
Test: Enter PIP with YT, enter OHM, play/pause/expand work fine
Change-Id: I8d1539cef46a5d7c0afe88e80638175cb3994db3
2021-03-31 11:43:34 -07:00
Ben Lin
8b70910beb PiP: Ensure PiP menu layout updates are on Shell main thread.
Only the thread which created the menu view (shell main thread) can
update its view layout, so ensuring that it is executed in that sense.

Also moved setup work in PipController to Shell Main thread. Ideally
they should be in ShellInit, but that will need to wait until
tv.PipController can unify with PipController.

Bug: 182418859
Test: Enter PIP
Change-Id: Ib88fefb9320ab441715c6ef3d5cf4f80dc9f022f
2021-03-31 11:02:01 -07:00
Nataniel Borges
400197ade7 Merge changes from topic "remove-all-tasks" into sc-dev
* changes:
  Ensure apps not running on cold launch test
  Remove all tasks before flicker tests
2021-03-31 16:54:05 +00:00
Ben Lin
beb4f03369 Merge "PiP: update magnetic field radius for dismissmal as PiP resizes." into sc-dev 2021-03-31 16:29:22 +00:00
Winson Chung
87a79200bd Merge "Fix some issues with pinch to resize" into sc-dev 2021-03-31 16:03:23 +00:00
Wei Sheng Shih
ef355db3ec Merge "Prevent the decor view to be visible again after exit animation finish." into sc-dev 2021-03-31 12:56:38 +00:00
Jason Chang
dfe477f26d Merge "Apply "Dominant Palette A - 800" color to the background of One-Handed mode" into sc-dev 2021-03-31 11:29:11 +00:00
Nataniel Borges
2935ef01dc Merge "Move Pip assertions to flickerlib" into sc-dev 2021-03-31 07:54:24 +00:00
Jason Chang
c15df4e3ac Apply "Dominant Palette A - 800" color to the background of
One-Handed mode

Change the One-Handed mode background color to
Dominant Palette A - 800. (#3C4043)

Bug: 177314967

Test: manual
Test: atest WMShellUnitTests
Change-Id: I68852d362f6f425832d36f3e60c2a41b9e505216
2021-03-31 15:11:16 +08:00
Tony Huang
71784f2ad4 Fix black screen while pip to split screen
Race condition caused pip animation end transition later than
split screen appear transition. Fix it by set to right surface
postiion on on pip side too.

Bug: 172381920
Test: Enter pip and split screen then expand pip
Change-Id: If5470a99385b389af87db1129994610002c035fd
2021-03-31 14:56:23 +08:00
Bill Lin
eb4158fbb0 Merge "Dispatch newDisplayLayout in updateDisplayLayout() directly" into sc-dev 2021-03-31 06:53:40 +00:00
Winson Chung
59415ea448 Fix some issues with pinch to resize
- Tweak calculation of resize bounds, calculate the scale from the change
  in distance between the pointers, and scale about the centroid of the
  pip
- Fix issue with rotation not being about the center of the pip
- Fix issue with jumping rotation on start of gesture
- Fix issue with animating to top when max bounds are used
- Fix issue with resizing while the menu is open not actually resizing
  for a brief period (the menu fading was triggering another pip
  animation)

http://recall/-/g6hkB0pXjyQSvfA8STqRAT/cW6W0tdqDzisBndgU2JnM7

Bug: 178881304
Test: Pinch to resize in the cases above
Change-Id: I3bdf535cda64b9ce1926c7081f6cc40d4d79ab69
2021-03-30 21:55:25 -07:00
wilsonshih
e697b8176c Prevent the decor view to be visible again after exit animation finish.
Fix the flicker when WindowState#removeIfPossible apply exit animation.

Test: atest SplashscreenTests SplashscreenTests
Bug: 183004107
Bug: 182815506
Change-Id: I3ac4ad98ab9e9c295f78ba6f86e1e02f2067163b
2021-03-31 11:30:55 +08:00
Jorge Gil
68a6b1a97b Merge "Check that the PiPParams are not null before getting seamless flag" into sc-dev 2021-03-31 00:22:54 +00:00
Winson Chung
48a183c5bd Merge "Separate BubblesController construction from initialization" into sc-dev 2021-03-30 23:45:11 +00:00
Jorge Gil
5ec8620a0b Merge "Account for OHM offset during PIP drag corner resize" into sc-dev 2021-03-30 23:07:58 +00:00
Evan Rosky
0bdcf9b9c6 Merge "Add one-shot remote handler and remote runner interface" into sc-dev 2021-03-30 23:01:43 +00:00
TreeHugger Robot
2fcbd1290d Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2021-03-30 22:44:51 +00:00
Winson Chung
b2724e8cb9 Merge "Only unlink death recipient if binder was previously added" into sc-dev 2021-03-30 22:38:12 +00:00
Winson Chung
e7802702ad Merge "Minor pip menu changes" into sc-dev 2021-03-30 22:33:43 +00:00
Jorge Gil
af38d60afe Merge "Don't skip cleaning up PIP state in onTaskVanished even if EXITING_PIP" into sc-dev 2021-03-30 22:23:00 +00:00
Sunny Goyal
74602f1b4c Merge "Removing SettingsLib dependency from WMShell" into sc-dev 2021-03-30 21:57:39 +00:00
Nataniel Borges
61c3ea1789 Move Pip assertions to flickerlib
Previously the assertions were part of WMShell, however it is easier to keep them in the library as they can be used in other projects

Test: atest FlickerTests WMShellFlickerTests
Bug: 162925924
Change-Id: Ia6ca7cce1da81be2b73166acce40218bc304a77a
2021-03-30 23:11:41 +02:00
Bill Yi
ad30b3d2e9 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I85f24b086d81576968a828427284f0192510d13a
2021-03-30 20:33:46 +00:00
Ben Lin
1bd4ed1f06 Merge "PiP: Don't start with marking pinch-resize gesture ongoing." into sc-dev 2021-03-30 19:54:37 +00:00
Hongwei Wang
6c9640f8b3 Merge "Disable PipMovesInAllApps temporarily" into sc-dev 2021-03-30 19:27:00 +00:00
Nataniel Borges
ba72075844 Remove all tasks before flicker tests
Ensures no other tasks are executing (cleanup) when a flicker test states to mitigate flakiness

Test: atest FlickerTests WMShellFlickerTests
Bug: 162925924
Change-Id: I84f712c8aba13ac845b9467f6c9753bc91e21a27
2021-03-30 21:19:08 +02:00
Sunny Goyal
dcdee33ceb Removing SettingsLib dependency from WMShell
Bug: 161980186
Test: Presubmit
Change-Id: I4cbdbd75b08c24649e7ce3c03f30425f1b2a5fea
2021-03-30 11:08:10 -07:00
Hongwei Wang
722871b3e4 Disable PipMovesInAllApps temporarily
Test's currently failing due to the new `device search`, disable for
now to unblock presubmit and re-enable once we have a working solution.

Bug: 184050344
Test: atest WMShellFlickerTests:com.android.wm.shell.flicker.pip
Change-Id: I6b75ea213b442400090ee0a3f2b7e46ee5ecd395
2021-03-30 17:01:41 +00:00
Evan Rosky
7eb1c4c24e Merge "Rename legacy SplitScreenTransitions to Legacy" into sc-dev 2021-03-30 16:18:27 +00:00
Ben Lin
3bbefb7ec9 PiP: update magnetic field radius for dismissmal as PiP resizes.
As PiP gets bigger, it should be that user doesn't have to put their
fingers as close as before to the dismiss bubble before it magnetizes
and pulls in PiP.

Bug: 164947242
Test: Manual. Resize PiP to larger and try to drag to dismiss bubble.
Change-Id: I2ec0fbfd87bc010d9ca551df0eeb77a22c02c6dc
2021-03-30 08:55:43 -07:00
Nataniel Borges
edd2a68464 Merge "Introduce a subject to assert changes over rectangles" into sc-dev 2021-03-30 12:26:23 +00:00
Wei Sheng Shih
744b9f18fd Merge "Catch getDrawable throw exception when add splash screen window." into sc-dev 2021-03-30 08:03:39 +00:00
Bill Lin
f18a7b0bc1 1/ Make One handed mode support multiple user switch
Previously OHM did not support for multile user switch
Now we hook SysUI onUserSwitch callback to update
latest one handed mode functionality by currentUserId

Test: atest SystemUITests
Test: atest WMShellUnitTests
Test: manually switch user and observe verify different OHM config
      for different users
Bug: 182278800
Change-Id: I8ae7d0aedcafc8f477f41d2703df2df53839a89f
2021-03-30 15:46:19 +08:00
Jerry Chang
04e05de6da Merge "Deal with display insets when layout splits" into sc-dev 2021-03-30 06:45:48 +00:00
Bill Lin
a3d573eb09 DisplayLayout set() include copy new mNavBarFrameHeight
Fixes: 183951120
Test: atest WMShellUnitTests
Test: manual adb shell dumpsys activity service com.android.systemui
Test: add Log to check mDisplayLayout.set()
Change-Id: I92d720017bc0e5fdfd4e7c1a6b84c5bb73578b57
2021-03-30 12:09:48 +08:00
Bill Lin
894696d61e Dispatch newDisplayLayout in updateDisplayLayout() directly
Empty DisplayLayout do not contain navigation bar height

Bug : Cold boot and set 3 Button NavBar Mode, observe
one handed mode can not trigger

Recovery step : Rotate once and the gesture become activate

Fixes: 183951120
Test: create forest and flash ROM, set NavBar 3 Button Mode.
Test: atest WMShellUnitTests
Change-Id: I930216719f77d0e15d46790e02b788ce9cd80e98
2021-03-30 12:06:41 +08:00