Loading system/bta/gatt/bta_gattc_db_storage.cc +10 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,15 @@ using gatt::StoredAttribute; using std::string; using std::vector; #ifdef TARGET_FLOSS #define GATT_CACHE_PREFIX "/var/lib/bluetooth/gatt/gatt_cache_" #define GATT_CACHE_VERSION 6 #define GATT_HASH_MAX_SIZE 30 #define GATT_HASH_PATH_PREFIX "/var/lib/bluetooth/gatt/gatt_hash_" #define GATT_HASH_PATH "/var/lib/bluetooth/gatt" #define GATT_HASH_FILE_PREFIX "gatt_hash_" #else #define GATT_CACHE_PREFIX "/data/misc/bluetooth/gatt_cache_" #define GATT_CACHE_VERSION 6 Loading @@ -40,6 +49,7 @@ using std::vector; #define GATT_HASH_PATH_PREFIX "/data/misc/bluetooth/gatt_hash_" #define GATT_HASH_PATH "/data/misc/bluetooth" #define GATT_HASH_FILE_PREFIX "gatt_hash_" #endif // Default expired time is 7 days #define GATT_HASH_EXPIRED_TIME 604800 Loading system/gd/rust/linux/stack/src/bluetooth_gatt.rs +2 −7 Original line number Diff line number Diff line Loading @@ -1734,22 +1734,17 @@ impl BtifGattClientCallbacks for BluetoothGatt { client_id: i32, addr: RawAddress, ) { self.context_map.remove_connection(client_id, conn_id); let client = self.context_map.get_by_client_id(client_id); if let Some(c) = client { let cbid = c.cbid; self.context_map.get_callback_from_callback_id(cbid).and_then( |cb: &mut GattClientCallback| { cb.on_client_connection_state( status, client_id, status == GattStatus::Success, addr.to_string(), ); cb.on_client_connection_state(status, client_id, false, addr.to_string()); Some(()) }, ); } self.context_map.remove_connection(client_id, conn_id); } fn search_complete_cb(&mut self, conn_id: i32, _status: GattStatus) { Loading Loading
system/bta/gatt/bta_gattc_db_storage.cc +10 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,15 @@ using gatt::StoredAttribute; using std::string; using std::vector; #ifdef TARGET_FLOSS #define GATT_CACHE_PREFIX "/var/lib/bluetooth/gatt/gatt_cache_" #define GATT_CACHE_VERSION 6 #define GATT_HASH_MAX_SIZE 30 #define GATT_HASH_PATH_PREFIX "/var/lib/bluetooth/gatt/gatt_hash_" #define GATT_HASH_PATH "/var/lib/bluetooth/gatt" #define GATT_HASH_FILE_PREFIX "gatt_hash_" #else #define GATT_CACHE_PREFIX "/data/misc/bluetooth/gatt_cache_" #define GATT_CACHE_VERSION 6 Loading @@ -40,6 +49,7 @@ using std::vector; #define GATT_HASH_PATH_PREFIX "/data/misc/bluetooth/gatt_hash_" #define GATT_HASH_PATH "/data/misc/bluetooth" #define GATT_HASH_FILE_PREFIX "gatt_hash_" #endif // Default expired time is 7 days #define GATT_HASH_EXPIRED_TIME 604800 Loading
system/gd/rust/linux/stack/src/bluetooth_gatt.rs +2 −7 Original line number Diff line number Diff line Loading @@ -1734,22 +1734,17 @@ impl BtifGattClientCallbacks for BluetoothGatt { client_id: i32, addr: RawAddress, ) { self.context_map.remove_connection(client_id, conn_id); let client = self.context_map.get_by_client_id(client_id); if let Some(c) = client { let cbid = c.cbid; self.context_map.get_callback_from_callback_id(cbid).and_then( |cb: &mut GattClientCallback| { cb.on_client_connection_state( status, client_id, status == GattStatus::Success, addr.to_string(), ); cb.on_client_connection_state(status, client_id, false, addr.to_string()); Some(()) }, ); } self.context_map.remove_connection(client_id, conn_id); } fn search_complete_cb(&mut self, conn_id: i32, _status: GattStatus) { Loading