am a714a4a7: am 2f778da1: am 46638832: am a2bf7616: Merge "Add a wm command to dismiss the keyguard." into mnc-dev

* commit 'a714a4a77020303c5ab9464781464bd050110525':
  Add a wm command to dismiss the keyguard.
This commit is contained in:
Tim Kilbourn
2015-07-24 04:06:09 +00:00
committed by Android Git Automerger

View File

@@ -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));