Now that we don't have a re-used pinned stack anymore, this is
how it should be. This also helps CTS align closer to actual
app usage.
Also don't perform transactions on detached containers (but log
an error). This is because CTS triggers various pip events which
fire callbacks after the test tears-down.
Bug: 153201813
Test: PinnedStackTests pass
Change-Id: I57bf4db35f7c05c18a69d2bf39b66ccca07d39f2
Steps to reproduce the bug:
- Restart the device
- Open Duo app and make a call
- When in call, try entering PiP
Duo application contains multiple activities and we create a new stack
from its top activity when moving it to pinned mode. This newly created
stack does not carry on the existing PictureInPictureParams, nor it is
marked as visible. Therefore, no onTaskAppeared would be sent to the
task organizer.
Also in this change:
- Removed aspectRatio and sourceHintBounds used to be passed into
RootWindowContainer#moveActivityToPinnedStack, they are used in
moveActivityToPinnedStack and one should refer to the
PictureInPictureParams set on ActivityRecord
- Added a null check for existing token when onTaskInfoChanged is
invoked in PipTaskOrganizer, it should be a fatal error that
onTaskInfoChanged is called ahead of onTaskAppeared
Bug: 152933995
Test: manually enter/exit PiP mode for Duo app
Test: atest RootActivityContainerTests
Test: atest ActivityRecordTests
Change-Id: Ifa9ad8768ba47ce043b8dd86cadc729931edcb14
Now, while moving a task and its parents to back, if it
runs into a createdbyorganizer task, it will stop there and
reparent itself into whatever container the home-stack is
in.
Bug: 153081856
Test: added tests to ActivityStackTests
Change-Id: I0be24bd2e753a58bea9bf00724bc4131836b6011
When device is locked after reboot - packageManager cannot resolve
the service. Instead, rely on the configuration that is provided
at the sign time. SystemServer relies on this as well, so it is
consistent.
Bug: 151176054
Test: manually
Change-Id: Ifc1c078e3d774d63b8aeec2fe6b332305e47847b
Consider the steps with fixed rotation enabled:
1. Sensor reports landscape and the foreground is a fixed
portrait activity, so the display is portrait.
2. Launch a rotatable activity so the activity is created
in landscape. Before the remote rotation completes, the
display hasn't applied the rotation.
3. Sensor reports portrait and then the remote rotation is
done. Display is still portrait but the rotatable activity
has shown as rotated.
To avoid flickering when updating the configuration of the
activity from landscape to portrait, a rotation animation
with customized original rotation is still applied to cover
the change.
Fixes: 151597653
Test: ActivityRecordTests#testActivityOnCancelFixedRotationTransform
Change-Id: Ie897885782aaa1411113bb7fdbac6c4f33fdc0ef
- This removes the need for a separate task stack listener and aligns
with other task info change properties
- Also implement equals/hashCode for the token so we can use it in
containers
Bug: 148977538
Test: atest TaskOrganizerTests
Signed-off-by: Winson Chung <winsonc@google.com>
Change-Id: Ie035e6389fdbdc374c1a4b4a684758efa0cb7a9e
For a given network, resolver doesn't know what transport types are.
Therefore, when a new network is created or transport types are changed
in a give network, transport types will be updated and sent by calling
setResolverConfiguration(). In the same time, if link properties or
transport types are null, setResolverConfiguration() won't be called.
The original behaviors of setResolverConfiguration() aren't changed.
Only increasing one new behavior that when a given network has transport
type change, calling setResolverConfiguration() directly and resolver
updates the transport types for that given network.
Bug: 143732914
Test: atest FrameworksNetTests
atest FrameworksNetIntegrationTests
Change-Id: I6527cde0e177ba08c886576131b35fc769c2bb53
... and avoid rebooting system_server.
There is no benefit in rebooting the system_server.
Fixes: 153461865
Test: Tested via a shell command that the sound trigger middleware
service can indeed reboot the HAL and correctly recover from it
dying.
Change-Id: Ie476968b6acf97bf701d0e2929e7bd099e19cd56
When a sticky service crashes and is restarted by the system it should
retain its permission even if granted one-time.
Also make one time permission manager aware of package uninstalls.
Test: atest OneTimePermissionTest
Bug: 151405396
Fixes: 153701894
Change-Id: I7c440394aecf4308ecfe904ff56ffac94f0150ef
PipTouchHandler, similar to other components in SysUI, should be in-sync
with the destination bounds calculated within SysUI rather than WM.
Fixed also the empty movement bounds upon the first call to
PipTouchHandler#onMovementBoundsChanged. Together, this change should
fix the PIP not being lifted on IME show up. PipTouchHandlerTest is
updated correspondingly.
Bug: 153352899
Test: manually enter/exit PiP
Test: atest PipTouchHandlerTest
Change-Id: I2912af2a181b7fb57c6d90751744d46c6b3366d2
IncrementalService can create the library files beforehand, but
delay filling in their data. As it takes quite a while in
general (over a second in cases when the phone is busy), it's
better to run the unzipping and filling in a separate thread
and only make sure it finishes before the whole installation
process is complete.
This speeds up the megacity.apk installation by ~250-300ms,
1000-1100ms -> 750-800ms
Bug: 153513507
Test: adb install megacity.apk
Change-Id: Ia44f7e45b9e0abaebdfb6fe5352f9dcf29ab4ece
If the activity doesn't handle a configuration change and needs to be
relaunched, preserve the windows to prevent a flicker.
Test: resize in split screen and observe there is no flicker
Fixes: 153583483
Change-Id: Ibe71035da9eb2bd9dca270e7eca8e47afbffcb78
This reverts commit 304db43153.
Reason for revert: This CL broke a test: b/153606760
Bug: 153606760
Change-Id: I6034fad7f88de14518ea9f46bf8774e4b8196926
If wallpaper is visible and its target window has fixed rotation
transform, wallpaper token will be associated to share the same
transform. So if the target window cancels the transform, the
associated window, i.e. wallpaper should also be restored to the
original configuration.
Fixes: 153420536
Fixes: 153201558
Test: atest WindowTokenTests#testClearFixedRotationTransform
Change-Id: I75fe8bfadf3b681f2dc33df9c6599a9bbc5769ea
scanPackages was called whenever it receives a broadcast,
which could be duplicated.
This CL adds a boolean variable (mScanPackagesScheduled) not
to scan packages if it is scheduled.
Bug: 153527463
Test: cts test, atest mediarouertest and check
MediaRouteProvider#onBind, #onUnbind are called
when a new provider is installed.
Confirm # of calls is reduced (3 -> 1).
Change-Id: Iaa423b7d1b2b2a97aebed0001b4077bdf95b1d54