Skip to content

Commit

Permalink
[Import] [Calls] Don't insert _ID or _COUNT
Browse files Browse the repository at this point in the history
Closes: #63
  • Loading branch information
tmo1 committed Oct 9, 2022
1 parent fd40493 commit 718e8b2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ package com.github.tmo1.sms_ie
import android.content.ContentValues
import android.content.Context
import android.net.Uri
import android.provider.BaseColumns
import android.provider.CallLog
import android.util.JsonReader
import android.util.JsonWriter
Expand Down Expand Up @@ -149,7 +150,11 @@ suspend fun importCallLog(
while (jsonReader.hasNext()) {
val name = jsonReader.nextName()
val value = jsonReader.nextString()
if (callLogColumns.contains(name)) {
if ((callLogColumns.contains(name)) and (name !in setOf(
BaseColumns._ID,
BaseColumns._COUNT
))
) {
callLogMetadata.put(name, value)
}
}
Expand Down

0 comments on commit 718e8b2

Please # to comment.