+1
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
deriveDimension() is the inverse of TypedValue.applyDimension(), so devs don't hardcode equations to convert px -> dp etc. The reason we need to discourage hardcoding is to ensure that devs are using the correct non- linear font scaling curves calculated by applyDimension(). Test: atest FrameworksCoreTests:android.content.res.FontScaleConverterTest && atest FrameworksCoreTests:android.util.TypedValueTest Bug: b/237558231 Change-Id: Id4252b6ddcb6183c7b4fc3489918bcfd95ee1103