forked from PeterCxy/OpenEUICC
Compare commits
No commits in common. "0a78daee8bc9bf217c746a58d38c178110aa0ae0" and "50c77ea467ee7352917d5e5b5d62c428cb79b902" have entirely different histories.
0a78daee8b
...
50c77ea467
7 changed files with 21 additions and 64 deletions
|
@ -2,9 +2,7 @@ package im.angry.openeuicc.ui
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Build
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.provider.Settings
|
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.datastore.preferences.core.Preferences
|
import androidx.datastore.preferences.core.Preferences
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
|
@ -40,28 +38,25 @@ class SettingsFragment: PreferenceFragmentCompat() {
|
||||||
}.collect()
|
}.collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
findPreference<Preference>("pref_info_app_version")?.apply {
|
findPreference<Preference>("pref_info_app_version")
|
||||||
summary = requireContext().selfAppVersion
|
?.apply {
|
||||||
|
summary = requireContext().selfAppVersion
|
||||||
|
|
||||||
// Enable developer options when this is clicked for 7 times
|
// Enable developer options when this is clicked for 7 times
|
||||||
setOnPreferenceClickListener(::onAppVersionClicked)
|
setOnPreferenceClickListener(this@SettingsFragment::onAppVersionClicked)
|
||||||
}
|
|
||||||
|
|
||||||
findPreference<Preference>("pref_info_source_code")?.apply {
|
|
||||||
intent = Intent(Intent.ACTION_VIEW, Uri.parse(summary.toString()))
|
|
||||||
}
|
|
||||||
|
|
||||||
findPreference<Preference>("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)
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
findPreference<Preference>("pref_advanced_logs")?.apply {
|
findPreference<Preference>("pref_info_source_code")
|
||||||
intent = Intent(requireContext(), LogsActivity::class.java)
|
?.setOnPreferenceClickListener {
|
||||||
}
|
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(it.summary.toString())))
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
|
findPreference<Preference>("pref_advanced_logs")
|
||||||
|
?.setOnPreferenceClickListener {
|
||||||
|
startActivity(Intent(requireContext(), LogsActivity::class.java))
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
findPreference<CheckBoxPreference>("pref_notifications_download")
|
findPreference<CheckBoxPreference>("pref_notifications_download")
|
||||||
?.bindBooleanFlow(preferenceRepository.notificationDownloadFlow, PreferenceKeys.NOTIFICATION_DOWNLOAD)
|
?.bindBooleanFlow(preferenceRepository.notificationDownloadFlow, PreferenceKeys.NOTIFICATION_DOWNLOAD)
|
||||||
|
|
|
@ -146,8 +146,6 @@
|
||||||
<string name="pref_advanced_disable_safeguard_removable_esim_desc">By default, this app prevents you from disabling the active profile on a removable eSIM inserted in the device, because doing so may <i>sometimes</i> render it inaccessible.\nCheck this box to <i>remove</i> this safeguard.</string>
|
<string name="pref_advanced_disable_safeguard_removable_esim_desc">By default, this app prevents you from disabling the active profile on a removable eSIM inserted in the device, because doing so may <i>sometimes</i> render it inaccessible.\nCheck this box to <i>remove</i> this safeguard.</string>
|
||||||
<string name="pref_advanced_verbose_logging">Verbose Logging</string>
|
<string name="pref_advanced_verbose_logging">Verbose Logging</string>
|
||||||
<string name="pref_advanced_verbose_logging_desc">Enable verbose logs, which may contain sensitive information. Only share your logs with someone you trust after turning this on.</string>
|
<string name="pref_advanced_verbose_logging_desc">Enable verbose logs, which may contain sensitive information. Only share your logs with someone you trust after turning this on.</string>
|
||||||
<string name="pref_language">Language</string>
|
|
||||||
<string name="pref_language_desc">Select current language</string>
|
|
||||||
<string name="pref_advanced_logs">Logs</string>
|
<string name="pref_advanced_logs">Logs</string>
|
||||||
<string name="pref_advanced_logs_desc">View recent debug logs of the application</string>
|
<string name="pref_advanced_logs_desc">View recent debug logs of the application</string>
|
||||||
<string name="pref_developer">Developer Options</string>
|
<string name="pref_developer">Developer Options</string>
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<locale-config xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<locale android:name="en-US" />
|
|
||||||
<locale android:name="ja" />
|
|
||||||
</locale-config>
|
|
|
@ -36,13 +36,6 @@
|
||||||
app:title="@string/pref_advanced_verbose_logging"
|
app:title="@string/pref_advanced_verbose_logging"
|
||||||
app:summary="@string/pref_advanced_verbose_logging_desc" />
|
app:summary="@string/pref_advanced_verbose_logging_desc" />
|
||||||
|
|
||||||
<Preference
|
|
||||||
app:iconSpaceReserved="false"
|
|
||||||
app:isPreferenceVisible="false"
|
|
||||||
app:key="pref_language"
|
|
||||||
app:summary="@string/pref_language_desc"
|
|
||||||
app:title="@string/pref_language" />
|
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
app:key="pref_advanced_logs"
|
app:key="pref_advanced_logs"
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name="im.angry.openeuicc.UnprivilegedOpenEuiccApplication"
|
android:name="im.angry.openeuicc.UnprivilegedOpenEuiccApplication"
|
||||||
|
@ -9,9 +8,7 @@
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:localeConfig="@xml/locale_config"
|
android:theme="@style/Theme.OpenEUICC">
|
||||||
android:theme="@style/Theme.OpenEUICC"
|
|
||||||
tools:targetApi="tiramisu">
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="im.angry.openeuicc.ui.UnprivilegedMainActivity"
|
android:name="im.angry.openeuicc.ui.UnprivilegedMainActivity"
|
||||||
|
@ -28,14 +25,6 @@
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:label="@string/compatibility_check" />
|
android:label="@string/compatibility_check" />
|
||||||
|
|
||||||
<service
|
|
||||||
android:name="androidx.appcompat.app.AppLocalesMetadataHolderService"
|
|
||||||
android:enabled="false"
|
|
||||||
android:exported="false">
|
|
||||||
<meta-data
|
|
||||||
android:name="autoStoreLocales"
|
|
||||||
android:value="true" />
|
|
||||||
</service>
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
<queries>
|
<queries>
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
package="im.angry.openeuicc">
|
package="im.angry.openeuicc">
|
||||||
<uses-feature
|
<uses-feature
|
||||||
android:name="android.hardware.telephony"
|
android:name="android.hardware.telephony"
|
||||||
android:required="true"
|
android:required="true" />
|
||||||
tools:ignore="UnnecessaryRequiredFeature" />
|
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
|
<uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
|
||||||
<uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
|
<uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
|
||||||
|
@ -20,9 +19,7 @@
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:localeConfig="@xml/locale_config"
|
android:theme="@style/Theme.OpenEUICC">
|
||||||
android:theme="@style/Theme.OpenEUICC"
|
|
||||||
tools:targetApi="tiramisu">
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.PrivilegedMainActivity"
|
android:name=".ui.PrivilegedMainActivity"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
|
@ -52,15 +49,6 @@
|
||||||
<category android:name="android.service.euicc.category.EUICC_UI" />
|
<category android:name="android.service.euicc.category.EUICC_UI" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<service
|
|
||||||
android:name="androidx.appcompat.app.AppLocalesMetadataHolderService"
|
|
||||||
android:enabled="false"
|
|
||||||
android:exported="false">
|
|
||||||
<meta-data
|
|
||||||
android:name="autoStoreLocales"
|
|
||||||
android:value="true" />
|
|
||||||
</service>
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|
|
@ -22,5 +22,4 @@ kotlin.code.style=official
|
||||||
# thereby reducing the size of the R class for that library
|
# thereby reducing the size of the R class for that library
|
||||||
android.nonTransitiveRClass=true
|
android.nonTransitiveRClass=true
|
||||||
android.defaults.buildfeatures.buildconfig=true
|
android.defaults.buildfeatures.buildconfig=true
|
||||||
android.nonFinalResIds=false
|
android.nonFinalResIds=false
|
||||||
android.suppressUnsupportedCompileSdk=35
|
|
Loading…
Add table
Reference in a new issue