This allows listener know task's orientation request change before
handling display rotation through IDisplayWindowRotationController if
they can register a local TaskStackListener.
Bug: 150409355
Test: atest WmTests:TaskStackChangedListenerTest#testNotifyTaskRequestedOrientationChanged
Change-Id: Id7bfc3e63329ce26d454b7e9c143e084e04dd365
Previously, we generally required fully qualified names for referring
to inner class constructors (like #Notification.Builder()) despite that
not being valid javadoc. Now, we properly support #Builder() syntax and
the old syntax will error.
Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f
Merged-In: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f
(cherry picked from commit 4c4aa41272)
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.
To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
- worked around by fully qualifying the constructor
Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Merged-In: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
(cherry picked from commit e0624c7a40)
Clean up various code paths to correctly use the "packageName" option to
limit its output to only information about that package.
Also do a little re-arranging of the output to cleanup a bit recent
stuff that was added, so the end of the output is still the important
high-level summary of process states.
Bug: 155437855
Test: manually inspected various "dumpsys activity" output.
Change-Id: I2ebe6f7ab3d433281993eb3959d375e2e53e0df9
When process configuration was applied on the client side it
accidentally applied an override to display adjustments in resources
for all ResourceImpl objects. This resulted in resources of
activities having incorrect display adjustments and reporting
incorrect display size.
This change fixes the issue by applying the activity's override
configuration on top of the app config before updating the
display adjustments.
Note: This is a slight revert/rework of Ib3ee007bc
Fixes: 148639826
Test: ActivityThreadTest#testHandleConfigurationChanged_DoesntOverrideActivityConfig
Change-Id: I08a5bc29443fbdefbca791240aeaff8f138b8756
We now infer the PIP/MW mode change from the new configuration.
Note also that both
- Activity#isInPictureInPictureMode
- Activity#isInMultiWindowMode
infer the current state from the configuration rather than querying
against the WM.
Also in this CL:
- When in removePinnedStackInSurfaceTransaction, keep the pinned stack
hidden till the windowing mode is set to fullscreen, this is to surpress
the attempt to set the activities to be started in reparenting
- When in ActivityRecord#shouldBeVisible, should take account the force
hidden flag, which is not actually in use before
Bug: 144097203
Bug: 142282126
Bug: 138329093
Test: atest ActivityLifecyclePipTests \
ActivityLifecycleSplitScreenTests \
ActivityLifecycleTopResumedStateTests \
PinnedStackTests \
SplitScreenTests \
ActivityTaskManagerServiceTests \
RecentsAnimationTest \
AssistantStackTests \
StartActivityTests \
ActivityVisibilityTests \
MultiDisplaySecurityTests \
MultiDisplaySystemDecorationTests
Change-Id: Ibe032b5e50ba5c6d6bc44ebb54d07ac974ebe656
This patch will add a fake IME window to virtual display when IME is
showing and covering a bubble window. Without the fake window, the
bubble will not receive the correct IME insets.
To do that, this patch:
1. Added an interface in ActivityView to get VirtualDisplay when needed,
in order to create the display context.
2. Modify the visibility update. When the target is not a client
controlled target, we ignore the client visibility. We also call
visibility update when the control target updated.
3. With the modified infra, add the window with correct param and
context.
Bug: 150780413
Test: atest WmTests:DisplayPolicyLayoutTests
Test: atest InsetsStateTest
Test: atest InsetsPolicyTest
Test: go/wm-smoke
Test: See reproduce steps in the bug
Change-Id: I52691b5c7f81261de580bb4fc762e88486e78141
* fix BubbleExtractor tests to work with this & better
test things now that the channel is a tristate
Test: atest NotificationManagerTest BubbleExtractorTest
Bug: 155025024
Change-Id: I8b75c1b0087ca79cea29741e32c7c524cb056d04
Removing the mapping is prone to races in keeping the state consistent
with the server. An inconsistent state can lead to multiple alarms on
the server for the same listener.
Test: atest CtsJobSchedulerTestCases doesn't fill the alarm queue with
more than one alarm.
atest CtsAlarmManagerTestCases
Bug: 154444435
Change-Id: Iaf11d5decb17fbf2366b49d9865231bf65dbdc41
For things to work correctly in a bubble they must be
flagged to behave as documentLaunchMode=always
Test: atest NotificationManagerTest
Bug: 150719933
Change-Id: Ic5680c40fd2cbf0e9d0809a0a87a166f1e328c74
Because of the new app visibility constraints introduced in Android R,
apps may be unable to load icons from the TextClassifierService (TCS).
This is because the TCS returns "Icons" based on resources to the apps.
These resources were globally available until this new restriction.
In this CL, the TCMS rewrites responses with Icon(typ=RESOURCE) coming
from a TCS to responses with Icon(typ=URI). The new icons are backed
by a content provider that may be used to retrieve the necessary icons.
Bug: 151847511
Test: atest tests/tests/textclassifier/src/android/view/textclassifier/cts
Test: atest core/tests/coretests/src/android/view/textclassifier
Test: Select a phone number text, check that the "Call" icon shows
Change-Id: Ib63e54462508029cdf0e56c2c6a82ff4e81b02a8
The file descriptor is only closed in certain situations. Explicitly
closing it to ensure we don't have any leaks.
Bug: 154277871
Test: take a system heap dump via developer options & and watch for StrictMode violation
Test: adb shell am dumpheap <system|another app> & and watch for StrictMode violation
Change-Id: I3ae3e270bcec18ba531055becfff32924c8f2a2d
When creating Context without a container Context, cache the value of #isSystemOrSystemUI().
Fix: 154161051
Test: atest FrameworksCoreTests:ContextTest
Change-Id: I1d16173c7da06a73d1338e3d6e75f5b56fcdbe23
This way receivers like recents know whether the activity
was already visible before a restart attempt.
Bug: 154575664
Test: added test. Can also launch a running activity into
split-primary and it won't expand it.
Change-Id: If59ee1615fa36bbe3af9412194a7f96b9377528a
Background
* In Android R, the UI of the work challenge was
updated to latest material spec which no longer
uses the organization color.
Changes
* Update javadoc of setOrganizationColor mentioning
the organization color will no longer affect the
work challenge starting from R.
Bug: 153607870
Bug: 153607569
Test: verify no build breakages
Change-Id: I071f544e4fba1915d810fa741dbc79966f9e72f4
ActivityManagerService.onUserRemoved was accidentally removed in
ag/4246926. This cl adds it back.
The part of onUserRemoved that told ActivityTaskManagerService that
the user had stopped (and thereby cleaned up ATMS) was retained, but
the additional actions of AMS.onUserRemoved - namely, telling
BatteryStatsService and UserController - were accidentally removed.
Consequently, those services were never told when a user was removed.
Bug: 140645064
Test: manual verification that profile is removed in adb shell dumpsys activity users
Change-Id: I903b06ae68d583bdb326ad3b764a63d18b5555d8
This reverts commit b3230a3594.
Reason for revert: Possibly the cause of b/154581087
Bug: 154581087
Change-Id: I4a7ebeb33f68b8918d24b1e59638bbc5fa38bf72
This change is to prevent misuse of window context from app
and leads to performance drop on system by limit the numer of window
context an app can use. Code snippet below is a sample to cause
this issue:
```
Rect getBounds() {
Context windowContext = context.createWindowContext(...);
return windowContext.getSystemService(WindowManager.class)
.getCuttentWindowMetrics().getBounds()
}
```
This method could be invoked dozens of times and produce dozens of window
tokens. It would slow down the speed of window traversalling. These
token won't be removed until system server has been GC'd.
Test: atest WindowContextTests WindowContextPolicyTests
fixes: 152934797
Bug: 153369119
Change-Id: I927e85a45c05c4d90b51a624ea408ff3a3ffce93
* Add @TestApi isFactoryResetProtectionPolicySupported()
to DevicePolicyManager which returns whether factory
reset protection policy is supported on the device.
Bug: 153696811
Test: atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testFactoryResetProtectionPolicy
Change-Id: Id0bd6cdacf33f0fb2f795e1ead5127b79f42960e