Skip to content

Commit 718e8b2

Browse files
committed
[Import] [Calls] Don't insert _ID or _COUNT
Closes: #63
1 parent fd40493 commit 718e8b2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/src/main/java/com/github/tmo1/sms_ie/ImportExportCallLog.kt

+6-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ package com.github.tmo1.sms_ie
2525
import android.content.ContentValues
2626
import android.content.Context
2727
import android.net.Uri
28+
import android.provider.BaseColumns
2829
import android.provider.CallLog
2930
import android.util.JsonReader
3031
import android.util.JsonWriter
@@ -149,7 +150,11 @@ suspend fun importCallLog(
149150
while (jsonReader.hasNext()) {
150151
val name = jsonReader.nextName()
151152
val value = jsonReader.nextString()
152-
if (callLogColumns.contains(name)) {
153+
if ((callLogColumns.contains(name)) and (name !in setOf(
154+
BaseColumns._ID,
155+
BaseColumns._COUNT
156+
))
157+
) {
153158
callLogMetadata.put(name, value)
154159
}
155160
}

0 commit comments

Comments
 (0)