You're not wrong, and we've already had a similar issue with set_observed_brightness()
reported as BUG: 501446.
The problem is that a version()
check is not enough. The ExternalBrightnessController
itself has to be initialized with a lower s_version
, but then all of its dependent objects use the same fixed version (e.g. 2
) as well, instead of providing a higher version if available.
It doesn't seem like there's "version X or higher" constructor. So I figure the only thing I could do is to try constructing the ExternalBrightnessController
with version 3, catch exception if that doesn't work, try with version 2, catch exception again, finally fall back to version 1.