commit | 19382f7213ef380e7e1d8fdfc2931196238429e5 | [log] [tgz] |
---|---|---|
author | Chen Wang <chenw@google.com> | Tue Mar 29 16:35:29 2022 +0000 |
committer | Eric Lin <ericth@google.com> | Wed Mar 30 04:28:10 2022 +0000 |
tree | 4fe1d7cde1effdd74a5f4d0b4e27fe050cad3ac8 | |
parent | 221298d820d544ca6a424da3906ff3a01aed9b47 [diff] |
Fix ChreCommunication available status. Return true for ChreCommnication.available() only when the client is ready. Previous implementation returns true when the Hub is available, which is not right since Nearby nanoapp may not implemented in the hub. Ignore-AOSP-First: internal mainline development. Bug: 227282382 Test: atest NearbyUnitTests Test: Manual test with PixelBuds-A, the halfsheet popup, go/ml-fp-dp-tool Change-Id: I0331f9da631c7fa7f820ba4fddd20de8862b4b3e
diff --git a/nearby/service/java/com/android/server/nearby/provider/ChreCommunication.java b/nearby/service/java/com/android/server/nearby/provider/ChreCommunication.java index 607c579..5077ffe 100644 --- a/nearby/service/java/com/android/server/nearby/provider/ChreCommunication.java +++ b/nearby/service/java/com/android/server/nearby/provider/ChreCommunication.java
@@ -75,7 +75,7 @@ } public boolean available() { - return mInjector.getContextHubManagerAdapter() != null; + return mContextHubClient != null; } /**