From 638bd2def0782ee60647a30bf9fdf0d702957068 Mon Sep 17 00:00:00 2001 From: wangqi Date: Thu, 17 Aug 2017 17:05:01 -0700 Subject: Remove unused business and emergency avatar photo. This could be a memory eater since the image is very large. Removing them shouldn't affect any UI. For emergency we don't show any photo, for business it's handled by LetterTileDrawable. Bug: 64342472 Test: manually tested emergency call and business call PiperOrigin-RevId: 165649520 Change-Id: I3f64b15949329f8fc995f2f130618dfb0a7f5252 --- java/com/android/incallui/CallCardPresenter.java | 5 ----- java/com/android/incallui/CallerInfo.java | 1 - java/com/android/incallui/ContactInfoCache.java | 10 ---------- .../incall/protocol/InCallScreenDelegate.java | 4 ---- .../incallui/res/drawable-hdpi/img_business.png | Bin 3311 -> 0 bytes .../incallui/res/drawable-hdpi/img_no_image.png | Bin 5362 -> 0 bytes .../incallui/res/drawable-hdpi/img_phone.png | Bin 6157 -> 0 bytes .../incallui/res/drawable-mdpi/img_business.png | Bin 2240 -> 0 bytes .../incallui/res/drawable-mdpi/img_no_image.png | Bin 3509 -> 0 bytes .../incallui/res/drawable-mdpi/img_phone.png | Bin 3798 -> 0 bytes .../incallui/res/drawable-xhdpi/img_business.png | Bin 4759 -> 0 bytes .../incallui/res/drawable-xhdpi/img_no_image.png | Bin 7369 -> 0 bytes .../incallui/res/drawable-xhdpi/img_phone.png | Bin 8189 -> 0 bytes .../incallui/res/drawable-xxhdpi/img_business.png | Bin 6499 -> 0 bytes .../incallui/res/drawable-xxhdpi/img_no_image.png | Bin 9850 -> 0 bytes .../incallui/res/drawable-xxhdpi/img_phone.png | Bin 10848 -> 0 bytes .../incallui/res/drawable-xxxhdpi/img_business.png | Bin 10730 -> 0 bytes .../incallui/res/drawable-xxxhdpi/img_no_image.png | Bin 16251 -> 0 bytes .../incallui/res/drawable-xxxhdpi/img_phone.png | Bin 18635 -> 0 bytes .../res/drawable/img_no_image_automirrored.xml | 21 --------------------- 20 files changed, 41 deletions(-) delete mode 100644 java/com/android/incallui/res/drawable-hdpi/img_business.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/img_no_image.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/img_phone.png delete mode 100644 java/com/android/incallui/res/drawable-mdpi/img_business.png delete mode 100644 java/com/android/incallui/res/drawable-mdpi/img_no_image.png delete mode 100644 java/com/android/incallui/res/drawable-mdpi/img_phone.png delete mode 100644 java/com/android/incallui/res/drawable-xhdpi/img_business.png delete mode 100644 java/com/android/incallui/res/drawable-xhdpi/img_no_image.png delete mode 100644 java/com/android/incallui/res/drawable-xhdpi/img_phone.png delete mode 100644 java/com/android/incallui/res/drawable-xxhdpi/img_business.png delete mode 100644 java/com/android/incallui/res/drawable-xxhdpi/img_no_image.png delete mode 100644 java/com/android/incallui/res/drawable-xxhdpi/img_phone.png delete mode 100644 java/com/android/incallui/res/drawable-xxxhdpi/img_business.png delete mode 100644 java/com/android/incallui/res/drawable-xxxhdpi/img_no_image.png delete mode 100644 java/com/android/incallui/res/drawable-xxxhdpi/img_phone.png delete mode 100644 java/com/android/incallui/res/drawable/img_no_image_automirrored.xml (limited to 'java/com') diff --git a/java/com/android/incallui/CallCardPresenter.java b/java/com/android/incallui/CallCardPresenter.java index 824d87554..389b7c151 100644 --- a/java/com/android/incallui/CallCardPresenter.java +++ b/java/com/android/incallui/CallCardPresenter.java @@ -553,11 +553,6 @@ public class CallCardPresenter InCallPresenter.getInstance().onShrinkAnimationComplete(); } - @Override - public Drawable getDefaultContactPhotoDrawable() { - return ContactInfoCache.getInstance(mContext).getDefaultContactPhotoDrawable(); - } - private void maybeStartSearch(DialerCall call, boolean isPrimary) { // no need to start search for conference calls which show generic info. if (call != null && !call.isConferenceCall()) { diff --git a/java/com/android/incallui/CallerInfo.java b/java/com/android/incallui/CallerInfo.java index f0dbe9179..e552d7cd9 100644 --- a/java/com/android/incallui/CallerInfo.java +++ b/java/com/android/incallui/CallerInfo.java @@ -475,7 +475,6 @@ public class CallerInfo { name = context.getString(R.string.emergency_call_dialog_number_for_display); phoneNumber = null; - photoResource = R.drawable.img_phone; mIsEmergency = true; return this; } diff --git a/java/com/android/incallui/ContactInfoCache.java b/java/com/android/incallui/ContactInfoCache.java index 353015313..9b92b487c 100644 --- a/java/com/android/incallui/ContactInfoCache.java +++ b/java/com/android/incallui/ContactInfoCache.java @@ -615,7 +615,6 @@ public class ContactInfoCache implements OnImageLoadCompleteListener { cce.photo = info.cachedPhoto; cce.photoType = ContactPhotoType.CONTACT; } else { - cce.photo = getDefaultContactPhotoDrawable(); cce.photoType = ContactPhotoType.DEFAULT_PLACEHOLDER; } } else { @@ -669,14 +668,6 @@ public class ContactInfoCache implements OnImageLoadCompleteListener { mCallBacks.remove(callId); } - public Drawable getDefaultContactPhotoDrawable() { - if (mDefaultContactPhotoDrawable == null) { - mDefaultContactPhotoDrawable = - mContext.getResources().getDrawable(R.drawable.img_no_image_automirrored); - } - return mDefaultContactPhotoDrawable; - } - /** Callback interface for the contact query. */ public interface ContactInfoCacheCallback { @@ -891,7 +882,6 @@ public class ContactInfoCache implements OnImageLoadCompleteListener { // If no image and it's a business, switch to using the default business avatar. if (info.getImageUrl() == null && info.isBusiness()) { Log.d(TAG, "Business has no image. Using default."); - entry.photo = mContext.getResources().getDrawable(R.drawable.img_business); entry.photoType = ContactPhotoType.BUSINESS; } diff --git a/java/com/android/incallui/incall/protocol/InCallScreenDelegate.java b/java/com/android/incallui/incall/protocol/InCallScreenDelegate.java index 98c3e0f31..c491eab78 100644 --- a/java/com/android/incallui/incall/protocol/InCallScreenDelegate.java +++ b/java/com/android/incallui/incall/protocol/InCallScreenDelegate.java @@ -16,8 +16,6 @@ package com.android.incallui.incall.protocol; -import android.graphics.drawable.Drawable; - /** Callbacks from the module out to the container. */ public interface InCallScreenDelegate { @@ -40,6 +38,4 @@ public interface InCallScreenDelegate { void onInCallScreenResumed(); void onInCallScreenPaused(); - - Drawable getDefaultContactPhotoDrawable(); } diff --git a/java/com/android/incallui/res/drawable-hdpi/img_business.png b/java/com/android/incallui/res/drawable-hdpi/img_business.png deleted file mode 100644 index f70634262..000000000 Binary files a/java/com/android/incallui/res/drawable-hdpi/img_business.png and /dev/null differ diff --git a/java/com/android/incallui/res/drawable-hdpi/img_no_image.png b/java/com/android/incallui/res/drawable-hdpi/img_no_image.png deleted file mode 100644 index fd0ab3211..000000000 Binary files a/java/com/android/incallui/res/drawable-hdpi/img_no_image.png and /dev/null differ diff --git a/java/com/android/incallui/res/drawable-hdpi/img_phone.png b/java/com/android/incallui/res/drawable-hdpi/img_phone.png deleted file mode 100644 index 748312e6e..000000000 Binary files a/java/com/android/incallui/res/drawable-hdpi/img_phone.png and /dev/null differ diff --git a/java/com/android/incallui/res/drawable-mdpi/img_business.png b/java/com/android/incallui/res/drawable-mdpi/img_business.png deleted file mode 100644 index 90738a7ee..000000000 Binary files a/java/com/android/incallui/res/drawable-mdpi/img_business.png and /dev/null differ diff --git a/java/com/android/incallui/res/drawable-mdpi/img_no_image.png b/java/com/android/incallui/res/drawable-mdpi/img_no_image.png deleted file mode 100644 index 014a1c414..000000000 Binary files a/java/com/android/incallui/res/drawable-mdpi/img_no_image.png and /dev/null differ diff --git a/java/com/android/incallui/res/drawable-mdpi/img_phone.png b/java/com/android/incallui/res/drawable-mdpi/img_phone.png deleted file mode 100644 index 41a1d339d..000000000 Binary files a/java/com/android/incallui/res/drawable-mdpi/img_phone.png and /dev/null differ diff --git a/java/com/android/incallui/res/drawable-xhdpi/img_business.png b/java/com/android/incallui/res/drawable-xhdpi/img_business.png deleted file mode 100644 index 7b04d956f..000000000 Binary files a/java/com/android/incallui/res/drawable-xhdpi/img_business.png and /dev/null differ diff --git a/java/com/android/incallui/res/drawable-xhdpi/img_no_image.png b/java/com/android/incallui/res/drawable-xhdpi/img_no_image.png deleted file mode 100644 index 4022207d0..000000000 Binary files a/java/com/android/incallui/res/drawable-xhdpi/img_no_image.png and /dev/null differ diff --git a/java/com/android/incallui/res/drawable-xhdpi/img_phone.png b/java/com/android/incallui/res/drawable-xhdpi/img_phone.png deleted file mode 100644 index 2e0ceec0f..000000000 Binary files a/java/com/android/incallui/res/drawable-xhdpi/img_phone.png and /dev/null differ diff --git a/java/com/android/incallui/res/drawable-xxhdpi/img_business.png b/java/com/android/incallui/res/drawable-xxhdpi/img_business.png deleted file mode 100644 index c17e4c9d8..000000000 Binary files a/java/com/android/incallui/res/drawable-xxhdpi/img_business.png and /dev/null differ diff --git a/java/com/android/incallui/res/drawable-xxhdpi/img_no_image.png b/java/com/android/incallui/res/drawable-xxhdpi/img_no_image.png deleted file mode 100644 index 2cf7f23a0..000000000 Binary files a/java/com/android/incallui/res/drawable-xxhdpi/img_no_image.png and /dev/null differ diff --git a/java/com/android/incallui/res/drawable-xxhdpi/img_phone.png b/java/com/android/incallui/res/drawable-xxhdpi/img_phone.png deleted file mode 100644 index 4eaaba509..000000000 Binary files a/java/com/android/incallui/res/drawable-xxhdpi/img_phone.png and /dev/null differ diff --git a/java/com/android/incallui/res/drawable-xxxhdpi/img_business.png b/java/com/android/incallui/res/drawable-xxxhdpi/img_business.png deleted file mode 100644 index 88f14e999..000000000 Binary files a/java/com/android/incallui/res/drawable-xxxhdpi/img_business.png and /dev/null differ diff --git a/java/com/android/incallui/res/drawable-xxxhdpi/img_no_image.png b/java/com/android/incallui/res/drawable-xxxhdpi/img_no_image.png deleted file mode 100644 index 216574222..000000000 Binary files a/java/com/android/incallui/res/drawable-xxxhdpi/img_no_image.png and /dev/null differ diff --git a/java/com/android/incallui/res/drawable-xxxhdpi/img_phone.png b/java/com/android/incallui/res/drawable-xxxhdpi/img_phone.png deleted file mode 100644 index 7cbfbd75e..000000000 Binary files a/java/com/android/incallui/res/drawable-xxxhdpi/img_phone.png and /dev/null differ diff --git a/java/com/android/incallui/res/drawable/img_no_image_automirrored.xml b/java/com/android/incallui/res/drawable/img_no_image_automirrored.xml deleted file mode 100644 index 9a9ec9706..000000000 --- a/java/com/android/incallui/res/drawable/img_no_image_automirrored.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - \ No newline at end of file -- cgit v1.2.3