* 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
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
An earlier CL with benchmarks has shown that sending strings as UTF-8
is 50% faster for US-ASCII strings, and still 68% faster for complex
strings referencing higher Unicode planes. (So an improvement in
both cases!)
Since code across the OS still makes heavy assumptions about Parcel
strings typically being UTF-16, we need to carefully migrate
Parcelables by hand, which is what this CLs begins doing.
This is a purely mechanical refactoring with no functional changes.
Bug: 154436100
Test: manual
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: Ia9e581efd7c40269342b7528ca07363deb843c0f
This was originally omitted because the only known case this
branch was hit was after a package update, which would inherently
change the code paths for the package.
Thus, spending the time to calculate these oldPaths was worthless
because they would never be applicable.
Seemingly this case where the paths are not changed has been
found, causing duplicate paths to be added to the same ClassLoader.
This warrants further investigation to determine why, but for now,
this should be safe to commit to fix the issue.
Bug: 149410951
Test: manual used steps at b/149410951#comment57, verified that
paths were not added multiple times; device functions as normal
otherwise
Change-Id: I632994dd19cae2b0101d7386826c8f8c7251051a
The method will be used in AnrTests to check if the system can support ANR Dialog or not.
Bug: 149510025
Test: atest AnrTests
Change-Id: I7a78be06fcf3c4882931aaea1d330b2cebdc2d84
Test: atest NotificationManagerTest (with CTS cl)
Test: manual - have test app on "all" setting
- get a bubble
- hit "unbubble" from notification
=> no longer bubble
- get update to that notif, it shouldn't bubble
Bug: 154232758
Change-Id: I1611002418cad18ec2426e7d8b4cd4dc93e6df24
Changes to allow CTS test to control organized task so we can have the
tests run the same way sys-ui is driving things now. Control is given
back to sys-ui once the test is done running.
Bug: 149338177
Test: atest CtsWindowManagerDeviceTestCases:SplitScreenTests
Change-Id: I74a03ee3411f5b10ea4e26c1cc3c663dc394dd97
Bug: 152451909
Unit tests often execute server code in the context if a test process.
Such a process does not have the same permissions as formal system
processes. In particular, such a process does not have permission to
invalidate binder caches.
This change disables all binder cache code in the current process.
This means caching is disabled and invalidation never occurs. There
are no permission violations and the test process is also unable to
affect (through cache invalidation) the actual system processes.
Test: Ran a list of atests. Two had security violations before the
change but were okay after the change:
* FrameworksServicesTests
* UserSystemPackageInstallerTest
Ran additional tests to verify no regressions:
* PlatformScenarioTests
* PtsChreTestCases
* BluetoothInstrumentationTests
* UserLifecycleTests
Change-Id: I011ee1eb39b2d52c69b6d5164b64f7418d2bbdd4
Don't let process configuration change application configuration,
but allow to update non-default display configuration while
initialize since the context is focus on different display.
Bug: 148639826
Test: atest PresentationTest ActivityThreadTest AppConfigurationTests
Change-Id: I16ba4eee64406d097b7ff0b7ff5c45175623663a