fiter xiaomi and oneplus 6

This commit is contained in:
2023-02-18 10:43:12 +01:00
parent a02db68b32
commit c48254e988
2 changed files with 17 additions and 5 deletions
+10
View File
@@ -276,3 +276,13 @@ adb -s emulator-5562 shell am start -n com.android.chrome/com.google.android.app
adb -s emulator-5558 shell pm clear com.android.chrome adb -s emulator-5558 shell pm clear com.android.chrome
adb -s emulator-5558 shell am set-debug-app --persistent com.android.chrome adb -s emulator-5558 shell am set-debug-app --persistent com.android.chrome
adb -s emulator-5558 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main adb -s emulator-5558 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main
#18
adb -s 192.168.0.37:5555 shell pm clear com.android.chrome
adb -s 192.168.0.37:5555 shell am set-debug-app --persistent com.android.chrome
adb -s 192.168.0.37:5555 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main
#18
adb -s 192.168.0.27:5555 shell pm clear com.android.chrome
adb -s 192.168.0.27:5555 shell am set-debug-app --persistent com.android.chrome
adb -s 192.168.0.27:5555 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main
+6 -4
View File
@@ -10,6 +10,7 @@ const SEVEN_DAYS_IN_S = 3600 * 24 * 7;
const THIRTY_DAYS_IN_S = 3600 * 24 * 30; const THIRTY_DAYS_IN_S = 3600 * 24 * 30;
let excelUtil = new ExcelUtil(); let excelUtil = new ExcelUtil();
let collectionName = formatDate(new Date()) let collectionName = formatDate(new Date())
device_to_excludes = ["47e7e36b", "e30eb015"]
async function filterAlreadyBookedContacts(contactList) { async function filterAlreadyBookedContacts(contactList) {
let alreadyBookedContacts = await mongoManager.getAllSuccessfulItemsForDay(collectionName); let alreadyBookedContacts = await mongoManager.getAllSuccessfulItemsForDay(collectionName);
@@ -166,11 +167,12 @@ async function startBookWithNumbers(startNumber, endNumber, selectedStore, pathT
alert("未找到连接的设备"); alert("未找到连接的设备");
return return
} }
let segmentNumber = listWithoutBlackContact.length / devices.length; let filteredDeviceList = devices.filter(device => !device_to_excludes.includes(device.serial()))
console.log("connected device number:" + devices.length) let segmentNumber = listWithoutBlackContact.length / filteredDeviceList.length;
console.log("connected device number:" + filteredDeviceList.length)
console.log("segmentNumber:" + segmentNumber) console.log("segmentNumber:" + segmentNumber)
for (let i = 0; i < devices.length; i++) { for (let i = 0; i < filteredDeviceList.length; i++) {
startWithList(listWithoutBlackContact.slice(i * segmentNumber, segmentNumber * (i + 1)), devices[i], selectedStore, audioAnalyse, alertBeep); startWithList(listWithoutBlackContact.slice(i * segmentNumber, segmentNumber * (i + 1)), filteredDeviceList[i], selectedStore, audioAnalyse, alertBeep);
} }
}) })
}) })