Increase timeout for OnSubscriptionsChanged.

This CL increases the timeout for receiving the OnSubscriptionsChanged
signal from 2000ms to 5000ms in
CarrierConfigManagerTest#testCarrierConfigNameOverride. This increase is
requried for low-memory devices that do not receive the signal by the
previous deadline.

Bug: 161963269
Test: atest CarrierConfigManagerTest
Change-Id: I99292e3083017e4333e4166a4ccd626d28c8edf1
diff --git a/tests/tests/telephony/current/src/android/telephony/cts/CarrierConfigManagerTest.java b/tests/tests/telephony/current/src/android/telephony/cts/CarrierConfigManagerTest.java
index d6d7da6..e990102a 100644
--- a/tests/tests/telephony/current/src/android/telephony/cts/CarrierConfigManagerTest.java
+++ b/tests/tests/telephony/current/src/android/telephony/cts/CarrierConfigManagerTest.java
@@ -67,7 +67,11 @@
     private TelephonyManager mTelephonyManager;
     private SubscriptionManager mSubscriptionManager;
     private PackageManager mPackageManager;
-    private static final int TOLERANCE = 2000;
+
+    // Use a long timeout to accommodate devices with lower amounts of memory, as it will take
+    // longer for these devices to receive the broadcast (b/161963269). It is expected that all
+    // devices can receive the broadcast in under 5s (most should receive it well before then).
+    private static final int BROADCAST_TIMEOUT_MILLIS = 5000;
     private static final CountDownLatch COUNT_DOWN_LATCH = new CountDownLatch(1);
 
     @Before
@@ -293,9 +297,10 @@
 
         try {
             t.start();
-            boolean didCarrierNameUpdate = COUNT_DOWN_LATCH.await(TOLERANCE, TimeUnit.MILLISECONDS);
+            boolean didCarrierNameUpdate =
+                    COUNT_DOWN_LATCH.await(BROADCAST_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
             if (!didCarrierNameUpdate) {
-                fail("CarrierName not overridden in " + TOLERANCE + " ms");
+                fail("CarrierName not overridden in " + BROADCAST_TIMEOUT_MILLIS + " ms");
             }
         } finally {
             mConfigManager.overrideConfig(subId, null);