Merge "resolved conflicts for merge of ec348b49 to honeycomb-plus-aosp" into honeycomb-plus-aosp
This commit is contained in:
committed by
Android (Google) Code Review
commit
aec39e625b
32
core/res/res/values-mcc219/config.xml
Normal file
32
core/res/res/values-mcc219/config.xml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
** Copyright 2009, The Android Open Source Project
|
||||||
|
**
|
||||||
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
** you may not use this file except in compliance with the License.
|
||||||
|
** You may obtain a copy of the License at
|
||||||
|
**
|
||||||
|
** http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
**
|
||||||
|
** Unless required by applicable law or agreed to in writing, software
|
||||||
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
** See the License for the specific language governing permissions and
|
||||||
|
** limitations under the License.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- These resources are around just to allow their values to be customized
|
||||||
|
for different hardware and product builds. -->
|
||||||
|
<resources>
|
||||||
|
<!-- Do not translate. Defines the slots is Two Digit Number for dialing normally not USSD -->
|
||||||
|
<string-array name="config_twoDigitNumberPattern">
|
||||||
|
<item>"92"</item>
|
||||||
|
<item>"93"</item>
|
||||||
|
<item>"94"</item>
|
||||||
|
<item>"95"</item>
|
||||||
|
<item>"96"</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
</resources>
|
||||||
32
core/res/res/values-mcc220/config.xml
Normal file
32
core/res/res/values-mcc220/config.xml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
** Copyright 2009, The Android Open Source Project
|
||||||
|
**
|
||||||
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
** you may not use this file except in compliance with the License.
|
||||||
|
** You may obtain a copy of the License at
|
||||||
|
**
|
||||||
|
** http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
**
|
||||||
|
** Unless required by applicable law or agreed to in writing, software
|
||||||
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
** See the License for the specific language governing permissions and
|
||||||
|
** limitations under the License.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- These resources are around just to allow their values to be customized
|
||||||
|
for different hardware and product builds. -->
|
||||||
|
<resources>
|
||||||
|
<!-- Do not translate. Defines the slots is Two Digit Number for dialing normally not USSD -->
|
||||||
|
<string-array name="config_twoDigitNumberPattern">
|
||||||
|
<item>"92"</item>
|
||||||
|
<item>"93"</item>
|
||||||
|
<item>"94"</item>
|
||||||
|
<item>"95"</item>
|
||||||
|
<item>"96"</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
</resources>
|
||||||
@@ -544,4 +544,8 @@
|
|||||||
<!-- Sets whether menu shortcuts should be displayed on panel menus when
|
<!-- Sets whether menu shortcuts should be displayed on panel menus when
|
||||||
a keyboard is present. -->
|
a keyboard is present. -->
|
||||||
<bool name="config_showMenuShortcutsWhenKeyboardPresent">false</bool>
|
<bool name="config_showMenuShortcutsWhenKeyboardPresent">false</bool>
|
||||||
|
|
||||||
|
<!-- Do not translate. Defines the slots is Two Digit Number for dialing normally not USSD -->
|
||||||
|
<string-array name="config_twoDigitNumberPattern">
|
||||||
|
</string-array>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ public final class GsmMmiCode extends Handler implements MmiCode {
|
|||||||
static final int MATCH_GROUP_SIC = 9;
|
static final int MATCH_GROUP_SIC = 9;
|
||||||
static final int MATCH_GROUP_PWD_CONFIRM = 11;
|
static final int MATCH_GROUP_PWD_CONFIRM = 11;
|
||||||
static final int MATCH_GROUP_DIALING_NUMBER = 12;
|
static final int MATCH_GROUP_DIALING_NUMBER = 12;
|
||||||
|
static private String[] sTwoDigitNumberPattern;
|
||||||
|
|
||||||
//***** Public Class methods
|
//***** Public Class methods
|
||||||
|
|
||||||
@@ -198,6 +198,9 @@ public final class GsmMmiCode extends Handler implements MmiCode {
|
|||||||
|
|
||||||
ret = new GsmMmiCode(phone);
|
ret = new GsmMmiCode(phone);
|
||||||
ret.poundString = dialString;
|
ret.poundString = dialString;
|
||||||
|
} else if (isTwoDigitShortCode(phone.getContext(), dialString)) {
|
||||||
|
//Is a country-specific exception to short codes as defined in TS 22.030, 6.5.3.2
|
||||||
|
ret = null;
|
||||||
} else if (isShortCode(dialString, phone)) {
|
} else if (isShortCode(dialString, phone)) {
|
||||||
// this may be a short code, as defined in TS 22.030, 6.5.3.2
|
// this may be a short code, as defined in TS 22.030, 6.5.3.2
|
||||||
ret = new GsmMmiCode(phone);
|
ret = new GsmMmiCode(phone);
|
||||||
@@ -452,6 +455,28 @@ public final class GsmMmiCode extends Handler implements MmiCode {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static private boolean
|
||||||
|
isTwoDigitShortCode(Context context, String dialString) {
|
||||||
|
Log.d(LOG_TAG, "isTwoDigitShortCode");
|
||||||
|
|
||||||
|
if (dialString == null || dialString.length() != 2) return false;
|
||||||
|
|
||||||
|
if (sTwoDigitNumberPattern == null) {
|
||||||
|
sTwoDigitNumberPattern = context.getResources().getStringArray(
|
||||||
|
com.android.internal.R.array.config_twoDigitNumberPattern);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (String dialnumber : sTwoDigitNumberPattern) {
|
||||||
|
Log.d(LOG_TAG, "Two Digit Number Pattern " + dialnumber);
|
||||||
|
if (dialString.equals(dialnumber)) {
|
||||||
|
Log.d(LOG_TAG, "Two Digit Number Pattern -true");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Log.d(LOG_TAG, "Two Digit Number Pattern -false");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper function for newFromDialString. Returns true if dialString appears
|
* Helper function for newFromDialString. Returns true if dialString appears
|
||||||
* to be a short code AND conditions are correct for it to be treated as
|
* to be a short code AND conditions are correct for it to be treated as
|
||||||
|
|||||||
Reference in New Issue
Block a user