Android Open Source - Mountie Java Command Capture From Project Back to project page Mountie .
License The source code is released under:
GNU General Public License
If you think the Android project Mountie listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code package com.stericson.RootTools.execution;
/ * f r o m w w w . j a v a 2 s . c o m * /
import android.content.Context;
import com.stericson.RootTools.RootTools;
public class JavaCommandCapture extends Command {
private StringBuilder sb = new StringBuilder();
public JavaCommandCapture(int id, Context context, String... command) {
super (id, true, context, command);
}
public JavaCommandCapture(int id, boolean handlerEnabled, Context context, String... command) {
super (id, handlerEnabled, true, context, command);
}
public JavaCommandCapture(int id, int timeout, Context context, String... command) {
super (id, timeout, true, context, command);
}
@Override
public void commandOutput(int id, String line) {
sb.append(line).append('\n' );
RootTools.log("Command" , "ID: " + id + ", " + line);
}
@Override
public void commandTerminated(int id, String reason) {
// pass
}
@Override
public void commandCompleted(int id, int exitCode) {
// pass
}
@Override
public String toString() {
return sb.toString();
}
}
Java Source Code List com.morlunk.mountie.ApplicationTest.java com.morlunk.mountie.Automounter.java com.morlunk.mountie.Constants.java com.morlunk.mountie.MountieActivity.java com.morlunk.mountie.MountieBootReceiver.java com.morlunk.mountie.MountieNotification.java com.morlunk.mountie.MountieService.java com.morlunk.mountie.UsbHotplugReceiver.java com.morlunk.mountie.command.BlkidCommand.java com.morlunk.mountie.fs.BlockDeviceObserver.java com.morlunk.mountie.fs.BlockDevice.java com.morlunk.mountie.fs.MountException.java com.morlunk.mountie.fs.MountListener.java com.morlunk.mountie.fs.Mount.java com.morlunk.mountie.fs.PartitionListener.java com.morlunk.mountie.fs.Partition.java com.morlunk.mountie.fs.UnmountListener.java com.morlunk.mountie.fs.Volume.java com.morlunk.mountie.jni.Native.java com.morlunk.mountie.util.Filesystems.java com.stericson.RootTools.Constants.java com.stericson.RootTools.RootTools.java com.stericson.RootTools.containers.Mount.java com.stericson.RootTools.containers.Permissions.java com.stericson.RootTools.containers.RootClass.java com.stericson.RootTools.containers.Symlink.java com.stericson.RootTools.exceptions.RootDeniedException.java com.stericson.RootTools.execution.CommandCapture.java com.stericson.RootTools.execution.Command.java com.stericson.RootTools.execution.JavaCommandCapture.java com.stericson.RootTools.execution.Shell.java com.stericson.RootTools.internal.Installer.java com.stericson.RootTools.internal.InternalVariables.java com.stericson.RootTools.internal.Remounter.java com.stericson.RootTools.internal.RootToolsInternalMethods.java com.stericson.RootTools.internal.Runner.java