本文整理汇总了Java中android.app.admin.DevicePolicyManager.ACTION_SET_NEW_PASSWORD属性的典型用法代码示例。如果您正苦于以下问题:Java DevicePolicyManager.ACTION_SET_NEW_PASSWORD属性的具体用法?Java DevicePolicyManager.ACTION_SET_NEW_PASSWORD怎么用?Java DevicePolicyManager.ACTION_SET_NEW_PASSWORD使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类android.app.admin.DevicePolicyManager
的用法示例。
在下文中一共展示了DevicePolicyManager.ACTION_SET_NEW_PASSWORD属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ensureDeviceAdminPasswordIsSufficient
private boolean ensureDeviceAdminPasswordIsSufficient() {
this.devicePolicyManager.setPasswordQuality(deviceAdminComponentName,
DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC);
this.devicePolicyManager.setPasswordMinimumLength(deviceAdminComponentName, 4);
this.devicePolicyManager.setMaximumTimeToLock(deviceAdminComponentName, 10000);
if (this.devicePolicyManager.isActivePasswordSufficient()) {
Log.d(TAG, "Active password is sufficient");
return true;
} else {
Log.d(TAG, "Active device admin password is insufficient. Setting new password.");
super.startActivityForResult(new Intent(DevicePolicyManager.ACTION_SET_NEW_PASSWORD),
SET_DEVICE_ADMIN_PASSWORD_REQUEST);
return false;
}
}
示例2: onClick
@Override
public void onClick(View v) {
writePolicy();
// The device administration API does not "fix" the password if it is
// determined that the current password does not conform to what is requested
// by the policy. The caller is responsible for triggering the password set up
// screen via the below intent.
Intent intent = new Intent(DevicePolicyManager.ACTION_SET_NEW_PASSWORD);
startActivity(intent);
}
示例3: onPreferenceClick
@Override
public boolean onPreferenceClick(Preference preference) {
if (mSetPassword != null && preference == mSetPassword) {
Intent intent = new org.bbs.apklauncher.emb.IntentHelper(DevicePolicyManager.ACTION_SET_NEW_PASSWORD);
startActivity(intent);
return true;
}
return false;
}
示例4: onPreferenceClick
@Override
public boolean onPreferenceClick(Preference preference) {
if (mSetPassword != null && preference == mSetPassword) {
Intent intent = new Intent(DevicePolicyManager.ACTION_SET_NEW_PASSWORD);
startActivity(intent);
return true;
}
return false;
}
示例5: openPasswordSettings
/**
* This method is used to open screen lock password settings screen.
*/
private void openPasswordSettings() {
Intent intent = new Intent(DevicePolicyManager.ACTION_SET_NEW_PASSWORD);
startActivity(intent);
}