More device admin.

- Clean up device policy manager APIs.
- Implement lockNow().  For now this just turns the screen off to lock the device.
This commit is contained in:
Dianne Hackborn
2010-01-27 19:23:59 -08:00
parent 2fd75f3515
commit 254cb446fa
10 changed files with 202 additions and 79 deletions

View File

@@ -122,7 +122,7 @@ public class LockPatternUtils {
}
public int getRequestedMinimumPasswordLength() {
return mDevicePolicyManager.getMinimumPasswordLength();
return mDevicePolicyManager.getPasswordMinimumLength(null);
}
/**
@@ -132,7 +132,7 @@ public class LockPatternUtils {
* @return
*/
public int getRequestedPasswordMode() {
int policyMode = mDevicePolicyManager.getPasswordMode();
int policyMode = mDevicePolicyManager.getPasswordMode(null);
switch (policyMode) {
case DevicePolicyManager.PASSWORD_MODE_ALPHANUMERIC:
return MODE_PASSWORD;