mirror of https://github.com/M66B/FairEmail.git
Install provider
This commit is contained in:
parent
2fde15a52c
commit
7195603350
|
@ -513,6 +513,7 @@ dependencies {
|
|||
def exif_version = "1.3.6"
|
||||
def biometric_version = "1.2.0-alpha05"
|
||||
def billingclient_version = "6.0.1"
|
||||
def playservicesbase_version = "18.2.0";
|
||||
def javamail_version = "1.6.7"
|
||||
def jsoup_version = "1.16.2"
|
||||
def jsonpath_version = "2.8.0"
|
||||
|
@ -654,6 +655,12 @@ dependencies {
|
|||
largeImplementation "com.android.billingclient:billing:$billingclient_version"
|
||||
playImplementation "com.android.billingclient:billing:$billingclient_version"
|
||||
|
||||
// https://mvnrepository.com/artifact/com.google.android.gms/play-services-base
|
||||
//githubImplementation "com.google.android.gms:play-services-basement:$playservicesbase_version"
|
||||
//largeImplementation "com.google.android.gms:play-services-basement:$playservicesbase_version"
|
||||
//playImplementation "com.google.android.gms:play-services-basement:$playservicesbase_version"
|
||||
implementation "com.google.android.gms:play-services-basement:$playservicesbase_version"
|
||||
|
||||
// https://developer.amazon.com/docs/in-app-purchasing/iap-get-started.html
|
||||
amazonImplementation files('lib/in-app-purchasing-2.0.76.jar')
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
</queries>
|
||||
|
||||
<application
|
||||
android:name=".ApplicationEx"
|
||||
android:name=".ApplicationSecure"
|
||||
android:allowBackup="false"
|
||||
android:appCategory="productivity"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
package eu.faircode.email;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
import com.google.android.gms.security.ProviderInstaller;
|
||||
|
||||
public class ApplicationSecure extends ApplicationEx implements ProviderInstaller.ProviderInstallListener {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
Log.i("Security provider check");
|
||||
ProviderInstaller.installIfNeededAsync(this, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProviderInstalled() {
|
||||
Log.i("Security provider installed");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProviderInstallFailed(int errorCode, Intent recoveryIntent) {
|
||||
Log.i("Security provider install failed" +
|
||||
" errorCode=" + errorCode +
|
||||
" recoveryIntent=" + recoveryIntent);
|
||||
}
|
||||
}
|
|
@ -119,7 +119,7 @@
|
|||
</queries>
|
||||
|
||||
<application
|
||||
android:name=".ApplicationEx"
|
||||
android:name=".ApplicationSecure"
|
||||
android:allowBackup="false"
|
||||
android:appCategory="productivity"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
</queries>
|
||||
|
||||
<application
|
||||
android:name=".ApplicationEx"
|
||||
android:name=".ApplicationSecure"
|
||||
android:allowBackup="false"
|
||||
android:appCategory="productivity"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
package eu.faircode.email;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
import com.google.android.gms.security.ProviderInstaller;
|
||||
|
||||
public class ApplicationSecure extends ApplicationEx implements ProviderInstaller.ProviderInstallListener {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
Log.i("Security provider check");
|
||||
ProviderInstaller.installIfNeededAsync(this, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProviderInstalled() {
|
||||
Log.i("Security provider installed");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProviderInstallFailed(int errorCode, Intent recoveryIntent) {
|
||||
Log.i("Security provider install failed" +
|
||||
" errorCode=" + errorCode +
|
||||
" recoveryIntent=" + recoveryIntent);
|
||||
}
|
||||
}
|
|
@ -118,7 +118,7 @@
|
|||
</queries>
|
||||
|
||||
<application
|
||||
android:name=".ApplicationEx"
|
||||
android:name=".ApplicationSecure"
|
||||
android:allowBackup="false"
|
||||
android:appCategory="productivity"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
</queries>
|
||||
|
||||
<application
|
||||
android:name=".ApplicationEx"
|
||||
android:name=".ApplicationSecure"
|
||||
android:allowBackup="false"
|
||||
android:appCategory="productivity"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
|
|
|
@ -235,14 +235,14 @@ public class EmailService implements AutoCloseable {
|
|||
Log.i("Timeout=" + timeout);
|
||||
if (purpose == PURPOSE_SEARCH) {
|
||||
properties.put("mail." + protocol + ".connectiontimeout", Integer.toString(timeout));
|
||||
properties.put("mail." + protocol + ".writetimeout", Integer.toString(SEARCH_TIMEOUT));
|
||||
//properties.put("mail." + protocol + ".writetimeout", Integer.toString(SEARCH_TIMEOUT));
|
||||
properties.put("mail." + protocol + ".timeout", Integer.toString(SEARCH_TIMEOUT));
|
||||
} else {
|
||||
int factor = 2;
|
||||
if ("smtp".equals(protocol) || "smtps".equals(protocol))
|
||||
factor *= 2;
|
||||
properties.put("mail." + protocol + ".connectiontimeout", Integer.toString(timeout));
|
||||
properties.put("mail." + protocol + ".writetimeout", Integer.toString(timeout * factor));
|
||||
//properties.put("mail." + protocol + ".writetimeout", Integer.toString(timeout * factor));
|
||||
properties.put("mail." + protocol + ".timeout", Integer.toString(timeout * factor));
|
||||
}
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
</queries>
|
||||
|
||||
<application
|
||||
android:name=".ApplicationEx"
|
||||
android:name=".ApplicationSecure"
|
||||
android:allowBackup="false"
|
||||
android:appCategory="productivity"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
package eu.faircode.email;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
import com.google.android.gms.security.ProviderInstaller;
|
||||
|
||||
public class ApplicationSecure extends ApplicationEx implements ProviderInstaller.ProviderInstallListener {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
Log.i("Security provider check");
|
||||
ProviderInstaller.installIfNeededAsync(this, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProviderInstalled() {
|
||||
Log.i("Security provider installed");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProviderInstallFailed(int errorCode, Intent recoveryIntent) {
|
||||
Log.i("Security provider install failed" +
|
||||
" errorCode=" + errorCode +
|
||||
" recoveryIntent=" + recoveryIntent);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue