[WifiXval|Host] Require exact AP v CHRE scan size. am: 8ecdeaf5a6
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/chre/+/15111730
Change-Id: Id9b1e1bae608e0bc7a70433016b9d696511eda2a
diff --git a/apps/test/common/proto/chre_cross_validation_wifi.proto b/apps/test/common/proto/chre_cross_validation_wifi.proto
index 7e6348d..8a681d0 100644
--- a/apps/test/common/proto/chre_cross_validation_wifi.proto
+++ b/apps/test/common/proto/chre_cross_validation_wifi.proto
@@ -26,11 +26,6 @@
// C2H: Nanoapp informing host about the wifi capabilities it has.
// The payload must be a WifiCapabilities message.
WIFI_CAPABILITIES = 4;
-
- // H2C: Host telling nanoapp whether or not to allow a certain threshold of
- // the CHRE scan results size to be less than the AP scan results size.
- // The payload must be a UseScanResultsSizeThreshold message.
- USE_SCAN_RESULTS_SIZE_THRESHOLD = 5;
}
enum Step {
diff --git a/java/test/cross_validation/src/com/google/android/chre/test/crossvalidator/ChreCrossValidatorWifi.java b/java/test/cross_validation/src/com/google/android/chre/test/crossvalidator/ChreCrossValidatorWifi.java
index a32c8cb..a6cd095 100644
--- a/java/test/cross_validation/src/com/google/android/chre/test/crossvalidator/ChreCrossValidatorWifi.java
+++ b/java/test/cross_validation/src/com/google/android/chre/test/crossvalidator/ChreCrossValidatorWifi.java
@@ -78,21 +78,14 @@
private AtomicReference<String> mWifiScanResultsCompareFinalErrorMessage =
new AtomicReference<String>(null);
- private boolean mUseScanResultsSizeThreshold;
-
- /**
- * @param useScanResultsSizeThreshold true if the test should allow CHRE to have a certain
- * threhsold less scan results than AP.
- */
public ChreCrossValidatorWifi(
ContextHubManager contextHubManager, ContextHubInfo contextHubInfo,
- NanoAppBinary nanoAppBinary, boolean useScanResultsSizeThreshold) {
+ NanoAppBinary nanoAppBinary) {
super(contextHubManager, contextHubInfo, nanoAppBinary);
Assert.assertTrue("Nanoapp given to cross validator is not the designated chre cross"
+ " validation nanoapp.",
nanoAppBinary.getNanoAppId() == NANO_APP_ID);
Context context = InstrumentationRegistry.getInstrumentation().getContext();
- mUseScanResultsSizeThreshold = useScanResultsSizeThreshold;
mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
mWifiScanReceiver = new BroadcastReceiver() {
@Override
@@ -120,9 +113,6 @@
mCollectingData.set(true);
sendStepStartMessage(Step.SETUP);
- // TODO(b/158770664): Address the issue that requires this workaround in the test on older
- // devices.
- sendMessageUseScanResultsThresholdMessage(mUseScanResultsSizeThreshold);
waitForMessageFromNanoapp();
mCollectingData.set(false);
@@ -215,16 +205,6 @@
}
}
- private void sendMessageUseScanResultsThresholdMessage(boolean useThreshold) {
- int messageType = ChreCrossValidationWifi.MessageType.USE_SCAN_RESULTS_SIZE_THRESHOLD_VALUE;
- ChreCrossValidationWifi.UseScanResultsSizeThreshold messageProto =
- ChreCrossValidationWifi.UseScanResultsSizeThreshold
- .newBuilder().setUseThreshold(useThreshold).build();
- NanoAppMessage message = NanoAppMessage.createMessageToNanoApp(
- mNappBinary.getNanoAppId(), messageType, messageProto.toByteArray());
- sendMessageToNanoApp(message);
- }
-
private NanoAppMessage makeWifiScanResultMessage(ScanResult result, int totalNumResults,
int resultIndex) {
int messageType = ChreCrossValidationWifi.MessageType.SCAN_RESULT_VALUE;