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
da3764c3
Commit
da3764c3
authored
Jan 03, 2025
by
zhangchengbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:替换通讯录App包名
parent
f381a2da
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+1
-2
Activity.kt
app/src/main/kotlin/com/secspace/sms/extensions/Activity.kt
+4
-4
Context.kt
...otlin/com/simplemobiletools/commons/extensions/Context.kt
+2
-2
No files found.
app/src/main/AndroidManifest.xml
View file @
da3764c3
...
...
@@ -28,8 +28,7 @@
tools:node=
"remove"
/>
<queries>
<package
android:name=
"com.simplemobiletools.contacts.pro.debug"
/>
<package
android:name=
"com.simplemobiletools.contacts.pro"
/>
<package
android:name=
"com.secspace.contacts"
/>
</queries>
<uses-feature
android:name=
"android.hardware.telephony"
/>
...
...
app/src/main/kotlin/com/secspace/sms/extensions/Activity.kt
View file @
da3764c3
...
...
@@ -52,16 +52,16 @@ fun Activity.launchViewIntent(uri: Uri, mimetype: String, filename: String) {
}
fun
Activity
.
startContactDetailsIntent
(
contact
:
SimpleContact
)
{
val
simpleContacts
=
"com.simplemobiletools.contacts.pro"
val
simpleContactsDebug
=
"com.simplemobiletools.contacts.pro.debug"
val
simpleContacts
=
"com.secspace.contacts"
if
(
contact
.
rawId
>
1000000
&&
contact
.
contactId
>
1000000
&&
contact
.
rawId
==
contact
.
contactId
&&
(
isPackageInstalled
(
simpleContacts
)
||
isPackageInstalled
(
simpleContactsDebug
)
)
(
isPackageInstalled
(
simpleContacts
))
)
{
Intent
().
apply
{
action
=
Intent
.
ACTION_VIEW
putExtra
(
CONTACT_ID
,
contact
.
rawId
)
putExtra
(
IS_PRIVATE
,
true
)
setPackage
(
if
(
isPackageInstalled
(
simpleContacts
))
simpleContacts
else
simpleContactsDebug
)
if
(
isPackageInstalled
(
simpleContacts
))
setPackage
(
simpleContacts
)
setDataAndType
(
ContactsContract
.
Contacts
.
CONTENT_LOOKUP_URI
,
"vnd.android.cursor.dir/person"
)
launchActivityIntent
(
this
)
}
...
...
commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context.kt
View file @
da3764c3
...
...
@@ -1005,9 +1005,9 @@ fun Context.getCornerRadius() = resources.getDimension(R.dimen.rounded_corner_ra
// we need the Default Dialer functionality only in Simple Dialer and in Simple Contacts for now
fun
Context
.
isDefaultDialer
():
Boolean
{
return
if
(!
packageName
.
startsWith
(
"com.s
implemobiletools.contacts"
)
&&
!
packageName
.
startsWith
(
"com.simplemobiletools
.dialer"
))
{
return
if
(!
packageName
.
startsWith
(
"com.s
ecspace.contacts"
)
&&
!
packageName
.
startsWith
(
"com.secspace
.dialer"
))
{
true
}
else
if
((
packageName
.
startsWith
(
"com.s
implemobiletools.contacts"
)
||
packageName
.
startsWith
(
"com.simplemobiletools
.dialer"
))
&&
isQPlus
())
{
}
else
if
((
packageName
.
startsWith
(
"com.s
ecspace.contacts"
)
||
packageName
.
startsWith
(
"com.secspace
.dialer"
))
&&
isQPlus
())
{
val
roleManager
=
getSystemService
(
RoleManager
::
class
.
java
)
roleManager
!!
.
isRoleAvailable
(
RoleManager
.
ROLE_DIALER
)
&&
roleManager
.
isRoleHeld
(
RoleManager
.
ROLE_DIALER
)
}
else
{
...
...
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