use of com.android.ddmlib.ScreenRecorderOptions in project android by JetBrains.
the class ScreenRecorderAction method performAction.
public void performAction() {
final ScreenRecorderOptionsDialog dialog = new ScreenRecorderOptionsDialog(myProject);
if (!dialog.showAndGet()) {
return;
}
final ScreenRecorderOptions options = dialog.getOptions();
final CountDownLatch latch = new CountDownLatch(1);
final CollectingOutputReceiver receiver = new CollectingOutputReceiver(latch);
ApplicationManager.getApplication().executeOnPooledThread(new Runnable() {
@Override
public void run() {
try {
myDevice.startScreenRecorder(REMOTE_PATH, options, receiver);
} catch (Exception e) {
showError(myProject, "Unexpected error while launching screen recorder", e);
latch.countDown();
}
}
});
Task.Modal screenRecorderShellTask = new ScreenRecorderTask(myProject, myDevice, latch, receiver);
screenRecorderShellTask.setCancelText("Stop Recording");
screenRecorderShellTask.queue();
}
Aggregations