Added option to disable updating SSL provider

This commit is contained in:
M66B
2023-12-11 12:58:56 +01:00
parent de1c931dc3
commit 1ea136020e
4 changed files with 48 additions and 4 deletions

View File

@@ -20,6 +20,9 @@ package eu.faircode.email;
*/
import android.content.Intent;
import android.content.SharedPreferences;
import androidx.preference.PreferenceManager;
import com.google.android.gms.security.ProviderInstaller;
@@ -32,8 +35,13 @@ public class ApplicationSecure extends ApplicationEx implements ProviderInstalle
@Override
public void onCreate() {
super.onCreate();
Log.i("Security provider check");
ProviderInstaller.installIfNeededAsync(this, this);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
boolean ssl_update = prefs.getBoolean("ssl_update", true);
if (ssl_update) {
Log.i("Security provider check");
ProviderInstaller.installIfNeededAsync(this, this);
} else
lock.countDown();
}
@Override