8000 got the whole thing building and linking without commenting out funct… · boxer/android-database-sqlcipher@81c090e · GitHub
[go: up one dir, main page]

Skip to content

Commit 81c090e

Browse files
committed
got the whole thing building and linking without commenting out functions
1 parent 4b9e35f commit 81c090e

7 files changed

+18
-14
lines changed

jni/Android.mk

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,12 @@ LOCAL_SHARED_LIBRARIES := \
4646

4747
LOCAL_CFLAGS += -U__APPLE__
4848
LOCAL_LDFLAGS += -L../obj/local/armeabi/
49-
# libnativehelper is included with Android but not the NDK
50-
LOCAL_LDLIBS += -ldl -llog -lnativehelper -lsqlcipher
49+
# libs from the NDK
50+
LOCAL_LDLIBS += -ldl -llog
51+
# libnativehelper and libandroid_runtime are included with Android but not the NDK
52+
LOCAL_LDLIBS += -lnativehelper -landroid_runtime
53+
# these are build in the ../external section
54+
LOCAL_LDLIBS += -lsqlcipher -lsqlcipher_android
5155

5256
ifeq ($(WITH_MALLOC_LEAK_CHECK),true)
5357
LOCAL_CFLAGS += -DMALLOC_LEAK_CHECK

jni/info_guardianproject_database_sqlcipher_SQLiteCompiledSql.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ int register_android_database_SQLiteCompiledSql(JNIEnv * env)
127127
return -1;
128128
}
129129

130-
// return AndroidRuntime::registerNativeMethods(env,
131-
// "android/database/sqlite/SQLiteCompiledSql", sMethods, NELEM(sMethods));
130+
return android::AndroidRuntime::registerNativeMethods(env,
131+
"info/guardianproject/database/sqlcipher/SQLiteCompiledSql", sMethods, NELEM(sMethods));
132132
}
133133

134134
} // namespace guardianproject

jni/info_guardianproject_database_sqlcipher_SQLiteDatabase.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
#include <utils/String16.h>
2323

2424
#include <jni.h>
25-
//#include <JNIHelp.h>
26-
//#include <android_runtime/AndroidRuntime.h>
25+
#include <JNIHelp.h>
26+
#include <android_runtime/AndroidRuntime.h>
2727

2828
#include <sqlite3.h>
2929
#include <sqlite3_android.h>
@@ -474,7 +474,7 @@ int register_android_database_SQLiteDatabase(JNIEnv *env)
474474
return -1;
475475
}
476476

477-
// return AndroidRuntime::registerNativeMethods(env, "android/database/sqlite/SQLiteDatabase", sMethods, NELEM(sMethods));
477+
return android::AndroidRuntime::registerNativeMethods(env, "info/guardianproject/database/sqlcipher/SQLiteDatabase", sMethods, NELEM(sMethods));
478478
}
479479

480480
/* throw a SQLiteException with a message appropriate for the error in handle */

jni/info_guardianproject_database_sqlcipher_SQLiteProgram.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ int register_android_database_SQLiteProgram(JNIEnv * env)
189189
return -1;
190190
}
191191
192-
return AndroidRuntime::registerNativeMethods(env,
193-
"android/database/sqlite/SQLiteProgram", sMethods, NELEM(sMethods));
192+
return android::AndroidRuntime::registerNativeMethods(env,
193+
"info/guardianproject/database/sqlcipher/SQLiteProgram", sMethods, NELEM(sMethods));
194194
}
195195
*/
196196

jni/info_guardianproject_database_sqlcipher_SQLiteQuery.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,8 @@ int register_android_database_SQLiteQuery(JNIEnv * env)
362362
return -1;
363363
}
364364
365-
return AndroidRuntime::registerNativeMethods(env,
366-
"android/database/sqlite/SQLiteQuery", sMethods, NELEM(sMethods));
365+
return android::AndroidRuntime::registerNativeMethods(env,
366+
"info/guardianproject/database/sqlcipher/SQLiteQuery", sMethods, NELEM(sMethods));
367367
}
368368
*/
369369

jni/info_guardianproject_database_sqlcipher_SQLiteStatement.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ int register_android_database_SQLiteStatement(JNIEnv * env)
143143
return -1;
144144
}
145145
146-
return AndroidRuntime::registerNativeMethods(env,
147-
"android/database/sqlite/SQLiteStatement", sMethods, NELEM(sMethods));
146+
return android::AndroidRuntime::registerNativeMethods(env,
147+
"info/guardianproject/database/sqlcipher/SQLiteStatement", sMethods, NELEM(sMethods));
148148
}
149149
*/
150150

jni/sqlite3_exception.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
#include <jni.h>
2222
#include <JNIHelp.h>
23-
//#include <android_runtime/AndroidRuntime.h>
23+
#include <android_runtime/AndroidRuntime.h>
2424

2525
#include <sqlite3.h>
2626

0 commit comments

Comments
 (0)
0