當前位置: 首頁>>代碼示例>>Java>>正文


Java TermSettings類代碼示例

本文整理匯總了Java中jackpal.androidterm.util.TermSettings的典型用法代碼示例。如果您正苦於以下問題:Java TermSettings類的具體用法?Java TermSettings怎麽用?Java TermSettings使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TermSettings類屬於jackpal.androidterm.util包,在下文中一共展示了TermSettings類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: init

import jackpal.androidterm.util.TermSettings; //導入依賴的package包/類
@Override
protected void init(final String initialCommand) {
    Handler uiHandler = new Handler(mContext.getMainLooper());
    uiHandler.post(new Runnable() {
        @Override
        public void run() {
            TermSettings settings = new TermSettings(mContext.getResources(), PreferenceManager.getDefaultSharedPreferences(mContext));
            try {
                mTermSession = new MyShellTermSession(settings, initialCommand);
                mTermSession.initializeEmulator(1024, 40);
            } catch (IOException e) {
                mInitException = new UncheckedIOException(e);
            }
        }
    });
}
 
開發者ID:feifadaima,項目名稱:https-github.com-hyb1996-NoRootScriptDroid,代碼行數:17,代碼來源:Shell.java

示例2: ShellTermSession

import jackpal.androidterm.util.TermSettings; //導入依賴的package包/類
public ShellTermSession(TermSettings settings, String initialCommand) {
    super();

    updatePrefs(settings);

    initializeSession();
    mInitialCommand = initialCommand;

    mWatcherThread = new Thread() {
         @Override
         public void run() {
            Log.i(TermDebug.LOG_TAG, "waiting for: " + mProcId);
            int result = Exec.waitFor(mProcId);
            Log.i(TermDebug.LOG_TAG, "Subprocess exited: " + result);
            mMsgHandler.sendMessage(mMsgHandler.obtainMessage(PROCESS_EXITED, result));
         }
    };
    mWatcherThread.setName("Process watcher");
}
 
開發者ID:MG-MaGeek,項目名稱:AndLinux,代碼行數:20,代碼來源:ShellTermSession.java

示例3: MyShellTermSession

import jackpal.androidterm.util.TermSettings; //導入依賴的package包/類
public MyShellTermSession(TermSettings settings, String initialCommand) throws IOException {
    super(settings, initialCommand);
    PipedInputStream pipedInputStream = new PipedInputStream(8192);
    mBufferedReader = new BufferedReader(new InputStreamReader(pipedInputStream));
    mOutputStream = new PipedOutputStream(pipedInputStream);
    if (mShouldReadOutput) {
        startReadingThread();
    }
}
 
開發者ID:feifadaima,項目名稱:https-github.com-hyb1996-NoRootScriptDroid,代碼行數:10,代碼來源:Shell.java

示例4: initializeSession

import jackpal.androidterm.util.TermSettings; //導入依賴的package包/類
private void initializeSession() {
    TermSettings settings = mSettings;

    int[] processId = new int[1];

    String path = System.getenv("PATH");
    if (settings.doPathExtensions()) {
        String appendPath = settings.getAppendPath();
        if (appendPath != null && appendPath.length() > 0) {
            path = path + ":" + appendPath;
        }

        if (settings.allowPathPrepend()) {
            String prependPath = settings.getPrependPath();
            if (prependPath != null && prependPath.length() > 0) {
                path = prependPath + ":" + path;
            }
        }
    }
    if (settings.verifyPath()) {
        path = checkPath(path);
    }
    String[] env = new String[3];
    env[0] = "TERM=" + settings.getTermType();
    env[1] = "PATH=" + path;
    env[2] = "HOME=" + settings.getHomePath();

    createSubprocess(processId, settings.getShell(), env);
    mProcId = processId[0];

    setTermOut(new FileOutputStream(mTermFd));
    setTermIn(new FileInputStream(mTermFd));
}
 
開發者ID:MG-MaGeek,項目名稱:AndLinux,代碼行數:34,代碼來源:ShellTermSession.java

示例5: updatePrefs

import jackpal.androidterm.util.TermSettings; //導入依賴的package包/類
public void updatePrefs(TermSettings settings, ColorScheme scheme) {
    if (scheme == null) {
        scheme = new ColorScheme(settings.getColorScheme());
    }

    setTextSize(settings.getFontSize());
    setUseCookedIME(settings.useCookedIME());
    setColorScheme(scheme);
    setBackKeyCharacter(settings.getBackKeyCharacter());
    setAltSendsEsc(settings.getAltSendsEscFlag());
    setControlKeyCode(settings.getControlKeyCode());
    setFnKeyCode(settings.getFnKeyCode());
    setTermType(settings.getTermType());
    setMouseTracking(settings.getMouseTrackingFlag());
}
 
開發者ID:MG-MaGeek,項目名稱:AndLinux,代碼行數:16,代碼來源:TermView.java

示例6: updatePrefs

import jackpal.androidterm.util.TermSettings; //導入依賴的package包/類
public void updatePrefs(TermSettings settings) {
    mSettings = settings;
    setColorScheme(new ColorScheme(settings.getColorScheme()));
    setDefaultUTF8Mode(settings.defaultToUTF8Mode());
}
 
開發者ID:MG-MaGeek,項目名稱:AndLinux,代碼行數:6,代碼來源:ShellTermSession.java


注:本文中的jackpal.androidterm.util.TermSettings類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。