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
9465b23a
Commit
9465b23a
authored
Nov 20, 2025
by
zhangchengbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:添加通讯录创建会话[黑名单]检测
parent
b25c542a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
NewConversationActivity.kt
...in/com/secspace/sms/activities/NewConversationActivity.kt
+11
-2
No files found.
app/src/main/kotlin/com/secspace/sms/activities/NewConversationActivity.kt
View file @
9465b23a
...
...
@@ -16,7 +16,6 @@ import com.secspace.sms.extensions.getSuggestedContacts
import
com.secspace.sms.extensions.getThreadId
import
com.secspace.sms.helpers.*
import
com.secspace.sms.messaging.isShortCodeWithLetters
import
com.secspace.sms.util.AES
import
com.simplemobiletools.commons.dialogs.RadioGroupDialog
import
com.simplemobiletools.commons.extensions.*
import
com.simplemobiletools.commons.helpers.*
...
...
@@ -268,6 +267,16 @@ class NewConversationActivity : SimpleActivity() {
// val nameResult: NamePhoto = getNameAndPhotoFromPhoneNumber(phoneNumber)
// Log.d(TAG, "NewConversationActivity--phoneNumber:$phoneNumber threadId:${getThreadId(numbers)} numbers:${numbers} text:$text name = $name ")
//获取黑名单列表
val
blockListNumber
=
getBlockedNumbers
().
map
{
it
.
number
}
if
(
blockListNumber
.
isNotEmpty
()){
Log
.
d
(
TAG
,
"launchThreadActivity: blockPhoneNumber = $number"
)
if
(
blockListNumber
.
contains
(
number
)){
Log
.
d
(
TAG
,
"launchThreadActivity: 该号码已被加入黑名单! "
)
toast
(
msg
=
"该号码已被加入黑名单!"
,
length
=
Toast
.
LENGTH_LONG
)
return
}
}
Intent
(
this
,
ThreadActivity
::
class
.
java
).
apply
{
putExtra
(
THREAD_ID
,
getThreadId
(
numbers
))
...
...
@@ -275,7 +284,7 @@ class NewConversationActivity : SimpleActivity() {
putExtra
(
THREAD_TITLE
,
name
)
}
else
{
val
threadTitle
=
intent
.
getStringExtra
(
THREAD_TITLE
)
//
android.util.
Log.d(TAG, "NewConversationActivity threadTitle = $threadTitle ")
// Log.d(TAG, "NewConversationActivity threadTitle = $threadTitle ")
if
(!
threadTitle
.
isNullOrEmpty
()){
putExtra
(
THREAD_TITLE
,
threadTitle
)
}
...
...
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