Skip to content

Fix threading violations, crash bugs, resource leaks, and code cleanup#49

Merged
WahdanZ merged 1 commit into
masterfrom
feature/improvemnts
Mar 18, 2026
Merged

Fix threading violations, crash bugs, resource leaks, and code cleanup#49
WahdanZ merged 1 commit into
masterfrom
feature/improvemnts

Conversation

@WahdanZ

@WahdanZ WahdanZ commented Mar 18, 2026

Copy link
Copy Markdown
Owner

No description provided.

Threading:
- currentBackStack: wrap ADB in execute{}, PSI in ReadAction, popup on EDT
- currentApplicationBackStack: same fix, item callback dispatches to background
- currentActivity: resolve PSI in ReadAction on background thread before invokeLater

Crash safety:
- GetFragmentsCommand: safe split access with getOrNull(2) ?: return
- GetApplicationBackStackCommand: safe array bounds with getOrNull, remove !! on find{}
- Debugger: replace client!! with client ?: return@invokeLater to avoid NPE

Resource leaks:
- AdbControllerImp implements Disposable; removeDeviceChangeListener in dispose()
- Disposer.register(project, controller) wires lifetime to project in BaseAction

Code cleanup:
- Remove println() debug statements (SpockAdbViewer, GetApplicationBackStackCommand)
- Fix exception message "Bazinga!!" → professional message in GetApplicationPermission
- Remove duplicate empty setting.addActionListener{} in SpockAdbViewer
- Remove large commented-out WiFi and refresh blocks in SpockAdbViewer
- Remove dead commented-out code in ConnectDeviceOverIPCommand, CheckBoxDialog
- Rename kippAppProcess → killAppProcess (typo fix) in ProcessDeathCommand
@WahdanZ WahdanZ merged commit 5df6518 into master Mar 18, 2026
3 checks passed
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.

1 participant