Add wipe on login failure to Privacy Settings page
This CL adds information to the Enterprise Privacy Setting page that tells the user how many times the password can be mistyped before the device (or the work profile) is forcefully wiped. Test: make RunSettingsRoboTests Bug: 32692748 Change-Id: I4ae316802dbf5853ab4eacb0787647372d5e26c2
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (C) 2017 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed under the
|
||||
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package com.android.settings.enterprise;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.android.settings.R;
|
||||
|
||||
public class FailedPasswordWipeManagedProfilePreferenceController
|
||||
extends FailedPasswordWipePreferenceControllerBase {
|
||||
|
||||
private static final String KEY_FAILED_PASSWORD_WIPE_MANAGED_PROFILE
|
||||
= "failed_password_wipe_managed_profile";
|
||||
|
||||
public FailedPasswordWipeManagedProfilePreferenceController(Context context) {
|
||||
super(context, R.plurals.enterprise_privacy_failed_password_wipe_work);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getMaximumFailedPasswordsBeforeWipe() {
|
||||
return mFeatureProvider.getMaximumFailedPasswordsBeforeWipeInManagedProfile();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPreferenceKey() {
|
||||
return KEY_FAILED_PASSWORD_WIPE_MANAGED_PROFILE;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user