An existing task can be brought to front while starting
an Intent. In that case, the launching TaskFragment will
remain empty because no new activity instance created.
Monitor the activity launch result and prevent waiting
if the activity instance was not created and cleared the
pending appeared intent.
Bug: 233989810
Test: atest TaskFragmentContainerTest
Test: atest SplitControllerTest
Change-Id: I1bdf516673b71892921da14bdcdb9d1c23ce0a9a
By making the channel list inside of NotificationChannelGroup
a ParceledListSlice also
Test: NotificationChannelGroupTest
Test: NotificationManagerServiceTest
Test: PreferencesHelperTest
Bug: 215072888
Change-Id: I391ce0b104af99a11b3a5db31fb8d0321f3a4988
Instead of a callback/observer mechanism between the alarm subsystem and
the broadcast delivery subsystem, there will be a direct
BroadcastOptions tag that the Alarm Manager uses to annotate broadcasts
that originate from an alarm firing. Only the OS itself can use this
BroadcastOptions annotation.
Fixed unchecked null reference situation.
Bug: 161537193
Test: atest CtsAlarmManagerTestCases
Test: atest BroadcastOptionsTest
Test: atest FrameworksMockingServicesTests:AlarmManagerServiceTest
Merged-In: I70a7be35f198bcf9a3cfa232c309a381b2391e34
Change-Id: I70a7be35f198bcf9a3cfa232c309a381b2391e34
Trying to get a task information via ActivityManager#getAppTasks()
will not report tasks that aren't associated with calling package
by the root activity package name. For activities that are from
a different package the task wasn't found, so the windowing mode
couldn't be checked and WM Extensions didn't report any display
features.
This CL adds a dedicated method to check the task windowing mode
for a given activity token.
Bug: 236295340
Test: ActivityEmbeddingIntegrationTests#testDisplayFeaturesWithEmbedding_differentPackage
Change-Id: If2dbc337c4b8cb909914cc28ae4db28a82ff9de3
The source rect hint specified by the app is normally a result of
View#getGlobalVisibleRect (or equivalent) that does not count the window
offset in scenarios like the app is placed in the middle of display by
the system when
- app specifies sensorLandscape
- display is actually in portrait mode (on large screens)
Fixed this by adjust the source rect hint on ActivityRecord whenever the
internal PictureInPictureParams is updated.
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/dr7uy1qxB1RGjZVvElo7kr
Bug: 235599028
Test: Verify entering PiP animation working as intended for \
app specifies sensorLandscape when auto-enter-pip and \
make-launch-into-pip (aka. content-pip).
Test: atest WmTests:ActivityRecorderTests \
WmTests:ActivityStarterTests
Change-Id: Id991adbae45a7b61d09105a9aee9cbfecd6b66be
The current configuration in the client activity could be
updated via the other flow (from ViewRootImpl). So, it is
possible that the client activity configuration is different
from the last reported configuration that cached in the system.
If the configuration changed again in that case, the
ActivityConfigurationChangeItem could end up without reporting
Activity#onConfigurationChanged if the differences between
the new configuration and the current client activity
configuration contains the configuration changes that the
activity cannot handle.
Update the activity current config only when reported, so
the configuration differences can be correctly evaluated from
the new configuration and the configuration last reported.
Bug: 231312158
Bug: 236415038
Test: repro steps on the bug
Test: atest ActivityThreadClientTest
Test: atest OverlayHostTest
Change-Id: I56a871fb30809f5f75f0007601a7629f9435e03a
To avoid Recents thumbnail being empty, a snapshot is triggered if no
cache exists.
Bug: 191272693
Test: manually test with Exo (Host apps on virtual display.) to check if
the Recents displays non-empty thumbnail.
Change-Id: I2a898d5127e18e6209ff236d3a72aa22c2a0ca82
Fixes: 233975804
After content has been shown, we should clear the
mEnterTransitonCoordinator so that the exit doesn't
accidentally try to use the enter transition information
to remove Views.
Test: manually tested example from bug report
Change-Id: Ida7ca354cb75953d1d5ecffc159da0d7320d4349
The delay was introduced to suppress JIT activity during startup.
However, ART no longer uses the expicit process state signal as an input
to informing JIT activity, so the delay can be removed.
By forwarding the process state immediately, ART can make more informed
decisions about activity based on process state, e.g., suppressing
madvise calls for less important (non-foreground) processes.
Bug: 235390330
Test: m + presubmit + boot tests
Change-Id: Ia95a76f86cf4c38bf89e56f954dbf59e0083ec50
Merged-In: Ia95a76f86cf4c38bf89e56f954dbf59e0083ec50
update to reflect the new usage of the extra in forcing platform side
provisioning.
Bug: 236597525
Test: n/a
Change-Id: Ie98e9aaa790d1c0bd4b2d5e2b85a81bd8e3c92e3
When the enableOnBackInvokedCallback is set to false (or not set),
registering an OnBackInvokedCallback should be a no-op to avoid
overriding the default compat callback.
Test: Manual testing registering a callback on an app with the flag
disabled and doing a back gesture. Currently we don't have test
executing a back gesture so automated tests are not possible
Bug: 235206960
Change-Id: I54d843f11130a78ed5a68cbe4722e601a2086ee1
Merged-In: I54d843f11130a78ed5a68cbe4722e601a2086ee1
(cherry picked from commit aa48dc3c2d)
When apps are restored, set their standby bucket to RARE if
they have been used within the past 90 days, based on the
restored UsageStats data.
Bug: 214580000
Test: atest UsageStatsDatabaseTest
Change-Id: I9d63032ef84fef97734b51323f41b797caa4f554
(cherry picked from commit 89f69113ad)
The current configuration in the client activity could be
updated via the other flow (from ViewRootImpl). So, it is
possible that the client activity configuration is different
from the last reported configuration that cached in the system.
If the configuration changed again in that case, the
ActivityConfigurationChangeItem could end up without reporting
Activity#onConfigurationChanged if the differences between
the new configuration and the current client activity
configuration contains the configuration changes that the
activity cannot handle.
Update the activity current config only when reported, so
the configuration differences can be correctly evaluated from
the new configuration and the configuration last reported.
Bug: 231312158
Test: repro steps on the bug
Test: atest ActivityThreadClientTest
Change-Id: Ifa27d222bb0905053cf12e08c423bf7bfad904cd
Before this CL, minimum dimensions of Activity wasn't respected,
that said, an Activity could be embedded in a TaskFragment of which
bounds are smaller its minimum dimensions.
This CL add the minimum dimensions on several places:
WM core:
1. Verify minimum dimension requirement before adding an Activity to
a TaskFragment. It'll be early return if the requirement is not
satisfied.
2. Propagate the minimum dimensions to the client side through
TaskFragmentInfo to notify the requirement.
3. If TaskFragmentOrganizer tries to shrink a TaskFragment to
the bounds that smaller than minimum dimensions of its children
Activity, switch to match the parent bounds.
AndroidX Window extensions:
1. Early return if TaskFragment is resized to the bounds that smaller
than minimum dimensions which dispatched from the server side.
2. When organizer tries to show Activities side-by-side, verify if
minimum dimensions requirement of the primary Activiy. If the
requirement is not satisfied, show Activities in fullscreen
instead.
TODO: Add an API to check if an Activity intent is allowed to embed
in a TaskFragment.
Bug: 232871351
Test: atest TaskFragmentOrganizerControllerTest
Test: atest TaskFragmentOrganizerTest TaskFragmentOrganizerPolicyTest
Test: atest SplitActivityLifecycleTest
Test: atest CtsWindowManagerJetpackTestCases
Test: atest WmJetpackUnitTests
Merged-In: Ib46c2cec2a0735b9e3f3420f2cb94754801b86b9
Change-Id: Ib46c2cec2a0735b9e3f3420f2cb94754801b86b9
Hidden Activity API allows a component holding permission
MANAGE_MEDIA_PROJECTION to declare that the result of setting up the
MediaProjection session should be returned immediately to the host VC app.
The host VC app will cycle through the resumed state when the activity
result is delivered to it, and return to its original state.
Manually tested with test MediaProjection app.
Test: atest WmTests:ActivityRecordTests
Bug: 230607871
Change-Id: Ic85fe8657b9e7f526bbc37a52011d16afa8aef2c