From 3daed1083271f0b6710d785b6ac867af1589c344 Mon Sep 17 00:00:00 2001 From: "e.min" Date: Mon, 24 Feb 2020 11:12:24 +0900 Subject: [PATCH] Delete size limitation for ContrastColorUtil.isGrayScale() method. loss of performance is tiny because, image will be resized at ImageUtil.isGrayscale() method. Test: situation that one notification is sended to other resoltion devices, ex) using DEX mode, Test: notification can be inflated at different resolution context. Test: and app can have notification icon that is made dynamically. Test: (it doesn't have resource for each resolution. ex: calendar notice icon with number) Test: at this moment, judgement for grayscale can be differed from each device. Change-Id: I2755c56869aba58287137f683a81ec4ddfd3d7c1 --- core/java/com/android/internal/util/ContrastColorUtil.java | 2 +- core/res/res/values/dimens.xml | 2 ++ core/res/res/values/symbols.xml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/java/com/android/internal/util/ContrastColorUtil.java b/core/java/com/android/internal/util/ContrastColorUtil.java index bf088e0a27554..8508a8dd71a49 100644 --- a/core/java/com/android/internal/util/ContrastColorUtil.java +++ b/core/java/com/android/internal/util/ContrastColorUtil.java @@ -73,7 +73,7 @@ public class ContrastColorUtil { private ContrastColorUtil(Context context) { mGrayscaleIconMaxSize = context.getResources().getDimensionPixelSize( - com.android.internal.R.dimen.notification_large_icon_width); + com.android.internal.R.dimen.notification_grayscale_icon_max_size); } /** diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml index 609659b62948d..1f7a120d8e4c3 100644 --- a/core/res/res/values/dimens.xml +++ b/core/res/res/values/dimens.xml @@ -680,6 +680,8 @@ 100dp @dimen/notification_right_icon_size + + 256dp @dimen/notification_right_icon_size diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 62cc7b3fc65e2..2e9811aa7d331 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -3388,6 +3388,7 @@ +