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/myddas/sqlite3/Android/jni/sqlite
Vitor Santos Costa d680fa0755 missing
2016-04-05 08:18:09 +01:00
..
nativehelper unify java 2016-04-05 07:48:01 +01:00
ALog-priv.h unify java 2016-04-05 07:48:01 +01:00
android_database_SQLiteCommon.cpp unify java 2016-04-05 07:48:01 +01:00
android_database_SQLiteCommon.h unify java 2016-04-05 07:48:01 +01:00
android_database_SQLiteConnection.cpp missing 2016-04-05 08:18:09 +01:00
android_database_SQLiteDebug.cpp unify java 2016-04-05 07:48:01 +01:00
android_database_SQLiteGlobal.cpp unify java 2016-04-05 07:48:01 +01:00
Android.mk unify java 2016-04-05 07:48:01 +01:00
JniConstants.cpp unify java 2016-04-05 07:48:01 +01:00
JNIHelp.cpp unify java 2016-04-05 07:48:01 +01:00
README unify java 2016-04-05 07:48:01 +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.