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
52a43534
Commit
52a43534
authored
Jun 16, 2025
by
zhangchengbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:添加呼叫直接拨打电话
parent
9f95a89f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
Activity.kt
...tlin/com/simplemobiletools/commons/extensions/Activity.kt
+5
-6
No files found.
commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Activity.kt
View file @
52a43534
...
...
@@ -43,6 +43,7 @@ import com.simplemobiletools.commons.dialogs.WritePermissionDialog.WritePermissi
import
com.simplemobiletools.commons.helpers.*
import
com.simplemobiletools.commons.models.*
import
com.simplemobiletools.commons.views.MyTextView
import
freemarker.template.utility.Constants
import
java.io.*
import
java.util.TreeSet
...
...
@@ -538,9 +539,7 @@ fun Activity.launchViewContactIntent(uri: Uri) {
}
fun
BaseSimpleActivity
.
launchCallIntent
(
recipient
:
String
,
handle
:
PhoneAccountHandle
?
=
null
)
{
handlePermission
(
PERMISSION_CALL_PHONE
)
{
val
action
=
if
(
it
)
Intent
.
ACTION_CALL
else
Intent
.
ACTION_DIAL
Intent
(
action
).
apply
{
Intent
(
Intent
.
ACTION_CALL
).
apply
{
this
.
data
=
Uri
.
fromParts
(
"tel"
,
recipient
,
null
)
if
(
handle
!=
null
)
{
...
...
@@ -548,18 +547,18 @@ fun BaseSimpleActivity.launchCallIntent(recipient: String, handle: PhoneAccountH
}
if
(
isDefaultDialer
())
{
val
packageName
=
"com.secspace.dialer"
val
className
=
"com.secspace.dialer.activities.DialerActivity"
val
packageName
=
Const
.
PACKAGE_DIALER
val
className
=
Const
.
PACKAGE_DIALER_ACTIVITY
this
.
setClassName
(
packageName
,
className
)
}
launchActivityIntent
(
this
)
}
}
}
fun
Activity
.
launchSendSMSIntent
(
recipient
:
String
)
{
Intent
(
Intent
.
ACTION_SENDTO
).
apply
{
data
=
Uri
.
fromParts
(
"smsto"
,
recipient
,
null
)
putExtra
(
Const
.
THREAD_TITLE
,
recipient
)
launchActivityIntent
(
this
)
}
}
...
...
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