-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[androiddebugbridge] Retry a command once when standby rejects the shell stream #21247
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
Merged
lsiepel
merged 7 commits into
openhab:main
from
stamateviorel:androiddebugbridge-standby-command-retry
Aug 14, 2026
Merged
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6ada2bd
[androiddebugbridge] Retry a command once when standby rejects the sh…
stamateviorel d44fd62
[androiddebugbridge] Only repeat a rejected command when that is safe
stamateviorel 25be027
[androiddebugbridge] Narrow retryable refreshes and serialize the rec…
stamateviorel f2432a9
[androiddebugbridge] Read the connection under the command lock
stamateviorel c2b16c0
[androiddebugbridge] Serialize normal connects with the retry reconnect
stamateviorel 3652ee4
[androiddebugbridge] Wait for the command lock interruptibly
stamateviorel aa1f0fc
[androiddebugbridge] Trim the added comments and Javadocs
stamateviorel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
36 changes: 36 additions & 0 deletions
36
.../binding/androiddebugbridge/internal/AndroidDebugBridgeDeviceStreamRejectedException.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| /* | ||
| * Copyright (c) 2010-2026 Contributors to the openHAB project | ||
| * | ||
| * See the NOTICE file(s) distributed with this work for additional | ||
| * information. | ||
| * | ||
| * This program and the accompanying materials are made available under the | ||
| * terms of the Eclipse Public License 2.0 which is available at | ||
| * http://www.eclipse.org/legal/epl-2.0 | ||
| * | ||
| * SPDX-License-Identifier: EPL-2.0 | ||
| */ | ||
| package org.openhab.binding.androiddebugbridge.internal; | ||
|
|
||
| import org.eclipse.jdt.annotation.NonNullByDefault; | ||
|
|
||
| /** | ||
| * Thrown when opening the adb shell stream fails, which a device in standby commonly causes. | ||
| * | ||
| * It is a distinct type so the caller can tell this apart from a failure that happened while | ||
| * reading an already-open stream, where the command certainly reached the device. It is however | ||
| * <em>not</em> proof that the command never ran: adblib writes the OPEN packet inside | ||
| * {@code AdbConnection.open()}, so an {@link java.io.IOException} raised while sending that packet | ||
| * leaves delivery ambiguous. Callers must therefore only repeat commands that stay correct when | ||
| * executed twice. | ||
| * | ||
| * @author Stamate Viorel - Initial contribution | ||
| */ | ||
| @NonNullByDefault | ||
| public class AndroidDebugBridgeDeviceStreamRejectedException extends AndroidDebugBridgeDeviceException { | ||
| private static final long serialVersionUID = 5471982041566281957L; | ||
|
|
||
| public AndroidDebugBridgeDeviceStreamRejectedException(String message) { | ||
| super(message); | ||
| } | ||
| } |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.