|
@@ -33,43 +33,6 @@ class WatchContactProvider : ContentProvider() {
|
|
|
override fun onCreate() = context?.let {
|
|
|
db = Room.databaseBuilder(it, ContactDatabase::class.java, TABLE_NAME_CONTACT)
|
|
|
.build()
|
|
|
-
|
|
|
-/* val contentValues1 = ContentValues()
|
|
|
- contentValues1.put("id", "1")
|
|
|
- contentValues1.put("userId", "4e6f7g8h")
|
|
|
- contentValues1.put("name", "test_Guardian_1")
|
|
|
- contentValues1.put("phoneNumber", "13500000000")
|
|
|
- contentValues1.put("countryPN", "+86")
|
|
|
- contentValues1.put("sim", 2)
|
|
|
- contentValues1.put("type", 1)
|
|
|
- insert(Uri.parse("content://com.xplora.WatchContactProvider/contact"), contentValues1)
|
|
|
-
|
|
|
- val contentValues2 = ContentValues()
|
|
|
- contentValues2.put("id", "2")
|
|
|
- contentValues2.put("userId", "f8f9f0f1f2")
|
|
|
- contentValues2.put("name", "test_Guardian_2")
|
|
|
- contentValues2.put("phoneNumber", "13500000001")
|
|
|
- contentValues2.put("countryPN", "+1")
|
|
|
- contentValues2.put("sim", 1)
|
|
|
- contentValues2.put("type", 2)
|
|
|
- insert(Uri.parse("content://com.xplora.WatchContactProvider/contact"), contentValues2)
|
|
|
-
|
|
|
- val contentValues3 = ContentValues()
|
|
|
- contentValues3.put("name", "test_General")
|
|
|
- contentValues3.put("phoneNumber", "13500000002")
|
|
|
- contentValues3.put("countryPN", "+66")
|
|
|
- contentValues3.put("sim", 2)
|
|
|
- contentValues3.put("type", 3)
|
|
|
- insert(Uri.parse("content://com.xplora.WatchContactProvider/contact"), contentValues3)
|
|
|
-
|
|
|
- val contentValues4 = ContentValues()
|
|
|
- contentValues2.put("userId", "xxxxpppp")
|
|
|
- contentValues4.put("name", "test_Friend")
|
|
|
- contentValues4.put("phoneNumber", "13500000003")
|
|
|
- contentValues4.put("countryPN", "+886")
|
|
|
- contentValues4.put("sim", 2)
|
|
|
- contentValues4.put("type", 4)
|
|
|
- insert(Uri.parse("content://com.xplora.WatchContactProvider/contact"), contentValues4)*/
|
|
|
true
|
|
|
} ?: false
|
|
|
|