diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index b8543bc29..1b4b9954f 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -241,6 +241,70 @@
android:resource="@xml/provider_paths" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/org/linphone/ui/GenericActivity.kt b/app/src/main/java/org/linphone/ui/GenericActivity.kt
index 5ab9172a9..716c986c8 100644
--- a/app/src/main/java/org/linphone/ui/GenericActivity.kt
+++ b/app/src/main/java/org/linphone/ui/GenericActivity.kt
@@ -20,6 +20,8 @@
package org.linphone.ui
import android.annotation.SuppressLint
+import android.content.ComponentName
+import android.content.pm.PackageManager
import android.content.res.Configuration
import android.content.res.Resources
import android.os.Bundle
@@ -88,6 +90,8 @@ open class GenericActivity : AppCompatActivity() {
}
}
+ enableDisableLaunchersToKeepOnlyOneMatchingTheme()
+
super.onCreate(savedInstanceState)
}
@@ -247,4 +251,27 @@ open class GenericActivity : AppCompatActivity() {
}
}
}
+
+ private fun enableDisableLaunchersToKeepOnlyOneMatchingTheme() {
+ val currentTheme = corePreferences.themeMainColor
+
+ val supportedThemes = arrayListOf>(
+ Pair("org.linphone.ui.main.MainActivity", "orange"),
+ Pair("org.linphone.ui.main.MainActivityBlue", "blue"),
+ )
+ for (theme in supportedThemes) {
+ val componentName = theme.first
+ val color = theme.second
+
+ packageManager.setComponentEnabledSetting(
+ ComponentName(this, componentName),
+ if (currentTheme == color) {
+ PackageManager.COMPONENT_ENABLED_STATE_ENABLED
+ } else {
+ PackageManager.COMPONENT_ENABLED_STATE_DISABLED
+ },
+ PackageManager.DONT_KILL_APP
+ )
+ }
+ }
}
diff --git a/app/src/main/res/mipmap-anydpi/ic_launcher_blue.xml b/app/src/main/res/mipmap-anydpi/ic_launcher_blue.xml
new file mode 100644
index 000000000..7d0457cce
--- /dev/null
+++ b/app/src/main/res/mipmap-anydpi/ic_launcher_blue.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi/ic_launcher_round_blue.xml b/app/src/main/res/mipmap-anydpi/ic_launcher_round_blue.xml
new file mode 100644
index 000000000..7d0457cce
--- /dev/null
+++ b/app/src/main/res/mipmap-anydpi/ic_launcher_round_blue.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values-night-v33/themes.xml b/app/src/main/res/values-night-v33/themes.xml
index 95d7b9a22..17fd0a359 100644
--- a/app/src/main/res/values-night-v33/themes.xml
+++ b/app/src/main/res/values-night-v33/themes.xml
@@ -1,4 +1,3 @@
-