try to clear browser every time
This commit is contained in:
@@ -98,9 +98,6 @@ class CommandorPage {
|
|||||||
let cancel
|
let cancel
|
||||||
const intervalTask = setInterval(() => {
|
const intervalTask = setInterval(() => {
|
||||||
if (this.isTerminated) {
|
if (this.isTerminated) {
|
||||||
this.device.shell("pm clear com.android.chrome")
|
|
||||||
this.device.shell("am set-debug-app --persistent com.android.chrome")
|
|
||||||
this.device.shell("pm am start -n com.android.chrome/com.google.android.apps.chrome.Main")
|
|
||||||
log("request terminated, will close device")
|
log("request terminated, will close device")
|
||||||
context.close()
|
context.close()
|
||||||
// this.page.close()
|
// this.page.close()
|
||||||
@@ -375,11 +372,13 @@ class CommandorPage {
|
|||||||
reserve.source_from = this.device.model();
|
reserve.source_from = this.device.model();
|
||||||
await this.mongoManager.saveReserveToDb(reserve.to_mongo_dict())
|
await this.mongoManager.saveReserveToDb(reserve.to_mongo_dict())
|
||||||
await this.deleteFromBlackList()
|
await this.deleteFromBlackList()
|
||||||
|
await this.resetBrowser()
|
||||||
this.isTerminated = true
|
this.isTerminated = true
|
||||||
}
|
}
|
||||||
|
|
||||||
async saveToBlackList() {
|
async saveToBlackList() {
|
||||||
await this.mongoManager.saveBlackListToDb(new BlackListContactPojo(this.contact))
|
await this.mongoManager.saveBlackListToDb(new BlackListContactPojo(this.contact))
|
||||||
|
await this.resetBrowser()
|
||||||
this.isTerminated = true
|
this.isTerminated = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user