Pulse no longer shows popup if disallowed by system
This commit is contained in:
parent
660637626e
commit
09de3785b9
5 changed files with 17 additions and 21 deletions
|
@ -94,12 +94,6 @@ class CallRedirectionService : CallRedirectionService() {
|
|||
return
|
||||
}
|
||||
|
||||
if (!allowInteractiveResponse) {
|
||||
Log.d("Redirection", "Aborting: interactive response not allowed by system")
|
||||
placeCallUnmodified()
|
||||
return
|
||||
}
|
||||
|
||||
if (prefs.redirectIfRoaming && !isOutsideHomeCountry()) {
|
||||
Log.d("Redirection", "Aborting: redirect only while roaming, but we're inside home country")
|
||||
placeCallUnmodified()
|
||||
|
@ -146,7 +140,9 @@ class CallRedirectionService : CallRedirectionService() {
|
|||
|
||||
Log.d("Redirection", "Redirecting call to: ${record.mimetype} → ${record.uri}")
|
||||
|
||||
if (prefs.popupEnabled) {
|
||||
Log.d("Redirection", "Popup ${if (allowInteractiveResponse) "allowed" else "not allowed"} by system; ${if (prefs.popupEnabled) "enabled" else "disabled"} in prefs")
|
||||
|
||||
if (allowInteractiveResponse && prefs.popupEnabled) {
|
||||
window.show(record.uri, MIMETYPE_TO_DST_NAME[record.mimetype] ?: return)
|
||||
} else {
|
||||
window.call(record.uri)
|
||||
|
|
|
@ -51,8 +51,8 @@ class MainFragment : Fragment() {
|
|||
emitter =
|
||||
Emitter(duration = 100, TimeUnit.MILLISECONDS)
|
||||
.perSecond(100),
|
||||
speed = 30f,
|
||||
maxSpeed = 40f,
|
||||
speed = 25f,
|
||||
maxSpeed = 30f,
|
||||
damping = 0.85f,
|
||||
spread = 360,
|
||||
position = Position.Relative(0.5, 0.5)
|
||||
|
|
|
@ -38,8 +38,8 @@ class Preferences(private val context: Context) {
|
|||
val isEnabled: Boolean
|
||||
get() = isServiceEnabledByUser &&
|
||||
hasGeneralPermissions(context) &&
|
||||
hasDrawOverlays(context) &&
|
||||
hasCallRedirectionRole(context)
|
||||
hasCallRedirectionRole(context) &&
|
||||
(popupEnabled.not() || hasDrawOverlays(context))
|
||||
|
||||
enum class PopupEffect {
|
||||
NONE, FADE, SCALE, BOUNCE, FLOP, MATRIX, SLIDE_SNAP, GAMER_MODE, RANDOM
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue