本文整理汇总了Java中com.android.chimpchat.core.IChimpDevice类的典型用法代码示例。如果您正苦于以下问题:Java IChimpDevice类的具体用法?Java IChimpDevice怎么用?Java IChimpDevice使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IChimpDevice类属于com.android.chimpchat.core包,在下文中一共展示了IChimpDevice类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: waitForConnection
import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
@Override
public IChimpDevice waitForConnection(long timeoutMs, String deviceIdRegex) {
do {
IDevice device = findAttachedDevice(deviceIdRegex);
// Only return the device when it is online
if (device != null && device.getState() == IDevice.DeviceState.ONLINE) {
IChimpDevice chimpDevice = new AdbChimpDevice(device);
devices.add(chimpDevice);
return chimpDevice;
}
try {
Thread.sleep(CONNECTION_ITERATION_TIMEOUT_MS);
} catch (InterruptedException e) {
LOG.log(Level.SEVERE, "Error sleeping", e);
}
timeoutMs -= CONNECTION_ITERATION_TIMEOUT_MS;
} while (timeoutMs > 0);
// Timeout. Give up.
return null;
}
开发者ID:utds3lab,项目名称:SMVHunter,代码行数:23,代码来源:AdbBackend.java
示例2: shutdown
import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
@Override
public void shutdown() {
for (IChimpDevice device : devices) {
device.dispose();
}
AndroidDebugBridge.terminate();
}
开发者ID:utds3lab,项目名称:SMVHunter,代码行数:8,代码来源:AdbBackend.java
示例3: main
import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
public static void main(String[] args) throws IOException {
IChimpBackend backend = new AdbBackend();
IChimpDevice device = backend.waitForConnection();
IChimpImage snapshot = (IChimpImage) device.takeSnapshot();
// write out to a file
snapshot.writeToFile("output.png", "png");
writeOutImage(((AdbChimpImage)snapshot).getRawImage(), "output.raw");
System.exit(0);
}
开发者ID:utds3lab,项目名称:SMVHunter,代码行数:11,代码来源:CaptureRawAndConvertedImage.java
示例4: WookieeAPI
import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
public WookieeAPI(IChimpDevice impl) {
this.impl = impl;
this.matcher = new PyramidTemplateMatcher();
/*
* Math.min( Integer.parseInt(getProperty("display.width")),
* Integer.parseInt(getProperty("display.height")) );
*/
}
开发者ID:liuyq,项目名称:aster,代码行数:9,代码来源:WookieeAPI.java
示例5: init
import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
/**
* Initialize the main DeviceManager instance. #init() can only be called
* once, otherwise an IllegalStateException is thrown.
*
* @param eventBus
*/
public static void init(EventBus eventBus) {
if (_isInit) {
throw new IllegalStateException("DeviceManager already inited!");
}
INSTANCE = new DeviceManager(eventBus);
LOG.debug("DeviceManager INIT");
INSTANCE._deviceThreadPool = new DeviceThreadPool();
INSTANCE._devices = new ConcurrentHashMap<String, DeviceState>();
INSTANCE._chimpDevices = new ConcurrentHashMap<String, IChimpDevice>();
INSTANCE._focusedDevice = null;
// This mess makes a single threaded executor capable of executing
// INSTANCE._workerExecutor =
// MoreExecutors.listeningDecorator(Executors
// .newSingleThreadExecutor(new ThreadFactoryBuilder()
// .setNameFormat("DeviceManager-Worker-%d").build()));
INSTANCE._workerExecutor = Executors
.newSingleThreadExecutor(new ThreadFactoryBuilder()
.setNameFormat("DeviceManager").build());
// INSTANCE._workerExecutor = Executors
// .newCachedThreadPool(new ThreadFactoryBuilder()
// .setNameFormat("DeviceManager-worker-%d").build());
INSTANCE._state = DeviceManagerState.STOPPED;
_isInit = true;
}
开发者ID:oliver32767,项目名称:MonkeyBoard,代码行数:34,代码来源:DeviceManager.java
示例6: getDevices
import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
public List<IChimpDevice> getDevices(){
return devices;
}
开发者ID:utds3lab,项目名称:SMVHunter,代码行数:4,代码来源:AdbBackend.java
示例7: execute
import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
@Override
public void execute(IChimpDevice device) {
device.press(key, TouchPressType.fromIdentifier(downUpFlag));
}
开发者ID:Gogolook-Inc,项目名称:GogoMonkeyRun,代码行数:5,代码来源:AdvancePressAction.java
示例8: execute
import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
@Override
public void execute(IChimpDevice arg0) throws Exception {
}
开发者ID:Gogolook-Inc,项目名称:GogoMonkeyRun,代码行数:4,代码来源:SnapshotAction.java
示例9: MonkeyRecorderFrameExt
import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
/**
* This is the default constructor
*/
public MonkeyRecorderFrameExt(IChimpDevice device, String defaultExportDir) {
this.device = device;
this.defaultExportDir = defaultExportDir;
initialize();
}
开发者ID:Gogolook-Inc,项目名称:GogoMonkeyRun,代码行数:9,代码来源:MonkeyRecorderFrameExt.java
示例10: WookieeDevice
import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
public WookieeDevice(IChimpDevice impl) {
this.impl = impl;
this.matcher = new PyramidTemplateMatcher();
this.wookiee = new WookieeAPI(impl);
}
开发者ID:liuyq,项目名称:aster,代码行数:6,代码来源:WookieeDevice.java
示例11: getImpl
import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
public IChimpDevice getImpl() {
return impl;
}
开发者ID:liuyq,项目名称:aster,代码行数:4,代码来源:WookieeDevice.java
示例12: getLastChimpDevice
import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
static public IChimpDevice getLastChimpDevice() {
return device;
}
开发者ID:liuyq,项目名称:aster,代码行数:4,代码来源:WookieeRunner.java
示例13: MonkeyDeviceWrapper
import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
public MonkeyDeviceWrapper(IChimpDevice impl) {
this.impl = impl;
this.wookiee = new WookieeAPI(impl);
}
开发者ID:liuyq,项目名称:aster,代码行数:5,代码来源:MonkeyDeviceWrapper.java
示例14: DeviceController
import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
protected DeviceController(IDevice device, IChimpDevice chimpDevice) {
_device = device;
_chimpDevice = chimpDevice;
}
开发者ID:oliver32767,项目名称:MonkeyBoard,代码行数:5,代码来源:DeviceController.java
示例15: waitForConnection
import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
/**
* Retrieves an instance of the device from the backend
* @param timeoutMs length of time to wait before timing out
* @param deviceId the id of the device you want to connect to
* @return an instance of the device
*/
public IChimpDevice waitForConnection(long timeoutMs, String deviceId){
return mBackend.waitForConnection(timeoutMs, deviceId);
}
开发者ID:utds3lab,项目名称:SMVHunter,代码行数:10,代码来源:ChimpChat.java
示例16: getChimpDevice
import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
/**
* If you want to talk to monkey directly, use this one.
* @return
*/
public IChimpDevice getChimpDevice();
开发者ID:lrscp,项目名称:ControlAndroidDeviceFromPC,代码行数:6,代码来源:IDevice.java
示例17: waitForConnection
import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
/**
* Wait for a default device to connect to the backend.
*
* @return the connected device (or null if timeout);
*/
IChimpDevice waitForConnection();
开发者ID:liuyq,项目名称:aster,代码行数:7,代码来源:IChimpBackend.java
示例18: getIChimpDevice
import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
/**
* Return the managed IChimpDevice instance.
* @return IDevice instance.
*/
public IChimpDevice getIChimpDevice() {
return chimpDevice;
}
开发者ID:eBay,项目名称:mtdtool,代码行数:8,代码来源:TestDevice.java
注:本文中的com.android.chimpchat.core.IChimpDevice类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论