aware: Fix respondToPairingSetup with valid peerHandle am: 3748786c6b

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Wifi/+/2823350

Change-Id: I74e44be4c02fc08fdef59b9c1e56961fad1f5844
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/tests/hostsidetests/multidevices/com.google.snippet.wifi/aware/WifiAwareSnippet.java b/tests/hostsidetests/multidevices/com.google.snippet.wifi/aware/WifiAwareSnippet.java
index efeda1f..2cc69b6 100644
--- a/tests/hostsidetests/multidevices/com.google.snippet.wifi/aware/WifiAwareSnippet.java
+++ b/tests/hostsidetests/multidevices/com.google.snippet.wifi/aware/WifiAwareSnippet.java
@@ -374,6 +374,10 @@
                     String.format("respondToPairingSetup: pairing request missing %s",
                             callbackData.callbackCode));
         }
+        mPeerHandle = callbackData.peerHandle;
+        if (mPeerHandle == null) {
+            throw new WifiAwareSnippetException("respondToPairingSetup: peerHandle null");
+        }
         if (accept) {
             mDiscoverySession.acceptPairingRequest(callbackData.pairingRequestId, mPeerHandle,
                     ALIAS_SUBSCRIBE, Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_128,