use of jackpal.androidterm.emulatorview.TermSession in project Android-Terminal-Emulator by jackpal.
the class Term method populateViewFlipper.
private void populateViewFlipper() {
if (mTermService != null) {
mTermSessions = mTermService.getSessions();
if (mTermSessions.size() == 0) {
try {
mTermSessions.add(createTermSession());
} catch (IOException e) {
Toast.makeText(this, "Failed to start terminal session", Toast.LENGTH_LONG).show();
finish();
return;
}
}
mTermSessions.addCallback(this);
for (TermSession session : mTermSessions) {
EmulatorView view = createEmulatorView(session);
mViewFlipper.addView(view);
}
updatePrefs();
if (onResumeSelectWindow >= 0) {
mViewFlipper.setDisplayedChild(onResumeSelectWindow);
onResumeSelectWindow = -1;
}
mViewFlipper.onResume();
}
}
use of jackpal.androidterm.emulatorview.TermSession in project Android-Terminal-Emulator by jackpal.
the class RemoteInterface method openNewWindow.
protected String openNewWindow(String iInitialCommand) {
TermService service = getTermService();
String initialCommand = mSettings.getInitialCommand();
if (iInitialCommand != null) {
if (initialCommand != null) {
initialCommand += "\r" + iInitialCommand;
} else {
initialCommand = iInitialCommand;
}
}
try {
TermSession session = Term.createTermSession(this, mSettings, initialCommand);
session.setFinishCallback(service);
service.getSessions().add(session);
String handle = UUID.randomUUID().toString();
((GenericTermSession) session).setHandle(handle);
Intent intent = new Intent(PRIVACT_OPEN_NEW_WINDOW);
intent.addCategory(Intent.CATEGORY_DEFAULT);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
return handle;
} catch (IOException e) {
return null;
}
}
use of jackpal.androidterm.emulatorview.TermSession in project Android-Terminal-Emulator by jackpal.
the class SessionList method clear.
@Override
public void clear() {
for (TermSession session : this) {
session.setTitleChangedListener(null);
}
super.clear();
notifyChange();
}
Aggregations