Skip to content

Conversation

@TranceLove
Copy link
Collaborator

Description

Added empty Disposable to prevent NPE when SMB search dialog cancels and re-created.

Also added explicit DiscoverDeviceStrategy.onCancel() call when SmbDeviceScannerObservable.stop()s.

Issue tracker

Fixes #4299

Manual tests

  • Done

Device: Pixel 7 emulator running stock Android 14

  1. Tap the Plus sign at the bottom right
  2. Create new SMB connection
  3. The SMB search dialog pops up
  4. Press cancel
  5. Create new SMB connection again
  6. The SMB search dialog pops up again
  7. App should not crash at this point

Build tasks success

Successfully running following tasks on local:

  • ./gradlew assembledebug
  • ./gradlew spotlessCheck

Related PR

Related to PR #4372 - may require this PR for bug-free SMB device discovery experience.

Fixes #4299.

Also added explicit DiscoverDeviceStrategy.onCancel() call when SmbDeviceScannerObservable.stop()s.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

@VishnuSanal VishnuSanal added the PR-Awaiting-Final-Review this PR is awaiting a final review/approval label Apr 14, 2025
Copy link
Member

@EmmanuelMess EmmanuelMess left a comment

Choose a reason for hiding this comment

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

Cannot replicate original issue, but code is an improvement, so I'm approving.

@EmmanuelMess EmmanuelMess merged commit c7e46f1 into release/4.0 Apr 16, 2025
4 checks passed
@EmmanuelMess EmmanuelMess deleted the bugfix/4299 branch April 16, 2025 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Awaiting-Final-Review this PR is awaiting a final review/approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

App Crashes When Canceling SMB Connection After Delay

4 participants