APISonar


com.nearucenterplaza.redenvelopeassistant.utils.rootbox.RootTools.log

> com > nearucenterplaza > redenvelopeassistant > utils > rootbox > RootTools > log
com APIs nearucenterplaza APIs redenvelopeassistant APIs utils APIs rootbox APIs RootTools APIs log APIs

Example 1
public void terminate(String reason)
    {
        try
        {
            Shell.closeAll();
            RootTools.log("Terminating all shells.");
            terminated(reason);
        }
        catch (IOException e)
        {
        }
    }
Example 2
public void commandOutput(int id, String line)
    {
        sb.append(line).append('\n');
        RootTools.log("Command", "ID: " + id + ", " + line);
    }
Example 3
public boolean hasEnoughSpaceOnSdCard(long updateSize)
    {
        RootTools.log("Checking SDcard size and that it is mounted as RW");
        String status = Environment.getExternalStorageState();
        if (!status.equals(Environment.MEDIA_MOUNTED))
        {
            return false;
        }
        File path = Environment.getExternalStorageDirectory();
        StatFs stat = new StatFs(path.getPath());
        long blockSize = stat.getBlockSize();
        long availableBlocks = stat.getAvailableBlocks();
        return (updateSize < availableBlocks * blockSize);
    }
Example 4
public static Shell startCustomShell(String shellPath, int timeout) throws IOException, TimeoutException, RootDeniedException
    {

        if (Shell.customShell == null)
        {
            RootTools.log("Starting Custom Shell!");
            Shell.customShell = new Shell(shellPath, ShellType.CUSTOM, ShellContext.NORMAL, timeout);
        }
        else
        {
            RootTools.log("Using Existing Custom Shell!");
        }

        return Shell.customShell;
    }
Example 5
public void offerSuperUser(Activity activity)
    {
        RootTools.log("Launching Market for SuperUser");
        Intent i = new Intent(Intent.ACTION_VIEW,
                Uri.parse("market://details?id=com.noshufou.android.su"));
        activity.startActivity(i);
    }