summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoy Babafemi <jbabs@google.com>2022-06-17 21:22:13 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2022-06-17 21:22:13 +0000
commit09721e9c7878522ab3ebfe0ca2b63d460e465264 (patch)
tree0efdb5ccf2f135d133126829043f054bc7893e97
parent38babf0f76205eee0c1ca1344995e63de5ba4fda (diff)
parenteef41924c086ba1ac0fb181cd2797b3d25ee090b (diff)
downloadcts-09721e9c7878522ab3ebfe0ca2b63d460e465264.tar.gz
Merge "Make CTS-V Presence Tests instructions clearer" into tm-dev
-rw-r--r--apps/CtsVerifier/AndroidManifest.xml64
-rw-r--r--apps/CtsVerifier/res/layout/ble_rx_offset.xml59
-rw-r--r--apps/CtsVerifier/res/layout/ble_tx_offset.xml59
-rw-r--r--apps/CtsVerifier/res/layout/uwb_precision.xml5
-rw-r--r--apps/CtsVerifier/res/values/strings.xml48
-rw-r--r--apps/CtsVerifier/src/com/android/cts/verifier/presence/BleRssiPrecisionActivity.java4
-rw-r--r--apps/CtsVerifier/src/com/android/cts/verifier/presence/BleRxOffsetActivity.java90
-rw-r--r--apps/CtsVerifier/src/com/android/cts/verifier/presence/BleRxTxCalibrationActivity.java6
-rw-r--r--apps/CtsVerifier/src/com/android/cts/verifier/presence/BleTxOffsetActivity.java88
-rw-r--r--apps/CtsVerifier/src/com/android/cts/verifier/presence/NanPrecisionTestActivity.java11
-rw-r--r--apps/CtsVerifier/src/com/android/cts/verifier/presence/UwbPrecisionActivity.java30
11 files changed, 27 insertions, 437 deletions
diff --git a/apps/CtsVerifier/AndroidManifest.xml b/apps/CtsVerifier/AndroidManifest.xml
index 35afa207584..d74516b6f09 100644
--- a/apps/CtsVerifier/AndroidManifest.xml
+++ b/apps/CtsVerifier/AndroidManifest.xml
@@ -4076,70 +4076,6 @@
android:value="7.4.3/C-7-2" />
</activity>
- <!--
- CTS Verifier BLE Rx Offset Test Screen
- test category : BLE
- test parent : PresenceTestActivity
- -->
- <activity
- android:name=".presence.BleRxOffsetActivity"
- android:exported="true"
- android:label="@string/ble_rx_offset_name">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
-
- <category android:name="android.cts.intent.category.MANUAL_TEST" />
- </intent-filter>
-
- <meta-data
- android:name="test_category"
- android:value="@string/ble" />
- <meta-data
- android:name="test_parent"
- android:value="com.android.cts.verifier.presence.PresenceTestActivity" />
- <meta-data
- android:name="test_required_features"
- android:value="android.hardware.bluetooth_le" />
- <meta-data
- android:name="display_mode"
- android:value="single_display_mode" />
- <meta-data
- android:name="CddText"
- android:value="7.4.3/C-7-3" />
- </activity>
-
- <!--
- CTS Verifier BLE Tx Offset Test Screen
- test category : BLE
- test parent : PresenceTestActivity
- -->
- <activity
- android:name=".presence.BleTxOffsetActivity"
- android:exported="true"
- android:label="@string/ble_tx_offset_name">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
-
- <category android:name="android.cts.intent.category.MANUAL_TEST" />
- </intent-filter>
-
- <meta-data
- android:name="test_category"
- android:value="@string/ble" />
- <meta-data
- android:name="test_parent"
- android:value="com.android.cts.verifier.presence.PresenceTestActivity" />
- <meta-data
- android:name="test_required_features"
- android:value="android.hardware.bluetooth_le" />
- <meta-data
- android:name="display_mode"
- android:value="single_display_mode" />
- <meta-data
- android:name="CddText"
- android:value="7.4.3/C-7-4" />
- </activity>
-
<!-- CTS Verifier Nan Precision and Bias Test Screen
test category : wifi_nan
test parent : PresenceTestActivity
diff --git a/apps/CtsVerifier/res/layout/ble_rx_offset.xml b/apps/CtsVerifier/res/layout/ble_rx_offset.xml
deleted file mode 100644
index 3ca35b433bb..00000000000
--- a/apps/CtsVerifier/res/layout/ble_rx_offset.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?><!--
- ~ Copyright (C) 2022 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- style="@style/RootLayoutPadding"
- tools:ignore="Autofill">
-
- <ScrollView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
-
- <LinearLayout
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
-
- <TextView
- android:text="@string/ble_rx_offset_test_instructions"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:scrollbars="vertical" />
-
- <EditText
- android:id="@+id/report_ble_rssi_median"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:hint="@string/report_ble_rssi_median"
- android:inputType="numberSigned" />
-
- <EditText
- android:id="@+id/report_reference_device"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:hint="@string/report_reference_device"
- android:inputType="text" />
-
- <include
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- layout="@layout/pass_fail_buttons" />
- </LinearLayout>
- </ScrollView>
-</RelativeLayout>
diff --git a/apps/CtsVerifier/res/layout/ble_tx_offset.xml b/apps/CtsVerifier/res/layout/ble_tx_offset.xml
deleted file mode 100644
index 0c952bda646..00000000000
--- a/apps/CtsVerifier/res/layout/ble_tx_offset.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?><!--
- ~ Copyright (C) 2022 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- style="@style/RootLayoutPadding"
- tools:ignore="Autofill">
-
- <ScrollView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
-
- <LinearLayout
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
-
- <TextView
- android:text="@string/ble_tx_offset_test_instructions"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:scrollbars="vertical" />
-
- <EditText
- android:id="@+id/report_ble_rssi_median"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:hint="@string/report_ble_rssi_median"
- android:inputType="numberSigned" />
-
- <EditText
- android:id="@+id/report_reference_device"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:hint="@string/report_reference_device"
- android:inputType="text" />
-
- <include
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- layout="@layout/pass_fail_buttons" />
- </LinearLayout>
- </ScrollView>
-</RelativeLayout>
diff --git a/apps/CtsVerifier/res/layout/uwb_precision.xml b/apps/CtsVerifier/res/layout/uwb_precision.xml
index c0d2800d45a..14e996d6f5f 100644
--- a/apps/CtsVerifier/res/layout/uwb_precision.xml
+++ b/apps/CtsVerifier/res/layout/uwb_precision.xml
@@ -37,11 +37,6 @@
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:hint="@string/report_distance_range_cm"/>
- <EditText android:id="@+id/aoa_range_degrees"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:inputType="numberDecimal"
- android:hint="@string/report_aoa_range_degrees"/>
<EditText android:id="@+id/reference_device"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/apps/CtsVerifier/res/values/strings.xml b/apps/CtsVerifier/res/values/strings.xml
index ada0e3d0dd8..baaa61d592e 100644
--- a/apps/CtsVerifier/res/values/strings.xml
+++ b/apps/CtsVerifier/res/values/strings.xml
@@ -6599,12 +6599,10 @@ Follow the instructions on the screen to measure the frequency response for the
<string name="uwb_short_range">Uwb Short Range Test</string>
<string name="uwb_precision_instruction">
1. Take 1000 measurements with DUT at 1m distance from the reference device in a non-reflective chamber.
- \n2. Sort the 1000 measurements.
- \n3. Report the range below - Must be within +/-15cm (distance) and +/-5 degrees (angle of arrival, if supported) for 95% of the measurements for tests to pass.
- \n5. Distance range is a compulsory input for this test to pass. Angle of arrival (Aoa) is optional.
+ \n2. Sort the 1000 measurements and compute the range as 975th measurement - 25th measurement
+ \n3. Report the range below - Must be within 30cm (distance) for tests to pass.
</string>
<string name="report_distance_range_cm">Report Range (cm)</string>
- <string name="report_aoa_range_degrees">Report Range (degrees)</string>
<string name="uwb_short_range_instruction">
1. Take 1000 measurements with DUT being 1m apart from the reference device, where ground truth distance is measured from the top edge of the DUT, held face up and tilted 45 degrees
\n2. Sort the values.
@@ -6620,8 +6618,9 @@ Follow the instructions on the screen to measure the frequency response for the
<string name="ble_rssi_precision_name">BLE RSSI Precision Test</string>
<string name="ble_rssi_precision_test_instructions">
1. Take 1000 scan measurements with the DUT at 1m distance from the reference device transmitting at ADVERTISE_TX_POWER_HIGH in line of sight environment
- \n2. Must report RSSI measurements to be within +/-9dBm for 95% of the measurements.
- \n3. Report the reference device used
+ \n2. Sort the measurements and compute the range as 975th measurement - 25th measurement
+ \n3. Report the range below. Must be within 18dBm for tests to pass
+ \n4. Report the reference device used
</string>
<string name="report_ble_rssi_range">Report RSSI Range (dBm)</string>
@@ -6630,41 +6629,22 @@ Follow the instructions on the screen to measure the frequency response for the
<string name="ble_rx_tx_calibration_test_instructions">
To verify this requirement, work with your chip vendor. The chip vendor can measure the
channel flatness and identify the differences between cores and channels.
- \n Must include Rx/Tx corrections to reduce per-channel deviations so that the measurements on each of the 3 channels, on each of the antennas (if multiple are used), are within +/-3dBm of one another for 95% of the measurements. Report this range
+ \n1. Must include Rx/Tx corrections to reduce per-channel deviations so that the measurements on each of the 3 channels, on each of the antennas (if multiple are used), are within +/-3dBm of one another for 95% of the measurements.
+ \n2. For 1000 sorted measurements, report the range as 975th measurement - 25th measurement. Must be within 6dBm to pass.
</string>
<string name="report_channels_ble_rssi_range">Report RSSI Range Across Channels (dBm)</string>
<string name="report_cores_ble_rssi_range">[Optional] Report RSSI Range Across Cores (dBm)</string>
- <!-- Strings for BLE Rx Offset Test -->
- <string name="ble_rx_offset_name">BLE Rx Offset Test</string>
- <string name="ble_rx_offset_test_instructions">
- This test is strongly recommended but not required.
- \n1. Take 1000 scan measurements with the DUT at 1m distance from a reference device transmitting at ADVERTISE_TX_POWER_HIGH, where devices are oriented such that they are on `parallel planes` with screens facing the same direction
- \n2. Sort the values
- \n3. Report the median (500th value); should be within [-50, -70] dBm
- \n4. Report the reference device used
- </string>
- <string name="report_ble_rssi_median">Report RSSI Median (dBm)</string>
-
- <!-- Strings for BLE Tx Offset Test -->
- <string name="ble_tx_offset_name">BLE Tx Offset Test</string>
- <string name="ble_tx_offset_test_instructions">
- This test is strongly recommended but not required
- 1. Start BLE advertisement on DUT transmitting at ADVERTISE_TX_POWER_HIGH and take 1000 scan measurements with the reference device at 1m distance, where devices are oriented such that they are on `parallel planes` with screens facing the same direction
- \n2. Sort the values
- \n3. Report the median (500th value); should be within [-50, -70] dBm
- \n4. Report the reference device used
- </string>
<string name="nan_precision_instruction">
1. Take 1000 ranging measurements at each of the ground truth points of 10cm, 1m, 3m, and 5m. The WifiNanScan app in Play Store is recommended for data collection.
\n2. Report the bandwidth at which the data was collected. Must be either 160, 80, 40, 20 MHz.
- \n2. For each ground truth point:
- \n\t\ta. Must report the range at the 68th percentile (as calculated with the Cumulative Distribution Function), accurately to within:
- \n\t\t\ti. +/-1 meters at 160 MHz bandwidth
- \n\t\t\tii. +/-2 meters at 80 MHz bandwidth
- \n\t\t\tiii. +/-4 meters at 40 MHz bandwidth
- \n\t\t\tiv. +/-8 meters at 20 MHz bandwidth
- \n4. Following the same instructions above, it is strongly recommended (but not required), to report the range at the 90th percentile as calculated with the Cumulative Distribution Function. If the range at 90th percentile is inputted, it must be within the expected range, and inputted for all distance ranges.
+ \n3. For each ground truth point:
+ \n\t\ta. Sort the measurements, and report the range at the 68th percentile (840th measurement - 160th measurement), accurately to within:
+ \n\t\t\ti. 2 meters at 160 MHz bandwidth
+ \n\t\t\tii. 4 meters at 80 MHz bandwidth
+ \n\t\t\tiii. 8 meters at 40 MHz bandwidth
+ \n\t\t\tiv. 16 meters at 20 MHz bandwidth
+ \n4. Following the same instructions above, it is strongly recommended (but not required), to report the range at the 90th percentile (950th measurement - 50th measurement) as calculated with the Cumulative Distribution Function. If the range at 90th percentile is inputted, it must be within the expected range, and inputted for all distance ranges.
\n5. Report reference device used. All required fields must be filled before test can be passed.
</string>
<string name="report_nan_bandwidth_mhz">Bandwidth (MHz)</string>
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/presence/BleRssiPrecisionActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/presence/BleRssiPrecisionActivity.java
index acdd7c2460b..1548910093a 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/presence/BleRssiPrecisionActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/presence/BleRssiPrecisionActivity.java
@@ -38,7 +38,7 @@ public class BleRssiPrecisionActivity extends PassFailButtons.Activity {
private static final String KEY_REFERENCE_DEVICE = "reference_device";
// Thresholds
- private static final int MAX_RSSI_RANGE_DBM = 9;
+ private static final int MAX_RSSI_RANGE_DBM = 18;
private EditText reportRssiRangeEditText;
private EditText reportReferenceDeviceEditText;
@@ -82,7 +82,7 @@ public class BleRssiPrecisionActivity extends PassFailButtons.Activity {
if (!rssiRangeInput.isEmpty()) {
int rssiRange = Integer.parseInt(rssiRangeInput);
// RSSI range must be inputted and within acceptable range before test can be passed
- return rssiRange >= -MAX_RSSI_RANGE_DBM && rssiRange <= MAX_RSSI_RANGE_DBM;
+ return rssiRange <= MAX_RSSI_RANGE_DBM;
}
return false;
}
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/presence/BleRxOffsetActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/presence/BleRxOffsetActivity.java
deleted file mode 100644
index efef69a250c..00000000000
--- a/apps/CtsVerifier/src/com/android/cts/verifier/presence/BleRxOffsetActivity.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.cts.verifier.presence;
-
-import android.app.AlertDialog;
-import android.bluetooth.BluetoothAdapter;
-import android.content.pm.PackageManager;
-import android.os.Bundle;
-import android.text.Editable;
-import android.util.Log;
-import android.view.View;
-import android.widget.EditText;
-
-import com.android.compatibility.common.util.ResultType;
-import com.android.compatibility.common.util.ResultUnit;
-import com.android.cts.verifier.PassFailButtons;
-import com.android.cts.verifier.R;
-
-/**
- * Tests that the devices' Rx offset results in a median RSSI within a specified range
- */
-public class BleRxOffsetActivity extends PassFailButtons.Activity {
- private static final String TAG = BleRxOffsetActivity.class.getName();
-
- // Report log schema
- private static final String KEY_MEDIAN_RSSI = "rssi_range";
- private static final String KEY_REFERENCE_DEVICE = "reference_device";
-
- private EditText reportMedianRssiEditText;
- private EditText reportReferenceDeviceEditText;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.ble_rx_offset);
- setPassFailButtonClickListeners();
- View failButton = findViewById(R.id.fail_button);
- //Remove fail button for strongly recommended tests
- failButton.setVisibility(View.GONE);
-
- reportMedianRssiEditText = findViewById(R.id.report_ble_rssi_median);
- reportReferenceDeviceEditText = findViewById(R.id.report_reference_device);
-
- DeviceFeatureChecker.checkFeatureSupported(this, getPassButton(),
- PackageManager.FEATURE_BLUETOOTH_LE);
-
- BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
-
- if (!adapter.isEnabled()) {
- new AlertDialog.Builder(this)
- .setTitle(R.string.ble_bluetooth_disable_title)
- .setMessage(R.string.ble_bluetooth_disable_message)
- .setOnCancelListener(dialog -> finish())
- .create().show();
- }
- }
-
- @Override
- public void recordTestResults() {
- String medianRssi = reportMedianRssiEditText.getText().toString();
- String referenceDevice = reportReferenceDeviceEditText.getText().toString();
-
- if (!medianRssi.isEmpty()) {
- Log.i(TAG, "BLE Median RSSI (dBm): " + medianRssi);
- getReportLog().addValue(KEY_MEDIAN_RSSI, Integer.parseInt(medianRssi),
- ResultType.NEUTRAL, ResultUnit.NONE);
- }
-
- if (!referenceDevice.isEmpty()) {
- Log.i(TAG, "BLE Reference Device: " + referenceDevice);
- getReportLog().addValue(KEY_REFERENCE_DEVICE, referenceDevice,
- ResultType.NEUTRAL, ResultUnit.NONE);
- }
- getReportLog().submit();
- }
-}
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/presence/BleRxTxCalibrationActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/presence/BleRxTxCalibrationActivity.java
index 8a6a005d1ee..2de7edffe7c 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/presence/BleRxTxCalibrationActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/presence/BleRxTxCalibrationActivity.java
@@ -42,7 +42,7 @@ public class BleRxTxCalibrationActivity extends PassFailButtons.Activity {
private static final String KEY_REFERENCE_DEVICE = "reference_device";
// Thresholds
- private static final int MAX_RSSI_RANGE = 3;
+ private static final int MAX_RSSI_RANGE = 6;
private EditText reportChannelsRssiRangeEditText;
private EditText reportCoresRssiRangeEditText;
@@ -90,7 +90,7 @@ public class BleRxTxCalibrationActivity extends PassFailButtons.Activity {
if (!channelsRssiRangeInput.isEmpty()) {
int channelsRssiRange = Integer.parseInt(channelsRssiRangeInput);
// RSSI range must be inputted and within acceptable range before test can be passed
- return channelsRssiRange >= -MAX_RSSI_RANGE && channelsRssiRange <= MAX_RSSI_RANGE;
+ return channelsRssiRange <= MAX_RSSI_RANGE;
}
return false;
}
@@ -100,7 +100,7 @@ public class BleRxTxCalibrationActivity extends PassFailButtons.Activity {
if (!coresRssiRangeInput.isEmpty()) {
int coresRssiRange = Integer.parseInt(coresRssiRangeInput);
// RSSI range must be inputted and within acceptable range before test can be passed
- return coresRssiRange >= -MAX_RSSI_RANGE && coresRssiRange <= MAX_RSSI_RANGE;
+ return coresRssiRange <= MAX_RSSI_RANGE;
}
// This field is optional, so return true even if the user has not inputted anything
return true;
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/presence/BleTxOffsetActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/presence/BleTxOffsetActivity.java
deleted file mode 100644
index 6c548ca494a..00000000000
--- a/apps/CtsVerifier/src/com/android/cts/verifier/presence/BleTxOffsetActivity.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.cts.verifier.presence;
-
-import android.app.AlertDialog;
-import android.bluetooth.BluetoothAdapter;
-import android.content.pm.PackageManager;
-import android.os.Bundle;
-import android.text.Editable;
-import android.util.Log;
-import android.view.View;
-import android.widget.EditText;
-
-import com.android.compatibility.common.util.ResultType;
-import com.android.compatibility.common.util.ResultUnit;
-import com.android.cts.verifier.PassFailButtons;
-import com.android.cts.verifier.R;
-
-/** Tests that the devices' Rx offset results in a median RSSI within a specified range */
-public class BleTxOffsetActivity extends PassFailButtons.Activity {
- private static final String TAG = BleTxOffsetActivity.class.getName();
-
- // Report log schema
- private static final String KEY_MEDIAN_RSSI = "rssi_range";
- private static final String KEY_REFERENCE_DEVICE = "reference_device";
-
- private EditText reportMedianRssiEditText;
- private EditText reportReferenceDeviceEditText;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.ble_tx_offset);
- setPassFailButtonClickListeners();
- View failButton = findViewById(R.id.fail_button);
- // Remove fail button for strongly recommended tests
- failButton.setVisibility(View.GONE);
-
- reportMedianRssiEditText = findViewById(R.id.report_ble_rssi_median);
- reportReferenceDeviceEditText = findViewById(R.id.report_reference_device);
-
- DeviceFeatureChecker.checkFeatureSupported(this, getPassButton(),
- PackageManager.FEATURE_BLUETOOTH_LE);
-
- BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
-
- if (!adapter.isEnabled()) {
- new AlertDialog.Builder(this)
- .setTitle(R.string.ble_bluetooth_disable_title)
- .setMessage(R.string.ble_bluetooth_disable_message)
- .setOnCancelListener(dialog -> finish())
- .create().show();
- }
- }
-
- @Override
- public void recordTestResults() {
- String medianRssi = reportMedianRssiEditText.getText().toString();
- String referenceDevice = reportReferenceDeviceEditText.getText().toString();
-
- if (!medianRssi.isEmpty()) {
- Log.i(TAG, "BLE Median RSSI (dBm): " + medianRssi);
- getReportLog().addValue(KEY_MEDIAN_RSSI, Integer.parseInt(medianRssi),
- ResultType.NEUTRAL, ResultUnit.NONE);
- }
-
- if (!referenceDevice.isEmpty()) {
- Log.i(TAG, "BLE Reference Device: " + referenceDevice);
- getReportLog().addValue(KEY_REFERENCE_DEVICE, referenceDevice,
- ResultType.NEUTRAL, ResultUnit.NONE);
- }
- getReportLog().submit();
- }
-}
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/presence/NanPrecisionTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/presence/NanPrecisionTestActivity.java
index 286de36131a..458d1920eca 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/presence/NanPrecisionTestActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/presence/NanPrecisionTestActivity.java
@@ -51,10 +51,10 @@ public class NanPrecisionTestActivity extends PassFailButtons.Activity {
private static final String KEY_REFERENCE_DEVICE = "reference_device";
// Thresholds
- private static final int MAX_DISTANCE_RANGE_METERS_160MHZ = 1;
- private static final int MAX_DISTANCE_RANGE_METERS_80MHZ = 2;
- private static final int MAX_DISTANCE_RANGE_METERS_40MHZ = 4;
- private static final int MAX_DISTANCE_RANGE_METERS_20MHZ = 8;
+ private static final int MAX_DISTANCE_RANGE_METERS_160MHZ = 2;
+ private static final int MAX_DISTANCE_RANGE_METERS_80MHZ = 4;
+ private static final int MAX_DISTANCE_RANGE_METERS_40MHZ = 8;
+ private static final int MAX_DISTANCE_RANGE_METERS_20MHZ = 16;
// Maps NAN bandwidths to acceptable range thresholds
private static final ImmutableMap<Integer, Integer> BANDWIDTH_TO_THRESHOLD_MAP =
@@ -172,8 +172,7 @@ public class NanPrecisionTestActivity extends PassFailButtons.Activity {
}
double distanceRange = Double.parseDouble(input);
int bandwidth = Integer.parseInt(bandwidthInputMhz);
- if (distanceRange < -BANDWIDTH_TO_THRESHOLD_MAP.get(bandwidth)
- || distanceRange > BANDWIDTH_TO_THRESHOLD_MAP.get(bandwidth)) {
+ if (distanceRange > BANDWIDTH_TO_THRESHOLD_MAP.get(bandwidth)) {
// All inputs must be in acceptable range so fail early otherwise
return false;
}
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/presence/UwbPrecisionActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/presence/UwbPrecisionActivity.java
index a6b3224a0d9..5d1ff8628dd 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/presence/UwbPrecisionActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/presence/UwbPrecisionActivity.java
@@ -34,14 +34,11 @@ public class UwbPrecisionActivity extends PassFailButtons.Activity {
private static final String TAG = UwbPrecisionActivity.class.getName();
// Report log schema
private static final String KEY_DISTANCE_RANGE_CM = "distance_range_cm";
- private static final String KEY_AOA_RANGE_DEGREES = "aoa_range_degrees";
private static final String KEY_REFERENCE_DEVICE = "reference_device";
// Thresholds
- private static final int MAX_DISTANCE_RANGE_CM = 15;
- private static final int MAX_ANGLE_OF_ARRIVAL_RANGE_DEGREES = 5;
+ private static final int MAX_DISTANCE_RANGE_CM = 30;
private EditText mDistanceRangeInput;
- private EditText mAoaRangeInput;
private EditText mReferenceDeviceInput;
@Override
@@ -52,7 +49,6 @@ public class UwbPrecisionActivity extends PassFailButtons.Activity {
getPassButton().setEnabled(false);
mDistanceRangeInput = (EditText) findViewById(R.id.distance_range_cm);
- mAoaRangeInput = (EditText) findViewById(R.id.aoa_range_degrees);
mReferenceDeviceInput = (EditText) findViewById(R.id.reference_device);
DeviceFeatureChecker.checkFeatureSupported(this, getPassButton(),
@@ -60,15 +56,13 @@ public class UwbPrecisionActivity extends PassFailButtons.Activity {
mDistanceRangeInput.addTextChangedListener(
InputTextHandler.getOnTextChangedHandler((Editable s) -> checkTestInputs()));
- mAoaRangeInput.addTextChangedListener(
- InputTextHandler.getOnTextChangedHandler((Editable s) -> checkTestInputs()));
mReferenceDeviceInput.addTextChangedListener(
InputTextHandler.getOnTextChangedHandler((Editable s) -> checkTestInputs()));
}
private void checkTestInputs() {
getPassButton().setEnabled(
- checkDistanceRangeInput() && checkAoaRangeInput() && checkReferenceDeviceInput());
+ checkDistanceRangeInput() && checkReferenceDeviceInput());
}
private boolean checkDistanceRangeInput() {
@@ -77,23 +71,11 @@ public class UwbPrecisionActivity extends PassFailButtons.Activity {
double distanceRange = Double.parseDouble(distanceRangeInput);
// Distance range must be inputted and within acceptable range before test can be
// passed.
- return distanceRange >= -MAX_DISTANCE_RANGE_CM
- && distanceRange <= MAX_DISTANCE_RANGE_CM;
+ return distanceRange <= MAX_DISTANCE_RANGE_CM;
}
return false;
}
- private boolean checkAoaRangeInput() {
- String aoaRangeInput = mAoaRangeInput.getText().toString();
- if (!aoaRangeInput.isEmpty()) {
- int aoaRange = Integer.parseInt(aoaRangeInput);
- // Aoa range must be within acceptable range before test can be passed.
- return aoaRange >= -MAX_ANGLE_OF_ARRIVAL_RANGE_DEGREES
- && aoaRange <= MAX_ANGLE_OF_ARRIVAL_RANGE_DEGREES;
- }
- return true;
- }
-
private boolean checkReferenceDeviceInput() {
// Reference device must be inputted before test can be passed.
return !mReferenceDeviceInput.getText().toString().isEmpty();
@@ -102,18 +84,12 @@ public class UwbPrecisionActivity extends PassFailButtons.Activity {
@Override
public void recordTestResults() {
String distanceRange = mDistanceRangeInput.getText().toString();
- String aoaRange = mAoaRangeInput.getText().toString();
String referenceDevice = mReferenceDeviceInput.getText().toString();
if (!distanceRange.isEmpty()) {
Log.i(TAG, "UWB Distance Range: " + distanceRange);
getReportLog().addValue(KEY_DISTANCE_RANGE_CM, Double.parseDouble(distanceRange),
ResultType.NEUTRAL, ResultUnit.NONE);
}
- if (!aoaRange.isEmpty()) {
- Log.i(TAG, "UWB Angle of Arrival Range: " + aoaRange);
- getReportLog().addValue(KEY_AOA_RANGE_DEGREES, Double.parseDouble(aoaRange),
- ResultType.NEUTRAL, ResultUnit.NONE);
- }
if (!referenceDevice.isEmpty()) {
Log.i(TAG, "UWB Reference Device: " + referenceDevice);
getReportLog().addValue(KEY_REFERENCE_DEVICE, referenceDevice,