screenRecorderTool.parameters("--size", options.width + "x" + options.height); screenRecorderTool.parameters("--bit-rate", Long.toString(options.bitrate)); screenRecorderTool.parameters("--time-limit", "180"); // maximum value of screenrecord command
public List<Target> parse() { List<String> output = Spacelift.task(CommandTool.class) .addEnvironment(platformConfiguration.getAndroidSystemEnvironmentProperties()) .programName(androidSdk.getAndroidPath()) .parameters("list", "target") .execute().await() .output(); return parseAndroidListTargetOutput(new LinkedList<String>(output)); }
@Override protected ProcessResult process(Integer pid) throws Exception { Validate.notNull(pid, "PID for process to kill is a null object!"); Validate.notNull(androidSdk, "Android SDK is a null object!"); if (pid <= 0) { throw new IllegalStateException("PID to kill is lower then 0."); } ProcessResult processResult = Spacelift.task(CommandTool.class) .programName(androidSdk.getAdbPath()) .addEnvironment(androidSdk.getPlatformConfiguration().getAndroidSystemEnvironmentProperties()) .parameters("shell", "kill", "-" + signum, pid.toString()) .execute().await(); return processResult; } }