Skip to content

Commit ab77710

Browse files
authored
[CQ][PE] remove stale DisplayRefreshManager; attach cleanup (#8238)
With the removal of the Swing Performance tool window, the `DisplayRefreshManager` was orphaned. Besides cleaning up unnecessary code, removing it also addresses occasional user-facing errors (#8148). Also removes `attach` flag from `addRegisteredExtensionRPCs`, introduced in #2920 but long unused. Fixes: #8148. --- - [x] I’ve reviewed the contributor guide and applied the relevant portions to this PR. <details> <summary>Contribution guidelines:</summary><br> - See our [contributor guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview) for general expectations for PRs. - Larger or significant changes should be discussed in an issue before creating a PR. - Dart contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use `dart format`. - Java and Kotlin contributions should strive to follow Java and Kotlin best practices ([discussion](#8098)). </details>
1 parent d8ccc38 commit ab77710

File tree

3 files changed

+3
-125
lines changed

3 files changed

+3
-125
lines changed

flutter-idea/src/io/flutter/vmService/DisplayRefreshRateManager.java

Lines changed: 0 additions & 116 deletions
This file was deleted.

flutter-idea/src/io/flutter/vmService/VMServiceManager.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,13 @@ public class VMServiceManager implements FlutterApp.FlutterAppListener, Disposab
5353

5454
private final Set<String> registeredServices = new HashSet<>();
5555

56-
@NotNull public final DisplayRefreshRateManager displayRefreshRateManager;
57-
5856
public VMServiceManager(@NotNull FlutterApp app, @NotNull VmService vmService) {
5957
this.app = app;
6058
this.vmService = vmService;
6159
app.addStateListener(this);
6260

6361
assert (app.getFlutterDebugProcess() != null);
6462

65-
this.displayRefreshRateManager = new DisplayRefreshRateManager(this, vmService);
6663
flutterIsolateRefStream = new EventStream<>();
6764

6865
// The VM Service depends on events from the Extension event stream to determine when Flutter.Frame
@@ -107,7 +104,7 @@ public void received(Isolate isolate) {
107104
}
108105
}
109106
}
110-
addRegisteredExtensionRPCs(isolate, false);
107+
addRegisteredExtensionRPCs(isolate);
111108
}
112109

113110
@Override
@@ -125,7 +122,7 @@ public void onError(RPCError error) {
125122
setServiceExtensionState(enableOnDeviceInspector.getExtension(), true, true);
126123
}
127124

128-
public void addRegisteredExtensionRPCs(Isolate isolate, boolean attach) {
125+
public void addRegisteredExtensionRPCs(Isolate isolate) {
129126
if (isolate.getExtensionRPCs() != null) {
130127
for (String extension : isolate.getExtensionRPCs()) {
131128
addServiceExtension(extension);
@@ -278,9 +275,6 @@ private void onFrameEventReceived() {
278275
addServiceExtension(extensionName);
279276
}
280277
pendingServiceExtensions.clear();
281-
282-
// Query for display refresh rate and add the value to the stream.
283-
displayRefreshRateManager.queryRefreshRate();
284278
}
285279
}
286280

flutter-idea/src/io/flutter/vmService/VmServiceWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ private void setInitialBreakpointsAndCheckExtensions(@NotNull IsolateRef isolate
338338
if (app != null) {
339339
VMServiceManager service = app.getVMServiceManager();
340340
if (service != null) {
341-
service.addRegisteredExtensionRPCs(isolate, true);
341+
service.addRegisteredExtensionRPCs(isolate);
342342
}
343343
}
344344
}

0 commit comments

Comments
 (0)