From 2f1c7586bcce334ca69022eb8dc6d8965ceb6a05 Mon Sep 17 00:00:00 2001 From: Eric Erfanian Date: Mon, 19 Jun 2017 11:26:01 -0700 Subject: Update AOSP Dialer source from internal google3 repository at cl/159428781. Test: make, treehugger This CL updates the AOSP Dialer source with all the changes that have gone into the private google3 repository. This includes all the changes from cl/152373142 (4/06/2017) to cl/159428781 (6/19/2017). This goal of these drops is to keep the AOSP source in sync with the internal google3 repository. Currently these sync are done by hand with very minor modifications to the internal source code. See the Android.mk file for list of modifications. Our current goal is to do frequent drops (daily if possible) and eventually switched to an automated process. Change-Id: Ie60a84b3936efd0ea3d95d7c86bf96d2b1663030 --- .../android/contacts/common/ClipboardUtils.java | 2 - .../contacts/common/ContactPhotoManager.java | 34 +-- .../contacts/common/ContactPhotoManagerImpl.java | 5 +- .../contacts/common/ContactPresenceIconUtil.java | 3 +- .../android/contacts/common/ContactStatusUtil.java | 2 - .../com/android/contacts/common/ContactsUtils.java | 185 +------------- java/com/android/contacts/common/GeoUtil.java | 55 ---- .../android/contacts/common/MoreContactUtils.java | 36 --- .../contacts/common/compat/ContactsCompat.java | 16 -- .../contacts/common/compat/PhoneAccountCompat.java | 55 +--- .../common/compat/PhoneNumberUtilsCompat.java | 132 +--------- .../common/compat/TelephonyManagerCompat.java | 80 +----- .../compat/telecom/TelecomManagerCompat.java | 282 ++------------------- .../contacts/common/dialog/CallSubjectDialog.java | 12 +- .../common/extensions/PhoneDirectoryExtender.java | 10 + .../extensions/PhoneDirectoryExtenderAccessor.java | 6 + .../extensions/PhoneDirectoryExtenderStub.java | 13 + .../contacts/common/format/FormatUtils.java | 181 ------------- .../contacts/common/format/TextHighlighter.java | 55 +++- .../common/format/testing/SpannedTestUtils.java | 85 ------- .../common/lettertiles/LetterTileDrawable.java | 42 ++- .../common/list/ContactEntryListAdapter.java | 58 ++++- .../common/list/ContactEntryListFragment.java | 20 +- .../contacts/common/list/ContactListItemView.java | 216 +++++++--------- .../contacts/common/list/ContactTileView.java | 19 +- .../common/list/PhoneNumberListAdapter.java | 70 ++--- .../common/list/PhoneNumberPickerFragment.java | 70 +++-- .../contacts/common/list/ViewPagerTabs.java | 29 +-- .../contacts/common/location/CountryDetector.java | 221 ---------------- .../common/location/UpdateCountryService.java | 104 -------- .../contacts/common/model/ContactLoader.java | 1 + .../contacts/common/model/account/AccountType.java | 3 +- .../common/model/account/BaseAccountType.java | 4 +- .../common/res/drawable-hdpi/ic_ab_search.png | Bin 1115 -> 0 bytes .../res/drawable-hdpi/ic_arrow_back_24dp.png | Bin 612 -> 0 bytes .../res/drawable-hdpi/ic_business_white_120dp.png | Bin 2477 -> 0 bytes .../common/res/drawable-hdpi/ic_call_24dp.png | Bin 340 -> 0 bytes .../common/res/drawable-hdpi/ic_close_dk.png | Bin 609 -> 0 bytes .../common/res/drawable-hdpi/ic_create_24dp.png | Bin 370 -> 0 bytes .../res/drawable-hdpi/ic_group_white_24dp.png | Bin 389 -> 0 bytes .../ic_history_white_drawable_24dp.png | Bin 525 -> 0 bytes .../res/drawable-hdpi/ic_info_outline_24dp.png | Bin 485 -> 0 bytes .../common/res/drawable-hdpi/ic_menu_back.png | Bin 799 -> 0 bytes .../common/res/drawable-hdpi/ic_menu_group_dk.png | Bin 1954 -> 0 bytes .../common/res/drawable-hdpi/ic_menu_group_lt.png | Bin 1922 -> 0 bytes .../res/drawable-hdpi/ic_menu_overflow_lt.png | Bin 220 -> 0 bytes .../common/res/drawable-hdpi/ic_menu_person_dk.png | Bin 1439 -> 0 bytes .../common/res/drawable-hdpi/ic_menu_person_lt.png | Bin 1416 -> 0 bytes .../ic_menu_remove_field_holo_light.png | Bin 515 -> 0 bytes .../common/res/drawable-hdpi/ic_menu_star_dk.png | Bin 1438 -> 0 bytes .../res/drawable-hdpi/ic_menu_star_holo_light.png | Bin 1211 -> 0 bytes .../common/res/drawable-hdpi/ic_menu_star_lt.png | Bin 1414 -> 0 bytes .../common/res/drawable-hdpi/ic_person_24dp.png | Bin 273 -> 0 bytes .../common/res/drawable-hdpi/ic_rx_videocam.png | Bin 413 -> 0 bytes .../common/res/drawable-hdpi/ic_tx_videocam.png | Bin 370 -> 0 bytes .../common/res/drawable-hdpi/ic_videocam.png | Bin 269 -> 0 bytes .../res/drawable-hdpi/ic_voicemail_avatar.png | Bin 2856 -> 0 bytes .../res/drawable-hdpi/list_activated_holo.9.png | Bin 154 -> 0 bytes .../res/drawable-hdpi/list_background_holo.9.png | Bin 224 -> 0 bytes .../res/drawable-hdpi/list_focused_holo.9.png | Bin 235 -> 0 bytes .../list_longpressed_holo_light.9.png | Bin 158 -> 0 bytes .../drawable-hdpi/list_pressed_holo_light.9.png | Bin 159 -> 0 bytes .../list_section_divider_holo_custom.9.png | Bin 205 -> 0 bytes .../common/res/drawable-hdpi/list_title_holo.9.png | Bin 267 -> 0 bytes .../drawable-ldrtl-hdpi/list_focused_holo.9.png | Bin 234 -> 0 bytes .../list_section_divider_holo_custom.9.png | Bin 191 -> 0 bytes .../res/drawable-ldrtl-hdpi/list_title_holo.9.png | Bin 258 -> 0 bytes .../drawable-ldrtl-mdpi/list_focused_holo.9.png | Bin 234 -> 0 bytes .../list_section_divider_holo_custom.9.png | Bin 180 -> 0 bytes .../res/drawable-ldrtl-mdpi/list_title_holo.9.png | Bin 186 -> 0 bytes .../list_activated_holo.9.png | Bin 1666 -> 0 bytes .../list_activated_holo.9.png | Bin 1034 -> 0 bytes .../list_activated_holo.9.png | Bin 2486 -> 0 bytes .../drawable-ldrtl-xhdpi/list_focused_holo.9.png | Bin 234 -> 0 bytes .../list_section_divider_holo_custom.9.png | Bin 196 -> 0 bytes .../res/drawable-ldrtl-xhdpi/list_title_holo.9.png | Bin 255 -> 0 bytes .../res/drawable-mdpi/list_activated_holo.9.png | Bin 151 -> 0 bytes .../res/drawable-mdpi/list_focused_holo.9.png | Bin 235 -> 0 bytes .../list_longpressed_holo_light.9.png | Bin 155 -> 0 bytes .../drawable-mdpi/list_pressed_holo_light.9.png | Bin 158 -> 0 bytes .../list_section_divider_holo_custom.9.png | Bin 198 -> 0 bytes .../list_activated_holo.9.png | Bin 1659 -> 0 bytes .../list_activated_holo.9.png | Bin 1005 -> 0 bytes .../list_activated_holo.9.png | Bin 2478 -> 0 bytes .../res/drawable-xhdpi/list_activated_holo.9.png | Bin 158 -> 0 bytes .../res/drawable-xhdpi/list_focused_holo.9.png | Bin 235 -> 0 bytes .../list_longpressed_holo_light.9.png | Bin 162 -> 0 bytes .../drawable-xhdpi/list_pressed_holo_light.9.png | Bin 163 -> 0 bytes .../list_section_divider_holo_custom.9.png | Bin 210 -> 0 bytes .../res/drawable-xxhdpi/list_activated_holo.9.png | Bin 1140 -> 0 bytes .../res/drawable-xxhdpi/list_focused_holo.9.png | Bin 1147 -> 0 bytes .../list_longpressed_holo_light.9.png | Bin 1051 -> 0 bytes .../drawable-xxhdpi/list_pressed_holo_light.9.png | Bin 1051 -> 0 bytes .../contacts/common/res/drawable/ic_back_arrow.xml | 20 -- .../common/res/drawable/ic_call_and_share.xml | 22 -- .../res/drawable/ic_person_add_tinted_24dp.xml | 20 -- .../common/res/drawable/ic_search_add_contact.xml | 20 -- .../common/res/drawable/ic_search_video_call.xml | 22 -- ...t_selector_background_transition_holo_light.xml | 20 -- .../common/res/layout/dialog_call_subject.xml | 2 +- .../common/res/layout/search_bar_expanded.xml | 4 +- .../contacts/common/res/values-af/strings.xml | 4 +- .../contacts/common/res/values-am/strings.xml | 4 +- .../contacts/common/res/values-ar/strings.xml | 4 +- .../contacts/common/res/values-az/strings.xml | 4 +- .../common/res/values-b+sr+Latn/strings.xml | 4 +- .../contacts/common/res/values-be/strings.xml | 4 +- .../contacts/common/res/values-bg/strings.xml | 4 +- .../contacts/common/res/values-bn/strings.xml | 4 +- .../contacts/common/res/values-bs/strings.xml | 4 +- .../contacts/common/res/values-ca/strings.xml | 4 +- .../contacts/common/res/values-cs/strings.xml | 4 +- .../contacts/common/res/values-da/strings.xml | 4 +- .../contacts/common/res/values-de/strings.xml | 4 +- .../contacts/common/res/values-el/strings.xml | 4 +- .../contacts/common/res/values-en-rAU/strings.xml | 4 +- .../contacts/common/res/values-en-rGB/strings.xml | 4 +- .../contacts/common/res/values-en-rIN/strings.xml | 4 +- .../contacts/common/res/values-es-rUS/strings.xml | 4 +- .../contacts/common/res/values-es/strings.xml | 4 +- .../contacts/common/res/values-et/strings.xml | 4 +- .../contacts/common/res/values-eu/strings.xml | 4 +- .../contacts/common/res/values-fa/strings.xml | 4 +- .../contacts/common/res/values-fi/strings.xml | 4 +- .../contacts/common/res/values-fr-rCA/strings.xml | 4 +- .../contacts/common/res/values-fr/strings.xml | 4 +- .../contacts/common/res/values-gl/strings.xml | 4 +- .../contacts/common/res/values-gu/strings.xml | 4 +- .../contacts/common/res/values-hi/strings.xml | 4 +- .../contacts/common/res/values-hr/strings.xml | 4 +- .../contacts/common/res/values-hu/strings.xml | 4 +- .../contacts/common/res/values-hy/strings.xml | 4 +- .../contacts/common/res/values-in/strings.xml | 4 +- .../contacts/common/res/values-is/strings.xml | 4 +- .../contacts/common/res/values-it/strings.xml | 4 +- .../contacts/common/res/values-iw/strings.xml | 4 +- .../contacts/common/res/values-ja/strings.xml | 4 +- .../contacts/common/res/values-ka/strings.xml | 4 +- .../contacts/common/res/values-kk/strings.xml | 4 +- .../contacts/common/res/values-km/strings.xml | 4 +- .../contacts/common/res/values-kn/strings.xml | 4 +- .../contacts/common/res/values-ko/strings.xml | 4 +- .../contacts/common/res/values-ky/strings.xml | 4 +- .../contacts/common/res/values-lo/strings.xml | 4 +- .../contacts/common/res/values-lt/strings.xml | 4 +- .../contacts/common/res/values-lv/strings.xml | 4 +- .../contacts/common/res/values-mk/strings.xml | 4 +- .../contacts/common/res/values-ml/strings.xml | 4 +- .../contacts/common/res/values-mn/strings.xml | 4 +- .../contacts/common/res/values-mr/strings.xml | 4 +- .../contacts/common/res/values-ms/strings.xml | 4 +- .../contacts/common/res/values-my/strings.xml | 4 +- .../contacts/common/res/values-nb/strings.xml | 4 +- .../contacts/common/res/values-ne/strings.xml | 4 +- .../contacts/common/res/values-nl/strings.xml | 4 +- .../contacts/common/res/values-no/strings.xml | 4 +- .../contacts/common/res/values-pa/strings.xml | 4 +- .../contacts/common/res/values-pl/strings.xml | 4 +- .../contacts/common/res/values-pt-rBR/strings.xml | 4 +- .../contacts/common/res/values-pt-rPT/strings.xml | 4 +- .../contacts/common/res/values-pt/strings.xml | 4 +- .../contacts/common/res/values-ro/strings.xml | 4 +- .../contacts/common/res/values-ru/strings.xml | 4 +- .../contacts/common/res/values-si/strings.xml | 4 +- .../contacts/common/res/values-sk/strings.xml | 4 +- .../contacts/common/res/values-sl/strings.xml | 4 +- .../contacts/common/res/values-sq/strings.xml | 4 +- .../contacts/common/res/values-sr/strings.xml | 4 +- .../contacts/common/res/values-sv/strings.xml | 4 +- .../contacts/common/res/values-sw/strings.xml | 4 +- .../contacts/common/res/values-ta/strings.xml | 4 +- .../contacts/common/res/values-te/strings.xml | 4 +- .../contacts/common/res/values-th/strings.xml | 4 +- .../contacts/common/res/values-tl/strings.xml | 4 +- .../contacts/common/res/values-tr/strings.xml | 4 +- .../contacts/common/res/values-uk/strings.xml | 4 +- .../contacts/common/res/values-ur/strings.xml | 4 +- .../contacts/common/res/values-uz/strings.xml | 4 +- .../contacts/common/res/values-vi/strings.xml | 4 +- .../contacts/common/res/values-zh-rCN/strings.xml | 4 +- .../contacts/common/res/values-zh-rHK/strings.xml | 4 +- .../contacts/common/res/values-zh-rTW/strings.xml | 4 +- .../contacts/common/res/values-zu/strings.xml | 4 +- .../android/contacts/common/res/values/dimens.xml | 2 +- .../com/android/contacts/common/res/values/ids.xml | 1 + .../android/contacts/common/res/values/strings.xml | 12 +- .../android/contacts/common/res/values/styles.xml | 1 - .../contacts/common/util/AccountFilterUtil.java | 42 --- .../android/contacts/common/util/BitmapUtil.java | 26 -- .../contacts/common/util/ContactDisplayUtils.java | 12 +- .../android/contacts/common/util/DateUtils.java | 241 ------------------ .../common/util/MaterialColorMapUtils.java | 8 - .../contacts/common/util/NameConverter.java | 242 ------------------ .../android/contacts/common/util/StopWatch.java | 28 +- .../common/util/TelephonyManagerUtils.java | 9 - .../contacts/common/util/TrafficStatsTags.java | 22 -- 196 files changed, 703 insertions(+), 2507 deletions(-) delete mode 100644 java/com/android/contacts/common/GeoUtil.java delete mode 100644 java/com/android/contacts/common/format/FormatUtils.java delete mode 100644 java/com/android/contacts/common/format/testing/SpannedTestUtils.java delete mode 100644 java/com/android/contacts/common/location/CountryDetector.java delete mode 100644 java/com/android/contacts/common/location/UpdateCountryService.java delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_ab_search.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_arrow_back_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_business_white_120dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_call_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_close_dk.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_create_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_group_white_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_history_white_drawable_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_info_outline_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_back.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_group_dk.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_group_lt.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_overflow_lt.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_person_dk.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_person_lt.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_remove_field_holo_light.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_dk.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_holo_light.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_lt.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_person_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_rx_videocam.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_tx_videocam.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_videocam.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_voicemail_avatar.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/list_activated_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/list_background_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/list_focused_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/list_longpressed_holo_light.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/list_pressed_holo_light.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/list_section_divider_holo_custom.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/list_title_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-ldrtl-hdpi/list_focused_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-ldrtl-hdpi/list_section_divider_holo_custom.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-ldrtl-hdpi/list_title_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-ldrtl-mdpi/list_focused_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-ldrtl-mdpi/list_section_divider_holo_custom.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-ldrtl-mdpi/list_title_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-ldrtl-sw600dp-hdpi/list_activated_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-ldrtl-sw600dp-mdpi/list_activated_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-ldrtl-sw600dp-xhdpi/list_activated_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-ldrtl-xhdpi/list_focused_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-ldrtl-xhdpi/list_section_divider_holo_custom.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-ldrtl-xhdpi/list_title_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/list_activated_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/list_focused_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/list_longpressed_holo_light.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/list_pressed_holo_light.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/list_section_divider_holo_custom.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-sw600dp-hdpi/list_activated_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-sw600dp-mdpi/list_activated_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-sw600dp-xhdpi/list_activated_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/list_activated_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/list_focused_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/list_longpressed_holo_light.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/list_pressed_holo_light.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/list_section_divider_holo_custom.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/list_activated_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/list_focused_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/list_longpressed_holo_light.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/list_pressed_holo_light.9.png delete mode 100644 java/com/android/contacts/common/res/drawable/ic_back_arrow.xml delete mode 100644 java/com/android/contacts/common/res/drawable/ic_call_and_share.xml delete mode 100644 java/com/android/contacts/common/res/drawable/ic_person_add_tinted_24dp.xml delete mode 100644 java/com/android/contacts/common/res/drawable/ic_search_add_contact.xml delete mode 100644 java/com/android/contacts/common/res/drawable/ic_search_video_call.xml delete mode 100644 java/com/android/contacts/common/res/drawable/list_selector_background_transition_holo_light.xml delete mode 100644 java/com/android/contacts/common/util/NameConverter.java delete mode 100644 java/com/android/contacts/common/util/TrafficStatsTags.java (limited to 'java/com/android/contacts') diff --git a/java/com/android/contacts/common/ClipboardUtils.java b/java/com/android/contacts/common/ClipboardUtils.java index 9345b0f9c..3d7683941 100644 --- a/java/com/android/contacts/common/ClipboardUtils.java +++ b/java/com/android/contacts/common/ClipboardUtils.java @@ -24,8 +24,6 @@ import android.widget.Toast; public class ClipboardUtils { - private static final String TAG = "ClipboardUtils"; - private ClipboardUtils() {} /** diff --git a/java/com/android/contacts/common/ContactPhotoManager.java b/java/com/android/contacts/common/ContactPhotoManager.java index 169348b25..fbf51cc0e 100644 --- a/java/com/android/contacts/common/ContactPhotoManager.java +++ b/java/com/android/contacts/common/ContactPhotoManager.java @@ -36,14 +36,6 @@ import com.android.dialer.util.PermissionsUtil; /** Asynchronously loads contact photos and maintains a cache of photos. */ public abstract class ContactPhotoManager implements ComponentCallbacks2 { - /** Contact type constants used for default letter images */ - public static final int TYPE_PERSON = LetterTileDrawable.TYPE_PERSON; - - public static final int TYPE_SPAM = LetterTileDrawable.TYPE_SPAM; - public static final int TYPE_BUSINESS = LetterTileDrawable.TYPE_BUSINESS; - public static final int TYPE_VOICEMAIL = LetterTileDrawable.TYPE_VOICEMAIL; - public static final int TYPE_DEFAULT = LetterTileDrawable.TYPE_DEFAULT; - public static final int TYPE_GENERIC_AVATAR = LetterTileDrawable.TYPE_GENERIC_AVATAR; /** Scale and offset default constants used for default letter images */ public static final float SCALE_DEFAULT = 1.0f; @@ -88,7 +80,7 @@ public abstract class ContactPhotoManager implements ComponentCallbacks2 { if (!TextUtils.isEmpty(request.identifier)) { builder.appendQueryParameter(IDENTIFIER_PARAM_KEY, request.identifier); } - if (request.contactType != TYPE_DEFAULT) { + if (request.contactType != LetterTileDrawable.TYPE_DEFAULT) { builder.appendQueryParameter(CONTACT_TYPE_PARAM_KEY, String.valueOf(request.contactType)); } if (request.scale != SCALE_DEFAULT) { @@ -114,7 +106,7 @@ public abstract class ContactPhotoManager implements ComponentCallbacks2 { public static String appendBusinessContactType(String photoUrl) { Uri uri = Uri.parse(photoUrl); Builder builder = uri.buildUpon(); - builder.encodedFragment(String.valueOf(TYPE_BUSINESS)); + builder.encodedFragment(String.valueOf(LetterTileDrawable.TYPE_BUSINESS)); return builder.build().toString(); } @@ -147,7 +139,7 @@ public abstract class ContactPhotoManager implements ComponentCallbacks2 { String encodedFragment = photoUri.getEncodedFragment(); return !TextUtils.isEmpty(encodedFragment) - && encodedFragment.equals(String.valueOf(TYPE_BUSINESS)); + && encodedFragment.equals(String.valueOf(LetterTileDrawable.TYPE_BUSINESS)); } protected static DefaultImageRequest getDefaultImageRequestFromUri(Uri uri) { @@ -246,6 +238,9 @@ public abstract class ContactPhotoManager implements ComponentCallbacks2 { badge.assignContactUri(contactUri); badge.setOverlay(null); + badge.setContentDescription( + badge.getContext().getString(R.string.description_quick_contact_for, displayName)); + String lookupKey = contactUri == null ? null : UriUtils.getLookupKeyFromUri(contactUri); ContactPhotoManager.DefaultImageRequest request = new ContactPhotoManager.DefaultImageRequest( @@ -378,7 +373,7 @@ public abstract class ContactPhotoManager implements ComponentCallbacks2 { * be returned. */ public static final DefaultImageRequest EMPTY_DEFAULT_BUSINESS_IMAGE_REQUEST = - new DefaultImageRequest(null, null, TYPE_BUSINESS, false); + new DefaultImageRequest(null, null, LetterTileDrawable.TYPE_BUSINESS, false); /** * Used to indicate that a circular drawable that represents a contact without any contact * details should be returned. @@ -390,7 +385,7 @@ public abstract class ContactPhotoManager implements ComponentCallbacks2 { * should be returned. */ public static final DefaultImageRequest EMPTY_CIRCULAR_BUSINESS_IMAGE_REQUEST = - new DefaultImageRequest(null, null, TYPE_BUSINESS, true); + new DefaultImageRequest(null, null, LetterTileDrawable.TYPE_BUSINESS, true); /** The contact's display name. The display name is used to */ public String displayName; /** @@ -403,10 +398,9 @@ public abstract class ContactPhotoManager implements ComponentCallbacks2 { /** * The type of this contact. This contact type may be used to decide the kind of image to use in * the case where a unique letter cannot be generated from the contact's display name and - * identifier. See: {@link #TYPE_PERSON} {@link #TYPE_BUSINESS} {@link #TYPE_PERSON} {@link - * #TYPE_DEFAULT} + * identifier. */ - public int contactType = TYPE_DEFAULT; + public @LetterTileDrawable.ContactType int contactType = LetterTileDrawable.TYPE_DEFAULT; /** * The amount to scale the letter or bitmap to, as a ratio of its default size (from a range of * 0.0f to 2.0f). The default value is 1.0f. @@ -429,7 +423,13 @@ public abstract class ContactPhotoManager implements ComponentCallbacks2 { public DefaultImageRequest() {} public DefaultImageRequest(String displayName, String identifier, boolean isCircular) { - this(displayName, identifier, TYPE_DEFAULT, SCALE_DEFAULT, OFFSET_DEFAULT, isCircular); + this( + displayName, + identifier, + LetterTileDrawable.TYPE_DEFAULT, + SCALE_DEFAULT, + OFFSET_DEFAULT, + isCircular); } public DefaultImageRequest( diff --git a/java/com/android/contacts/common/ContactPhotoManagerImpl.java b/java/com/android/contacts/common/ContactPhotoManagerImpl.java index 2e6ff9fdc..28ecf3421 100644 --- a/java/com/android/contacts/common/ContactPhotoManagerImpl.java +++ b/java/com/android/contacts/common/ContactPhotoManagerImpl.java @@ -53,9 +53,9 @@ import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import com.android.contacts.common.util.BitmapUtil; -import com.android.contacts.common.util.TrafficStatsTags; import com.android.contacts.common.util.UriUtils; import com.android.dialer.common.LogUtil; +import com.android.dialer.constants.TrafficStatsTags; import com.android.dialer.util.PermissionsUtil; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -634,8 +634,9 @@ class ContactPhotoManagerImpl extends ContactPhotoManager implements Callback { } return true; } + default: + return false; } - return false; } public void ensureLoaderThread() { diff --git a/java/com/android/contacts/common/ContactPresenceIconUtil.java b/java/com/android/contacts/common/ContactPresenceIconUtil.java index eeaf652a8..bce4b21f4 100644 --- a/java/com/android/contacts/common/ContactPresenceIconUtil.java +++ b/java/com/android/contacts/common/ContactPresenceIconUtil.java @@ -19,6 +19,7 @@ package com.android.contacts.common; import android.content.Context; import android.graphics.drawable.Drawable; import android.provider.ContactsContract.StatusUpdates; +import android.support.v4.content.ContextCompat; /** Define the contact present show policy in Contacts */ public class ContactPresenceIconUtil { @@ -36,7 +37,7 @@ public class ContactPresenceIconUtil { case StatusUpdates.AWAY: case StatusUpdates.DO_NOT_DISTURB: case StatusUpdates.INVISIBLE: - return context.getResources().getDrawable(StatusUpdates.getPresenceIconResourceId(status)); + return ContextCompat.getDrawable(context, StatusUpdates.getPresenceIconResourceId(status)); case StatusUpdates.OFFLINE: // The undefined status is treated as OFFLINE in getPresenceIconResourceId(); default: diff --git a/java/com/android/contacts/common/ContactStatusUtil.java b/java/com/android/contacts/common/ContactStatusUtil.java index 97d84c876..c5347e778 100644 --- a/java/com/android/contacts/common/ContactStatusUtil.java +++ b/java/com/android/contacts/common/ContactStatusUtil.java @@ -23,8 +23,6 @@ import android.provider.ContactsContract.StatusUpdates; /** Provides static function to get default contact status message. */ public class ContactStatusUtil { - private static final String TAG = "ContactStatusUtil"; - public static String getStatusString(Context context, int presence) { Resources resources = context.getResources(); switch (presence) { diff --git a/java/com/android/contacts/common/ContactsUtils.java b/java/com/android/contacts/common/ContactsUtils.java index 60af44b9a..66ccc90e7 100644 --- a/java/com/android/contacts/common/ContactsUtils.java +++ b/java/com/android/contacts/common/ContactsUtils.java @@ -16,184 +16,17 @@ package com.android.contacts.common; -import android.content.Context; -import android.content.Intent; -import android.database.Cursor; -import android.net.Uri; -import android.provider.ContactsContract.CommonDataKinds.Im; -import android.provider.ContactsContract.DisplayPhoto; +import android.provider.ContactsContract.Contacts; import android.support.annotation.IntDef; -import android.text.TextUtils; -import android.util.Pair; -import com.android.contacts.common.compat.ContactsCompat; import com.android.contacts.common.compat.DirectoryCompat; -import com.android.contacts.common.model.AccountTypeManager; -import com.android.contacts.common.model.account.AccountWithDataSet; -import com.android.contacts.common.model.dataitem.ImDataItem; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; -import java.util.List; public class ContactsUtils { // Telecomm related schemes are in CallUtil - public static final String SCHEME_IMTO = "imto"; - public static final String SCHEME_MAILTO = "mailto"; - public static final String SCHEME_SMSTO = "smsto"; public static final long USER_TYPE_CURRENT = 0; public static final long USER_TYPE_WORK = 1; - private static final String TAG = "ContactsUtils"; - private static final int DEFAULT_THUMBNAIL_SIZE = 96; - private static int sThumbnailSize = -1; - - /** - * This looks up the provider name defined in ProviderNames from the predefined IM protocol id. - * This is used for interacting with the IM application. - * - * @param protocol the protocol ID - * @return the provider name the IM app uses for the given protocol, or null if no provider is - * defined for the given protocol - * @hide - */ - public static String lookupProviderNameFromId(int protocol) { - switch (protocol) { - case Im.PROTOCOL_GOOGLE_TALK: - return ProviderNames.GTALK; - case Im.PROTOCOL_AIM: - return ProviderNames.AIM; - case Im.PROTOCOL_MSN: - return ProviderNames.MSN; - case Im.PROTOCOL_YAHOO: - return ProviderNames.YAHOO; - case Im.PROTOCOL_ICQ: - return ProviderNames.ICQ; - case Im.PROTOCOL_JABBER: - return ProviderNames.JABBER; - case Im.PROTOCOL_SKYPE: - return ProviderNames.SKYPE; - case Im.PROTOCOL_QQ: - return ProviderNames.QQ; - } - return null; - } - - /** - * Test if the given {@link CharSequence} contains any graphic characters, first checking {@link - * TextUtils#isEmpty(CharSequence)} to handle null. - */ - public static boolean isGraphic(CharSequence str) { - return !TextUtils.isEmpty(str) && TextUtils.isGraphic(str); - } - - /** Returns true if two objects are considered equal. Two null references are equal here. */ - public static boolean areObjectsEqual(Object a, Object b) { - return a == b || (a != null && a.equals(b)); - } - - /** Returns true if two {@link Intent}s are both null, or have the same action. */ - public static final boolean areIntentActionEqual(Intent a, Intent b) { - if (a == b) { - return true; - } - if (a == null || b == null) { - return false; - } - return TextUtils.equals(a.getAction(), b.getAction()); - } - - public static boolean areGroupWritableAccountsAvailable(Context context) { - final List accounts = - AccountTypeManager.getInstance(context).getGroupWritableAccounts(); - return !accounts.isEmpty(); - } - - /** - * Returns the size (width and height) of thumbnail pictures as configured in the provider. This - * can safely be called from the UI thread, as the provider can serve this without performing a - * database access - */ - public static int getThumbnailSize(Context context) { - if (sThumbnailSize == -1) { - final Cursor c = - context - .getContentResolver() - .query( - DisplayPhoto.CONTENT_MAX_DIMENSIONS_URI, - new String[] {DisplayPhoto.THUMBNAIL_MAX_DIM}, - null, - null, - null); - if (c != null) { - try { - if (c.moveToFirst()) { - sThumbnailSize = c.getInt(0); - } - } finally { - c.close(); - } - } - } - return sThumbnailSize != -1 ? sThumbnailSize : DEFAULT_THUMBNAIL_SIZE; - } - - private static Intent getCustomImIntent(ImDataItem im, int protocol) { - String host = im.getCustomProtocol(); - final String data = im.getData(); - if (TextUtils.isEmpty(data)) { - return null; - } - if (protocol != Im.PROTOCOL_CUSTOM) { - // Try bringing in a well-known host for specific protocols - host = ContactsUtils.lookupProviderNameFromId(protocol); - } - if (TextUtils.isEmpty(host)) { - return null; - } - final String authority = host.toLowerCase(); - final Uri imUri = - new Uri.Builder().scheme(SCHEME_IMTO).authority(authority).appendPath(data).build(); - final Intent intent = new Intent(Intent.ACTION_SENDTO, imUri); - return intent; - } - - /** - * Returns the proper Intent for an ImDatItem. If available, a secondary intent is stored in the - * second Pair slot - */ - public static Pair buildImIntent(Context context, ImDataItem im) { - Intent intent = null; - Intent secondaryIntent = null; - final boolean isEmail = im.isCreatedFromEmail(); - - if (!isEmail && !im.isProtocolValid()) { - return new Pair<>(null, null); - } - - final String data = im.getData(); - if (TextUtils.isEmpty(data)) { - return new Pair<>(null, null); - } - - final int protocol = isEmail ? Im.PROTOCOL_GOOGLE_TALK : im.getProtocol(); - - if (protocol == Im.PROTOCOL_GOOGLE_TALK) { - final int chatCapability = im.getChatCapability(); - if ((chatCapability & Im.CAPABILITY_HAS_CAMERA) != 0) { - intent = new Intent(Intent.ACTION_SENDTO, Uri.parse("xmpp:" + data + "?message")); - secondaryIntent = new Intent(Intent.ACTION_SENDTO, Uri.parse("xmpp:" + data + "?call")); - } else if ((chatCapability & Im.CAPABILITY_HAS_VOICE) != 0) { - // Allow Talking and Texting - intent = new Intent(Intent.ACTION_SENDTO, Uri.parse("xmpp:" + data + "?message")); - secondaryIntent = new Intent(Intent.ACTION_SENDTO, Uri.parse("xmpp:" + data + "?call")); - } else { - intent = new Intent(Intent.ACTION_SENDTO, Uri.parse("xmpp:" + data + "?message")); - } - } else { - // Build an IM Intent - intent = getCustomImIntent(im, protocol); - } - return new Pair<>(intent, secondaryIntent); - } /** * Determine UserType from directory id and contact id. @@ -232,27 +65,13 @@ public class ContactsUtils { : USER_TYPE_CURRENT; } // Only check contact id if directory id is null - if (contactId != null && contactId != 0L && ContactsCompat.isEnterpriseContactId(contactId)) { + if (contactId != null && contactId != 0L && Contacts.isEnterpriseContactId(contactId)) { return USER_TYPE_WORK; } else { return USER_TYPE_CURRENT; } } - // TODO find a proper place for the canonical version of these - public interface ProviderNames { - - String YAHOO = "Yahoo"; - String GTALK = "GTalk"; - String MSN = "MSN"; - String ICQ = "ICQ"; - String AIM = "AIM"; - String XMPP = "XMPP"; - String JABBER = "JABBER"; - String SKYPE = "SKYPE"; - String QQ = "QQ"; - } - /** * UserType indicates the user type of the contact. If the contact is from Work User (Work Profile * in Android Multi-User System), it's {@link #USER_TYPE_WORK}, otherwise, {@link diff --git a/java/com/android/contacts/common/GeoUtil.java b/java/com/android/contacts/common/GeoUtil.java deleted file mode 100644 index 50b0cd9e3..000000000 --- a/java/com/android/contacts/common/GeoUtil.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2012 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 - */ - -package com.android.contacts.common; - -import android.app.Application; -import android.content.Context; -import com.android.contacts.common.location.CountryDetector; -import com.google.i18n.phonenumbers.NumberParseException; -import com.google.i18n.phonenumbers.PhoneNumberUtil; -import com.google.i18n.phonenumbers.Phonenumber; -import com.google.i18n.phonenumbers.geocoding.PhoneNumberOfflineGeocoder; -import java.util.Locale; - -/** Static methods related to Geo. */ -public class GeoUtil { - - /** - * Returns the country code of the country the user is currently in. Before calling this method, - * make sure that {@link CountryDetector#initialize(Context)} has already been called in {@link - * Application#onCreate()}. - * - * @return The ISO 3166-1 two letters country code of the country the user is in. - */ - public static String getCurrentCountryIso(Context context) { - // The {@link CountryDetector} should never return null so this is safe to return as-is. - return CountryDetector.getInstance(context).getCurrentCountryIso(); - } - - public static String getGeocodedLocationFor(Context context, String phoneNumber) { - final PhoneNumberOfflineGeocoder geocoder = PhoneNumberOfflineGeocoder.getInstance(); - final PhoneNumberUtil phoneNumberUtil = PhoneNumberUtil.getInstance(); - try { - final Phonenumber.PhoneNumber structuredPhoneNumber = - phoneNumberUtil.parse(phoneNumber, getCurrentCountryIso(context)); - final Locale locale = context.getResources().getConfiguration().locale; - return geocoder.getDescriptionForNumber(structuredPhoneNumber, locale); - } catch (NumberParseException e) { - return null; - } - } -} diff --git a/java/com/android/contacts/common/MoreContactUtils.java b/java/com/android/contacts/common/MoreContactUtils.java index 028f89971..26241b34f 100644 --- a/java/com/android/contacts/common/MoreContactUtils.java +++ b/java/com/android/contacts/common/MoreContactUtils.java @@ -16,7 +16,6 @@ package com.android.contacts.common; -import android.content.Context; import android.content.Intent; import android.graphics.Rect; import android.net.Uri; @@ -24,7 +23,6 @@ import android.provider.ContactsContract; import android.telephony.PhoneNumberUtils; import android.text.TextUtils; import android.view.View; -import android.widget.TextView; import com.android.contacts.common.model.account.AccountType; import com.google.i18n.phonenumbers.NumberParseException; import com.google.i18n.phonenumbers.PhoneNumberUtil; @@ -193,40 +191,6 @@ public class MoreContactUtils { return rect; } - /** - * Returns a header view based on the R.layout.list_separator, where the containing {@link - * android.widget.TextView} is set using the given textResourceId. - */ - public static TextView createHeaderView(Context context, int textResourceId) { - final TextView textView = (TextView) View.inflate(context, R.layout.list_separator, null); - textView.setText(context.getString(textResourceId)); - return textView; - } - - /** - * Set the top padding on the header view dynamically, based on whether the header is in the first - * row or not. - */ - public static void setHeaderViewBottomPadding( - Context context, TextView textView, boolean isFirstRow) { - final int topPadding; - if (isFirstRow) { - topPadding = - (int) - context - .getResources() - .getDimension(R.dimen.frequently_contacted_title_top_margin_when_first_row); - } else { - topPadding = - (int) context.getResources().getDimension(R.dimen.frequently_contacted_title_top_margin); - } - textView.setPaddingRelative( - textView.getPaddingStart(), - topPadding, - textView.getPaddingEnd(), - textView.getPaddingBottom()); - } - /** * Returns the intent to launch for the given invitable account type and contact lookup URI. This * will return null if the account type is not invitable (i.e. there is no {@link diff --git a/java/com/android/contacts/common/compat/ContactsCompat.java b/java/com/android/contacts/common/compat/ContactsCompat.java index 39d0b55d3..e0c9b7e53 100644 --- a/java/com/android/contacts/common/compat/ContactsCompat.java +++ b/java/com/android/contacts/common/compat/ContactsCompat.java @@ -21,7 +21,6 @@ import android.os.Build.VERSION; import android.os.Build.VERSION_CODES; import android.provider.ContactsContract; import android.provider.ContactsContract.Contacts; -import com.android.dialer.compat.CompatUtils; /** Compatibility class for {@link ContactsContract.Contacts} */ public class ContactsCompat { @@ -29,8 +28,6 @@ public class ContactsCompat { // TODO: Use N APIs private static final Uri ENTERPRISE_CONTENT_FILTER_URI = Uri.withAppendedPath(Contacts.CONTENT_URI, "filter_enterprise"); - // Copied from ContactsContract.Contacts#ENTERPRISE_CONTACT_ID_BASE, which is hidden. - private static final long ENTERPRISE_CONTACT_ID_BASE = 1000000000; /** Not instantiable. */ private ContactsCompat() {} @@ -41,17 +38,4 @@ public class ContactsCompat { } return Contacts.CONTENT_FILTER_URI; } - - /** - * Return {@code true} if a contact ID is from the contacts provider on the enterprise profile. - */ - public static boolean isEnterpriseContactId(long contactId) { - if (CompatUtils.isLollipopCompatible()) { - return Contacts.isEnterpriseContactId(contactId); - } else { - // copied from ContactsContract.Contacts.isEnterpriseContactId - return (contactId >= ENTERPRISE_CONTACT_ID_BASE) - && (contactId < ContactsContract.Profile.MIN_ID); - } - } } diff --git a/java/com/android/contacts/common/compat/PhoneAccountCompat.java b/java/com/android/contacts/common/compat/PhoneAccountCompat.java index 6a24ec033..aa22c6861 100644 --- a/java/com/android/contacts/common/compat/PhoneAccountCompat.java +++ b/java/com/android/contacts/common/compat/PhoneAccountCompat.java @@ -20,33 +20,10 @@ import android.graphics.drawable.Drawable; import android.graphics.drawable.Icon; import android.support.annotation.Nullable; import android.telecom.PhoneAccount; -import android.util.Log; -import com.android.dialer.compat.CompatUtils; /** Compatiblity class for {@link android.telecom.PhoneAccount} */ public class PhoneAccountCompat { - private static final String TAG = PhoneAccountCompat.class.getSimpleName(); - - /** - * Gets the {@link Icon} associated with the given {@link PhoneAccount} - * - * @param phoneAccount the PhoneAccount from which to retrieve the Icon - * @return the Icon, or null - */ - @Nullable - public static Icon getIcon(@Nullable PhoneAccount phoneAccount) { - if (phoneAccount == null) { - return null; - } - - if (CompatUtils.isMarshmallowCompatible()) { - return phoneAccount.getIcon(); - } - - return null; - } - /** * Builds and returns an icon {@code Drawable} to represent this {@code PhoneAccount} in a user * interface. @@ -61,44 +38,16 @@ public class PhoneAccountCompat { if (phoneAccount == null || context == null) { return null; } - - if (CompatUtils.isMarshmallowCompatible()) { - return createIconDrawableMarshmallow(phoneAccount, context); - } - - if (CompatUtils.isLollipopMr1Compatible()) { - return createIconDrawableLollipopMr1(phoneAccount, context); - } - return null; + return createIconDrawableMarshmallow(phoneAccount, context); } @Nullable private static Drawable createIconDrawableMarshmallow( PhoneAccount phoneAccount, Context context) { - Icon accountIcon = getIcon(phoneAccount); + Icon accountIcon = phoneAccount.getIcon(); if (accountIcon == null) { return null; } return accountIcon.loadDrawable(context); } - - @Nullable - private static Drawable createIconDrawableLollipopMr1( - PhoneAccount phoneAccount, Context context) { - try { - return (Drawable) - PhoneAccount.class - .getMethod("createIconDrawable", Context.class) - .invoke(phoneAccount, context); - } catch (ReflectiveOperationException e) { - return null; - } catch (Throwable t) { - Log.e( - TAG, - "Unexpected exception when attempting to call " - + "android.telecom.PhoneAccount#createIconDrawable", - t); - return null; - } - } } diff --git a/java/com/android/contacts/common/compat/PhoneNumberUtilsCompat.java b/java/com/android/contacts/common/compat/PhoneNumberUtilsCompat.java index 960b340d8..a6cfe07cd 100644 --- a/java/com/android/contacts/common/compat/PhoneNumberUtilsCompat.java +++ b/java/com/android/contacts/common/compat/PhoneNumberUtilsCompat.java @@ -17,13 +17,7 @@ package com.android.contacts.common.compat; import android.telephony.PhoneNumberUtils; -import android.text.Spannable; -import android.text.TextUtils; import android.text.style.TtsSpan; -import com.android.dialer.compat.CompatUtils; -import com.google.i18n.phonenumbers.NumberParseException; -import com.google.i18n.phonenumbers.PhoneNumberUtil; -import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber; /** * This class contains static utility methods extracted from PhoneNumberUtils, and the methods were @@ -37,138 +31,16 @@ public class PhoneNumberUtilsCompat { /** Not instantiable. */ private PhoneNumberUtilsCompat() {} - public static String normalizeNumber(String phoneNumber) { - if (CompatUtils.isLollipopCompatible()) { - return PhoneNumberUtils.normalizeNumber(phoneNumber); - } else { - return normalizeNumberInternal(phoneNumber); - } - } - - /** Implementation copied from {@link PhoneNumberUtils#normalizeNumber} */ - private static String normalizeNumberInternal(String phoneNumber) { - if (TextUtils.isEmpty(phoneNumber)) { - return ""; - } - StringBuilder sb = new StringBuilder(); - int len = phoneNumber.length(); - for (int i = 0; i < len; i++) { - char c = phoneNumber.charAt(i); - // Character.digit() supports ASCII and Unicode digits (fullwidth, Arabic-Indic, etc.) - int digit = Character.digit(c, 10); - if (digit != -1) { - sb.append(digit); - } else if (sb.length() == 0 && c == '+') { - sb.append(c); - } else if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) { - return normalizeNumber(PhoneNumberUtils.convertKeypadLettersToDigits(phoneNumber)); - } - } - return sb.toString(); - } - public static String formatNumber( String phoneNumber, String phoneNumberE164, String defaultCountryIso) { - if (CompatUtils.isLollipopCompatible()) { return PhoneNumberUtils.formatNumber(phoneNumber, phoneNumberE164, defaultCountryIso); - } else { - // This method was deprecated in API level 21, so it's only used on pre-L SDKs. - return PhoneNumberUtils.formatNumber(phoneNumber); - } } public static CharSequence createTtsSpannable(CharSequence phoneNumber) { - if (CompatUtils.isMarshmallowCompatible()) { - return PhoneNumberUtils.createTtsSpannable(phoneNumber); - } else { - return createTtsSpannableInternal(phoneNumber); - } + return PhoneNumberUtils.createTtsSpannable(phoneNumber); } public static TtsSpan createTtsSpan(String phoneNumber) { - if (CompatUtils.isMarshmallowCompatible()) { - return PhoneNumberUtils.createTtsSpan(phoneNumber); - } else if (CompatUtils.isLollipopCompatible()) { - return createTtsSpanLollipop(phoneNumber); - } else { - return null; - } - } - - /** Copied from {@link PhoneNumberUtils#createTtsSpannable} */ - private static CharSequence createTtsSpannableInternal(CharSequence phoneNumber) { - if (phoneNumber == null) { - return null; - } - Spannable spannable = Spannable.Factory.getInstance().newSpannable(phoneNumber); - addTtsSpanInternal(spannable, 0, spannable.length()); - return spannable; - } - - /** Compat method for addTtsSpan, see {@link PhoneNumberUtils#addTtsSpan} */ - public static void addTtsSpan(Spannable s, int start, int endExclusive) { - if (CompatUtils.isMarshmallowCompatible()) { - PhoneNumberUtils.addTtsSpan(s, start, endExclusive); - } else { - addTtsSpanInternal(s, start, endExclusive); - } - } - - /** Copied from {@link PhoneNumberUtils#addTtsSpan} */ - private static void addTtsSpanInternal(Spannable s, int start, int endExclusive) { - s.setSpan( - createTtsSpan(s.subSequence(start, endExclusive).toString()), - start, - endExclusive, - Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); - } - - /** Copied from {@link PhoneNumberUtils#createTtsSpan} */ - private static TtsSpan createTtsSpanLollipop(String phoneNumberString) { - if (phoneNumberString == null) { - return null; - } - - // Parse the phone number - final PhoneNumberUtil phoneNumberUtil = PhoneNumberUtil.getInstance(); - PhoneNumber phoneNumber = null; - try { - // Don't supply a defaultRegion so this fails for non-international numbers because - // we don't want to TalkBalk to read a country code (e.g. +1) if it is not already - // present - phoneNumber = phoneNumberUtil.parse(phoneNumberString, /* defaultRegion */ null); - } catch (NumberParseException ignored) { - } - - // Build a telephone tts span - final TtsSpan.TelephoneBuilder builder = new TtsSpan.TelephoneBuilder(); - if (phoneNumber == null) { - // Strip separators otherwise TalkBack will be silent - // (this behavior was observed with TalkBalk 4.0.2 from their alpha channel) - builder.setNumberParts(splitAtNonNumerics(phoneNumberString)); - } else { - if (phoneNumber.hasCountryCode()) { - builder.setCountryCode(Integer.toString(phoneNumber.getCountryCode())); - } - builder.setNumberParts(Long.toString(phoneNumber.getNationalNumber())); - } - return builder.build(); - } - - /** - * Split a phone number using spaces, ignoring anything that is not a digit - * - * @param number A {@code CharSequence} before splitting, e.g., "+20(123)-456#" - * @return A {@code String} after splitting, e.g., "20 123 456". - */ - private static String splitAtNonNumerics(CharSequence number) { - StringBuilder sb = new StringBuilder(number.length()); - for (int i = 0; i < number.length(); i++) { - sb.append(PhoneNumberUtils.isISODigit(number.charAt(i)) ? number.charAt(i) : " "); - } - // It is very important to remove extra spaces. At time of writing, any leading or trailing - // spaces, or any sequence of more than one space, will confuse TalkBack and cause the TTS - // span to be non-functional! - return sb.toString().replaceAll(" +", " ").trim(); + return PhoneNumberUtils.createTtsSpan(phoneNumber); } } diff --git a/java/com/android/contacts/common/compat/TelephonyManagerCompat.java b/java/com/android/contacts/common/compat/TelephonyManagerCompat.java index 7e4803ca5..02113ca55 100644 --- a/java/com/android/contacts/common/compat/TelephonyManagerCompat.java +++ b/java/com/android/contacts/common/compat/TelephonyManagerCompat.java @@ -27,7 +27,7 @@ import android.telecom.PhoneAccountHandle; import android.telephony.TelephonyManager; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; -import com.android.dialer.compat.CompatUtils; +import com.android.dialer.telecom.TelecomUtil; import java.lang.reflect.InvocationTargetException; public class TelephonyManagerCompat { @@ -40,6 +40,8 @@ public class TelephonyManagerCompat { public static final String EVENT_CALL_REMOTELY_HELD = "android.telecom.event.CALL_REMOTELY_HELD"; public static final String EVENT_CALL_REMOTELY_UNHELD = "android.telecom.event.CALL_REMOTELY_UNHELD"; + public static final String EVENT_MERGE_START = "android.telecom.event.MERGE_START"; + public static final String EVENT_MERGE_COMPLETE = "android.telecom.event.MERGE_COMPLETE"; public static final String EVENT_NOTIFY_INTERNATIONAL_CALL_ON_WFC = "android.telephony.event.EVENT_NOTIFY_INTERNATIONAL_CALL_ON_WFC"; @@ -48,31 +50,6 @@ public class TelephonyManagerCompat { private static final String SECRET_CODE_ACTION = "android.provider.Telephony.SECRET_CODE"; - /** - * @param telephonyManager The telephony manager instance to use for method calls. - * @return true if the current device is "voice capable". - *

"Voice capable" means that this device supports circuit-switched (i.e. voice) phone - * calls over the telephony network, and is allowed to display the in-call UI while a cellular - * voice call is active. This will be false on "data only" devices which can't make voice - * calls and don't support any in-call UI. - *

Note: the meaning of this flag is subtly different from the - * PackageManager.FEATURE_TELEPHONY system feature, which is available on any device with a - * telephony radio, even if the device is data-only. - */ - public static boolean isVoiceCapable(@Nullable TelephonyManager telephonyManager) { - if (telephonyManager == null) { - return false; - } - if (CompatUtils.isLollipopMr1Compatible() - || CompatUtils.isMethodAvailable(TELEPHONY_MANAGER_CLASS, "isVoiceCapable")) { - // isVoiceCapable was unhidden in L-MR1 - return telephonyManager.isVoiceCapable(); - } - final int phoneType = telephonyManager.getPhoneType(); - return phoneType == TelephonyManager.PHONE_TYPE_CDMA - || phoneType == TelephonyManager.PHONE_TYPE_GSM; - } - /** * Returns the number of phones available. Returns 1 for Single standby mode (Single SIM * functionality) Returns 2 for Dual standby mode.(Dual SIM functionality) @@ -85,31 +62,7 @@ public class TelephonyManagerCompat { if (telephonyManager == null) { return 1; } - if (CompatUtils.isMarshmallowCompatible() - || CompatUtils.isMethodAvailable(TELEPHONY_MANAGER_CLASS, "getPhoneCount")) { - return telephonyManager.getPhoneCount(); - } - return 1; - } - - /** - * Returns the unique device ID of a subscription, for example, the IMEI for GSM and the MEID for - * CDMA phones. Return null if device ID is not available. - * - *

Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} - * - * @param telephonyManager The telephony manager instance to use for method calls. - * @param slotId of which deviceID is returned - */ - public static String getDeviceId(@Nullable TelephonyManager telephonyManager, int slotId) { - if (telephonyManager == null) { - return null; - } - if (CompatUtils.isMarshmallowCompatible() - || CompatUtils.isMethodAvailable(TELEPHONY_MANAGER_CLASS, "getDeviceId", Integer.class)) { - return telephonyManager.getDeviceId(slotId); - } - return null; + return telephonyManager.getPhoneCount(); } /** @@ -119,14 +72,7 @@ public class TelephonyManagerCompat { * @return {@code true} if the device supports TTY mode, and {@code false} otherwise. */ public static boolean isTtyModeSupported(@Nullable TelephonyManager telephonyManager) { - if (telephonyManager == null) { - return false; - } - if (CompatUtils.isMarshmallowCompatible() - || CompatUtils.isMethodAvailable(TELEPHONY_MANAGER_CLASS, "isTtyModeSupported")) { - return telephonyManager.isTtyModeSupported(); - } - return false; + return telephonyManager != null && telephonyManager.isTtyModeSupported(); } /** @@ -138,15 +84,7 @@ public class TelephonyManagerCompat { */ public static boolean isHearingAidCompatibilitySupported( @Nullable TelephonyManager telephonyManager) { - if (telephonyManager == null) { - return false; - } - if (CompatUtils.isMarshmallowCompatible() - || CompatUtils.isMethodAvailable( - TELEPHONY_MANAGER_CLASS, "isHearingAidCompatibilitySupported")) { - return telephonyManager.isHearingAidCompatibilitySupported(); - } - return false; + return telephonyManager != null && telephonyManager.isHearingAidCompatibilitySupported(); } /** @@ -228,6 +166,12 @@ public class TelephonyManagerCompat { public static void handleSecretCode(Context context, String secretCode) { // Must use system service on O+ to avoid using broadcasts, which are not allowed on O+. if (BuildCompat.isAtLeastO()) { + if (!TelecomUtil.isDefaultDialer(context)) { + LogUtil.e( + "TelephonyManagerCompat.handleSecretCode", + "not default dialer, cannot send special code"); + return; + } context.getSystemService(TelephonyManager.class).sendDialerSpecialCode(secretCode); } else { // System service call is not supported pre-O, so must use a broadcast for N-. diff --git a/java/com/android/contacts/common/compat/telecom/TelecomManagerCompat.java b/java/com/android/contacts/common/compat/telecom/TelecomManagerCompat.java index 5687f6fbf..8393b2601 100644 --- a/java/com/android/contacts/common/compat/telecom/TelecomManagerCompat.java +++ b/java/com/android/contacts/common/compat/telecom/TelecomManagerCompat.java @@ -15,273 +15,25 @@ */ package com.android.contacts.common.compat.telecom; -import android.app.Activity; -import android.content.Intent; -import android.net.Uri; import android.support.annotation.Nullable; -import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; import android.telecom.TelecomManager; -import android.telephony.PhoneNumberUtils; -import android.telephony.TelephonyManager; -import android.text.TextUtils; -import com.android.dialer.compat.CompatUtils; -import java.util.ArrayList; -import java.util.List; +import java.lang.reflect.Field; /** Compatibility class for {@link android.telecom.TelecomManager}. */ public class TelecomManagerCompat { - public static final String TELECOM_MANAGER_CLASS = "android.telecom.TelecomManager"; - // TODO: remove once this is available in android.telecom.Call // b/33779976 public static final String EXTRA_LAST_EMERGENCY_CALLBACK_TIME_MILLIS = "android.telecom.extra.LAST_EMERGENCY_CALLBACK_TIME_MILLIS"; - /** - * Places a new outgoing call to the provided address using the system telecom service with the - * specified intent. - * - * @param activity {@link Activity} used to start another activity for the given intent - * @param telecomManager the {@link TelecomManager} used to place a call, if possible - * @param intent the intent for the call - */ - public static void placeCall( - @Nullable Activity activity, - @Nullable TelecomManager telecomManager, - @Nullable Intent intent) { - if (activity == null || telecomManager == null || intent == null) { - return; - } - if (CompatUtils.isMarshmallowCompatible()) { - telecomManager.placeCall(intent.getData(), intent.getExtras()); - return; - } - activity.startActivityForResult(intent, 0); - } - - /** - * Get the URI for running an adn query. - * - * @param telecomManager the {@link TelecomManager} used for method calls, if possible. - * @param accountHandle The handle for the account to derive an adn query URI for or {@code null} - * to return a URI which will use the default account. - * @return The URI (with the content:// scheme) specific to the specified {@link PhoneAccount} for - * the the content retrieve. - */ - public static Uri getAdnUriForPhoneAccount( - @Nullable TelecomManager telecomManager, PhoneAccountHandle accountHandle) { - if (telecomManager != null - && (CompatUtils.isMarshmallowCompatible() - || CompatUtils.isMethodAvailable( - TELECOM_MANAGER_CLASS, "getAdnUriForPhoneAccount", PhoneAccountHandle.class))) { - return telecomManager.getAdnUriForPhoneAccount(accountHandle); - } - return Uri.parse("content://icc/adn"); - } - - /** - * Returns a list of {@link PhoneAccountHandle}s which can be used to make and receive phone - * calls. The returned list includes only those accounts which have been explicitly enabled by the - * user. - * - * @param telecomManager the {@link TelecomManager} used for method calls, if possible. - * @return A list of PhoneAccountHandle objects. - */ - public static List getCallCapablePhoneAccounts( - @Nullable TelecomManager telecomManager) { - if (telecomManager != null - && (CompatUtils.isMarshmallowCompatible() - || CompatUtils.isMethodAvailable( - TELECOM_MANAGER_CLASS, "getCallCapablePhoneAccounts"))) { - return telecomManager.getCallCapablePhoneAccounts(); - } - return new ArrayList<>(); - } - - /** - * Used to determine the currently selected default dialer package. - * - * @param telecomManager the {@link TelecomManager} used for method calls, if possible. - * @return package name for the default dialer package or null if no package has been selected as - * the default dialer. - */ - @Nullable - public static String getDefaultDialerPackage(@Nullable TelecomManager telecomManager) { - if (telecomManager != null && CompatUtils.isDefaultDialerCompatible()) { - return telecomManager.getDefaultDialerPackage(); - } - return null; - } - - /** - * Return the {@link PhoneAccount} which will be used to place outgoing calls to addresses with - * the specified {@code uriScheme}. This PhoneAccount will always be a member of the list which is - * returned from invoking {@link TelecomManager#getCallCapablePhoneAccounts()}. The specific - * account returned depends on the following priorities: - * - *

1. If the user-selected default PhoneAccount supports the specified scheme, it will be - * returned. 2. If there exists only one PhoneAccount that supports the specified scheme, it will - * be returned. - * - *

If no PhoneAccount fits the criteria above, this method will return {@code null}. - * - * @param telecomManager the {@link TelecomManager} used for method calls, if possible. - * @param uriScheme The URI scheme. - * @return The {@link PhoneAccountHandle} corresponding to the account to be used. - */ - @Nullable - public static PhoneAccountHandle getDefaultOutgoingPhoneAccount( - @Nullable TelecomManager telecomManager, @Nullable String uriScheme) { - if (telecomManager != null - && (CompatUtils.isMarshmallowCompatible() - || CompatUtils.isMethodAvailable( - TELECOM_MANAGER_CLASS, "getDefaultOutgoingPhoneAccount", String.class))) { - return telecomManager.getDefaultOutgoingPhoneAccount(uriScheme); - } - return null; - } - - /** - * Return the line 1 phone number for given phone account. - * - * @param telecomManager the {@link TelecomManager} to use in the event that {@link - * TelecomManager#getLine1Number(PhoneAccountHandle)} is available - * @param telephonyManager the {@link TelephonyManager} to use if TelecomManager#getLine1Number is - * unavailable - * @param phoneAccountHandle the phoneAccountHandle upon which to check the line one number - * @return the line one number - */ - @Nullable - public static String getLine1Number( - @Nullable TelecomManager telecomManager, - @Nullable TelephonyManager telephonyManager, - @Nullable PhoneAccountHandle phoneAccountHandle) { - if (telecomManager != null && CompatUtils.isMarshmallowCompatible()) { - return telecomManager.getLine1Number(phoneAccountHandle); - } - if (telephonyManager != null) { - return telephonyManager.getLine1Number(); - } - return null; - } - - /** - * Return whether a given phone number is the configured voicemail number for a particular phone - * account. - * - * @param telecomManager the {@link TelecomManager} to use for checking the number. - * @param accountHandle The handle for the account to check the voicemail number against - * @param number The number to look up. - */ - public static boolean isVoiceMailNumber( - @Nullable TelecomManager telecomManager, - @Nullable PhoneAccountHandle accountHandle, - @Nullable String number) { - if (telecomManager != null - && (CompatUtils.isMarshmallowCompatible() - || CompatUtils.isMethodAvailable( - TELECOM_MANAGER_CLASS, - "isVoiceMailNumber", - PhoneAccountHandle.class, - String.class))) { - return telecomManager.isVoiceMailNumber(accountHandle, number); - } - return PhoneNumberUtils.isVoiceMailNumber(number); - } - - /** - * Return the {@link PhoneAccount} for a specified {@link PhoneAccountHandle}. Object includes - * resources which can be used in a user interface. - * - * @param telecomManager the {@link TelecomManager} used for method calls, if possible. - * @param account The {@link PhoneAccountHandle}. - * @return The {@link PhoneAccount} object or null if it doesn't exist. - */ - @Nullable - public static PhoneAccount getPhoneAccount( - @Nullable TelecomManager telecomManager, @Nullable PhoneAccountHandle accountHandle) { - if (telecomManager != null - && (CompatUtils.isMethodAvailable( - TELECOM_MANAGER_CLASS, "getPhoneAccount", PhoneAccountHandle.class))) { - return telecomManager.getPhoneAccount(accountHandle); - } - return null; - } - - /** - * Return the voicemail number for a given phone account. - * - * @param telecomManager The {@link TelecomManager} object to use for retrieving the voicemail - * number if accountHandle is specified. - * @param telephonyManager The {@link TelephonyManager} object to use for retrieving the voicemail - * number if accountHandle is null. - * @param accountHandle The handle for the phone account. - * @return The voicemail number for the phone account, and {@code null} if one has not been - * configured. - */ - @Nullable - public static String getVoiceMailNumber( - @Nullable TelecomManager telecomManager, - @Nullable TelephonyManager telephonyManager, - @Nullable PhoneAccountHandle accountHandle) { - if (telecomManager != null - && (CompatUtils.isMethodAvailable( - TELECOM_MANAGER_CLASS, "getVoiceMailNumber", PhoneAccountHandle.class))) { - return telecomManager.getVoiceMailNumber(accountHandle); - } else if (telephonyManager != null) { - return telephonyManager.getVoiceMailNumber(); - } - return null; - } - - /** - * Processes the specified dial string as an MMI code. MMI codes are any sequence of characters - * entered into the dialpad that contain a "*" or "#". Some of these sequences launch special - * behavior through handled by Telephony. - * - * @param telecomManager The {@link TelecomManager} object to use for handling MMI. - * @param dialString The digits to dial. - * @return {@code true} if the digits were processed as an MMI code, {@code false} otherwise. - */ - public static boolean handleMmi( - @Nullable TelecomManager telecomManager, - @Nullable String dialString, - @Nullable PhoneAccountHandle accountHandle) { - if (telecomManager == null || TextUtils.isEmpty(dialString)) { - return false; - } - if (CompatUtils.isMarshmallowCompatible()) { - return telecomManager.handleMmi(dialString, accountHandle); - } - - Object handleMmiResult = - CompatUtils.invokeMethod( - telecomManager, - "handleMmi", - new Class[] {PhoneAccountHandle.class, String.class}, - new Object[] {accountHandle, dialString}); - if (handleMmiResult != null) { - return (boolean) handleMmiResult; - } - - return telecomManager.handleMmi(dialString); - } - - /** - * Silences the ringer if a ringing call exists. Noop if {@link TelecomManager#silenceRinger()} is - * unavailable. - * - * @param telecomManager the TelecomManager to use to silence the ringer. - */ - public static void silenceRinger(@Nullable TelecomManager telecomManager) { - if (telecomManager != null - && (CompatUtils.isMarshmallowCompatible() - || CompatUtils.isMethodAvailable(TELECOM_MANAGER_CLASS, "silenceRinger"))) { - telecomManager.silenceRinger(); - } - } + // Constants from http://cs/android/frameworks/base/telecomm/java/android/telecom/Call.java. + public static final String EVENT_REQUEST_HANDOVER = "android.telecom.event.REQUEST_HANDOVER"; + public static final String EXTRA_HANDOVER_PHONE_ACCOUNT_HANDLE = + "android.telecom.extra.HANDOVER_PHONE_ACCOUNT_HANDLE"; + public static final String EXTRA_HANDOVER_VIDEO_STATE = + "android.telecom.extra.HANDOVER_VIDEO_STATE"; /** * Returns the current SIM call manager. Apps must be prepared for this method to return null, @@ -292,11 +44,25 @@ public class TelecomManagerCompat { */ @Nullable public static PhoneAccountHandle getSimCallManager(TelecomManager telecomManager) { - if (telecomManager != null - && (CompatUtils.isMarshmallowCompatible() - || CompatUtils.isMethodAvailable(TELECOM_MANAGER_CLASS, "getSimCallManager"))) { + if (telecomManager != null) { return telecomManager.getSimCallManager(); } return null; } + + /** + * Handovers are supported from Android O-DR onward. Since there is no API bump from O to O-DR, we + * need to use reflection to check the existence of TelecomManager.EXTRA_IS_HANDOVER in + * http://cs/android/frameworks/base/telecomm/java/android/telecom/TelecomManager.java. + */ + public static boolean supportsHandover() { + // + try { + Field field = TelecomManager.class.getDeclaredField("EXTRA_IS_HANDOVER"); + return "android.telecom.extra.IS_HANDOVER".equals(field.get(null /* obj (static field) */)); + } catch (Exception e) { + // Do nothing + } + return false; + } } diff --git a/java/com/android/contacts/common/dialog/CallSubjectDialog.java b/java/com/android/contacts/common/dialog/CallSubjectDialog.java index 0e7937102..88fac0256 100644 --- a/java/com/android/contacts/common/dialog/CallSubjectDialog.java +++ b/java/com/android/contacts/common/dialog/CallSubjectDialog.java @@ -45,7 +45,7 @@ import android.widget.QuickContactBadge; import android.widget.TextView; import com.android.contacts.common.ContactPhotoManager; import com.android.contacts.common.R; -import com.android.contacts.common.compat.telecom.TelecomManagerCompat; +import com.android.contacts.common.lettertiles.LetterTileDrawable; import com.android.dialer.animation.AnimUtils; import com.android.dialer.callintent.CallInitiationType; import com.android.dialer.callintent.CallIntentBuilder; @@ -154,11 +154,7 @@ public class CallSubjectDialog extends Activity { .setCallSubject(subject) .build(); - TelecomManagerCompat.placeCall( - CallSubjectDialog.this, - (TelecomManager) getSystemService(Context.TELECOM_SERVICE), - intent); - + getSystemService(TelecomManager.class).placeCall(intent.getData(), intent.getExtras()); mSubjectHistory.add(subject); saveSubjectHistory(mSubjectHistory); finish(); @@ -202,7 +198,7 @@ public class CallSubjectDialog extends Activity { number /* number */, null /* displayNumber */, null /* numberLabel */, - ContactPhotoManager.TYPE_DEFAULT, + LetterTileDrawable.TYPE_DEFAULT, null /* phoneAccountHandle */); } @@ -356,7 +352,7 @@ public class CallSubjectDialog extends Activity { mNumber = arguments.getString(ARG_NUMBER); mDisplayNumber = arguments.getString(ARG_DISPLAY_NUMBER); mNumberLabel = arguments.getString(ARG_NUMBER_LABEL); - mContactType = arguments.getInt(ARG_CONTACT_TYPE, ContactPhotoManager.TYPE_DEFAULT); + mContactType = arguments.getInt(ARG_CONTACT_TYPE, LetterTileDrawable.TYPE_DEFAULT); mPhoneAccountHandle = arguments.getParcelable(ARG_PHONE_ACCOUNT_HANDLE); } diff --git a/java/com/android/contacts/common/extensions/PhoneDirectoryExtender.java b/java/com/android/contacts/common/extensions/PhoneDirectoryExtender.java index 2607ad19a..6c932daf5 100644 --- a/java/com/android/contacts/common/extensions/PhoneDirectoryExtender.java +++ b/java/com/android/contacts/common/extensions/PhoneDirectoryExtender.java @@ -15,14 +15,24 @@ package com.android.contacts.common.extensions; import android.content.Context; +import android.net.Uri; +import android.support.annotation.Nullable; import com.android.contacts.common.list.DirectoryPartition; import java.util.List; /** An interface for adding extended phone directories. */ public interface PhoneDirectoryExtender { + /** * Return a list of extended directories to add. May return null if no directories are to be * added. */ List getExtendedDirectories(Context context); + + /** returns true if the nearby places directory is enabled. */ + boolean isEnabled(Context context); + + /** Returns the content uri for nearby places. */ + @Nullable + Uri getContentUri(); } diff --git a/java/com/android/contacts/common/extensions/PhoneDirectoryExtenderAccessor.java b/java/com/android/contacts/common/extensions/PhoneDirectoryExtenderAccessor.java index 84649f1ed..7978831b0 100644 --- a/java/com/android/contacts/common/extensions/PhoneDirectoryExtenderAccessor.java +++ b/java/com/android/contacts/common/extensions/PhoneDirectoryExtenderAccessor.java @@ -16,6 +16,7 @@ package com.android.contacts.common.extensions; import android.content.Context; import android.support.annotation.NonNull; +import android.support.annotation.VisibleForTesting; import com.android.dialer.common.Assert; /** Accessor for the phone directory extender singleton. */ @@ -25,6 +26,11 @@ public final class PhoneDirectoryExtenderAccessor { private PhoneDirectoryExtenderAccessor() {} + @VisibleForTesting + public static void setForTesting(PhoneDirectoryExtender extender) { + instance = extender; + } + @NonNull public static PhoneDirectoryExtender get(@NonNull Context context) { Assert.isNotNull(context); diff --git a/java/com/android/contacts/common/extensions/PhoneDirectoryExtenderStub.java b/java/com/android/contacts/common/extensions/PhoneDirectoryExtenderStub.java index 95f971533..4c3d3d14d 100644 --- a/java/com/android/contacts/common/extensions/PhoneDirectoryExtenderStub.java +++ b/java/com/android/contacts/common/extensions/PhoneDirectoryExtenderStub.java @@ -15,6 +15,8 @@ package com.android.contacts.common.extensions; import android.content.Context; +import android.net.Uri; +import android.support.annotation.Nullable; import com.android.contacts.common.list.DirectoryPartition; import java.util.Collections; import java.util.List; @@ -26,4 +28,15 @@ class PhoneDirectoryExtenderStub implements PhoneDirectoryExtender { public List getExtendedDirectories(Context context) { return Collections.emptyList(); } + + @Override + public boolean isEnabled(Context context) { + return false; + } + + @Nullable + @Override + public Uri getContentUri() { + return null; + } } diff --git a/java/com/android/contacts/common/format/FormatUtils.java b/java/com/android/contacts/common/format/FormatUtils.java deleted file mode 100644 index 727c15b83..000000000 --- a/java/com/android/contacts/common/format/FormatUtils.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright (C) 2011 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. - */ -package com.android.contacts.common.format; - -import android.database.CharArrayBuffer; -import android.graphics.Typeface; -import android.support.annotation.VisibleForTesting; -import android.text.SpannableString; -import android.text.style.StyleSpan; -import java.util.Arrays; - -/** Assorted utility methods related to text formatting in Contacts. */ -public class FormatUtils { - - /** - * Finds the earliest point in buffer1 at which the first part of buffer2 matches. For example, - * overlapPoint("abcd", "cdef") == 2. - */ - public static int overlapPoint(CharArrayBuffer buffer1, CharArrayBuffer buffer2) { - if (buffer1 == null || buffer2 == null) { - return -1; - } - return overlapPoint( - Arrays.copyOfRange(buffer1.data, 0, buffer1.sizeCopied), - Arrays.copyOfRange(buffer2.data, 0, buffer2.sizeCopied)); - } - - /** - * Finds the earliest point in string1 at which the first part of string2 matches. For example, - * overlapPoint("abcd", "cdef") == 2. - */ - @VisibleForTesting - public static int overlapPoint(String string1, String string2) { - if (string1 == null || string2 == null) { - return -1; - } - return overlapPoint(string1.toCharArray(), string2.toCharArray()); - } - - /** - * Finds the earliest point in array1 at which the first part of array2 matches. For example, - * overlapPoint("abcd", "cdef") == 2. - */ - public static int overlapPoint(char[] array1, char[] array2) { - if (array1 == null || array2 == null) { - return -1; - } - int count1 = array1.length; - int count2 = array2.length; - - // Ignore matching tails of the two arrays. - while (count1 > 0 && count2 > 0 && array1[count1 - 1] == array2[count2 - 1]) { - count1--; - count2--; - } - - int size = count2; - for (int i = 0; i < count1; i++) { - if (i + size > count1) { - size = count1 - i; - } - int j; - for (j = 0; j < size; j++) { - if (array1[i + j] != array2[j]) { - break; - } - } - if (j == size) { - return i; - } - } - - return -1; - } - - /** - * Applies the given style to a range of the input CharSequence. - * - * @param style The style to apply (see the style constants in {@link Typeface}). - * @param input The CharSequence to style. - * @param start Starting index of the range to style (will be clamped to be a minimum of 0). - * @param end Ending index of the range to style (will be clamped to a maximum of the input - * length). - * @param flags Bitmask for configuring behavior of the span. See {@link android.text.Spanned}. - * @return The styled CharSequence. - */ - public static CharSequence applyStyleToSpan( - int style, CharSequence input, int start, int end, int flags) { - // Enforce bounds of the char sequence. - start = Math.max(0, start); - end = Math.min(input.length(), end); - SpannableString text = new SpannableString(input); - text.setSpan(new StyleSpan(style), start, end, flags); - return text; - } - - @VisibleForTesting - public static void copyToCharArrayBuffer(String text, CharArrayBuffer buffer) { - if (text != null) { - char[] data = buffer.data; - if (data == null || data.length < text.length()) { - buffer.data = text.toCharArray(); - } else { - text.getChars(0, text.length(), data, 0); - } - buffer.sizeCopied = text.length(); - } else { - buffer.sizeCopied = 0; - } - } - - /** Returns a String that represents the content of the given {@link CharArrayBuffer}. */ - @VisibleForTesting - public static String charArrayBufferToString(CharArrayBuffer buffer) { - return new String(buffer.data, 0, buffer.sizeCopied); - } - - /** - * Finds the index of the first word that starts with the given prefix. - * - *

If not found, returns -1. - * - * @param text the text in which to search for the prefix - * @param prefix the text to find, in upper case letters - */ - public static int indexOfWordPrefix(CharSequence text, String prefix) { - if (prefix == null || text == null) { - return -1; - } - - int textLength = text.length(); - int prefixLength = prefix.length(); - - if (prefixLength == 0 || textLength < prefixLength) { - return -1; - } - - int i = 0; - while (i < textLength) { - // Skip non-word characters - while (i < textLength && !Character.isLetterOrDigit(text.charAt(i))) { - i++; - } - - if (i + prefixLength > textLength) { - return -1; - } - - // Compare the prefixes - int j; - for (j = 0; j < prefixLength; j++) { - if (Character.toUpperCase(text.charAt(i + j)) != prefix.charAt(j)) { - break; - } - } - if (j == prefixLength) { - return i; - } - - // Skip this word - while (i < textLength && Character.isLetterOrDigit(text.charAt(i))) { - i++; - } - } - - return -1; - } -} diff --git a/java/com/android/contacts/common/format/TextHighlighter.java b/java/com/android/contacts/common/format/TextHighlighter.java index 30c03fdf3..f397f0429 100644 --- a/java/com/android/contacts/common/format/TextHighlighter.java +++ b/java/com/android/contacts/common/format/TextHighlighter.java @@ -24,8 +24,6 @@ import android.widget.TextView; /** Highlights the text in a text field. */ public class TextHighlighter { - private static final boolean DEBUG = false; - private final String TAG = TextHighlighter.class.getSimpleName(); private int mTextStyle; private CharacterStyle mTextStyleSpan; @@ -81,7 +79,7 @@ public class TextHighlighter { } final String trimmedPrefix = prefix.substring(prefixStart); - int index = FormatUtils.indexOfWordPrefix(text, trimmedPrefix); + int index = indexOfWordPrefix(text, trimmedPrefix); if (index != -1) { final SpannableString result = new SpannableString(text); result.setSpan(mTextStyleSpan, index, index + trimmedPrefix.length(), 0 /* flags */); @@ -90,4 +88,55 @@ public class TextHighlighter { return text; } } + + /** + * Finds the index of the first word that starts with the given prefix. + * + *

If not found, returns -1. + * + * @param text the text in which to search for the prefix + * @param prefix the text to find, in upper case letters + */ + public static int indexOfWordPrefix(CharSequence text, String prefix) { + if (prefix == null || text == null) { + return -1; + } + + int textLength = text.length(); + int prefixLength = prefix.length(); + + if (prefixLength == 0 || textLength < prefixLength) { + return -1; + } + + int i = 0; + while (i < textLength) { + // Skip non-word characters + while (i < textLength && !Character.isLetterOrDigit(text.charAt(i))) { + i++; + } + + if (i + prefixLength > textLength) { + return -1; + } + + // Compare the prefixes + int j; + for (j = 0; j < prefixLength; j++) { + if (Character.toUpperCase(text.charAt(i + j)) != prefix.charAt(j)) { + break; + } + } + if (j == prefixLength) { + return i; + } + + // Skip this word + while (i < textLength && Character.isLetterOrDigit(text.charAt(i))) { + i++; + } + } + + return -1; + } } diff --git a/java/com/android/contacts/common/format/testing/SpannedTestUtils.java b/java/com/android/contacts/common/format/testing/SpannedTestUtils.java deleted file mode 100644 index 293d9d5ad..000000000 --- a/java/com/android/contacts/common/format/testing/SpannedTestUtils.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (C) 2011 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. - */ - -package com.android.contacts.common.format.testing; - -import android.test.suitebuilder.annotation.SmallTest; -import android.text.Html; -import android.text.SpannableString; -import android.text.Spanned; -import android.text.TextUtils; -import android.text.style.StyleSpan; -import android.widget.TextView; -import junit.framework.Assert; - -/** Utility class to check the value of spanned text in text views. */ -@SmallTest -public class SpannedTestUtils { - - /** - * Checks that the text contained in the text view matches the given HTML text. - * - * @param expectedHtmlText the expected text to be in the text view - * @param textView the text view from which to get the text - */ - public static void checkHtmlText(String expectedHtmlText, TextView textView) { - String actualHtmlText = Html.toHtml((Spanned) textView.getText()); - if (TextUtils.isEmpty(expectedHtmlText)) { - // If the text is empty, it does not add the

bits to it. - Assert.assertEquals("", actualHtmlText); - } else { - Assert.assertEquals("

" + expectedHtmlText + "

\n", actualHtmlText); - } - } - - /** - * Assert span exists in the correct location. - * - * @param seq The spannable string to check. - * @param start The starting index. - * @param end The ending index. - */ - public static void assertPrefixSpan(CharSequence seq, int start, int end) { - Assert.assertTrue(seq instanceof Spanned); - Spanned spannable = (Spanned) seq; - - if (start > 0) { - Assert.assertEquals(0, getNumForegroundColorSpansBetween(spannable, 0, start - 1)); - } - Assert.assertEquals(1, getNumForegroundColorSpansBetween(spannable, start, end)); - Assert.assertEquals( - 0, getNumForegroundColorSpansBetween(spannable, end + 1, spannable.length() - 1)); - } - - private static int getNumForegroundColorSpansBetween(Spanned value, int start, int end) { - return value.getSpans(start, end, StyleSpan.class).length; - } - - /** - * Asserts that the given character sequence is not a Spanned object and text is correct. - * - * @param seq The sequence to check. - * @param expected The expected text. - */ - public static void assertNotSpanned(CharSequence seq, String expected) { - Assert.assertFalse(seq instanceof Spanned); - Assert.assertEquals(expected, seq); - } - - public static int getNextTransition(SpannableString seq, int start) { - return seq.nextSpanTransition(start, seq.length(), StyleSpan.class); - } -} diff --git a/java/com/android/contacts/common/lettertiles/LetterTileDrawable.java b/java/com/android/contacts/common/lettertiles/LetterTileDrawable.java index 88522c44b..5c401fe38 100644 --- a/java/com/android/contacts/common/lettertiles/LetterTileDrawable.java +++ b/java/com/android/contacts/common/lettertiles/LetterTileDrawable.java @@ -29,9 +29,12 @@ import android.graphics.Rect; import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.support.annotation.IntDef; +import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import android.telecom.TelecomManager; import android.text.TextUtils; import com.android.contacts.common.R; +import com.android.contacts.common.lettertiles.LetterTileDrawable.ContactType; import com.android.dialer.common.Assert; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -122,10 +125,16 @@ public class LetterTileDrawable extends Drawable { sLetterToTileRatio = res.getFraction(R.dimen.letter_to_tile_ratio, 1, 1); sDefaultPersonAvatar = res.getDrawable(R.drawable.product_logo_avatar_anonymous_white_color_120, null); + Assert.isNotNull(sDefaultPersonAvatar, "sDefaultPersonAvatar is null"); sDefaultBusinessAvatar = res.getDrawable(R.drawable.quantum_ic_business_vd_theme_24, null); + Assert.isNotNull(sDefaultBusinessAvatar, "sDefaultBusinessAvatar is null"); sDefaultVoicemailAvatar = res.getDrawable(R.drawable.quantum_ic_voicemail_vd_theme_24, null); + Assert.isNotNull(sDefaultVoicemailAvatar, "sDefaultVoicemailAvatar is null"); sDefaultSpamAvatar = res.getDrawable(R.drawable.quantum_ic_report_vd_theme_24, null); + Assert.isNotNull(sDefaultSpamAvatar, "sDefaultSpamAvatar is null"); sDefaultConferenceAvatar = res.getDrawable(R.drawable.quantum_ic_group_vd_theme_24, null); + Assert.isNotNull(sDefaultConferenceAvatar, "sDefaultConferenceAvatar is null"); + sPaint.setTypeface( Typeface.create(res.getString(R.string.letter_tile_letter_font_family), Typeface.NORMAL)); sPaint.setTextAlign(Align.CENTER); @@ -178,7 +187,7 @@ public class LetterTileDrawable extends Drawable { } @Override - public void draw(final Canvas canvas) { + public void draw(@NonNull final Canvas canvas) { final Rect bounds = getBounds(); if (!isVisible() || bounds.isEmpty()) { return; @@ -233,6 +242,11 @@ public class LetterTileDrawable extends Drawable { } else { // Draw the default image if there is no letter/digit to be drawn Drawable drawable = getDrawableForContactType(mContactType); + if (drawable == null) { + throw Assert.createIllegalStateFailException( + "Unable to find drawable for contact type " + mContactType); + } + drawable.setBounds(getScaledBounds(mScale, mOffset)); drawable.setAlpha(drawable == sDefaultSpamAvatar ? SPAM_ALPHA : ALPHA); drawable.draw(canvas); @@ -406,4 +420,30 @@ public class LetterTileDrawable extends Drawable { } return this; } + + /** + * Returns the appropriate LetterTileDrawable.TYPE_ based on the given primitive conditions. + * + *

If no special state is detected, yields TYPE_DEFAULT + */ + public static @ContactType int getContactTypeFromPrimitives( + boolean isVoicemailNumber, + boolean isSpam, + boolean isBusiness, + int numberPresentation, + boolean isConference) { + if (isVoicemailNumber) { + return LetterTileDrawable.TYPE_VOICEMAIL; + } else if (isSpam) { + return LetterTileDrawable.TYPE_SPAM; + } else if (isBusiness) { + return LetterTileDrawable.TYPE_BUSINESS; + } else if (numberPresentation == TelecomManager.PRESENTATION_RESTRICTED) { + return LetterTileDrawable.TYPE_GENERIC_AVATAR; + } else if (isConference) { + return LetterTileDrawable.TYPE_CONFERENCE; + } else { + return LetterTileDrawable.TYPE_DEFAULT; + } + } } diff --git a/java/com/android/contacts/common/list/ContactEntryListAdapter.java b/java/com/android/contacts/common/list/ContactEntryListAdapter.java index 18bbae382..7335297e0 100644 --- a/java/com/android/contacts/common/list/ContactEntryListAdapter.java +++ b/java/com/android/contacts/common/list/ContactEntryListAdapter.java @@ -26,7 +26,6 @@ import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.Directory; import android.text.TextUtils; -import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -39,7 +38,11 @@ import com.android.contacts.common.ContactsUtils; import com.android.contacts.common.R; import com.android.contacts.common.compat.DirectoryCompat; import com.android.contacts.common.util.SearchUtil; +import com.android.dialer.common.LogUtil; import com.android.dialer.compat.CompatUtils; +import com.android.dialer.configprovider.ConfigProviderBindings; +import com.android.dialer.logging.InteractionEvent; +import com.android.dialer.logging.Logger; import java.util.HashSet; /** @@ -53,7 +56,6 @@ public abstract class ContactEntryListAdapter extends IndexerListAdapter { */ public static final boolean LOCAL_INVISIBLE_DIRECTORY_ENABLED = false; - private static final String TAG = "ContactEntryListAdapter"; private int mDisplayOrder; private int mSortOrder; @@ -80,6 +82,8 @@ public abstract class ContactEntryListAdapter extends IndexerListAdapter { private ContactListFilter mFilter; private boolean mDarkTheme = false; + public static final int SUGGESTIONS_LOADER_ID = 0; + /** Resource used to provide header-text for default filter. */ private CharSequence mDefaultFilterHeaderText; @@ -128,9 +132,22 @@ public abstract class ContactEntryListAdapter extends IndexerListAdapter { } protected void addPartitions() { + if (ConfigProviderBindings.get(getContext()).getBoolean("p13n_ranker_should_enable", false)) { + addPartition(createSuggestionsDirectoryPartition()); + } addPartition(createDefaultDirectoryPartition()); } + protected DirectoryPartition createSuggestionsDirectoryPartition() { + DirectoryPartition partition = new DirectoryPartition(true, true); + partition.setDirectoryId(SUGGESTIONS_LOADER_ID); + partition.setDirectoryType(getContext().getString(R.string.contact_suggestions)); + partition.setPriorityDirectory(true); + partition.setPhotoSupported(true); + partition.setLabel(getContext().getString(R.string.local_suggestions_search_label)); + return partition; + } + protected DirectoryPartition createDefaultDirectoryPartition() { DirectoryPartition partition = new DirectoryPartition(true, true); partition.setDirectoryId(Directory.DEFAULT); @@ -243,6 +260,11 @@ public abstract class ContactEntryListAdapter extends IndexerListAdapter { } else { mUpperCaseQueryString = SearchUtil.cleanStartAndEndOfSearchQuery(queryString.toUpperCase()); } + + // Enable default partition header if in search mode (including zero-suggest). + if (mQueryString != null) { + setDefaultPartitionHeader(true); + } } public String getUpperCaseQueryString() { @@ -354,9 +376,9 @@ public abstract class ContactEntryListAdapter extends IndexerListAdapter { if (cursor.getCount() == 0) { // Directory table must have at least local directory, without which this adapter will // enter very weird state. - Log.e( - TAG, - "Directory search loader returned an empty cursor, which implies we have " + LogUtil.i( + "ContactEntryListAdapter.changeDirectories", + "directory search loader returned an empty cursor, which implies we have " + "no directory entries.", new RuntimeException()); return; @@ -529,22 +551,27 @@ public abstract class ContactEntryListAdapter extends IndexerListAdapter { return false; } - /** Changes visibility parameters for the default directory partition. */ - public void configureDefaultPartition(boolean showIfEmpty, boolean hasHeader) { + /** Configures visibility parameters for the directory partitions. */ + public void configurePartitionsVisibility(boolean isInSearchMode) { + for (int i = 0; i < getPartitionCount(); i++) { + setShowIfEmpty(i, false); + setHasHeader(i, isInSearchMode); + } + } + + // Sets header for the default partition. + private void setDefaultPartitionHeader(boolean setHeader) { + // Iterate in reverse here to ensure the first DEFAULT directory has header. + // Both "Suggestions" and "All Contacts" directories have DEFAULT id. int defaultPartitionIndex = -1; - int count = getPartitionCount(); - for (int i = 0; i < count; i++) { + for (int i = getPartitionCount() - 1; i >= 0; i--) { Partition partition = getPartition(i); if (partition instanceof DirectoryPartition && ((DirectoryPartition) partition).getDirectoryId() == Directory.DEFAULT) { defaultPartitionIndex = i; - break; } } - if (defaultPartitionIndex != -1) { - setShowIfEmpty(defaultPartitionIndex, showIfEmpty); - setHasHeader(defaultPartitionIndex, hasHeader); - } + setHasHeader(defaultPartitionIndex, setHeader); } @Override @@ -678,6 +705,9 @@ public abstract class ContactEntryListAdapter extends IndexerListAdapter { // mimetype here is reasonable. quickContact.setPrioritizedMimeType(Phone.CONTENT_ITEM_TYPE); } + Logger.get(mContext) + .logQuickContactOnTouch( + quickContact, InteractionEvent.Type.OPEN_QUICK_CONTACT_FROM_SEARCH, true); if (photoId != 0 || photoUriColumn == -1) { getPhotoLoader().loadThumbnail(quickContact, photoId, mDarkTheme, mCircularPhotos, null); diff --git a/java/com/android/contacts/common/list/ContactEntryListFragment.java b/java/com/android/contacts/common/list/ContactEntryListFragment.java index 278175c0b..04658be89 100644 --- a/java/com/android/contacts/common/list/ContactEntryListFragment.java +++ b/java/com/android/contacts/common/list/ContactEntryListFragment.java @@ -47,6 +47,7 @@ import com.android.contacts.common.ContactPhotoManager; import com.android.contacts.common.preference.ContactsPreferences; import com.android.contacts.common.util.ContactListViewUtils; import com.android.dialer.common.LogUtil; +import com.android.dialer.performancereport.PerformanceReport; import java.lang.ref.WeakReference; import java.util.Locale; @@ -440,6 +441,11 @@ public abstract class ContactEntryListFragment 0) { + return; + } + mAdapter.changeCursor(partitionIndex, data); setProfileHeader(); @@ -555,7 +561,6 @@ public abstract class ContactEntryListFragment(); - mNumberHighlightSequence = new ArrayList<>(); - } - - public ContactListItemView( - Context context, - AttributeSet attrs, - boolean supportVideoCallIcon, - boolean supportCallAndShare) { + public ContactListItemView(Context context, AttributeSet attrs, boolean supportVideoCallIcon) { this(context, attrs); mSupportVideoCall = supportVideoCallIcon; - mSupportCallAndShare = supportCallAndShare; } public ContactListItemView(Context context, AttributeSet attrs) { @@ -284,19 +273,20 @@ public class ContactListItemView extends ViewGroup implements SelectionBoundsAdj mNameHighlightSequence = new ArrayList<>(); mNumberHighlightSequence = new ArrayList<>(); + mCallToActionView = new ImageView(getContext()); + mCallToActionView.setId(R.id.call_to_action); + mCallToActionView.setLayoutParams(new LayoutParams(mCallToActionSize, mCallToActionSize)); + mCallToActionView.setScaleType(ScaleType.CENTER); + mCallToActionView.setImageTintList( + ContextCompat.getColorStateList(getContext(), R.color.search_video_call_icon_tint)); + addView(mCallToActionView); + setLayoutDirection(View.LAYOUT_DIRECTION_LOCALE); } - public static PhotoPosition getDefaultPhotoPosition(boolean opposite) { - final Locale locale = Locale.getDefault(); - final int layoutDirection = TextUtils.getLayoutDirectionFromLocale(locale); - switch (layoutDirection) { - case View.LAYOUT_DIRECTION_RTL: - return (opposite ? PhotoPosition.LEFT : PhotoPosition.RIGHT); - case View.LAYOUT_DIRECTION_LTR: - default: - return (opposite ? PhotoPosition.RIGHT : PhotoPosition.LEFT); - } + public static PhotoPosition getDefaultPhotoPosition() { + int layoutDirection = TextUtils.getLayoutDirectionFromLocale(Locale.getDefault()); + return layoutDirection == View.LAYOUT_DIRECTION_RTL ? PhotoPosition.RIGHT : PhotoPosition.LEFT; } /** @@ -333,35 +323,47 @@ public class ContactListItemView extends ViewGroup implements SelectionBoundsAdj * @param position The position in the adapter of the call to action. */ public void setCallToAction(@CallToAction int action, Listener listener, int position) { - int drawable; + mCallToAction = action; + mPosition = position; + + Drawable drawable; int description; OnClickListener onClickListener; - if (action == CALL_AND_SHARE && mSupportCallAndShare) { - drawable = R.drawable.ic_call_and_share; - description = R.string.description_search_video_call; + if (action == CALL_AND_SHARE) { + drawable = ContextCompat.getDrawable(getContext(), R.drawable.ic_phone_attach); + drawable.setAutoMirrored(true); + description = R.string.description_search_call_and_share; onClickListener = v -> listener.onCallAndShareIconClicked(position); } else if (action == VIDEO && mSupportVideoCall) { - drawable = R.drawable.ic_search_video_call; - description = R.string.description_search_call_and_share; + drawable = + ContextCompat.getDrawable(getContext(), R.drawable.quantum_ic_videocam_vd_theme_24); + drawable.setAutoMirrored(true); + description = R.string.description_search_video_call; onClickListener = v -> listener.onVideoCallIconClicked(position); + } else if (action == LIGHTBRINGER) { + drawable = + ContextCompat.getDrawable(getContext(), R.drawable.quantum_ic_videocam_vd_theme_24); + drawable.setAutoMirrored(true); + description = R.string.description_search_video_call; + onClickListener = v -> listener.onLightbringerIconClicked(position); } else { - if (mCallToAction != null) { - mCallToAction.setVisibility(View.GONE); - mCallToAction.setOnClickListener(null); - } + mCallToActionView.setVisibility(View.GONE); + mCallToActionView.setOnClickListener(null); return; } - if (mCallToAction == null) { - mCallToAction = new ImageView(getContext()); - mCallToAction.setLayoutParams(new LayoutParams(mCallToActionSize, mCallToActionSize)); - mCallToAction.setScaleType(ScaleType.CENTER); - addView(mCallToAction); - } - mCallToAction.setContentDescription(getContext().getString(description)); - mCallToAction.setOnClickListener(onClickListener); - mCallToAction.setImageResource(drawable); - mCallToAction.setVisibility(View.VISIBLE); + mCallToActionView.setContentDescription(getContext().getString(description)); + mCallToActionView.setOnClickListener(onClickListener); + mCallToActionView.setImageDrawable(drawable); + mCallToActionView.setVisibility(View.VISIBLE); + } + + public @CallToAction int getCallToAction() { + return mCallToAction; + } + + public int getPosition() { + return mPosition; } /** @@ -376,18 +378,6 @@ public class ContactListItemView extends ViewGroup implements SelectionBoundsAdj mSupportVideoCall = supportVideoCall; } - /** - * Sets whether the view supports a call and share icon. This is independent of whether the view - * is actually showing an icon. Support for the icon ensures that the layout leaves space for it, - * should it be shown. - * - * @param supportCallAndShare {@code true} if the call and share icon is supported, {@code false} - * otherwise. - */ - public void setSupportCallAndShareIcon(boolean supportCallAndShare) { - mSupportCallAndShare = supportCallAndShare; - } - @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { // We will match parent's width and wrap content vertically, but make sure @@ -423,9 +413,7 @@ public class ContactListItemView extends ViewGroup implements SelectionBoundsAdj effectiveWidth -= mHeaderWidth + mGapBetweenImageAndText; } - if (mSupportVideoCall || mSupportCallAndShare) { - effectiveWidth -= (mCallToActionSize + mCallToActionMargin); - } + effectiveWidth -= (mCallToActionSize + mCallToActionMargin); // Go over all visible text views and measure actual width of each of them. // Also calculate their heights to get the total height for this entire view. @@ -496,11 +484,9 @@ public class ContactListItemView extends ViewGroup implements SelectionBoundsAdj mStatusTextViewHeight = mPresenceIcon.getMeasuredHeight(); } - if ((mSupportVideoCall || mSupportCallAndShare) && isVisible(mCallToAction)) { - mCallToAction.measure( - MeasureSpec.makeMeasureSpec(mCallToActionSize, MeasureSpec.EXACTLY), - MeasureSpec.makeMeasureSpec(mCallToActionSize, MeasureSpec.EXACTLY)); - } + mCallToActionView.measure( + MeasureSpec.makeMeasureSpec(mCallToActionSize, MeasureSpec.EXACTLY), + MeasureSpec.makeMeasureSpec(mCallToActionSize, MeasureSpec.EXACTLY)); if (isVisible(mWorkProfileIcon)) { mWorkProfileIcon.measure( @@ -629,34 +615,30 @@ public class ContactListItemView extends ViewGroup implements SelectionBoundsAdj leftBound += mTextIndent; } - if (mSupportVideoCall || mSupportCallAndShare) { - // Place the call to action at the end of the list (e.g. take into account RTL mode). - if (isVisible(mCallToAction)) { - // Center the icon vertically - final int callToActionTop = topBound + (height - topBound - mCallToActionSize) / 2; + // Place the call to action at the end of the list (e.g. take into account RTL mode). + // Center the icon vertically + final int callToActionTop = topBound + (height - topBound - mCallToActionSize) / 2; - if (!isLayoutRtl) { - // When photo is on left, icon is placed on the right edge. - mCallToAction.layout( - rightBound - mCallToActionSize, - callToActionTop, - rightBound, - callToActionTop + mCallToActionSize); - } else { - // When photo is on right, icon is placed on the left edge. - mCallToAction.layout( - leftBound, - callToActionTop, - leftBound + mCallToActionSize, - callToActionTop + mCallToActionSize); - } - } + if (!isLayoutRtl) { + // When photo is on left, icon is placed on the right edge. + mCallToActionView.layout( + rightBound - mCallToActionSize, + callToActionTop, + rightBound, + callToActionTop + mCallToActionSize); + } else { + // When photo is on right, icon is placed on the left edge. + mCallToActionView.layout( + leftBound, + callToActionTop, + leftBound + mCallToActionSize, + callToActionTop + mCallToActionSize); + } - if (mPhotoPosition == PhotoPosition.LEFT) { - rightBound -= (mCallToActionSize + mCallToActionMargin); - } else { - leftBound += mCallToActionSize + mCallToActionMargin; - } + if (mPhotoPosition == PhotoPosition.LEFT) { + rightBound -= (mCallToActionSize + mCallToActionMargin); + } else { + leftBound += mCallToActionSize + mCallToActionMargin; } // Center text vertically, then apply the top offset. @@ -901,9 +883,7 @@ public class ContactListItemView extends ViewGroup implements SelectionBoundsAdj } if (mQuickContact == null) { mQuickContact = new QuickContactBadge(getContext()); - if (CompatUtils.isLollipopCompatible()) { - mQuickContact.setOverlay(null); - } + mQuickContact.setOverlay(null); mQuickContact.setLayoutParams(getDefaultPhotoLayoutParams()); if (mNameTextView != null) { mQuickContact.setContentDescription( @@ -1008,9 +988,7 @@ public class ContactListItemView extends ViewGroup implements SelectionBoundsAdj mNameTextView.setGravity(Gravity.CENTER_VERTICAL); mNameTextView.setTextAlignment(View.TEXT_ALIGNMENT_VIEW_START); mNameTextView.setId(R.id.cliv_name_textview); - if (CompatUtils.isLollipopCompatible()) { - mNameTextView.setElegantTextHeight(false); - } + mNameTextView.setElegantTextHeight(false); addView(mNameTextView); } return mNameTextView; @@ -1056,6 +1034,7 @@ public class ContactListItemView extends ViewGroup implements SelectionBoundsAdj * exists. */ public void setPhoneNumber(String text) { + mPhoneNumber = text; if (text == null) { if (mDataView != null) { mDataView.setVisibility(View.GONE); @@ -1086,6 +1065,10 @@ public class ContactListItemView extends ViewGroup implements SelectionBoundsAdj } } + public String getPhoneNumber() { + return mPhoneNumber; + } + private void setMarqueeText(TextView textView, CharSequence text) { if (getTextEllipsis() == TruncateAt.MARQUEE) { // To show MARQUEE correctly (with END effect during non-active state), we need @@ -1109,9 +1092,7 @@ public class ContactListItemView extends ViewGroup implements SelectionBoundsAdj mDataView.setTextAlignment(View.TEXT_ALIGNMENT_VIEW_START); mDataView.setActivated(isActivated()); mDataView.setId(R.id.cliv_data_view); - if (CompatUtils.isLollipopCompatible()) { - mDataView.setElegantTextHeight(false); - } + mDataView.setElegantTextHeight(false); addView(mDataView); } return mDataView; @@ -1469,28 +1450,17 @@ public class ContactListItemView extends ViewGroup implements SelectionBoundsAdj forceLayout(); } - public void setPhotoPosition(PhotoPosition photoPosition) { - mPhotoPosition = photoPosition; - } - /** * Set drawable resources directly for the drawable resource of the photo view. * - * @param drawableId Id of drawable resource. + * @param drawable A drawable resource. */ - public void setDrawableResource(int drawableId) { + public void setDrawable(Drawable drawable) { ImageView photo = getPhotoView(); photo.setScaleType(ImageView.ScaleType.CENTER); - final Drawable drawable = ContextCompat.getDrawable(getContext(), drawableId); - final int iconColor = ContextCompat.getColor(getContext(), R.color.search_shortcut_icon_color); - if (CompatUtils.isLollipopCompatible()) { - photo.setImageDrawable(drawable); - photo.setImageTintList(ColorStateList.valueOf(iconColor)); - } else { - final Drawable drawableWrapper = DrawableCompat.wrap(drawable).mutate(); - DrawableCompat.setTint(drawableWrapper, iconColor); - photo.setImageDrawable(drawableWrapper); - } + int iconColor = ContextCompat.getColor(getContext(), R.color.search_shortcut_icon_color); + photo.setImageDrawable(drawable); + photo.setImageTintList(ColorStateList.valueOf(iconColor)); } @Override diff --git a/java/com/android/contacts/common/list/ContactTileView.java b/java/com/android/contacts/common/list/ContactTileView.java index 9273b0583..15582d684 100644 --- a/java/com/android/contacts/common/list/ContactTileView.java +++ b/java/com/android/contacts/common/list/ContactTileView.java @@ -19,7 +19,6 @@ import android.content.Context; import android.graphics.Rect; import android.net.Uri; import android.util.AttributeSet; -import android.util.Log; import android.view.View; import android.widget.FrameLayout; import android.widget.ImageView; @@ -28,6 +27,9 @@ import com.android.contacts.common.ContactPhotoManager; import com.android.contacts.common.ContactPhotoManager.DefaultImageRequest; import com.android.contacts.common.MoreContactUtils; import com.android.contacts.common.R; +import com.android.dialer.callintent.CallInitiationType; +import com.android.dialer.callintent.CallSpecificAppData; +import com.android.dialer.common.LogUtil; /** A ContactTile displays a contact's picture and name */ public abstract class ContactTileView extends FrameLayout { @@ -60,8 +62,14 @@ public abstract class ContactTileView extends FrameLayout { if (mListener == null) { return; } + CallSpecificAppData callSpecificAppData = + CallSpecificAppData.newBuilder() + .setCallInitiationType(CallInitiationType.Type.SPEED_DIAL) + .build(); mListener.onContactSelected( - getLookupUri(), MoreContactUtils.getTargetRectFromView(ContactTileView.this)); + getLookupUri(), + MoreContactUtils.getTargetRectFromView(ContactTileView.this), + callSpecificAppData); } }; } @@ -97,7 +105,7 @@ public abstract class ContactTileView extends FrameLayout { } } else { - Log.w(TAG, "contactPhotoManager not set"); + LogUtil.w(TAG, "contactPhotoManager not set"); } } else { setVisibility(View.INVISIBLE); @@ -163,9 +171,10 @@ public abstract class ContactTileView extends FrameLayout { public interface Listener { /** Notification that the contact was selected; no specific action is dictated. */ - void onContactSelected(Uri contactLookupUri, Rect viewRect); + void onContactSelected( + Uri contactLookupUri, Rect viewRect, CallSpecificAppData callSpecificAppData); /** Notification that the specified number is to be called. */ - void onCallNumberDirectly(String phoneNumber); + void onCallNumberDirectly(String phoneNumber, CallSpecificAppData callSpecificAppData); } } diff --git a/java/com/android/contacts/common/list/PhoneNumberListAdapter.java b/java/com/android/contacts/common/list/PhoneNumberListAdapter.java index 9a490d78a..d1118c3c7 100644 --- a/java/com/android/contacts/common/list/PhoneNumberListAdapter.java +++ b/java/com/android/contacts/common/list/PhoneNumberListAdapter.java @@ -30,7 +30,6 @@ import android.provider.ContactsContract.Directory; import android.text.TextUtils; import android.view.View; import android.view.ViewGroup; -import com.android.contacts.common.ContactPhotoManager; import com.android.contacts.common.ContactPhotoManager.DefaultImageRequest; import com.android.contacts.common.ContactsUtils; import com.android.contacts.common.R; @@ -38,15 +37,17 @@ import com.android.contacts.common.compat.CallableCompat; import com.android.contacts.common.compat.DirectoryCompat; import com.android.contacts.common.compat.PhoneCompat; import com.android.contacts.common.extensions.PhoneDirectoryExtenderAccessor; +import com.android.contacts.common.lettertiles.LetterTileDrawable; import com.android.contacts.common.list.ContactListItemView.CallToAction; import com.android.contacts.common.preference.ContactsPreferences; import com.android.contacts.common.util.Constants; -import com.android.dialer.callcomposer.CallComposerContact; import com.android.dialer.common.LogUtil; import com.android.dialer.compat.CompatUtils; +import com.android.dialer.dialercontact.DialerContact; import com.android.dialer.enrichedcall.EnrichedCallCapabilities; import com.android.dialer.enrichedcall.EnrichedCallComponent; import com.android.dialer.enrichedcall.EnrichedCallManager; +import com.android.dialer.lightbringer.LightbringerComponent; import com.android.dialer.location.GeoUtil; import com.android.dialer.util.CallUtil; import java.util.ArrayList; @@ -68,16 +69,14 @@ public class PhoneNumberListAdapter extends ContactEntryListAdapter { // A list of extended directories to add to the directories from the database private final List mExtendedDirectories; private final CharSequence mUnknownNameText; - private final boolean mCallAndShareEnabled; + protected final boolean mIsImsVideoEnabled; + // Extended directories will have ID's that are higher than any of the id's from the database, // so that we can identify them and set them up properly. If no extended directories // exist, this will be Long.MAX_VALUE private long mFirstExtendedDirectoryId = Long.MAX_VALUE; - private ContactListItemView.PhotoPosition mPhotoPosition; private boolean mUseCallableUri; private Listener mListener; - private boolean mIsVideoEnabled; - private boolean mIsPresenceEnabled; public PhoneNumberListAdapter(Context context) { super(context); @@ -88,11 +87,9 @@ public class PhoneNumberListAdapter extends ContactEntryListAdapter { PhoneDirectoryExtenderAccessor.get(mContext).getExtendedDirectories(mContext); int videoCapabilities = CallUtil.getVideoCallingAvailability(context); - mIsVideoEnabled = (videoCapabilities & CallUtil.VIDEO_CALLING_ENABLED) != 0; - mIsPresenceEnabled = (videoCapabilities & CallUtil.VIDEO_CALLING_PRESENCE) != 0; - - // TODO - mCallAndShareEnabled = true; + mIsImsVideoEnabled = + CallUtil.isVideoEnabled(context) + && (videoCapabilities & CallUtil.VIDEO_CALLING_PRESENCE) != 0; } @Override @@ -249,10 +246,10 @@ public class PhoneNumberListAdapter extends ContactEntryListAdapter { return item != null ? item.getString(PhoneQuery.LOOKUP_KEY) : null; } - public CallComposerContact getCallComposerContact(int position) { + public DialerContact getDialerContact(int position) { Cursor cursor = (Cursor) getItem(position); if (cursor == null) { - LogUtil.e("PhoneNumberListAdapter.getCallComposerContact", "cursor was null."); + LogUtil.e("PhoneNumberListAdapter.getDialerContact", "cursor was null."); return null; } @@ -263,11 +260,11 @@ public class PhoneNumberListAdapter extends ContactEntryListAdapter { Contacts.getLookupUri( cursor.getLong(PhoneQuery.CONTACT_ID), cursor.getString(PhoneQuery.LOOKUP_KEY)); - CallComposerContact.Builder contact = CallComposerContact.newBuilder(); + DialerContact.Builder contact = DialerContact.newBuilder(); contact .setNumber(number) .setPhotoId(cursor.getLong(PhoneQuery.PHOTO_ID)) - .setContactType(ContactPhotoManager.TYPE_DEFAULT) + .setContactType(LetterTileDrawable.TYPE_DEFAULT) .setNameOrNumber(displayName) .setNumberLabel( Phone.getTypeLabel( @@ -297,7 +294,6 @@ public class PhoneNumberListAdapter extends ContactEntryListAdapter { ContactListItemView view = super.newView(context, partition, cursor, position, parent); view.setUnknownNameText(mUnknownNameText); view.setQuickContactEnabled(isQuickContactEnabled()); - view.setPhotoPosition(mPhotoPosition); return view; } @@ -355,14 +351,8 @@ public class PhoneNumberListAdapter extends ContactEntryListAdapter { } final DirectoryPartition directory = (DirectoryPartition) getPartition(partition); - - // If the first partition does not have a header, then all subsequent partitions' - // getPositionForPartition returns an index off by 1. - int partitionOffset = 0; - if (partition > 0 && !getPartition(0).getHasHeader()) { - partitionOffset = 1; - } - position += getPositionForPartition(partition) + partitionOffset; + // All sections have headers, so scroll position is off by 1. + position += getPositionForPartition(partition) + 1; bindPhoneNumber(view, cursor, directory.isDisplayNumber(), position); } @@ -401,13 +391,17 @@ public class PhoneNumberListAdapter extends ContactEntryListAdapter { int carrierPresence = cursor.getInt(PhoneQuery.CARRIER_PRESENCE); boolean isPresent = (carrierPresence & Phone.CARRIER_PRESENCE_VT_CAPABLE) != 0; - boolean isVideoIconShown = mIsVideoEnabled && (!mIsPresenceEnabled || isPresent); - if (isVideoIconShown) { + boolean showViewIcon = mIsImsVideoEnabled && isPresent; + if (showViewIcon) { action = ContactListItemView.VIDEO; } } - if (isCallAndShareEnabled() && action == ContactListItemView.NONE && number != null) { + if (LightbringerComponent.get(mContext).getLightbringer().isReachable(mContext, number)) { + action = ContactListItemView.LIGHTBRINGER; + } + + if (action == ContactListItemView.NONE) { EnrichedCallManager manager = EnrichedCallComponent.get(mContext).getEnrichedCallManager(); EnrichedCallCapabilities capabilities = manager.getCapabilities(number); if (capabilities != null && capabilities.supportsCallComposer()) { @@ -481,14 +475,6 @@ public class PhoneNumberListAdapter extends ContactEntryListAdapter { } } - public ContactListItemView.PhotoPosition getPhotoPosition() { - return mPhotoPosition; - } - - public void setPhotoPosition(ContactListItemView.PhotoPosition photoPosition) { - mPhotoPosition = photoPosition; - } - public void setUseCallableUri(boolean useCallableUri) { mUseCallableUri = useCallableUri; } @@ -570,14 +556,12 @@ public class PhoneNumberListAdapter extends ContactEntryListAdapter { mListener = listener; } - public boolean isCallAndShareEnabled() { - return mCallAndShareEnabled; - } - public interface Listener { void onVideoCallIconClicked(int position); + void onLightbringerIconClicked(int position); + void onCallAndShareIconClicked(int position); } @@ -642,18 +626,14 @@ public class PhoneNumberListAdapter extends ContactEntryListAdapter { static { final List projectionList = new ArrayList<>(Arrays.asList(PROJECTION_PRIMARY_INTERNAL)); - if (CompatUtils.isMarshmallowCompatible()) { - projectionList.add(Phone.CARRIER_PRESENCE); // 9 - } + projectionList.add(Phone.CARRIER_PRESENCE); // 9 PROJECTION_PRIMARY = projectionList.toArray(new String[projectionList.size()]); } static { final List projectionList = new ArrayList<>(Arrays.asList(PROJECTION_ALTERNATIVE_INTERNAL)); - if (CompatUtils.isMarshmallowCompatible()) { - projectionList.add(Phone.CARRIER_PRESENCE); // 9 - } + projectionList.add(Phone.CARRIER_PRESENCE); // 9 PROJECTION_ALTERNATIVE = projectionList.toArray(new String[projectionList.size()]); } } diff --git a/java/com/android/contacts/common/list/PhoneNumberPickerFragment.java b/java/com/android/contacts/common/list/PhoneNumberPickerFragment.java index 8f25f82a5..de7903e83 100644 --- a/java/com/android/contacts/common/list/PhoneNumberPickerFragment.java +++ b/java/com/android/contacts/common/list/PhoneNumberPickerFragment.java @@ -29,16 +29,20 @@ import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import com.android.contacts.common.R; +import com.android.contacts.common.list.PhoneNumberListAdapter.Listener; import com.android.contacts.common.util.AccountFilterUtil; -import com.android.dialer.callcomposer.CallComposerContact; import com.android.dialer.callintent.CallInitiationType; import com.android.dialer.callintent.CallInitiationType.Type; import com.android.dialer.callintent.CallSpecificAppData; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; +import com.android.dialer.dialercontact.DialerContact; import com.android.dialer.enrichedcall.EnrichedCallComponent; import com.android.dialer.enrichedcall.EnrichedCallManager; +import com.android.dialer.lightbringer.LightbringerComponent; +import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; +import com.android.dialer.performancereport.PerformanceReport; import com.android.dialer.protos.ProtoParsers; import java.util.Set; import org.json.JSONException; @@ -61,9 +65,6 @@ public class PhoneNumberPickerFragment extends ContactEntryListFragment mLoadFinishedListeners = new ArraySet<>(); private CursorReranker mCursorReranker; @@ -71,7 +72,7 @@ public class PhoneNumberPickerFragment extends ContactEntryListFragment 0 - && loader.getId() != -1) { // skip invalid directory ID of -1 + && loader.getId() == 0) { // only re-rank if a suggestions loader with id of 0. data = mCursorReranker.rerankCursor(data); } super.onLoadFinished(loader, data); @@ -320,7 +337,27 @@ public class PhoneNumberPickerFragment extends ContactEntryListFragment in the future private static final int[] ATTRS = @@ -54,20 +59,6 @@ public class ViewPagerTabs extends HorizontalScrollView implements ViewPager.OnP android.R.attr.textAllCaps }; - static { - if (CompatUtils.isLollipopCompatible()) { - VIEW_BOUNDS_OUTLINE_PROVIDER = - new ViewOutlineProvider() { - @Override - public void getOutline(View view, Outline outline) { - outline.setRect(0, 0, view.getWidth(), view.getHeight()); - } - }; - } else { - VIEW_BOUNDS_OUTLINE_PROVIDER = null; - } - } - /** * Linearlayout that will contain the TextViews serving as tabs. This is the only child of the * parent HorizontalScrollView. @@ -111,10 +102,8 @@ public class ViewPagerTabs extends HorizontalScrollView implements ViewPager.OnP new FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT)); a.recycle(); - if (CompatUtils.isLollipopCompatible()) { - // enable shadow casting from view bounds - setOutlineProvider(VIEW_BOUNDS_OUTLINE_PROVIDER); - } + // enable shadow casting from view bounds + setOutlineProvider(VIEW_BOUNDS_OUTLINE_PROVIDER); } public void setViewPager(ViewPager viewPager) { diff --git a/java/com/android/contacts/common/location/CountryDetector.java b/java/com/android/contacts/common/location/CountryDetector.java deleted file mode 100644 index 7d9e42b38..000000000 --- a/java/com/android/contacts/common/location/CountryDetector.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright (C) 2016 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. - */ - -package com.android.contacts.common.location; - -import android.app.PendingIntent; -import android.content.BroadcastReceiver; -import android.content.Context; -import android.content.Intent; -import android.content.SharedPreferences; -import android.location.Geocoder; -import android.location.Location; -import android.location.LocationManager; -import android.preference.PreferenceManager; -import android.telephony.TelephonyManager; -import android.text.TextUtils; -import android.util.Log; -import com.android.dialer.util.PermissionsUtil; -import java.util.Locale; - -/** - * This class is used to detect the country where the user is. It is a simplified version of the - * country detector service in the framework. The sources of country location are queried in the - * following order of reliability: - * - *

    - *
  • Mobile network - *
  • Location manager - *
  • SIM's country - *
  • User's default locale - *
- * - * As far as possible this class tries to replicate the behavior of the system's country detector - * service: 1) Order in priority of sources of country location 2) Mobile network information - * provided by CDMA phones is ignored 3) Location information is updated every 12 hours (instead of - * 24 hours in the system) 4) Location updates only uses the {@link - * LocationManager#PASSIVE_PROVIDER} to avoid active use of the GPS 5) If a location is successfully - * obtained and geocoded, we never fall back to use of the SIM's country (for the system, the - * fallback never happens without a reboot) 6) Location is not used if the device does not implement - * a {@link android.location.Geocoder} - */ -public class CountryDetector { - - public static final String KEY_PREFERENCE_TIME_UPDATED = "preference_time_updated"; - public static final String KEY_PREFERENCE_CURRENT_COUNTRY = "preference_current_country"; - private static final String TAG = "CountryDetector"; - // Wait 12 hours between updates - private static final long TIME_BETWEEN_UPDATES_MS = 1000L * 60 * 60 * 12; - // Minimum distance before an update is triggered, in meters. We don't need this to be too - // exact because all we care about is what country the user is in. - private static final long DISTANCE_BETWEEN_UPDATES_METERS = 5000; - private static CountryDetector sInstance; - private final TelephonyManager mTelephonyManager; - private final LocationManager mLocationManager; - private final LocaleProvider mLocaleProvider; - // Used as a default country code when all the sources of country data have failed in the - // exceedingly rare event that the device does not have a default locale set for some reason. - private static final String DEFAULT_COUNTRY_ISO = "US"; - private final Context mContext; - - private CountryDetector(Context context) { - this( - context, - (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE), - (LocationManager) context.getSystemService(Context.LOCATION_SERVICE), - new LocaleProvider()); - } - - private CountryDetector( - Context context, - TelephonyManager telephonyManager, - LocationManager locationManager, - LocaleProvider localeProvider) { - mTelephonyManager = telephonyManager; - mLocationManager = locationManager; - mLocaleProvider = localeProvider; - mContext = context; - - registerForLocationUpdates(context, mLocationManager); - } - - public static void registerForLocationUpdates(Context context, LocationManager locationManager) { - if (!PermissionsUtil.hasLocationPermissions(context)) { - Log.w(TAG, "No location permissions, not registering for location updates."); - return; - } - - if (!Geocoder.isPresent()) { - // Certain devices do not have an implementation of a geocoder - in that case there is - // no point trying to get location updates because we cannot retrieve the country based - // on the location anyway. - return; - } - final Intent activeIntent = new Intent(context, LocationChangedReceiver.class); - final PendingIntent pendingIntent = - PendingIntent.getBroadcast(context, 0, activeIntent, PendingIntent.FLAG_UPDATE_CURRENT); - - locationManager.requestLocationUpdates( - LocationManager.PASSIVE_PROVIDER, - TIME_BETWEEN_UPDATES_MS, - DISTANCE_BETWEEN_UPDATES_METERS, - pendingIntent); - } - - /** - * Returns the instance of the country detector. {@link #initialize(Context)} must have been - * called previously. - * - * @return the initialized country detector. - */ - public static synchronized CountryDetector getInstance(Context context) { - if (sInstance == null) { - sInstance = new CountryDetector(context.getApplicationContext()); - } - return sInstance; - } - - /** Factory method for {@link CountryDetector} that allows the caller to provide mock objects. */ - public CountryDetector getInstanceForTest( - Context context, - TelephonyManager telephonyManager, - LocationManager locationManager, - LocaleProvider localeProvider, - Geocoder geocoder) { - return new CountryDetector(context, telephonyManager, locationManager, localeProvider); - } - - public String getCurrentCountryIso() { - String result = null; - if (isNetworkCountryCodeAvailable()) { - result = getNetworkBasedCountryIso(); - } - if (TextUtils.isEmpty(result)) { - result = getLocationBasedCountryIso(); - } - if (TextUtils.isEmpty(result)) { - result = getSimBasedCountryIso(); - } - if (TextUtils.isEmpty(result)) { - result = getLocaleBasedCountryIso(); - } - if (TextUtils.isEmpty(result)) { - result = DEFAULT_COUNTRY_ISO; - } - return result.toUpperCase(Locale.US); - } - - /** @return the country code of the current telephony network the user is connected to. */ - private String getNetworkBasedCountryIso() { - return mTelephonyManager.getNetworkCountryIso(); - } - - /** @return the geocoded country code detected by the {@link LocationManager}. */ - private String getLocationBasedCountryIso() { - if (!Geocoder.isPresent() || !PermissionsUtil.hasLocationPermissions(mContext)) { - return null; - } - final SharedPreferences sharedPreferences = - PreferenceManager.getDefaultSharedPreferences(mContext); - return sharedPreferences.getString(KEY_PREFERENCE_CURRENT_COUNTRY, null); - } - - /** @return the country code of the SIM card currently inserted in the device. */ - private String getSimBasedCountryIso() { - return mTelephonyManager.getSimCountryIso(); - } - - /** @return the country code of the user's currently selected locale. */ - private String getLocaleBasedCountryIso() { - Locale defaultLocale = mLocaleProvider.getDefaultLocale(); - if (defaultLocale != null) { - return defaultLocale.getCountry(); - } - return null; - } - - private boolean isNetworkCountryCodeAvailable() { - // On CDMA TelephonyManager.getNetworkCountryIso() just returns the SIM's country code. - // In this case, we want to ignore the value returned and fallback to location instead. - return mTelephonyManager.getPhoneType() == TelephonyManager.PHONE_TYPE_GSM; - } - - /** - * Class that can be used to return the user's default locale. This is in its own class so that it - * can be mocked out. - */ - public static class LocaleProvider { - - public Locale getDefaultLocale() { - return Locale.getDefault(); - } - } - - public static class LocationChangedReceiver extends BroadcastReceiver { - - @Override - public void onReceive(final Context context, Intent intent) { - if (!intent.hasExtra(LocationManager.KEY_LOCATION_CHANGED)) { - return; - } - - final Location location = - (Location) intent.getExtras().get(LocationManager.KEY_LOCATION_CHANGED); - - UpdateCountryService.updateCountry(context, location); - } - } -} diff --git a/java/com/android/contacts/common/location/UpdateCountryService.java b/java/com/android/contacts/common/location/UpdateCountryService.java deleted file mode 100644 index f23e09e20..000000000 --- a/java/com/android/contacts/common/location/UpdateCountryService.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (C) 2016 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. - */ - -package com.android.contacts.common.location; - -import android.app.IntentService; -import android.content.Context; -import android.content.Intent; -import android.content.SharedPreferences; -import android.content.SharedPreferences.Editor; -import android.location.Address; -import android.location.Geocoder; -import android.location.Location; -import android.preference.PreferenceManager; -import android.util.Log; -import java.io.IOException; -import java.util.List; - -/** - * Service used to perform asynchronous geocoding from within a broadcast receiver. Given a {@link - * Location}, convert it into a country code, and save it in shared preferences. - */ -public class UpdateCountryService extends IntentService { - - private static final String TAG = UpdateCountryService.class.getSimpleName(); - - private static final String ACTION_UPDATE_COUNTRY = "saveCountry"; - - private static final String KEY_INTENT_LOCATION = "location"; - - public UpdateCountryService() { - super(TAG); - } - - public static void updateCountry(Context context, Location location) { - final Intent serviceIntent = new Intent(context, UpdateCountryService.class); - serviceIntent.setAction(ACTION_UPDATE_COUNTRY); - serviceIntent.putExtra(UpdateCountryService.KEY_INTENT_LOCATION, location); - context.startService(serviceIntent); - } - - @Override - protected void onHandleIntent(Intent intent) { - if (intent == null) { - Log.d(TAG, "onHandleIntent: could not handle null intent"); - return; - } - if (ACTION_UPDATE_COUNTRY.equals(intent.getAction())) { - final Location location = intent.getParcelableExtra(KEY_INTENT_LOCATION); - final String country = getCountryFromLocation(getApplicationContext(), location); - - if (country == null) { - return; - } - - final SharedPreferences prefs = - PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); - - final Editor editor = prefs.edit(); - editor.putLong(CountryDetector.KEY_PREFERENCE_TIME_UPDATED, System.currentTimeMillis()); - editor.putString(CountryDetector.KEY_PREFERENCE_CURRENT_COUNTRY, country); - editor.commit(); - } - } - - /** - * Given a {@link Location}, return a country code. - * - * @return the ISO 3166-1 two letter country code - */ - private String getCountryFromLocation(Context context, Location location) { - final Geocoder geocoder = new Geocoder(context); - String country = null; - try { - double latitude = location.getLatitude(); - // Latitude has to be between 90 and -90 (latitude of north and south poles wrt equator) - if (latitude <= 90 && latitude >= -90) { - final List
addresses = - geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1); - if (addresses != null && addresses.size() > 0) { - country = addresses.get(0).getCountryCode(); - } - } else { - Log.w(TAG, "Invalid latitude"); - } - } catch (IOException e) { - Log.w(TAG, "Exception occurred when getting geocoded country from location"); - } - return country; - } -} diff --git a/java/com/android/contacts/common/model/ContactLoader.java b/java/com/android/contacts/common/model/ContactLoader.java index 55464b161..7ef3b73a0 100644 --- a/java/com/android/contacts/common/model/ContactLoader.java +++ b/java/com/android/contacts/common/model/ContactLoader.java @@ -522,6 +522,7 @@ public class ContactLoader extends AsyncTaskLoader { cursorColumnToContentValues(cursor, cv, ContactQuery.TIMES_USED); cursorColumnToContentValues(cursor, cv, ContactQuery.LAST_TIME_USED); cursorColumnToContentValues(cursor, cv, ContactQuery.CARRIER_PRESENCE); + return cv; } diff --git a/java/com/android/contacts/common/model/account/AccountType.java b/java/com/android/contacts/common/model/account/AccountType.java index 1ae485a5f..ed0d421a9 100644 --- a/java/com/android/contacts/common/model/account/AccountType.java +++ b/java/com/android/contacts/common/model/account/AccountType.java @@ -25,6 +25,7 @@ import android.provider.ContactsContract.CommonDataKinds.StructuredPostal; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.RawContacts; import android.support.annotation.VisibleForTesting; +import android.support.v4.content.ContextCompat; import android.util.ArrayMap; import android.view.inputmethod.EditorInfo; import android.widget.EditText; @@ -113,7 +114,7 @@ public abstract class AccountType { final PackageManager pm = context.getPackageManager(); return pm.getDrawable(syncAdapterPackageName, iconRes, null); } else if (titleRes != -1) { - return context.getResources().getDrawable(iconRes); + return ContextCompat.getDrawable(context, iconRes); } else { return null; } diff --git a/java/com/android/contacts/common/model/account/BaseAccountType.java b/java/com/android/contacts/common/model/account/BaseAccountType.java index 8e9ba738c..ccdad3641 100644 --- a/java/com/android/contacts/common/model/account/BaseAccountType.java +++ b/java/com/android/contacts/common/model/account/BaseAccountType.java @@ -307,7 +307,7 @@ public abstract class BaseAccountType extends AccountType { DataKind kind = addKind( new DataKind(Phone.CONTENT_ITEM_TYPE, R.string.phoneLabelsGroup, Weight.PHONE, true)); - kind.iconAltRes = R.drawable.quantum_ic_message_white_24; + kind.iconAltRes = R.drawable.quantum_ic_message_vd_theme_24; kind.iconAltDescriptionRes = R.string.sms; kind.actionHeader = new PhoneActionInflater(); kind.actionAltHeader = new PhoneActionAltInflater(); @@ -1228,7 +1228,7 @@ public abstract class BaseAccountType extends AccountType { new PhoneActionInflater(), new SimpleInflater(Phone.NUMBER)); - kind.iconAltRes = R.drawable.quantum_ic_message_white_24; + kind.iconAltRes = R.drawable.quantum_ic_message_vd_theme_24; kind.iconAltDescriptionRes = R.string.sms; kind.actionAltHeader = new PhoneActionAltInflater(); diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_ab_search.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_ab_search.png deleted file mode 100644 index d86b2195a..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_ab_search.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_arrow_back_24dp.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_arrow_back_24dp.png deleted file mode 100644 index ddbb2c459..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_arrow_back_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_business_white_120dp.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_business_white_120dp.png deleted file mode 100644 index d5942dcad..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_business_white_120dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_call_24dp.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_call_24dp.png deleted file mode 100644 index 4dc506515..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_call_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_close_dk.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_close_dk.png deleted file mode 100644 index 969552935..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_close_dk.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_create_24dp.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_create_24dp.png deleted file mode 100644 index 540ab4dee..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_create_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_group_white_24dp.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_group_white_24dp.png deleted file mode 100644 index 017e4bbf7..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_group_white_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_history_white_drawable_24dp.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_history_white_drawable_24dp.png deleted file mode 100644 index 703d30b92..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_history_white_drawable_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_info_outline_24dp.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_info_outline_24dp.png deleted file mode 100644 index c7b1113cf..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_info_outline_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_back.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_back.png deleted file mode 100644 index deb3a6dc1..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_back.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_group_dk.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_group_dk.png deleted file mode 100644 index 06bd18fbb..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_group_dk.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_group_lt.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_group_lt.png deleted file mode 100644 index d829d11e2..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_group_lt.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_overflow_lt.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_overflow_lt.png deleted file mode 100644 index 1ba12950c..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_overflow_lt.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_person_dk.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_person_dk.png deleted file mode 100644 index 5ff3ac574..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_person_dk.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_person_lt.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_person_lt.png deleted file mode 100644 index b4ebfc7b2..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_person_lt.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_remove_field_holo_light.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_remove_field_holo_light.png deleted file mode 100644 index 03fd2fb10..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_remove_field_holo_light.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_dk.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_dk.png deleted file mode 100644 index e8cb0f5fe..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_dk.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_holo_light.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_holo_light.png deleted file mode 100644 index 45137967c..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_holo_light.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_lt.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_lt.png deleted file mode 100644 index 1c9bb81fa..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_lt.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_person_24dp.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_person_24dp.png deleted file mode 100644 index 56708b0ba..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_person_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_rx_videocam.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_rx_videocam.png deleted file mode 100644 index ccdda6701..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_rx_videocam.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_tx_videocam.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_tx_videocam.png deleted file mode 100644 index 603ddc895..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_tx_videocam.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_videocam.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_videocam.png deleted file mode 100644 index 97905c9f5..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_videocam.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_voicemail_avatar.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_voicemail_avatar.png deleted file mode 100644 index 2121878ae..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_voicemail_avatar.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/list_activated_holo.9.png b/java/com/android/contacts/common/res/drawable-hdpi/list_activated_holo.9.png deleted file mode 100644 index 4ea7afa00..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/list_activated_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/list_background_holo.9.png b/java/com/android/contacts/common/res/drawable-hdpi/list_background_holo.9.png deleted file mode 100644 index cddf9be75..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/list_background_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/list_focused_holo.9.png b/java/com/android/contacts/common/res/drawable-hdpi/list_focused_holo.9.png deleted file mode 100644 index 86578be45..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/list_focused_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/list_longpressed_holo_light.9.png b/java/com/android/contacts/common/res/drawable-hdpi/list_longpressed_holo_light.9.png deleted file mode 100644 index e9afcc924..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/list_longpressed_holo_light.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/list_pressed_holo_light.9.png b/java/com/android/contacts/common/res/drawable-hdpi/list_pressed_holo_light.9.png deleted file mode 100644 index 2054530ed..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/list_pressed_holo_light.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/list_section_divider_holo_custom.9.png b/java/com/android/contacts/common/res/drawable-hdpi/list_section_divider_holo_custom.9.png deleted file mode 100644 index a0f17568e..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/list_section_divider_holo_custom.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/list_title_holo.9.png b/java/com/android/contacts/common/res/drawable-hdpi/list_title_holo.9.png deleted file mode 100644 index ae937176e..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/list_title_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-ldrtl-hdpi/list_focused_holo.9.png b/java/com/android/contacts/common/res/drawable-ldrtl-hdpi/list_focused_holo.9.png deleted file mode 100644 index 4139942d6..000000000 Binary files a/java/com/android/contacts/common/res/drawable-ldrtl-hdpi/list_focused_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-ldrtl-hdpi/list_section_divider_holo_custom.9.png b/java/com/android/contacts/common/res/drawable-ldrtl-hdpi/list_section_divider_holo_custom.9.png deleted file mode 100644 index 569d28f54..000000000 Binary files a/java/com/android/contacts/common/res/drawable-ldrtl-hdpi/list_section_divider_holo_custom.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-ldrtl-hdpi/list_title_holo.9.png b/java/com/android/contacts/common/res/drawable-ldrtl-hdpi/list_title_holo.9.png deleted file mode 100644 index 5ec4c96a7..000000000 Binary files a/java/com/android/contacts/common/res/drawable-ldrtl-hdpi/list_title_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-ldrtl-mdpi/list_focused_holo.9.png b/java/com/android/contacts/common/res/drawable-ldrtl-mdpi/list_focused_holo.9.png deleted file mode 100644 index 4139942d6..000000000 Binary files a/java/com/android/contacts/common/res/drawable-ldrtl-mdpi/list_focused_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-ldrtl-mdpi/list_section_divider_holo_custom.9.png b/java/com/android/contacts/common/res/drawable-ldrtl-mdpi/list_section_divider_holo_custom.9.png deleted file mode 100644 index 065ff62ce..000000000 Binary files a/java/com/android/contacts/common/res/drawable-ldrtl-mdpi/list_section_divider_holo_custom.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-ldrtl-mdpi/list_title_holo.9.png b/java/com/android/contacts/common/res/drawable-ldrtl-mdpi/list_title_holo.9.png deleted file mode 100644 index 013d5e711..000000000 Binary files a/java/com/android/contacts/common/res/drawable-ldrtl-mdpi/list_title_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-ldrtl-sw600dp-hdpi/list_activated_holo.9.png b/java/com/android/contacts/common/res/drawable-ldrtl-sw600dp-hdpi/list_activated_holo.9.png deleted file mode 100644 index 947f03cec..000000000 Binary files a/java/com/android/contacts/common/res/drawable-ldrtl-sw600dp-hdpi/list_activated_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-ldrtl-sw600dp-mdpi/list_activated_holo.9.png b/java/com/android/contacts/common/res/drawable-ldrtl-sw600dp-mdpi/list_activated_holo.9.png deleted file mode 100644 index 6d09d7278..000000000 Binary files a/java/com/android/contacts/common/res/drawable-ldrtl-sw600dp-mdpi/list_activated_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-ldrtl-sw600dp-xhdpi/list_activated_holo.9.png b/java/com/android/contacts/common/res/drawable-ldrtl-sw600dp-xhdpi/list_activated_holo.9.png deleted file mode 100644 index 63c7456f0..000000000 Binary files a/java/com/android/contacts/common/res/drawable-ldrtl-sw600dp-xhdpi/list_activated_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-ldrtl-xhdpi/list_focused_holo.9.png b/java/com/android/contacts/common/res/drawable-ldrtl-xhdpi/list_focused_holo.9.png deleted file mode 100644 index 4139942d6..000000000 Binary files a/java/com/android/contacts/common/res/drawable-ldrtl-xhdpi/list_focused_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-ldrtl-xhdpi/list_section_divider_holo_custom.9.png b/java/com/android/contacts/common/res/drawable-ldrtl-xhdpi/list_section_divider_holo_custom.9.png deleted file mode 100644 index af5855420..000000000 Binary files a/java/com/android/contacts/common/res/drawable-ldrtl-xhdpi/list_section_divider_holo_custom.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-ldrtl-xhdpi/list_title_holo.9.png b/java/com/android/contacts/common/res/drawable-ldrtl-xhdpi/list_title_holo.9.png deleted file mode 100644 index cb801ac1b..000000000 Binary files a/java/com/android/contacts/common/res/drawable-ldrtl-xhdpi/list_title_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/list_activated_holo.9.png b/java/com/android/contacts/common/res/drawable-mdpi/list_activated_holo.9.png deleted file mode 100644 index 3bf8e0362..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/list_activated_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/list_focused_holo.9.png b/java/com/android/contacts/common/res/drawable-mdpi/list_focused_holo.9.png deleted file mode 100644 index 86578be45..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/list_focused_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/list_longpressed_holo_light.9.png b/java/com/android/contacts/common/res/drawable-mdpi/list_longpressed_holo_light.9.png deleted file mode 100644 index 3226ab760..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/list_longpressed_holo_light.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/list_pressed_holo_light.9.png b/java/com/android/contacts/common/res/drawable-mdpi/list_pressed_holo_light.9.png deleted file mode 100644 index 061904c42..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/list_pressed_holo_light.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/list_section_divider_holo_custom.9.png b/java/com/android/contacts/common/res/drawable-mdpi/list_section_divider_holo_custom.9.png deleted file mode 100644 index 1d9371de0..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/list_section_divider_holo_custom.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-sw600dp-hdpi/list_activated_holo.9.png b/java/com/android/contacts/common/res/drawable-sw600dp-hdpi/list_activated_holo.9.png deleted file mode 100644 index 046b24a96..000000000 Binary files a/java/com/android/contacts/common/res/drawable-sw600dp-hdpi/list_activated_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-sw600dp-mdpi/list_activated_holo.9.png b/java/com/android/contacts/common/res/drawable-sw600dp-mdpi/list_activated_holo.9.png deleted file mode 100644 index 1ff337370..000000000 Binary files a/java/com/android/contacts/common/res/drawable-sw600dp-mdpi/list_activated_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-sw600dp-xhdpi/list_activated_holo.9.png b/java/com/android/contacts/common/res/drawable-sw600dp-xhdpi/list_activated_holo.9.png deleted file mode 100644 index 2eb7c7ebc..000000000 Binary files a/java/com/android/contacts/common/res/drawable-sw600dp-xhdpi/list_activated_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/list_activated_holo.9.png b/java/com/android/contacts/common/res/drawable-xhdpi/list_activated_holo.9.png deleted file mode 100644 index eda10e612..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/list_activated_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/list_focused_holo.9.png b/java/com/android/contacts/common/res/drawable-xhdpi/list_focused_holo.9.png deleted file mode 100644 index 86578be45..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/list_focused_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/list_longpressed_holo_light.9.png b/java/com/android/contacts/common/res/drawable-xhdpi/list_longpressed_holo_light.9.png deleted file mode 100644 index 5532e88c2..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/list_longpressed_holo_light.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/list_pressed_holo_light.9.png b/java/com/android/contacts/common/res/drawable-xhdpi/list_pressed_holo_light.9.png deleted file mode 100644 index f4af92657..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/list_pressed_holo_light.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/list_section_divider_holo_custom.9.png b/java/com/android/contacts/common/res/drawable-xhdpi/list_section_divider_holo_custom.9.png deleted file mode 100644 index 8fb0636cf..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/list_section_divider_holo_custom.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/list_activated_holo.9.png b/java/com/android/contacts/common/res/drawable-xxhdpi/list_activated_holo.9.png deleted file mode 100644 index 52c00ddcd..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/list_activated_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/list_focused_holo.9.png b/java/com/android/contacts/common/res/drawable-xxhdpi/list_focused_holo.9.png deleted file mode 100644 index 3e4ca684e..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/list_focused_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/list_longpressed_holo_light.9.png b/java/com/android/contacts/common/res/drawable-xxhdpi/list_longpressed_holo_light.9.png deleted file mode 100644 index 230d649bf..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/list_longpressed_holo_light.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/list_pressed_holo_light.9.png b/java/com/android/contacts/common/res/drawable-xxhdpi/list_pressed_holo_light.9.png deleted file mode 100644 index 1352a1702..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/list_pressed_holo_light.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable/ic_back_arrow.xml b/java/com/android/contacts/common/res/drawable/ic_back_arrow.xml deleted file mode 100644 index ecf704e8e..000000000 --- a/java/com/android/contacts/common/res/drawable/ic_back_arrow.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - \ No newline at end of file diff --git a/java/com/android/contacts/common/res/drawable/ic_call_and_share.xml b/java/com/android/contacts/common/res/drawable/ic_call_and_share.xml deleted file mode 100644 index be0cdd358..000000000 --- a/java/com/android/contacts/common/res/drawable/ic_call_and_share.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - \ No newline at end of file diff --git a/java/com/android/contacts/common/res/drawable/ic_person_add_tinted_24dp.xml b/java/com/android/contacts/common/res/drawable/ic_person_add_tinted_24dp.xml deleted file mode 100644 index c2538cfd1..000000000 --- a/java/com/android/contacts/common/res/drawable/ic_person_add_tinted_24dp.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - diff --git a/java/com/android/contacts/common/res/drawable/ic_search_add_contact.xml b/java/com/android/contacts/common/res/drawable/ic_search_add_contact.xml deleted file mode 100644 index 476212d24..000000000 --- a/java/com/android/contacts/common/res/drawable/ic_search_add_contact.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - diff --git a/java/com/android/contacts/common/res/drawable/ic_search_video_call.xml b/java/com/android/contacts/common/res/drawable/ic_search_video_call.xml deleted file mode 100644 index 0fe0367e1..000000000 --- a/java/com/android/contacts/common/res/drawable/ic_search_video_call.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - diff --git a/java/com/android/contacts/common/res/drawable/list_selector_background_transition_holo_light.xml b/java/com/android/contacts/common/res/drawable/list_selector_background_transition_holo_light.xml deleted file mode 100644 index 35fff99c2..000000000 --- a/java/com/android/contacts/common/res/drawable/list_selector_background_transition_holo_light.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - diff --git a/java/com/android/contacts/common/res/layout/dialog_call_subject.xml b/java/com/android/contacts/common/res/layout/dialog_call_subject.xml index a33b2ac85..df8e8d299 100644 --- a/java/com/android/contacts/common/res/layout/dialog_call_subject.xml +++ b/java/com/android/contacts/common/res/layout/dialog_call_subject.xml @@ -129,7 +129,7 @@ android:layout_height="25dp" android:layout_alignParentStart="true" android:layout_centerVertical="true" - android:src="@drawable/quantum_ic_history_white_24" + android:src="@drawable/quantum_ic_history_vd_theme_24" android:tint="@color/call_subject_history_icon"/> diff --git a/java/com/android/contacts/common/res/values-af/strings.xml b/java/com/android/contacts/common/res/values-af/strings.xml index 52e612da9..4ca39cf96 100644 --- a/java/com/android/contacts/common/res/values-af/strings.xml +++ b/java/com/android/contacts/common/res/values-af/strings.xml @@ -70,10 +70,12 @@ "Weg" "Besig" "Kontakte" + "Topvoorgestel" "Ander" "Gids" "Werkgids" "Alle kontakte" + "Voorstelle" "Ek" "Soek tans…" "Meer as %d gevind." @@ -248,7 +250,7 @@ "Tik \'n nota om saam met oproep te stuur …" "STUUR EN BEL" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s-oortjie" %1$s-oortjie %2$d ongelese items. diff --git a/java/com/android/contacts/common/res/values-am/strings.xml b/java/com/android/contacts/common/res/values-am/strings.xml index 0283fbb0a..d216b0be6 100644 --- a/java/com/android/contacts/common/res/values-am/strings.xml +++ b/java/com/android/contacts/common/res/values-am/strings.xml @@ -70,10 +70,12 @@ "ወጣ ብሏል" "ተይዟል" "እውቅያዎች" + "በብዛት የተጠቆሙ" "ሌላ" "ማውጫ" "የሥራ ስልክ ማውጫ" "ሁሉም እውቅያዎች" + "ጥቆማዎች" "እኔ" "በመፈለግ ላይ…" "ከ%d በላይ ተገኝተዋል።" @@ -248,7 +250,7 @@ "ከጥሪ ጋር ለመላክ የማስታወሻ ጽሑፍ ይተይቡ ..." "ላክ እና ደውል" "%1$s / %2$s" - "%1$s%2$s" + "%1$s%2$s" "የ%1$s ትር።" %1$s ትር። %2$d ያልተነበቡ ንጥሎች። diff --git a/java/com/android/contacts/common/res/values-ar/strings.xml b/java/com/android/contacts/common/res/values-ar/strings.xml index a3862fe09..040b54477 100644 --- a/java/com/android/contacts/common/res/values-ar/strings.xml +++ b/java/com/android/contacts/common/res/values-ar/strings.xml @@ -70,10 +70,12 @@ "بالخارج" "مشغول" "جهات الاتصال" + "أهم المقترحات" "غير ذلك" "الدليل" "دليل العمل" "جميع جهات الاتصال" + "الاقتراحات" "أنا" "جارِ البحث…" "تم العثور على أكثر من %d من جهات الاتصال." @@ -252,7 +254,7 @@ "اكتب ملاحظة لإرسالها مع المكالمة ..." "إرسال واتصال" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "علامة تبويب %1$s." %1$s علامة تبويب. %2$d عناصر غير مقروءة. diff --git a/java/com/android/contacts/common/res/values-az/strings.xml b/java/com/android/contacts/common/res/values-az/strings.xml index 943377127..13250f7e0 100644 --- a/java/com/android/contacts/common/res/values-az/strings.xml +++ b/java/com/android/contacts/common/res/values-az/strings.xml @@ -70,10 +70,12 @@ "Kənar" "Məşğul" "Kontaktlar" + "Ən yaxşı Təkliflər" "Digər" "Kataloq" "İş kataloqu" "Bütün kontaktlar" + "Təkliflər" "Mən" "Axtarılır..." "%d ədəddən çox tapılıb." @@ -248,7 +250,7 @@ "Zəng ilə göndərmək üçün qeyd yazın..." "GÖNDƏRİN VƏ ZƏNG EDİN" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s tabel." %1$s tabel. %2$d oxunmamış element. diff --git a/java/com/android/contacts/common/res/values-b+sr+Latn/strings.xml b/java/com/android/contacts/common/res/values-b+sr+Latn/strings.xml index fc99567f1..d3b6b0c05 100644 --- a/java/com/android/contacts/common/res/values-b+sr+Latn/strings.xml +++ b/java/com/android/contacts/common/res/values-b+sr+Latn/strings.xml @@ -70,10 +70,12 @@ "Odsutan/na" "Zauzet/a" "Kontakti" + "Najpopularniji predlozi" "Drugo" "Direktorijum" "Direktorijum za Work" "Svi kontakti" + "Predlozi" "Ja" "Pretražuje se…" "Pronađeno je više od %d." @@ -249,7 +251,7 @@ "Unesite belešku koju ćete poslati uz poziv..." "POŠALJI I POZOVI" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "Kartica %1$s." Kartica %1$s. %2$d nepročitana stavka. diff --git a/java/com/android/contacts/common/res/values-be/strings.xml b/java/com/android/contacts/common/res/values-be/strings.xml index a9652a1c1..ca8f16421 100644 --- a/java/com/android/contacts/common/res/values-be/strings.xml +++ b/java/com/android/contacts/common/res/values-be/strings.xml @@ -70,10 +70,12 @@ "Адсутнічае" "Заняты" "Кантакты" + "Лепшыя прапановы" "Іншае" "Дырэкторыя" "Працоўны каталог" "Усе кантакты" + "Прапановы" "Я" "Пошук..." "Знойдзена вынікаў: больш за %d." @@ -250,7 +252,7 @@ "Увесці нататку для адпраўкі з выклікам…" "АДПРАВІЦЬ І ВЫКЛІКАЦЬ" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "Укладка %1$s." Укладка %1$s. %2$d непрачытаны элемент. diff --git a/java/com/android/contacts/common/res/values-bg/strings.xml b/java/com/android/contacts/common/res/values-bg/strings.xml index 0b57eb6a5..4fdcc8c01 100644 --- a/java/com/android/contacts/common/res/values-bg/strings.xml +++ b/java/com/android/contacts/common/res/values-bg/strings.xml @@ -70,10 +70,12 @@ "Отсъства" "Зает/а" "Контакти" + "Водещи предложения" "Други" "Директория" "Служебен указател" "Всички контакти" + "Предложения" "Аз" "Търси се…" "Намерени са повече от %d." @@ -248,7 +250,7 @@ "Напишете придружаваща бележка, която ще се изпрати при извършване на обаждането..." "ИЗПРАЩАНЕ И ОБАЖДАНЕ" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "Раздел „%1$s“." Раздел „%1$s“. %2$d непрочетени елемента. diff --git a/java/com/android/contacts/common/res/values-bn/strings.xml b/java/com/android/contacts/common/res/values-bn/strings.xml index 8e783d129..debbe582e 100644 --- a/java/com/android/contacts/common/res/values-bn/strings.xml +++ b/java/com/android/contacts/common/res/values-bn/strings.xml @@ -70,10 +70,12 @@ "অন্যত্র" "ব্যস্ত" "পরিচিতিগুলি" + "শীর্ষস্থানীয় প্রস্তাবনা" "অন্যান্য" "ডিরেক্টরি" "কাজের সংগ্রহ" "সকল পরিচিতি" + "প্রস্তাবনাগুলি" "আমি" "অনুসন্ধান করছে..." "%dটির থেকে বেশি খুঁজে পাওয়া গিয়েছে৷" @@ -248,7 +250,7 @@ "কলের সাথে পাঠানোর জন্য একটি নোট লিখুন ..." "পাঠান এবং কল করুন" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s ট্যাব৷" %1$s ট্যাব৷ %2$dটি অপঠিত আইটেম৷ diff --git a/java/com/android/contacts/common/res/values-bs/strings.xml b/java/com/android/contacts/common/res/values-bs/strings.xml index 278f6a8d0..c5f85e588 100644 --- a/java/com/android/contacts/common/res/values-bs/strings.xml +++ b/java/com/android/contacts/common/res/values-bs/strings.xml @@ -70,10 +70,12 @@ "Odsutan" "Zauzeto" "Kontakti" + "Najbolji prijedlozi" "Ostalo" "Imenik" "Poslovni imenik" "Svi kontakti" + "Prijedlozi" "Ja" "Pretraživanje…" "Pronađeno je više od %d." @@ -249,7 +251,7 @@ "Upišite bilješku koja će se poslati uz poziv ..." "POŠALJI I POZOVI" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "Kartica %1$s." Kartica %1$s. %2$d nepročitana stavka. diff --git a/java/com/android/contacts/common/res/values-ca/strings.xml b/java/com/android/contacts/common/res/values-ca/strings.xml index ad31a01b6..7e814ff32 100644 --- a/java/com/android/contacts/common/res/values-ca/strings.xml +++ b/java/com/android/contacts/common/res/values-ca/strings.xml @@ -70,10 +70,12 @@ "Absent" "Ocupat" "Contactes" + "Suggeriments principals" "Altres" "Directori" "Directori de la feina" "Tots els contactes" + "Suggeriments" "Jo" "S\'està cercant…" "Se n\'han trobat més de %d." @@ -248,7 +250,7 @@ "Escriu una nota per enviar-la juntament amb la trucada..." "ENVIA I TRUCA" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "Pestanya %1$s" Pestanya %1$s: %2$d elements no llegits diff --git a/java/com/android/contacts/common/res/values-cs/strings.xml b/java/com/android/contacts/common/res/values-cs/strings.xml index ab54be93a..0bea069ce 100644 --- a/java/com/android/contacts/common/res/values-cs/strings.xml +++ b/java/com/android/contacts/common/res/values-cs/strings.xml @@ -70,10 +70,12 @@ "Pryč" "Nemám čas" "Kontakty" + "Hlavní návrhy" "Ostatní" "Adresář" "Pracovní adresář" "Všechny kontakty" + "Návrhy" "Já" "Vyhledávání..." "Nalezeno více kontaktů než %d." @@ -250,7 +252,7 @@ "Zadejte poznámku, která se odešle pomocí volání…" "ODESLAT A ZAVOLAT" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "Karta %1$s." Karta %1$s. %2$d nepřečtené položky. diff --git a/java/com/android/contacts/common/res/values-da/strings.xml b/java/com/android/contacts/common/res/values-da/strings.xml index 965d04a73..c000b2fe5 100644 --- a/java/com/android/contacts/common/res/values-da/strings.xml +++ b/java/com/android/contacts/common/res/values-da/strings.xml @@ -70,10 +70,12 @@ "Ikke til stede" "Optaget" "Kontakter" + "Populære forslag" "Andre" "Indeks" "Indeks for arbejde" "Alle kontakter" + "Forslag" "Mig" "Søger..." "Der er fundet mere end %d." @@ -248,7 +250,7 @@ "Indtast en note, som skal sendes ved opkald..." "SEND OG RING" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "Fanen %1$s." Fanen %1$s. %2$d ulæst element. diff --git a/java/com/android/contacts/common/res/values-de/strings.xml b/java/com/android/contacts/common/res/values-de/strings.xml index 60c5e6806..90e133608 100644 --- a/java/com/android/contacts/common/res/values-de/strings.xml +++ b/java/com/android/contacts/common/res/values-de/strings.xml @@ -70,10 +70,12 @@ "Abwesend" "Beschäftigt" "Kontakte" + "Top-Vorschläge" "Andere" "Verzeichnis" "Verzeichnis geschäftlicher Kontakte" "Alle Kontakte" + "Vorschläge" "Ich" "Suche läuft..." "Mehr als %d Kontakte gefunden" @@ -248,7 +250,7 @@ "Notiz eingeben, die beim Anrufen gesendet wird..." "SENDEN UND ANRUFEN" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "Tab \"%1$s\"." Tab \"%1$s\". %2$d ungelesene Elemente. diff --git a/java/com/android/contacts/common/res/values-el/strings.xml b/java/com/android/contacts/common/res/values-el/strings.xml index 9af3bc55a..33d2db4f6 100644 --- a/java/com/android/contacts/common/res/values-el/strings.xml +++ b/java/com/android/contacts/common/res/values-el/strings.xml @@ -70,10 +70,12 @@ "Μη διαθέσιμος" "Απασχολημένος" "Επαφές" + "Κορυφαίες προτάσεις" "Άλλο" "Κατάλογος" "Κατάλογος εργασίας" "Όλες οι επαφές" + "Προτάσεις" "Εγώ" "Αναζήτηση..." "Βρέθηκαν περισσότερα από %d." @@ -248,7 +250,7 @@ "Πληκτρολογήστε μια σημείωση για αποστολή με την κλήση…" "ΑΠΟΣΤΟΛΗ ΚΑΙ ΚΛΗΣΗ" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "Καρτέλα %1$s." Καρτέλα %1$s. %2$d μη αναγνωσμένα στοιχεία. diff --git a/java/com/android/contacts/common/res/values-en-rAU/strings.xml b/java/com/android/contacts/common/res/values-en-rAU/strings.xml index 996c6ee18..e4e09dcaf 100644 --- a/java/com/android/contacts/common/res/values-en-rAU/strings.xml +++ b/java/com/android/contacts/common/res/values-en-rAU/strings.xml @@ -70,10 +70,12 @@ "Away" "Busy" "Contacts" + "Top suggested" "Other" "Directory" "Work directory" "All contacts" + "Suggestions" "Me" "Searching…" "More than %d found." @@ -248,7 +250,7 @@ "Type a note to send with call ..." "SEND & CALL" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s tab." %1$s tab. %2$d unread items. diff --git a/java/com/android/contacts/common/res/values-en-rGB/strings.xml b/java/com/android/contacts/common/res/values-en-rGB/strings.xml index 996c6ee18..e4e09dcaf 100644 --- a/java/com/android/contacts/common/res/values-en-rGB/strings.xml +++ b/java/com/android/contacts/common/res/values-en-rGB/strings.xml @@ -70,10 +70,12 @@ "Away" "Busy" "Contacts" + "Top suggested" "Other" "Directory" "Work directory" "All contacts" + "Suggestions" "Me" "Searching…" "More than %d found." @@ -248,7 +250,7 @@ "Type a note to send with call ..." "SEND & CALL" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s tab." %1$s tab. %2$d unread items. diff --git a/java/com/android/contacts/common/res/values-en-rIN/strings.xml b/java/com/android/contacts/common/res/values-en-rIN/strings.xml index 996c6ee18..e4e09dcaf 100644 --- a/java/com/android/contacts/common/res/values-en-rIN/strings.xml +++ b/java/com/android/contacts/common/res/values-en-rIN/strings.xml @@ -70,10 +70,12 @@ "Away" "Busy" "Contacts" + "Top suggested" "Other" "Directory" "Work directory" "All contacts" + "Suggestions" "Me" "Searching…" "More than %d found." @@ -248,7 +250,7 @@ "Type a note to send with call ..." "SEND & CALL" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s tab." %1$s tab. %2$d unread items. diff --git a/java/com/android/contacts/common/res/values-es-rUS/strings.xml b/java/com/android/contacts/common/res/values-es-rUS/strings.xml index acb563cab..894c352d6 100644 --- a/java/com/android/contacts/common/res/values-es-rUS/strings.xml +++ b/java/com/android/contacts/common/res/values-es-rUS/strings.xml @@ -70,10 +70,12 @@ "Ausente" "Ocupado" "Contactos" + "Principales lugares sugeridos" "Otros" "Directorio" "Directorio del trabajo" "Todos los contactos" + "Sugerencias" "Yo" "Buscando..." "Más de %d encontrados" @@ -248,7 +250,7 @@ "Escribe una nota para enviar con la llamada…" "ENVIAR Y LLAMAR" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "Pestaña %1$s." Pestaña %1$s. %2$d elementos no leídos. diff --git a/java/com/android/contacts/common/res/values-es/strings.xml b/java/com/android/contacts/common/res/values-es/strings.xml index def7a447c..39e11d750 100644 --- a/java/com/android/contacts/common/res/values-es/strings.xml +++ b/java/com/android/contacts/common/res/values-es/strings.xml @@ -70,10 +70,12 @@ "Ausente" "Ocupado" "Contactos" + "Sugerencias principales" "Otro" "Directorio" "Directorio de trabajo" "Todos los contactos" + "Sugerencias" "Yo" "Buscando..." "Se han encontrado más de %d contactos." @@ -248,7 +250,7 @@ "Escribe una nota para enviarla con la llamada..." "ENVIAR Y LLAMAR" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "Pestaña %1$s." Pestaña %1$s. %2$d elementos no leídos. diff --git a/java/com/android/contacts/common/res/values-et/strings.xml b/java/com/android/contacts/common/res/values-et/strings.xml index c80d54214..e1460382d 100644 --- a/java/com/android/contacts/common/res/values-et/strings.xml +++ b/java/com/android/contacts/common/res/values-et/strings.xml @@ -70,10 +70,12 @@ "Eemal" "Hõivatud" "Kontaktid" + "Populaarsed soovitused" "Muu" "Kataloog" "Töökontaktide kataloog" "Kõik kontaktid" + "Soovitused" "Mina" "Otsimine ..." "Leitud rohkem kui %d." @@ -248,7 +250,7 @@ "Sisestage märkus, mis koos kõnega saata ..." "SAADA JA HELISTA" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "Vahekaart %1$s." Vahekaart %1$s. %2$d lugemata üksust. diff --git a/java/com/android/contacts/common/res/values-eu/strings.xml b/java/com/android/contacts/common/res/values-eu/strings.xml index 868d668b5..9caf1f111 100644 --- a/java/com/android/contacts/common/res/values-eu/strings.xml +++ b/java/com/android/contacts/common/res/values-eu/strings.xml @@ -70,10 +70,12 @@ "Kanpoan" "Okupatuta" "Kontaktuak" + "Iradokizun garrantzitsuenak" "Beste bat" "Direktorioa" "Laneko kontaktuak" "Kontaktu guztiak" + "Iradokizunak" "Ni" "Bilatzen…" "%d baino gehiago aurkitu dira." @@ -248,7 +250,7 @@ "Idatzi deiarekin batera bidali beharreko oharra…" "BIDALI ETA DEITU" "%1$s/%2$s" - "%1$s%2$s" + "%1$s: %2$s" "%1$s fitxa." %1$s fitxa. Irakurri gabeko %2$d elementu. diff --git a/java/com/android/contacts/common/res/values-fa/strings.xml b/java/com/android/contacts/common/res/values-fa/strings.xml index dda10647c..c0bc0109d 100644 --- a/java/com/android/contacts/common/res/values-fa/strings.xml +++ b/java/com/android/contacts/common/res/values-fa/strings.xml @@ -70,10 +70,12 @@ "غایب" "مشغول" "مخاطبین" + "پیشنهادهای برتر" "سایر موارد" "فهرست" "فهرست کار" "همه مخاطبین" + "پیشنهادها" "من" "در حال جستجو…" "بیش از %d مورد یافت شد." @@ -248,7 +250,7 @@ "یادداشتی بنویسید که همراه تماس ارسال شود…" "ارسال و تماس" "%1$s / ‏%2$s" - "%1$s%2$s" + "%1$s %2$s" "برگه «%1$s»." برگه «%1$s». %2$d مورد خوانده‌نشده. diff --git a/java/com/android/contacts/common/res/values-fi/strings.xml b/java/com/android/contacts/common/res/values-fi/strings.xml index b8065b2bf..c12476560 100644 --- a/java/com/android/contacts/common/res/values-fi/strings.xml +++ b/java/com/android/contacts/common/res/values-fi/strings.xml @@ -70,10 +70,12 @@ "Poissa" "Varattu" "Yhteystiedot" + "Kiinnostavimmat ehdotukset" "Muu" "Osoitekirja" "Työhakemisto" "Kaikki yhteystiedot" + "Ehdotukset" "Minä" "Haetaan…" "Löytyi yli %d yhteystietoa." @@ -248,7 +250,7 @@ "Kirjoita muistiinpano lähetettäväksi puhelun kanssa…" "LÄHETÄ JA SOITA" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s-välilehti." %1$s-välilehti. %2$d lukematonta kohdetta. diff --git a/java/com/android/contacts/common/res/values-fr-rCA/strings.xml b/java/com/android/contacts/common/res/values-fr-rCA/strings.xml index 82f549292..c05540841 100644 --- a/java/com/android/contacts/common/res/values-fr-rCA/strings.xml +++ b/java/com/android/contacts/common/res/values-fr-rCA/strings.xml @@ -70,10 +70,12 @@ "Absent" "Occupé(e)" "Contacts" + "Meilleures suggestions" "Autre" "Répertoire" "Annuaire professionnel" "Tous les contacts" + "Suggestions" "Moi" "Recherche en cours…" "Plus de %d contacts ont été trouvés." @@ -248,7 +250,7 @@ "Tapez une note à envoyer avec l\'appel..." "ENVOYER ET APPELER" "%1$s/%2$s" - "%1$s%2$s" + "%1$s : %2$s" "Onglet %1$s." Onglet %1$s. %2$d élément non lu. diff --git a/java/com/android/contacts/common/res/values-fr/strings.xml b/java/com/android/contacts/common/res/values-fr/strings.xml index 474d721dc..a47a5a283 100644 --- a/java/com/android/contacts/common/res/values-fr/strings.xml +++ b/java/com/android/contacts/common/res/values-fr/strings.xml @@ -70,10 +70,12 @@ "Absent" "Occupé" "Contacts" + "Principaux dossiers recommandés" "Autre" "Répertoire" "Contacts professionnels" "Tous les contacts" + "Suggestions" "Moi" "Recherche..." "Plus de %d contacts ont été trouvés." @@ -248,7 +250,7 @@ "Saisissez une note pour accompagner l\'appel..." "ENVOYER ET APPELER" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "Onglet %1$s." Onglet %1$s. %2$d élément non lu. diff --git a/java/com/android/contacts/common/res/values-gl/strings.xml b/java/com/android/contacts/common/res/values-gl/strings.xml index 4a3262a2b..a90481d6c 100644 --- a/java/com/android/contacts/common/res/values-gl/strings.xml +++ b/java/com/android/contacts/common/res/values-gl/strings.xml @@ -70,10 +70,12 @@ "Ausente" "Ocupado" "Contactos" + "Suxestións destacadas" "Outro" "Directorio" "Directorio de traballo" "Todos os contactos" + "Suxestións" "Eu" "Buscando..." "Encontráronse máis de %d contactos." @@ -248,7 +250,7 @@ "Escribe unha nota para enviala coa chamada…" "ENVIAR E CHAMAR" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "Pestana %1$s." Pestana %1$s. %2$d elementos non lidos. diff --git a/java/com/android/contacts/common/res/values-gu/strings.xml b/java/com/android/contacts/common/res/values-gu/strings.xml index 536aceb9c..9b1a6a894 100644 --- a/java/com/android/contacts/common/res/values-gu/strings.xml +++ b/java/com/android/contacts/common/res/values-gu/strings.xml @@ -70,10 +70,12 @@ "દૂર" "વ્યસ્ત" "સંપર્કો" + "ટોચના સૂચવેલ" "અન્ય" "નિર્દેશિકા" "કાર્ય નિર્દેશિકા" "તમામ સંપર્કો" + "સૂચનો" "હું" "શોધી રહ્યું છે..." "%d કરતાં વધુ મળ્યાં." @@ -248,7 +250,7 @@ "કૉલ સાથે મોકલવા માટે એક નોંધ લખો ..." "મોકલો અને કૉલ કરો" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s ટૅબ." %1$s ટૅબ. %2$d વાંચ્યા વગરની આઇટમ. diff --git a/java/com/android/contacts/common/res/values-hi/strings.xml b/java/com/android/contacts/common/res/values-hi/strings.xml index c61e195cb..e33f7d294 100644 --- a/java/com/android/contacts/common/res/values-hi/strings.xml +++ b/java/com/android/contacts/common/res/values-hi/strings.xml @@ -70,10 +70,12 @@ "दूर" "व्यस्त" "संपर्क" + "शीर्ष सुझाव" "अन्य" "निर्देशिका" "कार्य निर्देशिका" "सभी संपर्क" + "सुझाव" "मुझे" "खोज रहा है..." "%d से अधिक मिले." @@ -248,7 +250,7 @@ "कॉल के साथ भेजने के लिए नोट लिखें ..." "भेजें और कॉल करें" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s टैब." %1$s टैब. %2$d नहीं पढ़े गए आइटम. diff --git a/java/com/android/contacts/common/res/values-hr/strings.xml b/java/com/android/contacts/common/res/values-hr/strings.xml index 66986dd38..d6e0b10ac 100644 --- a/java/com/android/contacts/common/res/values-hr/strings.xml +++ b/java/com/android/contacts/common/res/values-hr/strings.xml @@ -70,10 +70,12 @@ "Odsutan" "Zauzet" "Kontakti" + "Najbolji prijedlozi" "Drugo" "Direktorij" "Poslovni direktorij" "Svi kontakti" + "Prijedlozi" "Ja" "Pretraživanje…" "Pronađeno je više od %d." @@ -249,7 +251,7 @@ "Napišite bilješku koju ćete poslati uz poziv..." "POŠALJI I NAZOVI" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "Kartica %1$s." Kartica %1$s. %2$d nepročitana stavka. diff --git a/java/com/android/contacts/common/res/values-hu/strings.xml b/java/com/android/contacts/common/res/values-hu/strings.xml index 22bf5094c..44bf9c8c3 100644 --- a/java/com/android/contacts/common/res/values-hu/strings.xml +++ b/java/com/android/contacts/common/res/values-hu/strings.xml @@ -70,10 +70,12 @@ "Nincs a gépnél" "Elfoglalt" "Címtár" + "Legjobb javaslatok" "Egyéb" "Címtár" "Munkahelyi névjegyek címtára" "Összes névjegy" + "Javaslatok" "Én" "Keresés…" "Több mint %d találat." @@ -248,7 +250,7 @@ "Írjon üzenetet, amelyet elküldhetünk a hívással együtt…" "KÜLDÉS ÉS HÍVÁS" "%2$s/%1$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s lap." %1$s lap. %2$d olvasatlan elem. diff --git a/java/com/android/contacts/common/res/values-hy/strings.xml b/java/com/android/contacts/common/res/values-hy/strings.xml index 85c902347..b1490c764 100644 --- a/java/com/android/contacts/common/res/values-hy/strings.xml +++ b/java/com/android/contacts/common/res/values-hy/strings.xml @@ -70,10 +70,12 @@ "Տեղում չէ" "Զբաղված" "Կոնտակտներ" + "Լավագույն առաջարկներ" "Այլ" "Գրացուցակ" "Աշխատանքային գրացուցակ" "Բոլոր կոնտակտները" + "Առաջարկներ" "Ես" "Որոնում..." "Գտնվել են %d-ից ավելի:" @@ -248,7 +250,7 @@ "Մուտքագրեք նշում՝ զանգի հետ ուղարկելու համար ..." "ՈՒՂԱՐԿԵԼ ԵՎ ԶԱՆԳԵԼ" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s ներդիր:" %1$s tab. %2$d unread items. diff --git a/java/com/android/contacts/common/res/values-in/strings.xml b/java/com/android/contacts/common/res/values-in/strings.xml index d7ee8bfb9..a54821e1d 100644 --- a/java/com/android/contacts/common/res/values-in/strings.xml +++ b/java/com/android/contacts/common/res/values-in/strings.xml @@ -70,10 +70,12 @@ "Keluar" "Sibuk" "Kontak" + "Paling Disarankan" "Lainnya" "Direktori" "Direktori kerja" "Semua kontak" + "Saran" "Saya" "Menelusuri…" "Ditemukan lebih dari %d." @@ -248,7 +250,7 @@ "Ketik catatan untuk dikirim dengan panggilan telepon ..." "KIRIM & TELEPON" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "Tab %1$s." Tab %1$s. %2$d item belum dibaca. diff --git a/java/com/android/contacts/common/res/values-is/strings.xml b/java/com/android/contacts/common/res/values-is/strings.xml index 26c1aefd1..803a44bd7 100644 --- a/java/com/android/contacts/common/res/values-is/strings.xml +++ b/java/com/android/contacts/common/res/values-is/strings.xml @@ -70,10 +70,12 @@ "Í burtu" "Upptekin(n)" "Tengiliðir" + "Helstu tillögur" "Annað" "Skrá" "Vinnuskrá" "Allir tengiliðir" + "Tillögur" "Ég" "Leitar…" "Yfir %d fundust." @@ -248,7 +250,7 @@ "Sláðu inn texta til að senda með símtalinu..." "SENDA OG HRINGJA" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "Flipinn %1$s." Flipinn %1$s. %2$d ólesið atriði. diff --git a/java/com/android/contacts/common/res/values-it/strings.xml b/java/com/android/contacts/common/res/values-it/strings.xml index 8ea564854..1c4c769eb 100644 --- a/java/com/android/contacts/common/res/values-it/strings.xml +++ b/java/com/android/contacts/common/res/values-it/strings.xml @@ -70,10 +70,12 @@ "Assente" "Occupato" "Contatti" + "Suggerimenti più popolari" "Altro" "Directory" "Directory di lavoro" "Tutti i contatti" + "Suggerimenti" "Io" "Ricerca..." "Più di %d trovati." @@ -248,7 +250,7 @@ "Digita una nota da inviare con la chiamata..." "INVIA E CHIAMA" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "Scheda %1$s." Scheda %1$s. %2$d elementi da leggere. diff --git a/java/com/android/contacts/common/res/values-iw/strings.xml b/java/com/android/contacts/common/res/values-iw/strings.xml index 2a6b2c189..9f1fd4927 100644 --- a/java/com/android/contacts/common/res/values-iw/strings.xml +++ b/java/com/android/contacts/common/res/values-iw/strings.xml @@ -70,10 +70,12 @@ "לא נמצא" "לא פנוי" "אנשי קשר" + "הצעות מובילות" "אחר" "ספריה" "ספריית עבודה" "כל אנשי הקשר" + "הצעות" "אני" "מחפש..." "נמצאו יותר מ-%d." @@ -250,7 +252,7 @@ "הקלד הערה לשליחה עם השיחה..." "שלח והתקשר" "%1$s / %2$s" - "%1$s%2$s" + "‎%1$s %2$s‎" "הכרטיסייה %1$s." הכרטיסייה %1$s. %2$d פריטים שלא נקראו. diff --git a/java/com/android/contacts/common/res/values-ja/strings.xml b/java/com/android/contacts/common/res/values-ja/strings.xml index 3271b46bb..8dd776887 100644 --- a/java/com/android/contacts/common/res/values-ja/strings.xml +++ b/java/com/android/contacts/common/res/values-ja/strings.xml @@ -70,10 +70,12 @@ "不在" "取り込み中" "連絡先" + "おすすめ" "その他" "ディレクトリ" "仕事用の連絡先リスト" "すべての連絡先" + "候補" "自分" "検索中..." "%d件以上見つかりました。" @@ -248,7 +250,7 @@ "発信時に送信するメモを入力..." "送信 / 通話" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s タブ。" %1$s タブ。%2$d 件の未読項目。 diff --git a/java/com/android/contacts/common/res/values-ka/strings.xml b/java/com/android/contacts/common/res/values-ka/strings.xml index ebbee6e33..a7f536d25 100644 --- a/java/com/android/contacts/common/res/values-ka/strings.xml +++ b/java/com/android/contacts/common/res/values-ka/strings.xml @@ -70,10 +70,12 @@ "გასული" "დაკავებული" "კონტაქტები" + "საუკეთესო შეთავაზებები" "სხვა" "კატალოგი" "სამსახურის კატალოგი" "ყველა კონტაქტი" + "შეთავაზებები" "მე" "ძიება..." "ნაპოვნია %d-ზე მეტი." @@ -248,7 +250,7 @@ "აკრიფეთ შენიშვნა ზართან ერთად გასაგზავნად ..." "გაგზავნა და დარეკვა" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s ცხრ." %1$s ცხრ. %2$d წაუკითხავი ერთეული. diff --git a/java/com/android/contacts/common/res/values-kk/strings.xml b/java/com/android/contacts/common/res/values-kk/strings.xml index 327532abc..cf2f5f156 100644 --- a/java/com/android/contacts/common/res/values-kk/strings.xml +++ b/java/com/android/contacts/common/res/values-kk/strings.xml @@ -70,10 +70,12 @@ "Желіден тыс" "Бос емес" "Контактілер" + "Үздік ұсыныстар" "Басқа" "Анықтама" "Жұмыс каталогы" "Барлық контактілер" + "Ұсыныстар" "Мен" "Іздеуде…" "%d көбірек табылды." @@ -248,7 +250,7 @@ "Қоңыраумен жіберу үшін ескертпе теріңіз ..." "ЖІБЕРУ ЖӘНЕ ҚОҢЫРАУ ШАЛУ" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s қойындысы." %1$s қойындысы. %2$d оқылмаған элемент. diff --git a/java/com/android/contacts/common/res/values-km/strings.xml b/java/com/android/contacts/common/res/values-km/strings.xml index 503016792..d22ebb230 100644 --- a/java/com/android/contacts/common/res/values-km/strings.xml +++ b/java/com/android/contacts/common/res/values-km/strings.xml @@ -70,10 +70,12 @@ "ចាក​ឆ្ងាយ" "រវល់" "ទំនាក់ទំនង" + "បាន​ណែនាំ​​កម្រិត​ខ្ពស់" "ផ្សេងៗ" "ថត" "ថតកន្លែងការងារ" "ទំនាក់ទំនង​ទាំងអស់" + "ការ​ណែនាំ" "ខ្ញុំ" "កំពុង​ស្វែងរក..." "បាន​រក​ឃើញ​ច្រើន​ជាង %d ។" @@ -248,7 +250,7 @@ "វាយបញ្ចូលចំណាំដែលត្រូវផ្ញើជាមួយការហៅទូរស័ព្ទ ..." "ផ្ញើ & ហៅ" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "ផ្ទាំង %1$s។" ផ្ទាំង %1$s។ ធាតុមិនទាន់​អាន %2$d diff --git a/java/com/android/contacts/common/res/values-kn/strings.xml b/java/com/android/contacts/common/res/values-kn/strings.xml index 446e078a6..6b49a0bb4 100644 --- a/java/com/android/contacts/common/res/values-kn/strings.xml +++ b/java/com/android/contacts/common/res/values-kn/strings.xml @@ -70,10 +70,12 @@ "ದೂರ" "ಕಾರ್ಯನಿರತ" "ಸಂಪರ್ಕಗಳು" + "ಉನ್ನತ ಸಲಹೆ" "ಇತರೆ" "ಡೈರೆಕ್ಟರಿ" "ಕೆಲಸದ ಡೈರೆಕ್ಟರಿ" "ಎಲ್ಲಾ ಸಂಪರ್ಕಗಳು" + "ಸಲಹೆಗಳು" "ನಾನು" "ಹುಡುಕಲಾಗುತ್ತಿದೆ…" "%d ಗಿಂತ ಹೆಚ್ಚಾಗಿ ಕಂಡುಬಂದಿದೆ." @@ -248,7 +250,7 @@ "ಕರೆ ಕಳುಹಿಸಲು ಟಿಪ್ಪಣಿಯನ್ನು ಟೈಪ್ ಮಾಡಿ ..." "ಕಳುಹಿಸು ಮತ್ತು ಕರೆಮಾಡು" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s ಟ್ಯಾಬ್." %1$s ಟ್ಯಾಬ್. %2$d ಓದದಿರುವ ಐಟಂಗಳು. diff --git a/java/com/android/contacts/common/res/values-ko/strings.xml b/java/com/android/contacts/common/res/values-ko/strings.xml index 4c2bd4f62..f18659687 100644 --- a/java/com/android/contacts/common/res/values-ko/strings.xml +++ b/java/com/android/contacts/common/res/values-ko/strings.xml @@ -70,10 +70,12 @@ "자리 비움" "다른 용무 중" "주소록" + "인기 추천" "기타" "디렉토리" "직장 디렉토리" "모든 연락처" + "추천" "나" "검색 중..." "%d개 이상 찾았습니다." @@ -248,7 +250,7 @@ "통화에 함께 전송할 메모를 입력하세요..." "보내기 및 전화 걸기" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s 탭" %1$s 탭. 읽지 않은 항목 %2$d diff --git a/java/com/android/contacts/common/res/values-ky/strings.xml b/java/com/android/contacts/common/res/values-ky/strings.xml index e5bab4550..eaa7dccad 100644 --- a/java/com/android/contacts/common/res/values-ky/strings.xml +++ b/java/com/android/contacts/common/res/values-ky/strings.xml @@ -70,10 +70,12 @@ "Чыгып кетти" "Бош эмес" "Байланыштар" + "Эң көп сунушталгандар" "Башка" "Директорий" "Жумуш профилиндеги байланыштар китепчеси" "Бардык байланыштар" + "Сунуштар" "Мен" "Изделүүдө…" "%d ашык табылды." @@ -248,7 +250,7 @@ "Чалуу менен жөнөтүлө турган кыска жазууну териңиз …" "ЖӨНӨТҮҮ ЖАНА ЧАЛУУ" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "\"%1$s\" өтмөгү." \"%1$s\" өтмөгү. %2$d нерсе окула элек. diff --git a/java/com/android/contacts/common/res/values-lo/strings.xml b/java/com/android/contacts/common/res/values-lo/strings.xml index c649539d4..fa6d3c63a 100644 --- a/java/com/android/contacts/common/res/values-lo/strings.xml +++ b/java/com/android/contacts/common/res/values-lo/strings.xml @@ -70,10 +70,12 @@ "ບໍ່ຢູ່" "ບໍ່ຫວ່າງ" "ລາຍຊື່ຜູ້ຕິດຕໍ່" + "ແນະນຳຫຼາຍທີ່ສຸດ" "ອື່ນໆ" "ໄດເຣັກທໍຣີ" "ໄດເຣັກທໍຣີບ່ອນເຮັດວຽກ" "ລາຍຊື່ຜູ້ຕິດຕໍ່ທັງໝົດ" + "ຄຳແນະນຳ" "ຂ້ອຍ" "ກຳລັງຊອກຫາ..." "ພົບຫຼາຍກວ່າ %d ລາຍການ." @@ -248,7 +250,7 @@ "ພິມ​ບັນ​ທຶກ ເພື່ອ​ສົ່ງ​ກັບ​ການ​ໂທ ..." "ສົ່ງ ແລະ ໂທ" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "ແຖບ %1$s." ແຖບ %1$s. %2$d ລາຍການບໍ່ທັນໄດ້ອ່ານ. diff --git a/java/com/android/contacts/common/res/values-lt/strings.xml b/java/com/android/contacts/common/res/values-lt/strings.xml index b74bd99ee..b577260e1 100644 --- a/java/com/android/contacts/common/res/values-lt/strings.xml +++ b/java/com/android/contacts/common/res/values-lt/strings.xml @@ -70,10 +70,12 @@ "Pasišalinęs" "Užsiėmęs" "Adresinė" + "Populiariausi siūlomi" "Kita" "Katalogas" "Darbo katalogas" "Visi kontaktai" + "Pasiūlymai" "Aš" "Ieškoma…" "Rasta daugiau nei %d." @@ -250,7 +252,7 @@ "Įveskite užrašą, kurį galima išsiųsti skambinant..." "SIŲSTI IR SKAMBINTI" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "Skirtukas „%1$s“." Skirtukas „%1$s“. %2$d neskaitytas elementas. diff --git a/java/com/android/contacts/common/res/values-lv/strings.xml b/java/com/android/contacts/common/res/values-lv/strings.xml index c09a27f5d..81551e220 100644 --- a/java/com/android/contacts/common/res/values-lv/strings.xml +++ b/java/com/android/contacts/common/res/values-lv/strings.xml @@ -70,10 +70,12 @@ "Prombūtnē" "Aizņemts" "Kontaktpersonas" + "Populārākie ieteikumi" "Cits" "Katalogs" "Darba katalogs" "Visas kontaktpersonas" + "Ieteikumi" "Es" "Notiek meklēšana…" "Atrastas vairāk nekā %d kontaktpersonas." @@ -249,7 +251,7 @@ "Ierakstiet piezīmi, ko nosūtīt ar zvanu..." "SŪTĪT UN ZVANĪT" "%1$s no %2$s" - "%1$s • %2$s" + "%1$s: %2$s" "Cilne “%1$s”" Cilne “%1$s”. %2$d nelasīti vienumi. diff --git a/java/com/android/contacts/common/res/values-mk/strings.xml b/java/com/android/contacts/common/res/values-mk/strings.xml index da1530f2a..475ea174e 100644 --- a/java/com/android/contacts/common/res/values-mk/strings.xml +++ b/java/com/android/contacts/common/res/values-mk/strings.xml @@ -70,10 +70,12 @@ "Отсутен" "Зафатен" "Контакти" + "Нејдобри предложени" "Друг" "Адресар" "Работен директориум" "Сите контакти" + "Предлози" "Јас" "Се пребарува..." "Повеќе од %d се пронајдени." @@ -248,7 +250,7 @@ "Напишете белешка да се испрати со повикот..." "ИСПРАТИ И ПОВИКАЈ" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "Картичка %1$s." Картичка %1$s. %2$d непрочитана ставка. diff --git a/java/com/android/contacts/common/res/values-ml/strings.xml b/java/com/android/contacts/common/res/values-ml/strings.xml index 7e927499a..969a99b5a 100644 --- a/java/com/android/contacts/common/res/values-ml/strings.xml +++ b/java/com/android/contacts/common/res/values-ml/strings.xml @@ -70,10 +70,12 @@ "ലഭ്യമല്ല" "തിരക്കിലാണ്" "കോണ്ടാക്റ്റ്" + "കൂടുതൽ നിർദ്ദേശിച്ചിരിക്കുന്നവ" "മറ്റുള്ളവ" "ഡയറക്‌ടറി" "ഔദ്യോഗിക ഡയറക്‌ടറി" "എല്ലാ കോൺടാക്റ്റുകളും" + "നിര്‍ദ്ദേശങ്ങള്‍" "ഞാന്‍" "തിരയുന്നു…" "%d-ൽ കൂടുതൽ കണ്ടെത്തി." @@ -248,7 +250,7 @@ "കോളിനൊപ്പം അയയ്ക്കുന്നതിന് ഒരു കുറിപ്പ് ടൈപ്പുചെയ്യുക ..." "അയയ്‌ക്കുകയും വിളിക്കുകയും ചെയ്യുക" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s ടാബ്." %1$s ടാബ്. %2$d വായിക്കാത്ത ഇനങ്ങൾ. diff --git a/java/com/android/contacts/common/res/values-mn/strings.xml b/java/com/android/contacts/common/res/values-mn/strings.xml index f0a8c9245..12fba53c7 100644 --- a/java/com/android/contacts/common/res/values-mn/strings.xml +++ b/java/com/android/contacts/common/res/values-mn/strings.xml @@ -70,10 +70,12 @@ "Холдсон" "Завгүй" "Харилцагчид" + "Санал болгосон шилдэг" "Бусад" "Директор" "Ажлын лавлагаа" "Бүх харилцагчид" + "Санал болголт" "Би" "Хайж байна..." "%d-с олон олдлоо." @@ -248,7 +250,7 @@ "Дуудлаганд илгээх тэмдэглэл бичнэ үү..." "ИЛГЭЭХ, ДУУДЛАГА" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s таб." %1$s таб. %2$d уншаагүй зүйл. diff --git a/java/com/android/contacts/common/res/values-mr/strings.xml b/java/com/android/contacts/common/res/values-mr/strings.xml index 96504c7bc..8770f8b53 100644 --- a/java/com/android/contacts/common/res/values-mr/strings.xml +++ b/java/com/android/contacts/common/res/values-mr/strings.xml @@ -70,10 +70,12 @@ "दूर आहे" "व्यस्त" "संपर्क" + "सुचविलेले उत्कृष्ट" "इतर" "निर्देशिका" "कार्य निर्देशिका" "सर्व संपर्क" + "सूचना" "मी" "शोधत आहे..." "%d पेक्षा जास्त आढळले." @@ -248,7 +250,7 @@ "कॉलसह पाठविण्‍यासाठी एक टीप टाइप करा..." "पाठवा आणि कॉल करा" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s टॅब." %1$s टॅब. %2$d न वाचलेला आयटम. diff --git a/java/com/android/contacts/common/res/values-ms/strings.xml b/java/com/android/contacts/common/res/values-ms/strings.xml index 60d2b7acc..45c297f60 100644 --- a/java/com/android/contacts/common/res/values-ms/strings.xml +++ b/java/com/android/contacts/common/res/values-ms/strings.xml @@ -70,10 +70,12 @@ "Tiada" "Sibuk" "Kenalan" + "Teratas Dicadangkan" "Lain-lain" "Direktori" "Direktori kerja" "Semua kenalan" + "Cadangan" "Saya" "Mencari..." "lebih daripada %d ditemui" @@ -248,7 +250,7 @@ "Taip nota untuk dihantar dengan panggilan…" "HANTAR & PANGGIL" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "Tab %1$s." Tab %1$s. %2$d item belum dibaca. diff --git a/java/com/android/contacts/common/res/values-my/strings.xml b/java/com/android/contacts/common/res/values-my/strings.xml index d81e8950d..6fbad16be 100644 --- a/java/com/android/contacts/common/res/values-my/strings.xml +++ b/java/com/android/contacts/common/res/values-my/strings.xml @@ -70,10 +70,12 @@ "အဝေးရောက်နေပါသည်" "အလုပ်များနေသည်" "အဆက်အသွယ်များ" + "ထိပ်တန်း အကြံပြုထားပါသည်" "တစ်ခြား" "လမ်းညွှန်" "အလုပ်လမ်းညွှန်" "လိပ်စာများအားလုံး" + "အကြံပြုချက်များ" "ကျွန်ုပ်" "ရှာဖွေနေသည်…" "%d ထက်ပိုတွေ့ရှိသည်" @@ -248,7 +250,7 @@ "ခေါ်ဆိုမှုဖြင့် ပေးပို့ရန် မှတ်စုတစ်ခု ရိုက်ပါ ..." "ပေးပို့ပြီး ခေါ်ပါ" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s တဘ်။" %1$s တဘ်။ မဖတ်ရသေးသည့် အရာ %2$d ခု။ diff --git a/java/com/android/contacts/common/res/values-nb/strings.xml b/java/com/android/contacts/common/res/values-nb/strings.xml index 7085cb381..8162ee732 100644 --- a/java/com/android/contacts/common/res/values-nb/strings.xml +++ b/java/com/android/contacts/common/res/values-nb/strings.xml @@ -70,10 +70,12 @@ "Borte" "Opptatt" "Kontakter" + "Toppforslag" "Annen" "Katalog" "Jobbkatalog" "Alle kontakter" + "Forslag" "Meg" "Søker …" "Fant mer enn %d." @@ -248,7 +250,7 @@ "Skriv et notat du vil sende med anropet …" "SEND OG RING" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s-fanen." %1$s-fanen. %2$d uleste elementer. diff --git a/java/com/android/contacts/common/res/values-ne/strings.xml b/java/com/android/contacts/common/res/values-ne/strings.xml index 1f54232af..0034852e6 100644 --- a/java/com/android/contacts/common/res/values-ne/strings.xml +++ b/java/com/android/contacts/common/res/values-ne/strings.xml @@ -70,10 +70,12 @@ "टाढा" "व्यस्त" "सम्पर्क" + "सबैभन्दा धेरै सुझाव दिइएको" "अन्य" "निर्देशिका" "कार्यको निर्देशिका" "सबै सम्पर्कहरू" + "सुझावहरू" "म" "खोजी गर्दै..." "%dभन्दा बढी पाइयो।" @@ -248,7 +250,7 @@ "यस कलसँग पठाउन एक टिप्पणी टाइप गर्नुहोस्" "पठाउनुहोस् र कल गर्नुहोस्" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s ट्याब।" %1$s ट्याब। %2$d नपढिएका वस्तुहरू। diff --git a/java/com/android/contacts/common/res/values-nl/strings.xml b/java/com/android/contacts/common/res/values-nl/strings.xml index 9d41899f1..e8f1b150b 100644 --- a/java/com/android/contacts/common/res/values-nl/strings.xml +++ b/java/com/android/contacts/common/res/values-nl/strings.xml @@ -70,10 +70,12 @@ "Niet beschikbaar" "Bezet" "Contacten" + "Populaire suggesties" "Overig" "Directory" "Zakelijke contactenlijst" "Alle contacten" + "Suggesties" "Ik" "Zoeken..." "Meer dan %d gevonden." @@ -248,7 +250,7 @@ "Typ een notitie om te verzenden met de oproep..." "VERZENDEN EN BELLEN" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "Tabblad %1$s." Tabblad %1$s. %2$d ongelezen items. diff --git a/java/com/android/contacts/common/res/values-no/strings.xml b/java/com/android/contacts/common/res/values-no/strings.xml index 7085cb381..8162ee732 100644 --- a/java/com/android/contacts/common/res/values-no/strings.xml +++ b/java/com/android/contacts/common/res/values-no/strings.xml @@ -70,10 +70,12 @@ "Borte" "Opptatt" "Kontakter" + "Toppforslag" "Annen" "Katalog" "Jobbkatalog" "Alle kontakter" + "Forslag" "Meg" "Søker …" "Fant mer enn %d." @@ -248,7 +250,7 @@ "Skriv et notat du vil sende med anropet …" "SEND OG RING" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s-fanen." %1$s-fanen. %2$d uleste elementer. diff --git a/java/com/android/contacts/common/res/values-pa/strings.xml b/java/com/android/contacts/common/res/values-pa/strings.xml index c96510cc7..8a1a13441 100644 --- a/java/com/android/contacts/common/res/values-pa/strings.xml +++ b/java/com/android/contacts/common/res/values-pa/strings.xml @@ -70,10 +70,12 @@ "ਦੂਰ" "ਰੁੱਝਾ ਹੋਇਆ ਹੈ" "ਸੰਪਰਕ" + "ਪ੍ਰਮੁੱਖ ਸੁਝਾਏ ਗਏ" "ਹੋਰ" "ਡਾਇਰੈਕਟਰੀ" "ਕੰਮ ਡਾਇਰੈਕਟਰੀ" "ਸਾਰੇ ਸੰਪਰਕ" + "ਸੁਝਾਅ" "ਮੈਂ" "ਖੋਜ ਰਿਹਾ ਹੈ..." "%d ਤੋਂ ਵੱਧ ਮਿਲੇ।" @@ -248,7 +250,7 @@ "ਕਾਲ ਦੇ ਨਾਲ ਭੇਜਣ ਲਈ ਕੋਈ ਨੋਟ ਟਾਈਪ ਕਰੋ ..." "ਭੇਜੋ ਅਤੇ ਕਾਲ ਕਰੋ" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s ਟੈਬ।" %1$s ਟੈਬ। %2$d ਅਣ-ਪੜ੍ਹੀਆਂ ਆਈਟਮਾਂ। diff --git a/java/com/android/contacts/common/res/values-pl/strings.xml b/java/com/android/contacts/common/res/values-pl/strings.xml index c4e65f556..37d5b621e 100644 --- a/java/com/android/contacts/common/res/values-pl/strings.xml +++ b/java/com/android/contacts/common/res/values-pl/strings.xml @@ -70,10 +70,12 @@ "Nieobecny" "Zajęty" "Kontakty" + "Najlepsze sugestie" "Inny" "Katalog" "Katalog służbowy" "Wszystkie kontakty" + "Sugestie" "Ja" "Wyszukiwanie..." "Znaleziono więcej niż %d." @@ -250,7 +252,7 @@ "Wpisz notatkę, którą chcesz wysłać razem z połączeniem..." "WYŚLIJ I ZADZWOŃ" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "Karta %1$s." Karta %1$s. %2$d nieprzeczytane elementy. diff --git a/java/com/android/contacts/common/res/values-pt-rBR/strings.xml b/java/com/android/contacts/common/res/values-pt-rBR/strings.xml index ee2b87c68..5083c4ad0 100644 --- a/java/com/android/contacts/common/res/values-pt-rBR/strings.xml +++ b/java/com/android/contacts/common/res/values-pt-rBR/strings.xml @@ -70,10 +70,12 @@ "Ausente" "Ocupado" "Contatos" + "Principais sugestões" "Outros" "Diretório" "Diretório de trabalho" "Todos os contatos" + "Sugestões" "Eu" "Pesquisando..." "Mais de %d encontrados." @@ -248,7 +250,7 @@ "Escreva uma nota para enviar com a chamada..." "ENVIAR E LIGAR" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "Guia \"%1$s\"." Guia \"%1$s\". %2$d item não lido. diff --git a/java/com/android/contacts/common/res/values-pt-rPT/strings.xml b/java/com/android/contacts/common/res/values-pt-rPT/strings.xml index 44bba149d..298b7a263 100644 --- a/java/com/android/contacts/common/res/values-pt-rPT/strings.xml +++ b/java/com/android/contacts/common/res/values-pt-rPT/strings.xml @@ -70,10 +70,12 @@ "Ausente" "Ocupado(a)" "Contactos" + "Principais sugestões" "Outro" "Diretório" "Diretório de trabalho" "Todos os contactos" + "Sugestões" "Eu" "A pesquisar..." "Foram encontrados mais de %d." @@ -248,7 +250,7 @@ "Escrever uma nota para enviar com a chamada..." "ENVIAR E LIGAR" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "Separador %1$s." %1$s tab. %2$d unread items. diff --git a/java/com/android/contacts/common/res/values-pt/strings.xml b/java/com/android/contacts/common/res/values-pt/strings.xml index ee2b87c68..5083c4ad0 100644 --- a/java/com/android/contacts/common/res/values-pt/strings.xml +++ b/java/com/android/contacts/common/res/values-pt/strings.xml @@ -70,10 +70,12 @@ "Ausente" "Ocupado" "Contatos" + "Principais sugestões" "Outros" "Diretório" "Diretório de trabalho" "Todos os contatos" + "Sugestões" "Eu" "Pesquisando..." "Mais de %d encontrados." @@ -248,7 +250,7 @@ "Escreva uma nota para enviar com a chamada..." "ENVIAR E LIGAR" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "Guia \"%1$s\"." Guia \"%1$s\". %2$d item não lido. diff --git a/java/com/android/contacts/common/res/values-ro/strings.xml b/java/com/android/contacts/common/res/values-ro/strings.xml index 358e7af93..2fd5e5b06 100644 --- a/java/com/android/contacts/common/res/values-ro/strings.xml +++ b/java/com/android/contacts/common/res/values-ro/strings.xml @@ -70,10 +70,12 @@ "Plecat(ă)" "Ocupat(ă)" "Agendă" + "Cele mai populare sugestii" "Altul" "Director" "Directorul de serviciu" "Toată agenda" + "Sugestii" "Eu" "Se caută…" "S-au găsit peste %d persoane de contact." @@ -249,7 +251,7 @@ "Introduceți o notă ca să o trimiteți împreună cu apelul..." "TRIMITEȚI ȘI APELAȚI" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "Fila %1$s" Fila %1$s. %2$d elemente necitite. diff --git a/java/com/android/contacts/common/res/values-ru/strings.xml b/java/com/android/contacts/common/res/values-ru/strings.xml index 3442f2c60..530732edf 100644 --- a/java/com/android/contacts/common/res/values-ru/strings.xml +++ b/java/com/android/contacts/common/res/values-ru/strings.xml @@ -70,10 +70,12 @@ "Отсутствует" "Не беспокоить" "Контакты" + "Топ рекомендуемых" "Другое" "Каталог" "Каталог контактов из рабочего профиля" "Все контакты" + "Рекомендуемые" "Вы" "Поиск…" "Найдено контактов: более %d" @@ -250,7 +252,7 @@ "Введите текст…" "ОТПРАВИТЬ И ПОЗВОНИТЬ" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "Вкладка \"%1$s\"." Вкладка %1$s. %2$d непрочитанный элемент. diff --git a/java/com/android/contacts/common/res/values-si/strings.xml b/java/com/android/contacts/common/res/values-si/strings.xml index 72ca32d9c..1bd906332 100644 --- a/java/com/android/contacts/common/res/values-si/strings.xml +++ b/java/com/android/contacts/common/res/values-si/strings.xml @@ -70,10 +70,12 @@ "ළඟ නැත" "කාර්යබහුල" "සම්බන්ධතා" + "ඉහළින්ම යෝජිත" "වෙනත්" "නාමාවලිය" "කාර්යාල සම්බන්ධතා නාමාවලිය" "සියලුම සම්බන්ධතා" + "යෝජනා" "මම" "සොයමින්..." "%d ට වඩා සොයාගන්නා ලදී." @@ -248,7 +250,7 @@ "ඇමතුම සමග යැවීමට සටහනක් ටයිප් කරන්න ..." "යවන්න සහ අමතන්න" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s ටැබය." %1$s ටැබය. නොකියවූ අයිතම %2$d. diff --git a/java/com/android/contacts/common/res/values-sk/strings.xml b/java/com/android/contacts/common/res/values-sk/strings.xml index b85f63f1b..59d666e5e 100644 --- a/java/com/android/contacts/common/res/values-sk/strings.xml +++ b/java/com/android/contacts/common/res/values-sk/strings.xml @@ -70,10 +70,12 @@ "Som preč" "Nemám čas" "Kontakty" + "Najviac odporúčané" "Iné" "Adresár" "Pracovný adresár" "Všetky kontakty" + "Návrhy" "Ja" "Hľadá sa…" "Našlo sa viac ako %d." @@ -250,7 +252,7 @@ "Napíšte poznámku, ktorá sa odošle s hovorom..." "ODOSLAŤ A VOLAŤ" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "Karta %1$s." Karta %1$s. %2$d neprečítané položky. diff --git a/java/com/android/contacts/common/res/values-sl/strings.xml b/java/com/android/contacts/common/res/values-sl/strings.xml index f4c39dea9..dc6e690da 100644 --- a/java/com/android/contacts/common/res/values-sl/strings.xml +++ b/java/com/android/contacts/common/res/values-sl/strings.xml @@ -70,10 +70,12 @@ "Odsoten" "Zaseden" "Stiki" + "Najboljši predlogi" "Drugo" "Imenik" "Delovni imenik" "Vsi stiki" + "Predlogi" "Jaz" "Iskanje ..." "Najdenih je bilo več kot toliko stikov: %d." @@ -250,7 +252,7 @@ "Vnesite zapisek, ki ga želite poslati s klicem ..." "POŠLJI IN KLIČI" "%1$s/%2$s" - "%1$s%2$s" + "%1$s: %2$s" "Zavihek »%1$s«." Zavihek »%1$s«. %2$d neprebran element. diff --git a/java/com/android/contacts/common/res/values-sq/strings.xml b/java/com/android/contacts/common/res/values-sq/strings.xml index 553c46df5..64b43889c 100644 --- a/java/com/android/contacts/common/res/values-sq/strings.xml +++ b/java/com/android/contacts/common/res/values-sq/strings.xml @@ -70,10 +70,12 @@ "I larguar" "I zënë" "Kontaktet" + "Sugjerimet kryesore" "Tjetër" "Direktoria" "Direktoria e punës" "Të gjitha kontaktet" + "Sugjerimet" "Unë" "Po kërkon..." "U gjetën më shumë se %d." @@ -248,7 +250,7 @@ "Shkruaj një shënim për të dërguar një telefonatë..." "DËRGO DHE TELEFONO" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "Skeda %1$s." Skeda %1$s. %2$d artikuj të palexuar. diff --git a/java/com/android/contacts/common/res/values-sr/strings.xml b/java/com/android/contacts/common/res/values-sr/strings.xml index 99997e656..e139662e2 100644 --- a/java/com/android/contacts/common/res/values-sr/strings.xml +++ b/java/com/android/contacts/common/res/values-sr/strings.xml @@ -70,10 +70,12 @@ "Одсутан/на" "Заузет/а" "Контакти" + "Најпопуларнији предлози" "Другo" "Директоријум" "Директоријум за Work" "Сви контакти" + "Предлози" "Ја" "Претражује се…" "Пронађено је више од %d." @@ -249,7 +251,7 @@ "Унесите белешку коју ћете послати уз позив..." "ПОШАЉИ И ПОЗОВИ" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "Картица %1$s." Картица %1$s. %2$d непрочитана ставка. diff --git a/java/com/android/contacts/common/res/values-sv/strings.xml b/java/com/android/contacts/common/res/values-sv/strings.xml index 79e56e504..cd095179b 100644 --- a/java/com/android/contacts/common/res/values-sv/strings.xml +++ b/java/com/android/contacts/common/res/values-sv/strings.xml @@ -70,10 +70,12 @@ "Borta" "Upptagen" "Kontakter" + "Bästa förslagen" "Övrigt" "Katalog" "Jobbkatalog" "Alla kontakter" + "Förslag" "Jag" "Söker…" "Fler än %d hittades." @@ -248,7 +250,7 @@ "Gör en anteckning som skickas när du ringer …" "SKICKA OCH RING" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "Fliken %1$s." Fliken %1$s. %2$d olästa poster. diff --git a/java/com/android/contacts/common/res/values-sw/strings.xml b/java/com/android/contacts/common/res/values-sw/strings.xml index 4d30271f3..5c41d8780 100644 --- a/java/com/android/contacts/common/res/values-sw/strings.xml +++ b/java/com/android/contacts/common/res/values-sw/strings.xml @@ -70,10 +70,12 @@ "Mbali" "Ana shughuli" "Anwani" + "Mapendekezo Maarufu" "Nyingineyo" "Saraka" "Anwani za kazi" "Anwani zote" + "Mapendekezo" "Mimi" "Inatafuta…" "Zaidi ya %d zimepatikana." @@ -248,7 +250,7 @@ "Andika dokezo litakaloambatana na simu utakayopiga ..." "TUMA na UPIGE SIMU" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "Kichupo cha %1$s." Kichupo cha %1$s. Vipengee %2$d havijasomwa. diff --git a/java/com/android/contacts/common/res/values-ta/strings.xml b/java/com/android/contacts/common/res/values-ta/strings.xml index e041a999d..df7ee067c 100644 --- a/java/com/android/contacts/common/res/values-ta/strings.xml +++ b/java/com/android/contacts/common/res/values-ta/strings.xml @@ -70,10 +70,12 @@ "வெளியே" "பணிமிகுதி" "தொடர்புகள்" + "அதிகம் பரிந்துரைத்தவை" "மற்றவை" "கோப்பகம்" "பணிக் கோப்பகம்" "எல்லா தொடர்புகளும்" + "பரிந்துரைகள்" "எனக்கு" "தேடுகிறது..." "%d க்கும் மேற்பட்டவை கண்டறியப்பட்டன." @@ -248,7 +250,7 @@ "அழைப்புடன் சேர்த்து அனுப்ப, குறிப்பை உள்ளிடவும்..." "அனுப்பி அழை" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s தாவல்." %1$s தாவல். படிக்காதவை (%2$d). diff --git a/java/com/android/contacts/common/res/values-te/strings.xml b/java/com/android/contacts/common/res/values-te/strings.xml index 6dd0e2143..c97cded6a 100644 --- a/java/com/android/contacts/common/res/values-te/strings.xml +++ b/java/com/android/contacts/common/res/values-te/strings.xml @@ -70,10 +70,12 @@ "దూరంగా ఉన్నారు" "బిజీగా ఉన్నారు" "పరిచయాలు" + "ఉత్తమ సూచనలు" "ఇతరం" "డైరెక్టరీ" "కార్యాలయ డైరెక్టరీ" "అన్ని పరిచయాలు" + "సూచనలు" "నేను" "శోధిస్తోంది..." "%d కంటే ఎక్కువ కనుగొనబడ్డాయి." @@ -248,7 +250,7 @@ "కాల్‌తో పాటు పంపడానికి గమనికను టైప్ చేయండి ..." "పంపు & కాల్ చేయి" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s ట్యాబ్." %1$s ట్యాబ్. %2$d చదవని అంశాలు. diff --git a/java/com/android/contacts/common/res/values-th/strings.xml b/java/com/android/contacts/common/res/values-th/strings.xml index b979e7424..aff4a9c5d 100644 --- a/java/com/android/contacts/common/res/values-th/strings.xml +++ b/java/com/android/contacts/common/res/values-th/strings.xml @@ -70,10 +70,12 @@ "ไม่อยู่" "ไม่ว่าง" "รายชื่อติดต่อ" + "รายการแนะนำยอดนิยม" "อื่นๆ" "ไดเรกทอรี" "ไดเรกทอรีที่ทำงาน" "รายชื่อติดต่อทั้งหมด" + "รายการแนะนำ" "ฉัน" "กำลังค้นหา…" "พบมากกว่า %d รายการ" @@ -248,7 +250,7 @@ "พิมพ์โน้ตเพื่อส่งพร้อมการโทร ..." "ส่งและโทร" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "แท็บ %1$s" แท็บ %1$s ยังไม่อ่าน %2$d รายการ diff --git a/java/com/android/contacts/common/res/values-tl/strings.xml b/java/com/android/contacts/common/res/values-tl/strings.xml index 62caef820..edf2cafeb 100644 --- a/java/com/android/contacts/common/res/values-tl/strings.xml +++ b/java/com/android/contacts/common/res/values-tl/strings.xml @@ -70,10 +70,12 @@ "Wala" "Abala" "Mga Contact" + "Mga Madalas Imungkahi" "Iba pa" "Direktoryo" "Directory sa trabaho" "Lahat ng mga contact" + "Mga Mungkahi" "Ako" "Naghahanap…" "Higit sa %d ang nakita." @@ -248,7 +250,7 @@ "Mag-type ng isang tala na ipadadala kasama ng tawag ..." "IPADALA AT TAWAGAN" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "Tab ng %1$s." Tab ng %1$s. %2$d hindi pa nababasang item. diff --git a/java/com/android/contacts/common/res/values-tr/strings.xml b/java/com/android/contacts/common/res/values-tr/strings.xml index ce3c109d2..9ec983f02 100644 --- a/java/com/android/contacts/common/res/values-tr/strings.xml +++ b/java/com/android/contacts/common/res/values-tr/strings.xml @@ -70,10 +70,12 @@ "Dışarıda" "Meşgul" "Kişiler" + "En Çok Önerilenler" "Diğer" "Dizin" "İş dizini" "Tüm kişiler" + "Öneriler" "Ben" "Aranıyor..." "%d kişiden fazla bulundu." @@ -248,7 +250,7 @@ "Çağrıyla göndermek için bir not yazın..." "GÖNDER VE ARA" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s sekmesi." %1$s sekmesi. %2$d okunmamış öğe. diff --git a/java/com/android/contacts/common/res/values-uk/strings.xml b/java/com/android/contacts/common/res/values-uk/strings.xml index f6d1e4731..6d5d4eb0a 100644 --- a/java/com/android/contacts/common/res/values-uk/strings.xml +++ b/java/com/android/contacts/common/res/values-uk/strings.xml @@ -70,10 +70,12 @@ "Не на місці" "Не турбувати" "Контакти" + "Найкращі пропозиції" "Інші" "Каталог" "Робочі контакти" "Усі контакти" + "Пропозиції" "Я" "Пошук…" "Знайдено понад %d." @@ -250,7 +252,7 @@ "Введіть нотатку, яку хочете надіслати під час дзвінка…" "ЗАТЕЛЕФОНУВАТИ Й НАДІСЛАТИ" "%1$s з %2$s" - "%1$s%2$s" + "%1$s %2$s" "Вкладка \"%1$s\"." Вкладка \"%1$s\". %2$d непрочитаний елемент. diff --git a/java/com/android/contacts/common/res/values-ur/strings.xml b/java/com/android/contacts/common/res/values-ur/strings.xml index b34c78d95..79cf8335d 100644 --- a/java/com/android/contacts/common/res/values-ur/strings.xml +++ b/java/com/android/contacts/common/res/values-ur/strings.xml @@ -70,10 +70,12 @@ "دور" "مصروف" "رابطے" + "سرفہرست تجویز کردہ" "دیگر" "ڈائریکٹری" "دفتری ڈائرکٹری" "سبھی رابطے" + "تجاویز" "میں" "تلاش کر رہا ہے…" "%d سے زیادہ ملے۔" @@ -248,7 +250,7 @@ "کال کے ساتھ بھیجنے کیلئے ایک نوٹ ٹائپ کریں…" "بھیجیں اور کال کریں" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s ٹیب۔" %1$s ٹیب۔ %2$d بغیر پڑھی ہوئی آئٹمز۔ diff --git a/java/com/android/contacts/common/res/values-uz/strings.xml b/java/com/android/contacts/common/res/values-uz/strings.xml index 44bfd9999..489846fcb 100644 --- a/java/com/android/contacts/common/res/values-uz/strings.xml +++ b/java/com/android/contacts/common/res/values-uz/strings.xml @@ -70,10 +70,12 @@ "Tashqarida" "Band" "Kontaktlar" + "Eng faol" "Boshqa" "Direktoriya" "Ishchi katalogi" "Barcha kontaktlar" + "Takliflar" "Men" "Qidirilmoqda…" "%ddan ko‘proq topildi." @@ -248,7 +250,7 @@ "Qo‘ng‘iroqqa qo‘shib yuborish uchun izoh yozing ..." "YUBORISH va QO‘NG‘IROQ QILISH" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s ichki oynasi." %1$s ichki oynasi. %2$d ta o‘qilmagan narsa. diff --git a/java/com/android/contacts/common/res/values-vi/strings.xml b/java/com/android/contacts/common/res/values-vi/strings.xml index dadb78a7d..65a1c65a4 100644 --- a/java/com/android/contacts/common/res/values-vi/strings.xml +++ b/java/com/android/contacts/common/res/values-vi/strings.xml @@ -70,10 +70,12 @@ "Đã ra ngoài" "Bận" "Danh bạ" + "Đề xuất hàng đầu" "Khác" "Thư mục" "Thư mục công việc" "Tất cả liên hệ" + "Đề xuất" "Tôi" "Đang tìm kiếm…" "Đã tìm thấy hơn %d người liên hệ." @@ -248,7 +250,7 @@ "Nhập ghi chú để gửi kèm cuộc gọi..." "GỬI và GỌI" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "Tab %1$s." Tab %1$s. %2$d mục chưa đọc. diff --git a/java/com/android/contacts/common/res/values-zh-rCN/strings.xml b/java/com/android/contacts/common/res/values-zh-rCN/strings.xml index 161638e66..ee4451378 100644 --- a/java/com/android/contacts/common/res/values-zh-rCN/strings.xml +++ b/java/com/android/contacts/common/res/values-zh-rCN/strings.xml @@ -70,10 +70,12 @@ "离开" "忙碌" "通讯录" + "常用联系人推荐" "其他" "目录" "工作目录" "所有联系人" + "建议" "我" "正在搜索..." "找到超过 %d 位联系人。" @@ -248,7 +250,7 @@ "输入要在拨打电话时发送的备注…" "发送并拨打电话" "%1$s / %2$s" - "%1$s%2$s" + "%1$s%2$s" "%1$s标签。" %1$s标签。%2$d 项未读内容。 diff --git a/java/com/android/contacts/common/res/values-zh-rHK/strings.xml b/java/com/android/contacts/common/res/values-zh-rHK/strings.xml index 9952ab626..122d0febc 100644 --- a/java/com/android/contacts/common/res/values-zh-rHK/strings.xml +++ b/java/com/android/contacts/common/res/values-zh-rHK/strings.xml @@ -70,10 +70,12 @@ "離開" "忙碌" "通訊錄" + "熱門建議" "其他" "名錄" "工作目錄" "所有聯絡人" + "建議" "我" "正在搜尋..." "找到超過 %d 位聯絡人。" @@ -248,7 +250,7 @@ "撥號時可以書寫和傳送筆記…" "傳送和撥號" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "「%1$s」標籤。" %1$s」標籤 (%2$d 個未讀取項目)。 diff --git a/java/com/android/contacts/common/res/values-zh-rTW/strings.xml b/java/com/android/contacts/common/res/values-zh-rTW/strings.xml index e5ad61fac..64b6105cf 100644 --- a/java/com/android/contacts/common/res/values-zh-rTW/strings.xml +++ b/java/com/android/contacts/common/res/values-zh-rTW/strings.xml @@ -70,10 +70,12 @@ "離開" "忙碌" "聯絡人" + "常用聯絡人建議" "其他" "目錄" "Work 聯絡人目錄" "所有聯絡人" + "建議" "我" "搜尋中…" "找到 %d 位以上的聯絡人。" @@ -248,7 +250,7 @@ "輸入可在撥號時傳送的備註..." "傳送並撥打" "%1$s/%2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s分頁。" %1$s分頁。%2$d 個未讀項目。 diff --git a/java/com/android/contacts/common/res/values-zu/strings.xml b/java/com/android/contacts/common/res/values-zu/strings.xml index adca1399c..e78a6b392 100644 --- a/java/com/android/contacts/common/res/values-zu/strings.xml +++ b/java/com/android/contacts/common/res/values-zu/strings.xml @@ -70,10 +70,12 @@ "Ngiphumile" "Ngimatasa" "Othi tana nabo" + "Okuphezulu okuphakanyisiwe" "Okunye" "Uhla lwemibhalo" "Uhla lwemibhalo lomsebenzi" "Bonke othintana nabo" + "Iziphakamiso" "Mina" "Iyasesha..." "Abangaphezu kuka-%d abatholakele." @@ -248,7 +250,7 @@ "Thayipha inothi ukuthumela nekholi ..." "THUMELA FUTHI YENZA IKHOLI" "%1$s / %2$s" - "%1$s%2$s" + "%1$s %2$s" "%1$s ithebhu." %1$s ithebhu. %2$d izinto ezingafundiwe. diff --git a/java/com/android/contacts/common/res/values/dimens.xml b/java/com/android/contacts/common/res/values/dimens.xml index 642eb31a4..26f095f39 100644 --- a/java/com/android/contacts/common/res/values/dimens.xml +++ b/java/com/android/contacts/common/res/values/dimens.xml @@ -107,7 +107,7 @@ 2dp 14sp - 2dp + 0dp 16dp 2dp 0dp diff --git a/java/com/android/contacts/common/res/values/ids.xml b/java/com/android/contacts/common/res/values/ids.xml index 871f5a636..65969c43f 100644 --- a/java/com/android/contacts/common/res/values/ids.xml +++ b/java/com/android/contacts/common/res/values/ids.xml @@ -27,4 +27,5 @@ + diff --git a/java/com/android/contacts/common/res/values/strings.xml b/java/com/android/contacts/common/res/values/strings.xml index 9ac9fef28..85866f736 100644 --- a/java/com/android/contacts/common/res/values/strings.xml +++ b/java/com/android/contacts/common/res/values/strings.xml @@ -143,6 +143,9 @@ Contacts + + Top Suggested + Other @@ -155,6 +158,9 @@ All contacts + + Suggestions + Me @@ -744,9 +750,9 @@ compared to the character limit. Example: 2 / 64 --> %1$s / %2$s - - %1$s%2$s + + %1$s %2$s %1$s tab. diff --git a/java/com/android/contacts/common/res/values/styles.xml b/java/com/android/contacts/common/res/values/styles.xml index 07d4a0225..bb19afe82 100644 --- a/java/com/android/contacts/common/res/values/styles.xml +++ b/java/com/android/contacts/common/res/values/styles.xml @@ -43,7 +43,6 @@ background and text color. See also android:style/Widget.Holo.TextView.ListSepar wrap_content @dimen/list_section_divider_min_height - @drawable/list_section_divider_holo_custom @style/DirectoryHeaderStyle center_vertical 8dip diff --git a/java/com/android/contacts/common/util/AccountFilterUtil.java b/java/com/android/contacts/common/util/AccountFilterUtil.java index 18743c65e..25f937c5e 100644 --- a/java/com/android/contacts/common/util/AccountFilterUtil.java +++ b/java/com/android/contacts/common/util/AccountFilterUtil.java @@ -16,35 +16,15 @@ package com.android.contacts.common.util; -import android.app.Activity; import android.content.Context; -import android.content.Intent; -import android.util.Log; import android.view.View; import android.widget.TextView; import com.android.contacts.common.R; import com.android.contacts.common.list.ContactListFilter; -import com.android.contacts.common.list.ContactListFilterController; /** Utility class for account filter manipulation. */ public class AccountFilterUtil { - public static final String EXTRA_CONTACT_LIST_FILTER = "contactListFilter"; - private static final String TAG = AccountFilterUtil.class.getSimpleName(); - - /** - * Find TextView with the id "account_filter_header" and set correct text for the account filter - * header. - * - * @param filterContainer View containing TextView with id "account_filter_header" - * @return true when header text is set in the call. You may use this for conditionally showing or - * hiding this entire view. - */ - public static boolean updateAccountFilterTitleForPeople( - View filterContainer, ContactListFilter filter, boolean showTitleForAllAccounts) { - return updateAccountFilterTitle(filterContainer, filter, showTitleForAllAccounts, false); - } - /** * Similar to {@link #updateAccountFilterTitleForPeople(View, ContactListFilter, boolean, * boolean)}, but for Phone UI. @@ -78,8 +58,6 @@ public class AccountFilterUtil { } else if (filter.filterType == ContactListFilter.FILTER_TYPE_CUSTOM) { headerTextView.setText(R.string.listCustomView); textWasSet = true; - } else { - Log.w(TAG, "Filter type \"" + filter.filterType + "\" isn't expected."); } } else { if (filter.filterType == ContactListFilter.FILTER_TYPE_ALL_ACCOUNTS) { @@ -97,29 +75,9 @@ public class AccountFilterUtil { } else if (filter.filterType == ContactListFilter.FILTER_TYPE_SINGLE_CONTACT) { headerTextView.setText(R.string.listSingleContact); textWasSet = true; - } else { - Log.w(TAG, "Filter type \"" + filter.filterType + "\" isn't expected."); } } - } else { - Log.w(TAG, "Filter is null."); } return textWasSet; } - - /** This will update filter via a given ContactListFilterController. */ - public static void handleAccountFilterResult( - ContactListFilterController filterController, int resultCode, Intent data) { - if (resultCode == Activity.RESULT_OK) { - final ContactListFilter filter = data.getParcelableExtra(EXTRA_CONTACT_LIST_FILTER); - if (filter == null) { - return; - } - if (filter.filterType == ContactListFilter.FILTER_TYPE_CUSTOM) { - filterController.selectCustomFilter(); - } else { - filterController.setContactListFilter(filter, true); - } - } - } } diff --git a/java/com/android/contacts/common/util/BitmapUtil.java b/java/com/android/contacts/common/util/BitmapUtil.java index 20f916a3f..51f65f280 100644 --- a/java/com/android/contacts/common/util/BitmapUtil.java +++ b/java/com/android/contacts/common/util/BitmapUtil.java @@ -24,8 +24,6 @@ import android.graphics.PorterDuff.Mode; import android.graphics.PorterDuffXfermode; import android.graphics.Rect; import android.graphics.RectF; -import android.graphics.drawable.BitmapDrawable; -import android.graphics.drawable.Drawable; /** Provides static functions to decode bitmaps at the optimal size */ public class BitmapUtil { @@ -90,30 +88,6 @@ public class BitmapUtil { return BitmapFactory.decodeByteArray(bytes, 0, bytes.length, options); } - /** - * Retrieves a copy of the specified drawable resource, rotated by a specified angle. - * - * @param resources The current resources. - * @param resourceId The resource ID of the drawable to rotate. - * @param angle The angle of rotation. - * @return Rotated drawable. - */ - public static Drawable getRotatedDrawable( - android.content.res.Resources resources, int resourceId, float angle) { - - // Get the original drawable and make a copy which will be rotated. - Bitmap original = BitmapFactory.decodeResource(resources, resourceId); - Bitmap rotated = - Bitmap.createBitmap(original.getWidth(), original.getHeight(), Bitmap.Config.ARGB_8888); - - // Perform the rotation. - Canvas tempCanvas = new Canvas(rotated); - tempCanvas.rotate(angle, original.getWidth() / 2, original.getHeight() / 2); - tempCanvas.drawBitmap(original, 0, 0, null); - - return new BitmapDrawable(resources, rotated); - } - /** * Given an input bitmap, scales it to the given width/height and makes it round. * diff --git a/java/com/android/contacts/common/util/ContactDisplayUtils.java b/java/com/android/contacts/common/util/ContactDisplayUtils.java index 1586784db..ff22f2880 100644 --- a/java/com/android/contacts/common/util/ContactDisplayUtils.java +++ b/java/com/android/contacts/common/util/ContactDisplayUtils.java @@ -16,21 +16,20 @@ package com.android.contacts.common.util; -import static android.provider.ContactsContract.CommonDataKinds.Phone; - import android.content.Context; import android.content.res.Resources; +import android.provider.ContactsContract.CommonDataKinds.Phone; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.text.Spannable; import android.text.SpannableString; import android.text.TextUtils; import android.text.style.TtsSpan; -import android.util.Log; import android.util.Patterns; import com.android.contacts.common.R; import com.android.contacts.common.compat.PhoneNumberUtilsCompat; import com.android.contacts.common.preference.ContactsPreferences; +import com.android.dialer.common.LogUtil; import java.util.Objects; /** Methods for handling various contact data labels. */ @@ -38,7 +37,6 @@ public class ContactDisplayUtils { public static final int INTERACTION_CALL = 1; public static final int INTERACTION_SMS = 2; - private static final String TAG = ContactDisplayUtils.class.getSimpleName(); /** * Checks if the given data type is a custom type. @@ -74,9 +72,9 @@ public class ContactDisplayUtils { } else { resId = getPhoneLabelResourceId(type); if (interactionType != INTERACTION_CALL) { - Log.e( - TAG, - "Un-recognized interaction type: " + LogUtil.e( + "ContactDisplayUtils.getLabelForCallOrSms", + "un-recognized interaction type: " + interactionType + ". Defaulting to ContactDisplayUtils.INTERACTION_CALL."); } diff --git a/java/com/android/contacts/common/util/DateUtils.java b/java/com/android/contacts/common/util/DateUtils.java index 1935d727a..09d52bce8 100644 --- a/java/com/android/contacts/common/util/DateUtils.java +++ b/java/com/android/contacts/common/util/DateUtils.java @@ -16,252 +16,11 @@ package com.android.contacts.common.util; -import android.content.Context; -import android.text.format.DateFormat; import android.text.format.Time; -import java.text.ParsePosition; -import java.text.SimpleDateFormat; -import java.util.Calendar; -import java.util.Date; -import java.util.GregorianCalendar; -import java.util.Locale; -import java.util.TimeZone; /** Utility methods for processing dates. */ public class DateUtils { - public static final TimeZone UTC_TIMEZONE = TimeZone.getTimeZone("UTC"); - - /** - * When parsing a date without a year, the system assumes 1970, which wasn't a leap-year. Let's - * add a one-off hack for that day of the year - */ - public static final String NO_YEAR_DATE_FEB29TH = "--02-29"; - - // Variations of ISO 8601 date format. Do not change the order - it does affect the - // result in ambiguous cases. - private static final SimpleDateFormat[] DATE_FORMATS = { - CommonDateUtils.FULL_DATE_FORMAT, - CommonDateUtils.DATE_AND_TIME_FORMAT, - new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'", Locale.US), - new SimpleDateFormat("yyyyMMdd", Locale.US), - new SimpleDateFormat("yyyyMMdd'T'HHmmssSSS'Z'", Locale.US), - new SimpleDateFormat("yyyyMMdd'T'HHmmss'Z'", Locale.US), - new SimpleDateFormat("yyyyMMdd'T'HHmm'Z'", Locale.US), - }; - - static { - for (SimpleDateFormat format : DATE_FORMATS) { - format.setLenient(true); - format.setTimeZone(UTC_TIMEZONE); - } - CommonDateUtils.NO_YEAR_DATE_FORMAT.setTimeZone(UTC_TIMEZONE); - } - - /** - * Parses the supplied string to see if it looks like a date. - * - * @param string The string representation of the provided date - * @param mustContainYear If true, the string is parsed as a date containing a year. If false, the - * string is parsed into a valid date even if the year field is missing. - * @return A Calendar object corresponding to the date if the string is successfully parsed. If - * not, null is returned. - */ - public static Calendar parseDate(String string, boolean mustContainYear) { - ParsePosition parsePosition = new ParsePosition(0); - Date date; - if (!mustContainYear) { - final boolean noYearParsed; - // Unfortunately, we can't parse Feb 29th correctly, so let's handle this day seperately - if (NO_YEAR_DATE_FEB29TH.equals(string)) { - return getUtcDate(0, Calendar.FEBRUARY, 29); - } else { - synchronized (CommonDateUtils.NO_YEAR_DATE_FORMAT) { - date = CommonDateUtils.NO_YEAR_DATE_FORMAT.parse(string, parsePosition); - } - noYearParsed = parsePosition.getIndex() == string.length(); - } - - if (noYearParsed) { - return getUtcDate(date, true); - } - } - for (int i = 0; i < DATE_FORMATS.length; i++) { - SimpleDateFormat f = DATE_FORMATS[i]; - synchronized (f) { - parsePosition.setIndex(0); - date = f.parse(string, parsePosition); - if (parsePosition.getIndex() == string.length()) { - return getUtcDate(date, false); - } - } - } - return null; - } - - private static final Calendar getUtcDate(Date date, boolean noYear) { - final Calendar calendar = Calendar.getInstance(UTC_TIMEZONE, Locale.US); - calendar.setTime(date); - if (noYear) { - calendar.set(Calendar.YEAR, 0); - } - return calendar; - } - - private static final Calendar getUtcDate(int year, int month, int dayOfMonth) { - final Calendar calendar = Calendar.getInstance(UTC_TIMEZONE, Locale.US); - calendar.clear(); - calendar.set(Calendar.YEAR, year); - calendar.set(Calendar.MONTH, month); - calendar.set(Calendar.DAY_OF_MONTH, dayOfMonth); - return calendar; - } - - public static boolean isYearSet(Calendar cal) { - // use the Calendar.YEAR field to track whether or not the year is set instead of - // Calendar.isSet() because doing Calendar.get() causes Calendar.isSet() to become - // true irregardless of what the previous value was - return cal.get(Calendar.YEAR) > 1; - } - - /** - * Same as {@link #formatDate(Context context, String string, boolean longForm)}, with longForm - * set to {@code true} by default. - * - * @param context Valid context - * @param string String representation of a date to parse - * @return Returns the same date in a cleaned up format. If the supplied string does not look like - * a date, return it unchanged. - */ - public static String formatDate(Context context, String string) { - return formatDate(context, string, true); - } - - /** - * Parses the supplied string to see if it looks like a date. - * - * @param context Valid context - * @param string String representation of a date to parse - * @param longForm If true, return the date formatted into its long string representation. If - * false, return the date formatted using its short form representation (i.e. 12/11/2012) - * @return Returns the same date in a cleaned up format. If the supplied string does not look like - * a date, return it unchanged. - */ - public static String formatDate(Context context, String string, boolean longForm) { - if (string == null) { - return null; - } - - string = string.trim(); - if (string.length() == 0) { - return string; - } - final Calendar cal = parseDate(string, false); - - // we weren't able to parse the string successfully so just return it unchanged - if (cal == null) { - return string; - } - - final boolean isYearSet = isYearSet(cal); - final java.text.DateFormat outFormat; - if (!isYearSet) { - outFormat = getLocalizedDateFormatWithoutYear(context); - } else { - outFormat = - longForm ? DateFormat.getLongDateFormat(context) : DateFormat.getDateFormat(context); - } - synchronized (outFormat) { - outFormat.setTimeZone(UTC_TIMEZONE); - return outFormat.format(cal.getTime()); - } - } - - public static boolean isMonthBeforeDay(Context context) { - char[] dateFormatOrder = DateFormat.getDateFormatOrder(context); - for (int i = 0; i < dateFormatOrder.length; i++) { - if (dateFormatOrder[i] == 'd') { - return false; - } - if (dateFormatOrder[i] == 'M') { - return true; - } - } - return false; - } - - /** - * Returns a SimpleDateFormat object without the year fields by using a regular expression to - * eliminate the year in the string pattern. In the rare occurence that the resulting pattern - * cannot be reconverted into a SimpleDateFormat, it uses the provided context to determine - * whether the month field should be displayed before the day field, and returns either "MMMM dd" - * or "dd MMMM" converted into a SimpleDateFormat. - */ - public static java.text.DateFormat getLocalizedDateFormatWithoutYear(Context context) { - final String pattern = - ((SimpleDateFormat) SimpleDateFormat.getDateInstance(java.text.DateFormat.LONG)) - .toPattern(); - // Determine the correct regex pattern for year. - // Special case handling for Spanish locale by checking for "de" - final String yearPattern = - pattern.contains("de") ? "[^Mm]*[Yy]+[^Mm]*" : "[^DdMm]*[Yy]+[^DdMm]*"; - try { - // Eliminate the substring in pattern that matches the format for that of year - return new SimpleDateFormat(pattern.replaceAll(yearPattern, "")); - } catch (IllegalArgumentException e) { - return new SimpleDateFormat(DateUtils.isMonthBeforeDay(context) ? "MMMM dd" : "dd MMMM"); - } - } - - /** - * Given a calendar (possibly containing only a day of the year), returns the earliest possible - * anniversary of the date that is equal to or after the current point in time if the date does - * not contain a year, or the date converted to the local time zone (if the date contains a year. - * - * @param target The date we wish to convert(in the UTC time zone). - * @return If date does not contain a year (year < 1900), returns the next earliest anniversary - * that is after the current point in time (in the local time zone). Otherwise, returns the - * adjusted Date in the local time zone. - */ - public static Date getNextAnnualDate(Calendar target) { - final Calendar today = Calendar.getInstance(); - today.setTime(new Date()); - - // Round the current time to the exact start of today so that when we compare - // today against the target date, both dates are set to exactly 0000H. - today.set(Calendar.HOUR_OF_DAY, 0); - today.set(Calendar.MINUTE, 0); - today.set(Calendar.SECOND, 0); - today.set(Calendar.MILLISECOND, 0); - - final boolean isYearSet = isYearSet(target); - final int targetYear = target.get(Calendar.YEAR); - final int targetMonth = target.get(Calendar.MONTH); - final int targetDay = target.get(Calendar.DAY_OF_MONTH); - final boolean isFeb29 = (targetMonth == Calendar.FEBRUARY && targetDay == 29); - final GregorianCalendar anniversary = new GregorianCalendar(); - // Convert from the UTC date to the local date. Set the year to today's year if the - // there is no provided year (targetYear < 1900) - anniversary.set(!isYearSet ? today.get(Calendar.YEAR) : targetYear, targetMonth, targetDay); - // If the anniversary's date is before the start of today and there is no year set, - // increment the year by 1 so that the returned date is always equal to or greater than - // today. If the day is a leap year, keep going until we get the next leap year anniversary - // Otherwise if there is already a year set, simply return the exact date. - if (!isYearSet) { - int anniversaryYear = today.get(Calendar.YEAR); - if (anniversary.before(today) || (isFeb29 && !anniversary.isLeapYear(anniversaryYear))) { - // If the target date is not Feb 29, then set the anniversary to the next year. - // Otherwise, keep going until we find the next leap year (this is not guaranteed - // to be in 4 years time). - do { - anniversaryYear += 1; - } while (isFeb29 && !anniversary.isLeapYear(anniversaryYear)); - anniversary.set(anniversaryYear, targetMonth, targetDay); - } - } - return anniversary.getTime(); - } - /** * Determine the difference, in days between two dates. Uses similar logic as the {@link * android.text.format.DateUtils.getRelativeTimeSpanString} method. diff --git a/java/com/android/contacts/common/util/MaterialColorMapUtils.java b/java/com/android/contacts/common/util/MaterialColorMapUtils.java index a2d9847ec..bd32faa51 100644 --- a/java/com/android/contacts/common/util/MaterialColorMapUtils.java +++ b/java/com/android/contacts/common/util/MaterialColorMapUtils.java @@ -21,7 +21,6 @@ import android.content.res.TypedArray; import android.os.Parcel; import android.os.Parcelable; import android.os.Trace; -import com.android.contacts.common.R; public class MaterialColorMapUtils { @@ -35,13 +34,6 @@ public class MaterialColorMapUtils { resources.obtainTypedArray(com.android.contacts.common.R.array.letter_tile_colors_dark); } - public static MaterialPalette getDefaultPrimaryAndSecondaryColors(Resources resources) { - final int primaryColor = resources.getColor(R.color.quickcontact_default_photo_tint_color); - final int secondaryColor = - resources.getColor(R.color.quickcontact_default_photo_tint_color_dark); - return new MaterialPalette(primaryColor, secondaryColor); - } - /** * Returns the hue component of a color int. * diff --git a/java/com/android/contacts/common/util/NameConverter.java b/java/com/android/contacts/common/util/NameConverter.java deleted file mode 100644 index ae3275d14..000000000 --- a/java/com/android/contacts/common/util/NameConverter.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Copyright (C) 2011 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. - */ -package com.android.contacts.common.util; - -import android.content.ContentValues; -import android.content.Context; -import android.database.Cursor; -import android.net.Uri; -import android.net.Uri.Builder; -import android.provider.ContactsContract; -import android.provider.ContactsContract.CommonDataKinds.StructuredName; -import android.text.TextUtils; -import com.android.contacts.common.model.dataitem.StructuredNameDataItem; -import java.util.Map; -import java.util.TreeMap; - -/** - * Utility class for converting between a display name and structured name (and vice-versa), via - * calls to the contact provider. - */ -public class NameConverter { - - /** The array of fields that comprise a structured name. */ - public static final String[] STRUCTURED_NAME_FIELDS = - new String[] { - StructuredName.PREFIX, - StructuredName.GIVEN_NAME, - StructuredName.MIDDLE_NAME, - StructuredName.FAMILY_NAME, - StructuredName.SUFFIX - }; - - /** - * Converts the given structured name (provided as a map from {@link StructuredName} fields to - * corresponding values) into a display name string. - * - *

Note that this operates via a call back to the ContactProvider, but it does not access the - * database, so it should be safe to call from the UI thread. See ContactsProvider2.completeName() - * for the underlying method call. - * - * @param context Activity context. - * @param structuredName The structured name map to convert. - * @return The display name computed from the structured name map. - */ - public static String structuredNameToDisplayName( - Context context, Map structuredName) { - Builder builder = ContactsContract.AUTHORITY_URI.buildUpon().appendPath("complete_name"); - for (String key : STRUCTURED_NAME_FIELDS) { - if (structuredName.containsKey(key)) { - appendQueryParameter(builder, key, structuredName.get(key)); - } - } - return fetchDisplayName(context, builder.build()); - } - - /** - * Converts the given structured name (provided as ContentValues) into a display name string. - * - * @param context Activity context. - * @param values The content values containing values comprising the structured name. - */ - public static String structuredNameToDisplayName(Context context, ContentValues values) { - Builder builder = ContactsContract.AUTHORITY_URI.buildUpon().appendPath("complete_name"); - for (String key : STRUCTURED_NAME_FIELDS) { - if (values.containsKey(key)) { - appendQueryParameter(builder, key, values.getAsString(key)); - } - } - return fetchDisplayName(context, builder.build()); - } - - /** Helper method for fetching the display name via the given URI. */ - private static String fetchDisplayName(Context context, Uri uri) { - String displayName = null; - Cursor cursor = - context - .getContentResolver() - .query( - uri, - new String[] { - StructuredName.DISPLAY_NAME, - }, - null, - null, - null); - - if (cursor != null) { - try { - if (cursor.moveToFirst()) { - displayName = cursor.getString(0); - } - } finally { - cursor.close(); - } - } - return displayName; - } - - /** - * Converts the given display name string into a structured name (as a map from {@link - * StructuredName} fields to corresponding values). - * - *

Note that this operates via a call back to the ContactProvider, but it does not access the - * database, so it should be safe to call from the UI thread. - * - * @param context Activity context. - * @param displayName The display name to convert. - * @return The structured name map computed from the display name. - */ - public static Map displayNameToStructuredName( - Context context, String displayName) { - Map structuredName = new TreeMap(); - Builder builder = ContactsContract.AUTHORITY_URI.buildUpon().appendPath("complete_name"); - - appendQueryParameter(builder, StructuredName.DISPLAY_NAME, displayName); - Cursor cursor = - context - .getContentResolver() - .query(builder.build(), STRUCTURED_NAME_FIELDS, null, null, null); - - if (cursor != null) { - try { - if (cursor.moveToFirst()) { - for (int i = 0; i < STRUCTURED_NAME_FIELDS.length; i++) { - structuredName.put(STRUCTURED_NAME_FIELDS[i], cursor.getString(i)); - } - } - } finally { - cursor.close(); - } - } - return structuredName; - } - - /** - * Converts the given display name string into a structured name (inserting the structured values - * into a new or existing ContentValues object). - * - *

Note that this operates via a call back to the ContactProvider, but it does not access the - * database, so it should be safe to call from the UI thread. - * - * @param context Activity context. - * @param displayName The display name to convert. - * @param contentValues The content values object to place the structured name values into. If - * null, a new one will be created and returned. - * @return The ContentValues object containing the structured name fields derived from the display - * name. - */ - public static ContentValues displayNameToStructuredName( - Context context, String displayName, ContentValues contentValues) { - if (contentValues == null) { - contentValues = new ContentValues(); - } - Map mapValues = displayNameToStructuredName(context, displayName); - for (String key : mapValues.keySet()) { - contentValues.put(key, mapValues.get(key)); - } - return contentValues; - } - - private static void appendQueryParameter(Builder builder, String field, String value) { - if (!TextUtils.isEmpty(value)) { - builder.appendQueryParameter(field, value); - } - } - - /** - * Parses phonetic name and returns parsed data (family, middle, given) as ContentValues. Parsed - * data should be {@link StructuredName#PHONETIC_FAMILY_NAME}, {@link - * StructuredName#PHONETIC_MIDDLE_NAME}, and {@link StructuredName#PHONETIC_GIVEN_NAME}. If this - * method cannot parse given phoneticName, null values will be stored. - * - * @param phoneticName Phonetic name to be parsed - * @param values ContentValues to be used for storing data. If null, new instance will be created. - * @return ContentValues with parsed data. Those data can be null. - */ - public static StructuredNameDataItem parsePhoneticName( - String phoneticName, StructuredNameDataItem item) { - String family = null; - String middle = null; - String given = null; - - if (!TextUtils.isEmpty(phoneticName)) { - String[] strings = phoneticName.split(" ", 3); - switch (strings.length) { - case 1: - family = strings[0]; - break; - case 2: - family = strings[0]; - given = strings[1]; - break; - case 3: - family = strings[0]; - middle = strings[1]; - given = strings[2]; - break; - } - } - - if (item == null) { - item = new StructuredNameDataItem(); - } - item.setPhoneticFamilyName(family); - item.setPhoneticMiddleName(middle); - item.setPhoneticGivenName(given); - return item; - } - - /** Constructs and returns a phonetic full name from given parts. */ - public static String buildPhoneticName(String family, String middle, String given) { - if (!TextUtils.isEmpty(family) || !TextUtils.isEmpty(middle) || !TextUtils.isEmpty(given)) { - StringBuilder sb = new StringBuilder(); - if (!TextUtils.isEmpty(family)) { - sb.append(family.trim()).append(' '); - } - if (!TextUtils.isEmpty(middle)) { - sb.append(middle.trim()).append(' '); - } - if (!TextUtils.isEmpty(given)) { - sb.append(given.trim()).append(' '); - } - sb.setLength(sb.length() - 1); // Yank the last space - return sb.toString(); - } else { - return null; - } - } -} diff --git a/java/com/android/contacts/common/util/StopWatch.java b/java/com/android/contacts/common/util/StopWatch.java index b944b9867..7986d1081 100644 --- a/java/com/android/contacts/common/util/StopWatch.java +++ b/java/com/android/contacts/common/util/StopWatch.java @@ -16,7 +16,7 @@ package com.android.contacts.common.util; -import android.util.Log; +import com.android.dialer.common.LogUtil; import java.util.ArrayList; /** A {@link StopWatch} records start, laps and stop, and print them to logcat. */ @@ -37,11 +37,6 @@ public class StopWatch { return new StopWatch(label); } - /** Return a dummy instance that does no operations. */ - public static StopWatch getNullStopWatch() { - return NullStopWatch.INSTANCE; - } - /** Record a lap. */ public void lap(String lapLabel) { mTimes.add(System.currentTimeMillis()); @@ -76,25 +71,6 @@ public class StopWatch { sb.append(" "); last = current; } - Log.v(TAG, sb.toString()); - } - - private static class NullStopWatch extends StopWatch { - - public static final NullStopWatch INSTANCE = new NullStopWatch(); - - public NullStopWatch() { - super(null); - } - - @Override - public void lap(String lapLabel) { - // noop - } - - @Override - public void stopAndLog(String TAG, int timeThresholdToLog) { - // noop - } + LogUtil.v(TAG, sb.toString()); } } diff --git a/java/com/android/contacts/common/util/TelephonyManagerUtils.java b/java/com/android/contacts/common/util/TelephonyManagerUtils.java index b664268ca..e4c2c6373 100644 --- a/java/com/android/contacts/common/util/TelephonyManagerUtils.java +++ b/java/com/android/contacts/common/util/TelephonyManagerUtils.java @@ -33,13 +33,4 @@ public class TelephonyManagerUtils { final String voiceMailLabel = telephonyManager.getVoiceMailAlphaTag(); return voiceMailLabel; } - - /** - * @param context Current application context. - * @return True if there is a subscription which supports video calls. False otherwise. - */ - public static boolean hasVideoCallSubscription(Context context) { - // TODO: Check the telephony manager's subscriptions to see if any support video calls. - return true; - } } diff --git a/java/com/android/contacts/common/util/TrafficStatsTags.java b/java/com/android/contacts/common/util/TrafficStatsTags.java deleted file mode 100644 index b0e7fb583..000000000 --- a/java/com/android/contacts/common/util/TrafficStatsTags.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ -package com.android.contacts.common.util; - -public class TrafficStatsTags { - - public static final int CONTACT_PHOTO_DOWNLOAD_TAG = 0x0001; - public static final int TAG_MAX = 0x9999; -} -- cgit v1.2.3