PTS: Allow disabling connection updates

Use Case: Certification test case requiring LE secure pairing
with PTS.

Failure:
LE pairing test cases follow the host behavior where
connection parameters are switched to fast parameters
for SMP and service discovery and switched back to the
default values after SMP/LE discovery is complete.
PTS disconnects to these series of connection updates.

Fix:
This change disables connection updates based on run time
flag "PTS_DisableConnUpdates" fetched from bt_stack.conf

Bug: 27852645
Change-Id: I1da213fd143ccfcb0ac82c7049a94094d2716ff1
diff --git a/main/stack_config.c b/main/stack_config.c
index 9df9bb8..1b86a37 100644
--- a/main/stack_config.c
+++ b/main/stack_config.c
@@ -30,6 +30,7 @@
 const char *BTSNOOP_SHOULD_SAVE_LAST_KEY = "BtSnoopSaveLog";
 const char *TRACE_CONFIG_ENABLED_KEY = "TraceConf";
 const char *PTS_SECURE_ONLY_MODE = "PTS_SecurePairOnly";
+const char *PTS_LE_CONN_UPDATED_DISABLED = "PTS_DisableConnUpdates";
 
 static config_t *config;
 
@@ -93,6 +94,10 @@
     return config_get_bool(config, CONFIG_DEFAULT_SECTION, PTS_SECURE_ONLY_MODE, false);
 }
 
+static bool get_pts_conn_updates_disabled(void) {
+  return config_get_bool(config, CONFIG_DEFAULT_SECTION, PTS_LE_CONN_UPDATED_DISABLED, false);
+}
+
 static config_t *get_all(void) {
   return config;
 }
@@ -103,6 +108,7 @@
   get_btsnoop_should_save_last,
   get_trace_config_enabled,
   get_pts_secure_only_mode,
+  get_pts_conn_updates_disabled,
   get_all
 };