当前位置: 首页>>代码示例>>Java>>正文


Java DevicePolicyManager.ACTION_SET_NEW_PASSWORD属性代码示例

本文整理汇总了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;
    }
}
 
开发者ID:sdrausty,项目名称:buildAPKsSamples,代码行数:15,代码来源:SecureNoteActivity.java

示例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);
}
 
开发者ID:sdrausty,项目名称:buildAPKsSamples,代码行数:10,代码来源:PolicySetupActivity.java

示例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;
}
 
开发者ID:luoqii,项目名称:ApkLauncher,代码行数:9,代码来源:DeviceAdminSample.java

示例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;
}
 
开发者ID:Sherchen,项目名称:ApiDemos,代码行数:9,代码来源:DeviceAdminSample.java

示例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);
}
 
开发者ID:wso2-attic,项目名称:product-emm,代码行数:7,代码来源:AlertActivity.java


注:本文中的android.app.admin.DevicePolicyManager.ACTION_SET_NEW_PASSWORD属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。