chore: Enable StrictMode in debug builds#148
Merged
Conversation
Copilot created this pull request from a session on behalf of
tevincent
April 29, 2026 16:02
View session
There was a problem hiding this comment.
Pull request overview
Enables Android StrictMode in debug builds to surface thread and VM policy violations during development without impacting release behavior.
Changes:
- Configure
StrictModeThreadPolicy(detect all + flash screen + log) whenBuildConfig.DEBUGis true. - Configure
StrictModeVmPolicy(detect all + log) whenBuildConfig.DEBUGis true. - Initialize
StrictModeat the start ofApplication.onCreate()to catch early initialization violations.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7f0031f to
016fc8d
Compare
79bdbc6 to
1e638a6
Compare
Agent-Logs-Url: https://github.com/Infomaniak/android-authenticator/sessions/ee83859b-f72b-476f-a4e7-749697608dd6 Co-authored-by: tevincent <149579879+tevincent@users.noreply.github.com> chore: Move setupStrictMode() before super.onCreate() to catch init violations Agent-Logs-Url: https://github.com/Infomaniak/android-authenticator/sessions/ee83859b-f72b-476f-a4e7-749697608dd6 Co-authored-by: tevincent <149579879+tevincent@users.noreply.github.com> Move setupStrictMode() after super.onCreate() to align with Android docs Agent-Logs-Url: https://github.com/Infomaniak/android-authenticator/sessions/d25cd2c0-71f9-42fc-a82c-eb9dd8f05e87 Co-authored-by: tevincent <149579879+tevincent@users.noreply.github.com> feat: report main-thread StrictMode violations to Sentry in production Agent-Logs-Url: https://github.com/Infomaniak/android-authenticator/sessions/b72f6b85-c9bc-43a7-b490-8e497775d3e0 Co-authored-by: tevincent <149579879+tevincent@users.noreply.github.com> refactor: replace Build.VERSION_CODES.P with literal value 28 Agent-Logs-Url: https://github.com/Infomaniak/android-authenticator/sessions/a93ed231-7036-42cc-9572-5bbfde807284 Co-authored-by: tevincent <149579879+tevincent@users.noreply.github.com> refactor: static import SDK_INT, invert DEBUG condition Agent-Logs-Url: https://github.com/Infomaniak/android-authenticator/sessions/805018c9-2fef-40ab-b0bb-ba0b92aaa158 Co-authored-by: tevincent <149579879+tevincent@users.noreply.github.com>
1e638a6 to
0a9e609
Compare
LouisCAD
approved these changes
Apr 30, 2026
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.