diff options
Diffstat (limited to 'java/com')
5 files changed, 563 insertions, 8 deletions
diff --git a/java/com/android/dialer/assisteddialing/ConcreteCreator.java b/java/com/android/dialer/assisteddialing/ConcreteCreator.java index 9244f6934..c3721a7a8 100644 --- a/java/com/android/dialer/assisteddialing/ConcreteCreator.java +++ b/java/com/android/dialer/assisteddialing/ConcreteCreator.java @@ -89,7 +89,11 @@ public final class ConcreteCreator { new Constraints( context, configProvider.getString("assisted_dialing_csv_country_codes", "")); return new AssistedDialingMediatorImpl( - new LocationDetector(telephonyManager), new NumberTransformer(constraints)); + new LocationDetector( + telephonyManager, + PreferenceManager.getDefaultSharedPreferences(context) + .getString(context.getString(R.string.assisted_dialing_setting_cc_key), null)), + new NumberTransformer(constraints)); } /** Returns a boolean indicating whether or not the assisted dialing feature is enabled. */ diff --git a/java/com/android/dialer/assisteddialing/LocationDetector.java b/java/com/android/dialer/assisteddialing/LocationDetector.java index 684068912..8e7535c1b 100644 --- a/java/com/android/dialer/assisteddialing/LocationDetector.java +++ b/java/com/android/dialer/assisteddialing/LocationDetector.java @@ -19,7 +19,9 @@ package com.android.dialer.assisteddialing; import android.annotation.TargetApi; import android.os.Build.VERSION_CODES; import android.support.annotation.NonNull; +import android.support.annotation.Nullable; import android.telephony.TelephonyManager; +import android.text.TextUtils; import com.android.dialer.common.LogUtil; import java.util.Locale; import java.util.Optional; @@ -32,12 +34,16 @@ import java.util.Optional; final class LocationDetector { private final TelephonyManager telephonyManager; + private final String userProvidedHomeCountry; - public LocationDetector(@NonNull TelephonyManager telephonyManager) { + public LocationDetector( + @NonNull TelephonyManager telephonyManager, @Nullable String userProvidedHomeCountry) { if (telephonyManager == null) { throw new NullPointerException("Provided TelephonyManager was null"); } + this.telephonyManager = telephonyManager; + this.userProvidedHomeCountry = userProvidedHomeCountry; } // TODO(erfanian): confirm this is based on ISO 3166-1 alpha-2. libphonenumber expects Unicode's @@ -50,8 +56,16 @@ final class LocationDetector { @SuppressWarnings("AndroidApiChecker") // Use of optional @TargetApi(VERSION_CODES.N) public Optional<String> getUpperCaseUserHomeCountry() { + + if (!TextUtils.isEmpty(userProvidedHomeCountry)) { + LogUtil.i( + "LocationDetector.getUpperCaseUserRoamingCountry", "user provided home country code"); + return Optional.of(userProvidedHomeCountry.toUpperCase(Locale.US)); + } + String simCountryIso = telephonyManager.getSimCountryIso(); if (simCountryIso != null) { + LogUtil.i("LocationDetector.getUpperCaseUserRoamingCountry", "using sim country iso"); return Optional.of(telephonyManager.getSimCountryIso().toUpperCase(Locale.US)); } LogUtil.i("LocationDetector.getUpperCaseUserHomeCountry", "user home country was null"); diff --git a/java/com/android/dialer/assisteddialing/ui/AssistedDialingSettingFragment.java b/java/com/android/dialer/assisteddialing/ui/AssistedDialingSettingFragment.java index 8847448cd..a70844fbd 100644 --- a/java/com/android/dialer/assisteddialing/ui/AssistedDialingSettingFragment.java +++ b/java/com/android/dialer/assisteddialing/ui/AssistedDialingSettingFragment.java @@ -16,7 +16,10 @@ package com.android.dialer.assisteddialing.ui; import android.os.Bundle; +import android.preference.ListPreference; +import android.preference.Preference; import android.preference.PreferenceFragment; +import android.text.TextUtils; /** The setting for Assisted Dialing */ public class AssistedDialingSettingFragment extends PreferenceFragment { @@ -27,5 +30,20 @@ public class AssistedDialingSettingFragment extends PreferenceFragment { // Load the preferences from an XML resource addPreferencesFromResource(R.xml.assisted_dialing_setting); + ListPreference countryChooserPref = + (ListPreference) + findPreference(getContext().getString(R.string.assisted_dialing_setting_cc_key)); + + if (!TextUtils.isEmpty(countryChooserPref.getEntry())) { + countryChooserPref.setSummary(countryChooserPref.getEntry()); + } + countryChooserPref.setOnPreferenceChangeListener(this::updateListSummary); + } + + boolean updateListSummary(Preference pref, Object newValue) { + ListPreference listPref = (ListPreference) pref; + CharSequence[] entries = listPref.getEntries(); + listPref.setSummary(entries[listPref.findIndexOfValue(newValue.toString())]); + return true; } } diff --git a/java/com/android/dialer/assisteddialing/ui/res/values/string.xml b/java/com/android/dialer/assisteddialing/ui/res/values/string.xml index cd159bfd5..3b40817ed 100644 --- a/java/com/android/dialer/assisteddialing/ui/res/values/string.xml +++ b/java/com/android/dialer/assisteddialing/ui/res/values/string.xml @@ -15,7 +15,7 @@ ~ limitations under the License --> -<resources> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- Label for a setting enabling assisted dialing [CHAR LIMIT=40]--> <string name="assisted_dialing_setting_title">Assisted dialing</string> @@ -24,4 +24,511 @@ <!-- Key for the assisted dialing setting toggle--> <string name="assisted_dialing_setting_toggle_key" translatable="false">assisted_dialing_setting_toggle_key</string> + + <!-- Key for the assisted dialing home country setting--> + <string name="assisted_dialing_setting_cc_key" translatable="false">assisted_dialing_setting_cc_key</string> + + <!-- Indicates the default state for the home country selector--> + <string name="assisted_dialing_setting_cc_default_summary">Automatically detected</string> + + <!-- Category title for the country code picker in assisted dialing [CHAR LIMIT=40]--> + <string name="assisted_dialing_setting_cc_category_title">Home country</string> + + <!-- Label for the country code picker in assisted dialing [CHAR LIMIT=40]--> + <string name="assisted_dialing_setting_cc_title">Default home country</string> + + <!-- Composed from https://www.iso.org/obp/ui/#search and + https://github.com/googlei18n/libphonenumber/blob/master/javascript/i18n/phonenumbers/metadata.js#L34 --> + <!-- Excluding ['Antarctica', 'Bouvet Island', 'French Southern Territories (the)', 'Heard Island and McDonald Islands', 'Pitcairn', 'South Georgia and the South Sandwich Islands', 'United States Minor Outlying Islands (the)'] --> + <!-- Options for the country codes used in assisted dialing. DO NOT TRANSLATE NUMBERS. [CHAR LIMIT=40] --> + <string-array name="assisted_dialing_cc_entries"> + <item>@string/assisted_dialing_setting_cc_default_summary</item> + <item>Afghanistan <xliff:g>(+93)</xliff:g></item> + <item>Åland Islands <xliff:g>(+358)</xliff:g></item> + <item>Albania <xliff:g>(+355)</xliff:g></item> + <item>Algeria <xliff:g>(+213)</xliff:g></item> + <item>American Samoa <xliff:g>(+1)</xliff:g></item> + <item>Andorra <xliff:g>(+376)</xliff:g></item> + <item>Angola <xliff:g>(+244)</xliff:g></item> + <item>Anguilla <xliff:g>(+1)</xliff:g></item> + <item>Antigua and Barbuda <xliff:g>(+1)</xliff:g></item> + <item>Argentina <xliff:g>(+54)</xliff:g></item> + <item>Armenia <xliff:g>(+374)</xliff:g></item> + <item>Aruba <xliff:g>(+297)</xliff:g></item> + <item>Australia <xliff:g>(+61)</xliff:g></item> + <item>Austria <xliff:g>(+43)</xliff:g></item> + <item>Azerbaijan <xliff:g>(+994)</xliff:g></item> + <item>Bahamas <xliff:g>(+1)</xliff:g></item> + <item>Bahrain <xliff:g>(+973)</xliff:g></item> + <item>Bangladesh <xliff:g>(+880)</xliff:g></item> + <item>Barbados <xliff:g>(+1)</xliff:g></item> + <item>Belarus <xliff:g>(+375)</xliff:g></item> + <item>Belgium <xliff:g>(+32)</xliff:g></item> + <item>Belize <xliff:g>(+501)</xliff:g></item> + <item>Benin <xliff:g>(+229)</xliff:g></item> + <item>Bermuda <xliff:g>(+1)</xliff:g></item> + <item>Bhutan <xliff:g>(+975)</xliff:g></item> + <item>Bolivia <xliff:g>(+591)</xliff:g></item> + <item>Caribbean Netherlands <xliff:g>(+599)</xliff:g></item> + <item>Bosnia and Herzegovina <xliff:g>(+387)</xliff:g></item> + <item>Botswana <xliff:g>(+267)</xliff:g></item> + <item>Brazil <xliff:g>(+55)</xliff:g></item> + <item>British Indian Ocean Territory <xliff:g>(+246)</xliff:g></item> + <item>Brunei <xliff:g>(+673)</xliff:g></item> + <item>Bulgaria <xliff:g>(+359)</xliff:g></item> + <item>Burkina Faso <xliff:g>(+226)</xliff:g></item> + <item>Burundi <xliff:g>(+257)</xliff:g></item> + <item>Cabo Verde <xliff:g>(+238)</xliff:g></item> + <item>Cambodia <xliff:g>(+855)</xliff:g></item> + <item>Cameroon <xliff:g>(+237)</xliff:g></item> + <item>Canada <xliff:g>(+1)</xliff:g></item> + <item>Cayman Islands <xliff:g>(+1)</xliff:g></item> + <item>Central African Republic <xliff:g>(+236)</xliff:g></item> + <item>Chad <xliff:g>(+235)</xliff:g></item> + <item>Chile <xliff:g>(+56)</xliff:g></item> + <item>China <xliff:g>(+86)</xliff:g></item> + <item>Christmas Island <xliff:g>(+61)</xliff:g></item> + <item>Cocos (Keeling) Islands <xliff:g>(+61)</xliff:g></item> + <item>Colombia <xliff:g>(+57)</xliff:g></item> + <item>Comoros <xliff:g>(+269)</xliff:g></item> + <item>Democratic Republic of the Congo <xliff:g>(+243)</xliff:g></item> + <item>Congo <xliff:g>(+242)</xliff:g></item> + <item>Cook Islands <xliff:g>(+682)</xliff:g></item> + <item>Costa Rica <xliff:g>(+506)</xliff:g></item> + <item>Côte d\'Ivoire <xliff:g>(+225)</xliff:g></item> + <item>Croatia <xliff:g>(+385)</xliff:g></item> + <item>Cuba <xliff:g>(+53)</xliff:g></item> + <item>Curaçao <xliff:g>(+599)</xliff:g></item> + <item>Cyprus <xliff:g>(+357)</xliff:g></item> + <item>Czechia <xliff:g>(+420)</xliff:g></item> + <item>Denmark <xliff:g>(+45)</xliff:g></item> + <item>Djibouti <xliff:g>(+253)</xliff:g></item> + <item>Dominica <xliff:g>(+1)</xliff:g></item> + <item>Dominican Republic <xliff:g>(+1)</xliff:g></item> + <item>Ecuador <xliff:g>(+593)</xliff:g></item> + <item>Egypt <xliff:g>(+20)</xliff:g></item> + <item>El Salvador <xliff:g>(+503)</xliff:g></item> + <item>Equatorial Guinea <xliff:g>(+240)</xliff:g></item> + <item>Eritrea <xliff:g>(+291)</xliff:g></item> + <item>Estonia <xliff:g>(+372)</xliff:g></item> + <item>Ethiopia <xliff:g>(+251)</xliff:g></item> + <item>Falkland Islands (Islas Malvinas) <xliff:g>(+500)</xliff:g></item> + <item>Faroe Islands <xliff:g>(+298)</xliff:g></item> + <item>Fiji <xliff:g>(+679)</xliff:g></item> + <item>Finland <xliff:g>(+358)</xliff:g></item> + <item>France <xliff:g>(+33)</xliff:g></item> + <item>French Guiana <xliff:g>(+594)</xliff:g></item> + <item>French Polynesia <xliff:g>(+689)</xliff:g></item> + <item>Gabon <xliff:g>(+241)</xliff:g></item> + <item>Gambia <xliff:g>(+220)</xliff:g></item> + <item>Georgia <xliff:g>(+995)</xliff:g></item> + <item>Germany <xliff:g>(+49)</xliff:g></item> + <item>Ghana <xliff:g>(+233)</xliff:g></item> + <item>Gibraltar <xliff:g>(+350)</xliff:g></item> + <item>Greece <xliff:g>(+30)</xliff:g></item> + <item>Greenland <xliff:g>(+299)</xliff:g></item> + <item>Grenada <xliff:g>(+1)</xliff:g></item> + <item>Guadeloupe <xliff:g>(+590)</xliff:g></item> + <item>Guam <xliff:g>(+1)</xliff:g></item> + <item>Guatemala <xliff:g>(+502)</xliff:g></item> + <item>Guernsey <xliff:g>(+44)</xliff:g></item> + <item>Guinea <xliff:g>(+224)</xliff:g></item> + <item>Guinea-Bissau <xliff:g>(+245)</xliff:g></item> + <item>Guyana <xliff:g>(+592)</xliff:g></item> + <item>Haiti <xliff:g>(+509)</xliff:g></item> + <item>Holy See <xliff:g>(+39)</xliff:g></item> + <item>Honduras <xliff:g>(+504)</xliff:g></item> + <item>Hong Kong <xliff:g>(+852)</xliff:g></item> + <item>Hungary <xliff:g>(+36)</xliff:g></item> + <item>Iceland <xliff:g>(+354)</xliff:g></item> + <item>India <xliff:g>(+91)</xliff:g></item> + <item>Indonesia <xliff:g>(+62)</xliff:g></item> + <item>Iran <xliff:g>(+98)</xliff:g></item> + <item>Iraq <xliff:g>(+964)</xliff:g></item> + <item>Ireland <xliff:g>(+353)</xliff:g></item> + <item>Isle of Man <xliff:g>(+44)</xliff:g></item> + <item>Israel <xliff:g>(+972)</xliff:g></item> + <item>Italy <xliff:g>(+39)</xliff:g></item> + <item>Jamaica <xliff:g>(+1)</xliff:g></item> + <item>Japan <xliff:g>(+81)</xliff:g></item> + <item>Jersey <xliff:g>(+44)</xliff:g></item> + <item>Jordan <xliff:g>(+962)</xliff:g></item> + <item>Kazakhstan <xliff:g>(+7)</xliff:g></item> + <item>Kenya <xliff:g>(+254)</xliff:g></item> + <item>Kiribati <xliff:g>(+686)</xliff:g></item> + <item>North Korea <xliff:g>(+850)</xliff:g></item> + <item>South Korea <xliff:g>(+82)</xliff:g></item> + <item>Kuwait <xliff:g>(+965)</xliff:g></item> + <item>Kyrgyzstan <xliff:g>(+996)</xliff:g></item> + <item>Laos <xliff:g>(+856)</xliff:g></item> + <item>Latvia <xliff:g>(+371)</xliff:g></item> + <item>Lebanon <xliff:g>(+961)</xliff:g></item> + <item>Lesotho <xliff:g>(+266)</xliff:g></item> + <item>Liberia <xliff:g>(+231)</xliff:g></item> + <item>Libya <xliff:g>(+218)</xliff:g></item> + <item>Liechtenstein <xliff:g>(+423)</xliff:g></item> + <item>Lithuania <xliff:g>(+370)</xliff:g></item> + <item>Luxembourg <xliff:g>(+352)</xliff:g></item> + <item>Macao <xliff:g>(+853)</xliff:g></item> + <item>Macedonia (FYROM) <xliff:g>(+389)</xliff:g></item> + <item>Madagascar <xliff:g>(+261)</xliff:g></item> + <item>Malawi <xliff:g>(+265)</xliff:g></item> + <item>Malaysia <xliff:g>(+60)</xliff:g></item> + <item>Maldives <xliff:g>(+960)</xliff:g></item> + <item>Mali <xliff:g>(+223)</xliff:g></item> + <item>Malta <xliff:g>(+356)</xliff:g></item> + <item>Marshall Islands <xliff:g>(+692)</xliff:g></item> + <item>Martinique <xliff:g>(+596)</xliff:g></item> + <item>Mauritania <xliff:g>(+222)</xliff:g></item> + <item>Mauritius <xliff:g>(+230)</xliff:g></item> + <item>Mayotte <xliff:g>(+262)</xliff:g></item> + <item>Mexico <xliff:g>(+52)</xliff:g></item> + <item>Micronesia <xliff:g>(+691)</xliff:g></item> + <item>Moldova <xliff:g>(+373)</xliff:g></item> + <item>Monaco <xliff:g>(+377)</xliff:g></item> + <item>Mongolia <xliff:g>(+976)</xliff:g></item> + <item>Montenegro <xliff:g>(+382)</xliff:g></item> + <item>Montserrat <xliff:g>(+1)</xliff:g></item> + <item>Morocco <xliff:g>(+212)</xliff:g></item> + <item>Mozambique <xliff:g>(+258)</xliff:g></item> + <item>Myanmar <xliff:g>(+95)</xliff:g></item> + <item>Namibia <xliff:g>(+264)</xliff:g></item> + <item>Nauru <xliff:g>(+674)</xliff:g></item> + <item>Nepal <xliff:g>(+977)</xliff:g></item> + <item>Netherlands <xliff:g>(+31)</xliff:g></item> + <item>New Caledonia <xliff:g>(+687)</xliff:g></item> + <item>New Zealand <xliff:g>(+64)</xliff:g></item> + <item>Nicaragua <xliff:g>(+505)</xliff:g></item> + <item>Niger <xliff:g>(+227)</xliff:g></item> + <item>Nigeria <xliff:g>(+234)</xliff:g></item> + <item>Niue <xliff:g>(+683)</xliff:g></item> + <item>Norfolk Island <xliff:g>(+672)</xliff:g></item> + <item>Northern Mariana Islands <xliff:g>(+1)</xliff:g></item> + <item>Norway <xliff:g>(+47)</xliff:g></item> + <item>Oman <xliff:g>(+968)</xliff:g></item> + <item>Pakistan <xliff:g>(+92)</xliff:g></item> + <item>Palau <xliff:g>(+680)</xliff:g></item> + <item>Palestine <xliff:g>(+970)</xliff:g></item> + <item>Panama <xliff:g>(+507)</xliff:g></item> + <item>Papua New Guinea <xliff:g>(+675)</xliff:g></item> + <item>Paraguay <xliff:g>(+595)</xliff:g></item> + <item>Peru <xliff:g>(+51)</xliff:g></item> + <item>Philippines <xliff:g>(+63)</xliff:g></item> + <item>Poland <xliff:g>(+48)</xliff:g></item> + <item>Portugal <xliff:g>(+351)</xliff:g></item> + <item>Puerto Rico <xliff:g>(+1)</xliff:g></item> + <item>Qatar <xliff:g>(+974)</xliff:g></item> + <item>Réunion <xliff:g>(+262)</xliff:g></item> + <item>Romania <xliff:g>(+40)</xliff:g></item> + <item>Russian <xliff:g>(+7)</xliff:g></item> + <item>Rwanda <xliff:g>(+250)</xliff:g></item> + <item>St. Barthélemy <xliff:g>(+590)</xliff:g></item> + <item>St. Helena <xliff:g>(+290)</xliff:g></item> + <item>St. Kitts and Nevis <xliff:g>(+1)</xliff:g></item> + <item>St. Lucia <xliff:g>(+1)</xliff:g></item> + <item>St. Martin <xliff:g>(+590)</xliff:g></item> + <item>St. Pierre and Miquelon <xliff:g>(+508)</xliff:g></item> + <item>St. Vincent and the Grenadines <xliff:g>(+1)</xliff:g></item> + <item>Samoa <xliff:g>(+685)</xliff:g></item> + <item>San Marino <xliff:g>(+378)</xliff:g></item> + <item>Sao Tome and Principe <xliff:g>(+239)</xliff:g></item> + <item>Saudi Arabia <xliff:g>(+966)</xliff:g></item> + <item>Senegal <xliff:g>(+221)</xliff:g></item> + <item>Serbia <xliff:g>(+381)</xliff:g></item> + <item>Seychelles <xliff:g>(+248)</xliff:g></item> + <item>Sierra Leone <xliff:g>(+232)</xliff:g></item> + <item>Singapore <xliff:g>(+65)</xliff:g></item> + <item>Sint Maarten <xliff:g>(+1)</xliff:g></item> + <item>Slovakia <xliff:g>(+421)</xliff:g></item> + <item>Slovenia <xliff:g>(+386)</xliff:g></item> + <item>Solomon Islands <xliff:g>(+677)</xliff:g></item> + <item>Somalia <xliff:g>(+252)</xliff:g></item> + <item>South Africa <xliff:g>(+27)</xliff:g></item> + <item>South Sudan <xliff:g>(+211)</xliff:g></item> + <item>Spain <xliff:g>(+34)</xliff:g></item> + <item>Sri Lanka <xliff:g>(+94)</xliff:g></item> + <item>Sudan <xliff:g>(+249)</xliff:g></item> + <item>Suriname <xliff:g>(+597)</xliff:g></item> + <item>Svalbard and Jan Mayen <xliff:g>(+47)</xliff:g></item> + <item>Swaziland <xliff:g>(+268)</xliff:g></item> + <item>Sweden <xliff:g>(+46)</xliff:g></item> + <item>Switzerland <xliff:g>(+41)</xliff:g></item> + <item>Syria <xliff:g>(+963)</xliff:g></item> + <item>Taiwan <xliff:g>(+886)</xliff:g></item> + <item>Tajikistan <xliff:g>(+992)</xliff:g></item> + <item>Tanzania <xliff:g>(+255)</xliff:g></item> + <item>Thailand <xliff:g>(+66)</xliff:g></item> + <item>Timor-Leste <xliff:g>(+670)</xliff:g></item> + <item>Togo <xliff:g>(+228)</xliff:g></item> + <item>Tokelau <xliff:g>(+690)</xliff:g></item> + <item>Tonga <xliff:g>(+676)</xliff:g></item> + <item>Trinidad and Tobago <xliff:g>(+1)</xliff:g></item> + <item>Tunisia <xliff:g>(+216)</xliff:g></item> + <item>Turkey <xliff:g>(+90)</xliff:g></item> + <item>Turkmenistan <xliff:g>(+993)</xliff:g></item> + <item>Turks and Caicos Islands <xliff:g>(+1)</xliff:g></item> + <item>Tuvalu <xliff:g>(+688)</xliff:g></item> + <item>Uganda <xliff:g>(+256)</xliff:g></item> + <item>Ukraine <xliff:g>(+380)</xliff:g></item> + <item>United Arab Emirates <xliff:g>(+971)</xliff:g></item> + <item>United Kingdom <xliff:g>(+44)</xliff:g></item> + <item>United States <xliff:g>(+1)</xliff:g></item> + <item>Uruguay <xliff:g>(+598)</xliff:g></item> + <item>Uzbekistan <xliff:g>(+998)</xliff:g></item> + <item>Vanuatu <xliff:g>(+678)</xliff:g></item> + <item>Venezuela <xliff:g>(+58)</xliff:g></item> + <item>Viet Nam <xliff:g>(+84)</xliff:g></item> + <item>Virgin Islands (British) <xliff:g>(+1)</xliff:g></item> + <item>Virgin Islands (U.S.) <xliff:g>(+1)</xliff:g></item> + <item>Wallis and Futuna <xliff:g>(+681)</xliff:g></item> + <item>Western Sahara <xliff:g>(+212)</xliff:g></item> + <item>Yemen <xliff:g>(+967)</xliff:g></item> + <item>Zambia <xliff:g>(+260)</xliff:g></item> + <item>Zimbabwe <xliff:g>(+263)</xliff:g></item> + </string-array> + <string-array name="assisted_dialing_cc_values" translatable="false"> + <item></item> + <item>AF</item> + <item>AX</item> + <item>AL</item> + <item>DZ</item> + <item>AS</item> + <item>AD</item> + <item>AO</item> + <item>AI</item> + <item>AG</item> + <item>AR</item> + <item>AM</item> + <item>AW</item> + <item>AU</item> + <item>AT</item> + <item>AZ</item> + <item>BS</item> + <item>BH</item> + <item>BD</item> + <item>BB</item> + <item>BY</item> + <item>BE</item> + <item>BZ</item> + <item>BJ</item> + <item>BM</item> + <item>BT</item> + <item>BO</item> + <item>BQ</item> + <item>BA</item> + <item>BW</item> + <item>BR</item> + <item>IO</item> + <item>BN</item> + <item>BG</item> + <item>BF</item> + <item>BI</item> + <item>CV</item> + <item>KH</item> + <item>CM</item> + <item>CA</item> + <item>KY</item> + <item>CF</item> + <item>TD</item> + <item>CL</item> + <item>CN</item> + <item>CX</item> + <item>CC</item> + <item>CO</item> + <item>KM</item> + <item>CD</item> + <item>CG</item> + <item>CK</item> + <item>CR</item> + <item>CI</item> + <item>HR</item> + <item>CU</item> + <item>CW</item> + <item>CY</item> + <item>CZ</item> + <item>DK</item> + <item>DJ</item> + <item>DM</item> + <item>DO</item> + <item>EC</item> + <item>EG</item> + <item>SV</item> + <item>GQ</item> + <item>ER</item> + <item>EE</item> + <item>ET</item> + <item>FK</item> + <item>FO</item> + <item>FJ</item> + <item>FI</item> + <item>FR</item> + <item>GF</item> + <item>PF</item> + <item>GA</item> + <item>GM</item> + <item>GE</item> + <item>DE</item> + <item>GH</item> + <item>GI</item> + <item>GR</item> + <item>GL</item> + <item>GD</item> + <item>GP</item> + <item>GU</item> + <item>GT</item> + <item>GG</item> + <item>GN</item> + <item>GW</item> + <item>GY</item> + <item>HT</item> + <item>VA</item> + <item>HN</item> + <item>HK</item> + <item>HU</item> + <item>IS</item> + <item>IN</item> + <item>ID</item> + <item>IR</item> + <item>IQ</item> + <item>IE</item> + <item>IM</item> + <item>IL</item> + <item>IT</item> + <item>JM</item> + <item>JP</item> + <item>JE</item> + <item>JO</item> + <item>KZ</item> + <item>KE</item> + <item>KI</item> + <item>KP</item> + <item>KR</item> + <item>KW</item> + <item>KG</item> + <item>LA</item> + <item>LV</item> + <item>LB</item> + <item>LS</item> + <item>LR</item> + <item>LY</item> + <item>LI</item> + <item>LT</item> + <item>LU</item> + <item>MO</item> + <item>MK</item> + <item>MG</item> + <item>MW</item> + <item>MY</item> + <item>MV</item> + <item>ML</item> + <item>MT</item> + <item>MH</item> + <item>MQ</item> + <item>MR</item> + <item>MU</item> + <item>YT</item> + <item>MX</item> + <item>FM</item> + <item>MD</item> + <item>MC</item> + <item>MN</item> + <item>ME</item> + <item>MS</item> + <item>MA</item> + <item>MZ</item> + <item>MM</item> + <item>NA</item> + <item>NR</item> + <item>NP</item> + <item>NL</item> + <item>NC</item> + <item>NZ</item> + <item>NI</item> + <item>NE</item> + <item>NG</item> + <item>NU</item> + <item>NF</item> + <item>MP</item> + <item>NO</item> + <item>OM</item> + <item>PK</item> + <item>PW</item> + <item>PS</item> + <item>PA</item> + <item>PG</item> + <item>PY</item> + <item>PE</item> + <item>PH</item> + <item>PL</item> + <item>PT</item> + <item>PR</item> + <item>QA</item> + <item>RE</item> + <item>RO</item> + <item>RU</item> + <item>RW</item> + <item>BL</item> + <item>SH</item> + <item>KN</item> + <item>LC</item> + <item>MF</item> + <item>PM</item> + <item>VC</item> + <item>WS</item> + <item>SM</item> + <item>ST</item> + <item>SA</item> + <item>SN</item> + <item>RS</item> + <item>SC</item> + <item>SL</item> + <item>SG</item> + <item>SX</item> + <item>SK</item> + <item>SI</item> + <item>SB</item> + <item>SO</item> + <item>ZA</item> + <item>SS</item> + <item>ES</item> + <item>LK</item> + <item>SD</item> + <item>SR</item> + <item>SJ</item> + <item>SZ</item> + <item>SE</item> + <item>CH</item> + <item>SY</item> + <item>TW</item> + <item>TJ</item> + <item>TZ</item> + <item>TH</item> + <item>TL</item> + <item>TG</item> + <item>TK</item> + <item>TO</item> + <item>TT</item> + <item>TN</item> + <item>TR</item> + <item>TM</item> + <item>TC</item> + <item>TV</item> + <item>UG</item> + <item>UA</item> + <item>AE</item> + <item>GB</item> + <item>US</item> + <item>UY</item> + <item>UZ</item> + <item>VU</item> + <item>VE</item> + <item>VN</item> + <item>VG</item> + <item>VI</item> + <item>WF</item> + <item>EH</item> + <item>YE</item> + <item>ZM</item> + <item>ZW</item> + </string-array> </resources>
\ No newline at end of file diff --git a/java/com/android/dialer/assisteddialing/ui/res/xml/assisted_dialing_setting.xml b/java/com/android/dialer/assisteddialing/ui/res/xml/assisted_dialing_setting.xml index 806edfcf9..c1706b2ed 100644 --- a/java/com/android/dialer/assisteddialing/ui/res/xml/assisted_dialing_setting.xml +++ b/java/com/android/dialer/assisteddialing/ui/res/xml/assisted_dialing_setting.xml @@ -17,10 +17,22 @@ <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> - <SwitchPreference - android:defaultValue="true" - android:key="@string/assisted_dialing_setting_toggle_key" - android:title="@string/assisted_dialing_setting_title" - android:summary="@string/assisted_dialing_setting_summary" /> + <SwitchPreference + android:defaultValue="true" + android:key="@string/assisted_dialing_setting_toggle_key" + android:summary="@string/assisted_dialing_setting_summary" + android:title="@string/assisted_dialing_setting_title"/> + + <PreferenceCategory + android:title="@string/assisted_dialing_setting_cc_category_title"> + <ListPreference + android:dependency="@string/assisted_dialing_setting_toggle_key" + android:defaultValue="" + android:entries="@array/assisted_dialing_cc_entries" + android:entryValues="@array/assisted_dialing_cc_values" + android:key="@string/assisted_dialing_setting_cc_key" + android:summary="@string/assisted_dialing_setting_cc_default_summary" + android:title="@string/assisted_dialing_setting_cc_title"/> + </PreferenceCategory> </PreferenceScreen> |