Skip to content

Commit ca0a68c

Browse files
John WangAndroid (Google) Code Review
authored andcommitted
Merge "Correct the dialing number of structured MMI." into ics-mr1
2 parents 2df1345 + 2690817 commit ca0a68c

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

telephony/java/com/android/internal/telephony/gsm/GsmMmiCode.java

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public final class GsmMmiCode extends Handler implements MmiCode {
132132
// See TS 22.030 6.5.2 "Structure of the MMI"
133133

134134
static Pattern sPatternSuppService = Pattern.compile(
135-
"((\\*|#|\\*#|\\*\\*|##)(\\d{2,3})(\\*([^*#]*)(\\*([^*#]*)(\\*([^*#]*)(\\*([^*#]*))?)?)?)?#)(.*)");
135+
"((\\*|#|\\*#|\\*\\*|##)(\\d{2,3})(\\*([^*#]*)(\\*([^*#]*)(\\*([^*#]*)(\\*([^*#]*))?)?)?)?#)([^#]*)");
136136
/* 1 2 3 4 5 6 7 8 9 10 11 12
137137
138138
1 = Full string up to and including #
@@ -141,7 +141,7 @@ public final class GsmMmiCode extends Handler implements MmiCode {
141141
5 = SIA
142142
7 = SIB
143143
9 = SIC
144-
10 = dialing number
144+
10 = dialing number which must not include #, e.g. *SCn*SI#DN format
145145
*/
146146

147147
static final int MATCH_GROUP_POUND_STRING = 1;
@@ -1338,4 +1338,20 @@ private CharSequence getScString() {
13381338
* SpecialCharSequenceMgr class.
13391339
*/
13401340

1341+
@Override
1342+
public String toString() {
1343+
StringBuilder sb = new StringBuilder("GsmMmiCode {");
1344+
1345+
sb.append("State=" + getState());
1346+
if (action != null) sb.append(" action=" + action);
1347+
if (sc != null) sb.append(" sc=" + sc);
1348+
if (sia != null) sb.append(" sia=" + sia);
1349+
if (sib != null) sb.append(" sib=" + sib);
1350+
if (sic != null) sb.append(" sic=" + sic);
1351+
if (poundString != null) sb.append(" poundString=" + poundString);
1352+
if (dialingNumber != null) sb.append(" dialingNumber=" + dialingNumber);
1353+
if (pwd != null) sb.append(" pwd=" + pwd);
1354+
sb.append("}");
1355+
return sb.toString();
1356+
}
13411357
}

0 commit comments

Comments
 (0)