mirror of
https://github.com/revanced/jadb.git
synced 2025-02-06 07:26:48 +01:00
Various small fixes found by IDEA inspection
This commit is contained in:
parent
adb0cca09a
commit
3fd68d337f
@ -61,7 +61,7 @@ public class HostConnectionCommand {
|
|||||||
private String extractError(String response) {
|
private String extractError(String response) {
|
||||||
int lastColon = response.lastIndexOf(':');
|
int lastColon = response.lastIndexOf(':');
|
||||||
if (lastColon != -1) {
|
if (lastColon != -1) {
|
||||||
return response.substring(lastColon, response.length());
|
return response.substring(lastColon);
|
||||||
} else {
|
} else {
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ public class PackageManager {
|
|||||||
arguments.add("install");
|
arguments.add("install");
|
||||||
arguments.addAll(extraArguments);
|
arguments.addAll(extraArguments);
|
||||||
arguments.add(remote.getPath());
|
arguments.add(remote.getPath());
|
||||||
InputStream s = device.executeShell("pm", arguments.toArray(new String[arguments.size()]));
|
InputStream s = device.executeShell("pm", arguments.toArray(new String[0]));
|
||||||
String result = Stream.readAll(s, StandardCharsets.UTF_8);
|
String result = Stream.readAll(s, StandardCharsets.UTF_8);
|
||||||
remove(remote);
|
remove(remote);
|
||||||
verifyOperation("install", apkFile.getName(), result);
|
verifyOperation("install", apkFile.getName(), result);
|
||||||
|
@ -41,6 +41,7 @@ class AdbProtocolHandler implements Runnable {
|
|||||||
DataInputStream input = new DataInputStream(socket.getInputStream());
|
DataInputStream input = new DataInputStream(socket.getInputStream());
|
||||||
DataOutputStream output = new DataOutputStream(socket.getOutputStream())
|
DataOutputStream output = new DataOutputStream(socket.getOutputStream())
|
||||||
) {
|
) {
|
||||||
|
//noinspection StatementWithEmptyBody
|
||||||
while (processCommand(input, output)) {
|
while (processCommand(input, output)) {
|
||||||
// nothing to do here
|
// nothing to do here
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user