Commit e5bd3d10 authored by Ricki Hirner's avatar Ricki Hirner

User-Agent and iCalendar/vCard product IDs: useBuild config; change to dav4jvm

parent 6a512e1f
Pipeline #42582119 failed with stages
in 10 minutes and 57 seconds
......@@ -25,6 +25,8 @@ android {
minSdkVersion 19 // Android 4.4
targetSdkVersion 28 // Android 9.0
buildConfigField "String", "userAgent", "DAVx5"
// when using this, make sure that notification icons are real bitmaps
vectorDrawables.useSupportLibrary = true
}
......
......@@ -226,7 +226,7 @@ class HttpClient private constructor(
// use Locale.US because numbers may be encoded as non-ASCII characters in other locales
private val userAgentDateFormat = SimpleDateFormat("yyyy/MM/dd", Locale.US)
private val userAgentDate = userAgentDateFormat.format(Date(BuildConfig.buildTime))
private val userAgent = "DAVx5/${BuildConfig.VERSION_NAME} ($userAgentDate; dav4android; okhttp/${Constants.okhttpVersion}) Android/${Build.VERSION.RELEASE}"
private val userAgent = "${BuildConfig.userAgent}/${BuildConfig.VERSION_NAME} ($userAgentDate; dav4jvm; okhttp/${Constants.okhttpVersion}) Android/${Build.VERSION.RELEASE}"
override fun intercept(chain: Interceptor.Chain): Response {
val locale = Locale.getDefault()
......
......@@ -27,7 +27,7 @@ class LocalContact: AndroidContact, LocalAddress {
companion object {
init {
Contact.productID = "+//IDN bitfire.at//DAVx5/" + BuildConfig.VERSION_NAME + " ez-vcard/" + Ezvcard.VERSION
Contact.productID = "+//IDN bitfire.at//${BuildConfig.userAgent}/${BuildConfig.VERSION_NAME} ez-vcard/" + Ezvcard.VERSION
}
const val COLUMN_FLAGS = ContactsContract.RawContacts.SYNC4
......
......@@ -21,7 +21,7 @@ class LocalEvent: AndroidEvent, LocalResource<Event> {
companion object {
init {
ICalendar.prodId = ProdId("+//IDN bitfire.at//DAVx5/" + BuildConfig.VERSION_NAME + " ical4j/" + Constants.ical4jVersion)
ICalendar.prodId = ProdId("+//IDN bitfire.at//${BuildConfig.userAgent}/${BuildConfig.VERSION_NAME} ical4j/" + Constants.ical4jVersion)
}
const val COLUMN_ETAG = CalendarContract.Events.SYNC_DATA1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment