summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]btif/src/btif_core.c9
-rwxr-xr-xbtif/src/btif_dm.c2
-rwxr-xr-x[-rw-r--r--]btif/src/btif_storage.c0
3 files changed, 9 insertions, 2 deletions
diff --git a/btif/src/btif_core.c b/btif/src/btif_core.c
index 560394f..19f26aa 100644..100755
--- a/btif/src/btif_core.c
+++ b/btif/src/btif_core.c
@@ -927,11 +927,18 @@ bt_status_t btif_set_adapter_property(const bt_property_t *property)
storage_req_id = BTIF_CORE_STORAGE_ADAPTER_WRITE;
}
break;
+ case BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT:
+ {
+ //Nothing to do beside store the value in NV. Java
+ //will change the SCAN_MODE property after setting timeout,
+ //if required.
+ storage_req_id = BTIF_CORE_STORAGE_ADAPTER_WRITE;
+ }
+ break;
case BT_PROPERTY_BDADDR:
case BT_PROPERTY_UUIDS:
case BT_PROPERTY_ADAPTER_BONDED_DEVICES:
case BT_PROPERTY_REMOTE_FRIENDLY_NAME:
- case BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT:
/* no write support through HAL, these properties are only populated from BTA events */
status = BT_STATUS_FAIL;
break;
diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c
index 610cd3f..17d2488 100755
--- a/btif/src/btif_dm.c
+++ b/btif/src/btif_dm.c
@@ -1306,7 +1306,7 @@ bt_status_t btif_dm_get_adapter_property(bt_property_t *prop)
case BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT:
{
uint32_t *tmt = (uint32_t*)prop->val;
- *tmt = 0;
+ *tmt = 120; /* default to 120s, if not found in NV */
prop->len = sizeof(uint32_t);
}
break;
diff --git a/btif/src/btif_storage.c b/btif/src/btif_storage.c
index f051de1..f051de1 100644..100755
--- a/btif/src/btif_storage.c
+++ b/btif/src/btif_storage.c