Skip to content

Commit

Permalink
真机环境下不执行关闭模拟器操作 #178
Browse files Browse the repository at this point in the history
  • Loading branch information
kobe990 committed Sep 19, 2016
1 parent e3c9077 commit e033740
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/macaca-android.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ Android.prototype.startDevice = function *(caps) {
}
};

Android.prototype.stopDevice = function() {
if (this.args.reuse != reuseStatus.reuseEmu && this.args.reuse != reuseStatus.reuseEmuApp) {
Android.prototype.stopDevice = function *() {
var devices = yield ADB.getDevices();
var isVirtual = devices[0].type === 'virtual';
if (isVirtual && this.args.reuse != reuseStatus.reuseEmu && this.args.reuse != reuseStatus.reuseEmuApp) {
return ADB
.emuKill()
.catch(e => {
Expand Down

0 comments on commit e033740

Please sign in to comment.