Add device password config support in testbed setup.
Test: run test locally
Bug: 64074249
Change-Id: I89ff90790c72d49aae77eebdce29c78ece96fdf9
diff --git a/acts/framework/acts/test_utils/tel/TelephonyBaseTest.py b/acts/framework/acts/test_utils/tel/TelephonyBaseTest.py
index bab9fb6..f46e234 100644
--- a/acts/framework/acts/test_utils/tel/TelephonyBaseTest.py
+++ b/acts/framework/acts/test_utils/tel/TelephonyBaseTest.py
@@ -83,6 +83,12 @@
ad.log,
"Puk and puk_pin provided in testbed config do NOT work"
)
+ # Enable or Disable Device Password
+ device_password = getattr(ad, "device_password", None)
+ if not device_password:
+ ad.droid.disableDevicePassword()
+ else:
+ ad.droid.setDevicePassword(device_password)
self.skip_reset_between_cases = self.user_params.get(
"skip_reset_between_cases", True)
@@ -260,7 +266,8 @@
if self.skip_reset_between_cases:
ensure_phones_idle(self.log, self.android_devices)
- ensure_phones_default_state(self.log, self.android_devices)
+ else:
+ ensure_phones_default_state(self.log, self.android_devices)
def teardown_test(self):
return True