Add APM Toggle True in TelephonyBaseTest Setup Class

Bug: 30470813
Change-Id: I47d2e54fb8617ef5d937ed6c43fe90f74f8014bd
diff --git a/acts/framework/acts/test_utils/tel/TelephonyBaseTest.py b/acts/framework/acts/test_utils/tel/TelephonyBaseTest.py
index 3187ca7..5590cda 100644
--- a/acts/framework/acts/test_utils/tel/TelephonyBaseTest.py
+++ b/acts/framework/acts/test_utils/tel/TelephonyBaseTest.py
@@ -36,6 +36,7 @@
     set_subid_for_message
 from acts.test_utils.tel.tel_subscription_utils import \
     set_subid_for_outgoing_call
+from acts.test_utils.tel.tel_test_utils import toggle_airplane_mode
 from acts.test_utils.tel.tel_test_utils import ensure_phones_default_state
 from acts.test_utils.tel.tel_test_utils import \
     reset_preferred_network_type_to_allowable_range
@@ -115,6 +116,11 @@
         for ad in self.android_devices:
             setup_droid_properties(self.log, ad,
                                    self.user_params["sim_conf_file"])
+
+            # Ensure that a test class starts from a consistent state that
+            # improves chances of valid network selection and facilitates
+            # logging.
+            toggle_airplane_mode(self.log, ad, True)
             if not set_phone_screen_on(self.log, ad):
                 self.log.error("Failed to set phone screen-on time.")
                 return False
@@ -157,7 +163,7 @@
         finally:
             for ad in self.android_devices:
                 try:
-                    ad.droid.connectivityToggleAirplaneMode(True)
+                    toggle_airplane_mode(self.log, ad, True)
                 except BrokenPipeError:
                     # Broken Pipe, can not call SL4A API to turn on Airplane Mode.
                     # Use adb command to turn on Airplane Mode.