From d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Tue, 3 Mar 2009 18:28:45 -0800 Subject: auto import from //depot/cupcake/@135843 --- .../src/com/android/commands/input/Input.java | 144 --------------------- 1 file changed, 144 deletions(-) delete mode 100755 cmds/input/src/com/android/commands/input/Input.java (limited to 'cmds/input/src') diff --git a/cmds/input/src/com/android/commands/input/Input.java b/cmds/input/src/com/android/commands/input/Input.java deleted file mode 100755 index 3a1accd9dd04..000000000000 --- a/cmds/input/src/com/android/commands/input/Input.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (C) 2007 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.commands.input; - -import android.os.RemoteException; -import android.os.ServiceManager; -import android.os.SystemClock; -import android.util.Log; -import android.view.IWindowManager; -import android.view.KeyCharacterMap; -import android.view.KeyEvent; - -/** - * Command that sends key events to the device, either by their keycode, or by - * desired character output. - */ - -public class Input { - - /** - * Command-line entry point. - * - * @param args The command-line arguments - */ - public static void main(String[] args) { - (new Input()).run(args); - } - - private void run(String[] args) { - if (args.length < 1) { - showUsage(); - return; - } - - String command = args[0]; - - if (command.equals("text")) { - sendText(args[1]); - } else if (command.equals("keyevent")) { - sendKeyEvent(args[1]); - } else if (command.equals("motionevent")) { - System.err.println("Error: motionevent not yet supported."); - return; - } - else { - System.err.println("Error: Unknown command: " + command); - showUsage(); - return; - } - } - - /** - * Convert the characters of string text into key event's and send to - * device. - * - * @param text is a string of characters you want to input to the device. - */ - - private void sendText(String text) { - - StringBuffer buff = new StringBuffer(text); - - boolean escapeFlag = false; - for (int i=0; i"); - System.err.println(" input keyevent "); - } -} -- cgit v1.2.3-59-g8ed1b