diff options
author | twyen <twyen@google.com> | 2018-02-08 18:28:46 -0800 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2018-02-09 17:38:48 -0800 |
commit | f7f2a4cfe4da2179666ee171931aa19b7b3124db (patch) | |
tree | 9dab9431ff84884d5e0554627604ba6882d7354e | |
parent | b841a6eec0901b737fb974e2714705bb77649f6b (diff) |
Used VectorDrawable for Blocked Numbers
Previously the icon is tinted with a BitmapDrawable, which glide ignores. This CL uses a VectorDrawable instead.
Bug: 73089932
Test: N/A
PiperOrigin-RevId: 185084222
Change-Id: I99ef5ccf40aeb52f40d21ef8418ea8f16ec0f2dc
3 files changed, 13 insertions, 3 deletions
diff --git a/java/com/android/dialer/glidephotomanager/impl/GlidePhotoManagerImpl.java b/java/com/android/dialer/glidephotomanager/impl/GlidePhotoManagerImpl.java index 20d379c48..c6d92057d 100644 --- a/java/com/android/dialer/glidephotomanager/impl/GlidePhotoManagerImpl.java +++ b/java/com/android/dialer/glidephotomanager/impl/GlidePhotoManagerImpl.java @@ -65,6 +65,9 @@ public class GlidePhotoManagerImpl implements GlidePhotoManager { } private GlideRequest<Drawable> buildRequest(GlideRequests requestManager, PhotoInfo photoInfo) { + // Warning: Glide ignores extra attributes on BitmapDrawable such as tint and draw the bitmap + // directly so be sure not to set tint in the XML of any drawable referenced below. + // The spam status takes precedence over whether the number is blocked. if (photoInfo.isSpam()) { return requestManager.load(R.drawable.ic_report_red_48dp); diff --git a/java/com/android/dialer/glidephotomanager/impl/res/drawable-xxxhdpi/ic_block_black_48dp.png b/java/com/android/dialer/glidephotomanager/impl/res/drawable-xxxhdpi/ic_block_black_48dp.png Binary files differdeleted file mode 100644 index 1168bd8d5..000000000 --- a/java/com/android/dialer/glidephotomanager/impl/res/drawable-xxxhdpi/ic_block_black_48dp.png +++ /dev/null diff --git a/java/com/android/dialer/glidephotomanager/impl/res/drawable/ic_block_grey_48dp.xml b/java/com/android/dialer/glidephotomanager/impl/res/drawable/ic_block_grey_48dp.xml index 42cfa99bd..9d2fb368b 100644 --- a/java/com/android/dialer/glidephotomanager/impl/res/drawable/ic_block_grey_48dp.xml +++ b/java/com/android/dialer/glidephotomanager/impl/res/drawable/ic_block_grey_48dp.xml @@ -12,6 +12,13 @@ See the License for the specific language governing permissions and limitations under the License. --> -<bitmap xmlns:android="http://schemas.android.com/apk/res/android" - android:src="@drawable/ic_block_black_48dp" - android:tint="#757575" />
\ No newline at end of file +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path android:pathData="M0 0h24v24H0z"/> + <path + android:fillColor="#757575" + android:pathData="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z"/> +</vector>
\ No newline at end of file |