diff --git a/app-common/src/main/java/im/angry/openeuicc/ui/SettingsFragment.kt b/app-common/src/main/java/im/angry/openeuicc/ui/SettingsFragment.kt index f10f134..9c071bd 100644 --- a/app-common/src/main/java/im/angry/openeuicc/ui/SettingsFragment.kt +++ b/app-common/src/main/java/im/angry/openeuicc/ui/SettingsFragment.kt @@ -2,9 +2,7 @@ package im.angry.openeuicc.ui import android.content.Intent import android.net.Uri -import android.os.Build import android.os.Bundle -import android.provider.Settings import android.widget.Toast import androidx.datastore.preferences.core.Preferences import androidx.lifecycle.lifecycleScope @@ -40,28 +38,25 @@ class SettingsFragment: PreferenceFragmentCompat() { }.collect() } - findPreference("pref_info_app_version")?.apply { - summary = requireContext().selfAppVersion + findPreference("pref_info_app_version") + ?.apply { + summary = requireContext().selfAppVersion - // Enable developer options when this is clicked for 7 times - setOnPreferenceClickListener(::onAppVersionClicked) - } - - findPreference("pref_info_source_code")?.apply { - intent = Intent(Intent.ACTION_VIEW, Uri.parse(summary.toString())) - } - - findPreference("pref_language")?.apply { - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) return@apply - isVisible = true - intent = Intent(Settings.ACTION_APP_LOCALE_SETTINGS).apply { - data = Uri.fromParts("package", requireContext().packageName, null) + // Enable developer options when this is clicked for 7 times + setOnPreferenceClickListener(this@SettingsFragment::onAppVersionClicked) } - } - findPreference("pref_advanced_logs")?.apply { - intent = Intent(requireContext(), LogsActivity::class.java) - } + findPreference("pref_info_source_code") + ?.setOnPreferenceClickListener { + startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(it.summary.toString()))) + true + } + + findPreference("pref_advanced_logs") + ?.setOnPreferenceClickListener { + startActivity(Intent(requireContext(), LogsActivity::class.java)) + true + } findPreference("pref_notifications_download") ?.bindBooleanFlow(preferenceRepository.notificationDownloadFlow, PreferenceKeys.NOTIFICATION_DOWNLOAD) diff --git a/app-common/src/main/res/values/strings.xml b/app-common/src/main/res/values/strings.xml index 174b18c..73b1938 100644 --- a/app-common/src/main/res/values/strings.xml +++ b/app-common/src/main/res/values/strings.xml @@ -146,8 +146,6 @@ By default, this app prevents you from disabling the active profile on a removable eSIM inserted in the device, because doing so may sometimes render it inaccessible.\nCheck this box to remove this safeguard. Verbose Logging Enable verbose logs, which may contain sensitive information. Only share your logs with someone you trust after turning this on. - Language - Select current language Logs View recent debug logs of the application Developer Options diff --git a/app-common/src/main/res/xml/locale_config.xml b/app-common/src/main/res/xml/locale_config.xml deleted file mode 100644 index dd9d189..0000000 --- a/app-common/src/main/res/xml/locale_config.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/app-common/src/main/res/xml/pref_settings.xml b/app-common/src/main/res/xml/pref_settings.xml index 107e0b4..60646bc 100644 --- a/app-common/src/main/res/xml/pref_settings.xml +++ b/app-common/src/main/res/xml/pref_settings.xml @@ -36,13 +36,6 @@ app:title="@string/pref_advanced_verbose_logging" app:summary="@string/pref_advanced_verbose_logging_desc" /> - - - + + android:theme="@style/Theme.OpenEUICC"> - - - diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index cae19d3..cd30620 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -5,8 +5,7 @@ package="im.angry.openeuicc"> + android:required="true" /> @@ -20,9 +19,7 @@ android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" - android:localeConfig="@xml/locale_config" - android:theme="@style/Theme.OpenEUICC" - tools:targetApi="tiramisu"> + android:theme="@style/Theme.OpenEUICC"> @@ -52,15 +49,6 @@ - - - - diff --git a/gradle.properties b/gradle.properties index 239cc44..022338b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,5 +22,4 @@ kotlin.code.style=official # thereby reducing the size of the R class for that library android.nonTransitiveRClass=true android.defaults.buildfeatures.buildconfig=true -android.nonFinalResIds=false -android.suppressUnsupportedCompileSdk=35 +android.nonFinalResIds=false \ No newline at end of file