Skip to content
This repository has been archived by the owner on Jun 22, 2022. It is now read-only.

Commit

Permalink
remove viber fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
lucky committed Feb 16, 2022
1 parent e8001df commit f7bed71
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 16 deletions.
1 change: 0 additions & 1 deletion PRIVACY.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ Threema: https://threema.ch/privacy_policy/
Fallback services:

WhatsApp: https://www.whatsapp.com/privacy
Viber: https://www.viber.com/en/terms/viber-privacy-policy/
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "me.lucky.red"
minSdk 29
targetSdk 32
versionCode 7
versionName "1.0.6"
versionCode 8
versionName "1.0.7"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
14 changes: 5 additions & 9 deletions app/src/main/java/me/lucky/red/CallRedirectionService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,19 @@ import androidx.annotation.RequiresPermission

class CallRedirectionService : CallRedirectionService() {
companion object {
private const val PREFIX = "vnd.android.cursor.item/vnd"
private const val SIGNAL_MIMETYPE = "$PREFIX.org.thoughtcrime.securesms.call"
private const val TELEGRAM_MIMETYPE = "$PREFIX.org.telegram.messenger.android.call"
private const val THREEMA_MIMETYPE = "$PREFIX.ch.threema.app.call"
private const val WHATSAPP_MIMETYPE = "$PREFIX.com.whatsapp.voip.call"
private const val VIBER_MIMETYPE = "$PREFIX.com.viber.voip.call"
private const val PREFIX = "vnd.android.cursor.item"
private const val SIGNAL_MIMETYPE = "$PREFIX/vnd.org.thoughtcrime.securesms.call"
private const val TELEGRAM_MIMETYPE = "$PREFIX/vnd.org.telegram.messenger.android.call"
private const val THREEMA_MIMETYPE = "$PREFIX/vnd.ch.threema.app.call"
private const val WHATSAPP_MIMETYPE = "$PREFIX/vnd.com.whatsapp.voip.call"
private val MIMETYPES = mapOf(
SIGNAL_MIMETYPE to 0,
TELEGRAM_MIMETYPE to 1,
THREEMA_MIMETYPE to 2,
WHATSAPP_MIMETYPE to 48,
VIBER_MIMETYPE to 49,
)
private val FALLBACK_MIMETYPES = arrayOf(
WHATSAPP_MIMETYPE,
VIBER_MIMETYPE,
)
}

Expand Down Expand Up @@ -76,7 +73,6 @@ class CallRedirectionService : CallRedirectionService() {
TELEGRAM_MIMETYPE -> R.string.destination_telegram
THREEMA_MIMETYPE -> R.string.destination_threema
WHATSAPP_MIMETYPE -> R.string.fallback_destination_whatsapp
VIBER_MIMETYPE -> R.string.fallback_destination_viber
else -> return
})
}
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<string name="redirection_delay_description">Задержка до того, как звонок будет перенаправлен.</string>
<string name="popup_position">Позиция всплывающего окна</string>
<string name="fallback">Обратная совместимость</string>
<string name="fallback_description">Перенаправлять в WhatsApp/Viber, если другие недоступны.</string>
<string name="fallback_description">Перенаправлять в WhatsApp, если другие недоступны.</string>
<string name="fallback_destination_whatsapp">WhatsApp</string>
<string name="fallback_destination_viber">Viber</string>
</resources>
3 changes: 1 addition & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<string name="redirection_delay_description">Delay before a call will be redirected.</string>
<string name="popup_position">Popup position</string>
<string name="fallback">Fallback</string>
<string name="fallback_description">Redirect to WhatsApp/Viber if no other available.</string>
<string name="fallback_description">Redirect to WhatsApp if no other available.</string>
<string name="fallback_destination_whatsapp">WhatsApp</string>
<string name="fallback_destination_viber">Viber</string>
</resources>
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/changelogs/8.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
remove viber fallback
Binary file modified fastlane/metadata/android/en-US/images/phoneScreenshots/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f7bed71

Please sign in to comment.