Merge "Set maximumHeaderTextSize based on line count of TextView" into ub-contactsdialer-h-dev
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 68e4e73..a3547c5 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -304,7 +304,7 @@
     <string name="editor_add_photo_content_description" msgid="4194479313465418120">"Añadir una foto del contacto"</string>
     <string name="editor_contact_photo_content_description" msgid="8571975622926162369">"Foto del contacto"</string>
     <string name="editor_failed_to_load" msgid="1623639078580475818">"No se ha podido abrir el editor."</string>
-    <string name="editor_account_selector_title" msgid="4426337993307015833">"Se guarda en"</string>
+    <string name="editor_account_selector_title" msgid="4426337993307015833">"Se guardará en"</string>
     <string name="editor_account_selector_read_only_title" msgid="4137969650184457126">"No se puede editar la información de contacto de <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
     <string name="editor_account_selector_description" msgid="3324358600570627740">"Actualmente los contactos se guardan en <xliff:g id="ACCOUNT_NAME">%s</xliff:g>. Toca dos veces para seleccionar otra cuenta."</string>
     <plurals name="editor_linked_contacts_selector_title" formatted="false" msgid="249075501821303190">
diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml
index d7d3a8c..4d1b568 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -311,7 +311,7 @@
     <string name="editor_add_photo_content_description" msgid="4194479313465418120">"Dodavanje fotografije kontakta"</string>
     <string name="editor_contact_photo_content_description" msgid="8571975622926162369">"Fotografija kontakta"</string>
     <string name="editor_failed_to_load" msgid="1623639078580475818">"Otvaranje alata za uređivanje nije uspjelo."</string>
-    <string name="editor_account_selector_title" msgid="4426337993307015833">"Spremanje na"</string>
+    <string name="editor_account_selector_title" msgid="4426337993307015833">"Spremi na račun"</string>
     <string name="editor_account_selector_read_only_title" msgid="4137969650184457126">"Inform. o kontaktu na računu <xliff:g id="ACCOUNT">%s</xliff:g> ne mogu se uređivati"</string>
     <string name="editor_account_selector_description" msgid="3324358600570627740">"Trenutačno se sprema na <xliff:g id="ACCOUNT_NAME">%s</xliff:g>. Dvaput dodirnite da biste odabrali neki drugi račun."</string>
     <plurals name="editor_linked_contacts_selector_title" formatted="false" msgid="249075501821303190">
diff --git a/res/values-hy-rAM/strings.xml b/res/values-hy-rAM/strings.xml
index 6099534..2c6c4fc 100644
--- a/res/values-hy-rAM/strings.xml
+++ b/res/values-hy-rAM/strings.xml
@@ -62,7 +62,7 @@
     <string name="contacts_linking_progress_bar" msgid="2846494347384549277">"Կցում"</string>
     <string name="contacts_unlinking_progress_bar" msgid="5989310198163726929">"Ապակցում"</string>
     <string name="menu_joinAggregate" msgid="3599512127797513606">"Միակցել"</string>
-    <string name="menu_linkedContacts" msgid="400444389718855621">"Դիտել կցած կոնտակտները"</string>
+    <string name="menu_linkedContacts" msgid="400444389718855621">"Դիտել միակցված կոնտակտները"</string>
     <string name="menu_save" msgid="1727844363591825909">"Պահել"</string>
     <string name="titleJoinContactDataWith" msgid="6825255752748313944">"Միակցել կոնտակտները"</string>
     <string name="blurbJoinContactDataWith" msgid="5864256698061641841">"Ընտրեք կոնտակտը, որը ցանկանում եք միակցել <xliff:g id="NAME">%s</xliff:g>-ի հետ՝"</string>
@@ -254,11 +254,11 @@
     <string name="contact_editor_prompt_zero_accounts" msgid="6648376557574360096">"Ավելացրեք հաշիվ, որի միջոցով ձեր կոնտակտները կպահուստավորվեն Google-ում:"</string>
     <string name="contact_editor_prompt_one_account" msgid="3087691056345099310">"Նոր կոնտակտները կպահվեն <xliff:g id="ACCOUNT_NAME">%1$s</xliff:g> հաշվում:"</string>
     <string name="contact_editor_prompt_multiple_accounts" msgid="8565761674283473549">"Ընտրեք կանխադրված հաշիվ նոր կոնտակտների համար՝"</string>
-    <string name="contact_editor_title_new_contact" msgid="3042788718983070111">"Ստեղծել նոր կոնտակտ"</string>
+    <string name="contact_editor_title_new_contact" msgid="3042788718983070111">"Նոր կոնտակտ"</string>
     <string name="contact_editor_title_existing_contact" msgid="4898475703683187798">"Փոփոխել կոնտակտը"</string>
     <string name="contact_editor_title_read_only_contact" msgid="2443496574528842237">"Միայն դիտում"</string>
     <string name="contact_editor_pick_raw_contact_to_edit_dialog_title" msgid="4186699385645902152">"Ընտրեք կոնտակտ՝ խմբագրելու համար"</string>
-    <string name="contact_editor_pick_linked_contact_dialog_title" msgid="4618465940423857694">"Կցած կոնտակտներ"</string>
+    <string name="contact_editor_pick_linked_contact_dialog_title" msgid="4618465940423857694">"Միակցված կոնտակտներ"</string>
     <string name="contact_editor_add_linked_contact" msgid="426142748048816297">"Ավելացնել"</string>
     <string name="contact_editor_unlink_contacts" msgid="4525214336177236653">"Ապակցել"</string>
     <string name="add_account" msgid="8201790677994503186">"Ավելացնել հաշիվ"</string>
@@ -298,7 +298,7 @@
     <string name="content_description_recent_call_type_missed" msgid="7371810920196048204">"բաց թողնված"</string>
     <string name="content_description_recent_call" msgid="5183800406316723676">"վերջին զանգը՝ <xliff:g id="CALL_TYPE">%s</xliff:g>, <xliff:g id="PHONE_NUMBER">%s</xliff:g>, <xliff:g id="DATE">%s</xliff:g>, սեղմեք՝ հետ զանգելու համար"</string>
     <string name="message_from_you_prefix" msgid="7180706529908434482">"Դուք՝ <xliff:g id="SMS_BODY">%s</xliff:g>"</string>
-    <string name="contact_editor_hangouts_im_alert" msgid="114855385615225735">"Hangouts-ն ավելի լավ կաշխատի, եթե էլփոստի կամ հեռախոսի դաշտում մուտքագրեք Hangouts-ի օգտվողի նույնացուցիչը:"</string>
+    <string name="contact_editor_hangouts_im_alert" msgid="114855385615225735">"Hangouts-ն ավելի լավ կաշխատի, եթե էլփոստի կամ հեռախոսի դաշտում մուտքագրեք Hangouts-ի օգտատիրոջ նույնացուցիչը:"</string>
     <string name="editor_more_fields" msgid="3630987771304393421">"Լրացուցիչ դաշտեր"</string>
     <string name="editor_change_photo_content_description" msgid="820879708069864340">"Փոխել կոնտակտի լուսանկարը"</string>
     <string name="editor_add_photo_content_description" msgid="4194479313465418120">"Ավելացնել կոնտակտի լուսանկարը"</string>
@@ -309,7 +309,7 @@
     <string name="editor_account_selector_description" msgid="3324358600570627740">"Ներկայումս պահվում է <xliff:g id="ACCOUNT_NAME">%s</xliff:g> հաշվում: Կրկնակի հպեք՝ մեկ այլ հաշիվ ընտրելու համար:"</string>
     <plurals name="editor_linked_contacts_selector_title" formatted="false" msgid="249075501821303190">
       <item quantity="one">Linked contacts (<xliff:g id="COUNT">%d</xliff:g>)</item>
-      <item quantity="other">Կցած կոնտակտներ (<xliff:g id="COUNT">%d</xliff:g>)</item>
+      <item quantity="other">Միակցված կոնտակտներ (<xliff:g id="COUNT">%d</xliff:g>)</item>
     </plurals>
     <string name="quickcontact_contacts_number" msgid="6036916944287597682">"<xliff:g id="COUNT">%d</xliff:g> կապված կոնտակտ"</string>
     <string name="quick_contact_display_name_with_phonetic" msgid="3692038078718876610">"<xliff:g id="DISPLAY_NAME">%s</xliff:g> (<xliff:g id="PHONETIC_NAME">%s</xliff:g>)"</string>
@@ -331,7 +331,7 @@
     <string name="suggestion_card_this_contact_title" msgid="3039457405374454914">"Այս կոնտակտը"</string>
     <string name="suggestion_card_duplicates_title" msgid="9107788743178980902">"Հնարավոր կրկնօրինակներ"</string>
     <string name="suggestion_card_help_message" msgid="4474061044387181093">"Այս կոնտակտները հնարավոր է միևնույն մարդու կոնտակտներ են։ Կարող եք դրանք միակցել և ստեղծել մեկ կոնտակտ։"</string>
-    <string name="editor_linked_contacts_title" msgid="3077479751631492125">"Կցած կոնտակտներ"</string>
+    <string name="editor_linked_contacts_title" msgid="3077479751631492125">"Կցված կոնտակտներ"</string>
     <string name="from_your_accounts" msgid="1746293107836889912">"Ձեր հաշիվներից"</string>
     <string name="photo_picker_title" msgid="5272832995550042801">"Ընտրել լուսանկար"</string>
     <string name="contact_from_account_name" msgid="2078526819634079406">"<xliff:g id="ACCOUNT_NAME">%s</xliff:g> հաշվից"</string>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index f6fc647..0a89526 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -242,7 +242,7 @@
     <string name="widget_name_and_phonetic" msgid="8739586586600099979">"<xliff:g id="DISPLAY_NAME">%1$s</xliff:g> (<xliff:g id="PHONETIC_NAME">%2$s</xliff:g>)"</string>
     <string name="date_year_toggle" msgid="7122002148518724139">"Dodaj rok"</string>
     <string name="social_widget_label" msgid="6378905543028924592">"Kontakt"</string>
-    <string name="social_widget_loading" msgid="5327336597364074608">"Wczytywanie…"</string>
+    <string name="social_widget_loading" msgid="5327336597364074608">"Wczytuję…"</string>
     <string name="contacts_unavailable_create_contact" msgid="7014525713871959208">"Utwórz nowy kontakt"</string>
     <string name="contacts_unavailable_add_account" msgid="4347232421410561500">"Dodaj konto"</string>
     <string name="contacts_unavailable_import_contacts" msgid="3182801738595937144">"Importuj"</string>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index 632510e..b3e5970 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -667,7 +667,7 @@
     <string name="sim_import_title" msgid="2511154832820812822">"Import zo SIM karty"</string>
     <string name="sim_import_cancel_content_description" msgid="1619832410253424452">"Zrušiť"</string>
     <string name="auto_sync_off" msgid="2180147284456026587">"Automatická synchronizácia je vypnutá. Zapnete ju klepnutím."</string>
-    <string name="dismiss_sync_alert" msgid="8941131776605093596">"Odmietnuť"</string>
+    <string name="dismiss_sync_alert" msgid="8941131776605093596">"Zatvoriť"</string>
     <string name="account_sync_off" msgid="7646143254066243924">"Synchronizácia účtov je vypnutá. Zapnete ju klepnutím."</string>
     <string name="turn_auto_sync_on_dialog_title" msgid="333965456829670541">"Chcete zapnúť automatickú synchronizáciu?"</string>
     <string name="turn_auto_sync_on_dialog_body" msgid="5025336917533693997">"Medzi webom a vašimi zariadeniami sa budú aktualizovať zmeny, ktoré vykonáte vo všetkých aplikáciách a účtoch, nielen v Kontaktoch Google."</string>
diff --git a/res/values-uz-rUZ/strings.xml b/res/values-uz-rUZ/strings.xml
index 8f3390e..d1ebfbf 100644
--- a/res/values-uz-rUZ/strings.xml
+++ b/res/values-uz-rUZ/strings.xml
@@ -177,7 +177,7 @@
       <item quantity="other">Kontaktlarni bu orqali baham ko‘rish</item>
       <item quantity="one">Kontaktni bu orqali baham ko‘rish</item>
     </plurals>
-    <string name="dialog_new_group_account" msgid="3451312333591556651">"Hisobni tanlash"</string>
+    <string name="dialog_new_group_account" msgid="3451312333591556651">"Hisobni tanlang"</string>
     <string name="group_name_dialog_insert_title" msgid="2668452090427027941">"Yorliq yaratish"</string>
     <string name="group_name_dialog_update_title" msgid="6328021162869677383">"Yorliqni qayta nomlash"</string>
     <string name="group_name_dialog_hint" msgid="7624523157537700160">"Yorliq nomi"</string>
diff --git a/res/values-zh-rHK/strings.xml b/res/values-zh-rHK/strings.xml
index c0190c9..a89e136 100644
--- a/res/values-zh-rHK/strings.xml
+++ b/res/values-zh-rHK/strings.xml
@@ -89,8 +89,8 @@
     <string name="title_from_google" msgid="4664084747121207202">"來自 Google"</string>
     <string name="title_from_other_accounts" msgid="8307885412426754288">"來自「<xliff:g id="ACCOUNT">%s</xliff:g>」"</string>
     <string name="menu_set_ring_tone" msgid="8728345772068064946">"設定鈴聲"</string>
-    <string name="menu_redirect_calls_to_vm" msgid="83331924006712755">"轉往語音信箱"</string>
-    <string name="menu_unredirect_calls_to_vm" msgid="8725542534701811737">"取消轉往語音信箱"</string>
+    <string name="menu_redirect_calls_to_vm" msgid="83331924006712755">"轉駁到留言信箱"</string>
+    <string name="menu_unredirect_calls_to_vm" msgid="8725542534701811737">"取消轉駁到留言信箱"</string>
     <string name="readOnlyContactWarning" msgid="7514475664695089411">"這是唯讀聯絡人,因此無法刪除,但可加以隱藏。"</string>
     <string name="readOnlyContactWarning_positive_button" msgid="8914797212167683673">"隱藏聯絡人"</string>
     <string name="readOnlyContactDeleteConfirmation" msgid="4717023505914239809">"此聯絡人的唯讀帳戶將會隱藏,而不會刪除。"</string>
diff --git a/src/com/android/contacts/activities/ActionBarAdapter.java b/src/com/android/contacts/activities/ActionBarAdapter.java
index c91f608..dd371ae 100644
--- a/src/com/android/contacts/activities/ActionBarAdapter.java
+++ b/src/com/android/contacts/activities/ActionBarAdapter.java
@@ -435,7 +435,7 @@
     /**
      * Find overflow menu ImageView by its content description and update its color.
      */
-    private void updateOverflowButtonColor() {
+    public void updateOverflowButtonColor() {
         final String overflowDescription = mActivity.getResources().getString(
                 R.string.abc_action_menu_overflow_description);
         final ViewGroup decorView = (ViewGroup) mActivity.getWindow().getDecorView();
diff --git a/src/com/android/contacts/common/CallUtil.java b/src/com/android/contacts/common/CallUtil.java
index acfad52..4ef7220 100644
--- a/src/com/android/contacts/common/CallUtil.java
+++ b/src/com/android/contacts/common/CallUtil.java
@@ -116,13 +116,6 @@
     }
 
     /**
-     * @return Uri that directly dials a user's voicemail inbox.
-     */
-    public static Uri getVoicemailUri() {
-        return Uri.fromParts(PhoneAccount.SCHEME_VOICEMAIL, "", null);
-    }
-
-    /**
      * Determines if video calling is available, and if so whether presence checking is available
      * as well.
      *
@@ -166,23 +159,12 @@
             return VIDEO_CALLING_DISABLED;
         } catch (SecurityException e) {
             FeedbackHelper.sendFeedback(context, TAG,
-                    "Security exception when querying intent activities", e);
+                    "Security exception when getting call capable phone accounts", e);
             return VIDEO_CALLING_DISABLED;
         }
     }
 
     /**
-     * Determines if one of the call capable phone accounts defined supports video calling.
-     *
-     * @param context The context.
-     * @return {@code true} if one of the call capable phone accounts supports video calling,
-     *      {@code false} otherwise.
-     */
-    public static boolean isVideoEnabled(Context context) {
-        return (getVideoCallingAvailability(context) & VIDEO_CALLING_ENABLED) != 0;
-    }
-
-    /**
      * Determines if one of the call capable phone accounts defined supports calling with a subject
      * specified.
      *
@@ -201,13 +183,21 @@
             return false;
         }
 
-        List<PhoneAccountHandle> accountHandles = telecommMgr.getCallCapablePhoneAccounts();
-        for (PhoneAccountHandle accountHandle : accountHandles) {
-            PhoneAccount account = telecommMgr.getPhoneAccount(accountHandle);
-            if (account != null && account.hasCapabilities(PhoneAccount.CAPABILITY_CALL_SUBJECT)) {
-                return true;
+        try {
+            List<PhoneAccountHandle> accountHandles = telecommMgr.getCallCapablePhoneAccounts();
+            for (PhoneAccountHandle accountHandle : accountHandles) {
+                PhoneAccount account = telecommMgr.getPhoneAccount(accountHandle);
+                if (account != null
+                        && account.hasCapabilities(PhoneAccount.CAPABILITY_CALL_SUBJECT)) {
+                    return true;
+                }
             }
+            return false;
+        } catch (SecurityException e) {
+            FeedbackHelper.sendFeedback(context, TAG,
+                    "Security exception when getting call capable phone accounts", e);
+            return false;
         }
-        return false;
+
     }
 }
diff --git a/src/com/android/contacts/common/compat/telecom/TelecomManagerCompat.java b/src/com/android/contacts/common/compat/telecom/TelecomManagerCompat.java
index 6292b7f..652be19 100644
--- a/src/com/android/contacts/common/compat/telecom/TelecomManagerCompat.java
+++ b/src/com/android/contacts/common/compat/telecom/TelecomManagerCompat.java
@@ -17,27 +17,15 @@
 
 import android.app.Activity;
 import android.content.Intent;
-import android.content.Context;
-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.contacts.common.compat.CompatUtils;
 
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-
 /**
  * Compatibility class for {@link android.telecom.TelecomManager}.
  */
 public class TelecomManagerCompat {
-    public static final String TELECOM_MANAGER_CLASS = "android.telecom.TelecomManager";
     /**
      * Places a new outgoing call to the provided address using the system telecom service with
      * the specified intent.
@@ -57,226 +45,4 @@
         }
         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<PhoneAccountHandle> 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();
-        }
-    }
-
-    /**
-     * Returns the current SIM call manager. Apps must be prepared for this method to return null,
-     * indicating that there currently exists no registered SIM call manager.
-     *
-     * @param telecomManager the {@link TelecomManager} to use to fetch the SIM call manager.
-     * @return The phone account handle of the current sim call manager.
-     */
-    @Nullable
-    public static PhoneAccountHandle getSimCallManager(TelecomManager telecomManager) {
-        if (telecomManager != null && (CompatUtils.isMarshmallowCompatible() || CompatUtils
-                .isMethodAvailable(TELECOM_MANAGER_CLASS, "getSimCallManager"))) {
-            return telecomManager.getSimCallManager();
-        }
-        return null;
-    }
 }
diff --git a/src/com/android/contacts/group/GroupMembersFragment.java b/src/com/android/contacts/group/GroupMembersFragment.java
index 44bda74..faba8c5 100644
--- a/src/com/android/contacts/group/GroupMembersFragment.java
+++ b/src/com/android/contacts/group/GroupMembersFragment.java
@@ -694,6 +694,7 @@
             super.onLoadFinished(loader, cursorWrapper);
             // Update state of menu items (e.g. "Remove contacts") based on number of group members.
             mActivity.invalidateOptionsMenu();
+            mActionBarAdapter.updateOverflowButtonColor();
         }
     }
 
diff --git a/src/com/android/contacts/list/DefaultContactBrowseListFragment.java b/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
index f7ae30d..262325a 100644
--- a/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
+++ b/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
@@ -265,6 +265,9 @@
         if (!isSearchMode()) {
             maybeShowHamburgerFeatureHighlight();
         }
+        if (mActionBarAdapter != null) {
+            mActionBarAdapter.updateOverflowButtonColor();
+        }
     }
 
     private void maybeShowHamburgerFeatureHighlight() {
@@ -810,6 +813,7 @@
         public void onSelectedContactIdsChanged() {
             mActionBarAdapter.setSelectionCount(getSelectedContactIds().size());
             mActivity.invalidateOptionsMenu();
+            mActionBarAdapter.updateOverflowButtonColor();
         }
 
         @Override