Add an API in WallpaperManager (client and server) and
WallpaperService to pass a wallpaper zoom value to the
wallpaper service and engine.
Bug: 146387434
Test: (added testDeliversZoomChanged)
Test: atest WallpaperServiceTest
Change-Id: Idd9ea2aefb845ad1d330cbdd6e088b926bcfece7
Forced was meant to mean "forced by the user." Renaming the constant and
clarifying the comment so it doesn't get used incorrectly. Also
introducing a "forced by the system" constant and fixing the code so the
correct reason is used.
Bug: 145551233
Test: atest AppIdleHistoryTests
Test: atest AppStandbyControllerTests
Test: atest UsageStatsTest
Change-Id: I0d258d83141670728b758a3ef0056b19fde4a88b
Restrict adding a managed profile when the device has a device owner.
This mode is no longer supported, in favour of Corporate Owned,
Personally Enabled mode (Organization-Owned device with Managed Profile).
The restriction on adding managed profiles is now added by default when
a device owner is set, and is removed when the device owner is removed,
to avoid other system copoments from creating a managed profile when
there's a device owner.
Additionally, the method for checking whether pre-provisioning
conditions are met has been modified to return an error if the
restriction is set.
Bug: 145271440
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Change-Id: Ife25f4e2faffe84d85ab7786407c14997b4cf069
Expose system apis / permissions needed by the telephony module to
communicate with the system server for time and time zone detection.
There are also small improvements for @Nullable.
Bug: 147012511
Test: build only
Change-Id: I27e5aa4c594d5fbad0b6f043afb9e910dcba4349
Historically, FRP behaviour was built on top of the application restrictions
infrastructure. This CL introduces new behaviour, as the profile owner of an
organization-owned device needs to be able to control FRP behaviour and
cannot set application restrictions on user 0.
- Introduced a new FactoryResetProtectionPolicy object
- Added it as a field to ActiveAdmin
- Created a default value
- Added setFactoryResetProtectionPolicy to DPM which is used to set a
factory reset protection policy. If the policy is null, the current
policy is cleared and set back to the default value.
- Added getFactoryResetProtectionPolicy to DPM to retrieve the current
factory reset protection policy. If this is the default value, then
no policy is set.
- Both these APIs are callable by the device owner or profile owner of
an organization-owned device.
Bug: 143517230
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
atest com.android.server.devicepolicy.FactoryResetProtectionPolicyTest
atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testFactoryResetProtectionPolicy
atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testFactoryResetProtectionPolicy
Change-Id: I72c4d06ec8a27741a1956d082969573077937726
The service is already registered in ServiceManager. It needs to be
accessible from SystemServiceRegistry so that other mainline modules
can communicate with it.
Bug: 147255753
Test: Dependent CLs using the service
Change-Id: I940c62064466c3b3b8d2a195b810e90eaade7e6c
This change provides an API that allow external modules to
register a custom provider of NetworkStats to merge the
network statistics that cannot be seen by the kernel to system.
Test: atest FrameworksNetTests CtsUsageStatsTestCases
Test: atest NetworkPolicyManagerServiceTest
Test: m doc-comment-check-docs
Bug: 130855321
Change-Id: I265bc637c40666cde505fde5056d2d9bfc5fb204
Extracted from ag/9990011 to make NetworkStatsManager sync with internal
line, given that it is missing in aosp/1198084.
Bug: 126528330
Test: Treehugger
Change-Id: I77f50326869799f51d4636cb7c6d7c97daf531e6
Merged-In: I42117ebfb640e3b0b133183e5e146860bed8471a
Overlays targeting shared libraries should be loaded into the
resources of every target that depends on the shared library.
Static shared libraries are currently not supported because overlays
should override all versions of static shared libraries and there is
not currently support for an overlay targeting multiple APKs.
Also created a test instrumentation and host test suite for testing
overlays and packages on the system image.
Bug: 140790224
Test: atest OverlayRemountedTest
Change-Id: I20a217b6368d6cf92b2b9f46908fd58012933f72
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
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
Merged-In: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
Change-Id: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
(cherry picked from commit d159015e54)
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I8789f8499d4dca08580672e9e45ed9a7026dd686
Merged-In: I8789f8499d4dca08580672e9e45ed9a7026dd686
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