mirror of
https://github.com/etesync/android
synced 2025-01-11 00:01:12 +00:00
Fix some inconsistencies
This commit is contained in:
parent
138d344a5b
commit
51840c3a22
@ -55,11 +55,11 @@
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
<receiver
|
||||
android:name=".App$ReinitLoggingReceiver"
|
||||
android:name=".App$ReinitSettingsReceiver"
|
||||
android:exported="false"
|
||||
android:process=":sync">
|
||||
<intent-filter>
|
||||
<action android:name="com.etesync.syncadapter.REINIT_LOGGER"/>
|
||||
<action android:name="at.bitfire.davdroid.REINIT_SETTINGS"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver
|
||||
|
@ -78,8 +78,6 @@ import okhttp3.internal.tls.OkHostnameVerifier;
|
||||
|
||||
|
||||
public class App extends Application {
|
||||
public static final String FLAVOR_GOOGLE_PLAY = "gplay";
|
||||
|
||||
public static final String
|
||||
DISTRUST_SYSTEM_CERTIFICATES = "distrustSystemCerts",
|
||||
LOG_TO_EXTERNAL_STORAGE = "logToExternalStorage",
|
||||
@ -216,11 +214,13 @@ public class App extends Application {
|
||||
}
|
||||
|
||||
|
||||
public static class ReinitLoggingReceiver extends BroadcastReceiver {
|
||||
public static class ReinitSettingsReceiver extends BroadcastReceiver {
|
||||
|
||||
public static final String ACTION_REINIT_SETTINGS = BuildConfig.APPLICATION_ID + ".REINIT_SETTINGS";
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
log.info("Received broadcast: re-initializing logger");
|
||||
log.info("Received broadcast: re-initializing settings (logger/cert manager)");
|
||||
|
||||
App app = (App)context.getApplicationContext();
|
||||
app.reinitLogger();
|
||||
|
@ -161,6 +161,9 @@ public class AppSettingsActivity extends AppCompatActivity {
|
||||
// re-initialize certificate manager
|
||||
App app = (App)getContext().getApplicationContext();
|
||||
app.reinitCertManager();
|
||||
|
||||
// reinitialize certificate manager of :sync process
|
||||
getContext().sendBroadcast(new Intent(App.ReinitSettingsReceiver.ACTION_REINIT_SETTINGS));
|
||||
}
|
||||
|
||||
private void resetCertificates() {
|
||||
@ -176,7 +179,7 @@ public class AppSettingsActivity extends AppCompatActivity {
|
||||
app.reinitLogger();
|
||||
|
||||
// reinitialize logger of :sync process
|
||||
getContext().sendBroadcast(new Intent("com.etesync.syncadapter.REINIT_LOGGER"));
|
||||
getContext().sendBroadcast(new Intent(App.ReinitSettingsReceiver.ACTION_REINIT_SETTINGS));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
-->
|
||||
|
||||
<account-authenticator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:accountType="com.etesync.syncadapter"
|
||||
android:accountType="@string/account_type"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:smallIcon="@mipmap/ic_launcher"
|
||||
|
Loading…
Reference in New Issue
Block a user