This change introduces a new appop, ACTIVATE_PLATFORM_VPN, that is a
subset of the ACTIVATE_VPN appop. VPN apps that have been granted the
more dangerous ACTIVATE_VPN appop should be allowed to use platform
VPNs, as they are more restricted, and safer. However, the opposite
must not be true.
Bug: 144246835
Test: Compiles, FrameworksNetTests passing
Change-Id: I609e87e688432f957751058b09f350fa641753d7
The code path to register and uregister pullers now goes through
StatsManagerService as opposed to StatsCompanionService. Pullers are
also now cached in StatsManagerService.
Test: m -j
Test: atest GtsStatsdHostTestCases (passes even when the RVC check is
removed from relevant tests)
Bug: 147010937
Change-Id: I6549a41e2059c5fc9e57d861b751760ef165f879
A first take at the TaskOrganizer API for allowing SysUI to control task presentation.
In this CL we introduce the first two primitives:
1. The interface itself for implementation by SysUI
2. Support for organizing a given windowing mode (but atm really only PIP)
We include a sample app that manages the PIP from an APPLICATION_OVERLAY window.
Bug: 139371701
Test: wmtests/TaskOrganizerTests. TaskOrganizerPipTest
Change-Id: I44a8ed311bc5f06285bba2c6ff3b37a7d19a9190
Created a compile-time flag VERIFY that when enabled will compare
any answer returned out of the cache with the true server response.
If the answers differ and the invalidation nonce has not changed,
the cache will log which query induced the response.
Bug: 146018074
Test: Manually flashed and verified that the cache captures invalid
responses.
Change-Id: I716b6aad5c4dac975e96fa05f0e18829f76c8636
Add CrossProfileApps#canRequestInteractAcrossProfiles,
and CrossProfileApps#canInteractAcrossProfiles public APIs.
This provides apps the ability to check if they can interact across profiles,
or can they request that from the user if not.
BUG: 136249261
Test: in progress
Change-Id: Ifd561d5d5efcd167e24a5f05c22496d1fe9c81fc
INTERACT_ACROSS_PROFILES should work as a replacement for INTERACT_ACROSS_USERS so we don't have to give privileged system components a permission that is more powerful than is necessary.
Javadoc and annotations of the bindServiceAsUser API will be modified in a subsequent CL.
Unlike INTERACT_ACROSS_USERS, calling an API for a user in a different profile group will throw a SecurityException.
BUG: 140807471
BUG: 136249261
Test: atest ContextCrossProfileHostTest
Test: tested locally that granting the permission allows access to
bindServiceAsUser
Change-Id: I2878067bb2369d26a9ac5504ddd8c0e753f67898
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