forked from PeterCxy/OpenEUICC
jmp: Migrate customized text to CustomizableTextProvider
All checks were successful
/ build-debug (push) Successful in 4m33s
All checks were successful
/ build-debug (push) Successful in 4m33s
This commit is contained in:
parent
0673cf370a
commit
0818abf71b
5 changed files with 20 additions and 4 deletions
|
@ -6,4 +6,8 @@ class JmpAppContainer(context: Context) : UnprivilegedAppContainer(context) {
|
|||
override val uiComponentFactory by lazy {
|
||||
JmpUiComponentFactory()
|
||||
}
|
||||
|
||||
override val customizableTextProvider by lazy {
|
||||
JmpCustomizableTextProvider(context)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package im.angry.openeuicc.di
|
||||
|
||||
import android.content.Context
|
||||
import im.angry.easyeuicc.R
|
||||
|
||||
class JmpCustomizableTextProvider(private val context: Context) :
|
||||
UnprivilegedCustomizableTextProvider(context) {
|
||||
override val noEuiccExplanation: String
|
||||
get() = context.getString(R.string.no_euicc_jmp)
|
||||
override val profileSwitchingTimeoutMessage: String
|
||||
get() = context.getString(R.string.enable_disable_timeout_jmp)
|
||||
}
|
|
@ -11,7 +11,7 @@
|
|||
android:layout_marginStart="40dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/no_euicc"
|
||||
android:text="@string/no_euicc_jmp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name" translatable="false">JMP SIM Manager</string>
|
||||
<string name="no_euicc">No JMP eSIM Adapter found on this device. Insert one into the device or through a USB card reader.</string>
|
||||
<string name="no_euicc_jmp">No JMP eSIM Adapter found on this device. Insert one into the device or through a USB card reader.</string>
|
||||
<string name="purchase_esim">Buy JMP eSIM Adapter</string>
|
||||
<string name="purchase_sim_url" translatable="false">https://jmp.chat/esim-adapter</string>
|
||||
<string name="pref_info_source_code_url" translatable="false">https://gitea.angry.im/jmp-sim/jmp-sim-manager</string>
|
||||
|
||||
<string name="enable_disable_timeout">Timed out waiting for the eSIM chip to switch profiles. Please manually refresh the eSIM adapter by going to SIM Toolkit, and select Tools -> Reboot.</string>
|
||||
<string name="enable_disable_timeout_jmp">Timed out waiting for the eSIM chip to switch profiles. Please manually refresh the eSIM adapter by going to SIM Toolkit, and select Tools -> Reboot.</string>
|
||||
</resources>
|
|
@ -3,7 +3,7 @@ package im.angry.openeuicc.di
|
|||
import android.content.Context
|
||||
import im.angry.easyeuicc.R
|
||||
|
||||
class UnprivilegedCustomizableTextProvider(private val context: Context) :
|
||||
open class UnprivilegedCustomizableTextProvider(private val context: Context) :
|
||||
DefaultCustomizableTextProvider(context) {
|
||||
override fun formatInternalChannelName(logicalSlotId: Int): String =
|
||||
context.getString(R.string.channel_name_format_unpriv, logicalSlotId)
|
||||
|
|
Loading…
Reference in a new issue