Skip to content

Commit 7809cea

Browse files
authored
fix: make call action receiver private (#493)
The app shouldn't allow third-party apps to accept/end calls.
1 parent 315935f commit 7809cea

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,7 @@
193193
<receiver
194194
android:name=".receivers.CallActionReceiver"
195195
android:enabled="true"
196-
android:exported="true">
197-
<intent-filter>
198-
<action android:name="org.fossify.phone.action.ACCEPT_CALL" />
199-
<action android:name="org.fossify.phone.action.DECLINE_CALL" />
200-
</intent-filter>
201-
</receiver>
196+
android:exported="false" />
202197

203198
<activity-alias
204199
android:name=".activities.SplashActivity.Red"

app/src/main/kotlin/org/fossify/phone/helpers/Constants.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const val ALL_TABS_MASK = TAB_CONTACTS or TAB_FAVORITES or TAB_CALL_HISTORY
2525
val tabsList = arrayListOf(TAB_CONTACTS, TAB_FAVORITES, TAB_CALL_HISTORY)
2626

2727
private const val PATH = "org.fossify.phone.action."
28-
const val ACCEPT_CALL = PATH + "accept_call"
29-
const val DECLINE_CALL = PATH + "decline_call"
28+
const val ACCEPT_CALL = PATH + "ACCEPT_CALL"
29+
const val DECLINE_CALL = PATH + "DECLINE_CALL"
3030

3131
const val DIALPAD_TONE_LENGTH_MS = 150L // The length of DTMF tones in milliseconds

0 commit comments

Comments
 (0)