libhwc2.1: add range check when setting layer alpha

Expected alpha is a floating point value in the range [0.0, 1.0]. If the
alpha is set out of range, return a error.

Bug: 238983569
Test: play Paint By Number with "Show tap" and "Pointer location"
Change-Id: Ibdace186a5b3c9e74148eabbf6a403239df6ab0e
Merged-In: Ibdace186a5b3c9e74148eabbf6a403239df6ab0e
(cherry picked from commit e9b3eedc94df919052b12e379a987e550eda6fe1)
1 file changed