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

Switch DirectBootMigrationService to a background service #577

Merged
merged 1 commit into from
Aug 2, 2024

Commits on Aug 2, 2024

  1. Switch DirectBootMigrationService to a background service

    There seem to be two issues with the foreground service:
    
    * Some Android builds seem to be broken and throw a
      ForegroundServiceDidNotStartInTimeException even though the service
      unconditionally calls startForeground() in onStartCommand(). The root
      cause of this is unknown. Perhaps these devices are exceptionally slow
      during boot?
    * The persistent notification does not get dismissed when the file
      migration runs too quickly.
    
    We may be able to work around the second issue by not setting the
    FOREGROUND_SERVICE_IMMEDIATE notification behavior flag, but given how
    fast the file migration is, let's just switch to a background service.
    We're unlikely to hit Android's limitations on background services.
    
    Closes: #574
    Closes: #576
    
    Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
    chenxiaolong committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    17f6d19 View commit details
    Browse the repository at this point in the history