Merge "Modify g+ icon in Contact card to read from CP2 and stop color filtering" into ub-contactsdialer-g-dev
diff --git a/res/drawable/ic_google_plus_black_24dp.xml b/res/drawable/ic_google_plus_black_24dp.xml
deleted file mode 100644
index 398b0ad..0000000
--- a/res/drawable/ic_google_plus_black_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
--->
-
-<!-- G+ icon -->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="24dp"
-        android:height="24dp"
-        android:viewportHeight="24.0"
-        android:viewportWidth="24.0">
-    <path
-            android:fillColor="#000000"
-            android:pathData="M23 11h-2V9h-2v2h-2v2h2v2h2v-2h2zM8 11v2.4h3.97c-.16 1.03-1.2 3.02-3.97 3.02-2.39 0-4.34-1.98-4.34-4.42S5.61 7.58 8 7.58c1.36 0 2.27.58 2.79 1.08l1.9-1.83C11.47 5.69 9.89 5 8 5c-3.87 0-7 3.13-7 7s3.13 7 7 7c4.04 0 6.72-2.84 6.72-6.84 0-.46-.05-.81-.11-1.16H8z" />
-</vector>
\ No newline at end of file
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java
index 9574ec8..376fa22 100644
--- a/src/com/android/contacts/quickcontact/QuickContactActivity.java
+++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java
@@ -2115,46 +2115,44 @@
                 final String mimetype = intent.getType();
 
                 // Build advanced entry for known 3p types. Otherwise default to ResolveCache icon.
-                switch (mimetype) {
-                    case MIMETYPE_GPLUS_PROFILE:
-                        icon = res.getDrawable(R.drawable.ic_google_plus_black_24dp);
-                        break;
-                    case MIMETYPE_HANGOUTS:
-                        // If a secondDataItem is available, use it to build an entry with
-                        // alternate actions
-                        if (secondDataItem != null) {
-                            icon = res.getDrawable(R.drawable.ic_hangout_24dp);
-                            alternateIcon = res.getDrawable(R.drawable.ic_hangout_video_24dp);
-                            final HangoutsDataItemModel itemModel =
-                                    new HangoutsDataItemModel(intent, alternateIntent,
-                                            dataItem, secondDataItem, alternateContentDescription,
-                                            header, text, context);
+                if (MIMETYPE_HANGOUTS.equals(mimetype)) {
+                    // If a secondDataItem is available, use it to build an entry with
+                    // alternate actions
+                    if (secondDataItem != null) {
+                        icon = res.getDrawable(R.drawable.ic_hangout_24dp);
+                        alternateIcon = res.getDrawable(R.drawable.ic_hangout_video_24dp);
+                        final HangoutsDataItemModel itemModel =
+                                new HangoutsDataItemModel(intent, alternateIntent,
+                                        dataItem, secondDataItem, alternateContentDescription,
+                                        header, text, context);
 
-                            populateHangoutsDataItemModel(itemModel);
-                            intent = itemModel.intent;
-                            alternateIntent = itemModel.alternateIntent;
-                            alternateContentDescription = itemModel.alternateContentDescription;
-                            header = itemModel.header;
-                            text = itemModel.text;
+                        populateHangoutsDataItemModel(itemModel);
+                        intent = itemModel.intent;
+                        alternateIntent = itemModel.alternateIntent;
+                        alternateContentDescription = itemModel.alternateContentDescription;
+                        header = itemModel.header;
+                        text = itemModel.text;
+                    } else {
+                        if (HANGOUTS_DATA_5_VIDEO.equals(intent.getDataString())) {
+                            icon = res.getDrawable(R.drawable.ic_hangout_video_24dp);
                         } else {
-                            if (HANGOUTS_DATA_5_VIDEO.equals(intent.getDataString())) {
-                                icon = res.getDrawable(R.drawable.ic_hangout_video_24dp);
-                            } else {
-                                icon = res.getDrawable(R.drawable.ic_hangout_24dp);
-                            }
+                            icon = res.getDrawable(R.drawable.ic_hangout_24dp);
                         }
-                        break;
-                    default:
+                    }
+                } else {
+                    icon = ResolveCache.getInstance(context).getIcon(
+                            dataItem.getMimeType(), intent);
+                    // Call mutate to create a new Drawable.ConstantState for color filtering
+                    if (icon != null) {
+                        icon.mutate();
+                    }
+                    shouldApplyColor = false;
+
+                    if (!MIMETYPE_GPLUS_PROFILE.equals(mimetype)) {
                         entryContextMenuInfo = new EntryContextMenuInfo(header, mimetype,
                                 dataItem.getMimeType(), dataItem.getId(),
                                 dataItem.isSuperPrimary());
-                        icon = ResolveCache.getInstance(context).getIcon(
-                                dataItem.getMimeType(), intent);
-                        // Call mutate to create a new Drawable.ConstantState for color filtering
-                        if (icon != null) {
-                            icon.mutate();
-                        }
-                        shouldApplyColor = false;
+                    }
                 }
             }
         }