Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
Simple-Sms
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangchengbo
Simple-Sms
Commits
7e41e05b
Commit
7e41e05b
authored
Nov 15, 2024
by
zhangchengbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:添加对系统通话记录查询类
parent
d2ab1d13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
+41
-0
RecentsHelper.kt
...src/main/kotlin/com/secspace/sms/helpers/RecentsHelper.kt
+0
-0
RecentCall.kt
app/src/main/kotlin/com/secspace/sms/models/RecentCall.kt
+41
-0
No files found.
app/src/main/kotlin/com/secspace/sms/helpers/RecentsHelper.kt
0 → 100644
View file @
7e41e05b
This diff is collapsed.
Click to expand it.
app/src/main/kotlin/com/secspace/sms/models/RecentCall.kt
0 → 100644
View file @
7e41e05b
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
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment