Before, when the organizer binder died, it will trigger TaskFragment
removal that can cause surface placement. Now, we make sure to cleanup
all pending events before removing organized TaskFragments.
Bug: 251583070
Bug: 254322068
Test: atest WmTests:TaskFragmentOrganizerControllerTest
Change-Id: Ifec6f763a7e7819c93cc28d71bd0314f3ac9ac0d
Before, we only send TaskFragment info event to the client side when the
Task is visible, which may result some TaskFragments stuck in an
intermediate state. Now, we also send the info event to the client if
the app owns any visible Task, and let the client organizer to determine
if it wants to update the TaskFragments.
Bug: 251583070
Fix: 250943776
Fix: 251132298
Test: atest WMJetpackUnitTests:SplitControllerTest
Test: atest WMJetpackUnitTests:TaskFragmentContainerTest
Test: atest WmTests:TaskFragmentOrganizerControllerTest
Change-Id: I47570639c4ed4bdfb4202f65ba4531adbd4a2d2d
When multiple activities are launched through a PendingIntent, all
activities need to be launched onto the same root task. To ensure
that, the launch root task information from the passed-in
SafeActivityOptions object are used to create a new
SafeActivityOptions object for bottom activities.
Bug: 243630981
Test: Drag and drop "new conversation" shortcut of Messages to split
atest test_selectiveCloneLunchRootTask
Change-Id: I437db94f0019cf561464527147da08ccf4ac4cd3
Teardown logic introduced in ag/16247901 is called on a foreground
thread in ActvitiyManager. The teardown itself might be time-consuming,
causing system_server to crash due to a blocked foreground thread (see
linked bug for more context).
This CL limits the scope of the fix to just the new logic that caused
the regression. Follow-up improvements should be made to ensure
time-consuming operations don't block foreground threads in the future
(b/242307900 will track).
Fixes: 213860448
Test: 1. atest UserBackupManagerServiceTest
2. atest CtsBackupTestCases
3. Kill app during full backup -> ensure agent is properly torn
down.
4. Modify BackupTransport::cancelFullBackup() impl. to block; kill
app during full backup -> ensure foreground thread is not
blocked and agent is still properly torn down.
Change-Id: I6c1cb1ff71814564d5884a362135edfad3b258f2
This address two remaining issues with with ALS logging since the pointer events were removed from the framework (starting at commit aa07cc3db3).
1) After the pointer events were removed the logging was updated to use wakefullness events as an alternative trigger. However, these events are often too slow when authenticating from the AoD and the sensor may not have a chance to be enabled or respond before the operation completes. The new method allows the sensor to be enabled after the operation has completed to fetch a value.
2) Fixes a bug where the initial wakefullness status was not checked at the start of an auth operation.
Fix: 253318983
Test: atest ALSProbeTest FingerprintAuthenticationClientTest BiometricLoggerTest
Test: statsd_testdrive 88 (verify lux field is always greater than 0 from AoD and with BP test app)
Change-Id: I2b1572579f52dc9dad7238d47e27b0068c7c74c6
asleep.
This allows us to enter the dream directly while the device is off, instead of needing to wake the device before entering dream.
Bug: 246472225
Test: adb shell cmd dreams start-dreaming (while device asleep)
Test: atest PowerGroupTest
Change-Id: Id4634f3d5f7c3ae324f85f11a6991f0cab068a7d
At the moment, an activity with "behind" doesn’t go in
letterbox as expected when it’s at the top of a portrait-only
one which was letterboxed in landscape device orientation.
An activity with "behind" orientation will be letterboxed if it is
the activity that's immediately beneath it
Test: Launch an activity using SCREEN_ORIENTATION_BEHIND on top
of a fixed orientation activity and check it's letterboxed. Also run
`atest ActivityRecordTests`
Fix: 244309481
Change-Id: I221e4c2a778a4e2ea11795e82366bf5bb08a5507
1. When moveActivityToPinnedRootTask with creating a new Task for PiP,
make sure the Task's initial bounds is the same as the activity
parent TaskFragment so the animation starts from the correct bounds.
2. When exit PiP to previous Task, make sure we are animating the
correct window surface. For the previous implementation. there can
also be TRANSIT_CHANGE change for entering ActivityEmbedding split
(from PiP) in the same transition.
Bug: 207070762
Test: atest WmTests:RootWindowContainerTests
Test: atest WmTests:TransitionTests
Merged-In: Ifba090ad9ac9fb7033d343eab1c87c1a67bb9c11
Change-Id: Ifba090ad9ac9fb7033d343eab1c87c1a67bb9c11
When desktop mode is supported, launch freeform tasks in a larger
default size.
Test: launch in task in desktop mode, observe new default size
Bug: 250097202
Change-Id: Ide757fa419323e4e7529d4480a095cd4a11e3d00
Otherwise unlike activity always has a valid initial config, wallpaper
may get an empty config (frame) if it is initializing when invisible.
Bug: 251371010
Test: atest WindowManagerServiceTests#testRelayoutExitingWindow
Change-Id: I41c1b350d56657b5e93456f8e57b788696747d92
As dreams get more complex, we would like more specific loggings for how
dreams are started/stopped for better debugging.
This CL adds "reason" as a required parameter in the start/stop dream
internal/private API. This allows callers to specify reasons.
Bug: 252796782
Fix: 252796782
Test: verified reasons are correctly logged on device
Change-Id: Icea03eb6e23ca113f50fa047f6d57e6e1d0b5604
When in 'tabletop' or 'book' mode, allow the display to rotate
even if it is frozen. Then return to the previously locked rotation when
the device is unfolded.
Bug: 240146362
Test: locally tested + ran atest on DisplayRotationTests
Change-Id: I9869f5b070fecd7df70e08323dfacef8b883f470
Fix "'when' expression must be exhaustive" and UNEXPECTED_SAFE_CALL
errors.
Bug: 216136346
Test: m checkbuild
Change-Id: I2c1b1f7581426496f31198896c4ff3bd9abf2941
(cherry picked from commit 64acfee25d)
Merged-In: I2c1b1f7581426496f31198896c4ff3bd9abf2941
The root cause is that TaskFragmentParentInfo wasn't be dispatched
when there's a display or visibility change because we didn't
implement getTaskFragment() in TaskFragment and it led to
the TskFragment can't return itself if the predicate function
returns true.
This CL fixes WC#getTaskFragment and changes to dispatch
Task#shouldBeVisible instead of Task#isVisibleRequested.
The reason is that the visibleRequested change is not early enough for
the scenario that device is folded from unfolded state, and lead to
Settings flickering.
Test: manual - open Settings and fold the device
Test: atest TaskTests#testGetTaskFragment
Test: atest TaskFragmentOrganizerControllerTest ActivityRecordTests
fixes: 249055633
Change-Id: Ie1c56758697d14b426c9ed713da84e49c9f880d8
If all the siblings of a change are changing in a similar way
(ie. all ending-up visible or non-visible) then they can be
considered the same mode for promotion (ie. if one child is hide
while the other is close, it is valid to promote).
Bug: 250012839
Test: atest TransitionTests
Change-Id: Iedd12ee0ca6c026848c6c4d3259fef541609f724
The condition in [1] was accidentally inverted. Then the activity
might get an intermediate config from view root but ActivityRecord
isn't aware of that.
[1]: I19af6cf7f9a4a27fbc987d920630e2de95ced602
Bug: 245225302
Test: atest WindowManagerServiceTests#testRelayoutExitingWindow
Change-Id: I4cbbd52f32019fbc7347365156b1e95399d1ecc7
During navigateUpTo, it will first resolve the activity before creating
the ActivityStarter. This bypasses the explicit intent filter
enforcement introduced in T, exposing a security flaw that allows
non-matching intents to be delivered to components.
Bug: 238602879
Test: atest CtsWindowManagerDeviceTestCases
Change-Id: I9aa3e27f753f2f809e74a8f421f8b68e4d610702
Merged-In: I9aa3e27f753f2f809e74a8f421f8b68e4d610702
Otherwise even if keepAppearanceInPreviousRotation is not called,
the draw transaction requested by InsetsSourceProvider#onPostLayout
may still be deferred with start transaction of transition even if
blast group sync is off.
Bug: 247856453
Test: TransitionTests#testDisplayRotationChange
Change-Id: I8360ab65d886e86351c3fa3ffcbff5ec88accedb
Merged-In: I8360ab65d886e86351c3fa3ffcbff5ec88accedb
ag/19763724 modified Sandman.java to use LocalServices, but it turns out
that Sandman.java is exposed to clients via PowerManager - where
LocalServices isn't available. This caused PowerManager#dream to break
Fixes: 249916607
Test: atest UiModeManagerServiceTest
Test: "OKG go to ambient" voice command
Change-Id: I3e031593568fdb7b92a1209823463832feeb1601