当前位置: 首页>>代码示例>>Java>>正文


Java AndroidDebugBridge.disconnectBridge方法代码示例

本文整理汇总了Java中com.android.ddmlib.AndroidDebugBridge.disconnectBridge方法的典型用法代码示例。如果您正苦于以下问题:Java AndroidDebugBridge.disconnectBridge方法的具体用法?Java AndroidDebugBridge.disconnectBridge怎么用?Java AndroidDebugBridge.disconnectBridge使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.android.ddmlib.AndroidDebugBridge的用法示例。


在下文中一共展示了AndroidDebugBridge.disconnectBridge方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: close

import com.android.ddmlib.AndroidDebugBridge; //导入方法依赖的package包/类
/**
 * Closes all open resources. <b>MUST BE CALLED WHEN THIS CLASS IS NO LONGER NEEDED.</b>
 */
public void close() {
    LOGGER.info("Closing the AgentManager.");
    try {
        // We close the bridge and adb service, so bridge creation wont fail next time we try. This is a workaround,
        // ddmlib is bugged.
        AndroidDebugBridge.disconnectBridge();

        // Terminate the bridge connection
        AndroidDebugBridge.terminate();

        dispatcher.close();

        // Stops the chrome driver started as a service
        deviceManager.stopChromeDriverService();

        if(AgentPropertiesLoader.hasFtpServer()) {
            // Disconnect and logout the FTP client
            deviceManager.stopFtpFileTransferService();
        }
    } catch (Exception e) {
        // If something cannot be closed it was never opened, so it's okay.
        // Nothing to do here.
        LOGGER.info(e);
    }
}
 
开发者ID:MusalaSoft,项目名称:atmosphere-agent,代码行数:29,代码来源:AgentManager.java

示例2: stopAdb

import com.android.ddmlib.AndroidDebugBridge; //导入方法依赖的package包/类
/**
 * This method is executed in a worker thread started in {@link #stop()}
 * 
 * @param osLocation
 * @param clientSupport
 */
private static void stopAdb() {
	synchronized (INSTANCE) {
		INSTANCE.setState(DeviceManagerState.STOPPING);

		INSTANCE._deviceThreadPool.shutdown();
		INSTANCE.removeAllDevices();
		// LOG.trace("Devices removed");
		AndroidDebugBridge.removeClientChangeListener(INSTANCE);
		AndroidDebugBridge.removeDebugBridgeChangeListener(INSTANCE);
		AndroidDebugBridge.removeDeviceChangeListener(INSTANCE);

		AndroidDebugBridge.disconnectBridge();
		// AndroidDebugBridge.terminate();
		INSTANCE.setState(DeviceManagerState.STOPPED);
	}
}
 
开发者ID:oliver32767,项目名称:MonkeyBoard,代码行数:23,代码来源:DeviceManager.java

示例3: shutdown

import com.android.ddmlib.AndroidDebugBridge; //导入方法依赖的package包/类
/**
 * Shutdown the AndroidDebugBridge and clean up all connected devices.
 */
public void shutdown() {
  log.info("Notifying device listener about shutdown");
  for (HardwareDeviceListener listener : deviceListeners) {
    for (AndroidDevice device : connectedDevices.values()) {
      listener.onDeviceDisconnected(connectedDevices.get(device));
    }
  }
  log.info("Removing Device Manager listener from ADB");
  AndroidDebugBridge.removeDeviceChangeListener(this);
  if (!shouldKeepAdbAlive) {
    AndroidDebugBridge.disconnectBridge();
  }
  AndroidDebugBridge.terminate();
  log.info("stopping Device Manager");
  // TODO add thread interrupt and join handling
}
 
开发者ID:selendroid,项目名称:selendroid,代码行数:20,代码来源:DefaultDeviceManager.java

示例4: close

import com.android.ddmlib.AndroidDebugBridge; //导入方法依赖的package包/类
@Override
public void close() {
    // TODO(radim): if we really need it then it belongs to core where ADBfactory lives
    AndroidDebugBridge adb = AndroidSdkProvider.getAdb();
    if (adb != null && adb.isConnected()) {
        AndroidDebugBridge.disconnectBridge();
    }
}
 
开发者ID:NBANDROIDTEAM,项目名称:NBANDROID-V2,代码行数:9,代码来源:Installer.java

示例5: shutdown

import com.android.ddmlib.AndroidDebugBridge; //导入方法依赖的package包/类
/**
 * Shutdown the AndroidDebugBridge and clean up all connected devices.
 */
@Override
public void shutdown() {
  if (!shouldKeepAdbAlive) {
    AndroidDebugBridge.disconnectBridge();
    AndroidDebugBridge.terminate();
  }
  logger.info("stopping Device Manager");
}
 
开发者ID:cosysoft,项目名称:device,代码行数:12,代码来源:AndroidDeviceStore.java

示例6: disconnect

import com.android.ddmlib.AndroidDebugBridge; //导入方法依赖的package包/类
/**
 * 
 */
public void disconnect() {
    if (!mIsAdbInitialized) {
        Util.DbgLog("not connected..");
        return;
    }
    mDeviceStateListener = null;
    AndroidDebugBridge.disconnectBridge();
}
 
开发者ID:felixb,项目名称:logcat-gui,代码行数:12,代码来源:AdbWrapper.java

示例7: disconnect

import com.android.ddmlib.AndroidDebugBridge; //导入方法依赖的package包/类
public static void disconnect() {
  if (AndroidDebugBridge.getBridge() != null
      && isAdbInitialized(AndroidDebugBridge.getBridge())) {
    AndroidDebugBridge.disconnectBridge();
    AndroidDebugBridge.terminate();
  }
}
 
开发者ID:facebook,项目名称:buck,代码行数:8,代码来源:AndroidDebugger.java

示例8: shutdownForcely

import com.android.ddmlib.AndroidDebugBridge; //导入方法依赖的package包/类
/**
 * used with caution or don't call this method
 */
@Override
public void shutdownForcely() {
  AndroidDebugBridge.disconnectBridge();
  AndroidDebugBridge.terminate();
}
 
开发者ID:cosysoft,项目名称:device,代码行数:9,代码来源:AndroidDeviceStore.java


注:本文中的com.android.ddmlib.AndroidDebugBridge.disconnectBridge方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。