MCPcopy Index your code
hub / github.com/Stericson/RootShell / add

Method add

src/main/java/com/stericson/RootShell/execution/Shell.java:248–270  ·  view source on GitHub ↗
(Command command)

Source from the content-addressed store, hash-verified

246
247
248 public Command add(Command command) throws IOException {
249 if (this.close) {
250 throw new IllegalStateException(
251 "Unable to add commands to a closed shell");
252 }
253
254 if(command.used) {
255 //The command has been used, don't re-use...
256 throw new IllegalStateException(
257 "This command has already been executed. (Don't re-use command instances.)");
258 }
259
260 while (this.isCleaning) {
261 //Don't add commands while cleaning
262 ;
263 }
264
265 this.commands.add(command);
266
267 this.notifyThreads();
268
269 return command;
270 }
271
272 public final void useCWD(Context context) throws IOException, TimeoutException, RootDeniedException {
273 add(

Callers 11

isAccessGivenMethod · 0.95
useCWDMethod · 0.95
runMethod · 0.95
commandOutputMethod · 0.80
existsMethod · 0.80
findBinaryMethod · 0.80
AnnotationsFinderMethod · 0.80
lookupMethod · 0.80
getSuVersionMethod · 0.80
runRootCommandMethod · 0.80
runCommandMethod · 0.80

Calls 1

notifyThreadsMethod · 0.95

Tested by 1

runMethod · 0.76