summaryrefslogtreecommitdiff
path: root/packages/SettingsLib/src/com/android/settingslib/RestrictedPreferenceHelper.java
AgeCommit message (Collapse)Author
2021-05-29Add new method "checkRestrictionEnforced" toStanley Wang
RestrictedPreferenceHelper. - Return the EnforcedAdmin object if the preference is retricted. Bug: 179245126 Test: robotest and see the UI Change-Id: I0687bb5e1bafa6c50f7c4e1400e6d4ed7c03c9b1
2020-12-25Create RestrictedTopLevelPreference for silky homeYanting Yang
Based on UX design, create a new restricted preference for the items on the top level page which don't need a the restricted icon and shouldn't be grayed-out. Bug: 168166015 Bug: 174964139 Test: robotest Change-Id: If52b7d14c13d33f964a6b12612747db9323979a2
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
2018-08-28Sort importsFan Zhang
Having consistent import order will reduce chance of merge conflict between internal and external master Test: rebuild Change-Id: I9acb311ec05f72f0a37f08b0d26785841fe91de5
2018-04-20Migrated SystemUI & SettingsLib to androidxAurimas Liutikas
Test: make SystemUI SettingsLib Bug:76692459 Change-Id: I248fdf4042a0a97bc6349091da21c936c2d37c95
2017-02-10Don't hide summary text in RestrictedPreference.Fan Zhang
Bug: 34974598 Test: RunSettingsLibRoboTests Change-Id: I8ea74fb52c38430c120fd4158867a9184d8f16cf
2016-03-14Call preference.setEnabled only after updating disabledByAdmin state.Sudheer Shanka
We check the value of disabledByAdmin state in setEnabled, so update it first before calling setEnabled. Bug: 27642236 Change-Id: Ie6c805b85a3afb87ffdaad0b80dbadc172b62d49
2016-03-09Minor cleanup in RestrictedPreferenceHelper.setDisabledByAdmin.Sudheer Shanka
Change-Id: I573ea3a0c4565c62d47c4458b7885a8cfbdf31cc
2016-03-09Merge "Remove unused imports and variables." into nyc-devSudheer Shanka
2016-03-09Remove unused imports and variables.Sudheer Shanka
Bug: 27564074 Change-Id: I5eff9f673fe093a9068e94619cfe7eef10c0b4a9
2016-03-09Merge "SettingsLib: Always update preference state." into nyc-devMartijn Coenen
2016-03-02Update restricted icon.Sudheer Shanka
Bug: 25603665 Bug: 27263775 Change-Id: Ib66866cf536f15130f936d03d9328ee5b0b508c7
2016-03-01Part1: Show the restricted lock icon in place of the pref widget.Sudheer Shanka
Add summary strings used for switch prefs if disabled by admin. Bug: 25603665 Bug: 27263775 Change-Id: I88c2dd2e024f92da107bedc645641e285796d51f
2016-02-29SettingsLib: Always update preference state.Martijn Coenen
In case a RestrictedPreference can also be disabled for other reasons than device admin, the state of RestrictedPreferenceHelper may not be up-to-date with the actual preference state. For example, the "Android Beam" checkbox can be disabled by device policy, but it can also be disabled by Settings itself because NFC was turned off by the user. To fix that, always update the Preference state. Bug: 26907006 Change-Id: I27cde70beb82721dd4d423943a9898e022df8862
2016-02-19Part1 - Don't add padlock if the restriction is not set by admin.Sudheer Shanka
Bug: 26687435 Change-Id: I2fd740b1fa0d76eceedc4dde73e41d779820bbcf
2016-01-25Add support for adding preference summary when disabled by admin.Sudheer Shanka
Change-Id: I455c3180266734fa4ba6b5bf7cb5fc2f34177759
2016-01-14Made changes to padlock support for preferences.Sudheer Shanka
- Currently, if a preference is disabled by admin, we add a padlock and disable the preference. And now if the preference is enabled in some other place, the padlock is not removed. Updated RestrictedPreference to fix this behavior. - Made RestrictedPreferenceHelper and RestrictedPreferenceHelper.onAttachedToHierarchy public so that preferences in Settings can use these. - Put a check for null to avoid NullPointerException. - Removed a redundant statement. Change-Id: Ie88a761dc38c58a680c62b3703d2081c67462079
2016-01-12Move restricted padlock support to SettingsLibSudheer Shanka
Change-Id: Ib0b1c58d1f45e017b6b17ce0a55ca839b900cba4