summaryrefslogtreecommitdiff
path: root/tests/permission
diff options
context:
space:
mode:
authorAdrian Roos <roosa@google.com>2018-11-20 20:07:55 +0100
committerAdrian Roos <roosa@google.com>2018-11-29 18:24:09 +0000
commit1c8e3c0bd314b29cca8b92655c87d847da266683 (patch)
treebf3bb6955ddb42f7652313d180d20afb060e7280 /tests/permission
parent509d06a6415b9f6a628d3ebac9f7047de8f7d34c (diff)
KeyguardDisableHandler: make properly user aware
Also fixes an issue where the disable handler was not properly updated after adding a secure lockscreen. Also fixes an issue where the disable handler was not properly updated after the device policy changes for users other than USER_SYSTEM. Also prevents adding new privileged usages of the API. Also removes a workaround that prevented Keyguard from re-engaging if it timed out while the it was disabled. The workaround is no longer necessary because the in-call UI is now using the SHOW_WHEN_LOCKED API instead of disabling the keyguard. Change-Id: Ib2644252b3806de4cb09f03991d789b83e924a11 Fixes: 119322269 Test: atest KeyguardDisableHandlerTest CtsActivityManagerDeviceTestCases:KeyguardTests
Diffstat (limited to 'tests/permission')
-rw-r--r--tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java b/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java
index 14312cf84693..369a002fa273 100644
--- a/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java
+++ b/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java
@@ -20,6 +20,7 @@ import android.content.res.Configuration;
import android.os.Binder;
import android.os.RemoteException;
import android.os.ServiceManager;
+import android.os.UserHandle;
import android.test.suitebuilder.annotation.SmallTest;
import android.view.IWindowManager;
import junit.framework.TestCase;
@@ -107,7 +108,7 @@ public class WindowManagerPermissionTests extends TestCase {
public void testDISABLE_KEYGUARD() {
Binder token = new Binder();
try {
- mWm.disableKeyguard(token, "foo");
+ mWm.disableKeyguard(token, "foo", UserHandle.myUserId());
fail("IWindowManager.disableKeyguard did not throw SecurityException as"
+ " expected");
} catch (SecurityException e) {
@@ -117,7 +118,7 @@ public class WindowManagerPermissionTests extends TestCase {
}
try {
- mWm.reenableKeyguard(token);
+ mWm.reenableKeyguard(token, UserHandle.myUserId());
fail("IWindowManager.reenableKeyguard did not throw SecurityException as"
+ " expected");
} catch (SecurityException e) {