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:
Bartosz Fabianowski
2017-02-14 11:45:20 +01:00
parent c1a7723c17
commit 8903f66662
20 changed files with 542 additions and 21 deletions

View File

@@ -26,6 +26,13 @@ import android.support.annotation.Nullable;
* newer than the API version supported by Robolectric.
*/
public interface DevicePolicyManagerWrapper {
/**
* Calls {@code DevicePolicyManager.getMaximumFailedPasswordsForWipe()}.
*
* @see android.app.admin.DevicePolicyManager#getMaximumFailedPasswordsForWipe
*/
int getMaximumFailedPasswordsForWipe(@Nullable ComponentName admin, int userHandle);
/**
* Calls {@code DevicePolicyManager.getDeviceOwnerComponentOnAnyUser()}.
*
@@ -33,12 +40,26 @@ public interface DevicePolicyManagerWrapper {
*/
ComponentName getDeviceOwnerComponentOnAnyUser();
/**
* Calls {@code DevicePolicyManager.getDeviceOwnerUserId()}.
*
* @see android.app.admin.DevicePolicyManager#getDeviceOwnerUserId
*/
int getDeviceOwnerUserId();
/**
* Calls {@code DevicePolicyManager.getProfileOwnerAsUser()}.
*
* @see android.app.admin.DevicePolicyManager#getProfileOwnerAsUser
*/
@Nullable ComponentName getProfileOwnerAsUser(final int userId);
/**
* Calls {@code DevicePolicyManager.getDeviceOwnerNameOnAnyUser()}.
*
* @see android.app.admin.DevicePolicyManager#getDeviceOwnerNameOnAnyUser
*/
public CharSequence getDeviceOwnerOrganizationName();
CharSequence getDeviceOwnerOrganizationName();
/**
* Calls {@code DevicePolicyManager.getPermissionGrantState()}.
@@ -53,19 +74,19 @@ public interface DevicePolicyManagerWrapper {
*
* @see android.app.admin.DevicePolicyManager#getLastSecurityLogRetrievalTime
*/
public long getLastSecurityLogRetrievalTime();
long getLastSecurityLogRetrievalTime();
/**
* Calls {@code DevicePolicyManager.getLastBugReportRequestTime()}.
*
* @see android.app.admin.DevicePolicyManager#getLastBugReportRequestTime
*/
public long getLastBugReportRequestTime();
long getLastBugReportRequestTime();
/**
* Calls {@code DevicePolicyManager.getLastNetworkLogRetrievalTime()}.
*
* @see android.app.admin.DevicePolicyManager#getLastNetworkLogRetrievalTime
*/
public long getLastNetworkLogRetrievalTime();
long getLastNetworkLogRetrievalTime();
}