Implement robust caching (server)
Flag: - Use flag to enable/disable robust caching on server side btif_storage - Add APIs to set/get/remove database hash and client supported features Database Hash - Add database hash definition into GATT profile - Set client to change aware when reading database hash Client Supported Features - Add write check for client supported features characteristic - Store client supported feature into btif_storage Behaviors - When a service is added/removed . Update database hash . Set clients that support robust caching to change unaware - After ack for service changed indication is received . Set the client to change aware - When the client is change unaware . Allow request of reading database hash (by handle or by uuid) . Allow write_execute, config_mtu and handle_value_conf . Send DATABASE_OUT_OF_SYNC error when it is a request . Ignore if it is a command . After the response is sent, set the client to change aware - When a client is set from change unaware to change aware . Store current database hash to btif_stroage for that client Connect and Disconnect: - When a tGATT_TCB instance is allocated, load status from btif_storage - When disconnected, if the device is untrusted, remove data from btif_storage Tag: #feature Test: atest net_test_stack_gatt_native:GattSrRobustCachingTest Bug: 154056389 Change-Id: I81971012618472dd9e0e6a9e41868caa68998ad4
Loading
Please register or sign in to comment