protected void stopAndroidEmulator ( ) throws MojoExecutionException { parseParameters ( ) ; final AndroidDebugBridge androidDebugBridge = initAndroidDebugBridge ( ) ; if ( androidDebugBridge . isConnected ( ) ) { List < IDevice > devices = Arrays . asList ( androidDebugBridge . getDevices ( ) ) ; int numberOfDevices = devices . size ( ) ; getLog ( ) . info ( "Found " + numberOfDevices + " devices connected with the Android Debug Bridge" ) ; for ( IDevice device : devices ) { if ( device . isEmulator ( ) ) { if ( isExistingEmulator ( device ) ) { stopEmulator ( device ) ; } } else { getLog ( ) . info ( "Skipping stop. Not an emulator. " + DeviceHelper . getDescriptiveName ( device ) ) ; } } } }
Stop the running Android Emulator .