Beispiel #1
0
		/// <summary>
		/// Restarts adb, but not the services around it. </summary>
		/// <returns> true if success. </returns>
		public bool restart()
		{
			if (mAdbOsLocation == null)
			{
				Log.e(ADB, "Cannot restart adb when AndroidDebugBridge is created without the location of adb."); //$NON-NLS-1$
				return false;
			}

			if (mVersionCheck == false)
			{
				Log.logAndDisplay(Log.LogLevel.ERROR, ADB, "Attempting to restart adb, but version check failed!"); //$NON-NLS-1$
				return false;
			}
			lock (this)
			{
				stopAdb();

				bool restart = startAdb();

				if (restart && mDeviceMonitor == null)
				{
					mDeviceMonitor = new DeviceMonitor(this);
					mDeviceMonitor.start();
				}

				return restart;
			}
		}
Beispiel #2
0
		/// <summary>
		/// Starts the debug bridge. </summary>
		/// <returns> true if success. </returns>
		internal bool start()
		{
			if (mAdbOsLocation != null && (mVersionCheck == false || startAdb() == false))
			{
				return false;
			}

			mStarted = true;

			// now that the bridge is connected, we start the underlying services.
			mDeviceMonitor = new DeviceMonitor(this);
			mDeviceMonitor.start();

			return true;
		}