summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Tim Kilbourn <tkilbourn@google.com> 2015-07-24 03:11:03 +0000
committer Android Git Automerger <android-git-automerger@android.com> 2015-07-24 03:11:03 +0000
commit2f778da1cb88eb9e1f533e63c1f42209cede1f74 (patch)
tree985f287e43e0aaeef94050a6391c1b499b4bf76b
parent3fce45b6610448ac577e49981e1dc0af0f7e6748 (diff)
parent46638832458d14c6f785b58618eba9dfec796412 (diff)
am 46638832: am a2bf7616: Merge "Add a wm command to dismiss the keyguard." into mnc-dev
* commit '46638832458d14c6f785b58618eba9dfec796412': Add a wm command to dismiss the keyguard.
-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 fb050e545931..f7f7c887aeb0 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));