diff --git a/examples/android/CHIPTool/app/src/main/AndroidManifest.xml b/examples/android/CHIPTool/app/src/main/AndroidManifest.xml index 0d7401fea46066..0526dc5a78160d 100644 --- a/examples/android/CHIPTool/app/src/main/AndroidManifest.xml +++ b/examples/android/CHIPTool/app/src/main/AndroidManifest.xml @@ -3,6 +3,8 @@ xmlns:tools="http://schemas.android.com/tools" package="com.google.chip.chiptool"> + + diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/ChipClient.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/ChipClient.kt index 3d130f835de459..add408b7af9693 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/ChipClient.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/ChipClient.kt @@ -33,7 +33,7 @@ import chip.platform.PreferencesKeyValueStoreManager import com.google.chip.chiptool.attestation.ExampleAttestationTrustStoreDelegate import kotlin.coroutines.resume import kotlin.coroutines.resumeWithException -import kotlin.coroutines.suspendCoroutine +import kotlinx.coroutines.suspendCancellableCoroutine /** Lazily instantiates [ChipDeviceController] and holds a reference to it. */ object ChipClient { @@ -75,7 +75,7 @@ object ChipClient { // once we are done with the returned device pointer. Memory leak was introduced since the refactor // that introduced it was very large in order to fix a use after free, which was considered to be // worse than the memory leak that was introduced. - return suspendCoroutine { continuation -> + return suspendCancellableCoroutine { continuation -> getDeviceController(context).getConnectedDevicePointer( nodeId, object : GetConnectedDeviceCallback { diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/clusterinteraction/endpointItem.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/clusterinteraction/EndpointItem.kt similarity index 100% rename from examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/clusterinteraction/endpointItem.kt rename to examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/clusterinteraction/EndpointItem.kt