use of com.android.tools.idea.monitor.ui.network.model.RpcNetworkCaptureModel in project android by JetBrains.
the class NetworkProfilerUiManager method setupExtendedOverviewUi.
// TODO: Revisit for L3 design, this was intended for L2.
@Override
public void setupExtendedOverviewUi(@NotNull JPanel toolbar, @NotNull JPanel overviewPanel) {
super.setupExtendedOverviewUi(toolbar, overviewPanel);
myRadioSegment = new NetworkRadioSegment(myTimeCurrentRangeUs, myDataStore, myEventDispatcher);
setupAndRegisterSegment(myRadioSegment, NETWORK_CONNECTIVITY_HEIGHT, NETWORK_CONNECTIVITY_HEIGHT, NETWORK_CONNECTIVITY_HEIGHT);
overviewPanel.add(myRadioSegment);
NetworkCaptureModel captureModel = new RpcNetworkCaptureModel(myDataStore.getDeviceProfilerService(), myDataCache);
myCaptureSegment = new NetworkCaptureSegment(myTimeCurrentRangeUs, captureModel, httpData -> {
String responseFilePath = httpData.getHttpResponsePayloadId();
File file = !StringUtil.isEmptyOrSpaces(responseFilePath) ? myDataCache.getFile(responseFilePath) : null;
VirtualFile virtualFile = file != null ? LocalFileSystem.getInstance().refreshAndFindFileByIoFile(file) : null;
if (virtualFile != null) {
myDetailedView.showConnectionDetails(virtualFile);
myEventDispatcher.getMulticaster().profilerExpanded(ProfilerType.NETWORK);
}
}, myEventDispatcher);
setupAndRegisterSegment(myCaptureSegment, DEFAULT_MONITOR_MIN_HEIGHT, DEFAULT_MONITOR_PREFERRED_HEIGHT, DEFAULT_MONITOR_MAX_HEIGHT);
overviewPanel.add(myCaptureSegment);
myChoreographer.register(myCaptureSegment);
setSegmentState(overviewPanel, myCaptureSegment, AccordionLayout.AccordionState.MAXIMIZE);
}
Aggregations