1
0
mirror of https://github.com/etesync/android synced 2024-12-23 15:18:14 +00:00

Don't use a separate :sync process anymore so prefs don't need IPC.

Fixes #67
This commit is contained in:
Tom Hacohen 2019-03-14 20:37:03 +00:00
parent 21c64d58ec
commit ac22ece30d
3 changed files with 0 additions and 31 deletions

View File

@ -54,14 +54,6 @@
android:theme="@style/AppTheme"
tools:ignore="UnusedAttribute">
<receiver
android:name=".App$ReinitSettingsReceiver"
android:exported="false"
android:process=":sync">
<intent-filter>
<action android:name="com.etesync.syncadapter.REINIT_SETTINGS"/>
</intent-filter>
</receiver>
<receiver
android:name=".App$AppUpdatedReceiver"
android:exported="true">
@ -96,7 +88,6 @@
<service
android:name=".syncadapter.CalendarsSyncAdapterService"
android:exported="true"
android:process=":sync"
tools:ignore="ExportedService">
<intent-filter>
<action android:name="android.content.SyncAdapter" />
@ -141,7 +132,6 @@
<service
android:name=".syncadapter.AddressBooksSyncAdapterService"
android:exported="true"
android:process=":sync"
tools:ignore="ExportedService">
<intent-filter>
<action android:name="android.content.SyncAdapter"/>
@ -155,7 +145,6 @@
<service
android:name=".syncadapter.ContactsSyncAdapterService"
android:exported="true"
android:process=":sync"
tools:ignore="ExportedService">
<intent-filter>
<action android:name="android.content.SyncAdapter"/>

View File

@ -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) {

View File

@ -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() {