mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Remove unused osName argument from DcAccounts constructor
This commit is contained in:
+1
-3
@@ -223,14 +223,12 @@ static dc_accounts_t* get_dc_accounts(JNIEnv *env, jobject obj)
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT jlong Java_com_b44t_messenger_DcAccounts_createAccountsCPtr(JNIEnv *env, jobject obj, jstring osname, jstring dir)
|
||||
JNIEXPORT jlong Java_com_b44t_messenger_DcAccounts_createAccountsCPtr(JNIEnv *env, jobject obj, jstring dir)
|
||||
{
|
||||
CHAR_REF(osname);
|
||||
CHAR_REF(dir);
|
||||
int writable = 1;
|
||||
jlong accountsCPtr = (jlong)dc_accounts_new(dirPtr, writable);
|
||||
CHAR_UNREF(dir);
|
||||
CHAR_UNREF(osname);
|
||||
return accountsCPtr;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ package com.b44t.messenger;
|
||||
|
||||
public class DcAccounts {
|
||||
|
||||
public DcAccounts(String osName, String dir) {
|
||||
accountsCPtr = createAccountsCPtr(osName, dir);
|
||||
public DcAccounts(String dir) {
|
||||
accountsCPtr = createAccountsCPtr(dir);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -36,7 +36,7 @@ public class DcAccounts {
|
||||
|
||||
// working with raw c-data
|
||||
private long accountsCPtr; // CAVE: the name is referenced in the JNI
|
||||
private native long createAccountsCPtr (String osName, String dir);
|
||||
private native long createAccountsCPtr (String dir);
|
||||
private native void unrefAccountsCPtr ();
|
||||
private native long getEventEmitterCPtr ();
|
||||
private native long getJsonrpcInstanceCPtr ();
|
||||
|
||||
@@ -90,7 +90,7 @@ public class ApplicationContext extends MultiDexApplication {
|
||||
|
||||
System.loadLibrary("native-utils");
|
||||
|
||||
dcAccounts = new DcAccounts("Android "+BuildConfig.VERSION_NAME, new File(getFilesDir(), "accounts").getAbsolutePath());
|
||||
dcAccounts = new DcAccounts(new File(getFilesDir(), "accounts").getAbsolutePath());
|
||||
rpc = new Rpc(dcAccounts.getJsonrpcInstance());
|
||||
AccountManager.getInstance().migrateToDcAccounts(this);
|
||||
int[] allAccounts = dcAccounts.getAll();
|
||||
|
||||
Reference in New Issue
Block a user