use of com.android.tools.idea.monitor.ui.network.view.NetworkRadioSegment in project android by JetBrains.
the class NetworkProfilerVisualTest method createComponentsList.
@Override
protected List<Animatable> createComponentsList() {
long startTimeUs = myDataStore.getLatestTimeUs();
Range timeCurrentRangeUs = new Range(startTimeUs - RangeScrollbar.DEFAULT_VIEW_LENGTH_US, startTimeUs);
AnimatedTimeRange animatedTimeRange = new AnimatedTimeRange(timeCurrentRangeUs, 0);
EventDispatcher<ProfilerEventListener> dummyDispatcher = EventDispatcher.create(ProfilerEventListener.class);
mySegment = new NetworkSegment(timeCurrentRangeUs, myDataStore, dummyDispatcher);
myDetailedView = new NetworkDetailedView();
myDetailedView.setVisible(false);
generateNetworkCaptureData(startTimeUs);
myCaptureSegment = new NetworkCaptureSegment(timeCurrentRangeUs, new TestNetworkCaptureModel(), httpData -> myDetailedView.setVisible(true), dummyDispatcher);
myRadioSegment = new NetworkRadioSegment(timeCurrentRangeUs, myDataStore, dummyDispatcher);
List<Animatable> animatables = new ArrayList<>();
animatables.add(animatedTimeRange);
mySegment.createComponentsList(animatables);
myCaptureSegment.createComponentsList(animatables);
myRadioSegment.createComponentsList(animatables);
animatables.add(myCaptureSegment);
return animatables;
}
Aggregations