Commit Graph

1146 Commits

Author SHA1 Message Date
Ben Lin
0b0c1d0fdc Merge "PiP: Disable corner resizing." into sc-dev am: 1b2d7328a7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14068892

Change-Id: I24fbdcf9a2d03de1c4d5bd2e7fba747c6bb6f4a2
2021-04-02 22:12:34 +00:00
Ben Lin
1b2d7328a7 Merge "PiP: Disable corner resizing." into sc-dev 2021-04-02 21:56:03 +00:00
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
Darryl Johnson
961985da6c Merge "Make PipMotionHelper injectable" into sc-dev am: 6b7f69ef38
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13930078

Change-Id: Iaeba1f22d9abaa3cf5a77567f0ac7462981ec01f
2021-04-02 06:51:52 +00:00
Darryl Johnson
6b7f69ef38 Merge "Make PipMotionHelper injectable" into sc-dev 2021-04-02 06:18:44 +00:00
Hongwei Wang
19515e1640 Merge "Protect the default media PiP PendingIntent" into sc-dev am: 8affff3ab2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14070328

Change-Id: I2eb82ccd8051a628bac09e23c257dc9d08cc21f1
2021-04-02 05:48:11 +00:00
Hongwei Wang
8affff3ab2 Merge "Protect the default media PiP PendingIntent" into sc-dev 2021-04-02 05:08:13 +00:00
TreeHugger Robot
03cde43d60 Merge "Crop the surface using the rect hint before animating out of PIP" into sc-dev am: 9587d2c459
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14056637

Change-Id: I5c22a3b39d831b24cb7cd860598da4d77559fea3
2021-04-02 00:54:45 +00:00
Jorge Gil
37f2e1904f Merge "Remove redundant posting of the crossfade to the main executor" into sc-dev am: dfef1c17d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14068634

Change-Id: I83d30da10c1fb95d9eb47704e580c7681023d9c2
2021-04-02 00:54:19 +00:00
TreeHugger Robot
9587d2c459 Merge "Crop the surface using the rect hint before animating out of PIP" into sc-dev 2021-04-02 00:54:04 +00:00
Hongwei Wang
1ae3e9abc1 Protect the default media PiP PendingIntent
- Add permission when register broadcast receiver
- Set receiver package explicitly when constructing PendingIntent
- Do not crash if there is no active media session when receive broadcast

Bug: 171967947
Test: adb unroot; adb shell am broadcast -a \
                      com.android.wm.shell.pip.PLAY
Change-Id: If9c46aab9d91de633a2628513430a59a6692e59a
2021-04-02 00:43:13 +00:00
Jorge Gil
dfef1c17d6 Merge "Remove redundant posting of the crossfade to the main executor" into sc-dev 2021-04-02 00:33:15 +00:00
Bill Yi
4d709a0149 Merge "Import translations. DO NOT MERGE ANYWHERE" 2021-04-02 00:01:14 +00:00
jorgegil@google.com
04b163370b Remove redundant posting of the crossfade to the main executor
Now that the SyncTransactionQueue calls back on the main thread,
it is not necessary to move the crossfade animation to the main
thread again.

Bug: 171393374
Test: Enter PIP, resize, crossfade works
Change-Id: I4022733921f4655220a5c9ae186bf10a1838f59a
2021-04-01 13:53:35 -07:00
jorgegil@google.com
04e03fc31f Crop the surface using the rect hint before animating out of PIP
While transitioning from PIP->Fullscreen the surface is uncroped
and scaled using the source rect hint from the PIP position to
the destination bounds (fullscreen). The animation controller
creates its own SurfaceControl.Transaction to apply the scale
and crop to the surface, which means that the transform is not
applied until the next frame.
To avoid this bad frame, apply the initial surface control
transaction again after starting the animation using the
SurfaceControl.Transaction supplied by the SyncTransactionQueue
callback.

Bug: 184166183
Test: Enter PIP with YT, exit to fullscreen and verify there's no
jank/flash

Change-Id: I4e4ba51be03aa86e0629e8d6532c0c4098c21aed
2021-04-01 13:47:27 -07:00
Bill Yi
14efd0187f Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Iff4e9c470e683a126c475af8884aa754ed120564
2021-04-01 18:36:36 +00:00
Ben Lin
1d57a3b9aa Merge "PiP: Ensure PiP menu layout updates are on Shell main thread." into sc-dev am: 085035f9cc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13933477

Change-Id: I4a45559f031872abe44dac4832273e4477176e59
2021-04-01 18:06:39 +00: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
23135f4758 Merge "Flicker test for PiP and launcher shelf height" into sc-dev am: 313a5ed5fa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14055865

Change-Id: Id5c061e3f2202dc1c11c991e4bdc280ee32d8e08
2021-04-01 16:42:53 +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
852f4bf24c Merge "Don't reset Z order if the expanded view is temporarily animated out." into sc-dev am: 3c942191cb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14057889

Change-Id: I8a3d95b2077d9575b3113de27b2c6e0ba2978a46
2021-04-01 15:44:58 +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
2d28bdf1c0 Merge "Fix black screen while pip to split screen" into sc-dev am: c8b7266594
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13982586

Change-Id: Ie4445e21e0ecd928fda0a2efc40ac4934fd81f81
2021-04-01 06:52:34 +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
9bd83ee894 Merge "More minor menu changes" into sc-dev am: 0aa964394e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14054656

Change-Id: Ief93af1f03c312049e9f436e4f613c7d406fcaad
2021-04-01 06:24:37 +00:00
Winson Chung
0aa964394e Merge "More minor menu changes" into sc-dev 2021-04-01 06:22:11 +00:00
Winson Chung
915cba9381 Merge "Extend pip dismiss overlay to under cutout" into sc-dev am: 5cd74d3d26
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14056110

Change-Id: I35c2ab8dddd040a643e1ba9a2c62054ca11af042
2021-04-01 06:06:55 +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
aa83cc4fe8 Merge "1/ Make One handed mode support multiple user switch" into sc-dev am: f9d740b0dc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13851605

Change-Id: I855e7ece30235a85b82a5903bee6d2f9d0ebac02
2021-04-01 02:37:25 +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
cb3ed65258 Merge "DisplayLayout set() include copy new mNavBarFrameHeight" into sc-dev am: 9ad3b820be
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14024689

Change-Id: I2ddaa076142c8d27d3c92070fdb4ec177e7730d6
2021-04-01 00:50:14 +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
Jorge Gil
4664af1be0 Merge "Account for OHM offset before possibly hiding the PIP menu" into sc-dev am: 5d2a09adf0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14054950

Change-Id: I75a49dbaf3f60b1c864d7283aa245b149df5ef4a
2021-03-31 22:42:50 +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
Iver Hsieh
265b7d336f Make PipMotionHelper injectable
This change allows PipMotionHelper
and PipSnapAlgorithm can be injected
for customization.

Bug: 181956433
Test: manual test - test snapping PIP windows
      atest PipBoundsAlgorithmTest PipTaskOrganizerTest PipTouchHandlerTest
Change-Id: Ic6e54f178b40ae21f8e198d8953db619b3ac9ec4
2021-03-31 12:50:40 -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
eb5c46a23f Merge changes from topic "remove-all-tasks" into sc-dev am: 400197ade7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13898767

Change-Id: Ie5deb6c271b3f5e5457b3c0a88d9ee32a1a84173
2021-03-31 17:10:23 +00: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
b036ac21b2 Merge "PiP: update magnetic field radius for dismissmal as PiP resizes." into sc-dev am: beb4f03369
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13976320

Change-Id: Ic7b4a272a51a2de71d94300cf9692c50fd1deb43
2021-03-31 16:44:16 +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
1d2b2c69dd Merge "Fix some issues with pinch to resize" into sc-dev am: 87a79200bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13993363

Change-Id: I3ad5cd7d6211b46ac6ef067703cf09a9276dd5ed
2021-03-31 16:21:27 +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
22b7e19bac Merge "Prevent the decor view to be visible again after exit animation finish." into sc-dev am: ef355db3ec
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13929088

Change-Id: I3a7899a1b484b1c072f040d253aa030d198524df
2021-03-31 13:21:15 +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
e237d2b224 Merge "Apply "Dominant Palette A - 800" color to the background of One-Handed mode" into sc-dev am: dfe477f26d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14011906

Change-Id: I9e1c5362cc3333d1ca2bfa3fd2cea5cd0606d315
2021-03-31 11:41:02 +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