This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/swig/android/jni/sqlite
2015-04-13 13:28:17 +01:00
..
nativehelper SQLite for android 2014-07-15 18:57:48 -05:00
ALog-priv.h SQLite for android 2014-07-15 18:57:48 -05:00
android_database_SQLiteCommon.cpp SQLite for android 2014-07-15 18:57:48 -05:00
android_database_SQLiteCommon.h SQLite for android 2014-07-15 18:57:48 -05:00
android_database_SQLiteConnection.cpp SQLite for android 2014-07-15 18:57:48 -05:00
android_database_SQLiteDebug.cpp SQLite for android 2014-07-15 18:57:48 -05:00
android_database_SQLiteGlobal.cpp SQLite for android 2014-07-15 18:57:48 -05:00
Android.mk compile myddas interface to sqlite 2015-03-23 07:27:10 +00:00
JniConstants.cpp SQLite for android 2014-07-15 18:57:48 -05:00
JNIHelp.cpp SQLite for android 2014-07-15 18:57:48 -05:00
README SQLite for android 2014-07-15 18:57:48 -05:00
sqlite3.c android debugging plus clean-ups 2015-04-13 13:28:17 +01:00
sqlite3.h android debugging plus clean-ups 2015-04-13 13:28:17 +01:00

All the files in this directory are copied from stock android. The following
files:

JniConstants.cpp
JNIHelp.cpp
ALog-priv.h

are copied in from Android's libnativehelper module (altogether less than 1000
lines of code). The remainder are from the core framework (directory
/frameworks/base/core/jni).

Notes on changes:

The ashmem_XXX() interfaces are used for the various "xxxForBlobDescriptor()"
API functions. The code in libcutils for this seems to be platform
dependent - some platforms have kernel support, others have a user space
implementation. So these functions are not supported for now.

The original SQLiteConnection.cpp uses AndroidRuntime::genJNIEnv() to obtain a
pointer to the current threads environment. Changed to store a pointer to the
process JavaVM (Android allows only one) as a global variable. Then retrieve
the JNIEnv as needed using GetEnv().

Replaced uses of class String8 with std::string in SQLiteConnection.cpp and a
few other places.

The stock Android code to populate CursorWindow containers with the results of
a SELECT statement uses a C++ interface that is not available to NDK builds. So
this code is rewritten to call the CursorWindow java interface via JNI methods.
This is the largest source code change. See function 
nativeExecuteForCursorWindow() in file android_database_SQLiteConnection.cpp
for details.

The "LOCALIZED" collation and some miscellaneous user-functions added by the
sqlite3_android.cpp module are not included. A collation called LOCALIZED
that is equivalent to BINARY is added instead to keep various things working.
This should not cause serious problems - class SQLiteConnection always
runs "REINDEX LOCALIZED" immediately after opening a connection.