Skip to content

Commit 98f04c1

Browse files
authored
Delete unused code in DevToolsService (flutter#8530)
This contains some leftover code after changes flutter@7036e1c and flutter@7037972
1 parent d784c25 commit 98f04c1

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

src/io/flutter/run/daemon/DevToolsService.java

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@
2121
import java.util.concurrent.atomic.AtomicReference;
2222

2323
public class DevToolsService {
24-
private static final @NotNull Logger LOG = Logger.getInstance(DevToolsService.class);
25-
26-
protected static class DevToolsServiceListener implements DaemonEvent.Listener {
27-
}
28-
2924
@NotNull private final Project project;
3025

3126
@Nullable private DevToolsServerTask devToolsServerTask;
@@ -123,43 +118,4 @@ private boolean devToolsInstanceExists() {
123118
final CompletableFuture<DevToolsInstance> devToolsFuture = devToolsFutureRef.get();
124119
return devToolsFuture != null && devToolsFuture.isDone() && !devToolsFuture.isCompletedExceptionally();
125120
}
126-
127-
private CompletableFuture<Boolean> pubActivateDevTools(FlutterSdk sdk) {
128-
final FlutterCommand command = sdk.flutterPub(null, "global", "activate", "devtools");
129-
130-
final CompletableFuture<Boolean> result = new CompletableFuture<>();
131-
132-
final Process process = command.start((ProcessOutput output) -> {
133-
if (output.getExitCode() != 0) {
134-
final String message = (output.getStdout() + "\n" + output.getStderr()).trim();
135-
FlutterConsoles.displayMessage(project, null, message, true);
136-
}
137-
}, null);
138-
139-
try {
140-
final int resultCode = process.waitFor();
141-
result.complete(resultCode == 0);
142-
}
143-
catch (RuntimeException | InterruptedException re) {
144-
if (!result.isDone()) {
145-
result.complete(false);
146-
}
147-
}
148-
149-
return result;
150-
}
151-
152-
private void logExceptionAndComplete(String message) {
153-
logExceptionAndComplete(new Exception(message));
154-
}
155-
156-
private void logExceptionAndComplete(Exception exception) {
157-
LOG.info(exception);
158-
final CompletableFuture<DevToolsInstance> future = devToolsFutureRef.get();
159-
if (future != null) {
160-
future.completeExceptionally(exception);
161-
}
162-
}
163121
}
164-
165-

0 commit comments

Comments
 (0)