diff --git a/app/src/main/java/io/mesalabs/knoxpatch/ui/activity/InfoActivity.java b/app/src/main/java/io/mesalabs/knoxpatch/ui/activity/InfoActivity.java index 2896b5a..2b43d3b 100644 --- a/app/src/main/java/io/mesalabs/knoxpatch/ui/activity/InfoActivity.java +++ b/app/src/main/java/io/mesalabs/knoxpatch/ui/activity/InfoActivity.java @@ -29,6 +29,7 @@ import android.net.Uri; import android.os.Build; import android.os.Bundle; +import android.os.SemSystemProperties; import android.os.SystemClock; import android.text.SpannableStringBuilder; import android.text.Spanned; @@ -46,6 +47,7 @@ import androidx.annotation.NonNull; import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AppCompatActivity; import androidx.core.widget.SeslEdgeEffect; import androidx.recyclerview.widget.DividerItemDecoration; @@ -77,6 +79,8 @@ protected void onCreate(Bundle savedInstanceState) { setContentSideMargin(getResources().getConfiguration(), mBinding.mainContent); initListView(); + + showCryptoWarningDialog(); } private void initToolbar() { @@ -186,6 +190,22 @@ protected EdgeEffect createEdgeEffect(@NonNull RecyclerView view, int direction) listView.seslSetLastRoundedCorner(true); } + private void showCryptoWarningDialog() { + if (Build.VERSION.SDK_INT == 30) { + String cryptoState = SemSystemProperties.get("ro.crypto.state", ""); + String cryptoType = SemSystemProperties.get("ro.crypto.type", ""); + + if (!cryptoState.equals("unencrypted") && !cryptoType.isEmpty()) { + AlertDialog dialog = new AlertDialog.Builder(this) + .setTitle(R.string.sep_12_crypto_warning_dialog_title) + .setMessage(R.string.sep_12_crypto_warning_dialog_message) + .setPositiveButton(R.string.sep_12_crypto_warning_dialog_btn, null) + .create(); + dialog.show(); + } + } + } + @SuppressWarnings("deprecation") private void applyLandscapeFullScreen() { Configuration config = getResources().getConfiguration(); diff --git a/app/src/main/res/values-en-rCA/strings.xml b/app/src/main/res/values-en-rCA/strings.xml index 3b10a3c..2d701a6 100644 --- a/app/src/main/res/values-en-rCA/strings.xml +++ b/app/src/main/res/values-en-rCA/strings.xml @@ -8,4 +8,8 @@ Build number Knox version Knox features + + Your data partition is encrypted + This app has detected that your device data partition is encrypted, this means Secure Folder might not work properly. + I understand diff --git a/app/src/main/res/values-en-rPH/strings.xml b/app/src/main/res/values-en-rPH/strings.xml index 3b10a3c..2d701a6 100644 --- a/app/src/main/res/values-en-rPH/strings.xml +++ b/app/src/main/res/values-en-rPH/strings.xml @@ -8,4 +8,8 @@ Build number Knox version Knox features + + Your data partition is encrypted + This app has detected that your device data partition is encrypted, this means Secure Folder might not work properly. + I understand diff --git a/app/src/main/res/values-en-rUS/strings.xml b/app/src/main/res/values-en-rUS/strings.xml index 3b10a3c..2d701a6 100644 --- a/app/src/main/res/values-en-rUS/strings.xml +++ b/app/src/main/res/values-en-rUS/strings.xml @@ -8,4 +8,8 @@ Build number Knox version Knox features + + Your data partition is encrypted + This app has detected that your device data partition is encrypted, this means Secure Folder might not work properly. + I understand diff --git a/app/src/main/res/values-en-rZG/strings.xml b/app/src/main/res/values-en-rZG/strings.xml index 3b10a3c..2d701a6 100644 --- a/app/src/main/res/values-en-rZG/strings.xml +++ b/app/src/main/res/values-en-rZG/strings.xml @@ -8,4 +8,8 @@ Build number Knox version Knox features + + Your data partition is encrypted + This app has detected that your device data partition is encrypted, this means Secure Folder might not work properly. + I understand diff --git a/app/src/main/res/values-en/strings.xml b/app/src/main/res/values-en/strings.xml index 3b10a3c..2d701a6 100644 --- a/app/src/main/res/values-en/strings.xml +++ b/app/src/main/res/values-en/strings.xml @@ -8,4 +8,8 @@ Build number Knox version Knox features + + Your data partition is encrypted + This app has detected that your device data partition is encrypted, this means Secure Folder might not work properly. + I understand diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 91520f7..de1eb74 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -8,4 +8,8 @@ Versione build Versione Knox Funzionalità Knox + + Partizione dati criptata + L\'app ha rilevato che la partizione dati del tuo dispositivo è criptata, l\'app Area Personale potrebbe non funzionare correttamente. + Ho capito diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0bdf4f9..d9eed03 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -17,4 +17,8 @@ DualDAR HDM Knox features + + Your data partition is encrypted + This app has detected that your device data partition is encrypted, this means Secure Folder might not work properly. + I understand