mirror of
https://github.com/appium/appium.git
synced 2026-02-10 20:09:49 -06:00
Merge pull request #2170 from paymand/fast_reset_remote_apk
Make sure the app is always signed *before* getting the MD5 hash.
This commit is contained in:
@@ -401,14 +401,14 @@ androidCommon.installApp = function (cb) {
|
||||
return cb();
|
||||
}
|
||||
|
||||
this.remoteApkExists(function (err, remoteApk) {
|
||||
// err is set if the remote apk doesn't exist so don't check it.
|
||||
this.adb.isAppInstalled(this.args.appPackage, function (err, installed) {
|
||||
if (installed && this.args.fastReset && remoteApk) {
|
||||
this.resetApp(cb);
|
||||
} else if (!installed || (this.args.fastReset && !remoteApk)) {
|
||||
this.adb.checkAndSignApk(this.args.app, this.args.appPackage, function (err) {
|
||||
if (err) return cb(err);
|
||||
this.adb.checkAndSignApk(this.args.app, this.args.appPackage, function (err) {
|
||||
if (err) return cb(err);
|
||||
this.remoteApkExists(function (err, remoteApk) {
|
||||
// err is set if the remote apk doesn't exist so don't check it.
|
||||
this.adb.isAppInstalled(this.args.appPackage, function (err, installed) {
|
||||
if (installed && this.args.fastReset && remoteApk) {
|
||||
this.resetApp(cb);
|
||||
} else if (!installed || (this.args.fastReset && !remoteApk)) {
|
||||
this.adb.mkdir(this.remoteTempPath(), function (err) {
|
||||
if (err) return cb(err);
|
||||
this.getRemoteApk(function (err, remoteApk, md5Hash) {
|
||||
@@ -427,10 +427,10 @@ androidCommon.installApp = function (cb) {
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
} else {
|
||||
cb();
|
||||
}
|
||||
} else {
|
||||
cb();
|
||||
}
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user