OSDN Git Service

CleanUp
authorjruesga <jorge@ruesga.com>
Fri, 12 Oct 2012 00:23:35 +0000 (02:23 +0200)
committerjruesga <jorge@ruesga.com>
Fri, 12 Oct 2012 00:23:35 +0000 (02:23 +0200)
src/com/cyanogenmod/explorer/commands/ExecExecutable.java
src/com/cyanogenmod/explorer/commands/shell/AsyncResultProgram.java
src/com/cyanogenmod/explorer/commands/shell/AsyncResultProgramListener.java
src/com/cyanogenmod/explorer/commands/shell/LinkCommand.java
src/com/cyanogenmod/explorer/console/shell/ShellConsole.java
src/com/cyanogenmod/explorer/ui/dialogs/ActionsDialog.java
src/com/cyanogenmod/explorer/ui/dialogs/FsoPropertiesDialog.java
src/com/cyanogenmod/explorer/util/StorageHelper.java
tests/src/com/cyanogenmod/explorer/commands/shell/ExecCommandTest.java

index d743ace..17450ba 100644 (file)
@@ -23,7 +23,7 @@ public interface ExecExecutable extends AsyncResultExecutable {
 
     /**
      * Method that returns the exit code of the executed program
-     * 
+     *
      * @return int The exit code
      */
     public int getExitCode();
index 480f7f1..0e49614 100644 (file)
@@ -38,7 +38,7 @@ public abstract class AsyncResultProgram
     /**
      * @hide
      */
-    static final Byte STDERR = new Byte((byte)1); 
+    static final Byte STDERR = new Byte((byte)1);
 
     private final AsyncResultListener mAsyncResultListener;
     private AsyncResultProgramThread mWorkerThread;
@@ -178,7 +178,7 @@ public abstract class AsyncResultProgram
             this.mSync.notify();
         }
     }
-    
+
     /**
      * Method that parse the error result of a program invocation.
      *
index dc57cfc..2e0d365 100644 (file)
@@ -40,7 +40,7 @@ public interface AsyncResultProgramListener {
      * @param partialIn A partial standard input buffer (incremental buffer)
      */
     void onParsePartialResult(String partialIn);
-    
+
     /**
      * Method invoked when a parse of new error results are needed.
      *
index 09b29a0..cfd1742 100644 (file)
@@ -72,7 +72,7 @@ public class LinkCommand extends SyncResultProgram implements LinkExecutable {
     @Override
     public void checkExitCode(int exitCode)
             throws InsufficientPermissionsException, CommandNotFoundException, ExecutionException {
-        // Not raise insufficient permissions if the link is in  
+        // Not raise insufficient permissions if the link is in
         if (exitCode != 0) {
             throw new ExecutionException("exitcode != 0"); //$NON-NLS-1$
         }
index 8e4b7e2..37faeb7 100644 (file)
@@ -724,7 +724,7 @@ public abstract class ShellConsole extends Console {
                         if (!ShellConsole.this.mCancelled) {
                             ShellConsole.this.mSbErr.append((char)r);
                             sb.append((char)r);
-                            
+
                             //Notify asynchronous partial data
                             if (ShellConsole.this.mStarted &&
                                 ShellConsole.this.mActiveCommand != null &&
index c370b15..058a3f6 100644 (file)
@@ -229,7 +229,7 @@ public class ActionsDialog implements OnItemClickListener, OnItemLongClickListen
             case R.id.mnu_actions_send:
                 ActionsPolicy.sendFileSystemObject(this.mContext, this.mFso);
                 break;
-                
+
 
             // Paste selection
             case R.id.mnu_actions_paste_selection:
@@ -485,7 +485,7 @@ public class ActionsDialog implements OnItemClickListener, OnItemLongClickListen
     /**
      * Method that creates a {@link LinkedResource} for the list of object to the
      * destination directory
-     * 
+     *
      * @param items The list of the source items
      * @param directory The destination directory
      */
index 0d72df6..9f4752f 100644 (file)
@@ -365,7 +365,7 @@ public class FsoPropertiesDialog
             if (this.mFso instanceof Symlink && ((Symlink) this.mFso).getLinkRef() != null) {
                 this.mFolderUsageExecutable =
                         CommandHelper.getFolderUsage(
-                                this.mContext, 
+                                this.mContext,
                                 ((Symlink) this.mFso).getLinkRef().getFullPath(), this, null);
             } else {
                 this.mFolderUsageExecutable =
index b15203e..5c3aa75 100644 (file)
@@ -36,7 +36,7 @@ public final class StorageHelper {
      * Method that returns the storage volumes defined in the system.  This method uses
      * reflection to retrieve the method because CM10 has a {@link Context}
      * as first parameter, that AOSP hasn't.
-     * 
+     *
      * @param ctx The current context
      * @return StorageVolume[] The storage volumes defined in the system
      */
@@ -99,7 +99,7 @@ public final class StorageHelper {
 
     /**
      * Method that returns if the path is in a volume storage
-     * 
+     *
      * @param path The path
      * @return boolean If the path is in a volume storage
      */
index 518630a..5a9d629 100644 (file)
@@ -51,11 +51,11 @@ public class ExecCommandTest extends AbstractConsoleTest {
     }
 
     /**
-     * Method that performs a test over known search results.
+     * Method that performs a test over known executable program.
      *
      * @throws Exception If test failed
      */
-    public void testFindWithPartialResult() throws Exception {
+    public void testExecWithPartialResult() throws Exception {
         try {
             // Create the test program
             FileWriter fw = new FileWriter(new File(EXEC_CMD));
@@ -84,7 +84,7 @@ public class ExecCommandTest extends AbstractConsoleTest {
                 ExecCommandTest.this.mSync.wait(15000L);
             }
             assertTrue("no new partial data", this.mNewPartialData); //$NON-NLS-1$
-            
+
         } finally {
             try {
                 CommandHelper.deleteFile(getContext(), EXEC_CMD, getConsole());