mirror of
https://github.com/revanced/jadb.git
synced 2024-11-19 02:29:24 +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) {
|
||||
int lastColon = response.lastIndexOf(':');
|
||||
if (lastColon != -1) {
|
||||
return response.substring(lastColon, response.length());
|
||||
return response.substring(lastColon);
|
||||
} else {
|
||||
return response;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ public class PackageManager {
|
||||
arguments.add("install");
|
||||
arguments.addAll(extraArguments);
|
||||
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);
|
||||
remove(remote);
|
||||
verifyOperation("install", apkFile.getName(), result);
|
||||
|
@ -41,6 +41,7 @@ class AdbProtocolHandler implements Runnable {
|
||||
DataInputStream input = new DataInputStream(socket.getInputStream());
|
||||
DataOutputStream output = new DataOutputStream(socket.getOutputStream())
|
||||
) {
|
||||
//noinspection StatementWithEmptyBody
|
||||
while (processCommand(input, output)) {
|
||||
// nothing to do here
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user