OSDN Git Service

More conservative dark text calculation
authorLucas Dupin <dupin@google.com>
Thu, 7 Jun 2018 20:59:42 +0000 (13:59 -0700)
committerLucas Dupin <dupin@google.com>
Thu, 7 Jun 2018 23:33:09 +0000 (16:33 -0700)
commita291d19e47a8a784fda56566754364d2107baed4
tree00a96dd900e4d4384d376bd8a5f95855c83a8c47
parent843a0cabbfef800f8c9ec0ff04fb1593272c3e00
More conservative dark text calculation

Refactored WallpaperColors to use constrast ratio instead of luminance
for detecting dark pixels. Also using a contrast more conservative than
what GAR requires while decreasing the dark area threshold.

Change-Id: I67b799be4b7ccd50bb3e63c6179d513b9b76446b
Fixes: 76435920
Test: manually set various wallpapers
Test: use new debug flag to verify which pixel is actually dark
16 files changed:
core/java/android/app/Notification.java
core/java/android/app/WallpaperColors.java
core/java/android/widget/RemoteViews.java
core/java/com/android/internal/util/ContrastColorUtil.java [moved from core/java/com/android/internal/util/NotificationColorUtil.java with 97% similarity]
core/java/com/android/internal/widget/MessagingLayout.java
core/tests/coretests/src/android/app/NotificationTest.java
packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java
packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
packages/SystemUI/src/com/android/systemui/statusbar/notification/MediaNotificationProcessor.java
packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationTemplateViewWrapper.java
packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationUtils.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconAreaController.java
packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java
packages/SystemUI/tests/src/com/android/systemui/statusbar/StatusBarIconViewTest.java