Commit Graph

259 Commits

Author SHA1 Message Date
TreeHugger Robot
5bc9594c6b Merge "Add divider view support for app-pairs" 2020-11-18 12:12:18 +00:00
Bill Lin
ceb6007a62 Merge "1/ Migrate cts SplitScreenTests to wm shell flicker test" 2020-11-18 05:38:21 +00:00
Mady Mellor
173fbed4bd Merge "Bubbles taskbar broadcast" 2020-11-18 02:17:45 +00:00
Mady Mellor
4ac05e33d3 Bubbles taskbar broadcast
* listen for broadcasts related to taskbar
* update info in BubblePositioner based on that
* show a scrim behind the bubbles when taskbar is on left / right so
  you don't see contents beneath

Test: manual
Bug: 173386799
Bug: 167413172
Change-Id: Id520718e779d3a45bcde447d7fcb0d2ba785c88e
2020-11-17 15:29:36 -08:00
Evan Rosky
6510883d40 Merge "Relocate transition collection around lifecycle events (1/N)" 2020-11-17 23:24:22 +00:00
Mariia Sandrikova
2b54b5d709 Merge "Make positioning in letterbox mode configurable." 2020-11-17 22:45:44 +00:00
Evan Rosky
738ba5601f Relocate transition collection around lifecycle events (1/N)
Previously was just using whatever the legacy transition system
used. However, that system would wait too late (until after
round-trips to the client) in order to prepare some transitions.
Since the new transitions utilize "snapshots", they need to
collect earlier in the lifecycle to work properly.

This first CL deals mostly with activity start/finish and
task to-front/to-back. It also adds some utilities like the
ability to abort a transition (needed because activitystarter
works this way) and the ability to un-ready a transition/
sync transaction to enable trampolines.

This also switches the transit types to the new constants.

Bug: 169035022
Test: Existing tests (TransitionTests) pass
Change-Id: I05f3a2e8e27ccaed7077d648daf033aeabc333f9
2020-11-17 12:56:30 -08:00
Sergey Nikolaienkov
2edad48f94 Merge "Test Pip window position when Pip menu is open" 2020-11-17 20:51:22 +00:00
Mariia Sandrikova
49fc5569f0 Make positioning in letterbox mode configurable.
Changes:
- Allow to specify in config_letterboxPortraitGravity and config_letterboxLandscapeGravity desired alignment for letterboxed apps.
- Add ADB commands to allow overriding these config values for testing
- Move positioning logic for letterbox mode from WM Core to WM Shell.

Test: atest LetterboxTaskListenerTest LetterboxConfigControllerTest
Test: go/wm-smoke
Test: manual with adb shell dumpsys activity service SystemUIService WMShell (get)set-letterbox-portrait-gravity / (get)set-letterbox-landscape-gravity
Fix: 170216257, 170215849
Change-Id: I8e6392faab05bec1bf61b9691f3bd9b8b09b9621
2020-11-17 20:15:31 +00:00
TreeHugger Robot
4583161d0a Merge "Import translations. DO NOT MERGE ANYWHERE" 2020-11-17 19:43:31 +00:00
Xin Li
75b98e92aa Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I3970b3166afdfafe655d85d6b0e960c3e58cb5cd
2020-11-17 17:45:36 +00:00
Xin Li
b7618f25f4 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I60840416d367892f951ba919e5976b251a333445
2020-11-17 17:44:59 +00:00
Bill Lin
d89e31bad2 1/ Migrate cts SplitScreenTests to wm shell flicker test
This is the initial version to achieve:
1. SplitScreenActivity in test-apps
2. Create SplitScreenTestBase and add a basic test cases to
   ensure SplitScreenActivity enter split screen mode
3. Assert StatusBar/NavBar/SplitScreenActivity showing when
   device enter split screen mode
4. Verify docked apps ending bounds

Bug: 169271943
Bug: 172811376
Test: atest WMShellFlickerTests:EnterSplitScreenTest
Change-Id: I26461b958c578dcbcc5ca2235f9d269559fd9ec5
2020-11-17 19:38:22 +08:00
Sergey Nikolaienkov
31fcbcfed1 Test Pip window position when Pip menu is open
Bug: 171520419
Test: atest WMShellFlickerTests:TvPipMenuTests
Change-Id: Ie0a5651667bfe1bc04ee1127fbcd721b3bd36d81
2020-11-17 07:49:26 +00:00
Sergey Nikolaienkov
c0ad57cc03 Merge changes I9a138ba9,Ied62beb0
* changes:
  Test PiP on TV with different aspect ratios
  Always run TV PiP tests with 0 rotation
2020-11-17 07:39:09 +00:00
Sergey Nikolaienkov
160bd0f088 Test PiP on TV with different aspect ratios
Introduce TvPipBasicTest that runs a basic Pip scenario:
1) enter Pip;
2) open Pip menu using the Window button;
3) close Pip menu using the Back button;
4) close Pip.
The test runs with 4 times with different Pip window aspect ratios:
defaul; square(1:1); wide(2:1); tall(1:2).

Bug: 13054136
Test: atest WMShellFlickerTests:TvPipBasicPipTest
Change-Id: I9a138ba9daaac223d451bac750e6a028def0a468
2020-11-17 07:37:15 +00:00
Sergey Nikolaienkov
0451222aed Always run TV PiP tests with 0 rotation
Bug: 13054136
Test: atest WMShellFlickerTests:TvPipMenuTests
Test: atest WMShellFlickerTests:TvPipNotificationTests
Change-Id: Ied62beb0c8551c8a0572455bd790c11c5517f61d
2020-11-17 07:37:15 +00:00
Jerry Chang
0545edfa3d Add divider view support for app-pairs
Add divider bar for app-pairs. AppPairLayout and divide policy records
and handles the layout in pair.

Bug: 172704238
Bug: 172704672
Test: manul check the behavior of the splits and divider bar.
Test: AppPairTests, AppPairsPoolTests, AppPairsControllerTests

Change-Id: I688c7001d056fe8dd9a192885e1f9fd5f004dc11
2020-11-17 11:22:19 +08:00
madym
a3bac99dc4 Merge "Remove mrenouf from Shell/OWNERS" am: febaec9f3e am: b58226efcd am: b570fbc30f am: 42a13dba3f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1500070

Change-Id: I9affcd032844a7a85dec9d07b1373d12cfde0c3b
2020-11-17 01:48:05 +00:00
Jorge Gil
dc2fe53ee6 Merge "Use PipBoundsState to access current bounds" 2020-11-16 17:53:29 +00:00
TreeHugger Robot
324710c1ba Merge "Import translations. DO NOT MERGE ANYWHERE" 2020-11-16 17:22:35 +00:00
Mady Mellor
5262ae0110 Remove mrenouf from Shell/OWNERS
Test: none
Bug: none
Change-Id: Ie0489dce898f33c52e8817b27d78a3f5a7aecabc
2020-11-16 08:07:40 -08:00
Bill Yi
0df907672a Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ibe7ac1aa6c164371992dd2c162d4243ae31ad1b1
2020-11-16 11:17:54 +00:00
Bill Yi
003e100558 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I0ee0fe11d014ea62f3a8d41af393b2ae3a9b93fc
2020-11-16 10:51:59 +00:00
Jorge Gil
990f36728b Merge changes I423219e9,Id5636cfc
* changes:
  Move movement bounds into PipBoundsState
  Move normal and expanded bounds into PipBoundsState
2020-11-13 21:56:15 +00:00
Sergey Nikolaienkov
a2b16e18ec Merge "Do not call assumeTrue(isTelevision) in @After" 2020-11-13 16:35:48 +00:00
Wale Ogunwale
40901fa082 Merge "App-pairs baseline commit" 2020-11-13 14:35:57 +00:00
Bill Yi
6433688129 Merge "Import translations. DO NOT MERGE ANYWHERE" 2020-11-13 14:19:46 +00:00
Wale Ogunwale
fe8c73b18d App-pairs baseline commit
- AppPairs: Main interface used to pair and unpair tasks.
- AppPairsController: Main controller for app-pairs and implements
AppPairs interface.
- AppPair: Manages a singal instance of an app-pair consisting of a
root task and 2 other tasks that are paired together.
- AppPairPool: Helper object pool for AppPair class so we don't have to
wait for a root task creation from system_server when we need an
app-pair.
- adb shell commands for pairing and unpairing tasks

Test: adb shell commands for pair/unpair
      adb shell dumpsys activity service SystemUIService WMShell \
        pair taskId1 taskId2
      adb shell dumpsys activity service SystemUIService WMShell \
        unpair taskId
Test: AppPairTests, AppPairsPoolTests, AppPairControllerTests
Bug: 172704672
Change-Id: Ie0a70c1aa764ad83b763931501234c1960251ca4
2020-11-13 21:33:38 +08:00
Sergey Nikolaienkov
327e175409 Do not call assumeTrue(isTelevision) in @After
Only call assumeTrue(isTelevision) during test setup (@Before), and do
not call it in teardown (@After), which causes tests to fail instead of
be slipped.

Bug: 171520419
Test: atest WMShellFlickerTests
Change-Id: I12f72d46a63c497686f0da7c4763ae79bbeb7dcd
2020-11-13 10:10:07 +00:00
TreeHugger Robot
b8b238ee60 Merge "Import translations. DO NOT MERGE ANYWHERE" 2020-11-13 08:56:13 +00:00
Bill Yi
900019eed9 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Idec787e63b7c639d0926b08ecd6638acfc200e00
2020-11-12 16:06:32 -08:00
Bill Yi
9a0801dfa4 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I76acee8bb5fad886f9b181f81c86467ddca25423
2020-11-12 15:38:07 -08:00
TreeHugger Robot
90db0daf07 Merge "Fix IME always focusing bubbles" 2020-11-12 19:39:03 +00:00
jorgegil@google.com
5b9f045c23 Use PipBoundsState to access current bounds
Bug: 169373982
Test: com.android.wm.shell.pip
Change-Id: I49e45d122444b80144c069224284f58c992ad16e
2020-11-12 11:27:44 -08:00
jorgegil@google.com
4f93268de7 Move movement bounds into PipBoundsState
Bug: 169373982
Test: com.android.wm.shell.pip
Change-Id: I423219e9093f52edbd84ef52b928219679e187bc
2020-11-12 11:14:36 -08:00
jorgegil@google.com
8dcbe0c9bf Move normal and expanded bounds into PipBoundsState
Bug; 169373982
Test: com.android.wm.shell.pip

Change-Id: Id5636cfc7c9cfa828dd51f1a79e2ba1ed3b79c42
2020-11-12 11:13:07 -08:00
Sergey Nikolaienkov
ded47e0d1d Merge "Report if SystemUI crashes during TV Pip tests" 2020-11-12 18:47:05 +00:00
Mady Mellor
ca8244d800 Fix IME always focusing bubbles
Test: have a bubble, open it, focus IME, remove bubble, open anything else
      and check that the IME still works.
Fixes: 172977221
Change-Id: I73d57d81d274f5af0e8f69e158f3ccb862e0d379
2020-11-12 10:05:01 -08:00
Jorge Gil
5384885a56 Merge "Rename PipBoundsHandler to PipBoundsAlgorithm" 2020-11-12 16:53:00 +00:00
Sergey Nikolaienkov
af5c8ad1cd Merge "More TvPipMenuTests tests in WmShell" 2020-11-12 06:07:21 +00:00
Shawn Lin
f076bba8e2 Merge "Support hide display cutout with display area" 2020-11-12 04:49:35 +00:00
madym
54db2fb08e Merge "Add mady to Shell/OWNERS" am: 708e1e5995 am: 8ee7052466 am: 8365756bc7 am: 19cd892b9e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1496467

Change-Id: I12ca72a0c312efc27b77796218fc3b1729f01310
2020-11-12 00:54:46 +00:00
Mady Mellor
ed1098532d Merge changes I36b9cedc,I79948a4b
* changes:
  Allow Bubble overflow to be opened without other active bubbles
  Flexible bubble sizing & fixed position
2020-11-12 00:26:43 +00:00
Mady Mellor
157cd3f736 Allow Bubble overflow to be opened without other active bubbles
Currently you can only access the overflow if you have bubbles in
the stack. There are a bunch of explorations that show accessing
the overflow without the stack (e.g. from taskbar, from people area).

- BubbleData holds onto BubbleOverflow now
- When last bubble is removed, if showing in taskbar/already expanded
  & has overflow bubbs, select the overflow.
- No longer null out BubbleStackView when no more bubbles, this
  allows overflow to continue to show
- Added tests for overflow behaviour in BubblesTest

Test: atest SystemUITests
Test: manua 1) - produce a bunch of bubbles
               - expand the stack, dismiss each bubble
               => when you dismiss the last one, overflow selected
               - collapse the stack
               => overflow goes away
            2) - have taskbar cl / prototype
               - have bubbles in the overflow but no active bubbles
               => observe that taskbar shows the overflow (i.e. sysui
                 renders the stack in that spot)
Bug: 171322463
Bug: 167413172
Change-Id: I36b9cedc492ace59105dba58c89f9ef92ff4b9e8
2020-11-11 12:58:12 -08:00
Mady Mellor
97fcd7a082 Flexible bubble sizing & fixed position
This will enable some stuff for taskbar & hopefully make customizations by
ARC++ easier??

- BubblePositioner now tracks the size of the bubble & bitmap within it.
  Have to use a multiplier to derive the size of a couple of things now
  (e.g. bitmap size)
- BubblePositioner now tracks the position of the bubble stack & allows
  a way to override / set a fixed position. If something is in fixed
  location, it is not draggable (however when expanded you can still
  drag individual bubbles to dismiss)
- BubblePositioner tracks some taskbar related info
- Rather than checking for "isLandscape" we want "showBubblesVertically"
  (e.g. device might not be landscape but should be vertical if taskbar)
- Fixes an animation issue where bubbles super-overshoot the y position
  when expanding vertically.

Bug: 167413172
Test: a lot of manual testing
Test: atest WMShellTest SystemUITests
Change-Id: I79948a4bd6b58fb3aa2f52e2553f3dfc31630cf1
2020-11-11 12:57:29 -08:00
Jorge Gil
3131ab322a Merge "Remove unused imports in PipController" 2020-11-11 20:14:35 +00:00
Ben Lin
a5a96475fb Merge "Enable PiP stashing." 2020-11-11 19:19:59 +00:00
jorgegil@google.com
67959b765d Rename PipBoundsHandler to PipBoundsAlgorithm
Now that all state handling has been moved out of
PipBoundsHandler, this CL renames it to
PipBoundsAlgorithm and cleans up its public API
so that it functions more like an utility to
calculate several types of "bounds" related to PIP
such as:
- Default bounds
- Normal bounds
- Movemement bounds
- Entry bounds
- Bounds adjusted to aspect ratio
- Inset bounds

PipBoundsAlgorithm's is then only responsible for
calculating such bounds based on the current state of
PIP (owned by PipBoundsState) but it no longer owns
or manages the state, as that would be the
responsability of its users (e.g PipController).

Bug: 169373982
Test: atest com.android.wm.shell.pip
Change-Id: I67c3004b60069160f82d7c3d00d8c3995c0c5f80
2020-11-11 11:07:23 -08:00
Mady Mellor
be0403bcfc Add mady to Shell/OWNERS
Bug: none
Test: none
Change-Id: Ib552ee4a77002eeb089091084cc7d1a4c845e142
2020-11-11 10:09:10 -08:00