本文整理汇总了Java中com.stericson.RootTools.execution.Command.isFinished方法的典型用法代码示例。如果您正苦于以下问题:Java Command.isFinished方法的具体用法?Java Command.isFinished怎么用?Java Command.isFinished使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.stericson.RootTools.execution.Command
的用法示例。
在下文中一共展示了Command.isFinished方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: commandWait
import com.stericson.RootTools.execution.Command; //导入方法依赖的package包/类
private void commandWait(Command cmd) {
int waitTill = 50;
int waitTillMultiplier = 2;
int waitTillLimit = 3200; //7 tries, 6350 msec
while (!cmd.isFinished() && waitTill<=waitTillLimit) {
synchronized (cmd) {
try {
if (!cmd.isFinished()) {
cmd.wait(waitTill);
waitTill *= waitTillMultiplier;
}
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
if (!cmd.isFinished()){
LogUtils.e("Could not finish root command in " + (waitTill/waitTillMultiplier));
}
}
示例2: waitForCommand
import com.stericson.RootTools.execution.Command; //导入方法依赖的package包/类
private static boolean waitForCommand(Command cmd)
{
while (!cmd.isFinished())
{
synchronized (cmd)
{
try
{
if (!cmd.isFinished())
{
cmd.wait(2000);
}
}
catch (InterruptedException e)
{
e.printStackTrace();
}
}
if (!cmd.isExecuting() && !cmd.isFinished())
{
// Logger.errorST("Error: Command is not executing and is not finished!");
return false;
}
}
//Logger.debug("Command Finished!");
return true;
}
示例3: commandWait
import com.stericson.RootTools.execution.Command; //导入方法依赖的package包/类
private void commandWait(Command cmd) {
synchronized (cmd) {
try {
if (!cmd.isFinished()) {
cmd.wait(2000);
}
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
示例4: commandWait
import com.stericson.RootTools.execution.Command; //导入方法依赖的package包/类
private void commandWait(Command cmd) {
synchronized (cmd) {
try {
if (!cmd.isFinished()) {
cmd.wait(2000);
}
} catch (InterruptedException ex) {
Log.e(LOG_TAG, ex.toString());
}
}
}
示例5: commandWait
import com.stericson.RootTools.execution.Command; //导入方法依赖的package包/类
protected void commandWait(Command cmd) throws Exception {
while (!cmd.isFinished()) {
synchronized (cmd) {
try {
if (!cmd.isFinished()) {
cmd.wait(10);
}
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}