fix sms test
- fix timing issue: if sms arrives too early, mExpectedCalls is not set.
Then notify is not called, and the test fails.
Change it to send notification without checking the var.
- add verizon to NO_DELIVERY_REPORTS and UNSUPPORT_DATA_SMS_MESSAGES lists
Bug: 6293025
Change-Id: I770da6292a176e439284033f01143ecf720e97dd
diff --git a/tests/tests/telephony/src/android/telephony/cts/SmsManagerTest.java b/tests/tests/telephony/src/android/telephony/cts/SmsManagerTest.java
index bbeffe0..4808bc0 100755
--- a/tests/tests/telephony/src/android/telephony/cts/SmsManagerTest.java
+++ b/tests/tests/telephony/src/android/telephony/cts/SmsManagerTest.java
@@ -29,6 +29,7 @@
import android.telephony.SmsMessage;
import android.telephony.TelephonyManager;
import android.test.AndroidTestCase;
+import android.util.Log;
import java.util.ArrayList;
import java.util.Arrays;
@@ -41,6 +42,7 @@
*/
public class SmsManagerTest extends AndroidTestCase {
+ private static final String TAG = "SmsManagerTest";
private static final String LONG_TEXT =
"This is a very long text. This text should be broken into three " +
"separate messages.This is a very long text. This text should be broken into " +
@@ -82,7 +84,30 @@
"310000", // Tracfone
"46003", // China Telecom
"311230", // C SPire Wireless + Celluar South
- "310600" // Cellcom
+ "310600", // Cellcom
+ // Verizon
+ "310004",
+ "310012",
+ "311280",
+ "311281",
+ "311282",
+ "311283",
+ "311284",
+ "311285",
+ "311286",
+ "311287",
+ "311288",
+ "311289",
+ "311480",
+ "311481",
+ "311482",
+ "311483",
+ "311484",
+ "311485",
+ "311486",
+ "311487",
+ "311488",
+ "311489"
);
// List of network operators that doesn't support Data(binary) SMS message
@@ -96,7 +121,30 @@
"30237", // Fido
"45008", // KT
"45005", // SKT Mobility
- "45002" // SKT Mobility
+ "45002", // SKT Mobility
+ // Verizon
+ "310004",
+ "310012",
+ "311280",
+ "311281",
+ "311282",
+ "311283",
+ "311284",
+ "311285",
+ "311286",
+ "311287",
+ "311288",
+ "311289",
+ "311480",
+ "311481",
+ "311482",
+ "311483",
+ "311484",
+ "311485",
+ "311486",
+ "311487",
+ "311488",
+ "311489"
);
// List of network operators that doesn't support Maltipart SMS message
@@ -323,12 +371,11 @@
mReceivedDataSms = true;
mReceivedText=sb.toString();
}
+ Log.i(TAG, "onReceive " + intent.getAction());
if (intent.getAction().equals(mAction)) {
synchronized (mLock) {
mCalls += 1;
- if (mCalls >= mExpectedCalls) {
- mLock.notify();
- }
+ mLock.notify();
}
}
}