OSDN Git Service
Support multiple sessions per terminal activity.
This patch does the following:
* Replace the EmulatorView widget in the activity layout with a
TermViewFlipper, which is a ViewFlipper with a couple of added
conveniences for dealing with EmulatorViews (e.g. pausing/resuming
them when changing the view).
* Add an ArrayList in the service to hold TermSessions, and make the
activity bind to the service so that it can retrieve the list. This isn't
strictly necessary for multisession support, but allows us to decouple
the activity from the sessions, which will (in the future) allow us to
restart or even close the activity without losing running sessions.
* Now that EmulatorViews aren't being created automatically when the
layout is inflated, but are instead created by hand, move a bunch of
initialization stuff to the EmulatorView constructor.
* Make the input reader threads for each session exit on EOF. These
threads hold a reference to their TermSession objects, which would
leak otherwise.
For now, one EmulatorView and TermSession are created as soon as the
activity binds to the service, if none exist; no UI to create additional
sessions is included.