jackpal/Android-Terminal-Emulator — pull request #112 by steven676 (2012-05-06 22:58:47+00:00)
Title: Widget library and path broadcasts

This series includes the EmulatorView library refactor discussed in #40 and the path broadcast mechanism discussed in #45. It also includes one additional feature (patch 9), setting/clearing the IUTF8 flag on the tty when changing into or out of UTF-8 mode.

Patch 1 is a minimal refactor of the existing code to move EmulatorView, TermSession, TerminalEmulator and friends into the new library project. Patches 2, 3, and 4 represent cleanups to the exposed API. Patch 5 is a trivial style fix.

Patches 6-8 introduce JavaDoc documentation for the library. The docs are probably a bit terse and could use some expansion. Also, it's unclear whether shipping the generated HTML copy in docs/ is the best thing to do (if we do, we'll have to regenerate the documents regularly, as in patch 13, and there doesn't seem to be a good way to view the current docs in the GitHub repository on the web).

Patches 10-12 add the broadcasts for outside additions to PATH. Separate permissions are now required to append and to prepend to the PATH, as you requested. I think the preferences and the descriptive strings (for both the permissions and the preferences) could stand to use some improvement; also, it might be worth reorganizing the bottom of the Preferences activity to give these prefs (or all the PATH-related stuff, perhaps) their own category.

Tested on Android 1.5/arm, 2.2/arm, 2.3.7/x86, 4.0.1/arm, and 4.0.4/arm phone emulators, 3.0/arm, 3.2/arm, and 4.0.4/arm tablet emulators, and a Nexus S running 4.0.4 (IMM76D).