Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1655613 - Work around a crash on Android 8 buggy devices #1135

Merged
merged 1 commit into from
Aug 6, 2020

Conversation

Dexterp37
Copy link
Contributor

This works around a bug in the Java compiler on some Android 8/8.1 devices (SDK=25). See here for more details. On buggy devices, an AssertionError is raised because the timezone name enum switch is compiled into racy code. Since we only use the timezone name in our logs, we can safely swap that out.

We don't need this defensive programming in DateUtis.kt as we're not using timezone names there.

@auto-assign auto-assign bot requested a review from badboy August 6, 2020 10:26
@Dexterp37 Dexterp37 changed the title Work around a crash on Android 8 buggy devices Bug 1655613 - Work around a crash on Android 8 buggy devices Aug 6, 2020
This works around a bug in the Java compiler on
some Android 8/8.1 devices (SDK=25). See [here](https://issuetracker.google.com/issues/110848122#comment17)
for more details. On buggy devices, an `AssertionError` is
raised because the timezone name `enum` switch is compiled
into racy code. Since we only use the timezone name in
our logs, we can safely swap that out.

We don't need this defensive programming in `DateUtis.kt`
as we're not using timezone names there.
@Dexterp37 Dexterp37 merged commit 85c44c5 into mozilla:main Aug 6, 2020
@Dexterp37 Dexterp37 deleted the android_tz_crash branch August 6, 2020 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants