Skip to content

chore: Enable StrictMode in debug builds#148

Merged
tevincent merged 1 commit intomainfrom
copilot/add-strict-mode-debug
Apr 30, 2026
Merged

chore: Enable StrictMode in debug builds#148
tevincent merged 1 commit intomainfrom
copilot/add-strict-mode-debug

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 29, 2026

No description provided.

@tevincent tevincent marked this pull request as ready for review April 29, 2026 16:02
Copilot AI review requested due to automatic review settings April 29, 2026 16:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables Android StrictMode in debug builds to surface thread and VM policy violations during development without impacting release behavior.

Changes:

  • Configure StrictMode ThreadPolicy (detect all + flash screen + log) when BuildConfig.DEBUG is true.
  • Configure StrictMode VmPolicy (detect all + log) when BuildConfig.DEBUG is true.
  • Initialize StrictMode at the start of Application.onCreate() to catch early initialization violations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tevincent tevincent changed the title Enable StrictMode in debug builds chore: Enable StrictMode in debug builds Apr 29, 2026
@tevincent tevincent force-pushed the copilot/add-strict-mode-debug branch from 7f0031f to 016fc8d Compare April 30, 2026 06:24
Copilot AI requested a review from tevincent April 30, 2026 06:58
@tevincent tevincent requested a review from LouisCAD April 30, 2026 07:13
@tevincent tevincent enabled auto-merge April 30, 2026 07:39
@tevincent tevincent force-pushed the copilot/add-strict-mode-debug branch from 79bdbc6 to 1e638a6 Compare April 30, 2026 07:48
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>
@tevincent tevincent force-pushed the copilot/add-strict-mode-debug branch from 1e638a6 to 0a9e609 Compare April 30, 2026 07:48
@tevincent tevincent disabled auto-merge April 30, 2026 07:54
@tevincent tevincent enabled auto-merge April 30, 2026 07:54
@tevincent tevincent merged commit 9923a76 into main Apr 30, 2026
9 checks passed
@tevincent tevincent deleted the copilot/add-strict-mode-debug branch April 30, 2026 07:55
@sonarqubecloud
Copy link
Copy Markdown

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.

4 participants