Unit test for screen timeout policy handling in Settings

This is a follow-up for http://ag/3123412

Test: make ROBOTEST_FILTER=LockAfterTimeoutPreferenceControllerTest RunSettingsRoboTests
Test: make ROBOTEST_FILTER=TimeoutPreferenceControllerTest RunSettingsRoboTests

Bug: 63908311
Change-Id: I27631743d52163f3b6d1589b427ba617e74725a9
This commit is contained in:
Pavel Grafov
2017-12-15 18:42:11 +00:00
parent 92a1a0f22f
commit d50a536d1d
6 changed files with 113 additions and 17 deletions

View File

@@ -18,6 +18,7 @@ package com.android.settings.wrapper;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UserIdInt;
import android.app.admin.DevicePolicyManager;
import android.content.ComponentName;
import android.content.Context;
@@ -216,4 +217,13 @@ public class DevicePolicyManagerWrapper {
public int getDeviceOwnerUserId() {
return mDpm.getDeviceOwnerUserId();
}
/**
* Calls {@code DevicePolicyManager#getMaximumTimeToLock()}.
*
* @see DevicePolicyManager#getMaximumTimeToLock(ComponentName, int)
*/
public long getMaximumTimeToLockForUserAndProfiles(@UserIdInt int userHandle) {
return mDpm.getMaximumTimeToLockForUserAndProfiles(userHandle);
}
}