|
@@ -14,7 +14,7 @@ import com.xplora.contactprovider.dao.ContactInfo
|
|
|
|
|
|
class WatchContactProvider : ContentProvider() {
|
|
|
companion object {
|
|
|
- private const val AUTHORITIES = "com.xplora.WatchChatProvider"
|
|
|
+ private const val AUTHORITIES = "com.xplora.WatchContactProvider"
|
|
|
const val CONTACT_DIR = 0
|
|
|
const val CONTACT_ITEM = 1
|
|
|
|
|
@@ -34,7 +34,7 @@ class WatchContactProvider : ContentProvider() {
|
|
|
db = Room.databaseBuilder(it, ContactDatabase::class.java, TABLE_NAME_CONTACT)
|
|
|
.build()
|
|
|
|
|
|
- val contentValues1 = ContentValues()
|
|
|
+/* val contentValues1 = ContentValues()
|
|
|
contentValues1.put("id", "1")
|
|
|
contentValues1.put("userId", "4e6f7g8h")
|
|
|
contentValues1.put("name", "test_Guardian_1")
|
|
@@ -42,7 +42,7 @@ class WatchContactProvider : ContentProvider() {
|
|
|
contentValues1.put("countryPN", "+86")
|
|
|
contentValues1.put("sim", 2)
|
|
|
contentValues1.put("type", 1)
|
|
|
- insert(Uri.parse("content://com.xplora.WatchCommonProvider/contact"), contentValues1)
|
|
|
+ insert(Uri.parse("content://com.xplora.WatchContactProvider/contact"), contentValues1)
|
|
|
|
|
|
val contentValues2 = ContentValues()
|
|
|
contentValues2.put("id", "2")
|
|
@@ -52,7 +52,7 @@ class WatchContactProvider : ContentProvider() {
|
|
|
contentValues2.put("countryPN", "+1")
|
|
|
contentValues2.put("sim", 1)
|
|
|
contentValues2.put("type", 2)
|
|
|
- insert(Uri.parse("content://com.xplora.WatchCommonProvider/contact"), contentValues2)
|
|
|
+ insert(Uri.parse("content://com.xplora.WatchContactProvider/contact"), contentValues2)
|
|
|
|
|
|
val contentValues3 = ContentValues()
|
|
|
contentValues3.put("name", "test_General")
|
|
@@ -60,7 +60,7 @@ class WatchContactProvider : ContentProvider() {
|
|
|
contentValues3.put("countryPN", "+66")
|
|
|
contentValues3.put("sim", 2)
|
|
|
contentValues3.put("type", 3)
|
|
|
- insert(Uri.parse("content://com.xplora.WatchCommonProvider/contact"), contentValues3)
|
|
|
+ insert(Uri.parse("content://com.xplora.WatchContactProvider/contact"), contentValues3)
|
|
|
|
|
|
val contentValues4 = ContentValues()
|
|
|
contentValues2.put("userId", "xxxxpppp")
|
|
@@ -69,7 +69,7 @@ class WatchContactProvider : ContentProvider() {
|
|
|
contentValues4.put("countryPN", "+886")
|
|
|
contentValues4.put("sim", 2)
|
|
|
contentValues4.put("type", 4)
|
|
|
- insert(Uri.parse("content://com.xplora.WatchCommonProvider/contact"), contentValues4)
|
|
|
+ insert(Uri.parse("content://com.xplora.WatchContactProvider/contact"), contentValues4)*/
|
|
|
true
|
|
|
} ?: false
|
|
|
|