Fix edit SMB connection unable to populate value to dialog#4598
Open
TranceLove wants to merge 1 commit intoTeamAmaze:hotfix/3.11.2from
Open
Fix edit SMB connection unable to populate value to dialog#4598TranceLove wants to merge 1 commit intoTeamAmaze:hotfix/3.11.2from
TranceLove wants to merge 1 commit intoTeamAmaze:hotfix/3.11.2from
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes SMB edit-connection dialog field population by switching URL parsing from java.net.URL (which rejects smb:// as an unknown protocol) to android.net.Uri, ensuring existing connection details are correctly extracted and shown when editing.
Changes:
- Replace
java.net.URLparsing withandroid.net.Uri.parse()inSmbConnectDialogto correctly parsesmb://URIs. - Add Robolectric UI regression tests to verify edit-mode dialog fields are pre-filled for both authenticated and anonymous SMB connections.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| app/src/main/java/com/amaze/filemanager/ui/dialogs/SmbConnectDialog.java | Uses android.net.Uri to parse SMB URIs and populate edit dialog fields reliably. |
| app/src/test/java/com/amaze/filemanager/ui/dialogs/SmbConnectDialogTest.kt | Adds regression tests covering authenticated + anonymous edit prefill behavior (Issue #4543). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Description
Fix parsing SMB URL by using
android.net.Uriinstead ofjava.net.URLto fix connection settings persistence.Issue tracker
Fixes #4543
Automatic tests
Manual tests
Done
Device: Pixel 4 XL emulator
OS: Android 9
Changing SMB connection name shall keep the connection settings intact and working, even across restarts.
Screen_recording_20260404_113012.mp4
Build tasks success
Successfully running following tasks on local:
./gradlew assembledebug./gradlew spotlessCheck