Allow non-symmetric patterns
Added ascii ctrl chars
Better cross mapping format
Replace ad-hoc intent script execution with more formal interface

The current intent script execution mechanism has at least two
serious problems:

* If a Term activity is already running, it will just bring the activity
  to the top, without opening a new window or running the provided
  script.
* It allows any other application to use our permissions, even if they
  don't have those permissions themselves.

Replace the current ad-hoc mechanism with a more formally defined remote
intent interface, which provides two actions:

* jackpal.androidterm.OPEN_NEW_WINDOW opens a new terminal window.  No
  script execution is allowed, and no permissions are required to use
  this action.
* jackpal.androidterm.RUN_SCRIPT opens a new window and runs the script
  specified in the jackpal.androidterm.iInitialCommand extra.
  Applications using this intent must have the
  jackpal.androidterm.permission.RUN_SCRIPT permission, which must be
  approved by the user at install time.

Signed-off-by: Jack Palevich <jackpal@google.com>
Add a localization for CZ - Czech Republic

Thanks to Jozka.1@seznam.cz
Fix spelling mistake.
Add proguard-project.txt file

Doesn't do anything currently, we may start using proguard in the future
to save a few bytes in the apk.
Update build script for NDK version 7b
Deal with null row color when getting transcript with colors

Signed-off-by: Jack Palevich <jackpal@google.com>
Move some getChar() logic from UnicodeTranscript into FullUnicodeLine

Signed-off-by: Jack Palevich <jackpal@google.com>
Handle C1 control characters other than CSI

Each C1 control character (U+0080-U+009F) maps to a corresponding
seven-bit-clean escape sequence (ESC U+0040-U+005F).  We already handle
most of these escape sequences, so instead of just handling CSI (U+009B)
in an ad-hoc fashion, handle all the C1 controls systematically.

Signed-off-by: Jack Palevich <jackpal@google.com>
Properly handle UTF-8 sequences decoding to C1 control characters

Applications which emit UTF-8 sequences that decode to C1 control
characters expect these sequences to be interpreted as C1 control
characters, so send them back through process() instead of trying to
emit them.

Signed-off-by: Jack Palevich <jackpal@google.com>
Fix emission of combining characters following wide characters in transcript

At the moment, combining characters which follow an East Asian wide
character are not being stored in the same column as the characters they
modify.  Fix this by keeping track of the width of the last spacing mark
emitted and using this to place combining characters into the correct
column.

Signed-off-by: Jack Palevich <jackpal@google.com>
Revise screen resize check handling

Move the screen resize check code out of EmulatorView and into
TermViewFlipper, where it logically fits now that there are multiple
EmulatorViews per Term activity.  While we're at it, instead of making
the activity tell us how much of the window doesn't belong to us, use
getGlobalVisibleRect() to figure that out ourselves, eliminating the
need for a WindowSizeCallback.

Signed-off-by: Jack Palevich <jackpal@google.com>
Check to see whether selection start/end are in IME buffer bounds

Should fix a frequently-reported crash on Market:

java.lang.StringIndexOutOfBoundsException: length=0; regionStart=0; regionLength=1
at java.lang.String.startEndAndLength(String.java:593)
at java.lang.String.substring(String.java:1474)
at jackpal.androidterm.EmulatorView$4.getSelectedText(EmulatorView.java:594)
at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:234)
at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:77)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4507)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
at dalvik.system.NativeStart.main(Native Method)

Signed-off-by: Jack Palevich <jackpal@google.com>
Don't attempt fast resize on finished TranscriptScreen

Should fix a frequently-reported crash on Market:

java.lang.NullPointerException
at jackpal.androidterm.session.TranscriptScreen.fastResize(TranscriptScreen.java:395)
at jackpal.androidterm.session.TerminalEmulator.updateSize(TerminalEmulator.java:370)
at jackpal.androidterm.session.TermSession.updateSize(TermSession.java:287)
at jackpal.androidterm.EmulatorView.updateSize(EmulatorView.java:980)
at jackpal.androidterm.EmulatorView.updateSize(EmulatorView.java:1014)
at jackpal.androidterm.EmulatorView.onDraw(EmulatorView.java:1033)
at android.view.View.draw(View.java:6903)
at android.view.ViewGroup.drawChild(ViewGroup.java:1640)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367)
at android.view.View.draw(View.java:6906)
at android.widget.FrameLayout.draw(FrameLayout.java:352)
at android.view.ViewGroup.drawChild(ViewGroup.java:1640)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367)
at android.view.ViewGroup.drawChild(ViewGroup.java:1638)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367)
at android.view.View.draw(View.java:6906)
at android.widget.FrameLayout.draw(FrameLayout.java:352)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1868)
at android.view.ViewRoot.draw(ViewRoot.java:1407)
at android.view.ViewRoot.performTraversals(ViewRoot.java:1163)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:876)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
at dalvik.system.NativeStart.main(Native Method)

Signed-off-by: Jack Palevich <jackpal@google.com>
Basic support for multiple groups. Cleaner ESC seqs.
Show the status bar by default.

This helps on devices that place the menu key in the status bar. On those
devices the user is stuck because they can't get to the menu key without
showing the status bar, and they can't change the status bar preference
without using the menu key.

(Users on those devices can paint themselves into a corner by hiding the
status bar manually, but hopefully they'll figure out that uninstalling
and re-installing ATE will reset the preferences.)

We originally hid the status bar by default way back in Android 1.0, when
the standard screen size was 320 x 200. Screens are larger now, which
makes it more reasonable to show the status bar by default.

This change won't affect anyone who has already run ATE once, since the
preferences will have already been set to the default value on the first
run of the program.
Update Basque translation.

Courtesy Asier Iturralde asier.iturralde@gmail.com
Move uses clauses in front of activity clause.

Suggested by Android SDK Lint.