-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Enable the thread police 👮 for debug builds #1050
Conversation
app/src/main/kotlin/com/google/samples/apps/nowinandroid/NiaApplication.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/com/google/samples/apps/nowinandroid/NiaApplication.kt
Outdated
Show resolved
Hide resolved
After enabling the StrictMode, the application will crash when launched.
|
Quick question: should we also enable strict VmPolicy? |
b4e077c
to
d45ad54
Compare
app/src/main/kotlin/com/google/samples/apps/nowinandroid/MainActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/com/google/samples/apps/nowinandroid/MainActivity.kt
Outdated
Show resolved
Hide resolved
d45ad54
to
5b5b534
Compare
The RemoteConfig issue is being tracked here: firebase/firebase-android-sdk#5347 and I'm following up with the team. |
app/src/main/kotlin/com/google/samples/apps/nowinandroid/MainActivity.kt
Outdated
Show resolved
Hide resolved
6812237
to
7af51af
Compare
7af51af
to
87002c2
Compare
Combined test coverage report
Files
|
* App will now crash if someone does funky stuff on the main thread. Change-Id: I9026c100705f2fec6963a1d888b40906186f9d28
87002c2
to
e803562
Compare
This PR does not break runtime any longer and can be accepted after positive review. |
app/src/main/kotlin/com/google/samples/apps/nowinandroid/NiaApplication.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/com/google/samples/apps/nowinandroid/NiaApplication.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor refactoring required
…plication.kt Co-authored-by: Don Turner <[email protected]>
Change-Id: If170b2b05859ebfca7bc91ccc790be5b43a1b772
All requested changes addressed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's.....beautiful.... 😍
FYI: the issue firebase/firebase-android-sdk#5347 has been closed and "locked and limited conversation to collaborators" while it seems to not be entirely fixed: @keyboardsurfer any idea what was fixed exactly on their side? (I'm not able to reproduce the issue, though I don't have a similar device) |
I have no insights to share but the last comment on the issue shows where we can expect this to work firebase/firebase-android-sdk#5347 (comment) |
The crash still happens with the latest |
What I have done and why
App will now crash if someone does funky stuff on the main thread for debug builds.
This enforces programming thread safe programming (even though there are no obvious violations at the moment).
g
Do tests pass?
DemoDebug
variant:./gradlew testDemoDebug
./gradlew --init-script gradle/init.gradle.kts spotlessApply
Is this your first pull request?
./tools/setup.sh