fix(android): Avoid Math floor APIs (#5743)
* fix(android): Avoid Math floor APIs Replace Math.floorDiv and Math.floorMod in the shared timestamp formatter with local helpers so Android consumers do not call APIs unavailable on older supported Android versions. Co-Authored-By: Claude <noreply@anthropic.com> * changelog * fix(android): Add attributed floor math helpers Move the floor division and modulo replacements into a dedicated SentryMath class with Android Open Source Project attribution and third-party notices. Add tests that compare the helper behavior against Java Math for edge cases. Co-Authored-By: Claude <noreply@anthropic.com> * fix(android): Use independent floor math helpers Remove the incorrect AOSP attribution for SentryMath. The referenced Android Math source is GPLv2 with the Classpath exception, not Apache 2.0. Implement the helpers directly from quotient and remainder semantics instead. Co-Authored-By: Claude <noreply@anthropic.com> * fix(android): Adapt floor math from Guava Use Apache-licensed Guava LongMath floor division logic for SentryMath and restore the matching third-party attribution. Keep floorMod implemented through floorDiv so it matches Math.floorMod for negative divisors too. Co-Authored-By: Claude <noreply@anthropic.com> * changelog * docs(changelog): Mention Android NoSuchMethodError Update the unreleased changelog entry to call out the Android API compatibility failure more directly. Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
A
Alexander Dinauer committed
a5db1a2886c386bbed4272e74192f95a1dc9e260
Parent: e3bd612
Committed by GitHub <noreply@github.com>
on 7/8/2026, 12:03:56 PM