mirror of
https://github.com/appium/appium.git
synced 2026-02-08 02:30:32 -06:00
Merge pull request #2654 from bootstraponline/uninstall_fix
uninstall before install
This commit is contained in:
@@ -460,12 +460,12 @@ androidCommon.installApp = function (cb) {
|
||||
};
|
||||
|
||||
androidCommon.installRemoteWithRetry = function (remoteApk, cb) {
|
||||
this.adb.installRemote(remoteApk, function (err) {
|
||||
if (err) {
|
||||
logger.warn("Installing remote apk failed, going to uninstall and try " +
|
||||
"again");
|
||||
this.adb.uninstallApk(this.args.appPackage, function (err) {
|
||||
if (err) logger.warn("Uninstalling apk failed, continuing");
|
||||
this.adb.uninstallApk(this.args.appPackage, function (err) {
|
||||
if (err) logger.warn("Uninstalling apk failed, continuing");
|
||||
this.adb.installRemote(remoteApk, function (err) {
|
||||
if (err) {
|
||||
logger.warn("Installing remote apk failed, going to uninstall and try " +
|
||||
"again");
|
||||
this.removeTempApks([], function () {
|
||||
this.adb.push(this.args.app, remoteApk, function (err) {
|
||||
if (err) return cb(err);
|
||||
@@ -473,10 +473,10 @@ androidCommon.installRemoteWithRetry = function (remoteApk, cb) {
|
||||
this.adb.installRemote(remoteApk, cb);
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
} else {
|
||||
cb();
|
||||
}
|
||||
} else {
|
||||
cb();
|
||||
}
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user