fix(high contrast text): fix grey text sometimes getting lighter when it should get darker and vice-versa

Use perceptual luminance instead of RGB heuristic to decide to lighten
or darken.

Bug: 186567103
Test: manual
1. adb shell setenforce 0 && adb shell setprop persist.device_config.aconfig_flags.accessibility.com.android.graphics.hwui.flags.high_contrast_text_luminance true && adb shell stop && adb shell start

Change-Id: Ief7ae6c10e1043694ffc10b1d827ebeaada61131
3 files changed