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
387f1818
Commit
387f1818
authored
Feb 10, 2026
by
zhangchengbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:移除isPhoneNumber判断条件,
parent
0b271619
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
SmsReceiver.kt
...src/main/kotlin/com/secspace/sms/receivers/SmsReceiver.kt
+8
-4
No files found.
app/src/main/kotlin/com/secspace/sms/receivers/SmsReceiver.kt
View file @
387f1818
...
@@ -35,6 +35,9 @@ import com.simplemobiletools.commons.models.PhoneNumber
...
@@ -35,6 +35,9 @@ import com.simplemobiletools.commons.models.PhoneNumber
import
com.simplemobiletools.commons.models.SimpleContact
import
com.simplemobiletools.commons.models.SimpleContact
import
com.simplemobiletools.commons.util.GsonUtil
import
com.simplemobiletools.commons.util.GsonUtil
/**
* 短信接收
*/
class
SmsReceiver
:
BroadcastReceiver
()
{
class
SmsReceiver
:
BroadcastReceiver
()
{
private
val
TAG
:
String
=
"SmsReceiver"
private
val
TAG
:
String
=
"SmsReceiver"
...
@@ -186,7 +189,7 @@ class SmsReceiver : BroadcastReceiver() {
...
@@ -186,7 +189,7 @@ class SmsReceiver : BroadcastReceiver() {
if
(!
PhoneFromUtil
.
isNumeric
(
conversation
.
userName
))
{
if
(!
PhoneFromUtil
.
isNumeric
(
conversation
.
userName
))
{
notificationUserName
=
conversation
.
userName
notificationUserName
=
conversation
.
userName
}
}
if
(
!
aesPhoneNumber
.
isPhoneNumber
()
||
aesPhoneNumber
.
contains
(
"*"
)
||
body
.
contains
(
"\u200B"
)
)
{
if
(
aesPhoneNumber
.
contains
(
"*"
)
||
body
.
contains
(
"\u200B"
)
)
{
conversation
.
title
=
aesPhoneNumber
conversation
.
title
=
aesPhoneNumber
conversation
.
isSFNumber
=
true
conversation
.
isSFNumber
=
true
}
}
...
@@ -229,12 +232,13 @@ class SmsReceiver : BroadcastReceiver() {
...
@@ -229,12 +232,13 @@ class SmsReceiver : BroadcastReceiver() {
refreshMessages
()
refreshMessages
()
Log
.
d
(
Log
.
d
(
TAG
,
TAG
,
"handleMessage: notificationUserName = $notificationUserName
aesPhoneNumber = $aesPhoneNumber
address = $address threadId = $threadId"
"handleMessage: notificationUserName = $notificationUserName
掩码号码 aesPhoneNumber = $aesPhoneNumber 正常号码
address = $address threadId = $threadId"
)
)
if
(
notificationUserName
.
isNotEmpty
())
{
if
(
notificationUserName
.
isNotEmpty
())
{
context
.
showReceivedMessageNotification
(
newMessageId
,
notificationUserName
,
body
,
threadId
,
bitmap
)
context
.
showReceivedMessageNotification
(
newMessageId
,
notificationUserName
,
body
,
threadId
,
bitmap
)
}
else
if
(!
aesPhoneNumber
.
isPhoneNumber
()
||
aesPhoneNumber
.
contains
(
"*"
))
{
}
else
if
(
aesPhoneNumber
.
contains
(
"*"
))
{
context
.
showReceivedMessageNotification
(
newMessageId
,
aesPhoneNumber
,
body
,
threadId
,
bitmap
)
Log
.
d
(
TAG
,
"handleMessage: 掩码号码"
)
context
.
showReceivedMessageNotification
(
newMessageId
,
aesPhoneNumber
,
body
,
threadId
,
bitmap
,
normalNumber
=
address
)
}
else
{
}
else
{
context
.
showReceivedMessageNotification
(
newMessageId
,
address
,
body
,
threadId
,
bitmap
)
context
.
showReceivedMessageNotification
(
newMessageId
,
address
,
body
,
threadId
,
bitmap
)
}
}
...
...
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