Build.parseFullVersion: verify values are within acceptable range
When converting a major.minor version String to a Java int, only so many
digits can fit. This puts a hard limit on the maximum value of the major
and minor versions:
- major must be less than 21_474
- minor must be less than 100_000
Update Build.parseFullVersion to fail if either value is larger than the
limit.
Note: neither major nor minor version can be negative:
Build.parseFullVersion already checks for that.
Bug: 380245536
Test: atest FrameworksCoreTests:android.os.BuildTest
Flag: EXEMPT trivial bugfix
Change-Id: I5004ca7c0553110cdab3fe66fe15ece6ce6846ba
2 files changed