Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bitfireAT/vcard4android.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicki Hirner <hirner@bitfire.at>2021-07-08 12:29:02 +0300
committerRicki Hirner <hirner@bitfire.at>2021-07-08 12:29:02 +0300
commit55a4adb275c372d69750c85976333ae6aafeee53 (patch)
tree0a170bfb67559bcbadd6baedb301118888740f8a
parent4c7fe85fb32c7d884dd99fc73e072d54c4b67d7f (diff)
Update dependencies and KDoc
-rw-r--r--build.gradle8
-rw-r--r--src/main/java/at/bitfire/vcard4android/AndroidContact.kt10
-rw-r--r--src/main/java/at/bitfire/vcard4android/BatchOperation.kt5
3 files changed, 19 insertions, 4 deletions
diff --git a/build.gradle b/build.gradle
index bf30a43..f55e57c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,7 +1,7 @@
buildscript {
ext.versions = [
- kotlin: '1.4.32',
+ kotlin: '1.5.10',
dokka: '0.10.1',
// latest Apache Commons versions that don't require Java 8 (Android 7)
commonsIO: '2.6',
@@ -14,7 +14,7 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:4.2.1'
+ classpath 'com.android.tools.build:gradle:4.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}"
}
@@ -90,8 +90,8 @@ dependencies {
exclude group: 'com.fasterxml.jackson.core'
}
- androidTestImplementation 'androidx.test:runner:1.3.0'
- androidTestImplementation 'androidx.test:rules:1.3.0'
+ androidTestImplementation 'androidx.test:runner:1.4.0'
+ androidTestImplementation 'androidx.test:rules:1.4.0'
testImplementation 'junit:junit:4.13.2'
}
diff --git a/src/main/java/at/bitfire/vcard4android/AndroidContact.kt b/src/main/java/at/bitfire/vcard4android/AndroidContact.kt
index 4514862..acce3b6 100644
--- a/src/main/java/at/bitfire/vcard4android/AndroidContact.kt
+++ b/src/main/java/at/bitfire/vcard4android/AndroidContact.kt
@@ -519,6 +519,7 @@ open class AndroidContact(
/**
* Override this to handle custom data rows, for example to add additional
* information to [contact].
+ *
* @param mimeType MIME type of the row
* @param row values of the row
*/
@@ -585,6 +586,13 @@ open class AndroidContact(
return uri
}
+ /**
+ * Deletes an existing contact from the contacts provider.
+ *
+ * @return number of affected rows
+ *
+ * @throws RemoteException on contacts provider errors
+ */
fun delete() = addressBook.provider!!.delete(rawContactSyncURI(), null, null)
@@ -609,7 +617,9 @@ open class AndroidContact(
* Inserts the data rows for a given raw contact.
* Override this (and call the super class!) to add custom data rows,
* for example generated from some properties of [contact].
+ *
* @param batch batch operation used to insert the data rows
+ *
* @throws RemoteException on contact provider errors
*/
@CallSuper
diff --git a/src/main/java/at/bitfire/vcard4android/BatchOperation.kt b/src/main/java/at/bitfire/vcard4android/BatchOperation.kt
index 1c8b936..0ac1109 100644
--- a/src/main/java/at/bitfire/vcard4android/BatchOperation.kt
+++ b/src/main/java/at/bitfire/vcard4android/BatchOperation.kt
@@ -41,6 +41,11 @@ class BatchOperation(
return this
}
+ /**
+ * Commits all operations from [queue] and then empties the queue.
+ *
+ * @return number of affected rows
+ */
fun commit(): Int {
var affected = 0
if (!queue.isEmpty())