Instead of always rebuilding the full ApplicationInfo for a
package when callers are only interested in the suspended status
add a new fast API in Packagemanager (which only checks the
suspended user setting for the requested package and returns
a boolean) and change the appropriate caller code too.
Bug: 26794775
Bug: 22776761
Change-Id: Ide8428ef734479360d5a8a75fd8e0ed8ddf2da7a
Add isInputMethodPermittedByAdmin and
isAccessibilityServicePermittedByAdmin APIs in DevicePolicyManager.
And update utility methods in RestrictedLockUtils to use the correct
userId when checking if disabled by admin.
Bug: 26897250
Bug: 26767564
Bug: 26966213
Change-Id: I0b74b3e57904a82f8ce72d856769d35b5e8403e5
Currently, it can be only used for checking the status of keyguard
notification features, made it generic so that it can be used for
other keyguard features like disable_fingerprint etc.
Change-Id: Ib2adfc12d7866cce248af78cc8b159cada9a6cad
Added util method checkIfMaximumTimeToLockIsSet in RestrictedLockUtils
to get the admin who set maximum time to lock. Also, made a few updates
to the javadocs of other methods.
Change-Id: Ide3048b277f854360aa92d975963b61dff2387bb
- This check is broken when there are no Admins on the device.
- Blocks enabling NotificationListenerServices in Settings.
Change-Id: I2c30daf2fc4632d55e84f0e499e3ceedbe162b98
When adding the padlock, a space is appended to the string which needs
to removed along with the padlock. And added more utility methods in
RestrictedLockUtils.
Change-Id: I33f976db23bfdd39d76c4201be0727bfafb00fd4
Added an utility method checkIfUninstallBlocked in
RestrictedLockUtils. Also updated setMenuItemAsDisabledByAdmin
to be able to remove the added padlock and color spans.
Change-Id: I7874f7097d09bc9ab127307f2a8a03a20560347c