Commit 7e41e05b by zhangchengbo

fix:添加对系统通话记录查询类

parent d2ab1d13
package com.secspace.sms.models
import android.os.Parcelable
import android.telephony.PhoneNumberUtils
import androidx.annotation.Keep
import com.simplemobiletools.commons.extensions.normalizePhoneNumber
import kotlinx.parcelize.Parcelize
/**
* Used at displaying recent calls.
* For contacts with multiple numbers specify the number and type
*/
@Keep
@kotlinx.serialization.Serializable
@Parcelize
data class RecentCall(
val id: Int,
val phoneNumber: String,
val name: String,
val photoUri: String,
val startTS: Int,
val duration: Int,
val type: Int,
val neighbourIDs: MutableList<Int>,
val simID: Int,
val specificNumber: String,
val specificType: String,
val isUnknownNumber: Boolean,
var isShunFeng: Boolean,
var sfNumber: String,
var isExport: Boolean = false,//是否已经导出过该条记录
var isHidePhoneNumber :Boolean = false//相同号码是否同步掩码
) : Parcelable {
fun doesContainPhoneNumber(text: String): Boolean {
val normalizedText = text.normalizePhoneNumber()
return PhoneNumberUtils.compare(phoneNumber.normalizePhoneNumber(), normalizedText) ||
phoneNumber.contains(text) ||
phoneNumber.normalizePhoneNumber().contains(normalizedText) ||
phoneNumber.contains(normalizedText)
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment