/// <summary> /// Restarts adb, but not the services around it. /// </summary> /// <returns><c>true</c> if success.</returns> public bool Restart( ) { if (string.IsNullOrEmpty(AdbOsLocation)) { Log.e(ADB, "Cannot restart adb when AndroidDebugBridge is created without the location of adb."); return(false); } if (!VersionCheck) { Log.LogAndDisplay(LogLevel.Error, ADB, "Attempting to restart adb, but version check failed!"); return(false); } lock (this) { StopAdb( ); bool restart = StartAdb( ); if (restart && DeviceMonitor == null) { DeviceMonitor = new DeviceMonitor(this); DeviceMonitor.Start( ); } return(restart); } }
/// <summary> /// Starts the debug bridge. /// </summary> /// <returns><c>true</c> if success.</returns> public bool Start( ) { if (String.IsNullOrEmpty(AdbOsLocation) || !VersionCheck || !StartAdb( )) { return(false); } Started = true; // now that the bridge is connected, we start the underlying services. DeviceMonitor = new DeviceMonitor(this); DeviceMonitor.Start( ); return(true); }
/// <summary> /// Kills the debug bridge, and the adb host server. /// </summary> /// <returns><c>true</c> if success.</returns> public bool Stop( ) { // if we haven't started we return false; if (!Started) { return(false); } // kill the monitoring services if (DeviceMonitor != null) { DeviceMonitor.Stop( ); DeviceMonitor = null; } if (!StopAdb( )) { return(false); } Started = false; return(true); }
/// <summary> /// Starts the debug bridge. /// </summary> /// <returns><c>true</c> if success.</returns> public bool Start( ) { if ( String.IsNullOrEmpty(AdbOsLocation) || !VersionCheck || !StartAdb ( ) ) { return false; } Started = true; // now that the bridge is connected, we start the underlying services. DeviceMonitor = new DeviceMonitor ( this ); DeviceMonitor.Start ( ); return true; }
/// <summary> /// Restarts adb, but not the services around it. /// </summary> /// <returns><c>true</c> if success.</returns> public bool Restart( ) { if ( string.IsNullOrEmpty ( AdbOsLocation ) ) { Log.e ( ADB, "Cannot restart adb when AndroidDebugBridge is created without the location of adb." ); return false; } if ( !VersionCheck ) { Log.LogAndDisplay ( LogLevel.Error, ADB, "Attempting to restart adb, but version check failed!" ); return false; } lock ( this ) { StopAdb ( ); bool restart = StartAdb ( ); if ( restart && DeviceMonitor == null ) { DeviceMonitor = new DeviceMonitor ( this ); DeviceMonitor.Start ( ); } return restart; } }