Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better progress display when initializing ADB interactively #326

Closed
mlopatkin opened this issue Nov 13, 2023 · 0 comments · Fixed by #352
Closed

Better progress display when initializing ADB interactively #326

mlopatkin opened this issue Nov 13, 2023 · 0 comments · Fixed by #352
Assignees
Labels
a:enhancement New feature or request in:adb interaction with ADB
Milestone

Comments

@mlopatkin
Copy link
Owner

ADB initialization may take a long time (couple seconds). For interactive scenarios, when the user clicks something like "Connect to device" that has to initialize ADB server to provide a response, the app shows an hourglass cursor. However, it gives little information to the user about what is going on, and there is no way to cancel the operation.

We can solve the conundrum in two ways:

  • make SelectDeviceDialog semi-independent of AdbServices, and show a spinner inside it;
  • show a progress bar dialog with a Cancel button in between clicking the menu and showing the SelectDeviceDialog.

The second option seems easier to implement, but the first seems nicer - no extra dialogs, which is especially important if the initialization time is short.

@mlopatkin mlopatkin added a:enhancement New feature or request in:adb interaction with ADB labels Nov 13, 2023
@mlopatkin mlopatkin added this to the 0.22 milestone Nov 13, 2023
@mlopatkin mlopatkin self-assigned this Dec 26, 2023
mlopatkin added a commit that referenced this issue Jan 2, 2024
This is to ensure maximum flexibility of the view implementation.
Swing's modal dialogs are blocking, but run an inner event loop, so the
future callback has to be set up before actually showing the view.

Issue: #326
mlopatkin added a commit that referenced this issue Jan 2, 2024
The dialog can cancel the action, but not the initialization of the ADB
itself.

Issue: #326
mlopatkin added a commit that referenced this issue Jan 2, 2024
After a refactoring, stopping the bridge triggers disconnect callbacks
synchronously.

Issue: #326
mlopatkin added a commit that referenced this issue Jan 2, 2024
This is to ensure maximum flexibility of the view implementation.
Swing's modal dialogs are blocking, but run an inner event loop, so the
future callback has to be set up before actually showing the view.

Issue: #326
mlopatkin added a commit that referenced this issue Jan 2, 2024
The dialog can cancel the action, but not the initialization of the ADB
itself.

Issue: #326
mlopatkin added a commit that referenced this issue Jan 2, 2024
After a refactoring, stopping the bridge triggers disconnect callbacks
synchronously.

Issue: #326
mlopatkin added a commit that referenced this issue Jan 2, 2024
From the user perspective, after committing the new ADB location, there
is no way back. Therefore, the dialog cannot be cancelled, only hidden.

This differs from other actions, like "Connect to device", where the
action itself can be aborted.

Issue: #326
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:enhancement New feature or request in:adb interaction with ADB
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant