diff --git a/README.md b/README.md index e8cffaf..a04deb5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- Pulse Icon + Logo

@@ -10,15 +10,6 @@ Tiny app to redirect outgoing calls to Signal/Telegram/Threema/Whatsapp.

---- - -

- - Download on IzzyOnDroid - -

- - ---

@@ -27,11 +18,11 @@ Tiny app to redirect outgoing calls to Signal/Telegram/Threema/Whatsapp.

- Main screen + Main screen      - Redirecting popup + Redirecting popup

diff --git a/app/build.gradle b/app/build.gradle index 0637905..9e5deb2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,8 +11,8 @@ android { applicationId = "partisan.weforge.xyz.pulse" minSdk = 29 targetSdk = 34 - versionCode = 12 - versionName = "1.4.0" + versionCode = 10 + versionName = "1.3.1" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/src/main/java/partisan/weforge/xyz/pulse/PopupWindow.kt b/app/src/main/java/partisan/weforge/xyz/pulse/PopupWindow.kt index d5f4aa1..835f2ab 100644 --- a/app/src/main/java/partisan/weforge/xyz/pulse/PopupWindow.kt +++ b/app/src/main/java/partisan/weforge/xyz/pulse/PopupWindow.kt @@ -9,24 +9,21 @@ import android.net.Uri import android.view.Gravity import android.view.LayoutInflater import android.view.WindowManager -import android.view.ContextThemeWrapper import android.widget.TextView -import android.animation.ObjectAnimator -import android.widget.ProgressBar import androidx.annotation.RequiresPermission import java.lang.ref.WeakReference import java.util.* import kotlin.concurrent.timerTask class PopupWindow( - ctx: Context, + private val ctx: Context, private val service: WeakReference?, ) { - private val themedCtx = ContextThemeWrapper(ctx, R.style.Theme_Pulse) - private val prefs = Preferences(themedCtx) - private val windowManager = themedCtx.getSystemService(WindowManager::class.java) - private val audioManager = themedCtx.getSystemService(AudioManager::class.java) - private val view = LayoutInflater.from(themedCtx).inflate(R.layout.popup, null) + private val prefs = Preferences(ctx) + private val windowManager = ctx.getSystemService(WindowManager::class.java) + private val audioManager = ctx.getSystemService(AudioManager::class.java) + @Suppress("InflateParams") + private val view = LayoutInflater.from(ctx).inflate(R.layout.popup, null) private val layoutParams = WindowManager.LayoutParams().apply { format = PixelFormat.TRANSLUCENT flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE @@ -48,7 +45,7 @@ class PopupWindow( fun preview() { remove() layoutParams.y = prefs.popupPosition - val destinations = listOf( + val destinations = mutableListOf( R.string.destination_signal, R.string.destination_telegram, R.string.destination_threema, @@ -83,7 +80,6 @@ class PopupWindow( service.cancelCall() }, prefs.redirectionDelay) setDescription(destinationId) - startProgressAnimation(prefs.redirectionDelay) if (!add()) { timer?.cancel() service.placeCallUnmodified() @@ -91,46 +87,33 @@ class PopupWindow( } private fun setDescription(id: Int) { - view.findViewById(R.id.description).text = themedCtx.getString( + view.findViewById(R.id.description).text = ctx.getString( R.string.popup, - themedCtx.getString(id), + ctx.getString(id), ) } - private fun startProgressAnimation(duration: Long) { - val bar = view.findViewById(R.id.progress) - bar.max = 100 - bar.progress = 0 - val animator = ObjectAnimator.ofInt(bar, "progress", 100) - animator.duration = duration - animator.start() - } - @RequiresPermission(Manifest.permission.CALL_PHONE) private fun call(data: Uri) { - Intent(Intent.ACTION_VIEW).apply { - this.data = data - flags = Intent.FLAG_ACTIVITY_NEW_TASK - themedCtx.startActivity(this) + Intent(Intent.ACTION_VIEW).let { + it.data = data + it.flags = Intent.FLAG_ACTIVITY_NEW_TASK + ctx.startActivity(it) } } private fun add(): Boolean { try { windowManager?.addView(view, layoutParams) - } catch (exc: WindowManager.BadTokenException) { - return false - } + } catch (exc: WindowManager.BadTokenException) { return false } return true } private fun remove(): Boolean { try { windowManager?.removeView(view) - } catch (_: IllegalArgumentException) { - } catch (_: WindowManager.BadTokenException) { - return false - } + } catch (exc: IllegalArgumentException) { + } catch (exc: WindowManager.BadTokenException) { return false } return true } diff --git a/app/src/main/res/drawable/progress_drawable.xml b/app/src/main/res/drawable/progress_drawable.xml deleted file mode 100644 index 8349831..0000000 --- a/app/src/main/res/drawable/progress_drawable.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/popup.xml b/app/src/main/res/layout/popup.xml index 1b46631..6035cbb 100644 --- a/app/src/main/res/layout/popup.xml +++ b/app/src/main/res/layout/popup.xml @@ -1,41 +1,19 @@ - + app:cardBackgroundColor="?attr/colorSurface"> - - - - - - + android:padding="16dp" + android:textColor="?attr/colorOnSurface" + android:textSize="16sp" + android:textAppearance="?attr/textAppearanceBodyMedium" + android:textAlignment="center" /> diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index ad74a04..3e4e33f 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -7,9 +7,6 @@ @color/teal_200 @color/black - - @color/white - @color/black - @style/TextAppearance.Material3.BodyMedium + \ No newline at end of file diff --git a/data/IzzyOnDroidButton.svg b/data/IzzyOnDroidButton.svg deleted file mode 100644 index 64cf6af..0000000 --- a/data/IzzyOnDroidButton.svg +++ /dev/null @@ -1,75 +0,0 @@ - -IzzyOnDroid ButtonGET IT ON - - -IzzyOnDroid - - -image/svg+xmlIzzyOnDroid ButtonIzzy, Wolfshappen \ No newline at end of file diff --git a/data/icon_appstore.png b/data/icon_appstore.png index cedd458..271fb9f 100644 Binary files a/data/icon_appstore.png and b/data/icon_appstore.png differ diff --git a/data/icon_appstore.svg b/data/icon_appstore.svg index 4b1375c..5a25a11 100644 --- a/data/icon_appstore.svg +++ b/data/icon_appstore.svg @@ -1,197 +1,58 @@ - - - - - - - + + + + + + - + - - - Star + + + Star - - Star + + Star - - Star + + Star - - Star + + Star - - Star + + Star - - Star + + Star - - Star + + Star - - Star + + Star - - Star + + Star - - Star + + Star - - + + - - + + - - Star + + Star - - Star + + Star - - Star + + Star - - Star - - - Star - - - Star - - + \ No newline at end of file diff --git a/data/screenshot-redirecting.png b/data/screenshot-redirecting.png index c4df362..8054120 100644 Binary files a/data/screenshot-redirecting.png and b/data/screenshot-redirecting.png differ diff --git a/data/screenshot.png b/data/screenshot.png index 92a3059..4107576 100644 Binary files a/data/screenshot.png and b/data/screenshot.png differ diff --git a/fastlane/metadata/android/en-US/changelogs/14.txt b/fastlane/metadata/android/en-US/changelogs/14.txt deleted file mode 100644 index 01c603f..0000000 --- a/fastlane/metadata/android/en-US/changelogs/14.txt +++ /dev/null @@ -1 +0,0 @@ -Fixed crash related to redirect popup \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/images/icon.png b/fastlane/metadata/android/en-US/images/icon.png index cedd458..271fb9f 100644 Binary files a/fastlane/metadata/android/en-US/images/icon.png and b/fastlane/metadata/android/en-US/images/icon.png differ