When an app is letterboxed, it cannot always take up the full
task bounds, and we need to constrain the PIP animations to
the constraints imposed by the layout.
Change-Id: If238ddfb4462c7e1e5c975f76666ad1d4ec3b076
Fixes: 77802617
Test: Enable cutout emulation, enter landscape, verify transitions both into and out of pip work as intended.
Test: atest ActivityManagerPinnedStackTests
When we go to AOD, we hide Home's app token - which causes
the docked stack to unminimize. There was some protection against
that because the same thing happens on the keyguard, but that did
not work because the keyguard state is not aware of AOD. Instead,
we pipe the source of truth from AM down to WM and use this instead.
Change-Id: I68d1079a6bbd9080816ee52c1b5650623a661421
Fixes: 79267409
Test: Enter split screen, go to home, turn of screen, turn on screen. Verify docked stack stays minimized and there is no janky transition
When the global system ui visibility changes,
this clears certain sysui flags from windows. However,
if we then use this value to perform layout, we might
lay out the window in a way the app did not expect and
that is not stable during transitions in and out of
full screen.
To fix this, always use the sysUiFl that the app provided
in its window attributes, instead of using the window state's
changing state.
Change-Id: I5f9b3ed37be84553e9e2d912a102675beb6fc11a
Fixes: 76084813
Test: Open Video in browser, enter full screen, play, press home. Verify transition into PiP is smooth.
The snapshot profile produced with `adb cmd package snapshot-profile`
needs to be readable by the others group so that adb can pull it.
Test: adb shell cmd package snapshot-profile pkg;
adb pull /data/misc/profman/pkg.prof
Bug: 74081010
Change-Id: Ibef8551704116e0b695f725e95f1671acbb82b5d
In the current design, IdleController of Job service considers devices as ‘idle’ after 71 minutes of screen off. But under docking use scenario, devices screen might remain on for a very long time and it’s not necessary implying the device being interactive with users.
So create a mechanism for device to enter the ‘idle’ state that JobScheduler can kick off idle tasks.
Bug: 79183658
Test: atest DeviceStatesTest
Change-Id: I5b307ca51e28ffca63f79a9c43984c3b76e51629
There is a legitimate use case when sending a PendingIntent from
within system_server, for example AlarmManager. However, we used
to WTF always in this case.
To fix this, we only WTF when trying to use a remote animation
that originates from within system_server.
Test: Boots, open apps
Change-Id: I7bafae9f899cbb8966cf22166270000ce887baba
Fixes: 79417917
Some app launches go through different stacks. However, in P we
have one stack per task, which broke launch time tracking for
certain apps.
We fix this by tracking launch time per windowingMode, like we
do in ActivityMetricsLogger.
Test: Delete Chrome app data (to ensure FirstRunActivity gets
invoked, am start -n com.android.chrome/com.google.android.apps.chrome.Main -W
Fixes: 78302265
Change-Id: I739e63aeaf04d6336621e3d61f065259e518d9b4
When an app calls startForegroundService() from a bg state (e.g. from a
broadcast receiver) but the user has placed it under FAS, it's incorrect
to crash the app: it hasn't actually violated the fg/bg restrictions
contract. Fail quietly instead, just like the legacy-app case when O+
restrictions are imposed on it.
Change-Id: I3e8ed2ea6bdbf4167249132ddf9b7c549b9a8062
Fixes: 79235311
Test: ApiDemos [before and after changing target sdk to O+]
Test: atest android.app.cts.ServiceTest
until PHASE_THIRD_PARTY_APPS_CAN_START, to avoid TelecomService
triggering an (superficial) ANR.
Bug: 34123235
Test: 1) Boot 2) Add Thread.sleep(30_0000) before Looper.loop() in SystemServer and make sure
telecom won't trigger the ANR
Change-Id: Ic49535f3edb4225a27a708550f9e5325f03170fb