mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Add some basic routines.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#include <jni.h>
|
||||
|
||||
|
||||
JNIEXPORT int Java_org_telegram_messenger_MrMailbox_myJnixTest(JNIEnv *env, jclass class)
|
||||
JNIEXPORT int Java_org_telegram_messenger_MrMailbox_MrMailboxNew(JNIEnv *env, jclass class)
|
||||
{
|
||||
return 24;
|
||||
return 28;
|
||||
}
|
||||
|
||||
@@ -4,5 +4,20 @@ package org.telegram.messenger;
|
||||
* Created by bpetersen on 14.09.16.
|
||||
*/
|
||||
public class MrMailbox {
|
||||
public native static int myJnixTest();
|
||||
|
||||
// work with mailboxes
|
||||
public native static int MrMailboxNew (); // returns hMailbox (Names as mrmailbox_new don't work due to the additional underscore)
|
||||
public native static void MrMailboxDelete (int hMailbox);
|
||||
public native static int MrMailboxOpen (int hMailbox, String dbfile);
|
||||
public native static void MrMailboxClose (int hMailbox);
|
||||
public native static int MrMailboxGetChats (int hMailbox); // returns hChatlist
|
||||
|
||||
// working with chatlists
|
||||
public native static int MrChatlistGetCnt (int hChatlist);
|
||||
public native static int MrChatlistGetChat (int hChatlist, int index); // returns hChat
|
||||
|
||||
// working with chats
|
||||
public native static int MrChatGetId (int hChat);
|
||||
public native static int MrChatGetType (int hChat);
|
||||
public native static String MrChatCetName (int hChat);
|
||||
}
|
||||
|
||||
@@ -1328,7 +1328,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
||||
PackageInfo pInfo = ApplicationLoader.applicationContext.getPackageManager().getPackageInfo(ApplicationLoader.applicationContext.getPackageName(), 0);
|
||||
int code = pInfo.versionCode / 10;
|
||||
String abi = "";
|
||||
int testval = MrMailbox.myJnixTest();
|
||||
int testval = MrMailbox.MrMailboxNew();
|
||||
switch (pInfo.versionCode % 10) {
|
||||
case 0:
|
||||
abi = "arm";
|
||||
|
||||
Reference in New Issue
Block a user