diff options
author | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2013-02-13 14:24:59 +0000 |
---|---|---|
committer | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2013-02-15 00:30:09 +0000 |
commit | 4815d6e5a658bb1b301f7724c8e8fff6bc764bba (patch) | |
tree | 66f6e6484d239545197d73bcca8ad2505246c981 /telephony | |
parent | eaa7d1835c8691dd656fea99ae3d61b039ebe1b7 (diff) | |
parent | 763ef60466ac752a3031719fb86b08486c9946b1 (diff) | |
download | frameworks_base-4815d6e5a658bb1b301f7724c8e8fff6bc764bba.zip frameworks_base-4815d6e5a658bb1b301f7724c8e8fff6bc764bba.tar.gz frameworks_base-4815d6e5a658bb1b301f7724c8e8fff6bc764bba.tar.bz2 |
Merge commit 'android-4.2.2_r1' into mr1.1-staging
Conflicts:
core/java/android/os/Trace.java
core/java/android/widget/Toast.java
core/res/res/values-cs/strings.xml
core/res/res/values-el/strings.xml
core/res/res/values-iw/strings.xml
core/res/res/values/config.xml
core/res/res/values/symbols.xml
media/java/android/media/AudioService.java
packages/SystemUI/res/values-sv/strings.xml
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java
packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java
policy/src/com/android/internal/policy/impl/keyguard/KeyguardMessageArea.java
policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java
policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java
services/java/com/android/server/NotificationManagerService.java
services/java/com/android/server/power/ElectronBeam.java
Change-Id: I60b8ddf20a1d7bcf9dc7b1a4ed841aaa4d953294
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/com/android/internal/telephony/GsmAlphabet.java | 39 | ||||
-rw-r--r-- | telephony/java/com/android/internal/telephony/IExtendedNetworkService.aidl | 31 |
2 files changed, 28 insertions, 42 deletions
diff --git a/telephony/java/com/android/internal/telephony/GsmAlphabet.java b/telephony/java/com/android/internal/telephony/GsmAlphabet.java index 04b1220..ba14ea7 100644 --- a/telephony/java/com/android/internal/telephony/GsmAlphabet.java +++ b/telephony/java/com/android/internal/telephony/GsmAlphabet.java @@ -803,6 +803,10 @@ public class GsmAlphabet { */ public static TextEncodingDetails countGsmSeptets(CharSequence s, boolean use7bitOnly) { + // Load enabled language tables from config.xml, including any MCC overlays + if (!sDisableCountryEncodingCheck) { + enableCountrySpecificEncodings(); + } // fast path for common case where no national language shift tables are enabled if (sEnabledSingleShiftTables.length + sEnabledLockingShiftTables.length == 0) { TextEncodingDetails ted = new TextEncodingDetails(); @@ -989,6 +993,7 @@ public class GsmAlphabet { */ static synchronized void setEnabledSingleShiftTables(int[] tables) { sEnabledSingleShiftTables = tables; + sDisableCountryEncodingCheck = true; if (tables.length > 0) { sHighestEnabledSingleShiftCode = tables[tables.length - 1]; @@ -1006,6 +1011,7 @@ public class GsmAlphabet { */ static synchronized void setEnabledLockingShiftTables(int[] tables) { sEnabledLockingShiftTables = tables; + sDisableCountryEncodingCheck = true; } /** @@ -1030,6 +1036,24 @@ public class GsmAlphabet { return sEnabledLockingShiftTables; } + /** + * Enable country-specific language tables from MCC-specific overlays. + * @context the context to use to get the TelephonyManager + */ + private static void enableCountrySpecificEncodings() { + Resources r = Resources.getSystem(); + // See comments in frameworks/base/core/res/res/values/config.xml for allowed values + sEnabledSingleShiftTables = r.getIntArray(R.array.config_sms_enabled_single_shift_tables); + sEnabledLockingShiftTables = r.getIntArray(R.array.config_sms_enabled_locking_shift_tables); + + if (sEnabledSingleShiftTables.length > 0) { + sHighestEnabledSingleShiftCode = + sEnabledSingleShiftTables[sEnabledSingleShiftTables.length-1]; + } else { + sHighestEnabledSingleShiftCode = 0; + } + } + /** Reverse mapping from Unicode characters to indexes into language tables. */ private static final SparseIntArray[] sCharsToGsmTables; @@ -1045,6 +1069,9 @@ public class GsmAlphabet { /** Highest language code to include in array of single shift counters. */ private static int sHighestEnabledSingleShiftCode; + /** Flag to bypass check for country-specific overlays (for test cases only). */ + private static boolean sDisableCountryEncodingCheck = false; + /** * Septet counter for a specific locking shift table and all of * the single shift tables that it can be paired with. @@ -1408,10 +1435,7 @@ public class GsmAlphabet { }; static { - Resources r = Resources.getSystem(); - // See comments in frameworks/base/core/res/res/values/config.xml for allowed values - sEnabledSingleShiftTables = r.getIntArray(R.array.config_sms_enabled_single_shift_tables); - sEnabledLockingShiftTables = r.getIntArray(R.array.config_sms_enabled_locking_shift_tables); + enableCountrySpecificEncodings(); int numTables = sLanguageTables.length; int numShiftTables = sLanguageShiftTables.length; if (numTables != numShiftTables) { @@ -1419,13 +1443,6 @@ public class GsmAlphabet { " != shift tables array length " + numShiftTables); } - if (sEnabledSingleShiftTables.length > 0) { - sHighestEnabledSingleShiftCode = - sEnabledSingleShiftTables[sEnabledSingleShiftTables.length-1]; - } else { - sHighestEnabledSingleShiftCode = 0; - } - sCharsToGsmTables = new SparseIntArray[numTables]; for (int i = 0; i < numTables; i++) { String table = sLanguageTables[i]; diff --git a/telephony/java/com/android/internal/telephony/IExtendedNetworkService.aidl b/telephony/java/com/android/internal/telephony/IExtendedNetworkService.aidl deleted file mode 100644 index facdc49..0000000 --- a/telephony/java/com/android/internal/telephony/IExtendedNetworkService.aidl +++ /dev/null @@ -1,31 +0,0 @@ -package com.android.internal.telephony; - -/** - * Interface used to interact with extended MMI/USSD network service. - */ -interface IExtendedNetworkService { - /** - * Set a MMI/USSD command to ExtendedNetworkService for further process. - * This should be called when a MMI command is placed from panel. - * @param number the dialed MMI/USSD number. - */ - void setMmiString(String number); - - /** - * return the specific string which is used to prompt MMI/USSD is running - */ - CharSequence getMmiRunningText(); - - /** - * Get specific message which should be displayed on pop-up dialog. - * @param text original MMI/USSD message response from framework - * @return specific user message correspond to text. null stands for no pop-up dialog need to show. - */ - CharSequence getUserMessage(CharSequence text); - - /** - * Clear pre-set MMI/USSD command. - * This should be called when user cancel a pre-dialed MMI command. - */ - void clearMmiString(); -} |