Loading core/res/res/values-mcc262-mnc02/strings.xmldeleted 100644 → 0 +0 −27 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /** * Copyright (c) 2017, Google Inc. * * 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. */ --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- Do not translate. Template for showing mobile network operator name while WFC is active --> <string-array name="wfcSpnFormats"> <item>%s</item> <item>%s Wi-Fi Calling</item> </string-array> </resources> telephony/java/android/telephony/CarrierConfigManager.java +10 −0 Original line number Diff line number Diff line Loading @@ -1086,6 +1086,15 @@ public class CarrierConfigManager { /** @hide */ public static final String KEY_WFC_DATA_SPN_FORMAT_IDX_INT = "wfc_data_spn_format_idx_int"; /** * Use root locale when reading wfcSpnFormats. * * If true, then the root locale will always be used when reading wfcSpnFormats. This means the * non localized version of wfcSpnFormats will be used. * @hide */ public static final String KEY_WFC_SPN_USE_ROOT_LOCALE = "wfc_spn_use_root_locale"; /** * The Component Name of the activity that can setup the emergency addrees for WiFi Calling * as per carrier requirement. Loading Loading @@ -2273,6 +2282,7 @@ public class CarrierConfigManager { sDefaults.putStringArray(KEY_WFC_OPERATOR_ERROR_CODES_STRING_ARRAY, null); sDefaults.putInt(KEY_WFC_SPN_FORMAT_IDX_INT, 0); sDefaults.putInt(KEY_WFC_DATA_SPN_FORMAT_IDX_INT, 0); sDefaults.putBoolean(KEY_WFC_SPN_USE_ROOT_LOCALE, false); sDefaults.putString(KEY_WFC_EMERGENCY_ADDRESS_CARRIER_APP_STRING, ""); sDefaults.putBoolean(KEY_CONFIG_WIFI_DISABLE_IN_ECBM, false); sDefaults.putBoolean(KEY_CARRIER_NAME_OVERRIDE_BOOL, false); Loading telephony/java/android/telephony/SubscriptionManager.java +19 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Locale; import java.util.concurrent.Executor; import java.util.concurrent.TimeUnit; Loading Loading @@ -1811,6 +1812,19 @@ public class SubscriptionManager { */ @UnsupportedAppUsage public static Resources getResourcesForSubId(Context context, int subId) { return getResourcesForSubId(context, subId, false); } /** * Returns the resources associated with Subscription. * @param context Context object * @param subId Subscription Id of Subscription who's resources are required * @param useRootLocale if root locale should be used. Localized locale is used if false. * @return Resources associated with Subscription. * @hide */ public static Resources getResourcesForSubId(Context context, int subId, boolean useRootLocale) { final SubscriptionInfo subInfo = SubscriptionManager.from(context).getActiveSubscriptionInfo(subId); Loading @@ -1822,6 +1836,11 @@ public class SubscriptionManager { newConfig.mnc = subInfo.getMnc(); if (newConfig.mnc == 0) newConfig.mnc = Configuration.MNC_ZERO; } if (useRootLocale) { newConfig.setLocale(Locale.ROOT); } DisplayMetrics metrics = context.getResources().getDisplayMetrics(); DisplayMetrics newMetrics = new DisplayMetrics(); newMetrics.setTo(metrics); Loading Loading
core/res/res/values-mcc262-mnc02/strings.xmldeleted 100644 → 0 +0 −27 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /** * Copyright (c) 2017, Google Inc. * * 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. */ --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- Do not translate. Template for showing mobile network operator name while WFC is active --> <string-array name="wfcSpnFormats"> <item>%s</item> <item>%s Wi-Fi Calling</item> </string-array> </resources>
telephony/java/android/telephony/CarrierConfigManager.java +10 −0 Original line number Diff line number Diff line Loading @@ -1086,6 +1086,15 @@ public class CarrierConfigManager { /** @hide */ public static final String KEY_WFC_DATA_SPN_FORMAT_IDX_INT = "wfc_data_spn_format_idx_int"; /** * Use root locale when reading wfcSpnFormats. * * If true, then the root locale will always be used when reading wfcSpnFormats. This means the * non localized version of wfcSpnFormats will be used. * @hide */ public static final String KEY_WFC_SPN_USE_ROOT_LOCALE = "wfc_spn_use_root_locale"; /** * The Component Name of the activity that can setup the emergency addrees for WiFi Calling * as per carrier requirement. Loading Loading @@ -2273,6 +2282,7 @@ public class CarrierConfigManager { sDefaults.putStringArray(KEY_WFC_OPERATOR_ERROR_CODES_STRING_ARRAY, null); sDefaults.putInt(KEY_WFC_SPN_FORMAT_IDX_INT, 0); sDefaults.putInt(KEY_WFC_DATA_SPN_FORMAT_IDX_INT, 0); sDefaults.putBoolean(KEY_WFC_SPN_USE_ROOT_LOCALE, false); sDefaults.putString(KEY_WFC_EMERGENCY_ADDRESS_CARRIER_APP_STRING, ""); sDefaults.putBoolean(KEY_CONFIG_WIFI_DISABLE_IN_ECBM, false); sDefaults.putBoolean(KEY_CARRIER_NAME_OVERRIDE_BOOL, false); Loading
telephony/java/android/telephony/SubscriptionManager.java +19 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Locale; import java.util.concurrent.Executor; import java.util.concurrent.TimeUnit; Loading Loading @@ -1811,6 +1812,19 @@ public class SubscriptionManager { */ @UnsupportedAppUsage public static Resources getResourcesForSubId(Context context, int subId) { return getResourcesForSubId(context, subId, false); } /** * Returns the resources associated with Subscription. * @param context Context object * @param subId Subscription Id of Subscription who's resources are required * @param useRootLocale if root locale should be used. Localized locale is used if false. * @return Resources associated with Subscription. * @hide */ public static Resources getResourcesForSubId(Context context, int subId, boolean useRootLocale) { final SubscriptionInfo subInfo = SubscriptionManager.from(context).getActiveSubscriptionInfo(subId); Loading @@ -1822,6 +1836,11 @@ public class SubscriptionManager { newConfig.mnc = subInfo.getMnc(); if (newConfig.mnc == 0) newConfig.mnc = Configuration.MNC_ZERO; } if (useRootLocale) { newConfig.setLocale(Locale.ROOT); } DisplayMetrics metrics = context.getResources().getDisplayMetrics(); DisplayMetrics newMetrics = new DisplayMetrics(); newMetrics.setTo(metrics); Loading