Fix uses of deprecated min() and max() functions These have been removed in Kotlin 1.5 and this library is still using the deprecated versions. Test: make flickerlib Bug: 187518755 Change-Id: I1381f2d40a296357a92b931127415d724c121aa2