Commit Graph

1223 Commits

Author SHA1 Message Date
Steven Luo
58b90cf643 Bump shared library ABI
We've added two new native methods, so bump the ABI version of the
shared library to prevent problems with ROM-installed copies of the
library.
2012-04-30 18:44:22 -07:00
Steven Luo
f861544988 Add native method to set/clear UTF-8 input flag on tty
The Linux (>= 2.6.4) terminal driver uses the IUTF8 flag for
termios.c_iflag to implement correct character erase behavior in cooked
mode.  The flag has to be set from native code, so provide a method to
do it.
2012-04-30 18:44:21 -07:00
Steven Luo
337408e23a Remove inaccessible directories from the user's PATH
Go through the default PATH and remove directories without the execute
bit set (meaning we can't access files in that directory).  Requires
File.canExecute() from API 9 or later.  This will prevent the misleading
"permission denied" errors which come up when you try to run a
nonexistent command; instead, the correct "not found" error will appear.

Add a preference to control the behavior (defaulting to true) so that
people who insist on always running as root can turn this off.
2012-04-30 18:44:21 -07:00
Steven Luo
ddc206a087 Also check to see whether user's shell is executable 2012-04-30 18:44:21 -07:00
Steven Luo
fd79e60373 Add native code implementation of File.canExecute() for API < 9
file.canExecute() is equivalent to access(file.getAbsolutePath(), X_OK),
so add native code to do just that to implement canExecute() for older
devices.
2012-04-30 18:44:21 -07:00
Steven Luo
dbb80d9501 Add FileCompat class for File.canExecute()
This is new in API 9 and JDK 1.6, and needed for PATH checking.
2012-04-30 18:44:21 -07:00
Steven Luo
f82d42a81f Refactor JNI code
We'd like to provide native methods for more than one class, so move the
initialization stuff into its own file and provide for the possibility
of registering methods for more than one class.
2012-04-30 18:44:21 -07:00
Steven Luo
53e70ab8ee Log an error when user's default shell isn't found 2012-04-30 18:44:21 -07:00
Steven Luo
3192f6bf20 Keep action bar window list in sync after creating window from WindowList activity 2012-04-30 18:44:21 -07:00
Jack Palevich
e4a3f7e721 Merge pull request #100 from damor/master
READ_LOGS Permission
2012-04-28 13:26:07 -07:00
Jack Palevich
3ca8dd4fb5 Add example showing how to use intents to open ATE 2012-04-28 13:22:07 -07:00
damor
b9b1e03913 Added READ_LOGS permission(Issue #99). Fixes Issue #99 2012-04-28 19:23:46 +02:00
Jack Palevich
6108f58a34 Merge pull request #97 from steven676/for-upstream
Behave sanely when selected shell is the empty string or doesn't exist
2012-04-26 07:37:20 -07:00
Steven Luo
8d567a430f Behave sanely when selected shell is the empty string or doesn't exist
Instead of crashing or exiting immediately when something is wrong with
the user's chosen shell, fall back to the default shell, which gives the
user a chance to go into the preferences and fix the error.
2012-04-25 22:47:34 -07:00
Jack Palevich
73f7db6bb6 Merge pull request #93 from gLes/master
Added Hungarian translation
2012-04-22 11:39:23 -07:00
Jack Palevich
e427dccd83 Merge pull request #96 from eauland/patch-10
Update res/values-fr/strings.xml
2012-04-22 11:38:12 -07:00
EauLand
b7cc6d551a Update res/values-fr/strings.xml 2012-04-21 22:02:01 +03:00
gLes
71a6787c89 Added Hungarian translation 2012-04-17 02:09:55 +02:00
Jack Palevich
977ff82064 Update version number to 1.0.42 2012-04-14 14:15:35 -07:00
Jack Palevich
c3d85685a8 Fix 4x8 fonts on API level 4+
(Use a runtime API level check to choose whether to load the nodpi
version.)
2012-04-14 13:32:39 -07:00
Jack Palevich
f6693d52ef Remove unused imports. 2012-04-14 12:38:39 -07:00
Jack Palevich
66a51e7897 Move atari_small.png to the right directories.
It's drawable for API level 3 devices, and drawable-nodpi for more
recent API levels.
2012-04-14 12:35:25 -07:00
Jack Palevich
33abe793ab Use FloatMath.ceil instead of Math.ceil
Apparently slightly faster.

This is a Lint suggestion.
2012-04-14 12:22:39 -07:00
Jack Palevich
52dfbe677a Move uses clauses in front of activity clause.
Suggested by Android SDK Lint.
2012-04-14 12:10:18 -07:00
Jack Palevich
f59f1d931f Update Basque translation.
Courtesy Asier Iturralde asier.iturralde@gmail.com
2012-04-14 12:04:12 -07:00
Jack Palevich
4c3cedd228 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.
2012-04-08 20:44:46 -07:00
Steven Luo
491e20043c 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>
2012-03-28 07:05:33 -07:00
Steven Luo
41a06bfb18 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>
2012-03-28 07:05:33 -07:00
Steven Luo
c5b4ec402f 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>
2012-03-25 18:21:48 -07:00
Steven Luo
c4b50ab98c 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>
2012-03-25 18:21:42 -07:00
Steven Luo
14c7cebbaf 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>
2012-03-25 18:21:37 -07:00
Steven Luo
e9e0901e84 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>
2012-03-25 18:21:31 -07:00
Steven Luo
0ebc55b1d6 Move some getChar() logic from UnicodeTranscript into FullUnicodeLine
Signed-off-by: Jack Palevich <jackpal@google.com>
2012-03-25 18:21:27 -07:00
Steven Luo
2f06c89e67 Deal with null row color when getting transcript with colors
Signed-off-by: Jack Palevich <jackpal@google.com>
2012-03-25 18:21:22 -07:00
Jack Palevich
ce9557eb3c Update build script for NDK version 7b 2012-03-25 18:14:12 -07:00
Jack Palevich
be0e0e1910 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.
2012-03-25 18:13:53 -07:00
Jack Palevich
0e55c7f25a Fix spelling mistake. 2012-03-11 14:22:21 -07:00
Jack Palevich
eec1db809c Add a localization for CZ - Czech Republic
Thanks to Jozka.1@seznam.cz
2012-03-11 10:17:54 -07:00
Jack Palevich
a25ac82d2e 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>
2012-03-10 11:27:33 -08:00
corenting
932181fcc2 Translated locks (fr).
Signed-off-by: corenting <corenting@gmail.com>

Change-Id: If88ca977b485c7b05f7dabe604f3da829015acf8
2012-03-03 20:40:33 +00:00
Ricardo Cerqueira
104dda67d3 Merge "AndroidTerm: Updated Dutch translations" into gingerbread 2012-03-03 22:20:09 +03:00
Ricardo Cerqueira
92a31a8ded Merge "Update Russian translation - Android Terminal" into gingerbread 2012-03-03 22:08:47 +03:00
Ricardo Cerqueira
c38b287135 Merge "Czech: added missing strings" into gingerbread 2012-03-03 22:02:35 +03:00
Marco Brohet
1044251315 AndroidTerm: Updated Dutch translations
Change-Id: Ib4e99a6f0924901602f34b782f0e2a0a56b387f1
2012-03-01 12:53:34 +01:00
pvolkov
302705f34c Update Russian translation - Android Terminal
Update Russian translation - removed trailing whitespace
2012-02-18 20:49:20 +04:00
Jack Palevich
833fdc5be1 Merge pull request #80 from eauland/patch-9
Improve 7 Strings, Add 2 Strings and I translate CTRL / Fn Keys
2012-02-09 11:01:41 -08:00
Danny Baumann
e6bb663c69 Update German translation.
Change-Id: I638e59a9190d54dcbb14ceb10ac08d109ae54ec4
2012-02-08 10:19:40 +01:00
Ondrej Zima
d942994762 Czech: added missing strings
The function key translation is hard to achieve so I try to do it this
way and after I get the translated package I look at it again to
correct it.

Change-Id: I7418f61c497a38378444a150d788acfee1c2fc47
2012-02-06 11:57:49 +01:00
EauLand
5a8534deea Improve 7 Strings, Add 2 Strings and I translate CTRL / Fn Keys 2012-01-29 01:40:03 +01:00
Jack Palevich
10d20881b6 Version 1.0.41 2012-01-25 17:05:06 -08:00