use only one card pool

This commit is contained in:
2022-03-18 09:21:06 +01:00
parent 73f53bf689
commit f4533eeb1d
6 changed files with 28 additions and 25 deletions
+7 -7
View File
@@ -18,26 +18,26 @@ class Commandor:
self.clear_app_data()
subprocess.call(
"adb shell am start -n {}/.{} --es \"first_name\" \"{}\" --es \"last_name\" \"{}\" --es \"phone\" \"{}\" --es \"email\" \"{}\" --es \"passport\" \"{}\"".format(
"/Users/panlei/Library/Android/sdk/platform-tools/adb shell am start -n {}/.{} --es \"first_name\" \"{}\" --es \"last_name\" \"{}\" --es \"phone\" \"{}\" --es \"email\" \"{}\" --es \"passport\" \"{}\"".format(
PACKAGE_NAME, ACTIVITY_NAME, contact.first_name, contact.last_name, contact.phone, "{}_{}@gmail.com".format(contact.first_name,contact.last_name), contact.passport), shell=True)
pass
def clear_app_data(self):
subprocess.call("adb shell pm clear {}".format(PACKAGE_NAME), shell=True)
subprocess.call("/Users/panlei/Library/Android/sdk/platform-tools/adb shell pm clear {}".format(PACKAGE_NAME), shell=True)
def send_otp(self, otp: str):
subprocess.call(
"adb shell am broadcast -a {} --es otp \"{}\"".format(BROADCAST_ACTION, otp), shell=True)
"/Users/panlei/Library/Android/sdk/platform-tools/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)
subprocess.call("/Users/panlei/Library/Android/sdk/platform-tools/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)
subprocess.call("/Users/panlei/Library/Android/sdk/platform-tools/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)
subprocess.call("/Users/panlei/Library/Android/sdk/platform-tools/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)
subprocess.call("/Users/panlei/Library/Android/sdk/platform-tools/adb shell am broadcast -a android.intent.action.AIRPLANE_MODE", shell=True)
time.sleep(10)