Loading cmds/wm/src/com/android/commands/wm/Wm.java +10 −1 Original line number Original line Diff line number Diff line Loading @@ -65,7 +65,10 @@ public class Wm extends BaseCommand { "\n" + "\n" + "wm scaling: set display scaling mode.\n" + "wm scaling: set display scaling mode.\n" + "\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" ); ); } } Loading @@ -90,6 +93,8 @@ public class Wm extends BaseCommand { runDisplayScaling(); runDisplayScaling(); } else if (op.equals("screen-capture")) { } else if (op.equals("screen-capture")) { runSetScreenCapture(); runSetScreenCapture(); } else if (op.equals("dismiss-keyguard")) { runDismissKeyguard(); } else { } else { showError("Error: unknown command '" + op + "'"); showError("Error: unknown command '" + op + "'"); return; return; Loading Loading @@ -240,6 +245,10 @@ public class Wm extends BaseCommand { } } } } private void runDismissKeyguard() throws Exception { mWm.dismissKeyguard(); } private int parseDimension(String s) throws NumberFormatException { private int parseDimension(String s) throws NumberFormatException { if (s.endsWith("px")) { if (s.endsWith("px")) { return Integer.parseInt(s.substring(0, s.length() - 2)); return Integer.parseInt(s.substring(0, s.length() - 2)); Loading Loading
cmds/wm/src/com/android/commands/wm/Wm.java +10 −1 Original line number Original line Diff line number Diff line Loading @@ -65,7 +65,10 @@ public class Wm extends BaseCommand { "\n" + "\n" + "wm scaling: set display scaling mode.\n" + "wm scaling: set display scaling mode.\n" + "\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" ); ); } } Loading @@ -90,6 +93,8 @@ public class Wm extends BaseCommand { runDisplayScaling(); runDisplayScaling(); } else if (op.equals("screen-capture")) { } else if (op.equals("screen-capture")) { runSetScreenCapture(); runSetScreenCapture(); } else if (op.equals("dismiss-keyguard")) { runDismissKeyguard(); } else { } else { showError("Error: unknown command '" + op + "'"); showError("Error: unknown command '" + op + "'"); return; return; Loading Loading @@ -240,6 +245,10 @@ public class Wm extends BaseCommand { } } } } private void runDismissKeyguard() throws Exception { mWm.dismissKeyguard(); } private int parseDimension(String s) throws NumberFormatException { private int parseDimension(String s) throws NumberFormatException { if (s.endsWith("px")) { if (s.endsWith("px")) { return Integer.parseInt(s.substring(0, s.length() - 2)); return Integer.parseInt(s.substring(0, s.length() - 2)); Loading