1 Commits

Author SHA1 Message Date
panleicim b78c0de0ce support Oneplus 6 2024-10-02 19:19:43 +02:00
4 changed files with 13 additions and 28 deletions
+1 -14
View File
@@ -118,16 +118,6 @@ function shuffle(array) {
return array;
}
function getContactListForDevice(device, allContactList) {
let contactList = [];
allContactList.forEach((contact) => {
if (contact.serial === device.serial) {
contactList.push(contact)
}
})
return contactList;
}
async function startBookWithNumbers(startNumber, endNumber, selectedStore, pathToExcelFile = '/Users/lpan/Desktop/contact_all.xlsx', audioAnalyse = true, alertBeep = false) {
console.log("startBookWithNumbers() called, with alertBeep:" + alertBeep)
console.log("startBookWithNumbers() called, with audioAnalyse:" + audioAnalyse)
@@ -201,10 +191,7 @@ async function startBookWithNumbers(startNumber, endNumber, selectedStore, pathT
for (let i = 0; i < filteredDeviceList.length; i++) {
let device = filteredDeviceList[i];
let port = startForwordingForDevice(device)
let _contactList = listWithoutBlackContact.slice(i * segmentNumber, segmentNumber * (i + 1))
// let _contactList = getContactListForDevice(device, listWithoutBlackContact)
console.log("contactList: for device:" + device.serial + " has " + _contactList.length)
startWithList(_contactList, device, sender, selectedStore, audioAnalyse, alertBeep, port);
startWithList(listWithoutBlackContact.slice(i * segmentNumber, segmentNumber * (i + 1)), device, sender, selectedStore, audioAnalyse, alertBeep, port);
}
})
+2 -3
View File
@@ -19,12 +19,11 @@ class ExcelUtil {
if (store === undefined || store.length === 0) {
store = "random"
}
let serial = info[5];
let ipCountry = info[6];
let ipCountry = info[5];
if (ipCountry === undefined || ipCountry.length === 0) {
ipCountry = "FR"
}
let newContact = new ContactPojo(phoneNumber, passportNumber, lastName, firstName, mail, store, ipCountry, serial);
let newContact = new ContactPojo(phoneNumber, passportNumber, lastName, firstName, mail, store, ipCountry);
contactList.push(newContact);
}
}
+1 -2
View File
@@ -1,6 +1,6 @@
class ContactPojo {
constructor(phoneNumber, passportNumber, lastName, firstName, mail, store, ipCountry, serial) {
constructor(phoneNumber, passportNumber, lastName, firstName, mail, store, ipCountry) {
this.phoneNumber = phoneNumber;
this.passportNumber = passportNumber;
this.lastName = lastName;
@@ -8,7 +8,6 @@ class ContactPojo {
this.mail = mail;
this.store = store;
this.ipCountry = ipCountry;
this.serial = serial;
}
}
+9 -9
View File
@@ -999,7 +999,7 @@ class CommandorPage {
await this.tapForDevice(this.device, 530, 970)
} else if (model === "HUAWEI NXT-TL00") {
await this.tapForDevice(this.device, 530, 950)
} else if (this.device.model === "ONEPLUS A6000") {
} else if (this.device.model === "ONEPLUS_A6000") {
await this.tapForDevice(this.device, 530, 1064)
} else if (this.device.model === "moto g51 5G") {
await this.tapForDevice(this.device, 500, 1080)
@@ -1315,7 +1315,7 @@ class CommandorPage {
await this.tapForDevice(this.device, 530, 950)
} else if (model === "M2006C3LG" || model === "220233L2G") {
await this.tapForDevice(this.device, 360, 777)
} else if (model === "ONEPLUS A6000") {
} else if (model === "ONEPLUS_A6000") {
await this.tapForDevice(this.device, 530, 1045)
} else if (model === "CPH2469") {
await this.tapForDevice(this.device, 360, 820)
@@ -1354,8 +1354,8 @@ class CommandorPage {
this.device.shell("input tap " + 925 + " " + 1325)
} else if (this.device.model === "22041219PG") {
this.device.shell("input tap " + 925 + " " + 1430)
} else if (this.device.model === "moto_g51_5G") {
this.device.shell("input tap " + 950 + " " + 1434)
} else if (this.device.model === "moto g51 5G") {
await this.tapForDevice(this.device, 950, 1434)
} else
this.device.shell("input tap " + 933 + " " + 1538)
await delay(2000);
@@ -1387,7 +1387,7 @@ class CommandorPage {
await this.tapForDevice(this.device, 103, 2283)
await delay(2000);
await openUrlWithAdb(RDV_URL, this.device)
} else if (this.device.model === "ONEPLUS A6000") {
} else if (this.device.model === "ONEPLUS_A6000") {
await this.tapForDevice(this.device, 122, 2172)
await delay(2000);
await openUrlWithAdb(RDV_URL, this.device)
@@ -1411,13 +1411,13 @@ class CommandorPage {
await delay(2000);
this.device.shell("input tap " + 800 + " " + 2100)
await delay(1000);
} else if (model === "ONEPLUS A6000") {
} else if (model === "ONEPLUS_A6000") {
this.device.shell("input tap " + 818 + " " + 2140)
await delay(2000);
this.device.shell("input tap " + 818 + " " + 2140)
await delay(1000);
} else if (model === "moto_g51_5G") {
this.device.shell("input tap " + 806 + " " + 2230)
await this.tapForDevice(this.device, 800, 2215)
await delay(2000);
this.device.shell("input tap " + 800 + " " + 2215)
await delay(1000);
@@ -1450,7 +1450,7 @@ class CommandorPage {
this.device.shell("input tap " + 492 + " " + 1960)
} else if (model === "Mi Note 10") {
this.device.shell("input tap " + 550 + " " + 1920)
} else if (model === "ONEPLUS A6000") {
} else if (model === "ONEPLUS_A6000") {
log("will tap on " + model + ": " + 535 + " " + 1930)
this.device.shell("input tap " + 535 + " " + 1930)
await delay(1000);
@@ -1498,7 +1498,7 @@ class CommandorPage {
await this.device.shell("input tap " + 411 + " " + 1977)
} else if (this.browserPackageName.includes("brave") && this.device.model === "RMX3151") {
await this.device.shell("input tap " + 411 + " " + 1977)
} else if (this.browserPackageName.includes("brave") && this.device.model === "ONEPLUS A6000") {
} else if (this.browserPackageName.includes("brave") && this.device.model === "ONEPLUS_A6000") {
await this.device.shell("input tap " + 411 + " " + 1970)
} else if (this.browserPackageName.includes("brave") && this.device.model === "ASUS_X00QD") {
await this.device.shell("input tap " + 411 + " " + 1970)