diff options
Diffstat (limited to 'monkeyrunner/src/com/android/monkeyrunner/controller/MonkeyController.java')
-rw-r--r-- | monkeyrunner/src/com/android/monkeyrunner/controller/MonkeyController.java | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/monkeyrunner/src/com/android/monkeyrunner/controller/MonkeyController.java b/monkeyrunner/src/com/android/monkeyrunner/controller/MonkeyController.java deleted file mode 100644 index 6fc4ea6..0000000 --- a/monkeyrunner/src/com/android/monkeyrunner/controller/MonkeyController.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2010 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.monkeyrunner.controller; - -import com.android.chimpchat.ChimpChat; -import com.android.chimpchat.core.IChimpDevice; - -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import java.util.logging.Logger; -import java.util.Map; -import java.util.TreeMap; - -import javax.swing.JFrame; -import javax.swing.SwingUtilities; - -/** - * Application that can control an attached device using the network monkey. It has a window - * that shows what the current screen looks like and allows the user to click in it. Clicking in - * the window sends touch events to the attached device. It also supports keyboard input for - * typing and has buttons to press to simulate physical buttons on the device. - */ -public class MonkeyController extends JFrame { - private static final Logger LOG = Logger.getLogger(MonkeyController.class.getName()); - - public static void main(String[] args) { - SwingUtilities.invokeLater(new Runnable() { - @Override - public void run() { - Map<String, String> options = new TreeMap<String, String>(); - options.put("backend", "adb"); - ChimpChat chimpchat = ChimpChat.getInstance(options); - final IChimpDevice device = chimpchat.waitForConnection(); - MonkeyControllerFrame mf = new MonkeyControllerFrame(device); - mf.setVisible(true); - mf.addWindowListener(new WindowAdapter() { - @Override - public void windowClosed(WindowEvent e) { - device.dispose(); - } - }); - } - }); - } -} |