summaryrefslogtreecommitdiff
path: root/system/bta/has/has_client.cc
diff options
context:
space:
mode:
authorJack He <siyuanh@google.com>2022-02-23 16:58:03 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-02-23 16:58:03 +0000
commit3a88d77b08c87cb1517fa63cbdf7f99ca10100db (patch)
treec2c8d3e52f453cfd79776457c35d2935a698b93c /system/bta/has/has_client.cc
parent89b965d721c1b41755dc4935e576158d554714e5 (diff)
parent2e6d4b42917664491cd42bc0e13a2961ef058db4 (diff)
Merge changes I343ff48c,I4b1ecf81 am: 2e6d4b4291
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1985329 Change-Id: Id92c7e06e2d4a4ecbbf63942a922613ce6484020
Diffstat (limited to 'system/bta/has/has_client.cc')
-rw-r--r--system/bta/has/has_client.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/system/bta/has/has_client.cc b/system/bta/has/has_client.cc
index 7c6bbdc3c9..044713437f 100644
--- a/system/bta/has/has_client.cc
+++ b/system/bta/has/has_client.cc
@@ -1044,14 +1044,14 @@ class HasClientImpl : public HasClient {
/* Journal update */
device->has_journal_.Append(HasJournalRecord(features, true));
- /* When service is not yet validated, report the available device and
- * notify features otherwise.
+ /* When service is not yet validated, report the available device with
+ * features.
*/
- if (!device->isGattServiceValid()) {
+ if (!device->isGattServiceValid())
callbacks_->OnDeviceAvailable(device->addr, device->GetFeatures());
- } else {
- callbacks_->OnFeaturesUpdate(device->addr, device->GetFeatures());
- }
+
+ /* Notify features */
+ callbacks_->OnFeaturesUpdate(device->addr, device->GetFeatures());
MarkDeviceValidIfInInitialDiscovery(*device);
}