Skip to content

Fix edit SMB connection unable to populate value to dialog - #4598

Merged
EmmanuelMess merged 1 commit into
TeamAmaze:hotfix/3.11.2from
TranceLove:bugfix/4543
Jul 3, 2026
Merged

Fix edit SMB connection unable to populate value to dialog#4598
EmmanuelMess merged 1 commit into
TeamAmaze:hotfix/3.11.2from
TranceLove:bugfix/4543

Conversation

@TranceLove

@TranceLove TranceLove commented Apr 4, 2026

Copy link
Copy Markdown
Collaborator

Description

Fix parsing SMB URL by using android.net.Uri instead of java.net.URL to fix connection settings persistence.

Issue tracker

Fixes #4543

Automatic tests

  • Added test cases

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

@TranceLove
TranceLove requested a review from Copilot April 4, 2026 04:09
@TranceLove TranceLove added Issue-Bug Related unexpected behavior or something worth investigating. Area-UIUX Related to user interface/experience (e.g. dialogs, notifications). Area-SMB Related to SMB connections. labels Apr 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.URL parsing with android.net.Uri.parse() in SmbConnectDialog to correctly parse smb:// 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.

@VishnuSanal VishnuSanal added the PR-Awaiting-Initial-Review DEPRECATED use PR-Code-Review-Passed or PR-Manual-Testing-Passed label Jun 28, 2026

@VishnuSanal VishnuSanal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 🚀

@VishnuSanal VishnuSanal added PR-Awaiting-Final-Review DEPRECATED use PR-Code-Review-Passed or PR-Manual-Testing-Passed and removed PR-Awaiting-Initial-Review DEPRECATED use PR-Code-Review-Passed or PR-Manual-Testing-Passed labels Jun 28, 2026

@EmmanuelMess EmmanuelMess left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tested on emulator.

@EmmanuelMess
EmmanuelMess merged commit 6976cfb into TeamAmaze:hotfix/3.11.2 Jul 3, 2026
9 checks passed
@EmmanuelMess
EmmanuelMess deleted the bugfix/4543 branch July 3, 2026 18:39
EmmanuelMess added a commit that referenced this pull request Aug 14, 2026
Fix edit SMB connection unable to populate value to dialog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-SMB Related to SMB connections. Area-UIUX Related to user interface/experience (e.g. dialogs, notifications). Issue-Bug Related unexpected behavior or something worth investigating. PR-Awaiting-Final-Review DEPRECATED use PR-Code-Review-Passed or PR-Manual-Testing-Passed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants