is_current_network_5g_nsa_for_subscription is added to support DSDS

is_current_network_5g_nsa_for_subscription is added to check if UE is in
5G NSA coverage for each sub ID. It changes the default voice sub ID to
desired sub ID, and then runs is_current_network_5g_nsa for the desired
sub ID. In the end the voice sub ID will be changed back to the original
one.

Bug: None
Test: Yes, locally.
Change-Id: I5232e63dbfba5a652fd897e2369bbcbb981f6e49
diff --git a/acts_tests/acts_contrib/test_utils/tel/tel_test_utils.py b/acts_tests/acts_contrib/test_utils/tel/tel_test_utils.py
index ea7b3a2..0d63078 100644
--- a/acts_tests/acts_contrib/test_utils/tel/tel_test_utils.py
+++ b/acts_tests/acts_contrib/test_utils/tel/tel_test_utils.py
@@ -1553,6 +1553,8 @@
         ad.droid.telephonyStopTrackingDisplayInfoChange()
     return None
 
+def is_current_network_5g_nsa_for_subscription(ad, timeout=30, sub_id=None):
+    return change_voice_subid_temporarily(ad, sub_id, is_current_network_5g_nsa, params=[ad, timeout])
 
 def disconnect_call_by_id(log, ad, call_id):
     """Disconnect call by call id.
@@ -10981,7 +10983,7 @@
 
     return tel_result_wrapper
 
-def change_voice_subid_temporarily(ad, sub_id, state_check_func):
+def change_voice_subid_temporarily(ad, sub_id, state_check_func, params=None):
     result = False
     voice_sub_id_changed = False
     current_sub_id = get_incoming_voice_sub_id(ad)
@@ -10989,8 +10991,12 @@
         set_incoming_voice_sub_id(ad, sub_id)
         voice_sub_id_changed = True
 
-    if state_check_func():
-        result = True
+    if not params:
+        if state_check_func():
+            result = True
+    else:
+        if state_check_func(*params):
+            result = True
 
     if voice_sub_id_changed:
         set_incoming_voice_sub_id(ad, current_sub_id)