mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-29 04:55:15 +00:00
feat: adding additional config base implementations
This commit is contained in:
parent
ad00aeac4a
commit
e784fa79d0
@ -36,6 +36,7 @@ class ExampleInstrumentedTest {
|
|||||||
val nameFromNative = userProfile.getName()
|
val nameFromNative = userProfile.getName()
|
||||||
assertEquals(newName, nameFromNative)
|
assertEquals(newName, nameFromNative)
|
||||||
println("Name received by JNI call: $nameFromNative")
|
println("Name received by JNI call: $nameFromNative")
|
||||||
|
assertTrue(userProfile.dirty())
|
||||||
userProfile.free()
|
userProfile.free()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,3 +52,10 @@ Java_network_loki_messenger_libsession_1util_UserProfile_free(JNIEnv *env, jobje
|
|||||||
auto profile = ptrToProfile(env, obj);
|
auto profile = ptrToProfile(env, obj);
|
||||||
delete profile;
|
delete profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
JNIEXPORT jboolean JNICALL
|
||||||
|
Java_network_loki_messenger_libsession_1util_ConfigBase_dirty(JNIEnv *env, jobject thiz) {
|
||||||
|
auto* configBase = ptrToConfigBase(env, thiz);
|
||||||
|
return configBase->is_dirty();
|
||||||
|
}
|
@ -7,9 +7,9 @@ sealed class ConfigBase(protected val /* yucky */ pointer: Long) {
|
|||||||
System.loadLibrary("session_util")
|
System.loadLibrary("session_util")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
external fun dirty(): Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class UserProfile(pointer: Long): ConfigBase(pointer) {
|
class UserProfile(pointer: Long): ConfigBase(pointer) {
|
||||||
companion object {
|
companion object {
|
||||||
init {
|
init {
|
||||||
|
Loading…
Reference in New Issue
Block a user