Update setSystemSelectionChannels CTS
Set the channels to CBRS instead of an empty list
Test: atest TelephonyManagerTest
Bug: 239490007
Change-Id: I4e53028d25b7602fb3e550ff9e7b9f3799145bd9
Merged-In: I4e53028d25b7602fb3e550ff9e7b9f3799145bd9
(cherry picked from commit 6d861a67c81062cfc894cce6945d05b85fd5778e)
diff --git a/tests/tests/telephony/current/src/android/telephony/cts/TelephonyManagerTest.java b/tests/tests/telephony/current/src/android/telephony/cts/TelephonyManagerTest.java
index 7f9bb9f..2a0113c 100644
--- a/tests/tests/telephony/current/src/android/telephony/cts/TelephonyManagerTest.java
+++ b/tests/tests/telephony/current/src/android/telephony/cts/TelephonyManagerTest.java
@@ -1316,11 +1316,15 @@
}
LinkedBlockingQueue<Boolean> queue = new LinkedBlockingQueue<>(1);
+ List<RadioAccessSpecifier> cbrs = Collections.singletonList(new RadioAccessSpecifier(
+ AccessNetworkConstants.AccessNetworkType.EUTRAN,
+ new int[]{AccessNetworkConstants.EutranBand.BAND_48},
+ null));
try {
uiAutomation.adoptShellPermissionIdentity();
// This is a oneway binder call, meaning we may return before the permission check
// happens. Hold shell permissions until we get a response.
- mTelephonyManager.setSystemSelectionChannels(Collections.emptyList(),
+ mTelephonyManager.setSystemSelectionChannels(cbrs,
getContext().getMainExecutor(), queue::offer);
Boolean result = queue.poll(1000, TimeUnit.MILLISECONDS);
// Ensure we get a result
@@ -1336,10 +1340,12 @@
// Try calling the API that doesn't provide feedback. We have no way of knowing if it
// succeeds, so just make sure nothing crashes.
- mTelephonyManager.setSystemSelectionChannels(Collections.emptyList());
+ mTelephonyManager.setSystemSelectionChannels(cbrs);
// Assert that we get back the value we set.
- assertEquals(Collections.emptyList(), mTelephonyManager.getSystemSelectionChannels());
+ List<RadioAccessSpecifier> specifiers = mTelephonyManager.getSystemSelectionChannels();
+ assertEquals(cbrs.size(), specifiers.size());
+ assertEquals(cbrs.get(0), specifiers.get(0));
try {
// Reset the values back to the original. Use callback to ensure we don't drop