Skip to content

Fix accepting a certificate crashing ICSx5#699

Merged
sunkup merged 5 commits into
devfrom
697-accepting-certificate-starts-empty-add-subscription-screen
Sep 11, 2025
Merged

Fix accepting a certificate crashing ICSx5#699
sunkup merged 5 commits into
devfrom
697-accepting-certificate-starts-empty-add-subscription-screen

Conversation

@sunkup

@sunkup sunkup commented Sep 10, 2025

Copy link
Copy Markdown
Member

Purpose

Accepting a certificate crashes ICSx5.

Short description

  • update cert4android
  • track foreground state and pass to cert4android (same way as in DAVx5)

Checklist

  • The PR has a proper title, description and label.
  • I have self-reviewed the PR.
  • I have added documentation to complex functions and functions that can be used by other modules.
  • I have added reasonable tests or consciously decided to not add tests.

@sunkup sunkup added this to the 2.4.1 milestone Sep 10, 2025
@sunkup sunkup self-assigned this Sep 10, 2025
@sunkup sunkup added the bug label Sep 10, 2025
@sunkup sunkup linked an issue Sep 10, 2025 that may be closed by this pull request
@sunkup
sunkup requested a review from Copilot September 10, 2025 11:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a crash in ICSx5 that occurs when accepting a certificate by updating the cert4android library and implementing proper foreground state tracking.

  • Updates cert4android library to version 41009d4 which likely contains the fix for the certificate acceptance crash
  • Implements a ForegroundTracker singleton to track when the app is in the foreground/background
  • Integrates the foreground tracking with cert4android's CustomCertManager to enable proper certificate dialog handling

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
gradle/libs.versions.toml Updates cert4android library version from f0964cb to 41009d4
app/src/main/java/at/bitfire/icsdroid/ui/ForegroundTracker.kt Adds new singleton class to track app foreground/background state using StateFlow
app/src/main/java/at/bitfire/icsdroid/ui/theme/Theme.kt Integrates foreground tracking into the app theme using LifecycleResumeEffect
app/src/main/java/at/bitfire/icsdroid/AppHttpClient.kt Updates CustomCertManager to use the ForegroundTracker instead of a hardcoded false value

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread app/src/main/java/at/bitfire/icsdroid/ui/ForegroundTracker.kt Outdated
@sunkup
sunkup marked this pull request as ready for review September 10, 2025 11:44
@sunkup
sunkup requested a review from ArnyminerZ September 10, 2025 11:44
@ArnyminerZ

Copy link
Copy Markdown
Member

Feel free to merge

@sunkup
sunkup merged commit ee36758 into dev Sep 11, 2025
7 checks passed
@sunkup
sunkup deleted the 697-accepting-certificate-starts-empty-add-subscription-screen branch September 11, 2025 11:08
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.

Accepting certificate crashes ICSx5

3 participants