Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8fb6bec authored by Ricki Hirner's avatar Ricki Hirner
Browse files

Fix Room crash and group processing performance problem

parent f7eea633
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ dependencies {
    implementation 'com.google.android.flexbox:flexbox:3.0.0'
    implementation 'com.google.android.material:material:1.4.0'

    def room_version = '2.4.0-alpha05'
    def room_version = '2.4.0-alpha04'          // 2.4.0-alpha05 crashes because of paging problem
    implementation "androidx.room:room-runtime:$room_version"
    implementation "androidx.room:room-ktx:$room_version"
    implementation "androidx.room:room-paging:$room_version"
+18 −0
Original line number Diff line number Diff line
@@ -215,6 +215,24 @@ class LocalGroupTest {
    }


    @Test
    fun testMarkMembersDirty() {
        val ab = addressBookGroupsAsCategories
        val group = newGroup(ab)

        val contact1 = LocalContact(ab, Contact().apply { displayName = "Test" }, "fn.vcf", null, 0)
        contact1.add()

        val batch = BatchOperation(ab.provider!!)
        contact1.addToGroup(batch, group.id!!)
        batch.commit()

        assertEquals(0, ab.findDirty().size)
        group.markMembersDirty()
        assertEquals(contact1.id, ab.findDirty().first().id)
    }


    @Test
    fun testPrepareForUpload() {
        val group = newGroup()
+3 −12
Original line number Diff line number Diff line
package at.bitfire.davdroid.syncadapter

import android.net.Uri
import at.bitfire.davdroid.resource.LocalResource

class LocalTestResource: LocalResource<Any> {
@@ -28,16 +27,8 @@ class LocalTestResource: LocalResource<Any> {
        this.flags = flags
    }

    override fun add(): Uri {
        TODO("Not yet implemented")
    }

    override fun update(data: Any): Uri {
        TODO("Not yet implemented")
    }

    override fun delete(): Int {
        TODO("Not yet implemented")
    }
    override fun add() = throw NotImplementedError()
    override fun update(data: Any) = throw NotImplementedError()
    override fun delete() = throw NotImplementedError()

}
 No newline at end of file
+2 −3
Original line number Diff line number Diff line
@@ -93,8 +93,7 @@ class TestSyncManager(
    override fun postProcess() {
    }

    override fun notifyInvalidResourceTitle(): String {
        TODO("Not yet implemented")
    }
    override fun notifyInvalidResourceTitle() =
        throw NotImplementedError()

}
 No newline at end of file
+0 −3
Original line number Diff line number Diff line
@@ -35,8 +35,6 @@ class AccountsActivityEspressoTest {
    private val password = "test"
    private val baseUrl = "https://davtest.dev001.net/radicale/htpasswd/"

    // FIXME should work
    /*
    @Test
    fun accountsActivityTest() {
        skipIntroActivity()
@@ -93,7 +91,6 @@ class AccountsActivityEspressoTest {
        // doublecheck to make sure that the account doesn't exist anymore. The welcome text is displayed
        onView(withText(R.string.account_list_empty)).check(matches(withText(R.string.account_list_empty)))
    }
    */

    @Test
    fun menuDrawerTest() {
Loading