Managed profile lock timeout

Test: make ROBOTEST_FILTER=TimeoutPreferenceControllerTest RunSettingsRoboTests
Test: make ROBOTEST_FILTER=LockAfterTimeoutPreferenceControllerTest RunSettingsRoboTests
Bug: 63908311
Change-Id: I7236ec4ca37353703145c3e75d508101ecc6ca80
This commit is contained in:
Pavel Grafov
2016-12-06 15:54:50 +00:00
parent 3abedefd38
commit 8e02f0e7e7
6 changed files with 9 additions and 12 deletions

View File

@@ -88,8 +88,7 @@ public class TimeoutPreferenceControllerTest {
final int profileUserId = UserHandle.myUserId();
final long timeout = 10000;
when(mUserManager.getProfiles(profileUserId)).thenReturn(Collections.emptyList());
ShadowDevicePolicyManagerWrapper
.setMaximumTimeToLockForUserAndProfiles(profileUserId, timeout);
ShadowDevicePolicyManagerWrapper.setMaximumTimeToLock(profileUserId, timeout);
mController.updateState(mPreference);
verify(mPreference).removeUnusableTimeouts(timeout, null);