Skip to content

Commit 85423c6

Browse files
authored
Merge pull request #4499 from EmmanuelMess/emmanuelmess/fix/cdata_text
2 parents b1d823b + 4811c02 commit 85423c6

File tree

5 files changed

+22
-9
lines changed

5 files changed

+22
-9
lines changed

app/src/main/java/com/amaze/filemanager/ui/dialogs/EncryptAuthenticateDialog.kt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import android.annotation.SuppressLint
2424
import android.content.Context
2525
import android.content.Intent
2626
import android.content.SharedPreferences
27+
import android.text.method.LinkMovementMethod
28+
import android.text.util.Linkify
2729
import android.view.LayoutInflater
2830
import android.view.View
2931
import android.view.View.INVISIBLE
@@ -95,10 +97,13 @@ object EncryptAuthenticateDialog {
9597
val useAzeEncrypt: AppCompatCheckBox = vb.checkboxUseAze
9698
val usageTextInfo: AppCompatTextView =
9799
vb.textViewCryptInfo.apply {
100+
movementMethod = LinkMovementMethod.getInstance()
101+
autoLinkMask = Linkify.WEB_URLS
102+
linksClickable = true
98103
text =
99104
HtmlCompat.fromHtml(
100105
main.getString(R.string.encrypt_option_use_aescrypt_desc),
101-
FROM_HTML_MODE_COMPACT,
106+
HtmlCompat.FROM_HTML_MODE_COMPACT,
102107
)
103108
}
104109
useAzeEncrypt.setOnCheckedChangeListener(
@@ -242,6 +247,9 @@ object EncryptAuthenticateDialog {
242247
AESCRYPT_EXTENSION
243248
}}",
244249
)
250+
usageTextInfo.movementMethod = LinkMovementMethod.getInstance()
251+
usageTextInfo.autoLinkMask = Linkify.WEB_URLS
252+
usageTextInfo.linksClickable = true
245253
usageTextInfo.text =
246254
HtmlCompat.fromHtml(
247255
main.getString(

app/src/main/java/com/amaze/filemanager/ui/dialogs/EncryptWithPresetPasswordSaveAsDialog.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ package com.amaze.filemanager.ui.dialogs
2323
import android.annotation.SuppressLint
2424
import android.content.Context
2525
import android.content.Intent
26+
import android.text.method.LinkMovementMethod
27+
import android.text.util.Linkify
2628
import android.view.LayoutInflater
2729
import android.view.View
2830
import android.widget.Toast
@@ -88,10 +90,13 @@ object EncryptWithPresetPasswordSaveAsDialog {
8890
val useAzeEncrypt = vb.checkboxUseAze
8991
val usageTextInfo =
9092
vb.textViewCryptInfo.apply {
93+
movementMethod = LinkMovementMethod.getInstance()
94+
autoLinkMask = Linkify.WEB_URLS
95+
linksClickable = true
9196
text =
9297
HtmlCompat.fromHtml(
9398
main.getString(R.string.encrypt_option_use_aescrypt_desc),
94-
HtmlCompat.FROM_HTML_MODE_LEGACY,
99+
HtmlCompat.FROM_HTML_MODE_COMPACT,
95100
)
96101
}
97102
if (ENCRYPT_PASSWORD_FINGERPRINT != password) {

app/src/main/res/layout/dialog_encrypt_authenticate.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<androidx.appcompat.widget.AppCompatTextView
7070
android:layout_width="wrap_content"
7171
android:layout_height="match_parent"
72-
android:text="@string/encrypt_option_use_aescrypt_desc"
72+
android:text=""
7373
android:id="@+id/text_view_crypt_info"
7474
android:layout_gravity="center_vertical"
7575
app:layout_constraintTop_toBottomOf="@id/checkbox_use_aze"

app/src/main/res/layout/dialog_encrypt_with_master_password.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
android:layout_width="wrap_content"
3737
android:layout_height="match_parent"
3838
android:padding="5sp"
39-
android:text="@string/encrypt_option_use_aescrypt_desc"
39+
android:text=""
4040
android:id="@+id/text_view_crypt_info"
4141
android:layout_gravity="center_vertical"
4242
android:textSize="22sp"

app/src/main/res/values/strings.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,8 @@
372372
</li>
373373
<p style=&quot;margin-left: 40px&quot;>
374374
This feature makes files available on the local network, so your PC and mobile devices
375-
have to be on the same local network. You can\’t access a shared Windows folder
376-
over the Internet or when your smartphone is connected to its mobile data it
375+
have to be on the same local network. You can&apos;t access a shared Windows folder
376+
over the Internet or when your smartphone is connected to its mobile data - it
377377
has to be connected to Wi-Fi.
378378
<br/>
379379
<br/>
@@ -659,10 +659,10 @@
659659
<string name="encrypt_option_use_aze">Use Amaze Encryption Format</string>
660660
<string name="encrypt_option_use_aescrypt_desc"><![CDATA[
661661
<p>AESCrypt is an open source file encryption format based on AES encryption. It is also portable, can be decrypted with AESCrypt programs on other platforms.</p>
662-
<p><a href="https://www.aescrypt.com" target="_blank>AESCrypt website</a></p>]]>
663-
</string>
662+
<p>AESCrypt website: https://www.aescrypt.com</p>
663+
]]></string>
664664
<string name="encrypt_option_use_azecrypt_desc"><![CDATA[
665-
<p>Amaze\'s Encryption Format is also based on AES encryption; but different from AESCrypt format, it can only be decrypted by this device; also you must not uninstall Amaze File Manager from this device nor change the way you lock screen, otherwise you will have no way to recover the encrypted file.</p>
665+
<p>Amaze&apos;s Encryption Format is also based on AES encryption; but different from AESCrypt format, it can only be decrypted by this device; also you must not uninstall Amaze File Manager from this device nor change the way you lock screen, otherwise you will have no way to recover the encrypted file.</p>
666666
]]></string>
667667
<string name="encrypt_file_must_end_with_aze">Encrypted files must use \".aze\" as the file extension.</string>
668668
<string name="encrypt_file_must_end_with_aes">Encrypted files must use \".aes\" as the file extension.</string>

0 commit comments

Comments
 (0)