diff --git a/.gitmodules b/.gitmodules index 863f185..f888959 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "libs/lpac-jni/src/main/jni/lpac"] path = libs/lpac-jni/src/main/jni/lpac - url = https://github.com/estkme-group/lpac.git + url = https://github.com/estkme/lpac diff --git a/app-common/src/main/java/im/angry/openeuicc/di/DefaultCustomizableTextProvider.kt b/app-common/src/main/java/im/angry/openeuicc/di/DefaultCustomizableTextProvider.kt index 76227fd..b493611 100644 --- a/app-common/src/main/java/im/angry/openeuicc/di/DefaultCustomizableTextProvider.kt +++ b/app-common/src/main/java/im/angry/openeuicc/di/DefaultCustomizableTextProvider.kt @@ -8,7 +8,7 @@ open class DefaultCustomizableTextProvider(private val context: Context) : Custo get() = context.getString(R.string.no_euicc) override val profileSwitchingTimeoutMessage: String - get() = context.getString(R.string.profile_switch_timeout) + get() = context.getString(R.string.enable_disable_timeout) override fun formatInternalChannelName(logicalSlotId: Int): String = context.getString(R.string.channel_name_format, logicalSlotId) diff --git a/app-common/src/main/java/im/angry/openeuicc/ui/EuiccManagementFragment.kt b/app-common/src/main/java/im/angry/openeuicc/ui/EuiccManagementFragment.kt index 016e96f..3c94c6c 100644 --- a/app-common/src/main/java/im/angry/openeuicc/ui/EuiccManagementFragment.kt +++ b/app-common/src/main/java/im/angry/openeuicc/ui/EuiccManagementFragment.kt @@ -253,7 +253,7 @@ open class EuiccManagementFragment : Fragment(), EuiccProfilesChangedListener, if (!isUsb) { withContext(Dispatchers.Main) { AlertDialog.Builder(requireContext()).apply { - setMessage(R.string.profile_switch_did_not_refresh) + setMessage(R.string.switch_did_not_refresh) setPositiveButton(android.R.string.ok) { dialog, _ -> dialog.dismiss() requireActivity().finish() @@ -380,9 +380,9 @@ open class EuiccManagementFragment : Fragment(), EuiccProfilesChangedListener, state.setText( if (profile.isEnabled) { - R.string.profile_state_enabled + R.string.enabled } else { - R.string.profile_state_disabled + R.string.disabled } ) provider.text = profile.providerName diff --git a/app-common/src/main/java/im/angry/openeuicc/ui/ProfileRenameFragment.kt b/app-common/src/main/java/im/angry/openeuicc/ui/ProfileRenameFragment.kt index 281e625..c588254 100644 --- a/app-common/src/main/java/im/angry/openeuicc/ui/ProfileRenameFragment.kt +++ b/app-common/src/main/java/im/angry/openeuicc/ui/ProfileRenameFragment.kt @@ -65,7 +65,7 @@ class ProfileRenameFragment : BaseMaterialDialogFragment(), EuiccChannelFragment super.onViewCreated(view, savedInstanceState) profileRenameNewName.editText!!.setText(currentName) toolbar.apply { - setTitle(R.string.profile_rename) + setTitle(R.string.rename) setNavigationOnClickListener { if (!renaming) dismiss() } diff --git a/app-common/src/main/res/layout/euicc_profile.xml b/app-common/src/main/res/layout/euicc_profile.xml index 021c53b..74c1d7a 100644 --- a/app-common/src/main/res/layout/euicc_profile.xml +++ b/app-common/src/main/res/layout/euicc_profile.xml @@ -54,7 +54,7 @@ \ No newline at end of file diff --git a/app-common/src/main/res/menu/profile_options.xml b/app-common/src/main/res/menu/profile_options.xml index 60722d6..6add53d 100644 --- a/app-common/src/main/res/menu/profile_options.xml +++ b/app-common/src/main/res/menu/profile_options.xml @@ -2,18 +2,18 @@ + android:title="@string/enable"/> + android:title="@string/disable"/> + android:title="@string/rename"/> + android:title="@string/delete"/> \ No newline at end of file diff --git a/app-common/src/main/res/values-ja/strings.xml b/app-common/src/main/res/values-ja/strings.xml index e631d52..d51e2c7 100644 --- a/app-common/src/main/res/values-ja/strings.xml +++ b/app-common/src/main/res/values-ja/strings.xml @@ -7,19 +7,19 @@ ヘルプ スロットを再読み込み 論理スロット %d - 有効済み - 無効済み - プロバイダー: + 有効済み + 無効済み + プロバイダー: クラス: テスト中 プロビジョニング 稼働中 - 有効化 - 無効化 - 削除 - 名前を変更 - eSIM チップがプロファイルの切り替えの待機中にタイムアウトしました。これはデバイスのモデムファームウェアのバグの可能性があります。機内モードに切り替えるかアプリを再起動、デバイスを再起動してください。 - 操作は成功しましたが、デバイスのモデムが更新を拒否しました。新しいプロファイルを使用するには機内モードに切り替えるか、再起動する必要があります。 + 有効化 + 無効化 + 削除 + 名前を変更 + eSIM チップがプロファイルの切り替えの待機中にタイムアウトしました。これはデバイスのモデムファームウェアのバグの可能性があります。機内モードに切り替えるかアプリを再起動、デバイスを再起動してください。 + 操作は成功しましたが、デバイスのモデムが更新を拒否しました。新しいプロファイルを使用するには機内モードに切り替えるか、再起動する必要があります。 新しい eSIM プロファイルに切り替えることができません。 確認文字列が一致しません ICCID をクリップボードにコピーしました diff --git a/app-common/src/main/res/values-zh-rCN/strings.xml b/app-common/src/main/res/values-zh-rCN/strings.xml index b0938d3..32ced90 100644 --- a/app-common/src/main/res/values-zh-rCN/strings.xml +++ b/app-common/src/main/res/values-zh-rCN/strings.xml @@ -6,16 +6,16 @@ 帮助 重新加载卡槽 逻辑卡槽 %d - 已启用 - 已禁用 - 提供商: + 已启用 + 已禁用 + 提供商: 类型: - 启用 - 禁用 - 删除 - 重命名 - 等待 eSIM 芯片切换配置文件时超时。这可能是您手机基带固件中的一个错误。请尝试切换飞行模式、重新启动应用程序或重新启动手机 - 操作成功, 但是您手机的基带拒绝刷新。您可能需要切换飞行模式或重新启动,以便使用新的配置文件。 + 启用 + 禁用 + 删除 + 重命名 + 等待 eSIM 芯片切换配置文件时超时。这可能是您手机基带固件中的一个错误。请尝试切换飞行模式、重新启动应用程序或重新启动手机 + 操作成功, 但是您手机的基带拒绝刷新。您可能需要切换飞行模式或重新启动,以便使用新的配置文件。 无法切换到新的 eSIM 配置文件。 输入的确认文本不匹配 已复制 ICCID 到剪贴板 diff --git a/app-common/src/main/res/values-zh-rTW/strings.xml b/app-common/src/main/res/values-zh-rTW/strings.xml index e0334c6..5136bf7 100644 --- a/app-common/src/main/res/values-zh-rTW/strings.xml +++ b/app-common/src/main/res/values-zh-rTW/strings.xml @@ -6,16 +6,16 @@ 幫助 重新載入卡槽 虛擬卡槽 %d - 已啟用 - 已停用 - 電信業者: + 已啟用 + 已停用 + 電信業者: 類型: - 啟用 - 停用 - 刪除 - 重新命名 - 等待 eSIM 切換設定檔時逾時。這可能是您手機基頻處理器韌體中的一個錯誤。請嘗試切換飛航模式、重新啟動應用程式或重新啟動手機 - 操作成功, 但是您手機的基頻處理器沒有重新整理。您可能需要切換飛航模式或重新啟動,以便使用新的設定檔。 + 啟用 + 停用 + 刪除 + 重新命名 + 等待 eSIM 切換設定檔時逾時。這可能是您手機基頻處理器韌體中的一個錯誤。請嘗試切換飛航模式、重新啟動應用程式或重新啟動手機 + 操作成功, 但是您手機的基頻處理器沒有重新整理。您可能需要切換飛航模式或重新啟動,以便使用新的設定檔。 無法切換到新的 eSIM 設定檔。 輸入的確認文字不匹配 已複製 ICCID 到剪貼簿 diff --git a/app-common/src/main/res/values/strings.xml b/app-common/src/main/res/values/strings.xml index d526238..38bb976 100644 --- a/app-common/src/main/res/values/strings.xml +++ b/app-common/src/main/res/values/strings.xml @@ -11,24 +11,23 @@ USB OpenMobile API (OMAPI) - - Enabled - Disabled - Provider: + Enabled + Disabled + Provider: Class: Testing Provisioning Operational - ICCID: + ICCID: #%d - Enable - Disable - Delete - Rename + Enable + Disable + Delete + Rename - Timed out waiting for the eSIM chip to switch profiles. This may be a bug in your phone\'s modem firmware. Try toggling airplane mode, restarting the application, or rebooting the phone. - The operation was successful, but your phone\'s modem refused to refresh. You might need to toggle airplane mode or reboot in order to use the new profile. + Timed out waiting for the eSIM chip to switch profiles. This may be a bug in your phone\'s modem firmware. Try toggling airplane mode, restarting the application, or rebooting the phone. + The operation was successful, but your phone\'s modem refused to refresh. You might need to toggle airplane mode or reboot in order to use the new profile. Cannot switch to new eSIM profile. Confirmation string mismatch diff --git a/app-unpriv/src/main/java/im/angry/openeuicc/ui/QuickCompatibilityFragment.kt b/app-unpriv/src/main/java/im/angry/openeuicc/ui/QuickCompatibilityFragment.kt index 9b41730..f6af78d 100644 --- a/app-unpriv/src/main/java/im/angry/openeuicc/ui/QuickCompatibilityFragment.kt +++ b/app-unpriv/src/main/java/im/angry/openeuicc/ui/QuickCompatibilityFragment.kt @@ -127,9 +127,8 @@ open class QuickCompatibilityFragment : Fragment(), UnprivilegedEuiccContextMark if (!service.isConnected) { return CompatibilityResult(Compatibility.NOT_COMPATIBLE) } - val readers = service.readers.filter(Reader::isSIM) - val omapiSlots = readers.mapNotNull(Reader::slotIndex) - val slots = readers.mapNotNull { reader -> + val omapiSlots = service.readers.filter { it.isSIM }.map { it.slotIndex } + val slots = service.readers.filter { it.isSIM }.mapNotNull { reader -> try { // Note: we ONLY check the default ISD-R AID, because this test is for the _device_, // NOT the eUICC. We don't care what AID a potential eUICC might use, all we need to @@ -148,12 +147,10 @@ open class QuickCompatibilityFragment : Fragment(), UnprivilegedEuiccContextMark if (omapiSlots.isEmpty()) { return CompatibilityResult(Compatibility.NOT_COMPATIBLE) } - val formatChannelName = appContainer.customizableTextProvider::formatInternalChannelName return CompatibilityResult( Compatibility.COMPATIBLE, - slotsOmapi = omapiSlots.map(formatChannelName), - slotsIsdr = slots.map(formatChannelName), - ) + slotsOmapi = omapiSlots.map { "SIM$it" }, + slotsIsdr = slots.map { "SIM$it" }) } open fun formatConclusion(result: CompatibilityResult): String { @@ -179,8 +176,8 @@ open class QuickCompatibilityFragment : Fragment(), UnprivilegedEuiccContextMark } } -private inline val Reader.isSIM: Boolean +val Reader.isSIM: Boolean get() = name.startsWith("SIM") -private inline val Reader.slotIndex: Int - get() = (name.replace("SIM", "").toIntOrNull() ?: 1) - 1 // 0-based index \ No newline at end of file +val Reader.slotIndex: Int + get() = (name.replace("SIM", "").toIntOrNull() ?: 1) \ No newline at end of file