Skip to content

Comments

Fix resetAnkiDroidDirectory signature to restore backward compatibility#4

Draft
Copilot wants to merge 3 commits intofix/startup-crash-null-19652from
copilot/sub-pr-2-again
Draft

Fix resetAnkiDroidDirectory signature to restore backward compatibility#4
Copilot wants to merge 3 commits intofix/startup-crash-null-19652from
copilot/sub-pr-2-again

Conversation

Copy link

Copilot AI commented Nov 30, 2025

Purpose / Description

The resetAnkiDroidDirectory method signature was changed in PR #2, removing the optional directory parameter. This broke the call in DatabaseErrorDialog.kt:527 which passes two arguments.

Fixes

Approach

Restored the original method signature with the optional directory parameter:

fun resetAnkiDroidDirectory(
    context: Context,
    directory: File = getDefaultAnkiDroidDirectory(context),
)

This allows both calling patterns:

  • resetAnkiDroidDirectory(context) — uses default directory
  • resetAnkiDroidDirectory(context, directory) — uses specified directory (as used by DatabaseErrorDialog.kt)

How Has This Been Tested?

Code review verified the signature matches both the original implementation and existing call sites.

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits November 30, 2025 20:02
…ameter

Co-authored-by: 7se7en72025 <218611947+7se7en72025@users.noreply.github.com>
Co-authored-by: 7se7en72025 <218611947+7se7en72025@users.noreply.github.com>
Copy link
Author

Copilot AI commented Nov 30, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -Xmx3072M -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Address feedback on graceful fallback for external storage Fix resetAnkiDroidDirectory signature to restore backward compatibility Nov 30, 2025
Copilot AI requested a review from 7se7en72025 November 30, 2025 20:05
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.

2 participants