New issue 589 by menn...@gmail.com: New code from Shachar Shemesh
http://code.google.com/p/softkeyboard/issues/detail?id=589
1) enabling keyboards from external packages but xml attribute
2) fix for the keyboard sorting
3) JNI rename
4) no notification when keyboard is installed in the SYSTEM partition.
default enabled XML attribute patch
Attachments:
defaultkeyboards.patch 8.8 KB
A patch for changing the native IME library name.
The patch does not reflect two operations that need to be performed. We
also need to erase libs/armeabi/libnativeime.so, and to build (using the
NDK) the new libanysoftkey_jni.so and add it to the subversion
Attachments:
nativename.patch 1.9 KB
A patch to not display the welcome notification icon if the apk is
installed under the system folder.
Attachments:
noicon.patch 1.5 KB
Please hold off integrating "noicon.patch". I suspect it is the wrong way
to do it.
Revised version of the no icon patch.
Now tests the ApplicationInfo flags, which is a much more reliable method.
This version tests whether, of the FLAG_SYSTEM and FLAG_UPDATED_SYSTEM_APP
only the FLAG_SYSTEM flag is set. The practical upshot is that the icon
will not be displayed only if this is the version actually running from the
system folder. If this is an update, the icon will be displayed. If we wish
not to display the icon even if this is an update, we need to only test the
FLAG_SYSTEM flag, and disregard the FLAG_UPDATED_SYSTEM_APP flag.
Attachments:
noicon.patch 1.3 KB
New version of noicon.patch.
Shachar, can you explain what you did here?
Attachments:
noicon(1).patch 1.8 KB
The purpose of the test is to see whether the specified keyboard is
enabled, either because it is in the /system folder or because the user
clicked on the check box in the settings menu.
The list of enabled intent receivers is stored in a secure settings called
ENABLED_INPUT_METHODS as a colon separated list. This code extracts that
string, turns it into an array by splitting on ":", and then doing a linear
search to see whether any of the elements start with our name (as reported
by getApplicationInfo().packageName).
The reason for the linear search is that the array will not be sorted, so
we couldn't use Java's built-in text search functions. We could sort and
then search, but sorting is O(n*log(n)), while a single linear search is
O(n), which is quicker.