To follow up on the previous review, rename the success constant from
"success" to "no error" since the enum it's associated with now refers
to error codes.
Bug: 124301971
Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testPrivateDnsPolicy
Change-Id: I6b82dd44cbf2c18fb8c1673a272f22f0e8b39dbb
This is to match the method name "getPasswordComplexity" as requested by API review feedback
Bug: 128030136
Test: N/A
Change-Id: I999657f88ed425333adbe97b9ecc33da3769ba90
Previously, the agent will have to query the TrustManager to see if a
recently added escrow token has been activated. If the agent asked too
soon about the token state, then the result could be inactive. That
will be hard to distinguish from when the token is actually inactive
because activation failed.
This change pipes the call from LockSettings to the TrustAgentService
through the TrustManager when the token is activated. So, the trust
agent doesn't have to query, it just gets notified.
Bug: 124312230
Test: Observe the onTokenStateReceived() callback received on the trust
agent.
Change-Id: I0ac674219fd7925ba36f50bb695c9998c18226f7
Add more a specific description of what methods do when the
secure lock screen feature is not supported by the device.
Bug: 123270501
Test: make
Change-Id: Ib6c16f421cf3dc60b0f0cb0c6335c6dc35ac7ece
This is much slower than the old way as we need to call into a different
process. On the other hand this handles the following cases correctly:
- foreground / background permissions
- pre-M apps
- split permissions
Test: CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testPermissionGrant,testPermissionPolicy,testPermissionMixedPolicies,testPermissionAppUpdate,testPermissionGrantPreMApp
Change-Id: I5cd139ad29e5b77b77b02e12c75eb774984a7759
Bug: 124128308
Relating to frameworks/base
Bug: 120484642
Test: manual - test setting and unlocking passwords/pins/patterns.
automated - about 20 failing due to an issue in the test code.
Change-Id: I57aa530ca2db1a026c56b66f5b4c91172f2667f6
Clarify the errorMessage Javadoc and rename InstallUpdateCallback.
Bug: 123697817
Test: Not applicable
Change-Id: I257b6353310e56bf1877a6f97bf1977ef5962af9
Let the delegated certificate installer access device identifiers
(serial number, IMEI, meid) via the standard platform APIs.
This makes sense since the DO/PO can already access Device IDs and
there's no technical barrier from the DO/PO to send the Device IDs to
the app it nominated as the delegate.
To make things simpler for the delegate and DPC, let the delegate access
the Device IDs directly.
Bug: 120616022
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegatedCertInstallerDirectly
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testDelegatedCertInstallerDirectly
Change-Id: I0c996eeb0d35e99821ca3dcfe1afda01cd5ceb2f
Instead of checking dpm policy in primary user and settings value
in managed profile user, we'd better check them all in primary user.
Calendar provider will need INTERACT_ACROSS_USER_FULL to access
settings provider and this permission is not granted to any app
in privapp-permissions-platform.xml. So I think it's safer to
change isPackageAllowedToAccessCalendar to check both
admin policy & settings value.
Bug: 123629973
Test: atest CalendarProvider2Test
Change-Id: I01bff1317916bac6de72a71a029a2f99dc8e9a0b
Every call to the method is logged regardless of permission check result
Bug: 120840632
Test: atest com.android.cts.devicepolicy.PasswordComplexityTest
Change-Id: Ie690b465a2ee1088e2e0df3fdf7733a41538fbb3
This reverts commit 0bfafb7f41.
Reason for revert: Removing enforceUnlocked() should fix the bug and Backup now supports it.
Change-Id: Id06f63c62b0f43cd70da77df48674146d4cc0412
1. Replaced ACTION_VIEW_WORK_CALENDAR_EVENT with
ACTION_VIEW_MANAGED_PROFILE_CALENDAR_EVENT
2. Improved the javadoc for EXTRA_EVENT_ID
3. Improved the javadoc for startMs and endMs
Bug: 122899642
Bug: 122898273
Bug: 122900059
Test: atest ManagedProfileTest#testCrossProfileCalendar
Change-Id: Ida84cd0d7d941e18acb9140c8fffc27b1ebd0a6c
According to new requirements in b/121179845, we are changing the
API pattern from "add/remove" to "set(set<string>)" to support
"enable all packages" operation. Setting the whitelist to null
will enable all packages. This behavior is consistent with existing
methods in DevicePolicyManager, e.g. setPermittedInputMethods.
Also corrected some languages in the comments and annotations.
Bug: 121179845
Test: atest ManagedProfileTest#testCrossProfileCalendar
atest DevicePolicyManagerTest
Change-Id: I87f17a2094792e44fdeb672658bddb871c2c1eeb
Disable certain APIs which require secure lock screen if the device
doesn't have the feature.
Make sure one cannot set the password/PIN if there is no secure lock
screen, because the password/PIN wouldn't be really used afterwards
while the password strength checks would succeed, creating a false
sense of security.
Allow setting password strength requirements in DPM - test if the
current password is sufficient will fail automatically if there is
no secure lock screen.
Bug: 111072170
Bug: 111071972
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases
Test: cts-tradefed run cts -m CtsAdminTestCases
Test: frameworks/base/core/tests/utiltests/runtests.sh
Test: adb shell am instrument -w -e class com.android.internal.widget.LockPatternUtilsTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: atest SyntheticPasswordTests
Test: atest LockSettingsServiceTests
Test: atest LockSettingsShellCommandTest
Test: atest DevicePolicyManagerTest (for servicestests)
Change-Id: Ie46b0de6cb03c26dd05c05711c5c3b5e36a872df
A new permission check in AlarmManager means that we need to clear caller
identity before calling into mNetworkLogger.forceBatchFinalization to
force network logs.
Bug: 123028500
Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegation
Change-Id: I62a9473fa4ec5493a3db4fdad3469e46737fadc0
Fix the NPE caused when the battery condition fails. To make this CTS
testable, change the battery check mechanism and force
DevicePolicyConstants to reload when the device_policy_constants global
settings are modified.
Change-Id: I59d4630a6dd2d1b52f1adb1da4238ee53c20c0e6
Fixes: 112076619
Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testInstallUpdate
WTF should only be logged when there is more than one delegates,
not when there is none.
Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testKeyManagement
and check logcat for the absence of WTF logs
Bug: 122363826
Change-Id: I51972ec4fabb2de70a6fe1700afae3aea95e34ab