Merge tag 'android-11.0.0_r48' into int/11/fp3

Android 11.0.0 Release 48 (RD2A.211001.002)

* tag 'android-11.0.0_r48':

Change-Id: Id2bf019b92bf5ecbb4fe6e667b93b71c5362ad69
diff --git a/acts/framework/acts/test_utils/tel/TelephonyBaseTest.py b/acts/framework/acts/test_utils/tel/TelephonyBaseTest.py
index 69bb67b..129e5d5 100644
--- a/acts/framework/acts/test_utils/tel/TelephonyBaseTest.py
+++ b/acts/framework/acts/test_utils/tel/TelephonyBaseTest.py
@@ -225,6 +225,16 @@
         ad.wakeup_screen()
         ad.adb.shell("input keyevent 82")
 
+    #added by Code Aurora
+    def wait_for_sim_ready(self,ad):
+
+        wait_for_sim_ready_on_sim_config = {
+                            SINGLE_SIM_CONFIG : lambda:wait_for_sim_ready_by_adb(self.log,ad),
+                            MULTI_SIM_CONFIG : lambda:wait_for_sims_ready_by_adb(self.log,ad)
+            }
+        if not wait_for_sim_ready_on_sim_config[self.sim_config["config"]]:
+            raise signals.TestAbortClass("unable to load the SIM")
+
     def wait_for_sim_ready(self,ad):
         wait_for_sim_ready_on_sim_config = {
               SINGLE_SIM_CONFIG : lambda:wait_for_sim_ready_by_adb(self.log,ad),
@@ -310,6 +320,7 @@
             ensure_phone_idle(self.log, ad)
             setup_droid_properties(self.log, ad, sim_conf_file)
         else:
+            #added for dsds automation support
             self.wait_for_sim_ready(ad)
             ensure_phone_default_state(self.log, ad)
             setup_droid_properties(self.log, ad, sim_conf_file)
diff --git a/acts/framework/acts/test_utils/tel/tel_test_utils.py b/acts/framework/acts/test_utils/tel/tel_test_utils.py
index 1b5a50b..022a2a5 100644
--- a/acts/framework/acts/test_utils/tel/tel_test_utils.py
+++ b/acts/framework/acts/test_utils/tel/tel_test_utils.py
@@ -783,6 +783,19 @@
 def wait_for_sim_ready_by_adb(log, ad, wait_time=90):
     return _wait_for_droid_in_state(log, ad, wait_time, is_sim_ready_by_adb)
 
+#added by Code Aurora
+def is_sims_ready_by_adb(log, ad):
+    states = list(ad.adb.getprop("gsm.sim.state").split(","))
+    ad.log.info("gsm.sim.state = %s", states)
+    for state in states:
+        if state != SIM_STATE_READY and state != SIM_STATE_LOADED:
+            return False
+    return True
+
+#added by Code Aurora
+def wait_for_sims_ready_by_adb(log, ad, wait_time=90):
+    return _wait_for_droid_in_state(log, ad, wait_time, is_sims_ready_by_adb)
+
 
 def is_sims_ready_by_adb(log, ad):
     states = list(ad.adb.getprop("gsm.sim.state").split(","))
@@ -3829,10 +3842,6 @@
 def trigger_modem_crash_by_modem(ad, timeout=120):
     begin_time = get_device_epoch_time(ad)
     ad.adb.shell(
-        "setprop persist.vendor.sys.modem.diag.mdlog false",
-        ignore_status=True)
-    # Legacy pixels use persist.sys.modem.diag.mdlog.
-    ad.adb.shell(
         "setprop persist.sys.modem.diag.mdlog false", ignore_status=True)
     disable_qxdm_logger(ad)
     cmd = ('am instrument -w -e request "4b 25 03 00" '
diff --git a/acts/framework/acts/test_utils/tel/tel_voice_utils.py b/acts/framework/acts/test_utils/tel/tel_voice_utils.py
index 95b08a2..4e540d9 100644
--- a/acts/framework/acts/test_utils/tel/tel_voice_utils.py
+++ b/acts/framework/acts/test_utils/tel/tel_voice_utils.py
@@ -290,7 +290,6 @@
                 return False
     return True
 
-
 def two_phone_call_long_seq(log,
                             phone_a,
                             phone_a_idle_func,
@@ -889,7 +888,7 @@
     return phone_setup_voice_general_for_subscription(
         log, ad, get_outgoing_voice_sub_id(ad))
 
-
+#added by Code Aurora
 def phone_setup_voice_general_for_slot(log,ad,slot_id):
     return phone_setup_voice_general_for_subscription(
         log, ad, get_subid_from_slot_index(log,ad,slot_id))