Call 'Compare keys' core-code.

This commit is contained in:
B. Petersen
2017-05-12 15:45:28 +02:00
parent a6d8d0e3b6
commit b9a72db110
5 changed files with 26 additions and 3 deletions
+2 -2
View File
@@ -76,7 +76,7 @@ android {
}
}
defaultConfig.versionCode = 37
defaultConfig.versionCode = 38
sourceSets.main {
jniLibs.srcDir 'libs'
@@ -118,6 +118,6 @@ android {
minSdkVersion 14 // 14: Android 4.0 Ice Cream Sandwich 2011 (Telegram default), 21: Android 5.0 Lollipop 2014 (recommended for InstantRun)
targetSdkVersion 25 // 25: Nougat. CAVE: Do NOT target "Andoid O" without checking the background tasks carefully, see https://developer.android.com/preview/behavior-changes.html#back-all . As long as we target "Nougat", everything works as expected even for "Andoid O" or later
// in general, we should not change the target without reason; eg. after the switch to Nougat, the camera stops working (see https://inthecheesefactory.com/blog/how-to-share-access-to-file-with-fileprovider-on-android-nougat/en )
versionName "0.1.37" // do NOT forget to increase defaultConfig.versionCode!
versionName "0.1.38" // do NOT forget to increase defaultConfig.versionCode!
}
}
+3
View File
@@ -1599,11 +1599,14 @@ LOCAL_SRC_FILES += \
./image.c \
./video.c \
./gifvideo.cpp \
./messenger-backend/src/mraheader.c \
./messenger-backend/src/mrapeerstate.c \
./messenger-backend/src/mrchat.c \
./messenger-backend/src/mrchatlist.c \
./messenger-backend/src/mrcmdline.c \
./messenger-backend/src/mrcontact.c \
./messenger-backend/src/mre2ee.c \
./messenger-backend/src/mre2ee_driver_bsd.c \
./messenger-backend/src/mrimap.c \
./messenger-backend/src/mrjob.c \
./messenger-backend/src/mrloginparam.c \
+9
View File
@@ -511,6 +511,15 @@ JNIEXPORT jstring Java_com_b44t_messenger_MrMailbox_getInfo(JNIEnv *env, jclass
}
JNIEXPORT jstring Java_com_b44t_messenger_MrMailbox_getContactEncrInfo(JNIEnv *env, jclass cls, jint contact_id)
{
char* temp = mrmailbox_get_contact_encrinfo(get_mrmailbox_t(env, cls), contact_id);
jstring ret = JSTRING_NEW(temp);
free(temp);
return ret;
}
JNIEXPORT jstring Java_com_b44t_messenger_MrMailbox_cmdline(JNIEnv *env, jclass cls, jstring cmd)
{
CHAR_REF(cmd);
@@ -91,6 +91,8 @@ public class MrMailbox {
return MrMailboxBlockContact(m_hMailbox, id, block);
}
public native static String getContactEncrInfo(int contact_id);
public static int deleteContact(int id) {
return MrMailboxDeleteContact(m_hMailbox, id);
}
@@ -406,7 +406,16 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
}
else if(position==compareKeysRow)
{
Toast.makeText(getParentActivity(), context.getString(R.string.NotYetImplemented), Toast.LENGTH_SHORT).show();
String info_str = MrMailbox.getContactEncrInfo(user_id);
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setMessage(info_str);
builder.setPositiveButton(context.getString(R.string.OK), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
;
}
});
showDialog(builder.create());
}
else if(position==startChatRow)
{