Activity visibility messages simply move the activity to STOPPED or
STARTED state. We can use the lifecycle messages to do the same and
simplify the logic/remove duplicated code.
This CL also removes the option to send STOP message without making
the client invisible and actually calling onStop(). This option
caused a mismatch of the state between server (STOPPED) and client
(PAUSED). Also, in cases when the device was going to sleep, STOP
message was always followed by SLEEP message, which called onStop()
anyway.
Bug: 137329632
Bug: 129750406
Test: AM/WM CTS and unit tests
Change-Id: I487575520ce301bb2f65519f0c0a30b6b9edac0c
The bulk of the work needed to get MediaProvider building against
the "system_current" SDK surface has been slowly merged over the
last few months, and this change makes the last few adjustments.
This adds a new StorageVolumeCallback which is simpler version of
StorageEventListener that simply delivers the changed StorageVolume.
Move DownloadManager logic into a onMediaStoreDownloadsDeleted()
method which hides the implementation details of how the OS connects
with that implementation.
Make local copies of some ExifInterface parsing logic; they could
be added to the androidx version in an unbundled release. Make a
local copy of RedactingFileDescriptor, since it's only needed for
the next few weeks until FUSE is globally enabled.
Bug: 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Ib416eb8724781bdd234c8b7d728dee8b695ad6ac
Rename android.util.TimestampedValue to android.os to avoid dependency
from android.util onto android.os, which is disallowed by lint.
Bug: 147012511
Test: boot
Change-Id: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
Add a method to the DevicePolicyManager for finding out if the device is
an organization-owned device with a work profile (i.e. it has a work
profile but the work profile was created during the provisioning flow).
This method is currently available for privileged callers (system API),
since other methods (e.g. isDeviceManaged) are also restricted.
NOTE: Addition of GTS tests is pending final decision on whether this
will be public API or not.
Bug: 143518237
Bug: 144978467
Bug: 147340575
Test: atest FrameworksServicesTests:DevicePolicyManagerTest#testIsOrganizationOwnedDevice
Test: CTS tests that are on hold for now.
Change-Id: I26ce1de10844dc297924427a6d46df9208931ab0
If an input ANR is caused by the lock of window manager
or activity manager is held for a long time, we usually
get an unhelpful stack traces because the ANR reporting
is also blocked by the locks.
The pre-dump checks if the locks cannot be acquired within
a timeout, then dump the stack trace at the beginning of
notifying ANR.
Bug: 144987910
Test: 1. Launch a simple app.
2. Set break-points inside the lock of window manager
and activity manager.
3. Press back key and wait 5s.
4. Check the path /data/anr/ in device. There should
be a filename ends with "_pre".
Change-Id: I9831a31e17661d822572c73e64fe9980fe018b22
change #setBroadcastSubscriber and #unsetBroadcastSubscriber
to avoid using intentsender
Bug: 146074295
Test: Ran GTS Tests
Change-Id: I1510e44bcdf49b579fd49f51081c6a40618039fa
avoid using intentsender in #sendActiveConfigsChangedBroadcast
and #removeActiveConfigsChangedBroadcast.
Bug: 146074295
Test: Ran GTS Tests
Change-Id: I9313299ea0bc89f092b1c62fbfc34e06a127eaa9
Add a new @SystemApi disable utility method to allow telephony's
mainline module to disable the status bar when the device is SIM-locked
Bug: 146834818
Bug: 138956541
Test: atest StatusBarManagerTest
Change-Id: Id3757fc560c5b70bed553f19b050524a024b4c78
This
- pipes through the featureId from AppOpsService to HistoricalRegistry
- changes the file format of historical app ops by adding the feature-id
tag. This will make us loose all previously collected app-ops. This is
ok as we never shipped a device with historical app-ops enabled
- Adds a new layer to the HistoricalOps hierarchy. For backwards
compatibility it is possible to go directly from package to op. In this
case a combined HistoricalOp object is generated on the fly.
- It is possible to filter historical ops requests by featureId.
Unfortunately a 'null' featureId is a valid ID. Hence there is now a
dedicated mask of paramters to filter for (@HistoricalOpsRequestFilter).
- Fixes the equals methods of HistoricalOp by implementing an equals
method for LongSparseLongArray
Test: atest CtsAppOpsTestCases AppOpsServiceTest
Bug: 136595429
Change-Id: I92c41e8ae2cd471051c2d628d49a3ad6a5a66330
Add cross_profile_apps.xml and
DevicePolicyManager#getAllCrossProfilePackages. This sets the list of default package names set by the OEM for the user to approve/disapprove for
cross profile communication during managed provisioning setup.
Some Javadoc can be improved once all CLs are in, since different APIs
should refer to each other.
BUG: 136249261
BUG: 144577776
BUG: 145970297
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: I214b521ffc7fb0179bff1ca65d6bc2a9f8decea3
Also, removes the 'privileged' protection level from the INTERACT_ACROSS_PROFILES permission and replaces it with 'appop'. 'Wellbeing' is also added temporarily, which will also be removed in this release.
This is part of a change to enable users to consent to cross profile app communications
BUG: 136249261
BUG: 144577776
BUG: 141690885
Test: atest AppOpsTest
Test: atest PermissionPolicyTest
Change-Id: I910daf7605f83946af171f38db002b920079f30b
Modified setTime and setTimeZone to be callable by a a profile owner
of an organization-owned device as well as a device owner.
Bug: 138709470
Test: Manual testing with testdpc and the set auto time zone toggle
atest com.android.server.devicepolicy.DevicePolicyManagerTest
atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSetTime
atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSetTimeZone
atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testSetTime
atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testSetTimeZone
atest com.android.cts.devicepolicy.DeviceOwnerTest#testSetTime
Change-Id: I2de94035c20fc53cdd629860c84f237f3e7eaa1f