OSDN Git Service
Jack Palevich [Mon, 24 Oct 2011 16:34:18 +0000 (09:34 -0700)]
Update service notification icon.
Used "Android Asset Studio" to create the icons from a template.
Jack Palevich [Sun, 23 Oct 2011 17:49:10 +0000 (10:49 -0700)]
Update checklist.
Jack Palevich [Sun, 23 Oct 2011 17:29:27 +0000 (10:29 -0700)]
Add a publish checklist.
Jack Palevich [Sun, 23 Oct 2011 17:13:52 +0000 (10:13 -0700)]
Bump version number.
Jack Palevich [Sun, 23 Oct 2011 17:07:28 +0000 (10:07 -0700)]
Revert "Return empty ExtractedText instead of null from getExtractedText()"
This reverts commit
2d640ff2381925d9784248712671b7c47f2b7f56.
The original commit broke Swype soft keyboard support.
Jack Palevich [Sun, 23 Oct 2011 13:56:22 +0000 (06:56 -0700)]
Make sure we build on API level 10.
(Previously our manifest said we used API level 10, but we actually built
against API level 11.)
Jack Palevich [Sun, 23 Oct 2011 01:39:24 +0000 (18:39 -0700)]
Avoid possible overflow if the text ends in a high surrogate.
Jack Palevich [Sat, 22 Oct 2011 12:57:23 +0000 (05:57 -0700)]
Add link to Android Market.
Jack Palevich [Sat, 22 Oct 2011 12:24:24 +0000 (05:24 -0700)]
A UTF-8 encoded text file
From http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt
This test file shows that we don't currently handle many obscure parts
of unicode rendering, including combining diacritics, brail, etc.
Jack Palevich [Sat, 22 Oct 2011 03:58:24 +0000 (20:58 -0700)]
Create a status bar notification icon.
See http://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar.html
Jack Palevich [Sat, 22 Oct 2011 03:21:57 +0000 (20:21 -0700)]
Remove executable bit.
These files are not executable, and should not have executable bits
set.
These bits sometimes gets set when importing files from Windows.
Jack Palevich [Sat, 22 Oct 2011 03:06:41 +0000 (20:06 -0700)]
Move atari font notice out of res directory.
Jack Palevich [Sat, 22 Oct 2011 03:01:22 +0000 (20:01 -0700)]
Increment version number.
Steven Luo [Tue, 11 Oct 2011 10:20:14 +0000 (03:20 -0700)]
Implement fast resize for cases where width remains constant
A resize operation currently requires getting the entire transcript
text, throwing away the backing store, constructing a new one, and then
writing the transcript to the new store. Particularly when the
transcript is large, this is a slow and inefficient operation.
As it turns out, it's really quite easy to change the number of screen
rows for a particular backing store, which allows much faster resize
operations in the case where the number of columns does not change.
This is particularly useful when using soft keyboards, where the number
of rows will change depending on whether the keyboard is displayed, but
the number of columns doesn't.
Signed-off-by: Jack Palevich <jackpal@google.com>
Steven Luo [Tue, 11 Oct 2011 10:20:08 +0000 (03:20 -0700)]
Make the screen a movable window in the transcript buffer
Instead of the current scheme of having 0..mScreenRows-1 be the screen,
and everything else be the transcript, let the screen be a movable
window into the circular buffer. This allows scrolling the whole screen
to be much faster (just move the window), and should make fast resize
easier.
Signed-off-by: Jack Palevich <jackpal@google.com>
Steven Luo [Tue, 11 Oct 2011 10:05:26 +0000 (03:05 -0700)]
Preserve colors and formatting across screen size changes
Currently, getTranscriptText() has no option for preserving
color/formatting information, so this information is lost when resizing
the screen. Fix this by adding a variant of getTranscriptText() which
accepts a StringBuilder in which color information will be stored, and
using it during resize operations.
To save memory, this implementation only preserves color information for
regions of the screen which contain text, so blank areas of the screen
with colored backgrounds will still revert to the default background
color.
(Why StringBuilder? Post-Unicode, we cannot store information in the
upper bits of a char, as we would have before. An ArrayList<Byte> would
be the most natural fit, but the need to box the values creates serious
memory overhead. StringBuilder handles dynamic sizing of the array for
us and uses less memory per cell than an ArrayList.)
Signed-off-by: Jack Palevich <jackpal@google.com>
Steven Luo [Tue, 11 Oct 2011 10:05:20 +0000 (03:05 -0700)]
Add a hack to remember the cursor position across screen size changes
As it stands, the cursor ends up immediately after the last
non-whitespace character in the transcript after a screen resize, which
is very frequently incorrect (the last character in the output is
often a space or newline, and it's possible the cursor has been moved,
as during command line editing).
Since lines could be re-wrapped during the screen size update, there's
no easy way to calculate where the cursor should end up. Therefore, we
use a hack: since ASCII ESC (\033) is non-printable and should never be
part of the transcript, we mark the cursor location with an ESC before
resizing, and restore the cursor to the location where the ESC ends up
afterwards (taking care to save and restore the real character at the
cursor position correctly).
Signed-off-by: Jack Palevich <jackpal@google.com>
Steven Luo [Tue, 11 Oct 2011 10:05:11 +0000 (03:05 -0700)]
Return empty ExtractedText instead of null from getExtractedText()
This silences the following error message in logs:
E/InputMethodService(29043): Unexpected null in startExtractingText : mExtractedText = null, input connection = com.android.internal.view.InputConnectionWrapper@
405ef968
Signed-off-by: Jack Palevich <jackpal@google.com>
Steven Luo [Tue, 11 Oct 2011 10:04:48 +0000 (03:04 -0700)]
Hide the soft keyboard when pausing the activity
Otherwise, the keyboard will remain open after the user leaves the
activity, possibly covering up part of whatever the user is now doing.
Signed-off-by: Jack Palevich <jackpal@google.com>
Steven Luo [Tue, 11 Oct 2011 10:04:33 +0000 (03:04 -0700)]
Return early from charWidth() for all ASCII printable chars, not just space
Signed-off-by: Jack Palevich <jackpal@google.com>
Steven Luo [Tue, 11 Oct 2011 10:04:15 +0000 (03:04 -0700)]
Fix off-by-one error in getting selected text
Signed-off-by: Jack Palevich <jackpal@google.com>
Steven Luo [Tue, 11 Oct 2011 10:04:10 +0000 (03:04 -0700)]
Fix getTranscriptText() behavior with autowrapped lines
Since the Unicode patches, internalGetTranscriptText() has been
ignoring trailing whitespace for lines that were autowrapped, which
causes the content which was wrapped to the next line to be appended
immediately after the last printing character -- not its original
location. This patch fixes that regression.
Signed-off-by: Jack Palevich <jackpal@google.com>
Steven Luo [Tue, 11 Oct 2011 10:04:06 +0000 (03:04 -0700)]
Avoid going off end of offset array when going from width 2 to 1 at end of line
Why this is happening is somewhat puzzling in the first place (since a
width 2 character doesn't fit at the end of the line), but this prevents
a crash.
Signed-off-by: Jack Palevich <jackpal@google.com>
Jack Palevich [Sat, 22 Oct 2011 02:39:41 +0000 (19:39 -0700)]
getEastAsianWidth: Actually invoke method after initializing when first called
Signed-off-by: Jack Palevich <jackpal@google.com>
Jack Palevich [Sat, 22 Oct 2011 02:37:20 +0000 (19:37 -0700)]
Update project organization for SDK version 14
Jack Palevich [Mon, 10 Oct 2011 00:14:21 +0000 (17:14 -0700)]
Enable code to run pre-SDK-level 8.
Introduce a utility class to deal with post-SDK-level-3 APIs.
Cache the SDK level as an integer at start-up.
Use reflection to access post-SDK-level-3 APIs.
Add early out for space character, which shows up frequently.
Jack Palevich [Mon, 10 Oct 2011 00:09:57 +0000 (17:09 -0700)]
Micro optimization: avoid unnescessary shifts.
Jack Palevich [Mon, 10 Oct 2011 00:08:44 +0000 (17:08 -0700)]
Shorten UI message for "Default to UTF-8 mode".
The original message text, while more accurate, did not fit in the UI.
Jack Palevich [Sun, 9 Oct 2011 22:15:34 +0000 (15:15 -0700)]
Restore SCREEN_CHECK_PERIOD constant.
(I think Steven has a patch in his source tree that removes the need to
use SCREEN_CHECK_PERIOD, but that patch wasn't accepted for the main
branch, so SCREEN_CHECK_PERIOD is unused in Steven's tree, but is still
required for the main branch.)
Steven Luo [Sat, 1 Oct 2011 05:48:47 +0000 (22:48 -0700)]
Support for Unicode text input and UTF-8 I/O to process
* Ensure all output paths produce UTF-8
* Decode UTF-8 sequences in the input
* Support switching to/from UTF-8 mode using ESC % escape codes
* Add a preference to control whether the emulator is in UTF-8 mode by
default
Signed-off-by: Jack Palevich <jack.palevich@gmail.com>
Steven Luo [Sat, 1 Oct 2011 05:48:35 +0000 (22:48 -0700)]
Support displaying Unicode text
The current scheme, whereby we store the contents of our screen in an
array of char (two bytes in Java) with the upper byte used to encode
color and formatting information, is fundamentally incompatible with
Unicode, where the available encodings all either need more than one
byte per character or are variable-length encodings.
Instead, we use a new UnicodeTranscript class, which stores the
transcript row by row and includes facilities to handle combining
characters and East Asian wide characters.
We also need to make some minor changes to the code which displays text
on screen to support Unicode output.
Signed-off-by: Jack Palevich <jack.palevich@gmail.com>
Steven Luo [Sat, 1 Oct 2011 05:48:23 +0000 (22:48 -0700)]
Add a transcript backing store suitable for Unicode text
Storing Unicode text in a form suitable for a terminal emulator poses
several challenges:
* In Java's native UTF-16 encoding, some Unicode code points (those
outside the Basic Multilingual Plane) require two chars to express.
* The use of combining characters means that it's possible for the
character displayed in one column/screen position to require several
Unicode code points to express.
* Some Unicode code points (particularly East Asian wide characters,
which include all of the CJK ideographs) take up two columns/screen
positions.
The UnicodeTranscript class is designed to make the operations we need
most frequently -- storing a character to a particular screen position,
and getting all or part of a line -- as fast as possible. The design
uses an array of two types of lines: "basic", which is just an array of
char[], and is used to store a line as long as it has no combining
characters, wide characters, or non-BMP characters; and "full", which is
an array of char[] together with an array of offsets allowing us to
easily find a particular column in the line. Basic lines in the
transcript are automatically converted to full lines as needed.
Color/formatting information and line wrapping information are stored in
separate arrays.
We also expose a static method, charWidth(), which returns the number of
columns/screen positions that a particular Unicode code point will use.
This information is needed by other parts of the emulator to correctly
handle Unicode.
Correct support for East Asian wide characters requires Android 2.2 or
later -- 2.2 introduced a getEastAsianWidth() method, which we use to
determine the width of a character. On older platforms, we just pretend
all characters which aren't combining or control characters have width
1.
Signed-off-by: Jack Palevich <jack.palevich@gmail.com>
Steven Luo [Sat, 1 Oct 2011 05:48:08 +0000 (22:48 -0700)]
Optimize getTranscriptText()
The current implementation is going through each line character by
character, even for lines that are known to be unwanted in the final
output; this is silly and easy to fix.
Signed-off-by: Jack Palevich <jack.palevich@gmail.com>
Jack Palevich [Thu, 29 Sep 2011 04:56:45 +0000 (21:56 -0700)]
Basque localization.
Courtesy asier.iturralde@gmail.com
Jack Palevich [Thu, 29 Sep 2011 04:42:00 +0000 (21:42 -0700)]
Update Italian translations
Courtesy fireb33@gmail.com
Jack Palevich [Sun, 18 Sep 2011 17:13:05 +0000 (10:13 -0700)]
Generate native code for x86 as well as armeabi.
In theory this will allow Android Terminal Emulator to run on an
x86 version of Android.
Jack Palevich [Sun, 18 Sep 2011 17:11:20 +0000 (10:11 -0700)]
Update config file for latest Android SDK
Jack Palevich [Sun, 18 Sep 2011 17:09:24 +0000 (10:09 -0700)]
Update private build tool to support NDK r6b
Jack Palevich [Mon, 29 Aug 2011 23:52:45 +0000 (16:52 -0700)]
Increment version number.
Jack Palevich [Sun, 28 Aug 2011 18:34:21 +0000 (11:34 -0700)]
Handle fractional-pixel-width fixed-width fonts.
This should fix the problems people have been having with text rendering
when using non-standard fixed-width fonts.
Jack Palevich [Sun, 28 Aug 2011 17:29:52 +0000 (10:29 -0700)]
Remove JDK 1.5-incompatible interface method @Override annotations
Allows building with JDK 1.5.
Steven Luo [Sun, 28 Aug 2011 16:43:09 +0000 (09:43 -0700)]
Avoid accessing a finished TranscriptScreen when resuming the terminal activity
updatePrefs() may ask each terminal session in the list to update its
size, which requires accessing the TranscriptScreen. Therefore, we need
to update the list of running terminal sessions before calling
updatePrefs(), to preclude the possibility of accessing a finished
TranscriptScreen.
Also, if a window was closed in the WindowList activity, and then the
user selected a specific window, the window number passed to us in
onActivityResult() refers to the window list *after* taking window
closures into account. We therefore need to defer switching to the
user's selected window until after the list of running sessions is
updated (onActivityResult() is called before onResume(), so it can't be
done there); this avoids calling onResume() on a stale EmulatorView,
which results in an attempt to access a finished TranscriptScreen.
Jack Palevich [Sun, 28 Aug 2011 04:43:09 +0000 (21:43 -0700)]
Fix resource-related problems when running on Android 1.5 to 2.2
Hurray for the emulator for making it easy to test older versions
+ Use our own copies of system drawables not available in older versions.
+ Make sure there's a (mdpi resolution) copy of every drawable in the
plain "drawable" directory, since that's where Android 1.5 looks.
Steven Luo [Sat, 27 Aug 2011 20:33:30 +0000 (13:33 -0700)]
Add UI for switching and managing terminal sessions.
We expose three different ways to manage terminal sessions:
* Options menu items to open a new window and close the current window.
* A WindowList activity, reachable from the options menu, which lists
all the open windows and allows opening, closing, and switching of
windows. The behavior is patterned after the window list activity in
the Android browser.
* Gestures to change windows -- swipe right-to-left for the next window,
left-to-right for the previous window.
The options menu items have been reordered to make what should be the
five most frequently used items (new window, close window, window list,
toggle keyboard, special keys reference) appear in the icon menu so that
the user doesn't have to touch "More" to reach them.
This patch adds several icons. btn_close_window and ic_menu_windows
come from the Android browser source, while the rest come from the
Android 2.3.3 SDK platform, revision 2 (platforms/android-10/data/res).
Steven Luo [Sat, 27 Aug 2011 20:23:52 +0000 (13:23 -0700)]
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.
Steven Luo [Sat, 27 Aug 2011 20:22:21 +0000 (13:22 -0700)]
Don't accept input from process after TranscriptScreen is finished.
This prevents a bunch of noise in the logs.
Steven Luo [Sat, 27 Aug 2011 19:37:47 +0000 (12:37 -0700)]
Throw away TranscriptScreen backing store on session finish
Android's InputMethodManager seems to hold a reference to a finished
activity object for a while after the activity is destroyed. This
keeps everything the activity holds a reference to in memory, which in
our case includes a fairly significant chunk of memory: the backing
store to the TranscriptScreen. Throw this away when it's not needed, to
reduce the memory impact of this behavior.
Steven Luo [Sat, 27 Aug 2011 19:33:24 +0000 (12:33 -0700)]
Use TermSession in activity and view instead of old terminal-handling code
This completes the process of isolating the code for each terminal
session, which should considerably simplify the task of adding support
for multiple sessions.
Steven Luo [Sat, 27 Aug 2011 19:29:49 +0000 (12:29 -0700)]
Add TermSession class to represent a terminal session
At the moment, the assumption that each terminal activity contains only
one EmulatorView and hosts only one terminal session is fairly deeply
embedded into the code. To help break this assumption, we introduce a
new TermSession class, which holds the TerminalEmulator and
TranscriptScreen for a session, and handles the launching and watching
of the process and the setup of the I/O streams.
Steven Luo [Sat, 27 Aug 2011 19:24:29 +0000 (12:24 -0700)]
Modify the activity and view to use the new TermSettings class.
Steven Luo [Sat, 27 Aug 2011 19:20:44 +0000 (12:20 -0700)]
For multisession support, we eventually want to keep the terminal
sessions in the service instead of tying them to the activity. This
implies that we have to stop holding SharedPreferences objects in all of
the classes tied to the session. To this end, introduce a new
TermSettings class, which is responsible for reading SharedPreferences
and holding the current value of config settings.
Steven Luo [Sat, 27 Aug 2011 19:12:54 +0000 (12:12 -0700)]
This patch isn't really necessary, but it makes life easier for me. For
local builds, I change the package name to
net.steven676.android.terminal, which allows co-installation with the
Market version; however, if the debug constants stay in the Term class,
I have to change every file using them to either belong to the new
package, or else import net.steven676.android.terminal.Term.
Steven Luo [Sat, 27 Aug 2011 19:02:31 +0000 (12:02 -0700)]
The fact that Term.java contains substantially all of the classes of the
application clashes with Java's model of one class per file, and is
inconvenient when refactoring the code to allow for multiple terminal
sessions in the activity. This patch splits out all of the classes into
separate files, and groups related classes into packages; no actual
changes to the code are made.
Jack Palevich [Sat, 27 Aug 2011 18:38:01 +0000 (11:38 -0700)]
Ignore local.properties
contains machine-specific information, not useful to save in repo.
Jack Palevich [Tue, 23 Aug 2011 03:53:29 +0000 (20:53 -0700)]
Shrink market icon to match "safe" bounds
See http://www.google.com/support/androidmarket/developer/bin/answer.py?answer=
1078870
Jack Palevich [Tue, 23 Aug 2011 03:39:40 +0000 (20:39 -0700)]
Improve market icon.
Shinier, and more like a terminal.
Jack Palevich [Sun, 21 Aug 2011 23:44:04 +0000 (16:44 -0700)]
Updated translations
Thanks to fireb33@gmail.com
Jack Palevich [Sat, 25 Jun 2011 12:11:04 +0000 (20:11 +0800)]
Increment version number.
Jack Palevich [Sat, 25 Jun 2011 12:09:29 +0000 (20:09 +0800)]
Update in-app documentation for special keys
Contributed by Steven Luo steven+android@steven676.net
Jack Palevich [Sat, 25 Jun 2011 12:07:44 +0000 (20:07 +0800)]
Add F1-F12 and Ins/Del/Home/End keys
Contributed by Steven Luo steven+android@steven676.net who writes:
The mapping is as follows:
Fn-[1-9]: F1-F9
Fn-0: F10
Ctrl-9: F11
Ctrl-0: F12
Fn-I: Ins
Fn-X: Del
Fn-H: Home
Fn-F: End
It should be noted that a real VT100 does not have Home/End keys, and as
such, the terminfo entry for TERM=vt100 doesn't contain escape codes for
Home and End. This bothers some applications, but not others. The
codes generated match those sent by the Linux console (TERM=linux),
which appears to work fine as a TERM setting since the emulation fixes
in 1.0.30. xterm sends different escape codes, though; I left the
escape codes at their present values because TERM=xterm causes problems
with some applications.
Addresses GitHub issue #9.
---
I'm unhappy with the reintroduction of different behaviors for the Ctrl
key, but I couldn't think of another choice that's guaranteed to make
sense on any soft keyboard layout. (Fn-J/K and Fn-(/) are the two other
possibilities that occurred to me.) Feel free to change.
Jack Palevich [Sat, 25 Jun 2011 12:03:30 +0000 (20:03 +0800)]
Fix behavior of Ctrl-[0-9]
Patch contributed by Steven Luo. steven+android@steven676.net
Steven writes:
In xterm on my Debian system, the Ctrl-[0-9] combinations appear to map
to the following:
Ctrl-2: ^@ (NUL)
Ctrl-3: ^[ (ESC)
Ctrl-4: ^\
Ctrl-5: ^]
Ctrl-6: ^^
Ctrl-7: ^_
Ctrl-8: \177 (DEL)
Ctrl-1, Ctrl-9, and Ctrl-0 appear to send 1, 9, and 0 respectively.
I have no idea whether anyone actually seriously uses these, but make
these key combinations behave in that manner, and remove the bogus
Ctrl-[0-9] and superfluous Fn-[234] combos.
Jack Palevich [Sat, 25 Jun 2011 12:00:54 +0000 (20:00 +0800)]
Make Ctrl/Fn-[A-Z] work with uppercase as well as lowercase letters
Patch courtesy Steven Luo steven+android@steven676.net
Steven says:
For Ctrl-[A-Z], this matches the behavior of xterm running on my Debian
box; for Fn-[A-Z], there are no possible compatibility issues and it
seems like the most natural thing to do.
Jack Palevich [Sat, 25 Jun 2011 11:50:56 +0000 (19:50 +0800)]
Add link to Downloads page to README file.
Jack Palevich [Sat, 25 Jun 2011 11:45:32 +0000 (19:45 +0800)]
Enable an initial command string to be passed as part of the intent.
Thanks to Christoph Schmidt-Hieber, M.D., c.schmidt-hieber@ucl.ac.uk
for the idea and the patch.
Jack Palevich [Sat, 25 Jun 2011 11:35:39 +0000 (19:35 +0800)]
Update Italian localization
Thanks to fireb33@gmail.com
Jack Palevich [Sat, 18 Jun 2011 11:43:58 +0000 (19:43 +0800)]
Increment version number.
Jack Palevich [Sat, 18 Jun 2011 13:16:32 +0000 (21:16 +0800)]
Implement a "None" setting for control and function keys.
Thanks to Eli Grey <me@eligrey.com> for the idea.
Also made the "Special keys" dialog text localizable.
Jack Palevich [Sat, 18 Jun 2011 13:11:42 +0000 (21:11 +0800)]
Rename the rt tool to pushAndRun
This tool is used to build and test the terminal emulator.
Jack Palevich [Sat, 18 Jun 2011 11:43:22 +0000 (19:43 +0800)]
Allow application to be installed on the SD Card.
Jack Palevich [Sat, 18 Jun 2011 11:40:54 +0000 (19:40 +0800)]
Fix insert and delete line code.
Thanks to Sam Jacobson <sam.jacobson@snitchinc.com> for the
bug report and fix!
Jack Palevich [Sat, 18 Jun 2011 11:37:15 +0000 (19:37 +0800)]
Implement missing SGR escape codes
Thanks to Sam Jacobson <sam.jacobson@snitchinc.com> for the bug report!
Jack Palevich [Sat, 18 Jun 2011 13:17:09 +0000 (21:17 +0800)]
Escape single quote character so string resource compiles.
Jack Palevich [Sat, 18 Jun 2011 11:02:36 +0000 (04:02 -0700)]
Merge pull request #20 from cpasmoi/master
missing translations
cpasmoi [Mon, 30 May 2011 00:51:05 +0000 (17:51 -0700)]
missing translations
cpasmoi [Mon, 30 May 2011 00:38:40 +0000 (17:38 -0700)]
missing translations
Jack Palevich [Tue, 24 May 2011 22:51:17 +0000 (06:51 +0800)]
Increment version number.
Jack Palevich [Tue, 24 May 2011 22:49:02 +0000 (06:49 +0800)]
Use a global reference to hold onto a class object between JNI calls.
This bug was detected by using CheckJNI
(setprop dalvik.vm.checkjni true; stop; start).
Jack Palevich [Tue, 24 May 2011 12:15:51 +0000 (20:15 +0800)]
Update local properties for building on a new machine.
(Maybe I shouldn't check this file in at all.)
Jack Palevich [Tue, 24 May 2011 12:15:15 +0000 (20:15 +0800)]
Increment version number.
Steven Luo [Tue, 24 May 2011 07:39:15 +0000 (00:39 -0700)]
Change shared library name (again) to make sure our copy takes precedence on CyanogenMod
Commit
28d47b8... ("Fix java.lang.UnsatisfiedLinkError error.") changed
the name of the shared library from libandroidterm to libandroidterm2,
to avoid a potential library conflict with API/ABI incompatible versions
being shipped in some custom firmwares. Unfortunately, CyanogenMod also
uses the name libandroidterm2:
https://github.com/CyanogenMod/android_packages_apps_AndroidTerm/commit/
7d0de89f0ed5231a7d7eb3ca7917accb83c8eaee
Change the name again, this time to something that should hopefully be
unique, which should fix the problems that CyanogenMod users have been
reporting in the Android Market comments. (A big scary warning to
firmware distributors that the shared library ABI must not be modified
without consulting upstream might be appropriate somewhere ...)
Signed-off-by: Jack Palevich <jackpal@google.com>
Jack Palevich [Mon, 25 Apr 2011 17:27:50 +0000 (10:27 -0700)]
Bump version number.
Jack Palevich [Mon, 25 Apr 2011 17:27:33 +0000 (10:27 -0700)]
Fix java.lang.UnsatisfiedLinkError error.
Change shared library name from libandroidterm to libandroidterm2
My theory is that this bug is happening on systems that have
system versions of the libandroidterm shared library.
Version 1.0.26 of Android Terminal Emulator added a new API,
hangupProcessGroup, to the libandroidterm library.
I think on devices that have libandroidterm in their system library,
that version takes precedence over the version in the application,
and so the hangupProcessGroup API is not found.
By changing the name of the libandroidterm library to libandroidterm2
we should avoid loading the system version of the
libandroidterm library.
Jack Palevich [Mon, 25 Apr 2011 17:13:02 +0000 (10:13 -0700)]
Housekeeping odds-and-ends.
Make sure the release build is a clean build.
Regenerate build.xml
Add update.sh script for regenerating build.xml
Jack Palevich [Sat, 23 Apr 2011 19:15:23 +0000 (12:15 -0700)]
Rename buld tool, and make it build the JNI code as well.
Jack Palevich [Sat, 23 Apr 2011 18:39:59 +0000 (11:39 -0700)]
Bump version number.
Jack Palevich [Sat, 23 Apr 2011 18:37:01 +0000 (11:37 -0700)]
Add commitCorrection() to our InputConnection
Required in order to compile under API level 10.
Jack Palevich [Sat, 23 Apr 2011 18:29:57 +0000 (11:29 -0700)]
Add setComposingRegion() and getSelectedText() to our InputConnection
The definition of the InputConnection interface for SDK version >= 9
includes new functions setComposingRegion() and getSelectedText(). If
we don't include them in our implementation, the build fails with
[javac] /home/steven/devel/android-terminal-emulator/src/jackpal/androidterm/Term.java:2955: <anonymous jackpal.androidterm.EmulatorView$4> is not abstract and does not override abstract method setComposingRegion(int,int) in android.view.inputmethod.InputConnection
(at least when building with SDK 10).
Jack Palevich [Sat, 23 Apr 2011 18:21:27 +0000 (11:21 -0700)]
Make the Terminal activity singleTask instead of singleInstance
With the Terminal activity's launchMode set to singleInstance, the
Preferences activity starts a new task, which can lead to some very
strange back stack behavior. Set launchMode to singleTask instead,
which will allow the Preferences activity into the same task.
Jack Palevich [Sat, 23 Apr 2011 18:17:29 +0000 (11:17 -0700)]
Add menu options to take WakeLock and WifiLock
It can be very useful to prevent the device from sleeping or from
turning off the wifi radio -- but in a general terminal application it's
difficult to guess when this is wanted. Consider the following:
(1) Nothing is happening. We don't want to hold either a WakeLock or
WifiLock.
(2) The user is logged into a remote system via SSH on wifi. We don't
need to hold a WakeLock, but should take a WifiLock to prevent the SSH
session from being disconnected.
(3) The user is doing some long-running computation (locally on the
device) in the shell. We should take a WakeLock, but not a WifiLock.
(4) The user is doing apt-get dist-upgrade in her Debian chroot on the
device. We should hold both a WakeLock and a WifiLock.
Therefore, assume the user knows best, and add menu options to take/drop
a WakeLock and a WifiLock. Note that this requires adding WAKE_LOCK to
the set of permissions we use.
Jack Palevich [Sat, 23 Apr 2011 18:13:25 +0000 (11:13 -0700)]
Add a service to prevent Android from killing our process
By default, an Android process is liable to be killed whenever it's
not in the foreground. When this happens to us, it leaves the user
unable to resume her terminal session, which is still running.
By starting a service in our process (even one which, like this one,
does nothing at all) and marking it as a foreground service, we prevent
the system from killing our process except in out-of-memory situations.
Jack Palevich [Sat, 23 Apr 2011 18:04:59 +0000 (11:04 -0700)]
Add an Fn key for easier access to extra keys
Instead of overloading the Ctrl key to provide arrow keys and send some
control characters, add a new "Fn" key (defaulting to Volume Up) to
provide these functions. By splitting Ctrl and Fn, we can reach these
functions via the more easily-accessible letters, and also provide
access to more useful keys (such as PageUp/Down and Tab).
The mapping is this:
Fn-W/A/S/D: Up/Left/Down/Right
Fn-P/N: PageUp/PageDown
Fn-T: Tab
Fn-L: |
Fn-U: _
Fn-E: Ctrl-[ (Esc)
Fn-.: Ctrl-\
Fn-2: Ctrl-_
Fn-3: Ctrl-^
Fn-4: Ctrl-]
Jack Palevich [Sat, 23 Apr 2011 17:55:56 +0000 (10:55 -0700)]
Kill the started process group in onDestroy
As it stands now, if the user presses the Back button without closing
her shell, it will keep running unattached to any tty. Over time, this
leads to a buildup of shells, each inaccessible to the user.
Fix this by doing what xterm and other terminals do -- send SIGHUP to
the process group of the started process when quitting.
Steven Luo [Sat, 23 Apr 2011 17:17:13 +0000 (10:17 -0700)]
Remove unused variable in native implementation of Exec.close()
Jack Palevich [Sun, 17 Apr 2011 14:51:03 +0000 (07:51 -0700)]
Turkish localization
Provided by Doğukan Korkmaztürk <d.korkmazturk@gmail.com>
Jack Palevich [Sun, 10 Apr 2011 23:28:30 +0000 (16:28 -0700)]
Declare SDK target 10 (Gingerbread) rather than 11 (Honeycomb)
Otherwise the Options menu key doesn't appear on Honeycomb devices.
Jack Palevich [Sun, 10 Apr 2011 22:43:28 +0000 (15:43 -0700)]
Declare that we don't require a touchscreen.
Jack Palevich [Sun, 10 Apr 2011 22:24:05 +0000 (15:24 -0700)]
Add support for Android 1.5
+ set minSdkVersion to 3, so we run on Android 1.5
+ set targetSdkVersion to 11, so we run without compatability hacks.
- otherwise the terminal emulator screen size calculation is
incorrect and scrolling doesn't work on Android 2.3 devices.
+ add a res/drawable/app_terminal.png file, so that we get a
custom launcher icon on Android 1.5 devices.
+ bump version name to 1.0.22.
+ add files to support building from command line using "ant".
Jack Palevich [Wed, 9 Feb 2011 17:00:41 +0000 (09:00 -0800)]
Mark this module optional.
Jack Palevich [Tue, 8 Feb 2011 18:18:35 +0000 (10:18 -0800)]
Add Android.mk file
To help people trying to incorporate AndroidTerm in their own custom
ROMs.
(This hasn't been tested, but it might work.)
Jack Palevich [Sun, 9 Jan 2011 18:31:17 +0000 (10:31 -0800)]
Add '|' and arrow keys to "Special Chars"
Add 'Camera' button as a possible Control key
Make 'Volume Down' the default control key.