From ac22ece30d73f02b3971ba22e877078a3c01a350 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 14 Mar 2019 20:37:03 +0000 Subject: [PATCH] Don't use a separate :sync process anymore so prefs don't need IPC. Fixes #67 --- app/src/main/AndroidManifest.xml | 11 ----------- .../main/java/com/etesync/syncadapter/App.kt | 17 ----------------- .../syncadapter/ui/AppSettingsActivity.kt | 3 --- 3 files changed, 31 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 3e797712..d8c2337e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -54,14 +54,6 @@ android:theme="@style/AppTheme" tools:ignore="UnusedAttribute"> - - - - - @@ -96,7 +88,6 @@ @@ -141,7 +132,6 @@ @@ -155,7 +145,6 @@ diff --git a/app/src/main/java/com/etesync/syncadapter/App.kt b/app/src/main/java/com/etesync/syncadapter/App.kt index 404d3b8a..62040c42 100644 --- a/app/src/main/java/com/etesync/syncadapter/App.kt +++ b/app/src/main/java/com/etesync/syncadapter/App.kt @@ -137,23 +137,6 @@ class App : Application() { Logger.initialize(this) } - - class ReinitSettingsReceiver : BroadcastReceiver() { - - override fun onReceive(context: Context, intent: Intent) { - Logger.log.info("Received broadcast: re-initializing settings (logger/cert manager)") - - val app = context.applicationContext as App - app.reinitLogger() - } - - companion object { - - val ACTION_REINIT_SETTINGS = BuildConfig.APPLICATION_ID + ".REINIT_SETTINGS" - } - - } - private class MyDatabaseSource internal constructor(context: Context, entityModel: EntityModel, version: Int) : DatabaseSource(context, entityModel, version) { override fun onUpgrade(db: SQLiteDatabase, oldVersion: Int, newVersion: Int) { diff --git a/app/src/main/java/com/etesync/syncadapter/ui/AppSettingsActivity.kt b/app/src/main/java/com/etesync/syncadapter/ui/AppSettingsActivity.kt index 9f8cdfa6..862bb94a 100644 --- a/app/src/main/java/com/etesync/syncadapter/ui/AppSettingsActivity.kt +++ b/app/src/main/java/com/etesync/syncadapter/ui/AppSettingsActivity.kt @@ -147,9 +147,6 @@ class AppSettingsActivity : BaseActivity() { // re-initialize certificate manager val app = context!!.applicationContext as App app.reinitCertManager() - - // reinitialize certificate manager of :sync process - context!!.sendBroadcast(Intent(App.ReinitSettingsReceiver.ACTION_REINIT_SETTINGS)) } private fun resetCertificates() {