Merge pull request #161 from steven676/for-upstream

Miscellaneous bug fixes
Add a default LD_LIBRARY_PATH to the initial command string.
Remove initial default command.

I think for most users of Android Terminal emulator the default initial
command (which adds /data/local/bin to the path) was not useful,
because the directory /data/local/bin does not exist by default.

The /data/local directory is special because its permissions are set
so that it can be written to by the Android shell even on non-rooted
phones.

Therefore, it is possible for users of non-rooted phones to create the
/data/local/bin directory, and then put executables into that dir,
and then add it to their path, and then execute them as shell commands.

But, in reality, most people who would go to the trouble of installing
command-line applications tend to root their phone and set their
phone up more like a normal Linux system.

So there were very few people (possibly none) for which the default
initial command string was useful.
Added new strings.
Add testcases for TermKeyListener.

This change attempts full code coverage. However the Fn key
functionality cannot be reached by my emulator version. All the tests
with Function key fail.
Add Alt key behavior option to the preferences screen.

This will allow the user to choose whether she wants to keep the old
behavior or send a esc character before the string.
Make it possible to test the allowToggle mode.
Honor the AltSendsEsc flag.
Tweaks to Alt-sends-esc

+ Move to the Keyboard section of preferences.
+ On by default. (and now we actually honor the default.)
+ Rework preference text to make it clearer.
+ Rename string resource id names to make their role clearer.

+ Add support for setting the high bit instead of sending ESC.
   - I think there are more people who want this than the
     original composing logic.

+ Treat the Meta key the same way as the Alt key.
  - I considered having this be a separate preference, but
    there's a flaw: Some keyboards such as the popular
    Hacker's keyboard have a key labeled "Alt" that actually
    reports as "Meta" in software.

    So let's treat both Alt and Meta the same for now.

+ Make this code work on Android SDK 11+ physical keyboards

Android SDK 11+ physical keyboards are "chording" as opposed to
"toggling". Therefore we have to handle the !allowToggle case.

Also, the Meta flags can come in as a combination of
3 bits, so to mask them off we need to mask with META_ALT_MASK
rather than just META_ALT_ON.
Merge pull request #163 from gLes/master

Added new strings.
Add another test case that causes ATE to crash.

(Found by running fuzzer.go and trimming down the repro case.)

adb push issue145repro-2.txt /data/local/a

Run Android terminal emulator.

$ cat /data/local/a
Merge branch 'master' of github.com:jackpal/Android-Terminal-Emulator
Added new Alt sends strings
Merge pull request #164 from gLes/master

Added new Alt sends strings to 'hu' localization.
Handle alt-sends-ESC in IME too.

This patch handles the alt sends ESC in IME mode by routing the key event
through the onKeyDown() and onKeyUp() methods if Alt pressed and
the alt-sends-ESC mode is enabled.
Put in Transformer TF101 handling for Alt and Meta.

Re-routing Alt and Meta seems to be required on this device, but not
on other devices (such as Nexus 7 using USB OTG.)

We should refine this test as we find out which devices need this
special handling.
Put in Transformer TF101 handling for Alt and Meta.

Re-routing Alt and Meta seems to be required on this device, but not
on other devices (such as Nexus 7 using USB OTG.)

We should refine this test as we find out which devices need this
special handling.
Merge branch 'master' of github.com:jackpal/Android-Terminal-Emulator

Conflicts:
	libraries/emulatorview/src/jackpal/androidterm/emulatorview/EmulatorView.java
Version 1.0.45
Change Alt-sends-esc behavior to allow phones to use Alt.

Alt-sends-esc is no longer the default.

The opposite of alt-sends-esc is to pass through Alt un-altered, which
allows phone keyboards to use alt to provide extra characters.

There's no longer any way to have Alt set the high bit.