summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorTim Kilbourn <tkilbourn@google.com>2015-07-23 14:51:41 -0700
committerTim Kilbourn <tkilbourn@google.com>2015-07-23 14:51:41 -0700
commitf40c66d1a13b7cf88ba06cff10f6343471afd840 (patch)
treefcb5ac5eaa34631b60acf1fbc0fac74ba8dfc427 /cmds
parent1aadfc2bc46a14b6c95dc45ec11c4191cac5062d (diff)
downloadframeworks_base-f40c66d1a13b7cf88ba06cff10f6343471afd840.zip
frameworks_base-f40c66d1a13b7cf88ba06cff10f6343471afd840.tar.gz
frameworks_base-f40c66d1a13b7cf88ba06cff10f6343471afd840.tar.bz2
Add a wm command to dismiss the keyguard.
If the user has a screen lock, the user is prompted to authenticate. Otherwise the keyguard is dismissed. Bug: 22694837 Change-Id: I783fc6f08fb21977aa4f1e884b0a4354a3154805
Diffstat (limited to 'cmds')
-rw-r--r--cmds/wm/src/com/android/commands/wm/Wm.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/cmds/wm/src/com/android/commands/wm/Wm.java b/cmds/wm/src/com/android/commands/wm/Wm.java
index fb050e5..f7f7c88 100644
--- a/cmds/wm/src/com/android/commands/wm/Wm.java
+++ b/cmds/wm/src/com/android/commands/wm/Wm.java
@@ -65,7 +65,10 @@ public class Wm extends BaseCommand {
"\n" +
"wm scaling: set display scaling mode.\n" +
"\n" +
- "wm screen-capture: enable/disable screen capture.\n"
+ "wm screen-capture: enable/disable screen capture.\n" +
+ "\n" +
+ "wm dismiss-keyguard: dismiss the keyguard, prompting the user for auth if " +
+ "necessary.\n"
);
}
@@ -90,6 +93,8 @@ public class Wm extends BaseCommand {
runDisplayScaling();
} else if (op.equals("screen-capture")) {
runSetScreenCapture();
+ } else if (op.equals("dismiss-keyguard")) {
+ runDismissKeyguard();
} else {
showError("Error: unknown command '" + op + "'");
return;
@@ -240,6 +245,10 @@ public class Wm extends BaseCommand {
}
}
+ private void runDismissKeyguard() throws Exception {
+ mWm.dismissKeyguard();
+ }
+
private int parseDimension(String s) throws NumberFormatException {
if (s.endsWith("px")) {
return Integer.parseInt(s.substring(0, s.length() - 2));