update contact list

This commit is contained in:
2022-03-06 22:57:16 +01:00
parent b748cfcf6a
commit 184e708caf
4 changed files with 20 additions and 7 deletions
+14 -2
View File
@@ -1,4 +1,5 @@
import subprocess
import time
from pojo.contact_pojo import ContactPojo
@@ -29,9 +30,20 @@ class Commandor:
"adb shell am broadcast -a {} --es otp \"{}\"".format(BROADCAST_ACTION, otp), shell=True)
pass
def reset_air_plan_mode(self):
subprocess.call("adb shell settings put global airplane_mode_on 1", shell=True)
time.sleep(1)
subprocess.call("adb shell am broadcast -a android.intent.action.AIRPLANE_MODE", shell=True)
time.sleep(1)
subprocess.call("adb shell settings put global airplane_mode_on 0", shell=True)
time.sleep(1)
subprocess.call("adb shell am broadcast -a android.intent.action.AIRPLANE_MODE", shell=True)
time.sleep(5)
if __name__ == '__main__':
commandor = Commandor()
contact = ContactPojo("0649614591", "E24183897", "LIU", "Yusi", "AZEER", "lei-pan@outlook.com")
commandor.start_page(contact)
# contact = ContactPojo("0649614591", "E24183897", "LIU", "Yusi", "AZEER", "lei-pan@outlook.com")
# commandor.start_page(contact)
commandor.reset_air_plan_mode()
# commandor.send_otp("262353")