Version bump to 0.7.2

* catch illegal SIP addresses (fixes #470)
* version bump to 0.7.2
pull/2/head
Ricki Hirner 9 years ago
parent 08789bbb2c
commit 35011445e0

@ -9,7 +9,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="at.bitfire.davdroid"
android:versionCode="56" android:versionName="0.7.1"
android:versionCode="57" android:versionName="0.7.2"
android:installLocation="internalOnly">
<uses-sdk

@ -9,7 +9,7 @@ package at.bitfire.davdroid;
public class Constants {
public static final String
APP_VERSION = "0.7.1",
APP_VERSION = "0.7.2",
ACCOUNT_TYPE = "bitfire.at.davdroid",
WEB_URL_HELP = "https://davdroid.bitfire.at/configuration?pk_campaign=davdroid-app",
WEB_URL_VIEW_LOGS = "https://github.com/bitfireAT/davdroid/wiki/How-to-view-the-logs";

@ -578,20 +578,24 @@ public class LocalAddressBook extends LocalCollection<Contact> {
SipAddress.RAW_CONTACT_ID + "=? AND " + Data.MIMETYPE + "=?",
new String[] { String.valueOf(c.getLocalID()), SipAddress.CONTENT_ITEM_TYPE }, null);
if (cursor != null && cursor.moveToNext()) {
Impp impp = new Impp("sip:" + cursor.getString(0));
switch (cursor.getInt(1)) {
case SipAddress.TYPE_HOME:
impp.addType(ImppType.HOME);
break;
case SipAddress.TYPE_WORK:
impp.addType(ImppType.WORK);
break;
case SipAddress.TYPE_CUSTOM:
String customType = cursor.getString(2);
if (!StringUtils.isEmpty(customType))
impp.addType(ImppType.get(labelToXName(customType)));
try {
Impp impp = new Impp("sip:" + cursor.getString(0));
switch (cursor.getInt(1)) {
case SipAddress.TYPE_HOME:
impp.addType(ImppType.HOME);
break;
case SipAddress.TYPE_WORK:
impp.addType(ImppType.WORK);
break;
case SipAddress.TYPE_CUSTOM:
String customType = cursor.getString(2);
if (!StringUtils.isEmpty(customType))
impp.addType(ImppType.get(labelToXName(customType)));
}
c.getImpps().add(impp);
} catch(IllegalArgumentException e) {
Log.e(TAG, "Illegal SIP URI", e);
}
c.getImpps().add(impp);
}
}

Loading…
Cancel
Save