Skip to content
Snippets Groups Projects
Commit 35d2974f authored by Kyunglyul Hyun's avatar Kyunglyul Hyun Committed by Gerrit Code Review
Browse files

Merge "Enable a skipped PBAP test" into main

parents 71bdb54d f5563e0d
No related branches found
No related tags found
No related merge requests found
......@@ -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",
......@@ -2219,4 +2219,4 @@
"SUM ICS": {},
"VCP": {}
}
}
\ No newline at end of file
}
......@@ -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.
"""
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment