summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/aware/WifiAwareHalTest.java5
-rw-r--r--tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java8
2 files changed, 5 insertions, 8 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareHalTest.java b/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareHalTest.java
index c18e27fcb..d462e1308 100644
--- a/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareHalTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareHalTest.java
@@ -23,7 +23,6 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import android.net.wifi.aware.ConfigRequest;
-import android.net.wifi.aware.DiscoverySessionCallback;
import android.net.wifi.aware.PublishConfig;
import android.net.wifi.aware.SubscribeConfig;
import android.net.wifi.aware.TlvBufferUtils;
@@ -663,7 +662,7 @@ public class WifiAwareHalTest {
WifiAwareHalMock.callPublishTerminated(HalMockUtils.convertBundleToJson(args).toString());
verify(mAwareStateManager).onSessionTerminatedNotification(publishId,
- DiscoverySessionCallback.TERMINATE_REASON_DONE, true);
+ WifiAwareNative.AWARE_STATUS_SUCCESS, true);
verifyNoMoreInteractions(mAwareStateManager);
}
@@ -678,7 +677,7 @@ public class WifiAwareHalTest {
WifiAwareHalMock.callSubscribeTerminated(HalMockUtils.convertBundleToJson(args).toString());
verify(mAwareStateManager).onSessionTerminatedNotification(subscribeId,
- DiscoverySessionCallback.TERMINATE_REASON_FAIL, false);
+ WifiAwareNative.AWARE_STATUS_INTERNAL_FAILURE, false);
verifyNoMoreInteractions(mAwareStateManager);
}
diff --git a/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java b/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java
index 5ae96d5bb..b5ad7f9f3 100644
--- a/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java
@@ -44,7 +44,6 @@ import android.content.pm.PackageManager;
import android.net.ConnectivityManager;
import android.net.wifi.RttManager;
import android.net.wifi.aware.ConfigRequest;
-import android.net.wifi.aware.DiscoverySessionCallback;
import android.net.wifi.aware.IWifiAwareDiscoverySessionCallback;
import android.net.wifi.aware.IWifiAwareEventCallback;
import android.net.wifi.aware.PublishConfig;
@@ -490,7 +489,7 @@ public class WifiAwareStateManagerTest {
final int uid = 1000;
final int pid = 2000;
final String callingPackage = "com.google.somePackage";
- final int reasonTerminate = DiscoverySessionCallback.TERMINATE_REASON_DONE;
+ final int reasonTerminate = WifiAwareNative.AWARE_STATUS_SUCCESS;
final int publishId = 15;
ConfigRequest configRequest = new ConfigRequest.Builder().build();
@@ -752,7 +751,7 @@ public class WifiAwareStateManagerTest {
final int uid = 1000;
final int pid = 2000;
final String callingPackage = "com.google.somePackage";
- final int reasonTerminate = DiscoverySessionCallback.TERMINATE_REASON_DONE;
+ final int reasonTerminate = WifiAwareNative.AWARE_STATUS_SUCCESS;
final int subscribeId = 15;
ConfigRequest configRequest = new ConfigRequest.Builder().build();
@@ -2053,7 +2052,6 @@ public class WifiAwareStateManagerTest {
final String serviceName = "some-service-name";
final String ssi = "some much longer and more arbitrary data";
final int publishCount = 7;
- final int reason = DiscoverySessionCallback.TERMINATE_REASON_DONE;
final int publishId = 22;
ConfigRequest configRequest = new ConfigRequest.Builder().setClusterLow(clusterLow)
@@ -2109,7 +2107,7 @@ public class WifiAwareStateManagerTest {
mMockLooper.dispatchAll();
// (6) got some callback on original publishId - should be ignored
- mDut.onSessionTerminatedNotification(publishId, reason, true);
+ mDut.onSessionTerminatedNotification(publishId, 0, true);
mMockLooper.dispatchAll();
verifyNoMoreInteractions(mMockNative, mockCallback, mockSessionCallback);