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
b0bdfbdb
Commit
b0bdfbdb
authored
Mar 04, 2025
by
zhangchengbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修改获取短信列表,去除else错误逻辑执行(else执行无法执行+=Sql语句)
parent
4698b91b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
+3
-12
Context.kt
app/src/main/kotlin/com/secspace/sms/extensions/Context.kt
+3
-12
No files found.
app/src/main/kotlin/com/secspace/sms/extensions/Context.kt
View file @
b0bdfbdb
...
...
@@ -17,7 +17,6 @@ import android.provider.OpenableColumns
import
android.provider.Telephony.*
import
android.telephony.SubscriptionManager
import
android.text.TextUtils
import
android.util.Log
import
com.bumptech.glide.Glide
import
com.bumptech.glide.load.engine.DiskCacheStrategy
import
com.bumptech.glide.request.RequestOptions
...
...
@@ -282,18 +281,10 @@ fun Context.getConversations(threadId: Long? = null, privateContacts: ArrayList<
* 此处因为定制Rom 无法获取短信列表,非定制Rom一切正常可以获取短信列表
* 荣耀官方建议: 去除占位符操作(selectionArgs 传 null),将值直接追加在SQL查询语句后
*/
var
selection
=
""
Log
.
d
(
"shuju"
,
"getConversations: threadId = $threadId"
)
// var selectionArgs = arrayOf("")
if
(
threadId
!=
null
)
{
Log
.
d
(
"shuju"
,
"getConversations: threadId != null threadId = $threadId"
)
selection
+=
" AND ${Threads._ID} = $threadId"
// selectionArgs = arrayOf("0", threadId.toString())
}
else
{
//获取全部短信列表
selection
=
"${Threads.MESSAGE_COUNT} > 0"
var
selection
=
"${Threads.MESSAGE_COUNT} > 0"
threadId
?.
let
{
selection
+=
" AND ${Threads._ID} = $it"
}
val
sortOrder
=
"${Threads.DATE} DESC"
val
conversations
=
ArrayList
<
Conversation
>()
...
...
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