Compare commits

...

8 Commits

Author SHA1 Message Date
B. Petersen 95786d1268 Update messenger-backend submodule. 2017-11-15 22:41:49 +01:00
B. Petersen cfc69e483e Changelog 2017-11-15 22:33:50 +01:00
B. Petersen 73b59ed4bf Adapt to new synchronous configure function. 2017-11-15 22:28:55 +01:00
B. Petersen e8a996d1f3 Update messenger-backend submodule. 2017-11-15 14:03:54 +01:00
B. Petersen c04ba91b50 Adapt to new blobdir API. 2017-11-15 13:43:07 +01:00
B. Petersen d763be42a1 Adapt to new MR_EVENT_IS_OFFLINE 2017-11-15 13:08:08 +01:00
B. Petersen 10d01b0d68 Adapt configure progress indicator. 2017-11-15 09:45:19 +01:00
B. Petersen 7699c5e63f Bump version 2017-11-14 22:21:34 +01:00
6 changed files with 30 additions and 25 deletions
+5
View File
@@ -1,5 +1,10 @@
# Delta Chat Changelog
## v0.9.8
2017-11-15
* Fix a bug that avoids chat creation under some circumstances (bug introduced in 0.9.7)
## v0.9.7
2017-11-14
+2 -2
View File
@@ -79,7 +79,7 @@ android {
}
}
defaultConfig.versionCode = 46
defaultConfig.versionCode = 47
sourceSets.main {
jniLibs.srcDir 'libs'
@@ -121,6 +121,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.9.7" // do NOT forget to increase defaultConfig.versionCode!
versionName "0.9.8" // do NOT forget to increase defaultConfig.versionCode!
}
}
+4 -6
View File
@@ -247,16 +247,14 @@ JNIEXPORT void Java_com_b44t_messenger_MrMailbox_close(JNIEnv *env, jclass cls)
JNIEXPORT jstring Java_com_b44t_messenger_MrMailbox_getBlobdir(JNIEnv *env, jclass cls)
{
char* temp = mrmailbox_get_blobdir(get_mrmailbox_t(env, cls));
jstring ret = JSTRING_NEW(temp);
free(temp);
return ret;
mrmailbox_t* ths = get_mrmailbox_t(env, cls); if( ths == NULL ) { return JSTRING_NEW(NULL); }
return JSTRING_NEW(ths->m_blobdir);
}
JNIEXPORT void Java_com_b44t_messenger_MrMailbox_configureAndConnect(JNIEnv *env, jclass cls)
JNIEXPORT jint Java_com_b44t_messenger_MrMailbox_configureAndConnect(JNIEnv *env, jclass cls)
{
mrmailbox_configure_and_connect(get_mrmailbox_t(env, cls));
return (jint)mrmailbox_configure_and_connect(get_mrmailbox_t(env, cls));
}
@@ -51,7 +51,7 @@ public class MrMailbox {
public native static void close();
public native static String getBlobdir();
public native static void configureAndConnect();
public native static int configureAndConnect();
public native static void configureCancel();
public native static int isConfigured();
@@ -197,14 +197,13 @@ public class MrMailbox {
public final static int MR_EVENT_CONTACTS_CHANGED = 2030;
public final static int MR_EVENT_CONFIGURE_ENDED = 2040;
public final static int MR_EVENT_CONFIGURE_PROGRESS = 2041;
public final static int MR_EVENT_IMEX_ENDED = 2050;
public final static int MR_EVENT_IMEX_PROGRESS = 2051;
public final static int MR_EVENT_IMEX_FILE_WRITTEN = 2052;
public final static int MR_EVENT_IS_ONLINE = 2080;
public final static int MR_EVENT_IS_OFFLINE = 2081;
public final static int MR_EVENT_GET_STRING = 2091;
public final static int MR_EVENT_GET_QUANTITIY_STRING = 2092;
public final static int MR_EVENT_HTTP_GET = 2100;
@@ -219,15 +218,6 @@ public class MrMailbox {
public static long MrCallback(final int event, final long data1, final long data2) // this function is called from within the C-wrapper
{
switch(event) {
case MR_EVENT_CONFIGURE_ENDED:
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public void run() {
NotificationCenter.getInstance().postNotificationName(NotificationCenter.configureEnded, (int)data1);
}
});
return 0;
case MR_EVENT_CONFIGURE_PROGRESS:
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
@@ -391,8 +381,8 @@ public class MrMailbox {
}
return String2CPtr(sp);
case MR_EVENT_IS_ONLINE:
return ApplicationLoader.isNetworkOnline()? 1 : 0;
case MR_EVENT_IS_OFFLINE:
return ApplicationLoader.isNetworkOnline()? 0 : 1;
case MR_EVENT_HTTP_GET:
String httpContent = null;
@@ -356,7 +356,19 @@ public class SettingsAccountFragment extends BaseFragment implements Notificatio
}
// try to connect, this results in an MR_EVENT_CONFIGURE_ENDED resp. NotificationCenter.configureEnded event
MrMailbox.configureAndConnect();
Utilities.searchQueue.postRunnable(new Runnable() {
@Override
public void run() {
final int res = MrMailbox.configureAndConnect();
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public void run() {
NotificationCenter.getInstance().postNotificationName(NotificationCenter.configureEnded, (int)res);
}
});
}
});
}
@Override
@@ -365,7 +377,7 @@ public class SettingsAccountFragment extends BaseFragment implements Notificatio
{
if( progressDialog!=null ) {
// we want the spinner together with a progress info
int percent = (Integer)args[0];
int percent = (Integer)args[0] / 10;
progressDialog.setMessage(ApplicationLoader.applicationContext.getString(R.string.OneMoment)+String.format(" %d%%", percent));
}
}