Round one - needs polish, and actions may be added or removed
in the future, and demote isn't working yet.
Bug: 137397357
Test: atest
Change-Id: Ia52598bec58fc54b8bde29168cd419a24d1e4dab
Make isOrganizationOwnedDeviceWithManagedProfile a public method, as
there is no reason to keep this information hidden from apps.
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testIsDeviceOrganizationOwnedWithManagedProfile
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.MixedProfileOwnerTest#testIsDeviceOrganizationOwnedWithManagedProfile
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.MixedDeviceOwnerTest#testIsDeviceOrganizationOwnedWithManagedProfile
Bug: 143518237
Bug: 144978467
Bug: 147340575
Bug: 146123237
Change-Id: Iab45f20c9150a6b8bd48eea610484f36f199d3d7
Implementing the new API for A11y services to take the screenshot
of the specified display.
Bitmap takeScreenshot(int displayId)
1. The main codes is moved from the UiAutomationConnection class and
let the UiAutomation change to use this API.
2. Add a capability at metadata to check whether the A11y services could use this
API or not.
3. This API is a async one for A11y services, but is a sync one for
UiAutomation.
Bug: 10931661
Test: a11y CTS & unit tests
Change-Id: I478bd93c60d4742bef20ae0e423ca9de1bda55d2
This allows apps to get the string used so they can properly instruct
the user on how to grant a background permission.
Test: Manual, multiple languages
Bug: 147440267
Change-Id: Ibdc6563e85cae930c25a9338513f747440fee8b4
- Only allow delayed locking for the explicit call, stopUserWithDelayedLocking()
or for implicit user stopping caused by user switching.
- All other explicit user stopping should immediately lock the user. This allows
immediate locking from component like DevicePolicy.
- Product still should enable delayed locking explicitly and if it is disabled,
IActivityManager.stopUserWithDelayedLocking will behave the same with
IActivityManager.stopUser.
- Once user is stopped in delayed locking mode, one of following steps can completely
lock the user (this is not a complete list):
1. User is asked to be stopped with IActivityManager.stopUser call.
2. User is restarted through IActivityManager.restartUserInBackground call.
3. UserManager.evictCredentialEncryptyionKey (involves restartUserInBackground call)
4. When user is removed (involves IActivityManager.stopUser call).
Bug: 131757355
Test: run unit tests
check user locking in car device where delayed locking is enabled.
Change-Id: I663ffde3a5b74738a6f59b4282ff562146f22662
Currently we have no method of telling transports that we have
attempted to make a Key/Value backup, but there was no data to
back up. This means that for apps with K/V backups their last
backup timestamp becomes older and older causing confusion for
users about whether the app data hasn't changed or whether the
app is failing to back up.
By introducing this flag we create a signal for the framework
to tell transports that, if there was any changed data, the
data would have been backed up, but the apps has not indicated
any changes have been made. This allows us to provide a UX
based on last non-erroring attempt rather than last data
change.
Bug: 147481066
Test: No code introduced in the CL.
Change-Id: Id832c7173da6341c6dc7b77fb72c289f2e1da624
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
Merged-In: I940c62064466c3b3b8d2a195b810e90eaade7e6c
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
It should be impossible to resolve a custom appComponentFactory
if the LoadedApk doesn't contain any code paths, so just skip
it to avoid logging an incorrect error.
Bug: 146219140
Test: manual force updateApplicationInfo call, verify bunch of
errors before fix, no logs after fix; rest of device works
Change-Id: Icbb8533c95c9437ec0a946886e00b9c341e21796
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