Loading telephony/java/com/android/internal/telephony/RetryManager.java +6 −2 Original line number Diff line number Diff line Loading @@ -153,13 +153,17 @@ public class RetryManager { } /** * Configure for using string which allow arbitary * Configure for using string which allow arbitrary * sequences of times. See class comments for the * string format. * * @return true if successfull * @return true if successful */ public boolean configure(String configStr) { // Strip quotes if present. if ((configStr.startsWith("\"") && configStr.endsWith("\""))) { configStr = configStr.substring(1, configStr.length()-1); } if (DBG) log("configure: '" + configStr + "'"); if (!TextUtils.isEmpty(configStr)) { Loading telephony/tests/telephonytests/src/com/android/internal/telephony/TelephonyUtilsTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -146,15 +146,15 @@ public class TelephonyUtilsTest extends TestCase { } /** * Test string configuration using all options. * Test string configuration using all options and with quotes. */ @SmallTest public void testRetryManageString() throws Exception { RetryManager rm = new RetryManager(); int time; assertTrue(rm.configure("max_retries=4," + "default_randomization=100,1000, 2000 :200 , 3000")); assertTrue(rm.configure( "\"max_retries=4, default_randomization=100,1000, 2000 :200 , 3000\"")); assertTrue(rm.isRetryNeeded()); time = rm.getRetryTimer(); assertTrue((time >= 1000) && (time < 1100)); Loading Loading
telephony/java/com/android/internal/telephony/RetryManager.java +6 −2 Original line number Diff line number Diff line Loading @@ -153,13 +153,17 @@ public class RetryManager { } /** * Configure for using string which allow arbitary * Configure for using string which allow arbitrary * sequences of times. See class comments for the * string format. * * @return true if successfull * @return true if successful */ public boolean configure(String configStr) { // Strip quotes if present. if ((configStr.startsWith("\"") && configStr.endsWith("\""))) { configStr = configStr.substring(1, configStr.length()-1); } if (DBG) log("configure: '" + configStr + "'"); if (!TextUtils.isEmpty(configStr)) { Loading
telephony/tests/telephonytests/src/com/android/internal/telephony/TelephonyUtilsTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -146,15 +146,15 @@ public class TelephonyUtilsTest extends TestCase { } /** * Test string configuration using all options. * Test string configuration using all options and with quotes. */ @SmallTest public void testRetryManageString() throws Exception { RetryManager rm = new RetryManager(); int time; assertTrue(rm.configure("max_retries=4," + "default_randomization=100,1000, 2000 :200 , 3000")); assertTrue(rm.configure( "\"max_retries=4, default_randomization=100,1000, 2000 :200 , 3000\"")); assertTrue(rm.isRetryNeeded()); time = rm.getRetryTimer(); assertTrue((time >= 1000) && (time < 1100)); Loading