summaryrefslogtreecommitdiff
path: root/packages/SettingsLib/src/com/android/settingslib/RestrictedLockUtilsInternal.java
AgeCommit message (Collapse)Author
2022-03-15Merge SP2A.220305.013Haamed Gheibi
Bug: 220074017 Change-Id: Idfdd94e902f656ac65a2a75dfdd199f6f85ba472
2021-02-16DPM API to enable or disable USB data signalingAlex Johnston
Background * The admin can disable signaling over USB on corporate owned devices Changes * Add DevicePolicyManager API to enable and disable USB data signaling. * Add DevicePolicyManager API to test of this feature is supported. Bug: 168301639 Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest make RunSettingsLibRoboTests -j ROBOTEST_FILTER=EnableAdbPreferenceControllerTest Change-Id: I1d2d71ec05a1565f58ffd691a66c68171a4f9b00 Merged-In: I1d2d71ec05a1565f58ffd691a66c68171a4f9b00
2021-01-19Disable IME on the personal profileAlex Johnston
Background: * On organization-owned devices with managed profiles, the work admin needs to be able to restrict IMEs on the personal side. * They should be able to restrict IMEs without having visibility on the personal side. This is done by introducing the ability for the admin to set the permitted IMEs on the parent profile. Changes: * Update DPM permitted input methods apis to be callable on the parent profile. * Update RestrictedLockUtilsInternal to check the permitted input methods on the parent profile Manual test steps: * Set up organization-owned device and download IME apps on the personal profile * Download TestDPC * Select prefence Set input methods on parent * Select allow only system IMEs and check Settings to see all non-system IMEs are disabled. * Select allow all IME apps and check Settings to see no IME apps are disabled. Bug: 170459562 Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest atest com.android.settingslib.RestrictedLockUtilsTest atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testPermittedInputMethods atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testPermittedInputMethodsLogged Change-Id: Iecd19adb6d3ca064a8d7f9ff0c1c41aa64bd6ace
2020-11-30DPMS: Enforce password complexity in lockscreen settingEran Messeri
Enforce a lock screen that adheres with the required complexity set by the admin. To do this, provide a method to let the Settings code query the DevicePolicyManager for the effective password complexities that applies to a user. Bug: 165573442 Test: Manually, set complexity using TestDPC. Test: m RunSettingsRoboTests Change-Id: Ia03aebb725cacc7104d7fd765ae6ab53456e33e0
2019-12-04Replace setAutoTimeRequired and getAutoTimeRequired with setAutoTime and ↵Alex Johnston
getAutoTime * Deprecate setAutoTimeRequired and getAutoTimeRequired. * Added new API methods setAutoTime and getAutoTime. * DPCs are recommended to combine these new APIs together with the DISALLOW_CONFIG_DATE_TIME restriction to prevent the user from changing auto time settings. * The new methods can also be called by the WP PO (COPE mode). Bug: 138709470 Test: Manual testing with testdpc and the set auto time toggle atest com.android.server.devicepolicy.DevicePolicyManagerTest atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testSetAutoTime Change-Id: I6f93b2a28e3ef0e1e97c9c414ce65d4e753c1bf3
2019-07-18Fix Disabled text color in dark themeRaff Tsai
disabled_text_color is similar to background color in dark theme. Use text color multiply disabledAlpha to get disabled text color. Fixes: 137639665 Test: manual Change-Id: I00bb1dbedd0032001c2fc325b412dacb08f84132
2019-04-11Remove restricted uitls methods for cross-profile calendar.yuemingw
Remove since we don't show policy transparency UI for cross-profile setting anymore. Test: atest CrossProfileCalendarPreferenceControllerTest Bug: 123930863 Change-Id: I2cd23fffa206cf3aa5189dd0f0edf3ca658b7443
2019-01-24Handle null for the return of getCrossProfileCalendarPackages.yuemingw
The return value of this API could be null after our decision for API change as in b/121179845. Bug: 121179845 Test: make ROBOTEST_FILTER=CrossProfileCalendarPreferenceControllerTest -j40 RunSettingsRoboTests Change-Id: I834ccf83ecca8959d95288ac4fa1473d12eabfca
2018-12-08Add restriction helper method for Cross profile calendar UI.yuemingw
Bug: 117976974 Test: make ROBOTEST_FILTER=CrossProfileCalendarPreferenceControllerTest -j40 RunSettingsRoboTests Change-Id: I0156ef91f806f055a5ac67e84817771c57ddd839
2018-10-12Rename recently added symbols to camel-casePhilip P. Moltmann
Test: looked at help screen in settings make RunSettingsLibRoboTests Change-Id: Ife257ad1bbe43a42084fdf9d2718c8fc1465f170 Fixes: 116797641
2018-10-09Change DevicePolicyManager APIs as requestedPhilip P. Moltmann
This requires RestrictedLockUtils to change which then causes further changes. I left the old APIs available for non-system-api customers. Test: RunSettingsLibRoboTests Bug: 116798569 Change-Id: Id5384ee074bb245e615012b7e0d5298b8bf27ba4
2018-09-13Make restricted lock icon system-apiPhilip P. Moltmann
Bug: 110953302 Test: CtsVerifier -> BYOD Managed Provision -> Permission Lockdown (test created a permission disabled by admin) Change-Id: I042668225227aabc9655d83307e60f7efe399d8d
2018-08-30Factor some RestrictedLockUtils out of SettingLibPhilip P. Moltmann
Also make the new lib only use system-apis. This allows mainline module to use the new RestrictedLockUtilsSettingLib. Unfortunately the whole RestrictedLockUtils would have caused to much new system-api. Hence it was split into RestrictedLockUtils and RestrictedLockUtilsInternal. This caused a lot of trivial code changes. Bug: 110953302 Test: Built Change-Id: I693b3bf56f3be71f0790776e3aad5694717786ef