Fix contrast ratio issue when wallpaper support dark text.

Currently, the background color generated by calculating a proper
contrast ratio between text and background and we use white as text
color to do this calculation. For some wallpaper that support dark text,
EmergencyDialer wil set the text in that dialer to black.
If the text is black, we try to make the background color lighter and
lighter, until the contrast ratio follows the accessibility rules.

Bug: 154290456
Test: Manually set wallpaper to dark-text-support wallpapers
Change-Id: I696e3f80c17bdc5ebaa960bc9a5b04f2218039fa
Merged-In: I696e3f80c17bdc5ebaa960bc9a5b04f2218039fa
(cherry picked from commit 4c2e6ae79941d4d1118c1e02cf859de2a7347c22)
1 file changed