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

Commit a435c720 authored by Kyunglyul Hyun's avatar Kyunglyul Hyun Committed by Automerger Merge Worker
Browse files

Merge "Enable a skipped PBAP test" into main am: 35d2974f

parents 80e1f6a8 35d2974f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -550,6 +550,7 @@
    "PBAP/PSE/GOEP/SRM/BI-03-C",
    "PBAP/PSE/GOEP/SRM/BI-05-C",
    "PBAP/PSE/GOEP/SRM/BV-08-C",
    "PBAP/PSE/GOEP/SRMP/BI-02-C",
    "PBAP/PSE/GOEP/SRMP/BV-02-C",
    "PBAP/PSE/PBB/BI-01-C",
    "PBAP/PSE/PBB/BI-07-C",
@@ -994,7 +995,6 @@
    "PAN/NAP/MISC/UUID/BV-02-C",
    "PAN/PANU/IP/APP/BV-04-I",
    "PAN/PANU/IPv4/AUTONET/BV-01-I",
    "PBAP/PSE/GOEP/SRMP/BI-02-C",
    "PBAP/PSE/SSM/BV-07-C",
    "RFCOMM/DEVA-DEVB/RFC/BV-21-C",
    "RFCOMM/DEVA-DEVB/RFC/BV-22-C",
+16 −0
Original line number Diff line number Diff line
@@ -94,6 +94,7 @@ class Pbap(val context: Context) : PBAPImplBase(), Closeable {
        val displayName = String.format(DEFAULT_DISPLAY_NAME, contactIndex)
        val phoneNumber = generatePhoneNumber(PHONE_NUM_LENGTH)
        val emailID = String.format(DEFAULT_EMAIL_ID, contactIndex)
        val note = String.format(DEFAULT_NOTE, contactIndex)

        val rawContactInsertIndex = operations.size
        operations.add(
@@ -129,6 +130,14 @@ class Pbap(val context: Context) : PBAPImplBase(), Closeable {
                .build()
        )

        operations.add(
            ContentProviderOperation.newInsert(Data.CONTENT_URI)
                .withValueBackReference(Data.RAW_CONTACT_ID, rawContactInsertIndex)
                .withValue(Data.MIMETYPE, Note.CONTENT_ITEM_TYPE)
                .withValue(Note.NOTE, note)
                .build()
        )

        context.getContentResolver().applyBatch(ContactsContract.AUTHORITY, operations)
    }

@@ -146,5 +155,12 @@ class Pbap(val context: Context) : PBAPImplBase(), Closeable {
        const val DEFAULT_EMAIL_ID = "user%d@example.com"
        const val CONTACT_LIST_SIZE = 125
        const val PHONE_NUM_LENGTH = 10
        const val DEFAULT_NOTE =
            """
                %d Lorem ipsum dolor sit amet, consectetur adipiscing elit.
                Vivamus condimentum rhoncus est volutpat venenatis.
                Fusce semper, sapien ut venenatis pellentesque,
                lorem dui aliquam sapien, non pharetra diam neque id mi.
            """
    }
}