summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
author Yan Yan <evitayan@google.com> 2024-11-07 03:32:56 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2024-11-07 03:32:56 +0000
commitaa3c2f7593f00a9ece251e00560bf2b76d8ea817 (patch)
treeace8047d2cd2db0a2772752fca6f4b38e8070b05 /tests
parent289623c6f27740a75243b218827705becab92d30 (diff)
parentb597cb318aa6f58d226684cf1e0404c82dc4c982 (diff)
Merge "Clean up flag safe_mode_timeout_config" into main am: de21a095bc am: b597cb318a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3326178 Change-Id: Id668e9d3303fb999591a3f5424a6b8b05ffd1491 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/vcn/java/com/android/server/vcn/VcnGatewayConnectionTest.java19
-rw-r--r--tests/vcn/java/com/android/server/vcn/VcnGatewayConnectionTestBase.java1
2 files changed, 2 insertions, 18 deletions
diff --git a/tests/vcn/java/com/android/server/vcn/VcnGatewayConnectionTest.java b/tests/vcn/java/com/android/server/vcn/VcnGatewayConnectionTest.java
index 49665f7a3304..613b92616707 100644
--- a/tests/vcn/java/com/android/server/vcn/VcnGatewayConnectionTest.java
+++ b/tests/vcn/java/com/android/server/vcn/VcnGatewayConnectionTest.java
@@ -360,12 +360,10 @@ public class VcnGatewayConnectionTest extends VcnGatewayConnectionTestBase {
private void verifyGetSafeModeTimeoutMs(
boolean isInTestMode,
- boolean isConfigTimeoutSupported,
PersistableBundleWrapper carrierConfig,
long expectedTimeoutMs)
throws Exception {
doReturn(isInTestMode).when(mVcnContext).isInTestMode();
- doReturn(isConfigTimeoutSupported).when(mVcnContext).isFlagSafeModeTimeoutConfigEnabled();
final TelephonySubscriptionSnapshot snapshot = mock(TelephonySubscriptionSnapshot.class);
doReturn(carrierConfig).when(snapshot).getCarrierConfigForSubGrp(TEST_SUB_GRP);
@@ -377,16 +375,7 @@ public class VcnGatewayConnectionTest extends VcnGatewayConnectionTestBase {
}
@Test
- public void testGetSafeModeTimeoutMs_configTimeoutUnsupported() throws Exception {
- verifyGetSafeModeTimeoutMs(
- false /* isInTestMode */,
- false /* isConfigTimeoutSupported */,
- null /* carrierConfig */,
- TimeUnit.SECONDS.toMillis(SAFEMODE_TIMEOUT_SECONDS));
- }
-
- @Test
- public void testGetSafeModeTimeoutMs_configTimeoutSupported() throws Exception {
+ public void testGetSafeModeTimeoutMs() throws Exception {
final int carrierConfigTimeoutSeconds = 20;
final PersistableBundleWrapper carrierConfig = mock(PersistableBundleWrapper.class);
doReturn(carrierConfigTimeoutSeconds)
@@ -395,17 +384,14 @@ public class VcnGatewayConnectionTest extends VcnGatewayConnectionTestBase {
verifyGetSafeModeTimeoutMs(
false /* isInTestMode */,
- true /* isConfigTimeoutSupported */,
carrierConfig,
TimeUnit.SECONDS.toMillis(carrierConfigTimeoutSeconds));
}
@Test
- public void testGetSafeModeTimeoutMs_configTimeoutSupported_carrierConfigNull()
- throws Exception {
+ public void testGetSafeModeTimeoutMs_carrierConfigNull() throws Exception {
verifyGetSafeModeTimeoutMs(
false /* isInTestMode */,
- true /* isConfigTimeoutSupported */,
null /* carrierConfig */,
TimeUnit.SECONDS.toMillis(SAFEMODE_TIMEOUT_SECONDS));
}
@@ -420,7 +406,6 @@ public class VcnGatewayConnectionTest extends VcnGatewayConnectionTestBase {
verifyGetSafeModeTimeoutMs(
true /* isInTestMode */,
- true /* isConfigTimeoutSupported */,
carrierConfig,
TimeUnit.SECONDS.toMillis(carrierConfigTimeoutSeconds));
}
diff --git a/tests/vcn/java/com/android/server/vcn/VcnGatewayConnectionTestBase.java b/tests/vcn/java/com/android/server/vcn/VcnGatewayConnectionTestBase.java
index 4c7b25aaa7c3..8374fd944568 100644
--- a/tests/vcn/java/com/android/server/vcn/VcnGatewayConnectionTestBase.java
+++ b/tests/vcn/java/com/android/server/vcn/VcnGatewayConnectionTestBase.java
@@ -222,7 +222,6 @@ public class VcnGatewayConnectionTestBase {
doReturn(mTestLooper.getLooper()).when(mVcnContext).getLooper();
doReturn(mVcnNetworkProvider).when(mVcnContext).getVcnNetworkProvider();
doReturn(mFeatureFlags).when(mVcnContext).getFeatureFlags();
- doReturn(true).when(mVcnContext).isFlagSafeModeTimeoutConfigEnabled();
doReturn(mUnderlyingNetworkController)
.when(mDeps)