ImportExportPrefsInterface rename
This commit is contained in:
parent
6ac01a26cd
commit
eacdbffebc
7 changed files with 13 additions and 13 deletions
|
@ -15,7 +15,7 @@ import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
|
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
|
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.PluginStore
|
import info.nightscout.androidaps.plugins.configBuilder.PluginStore
|
||||||
import info.nightscout.androidaps.plugins.general.maintenance.ImportExportPrefs
|
import info.nightscout.androidaps.plugins.general.maintenance.ImportExportPrefsImpl
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.DataSyncSelectorImplementation
|
import info.nightscout.androidaps.plugins.general.nsclient.DataSyncSelectorImplementation
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.UploadQueue
|
import info.nightscout.androidaps.plugins.general.nsclient.UploadQueue
|
||||||
import info.nightscout.androidaps.plugins.general.smsCommunicator.SmsCommunicatorPlugin
|
import info.nightscout.androidaps.plugins.general.smsCommunicator.SmsCommunicatorPlugin
|
||||||
|
@ -83,7 +83,7 @@ open class AppModule {
|
||||||
@Binds fun bindTreatmentsInterface(treatmentsPlugin: TreatmentsPlugin): TreatmentsInterface
|
@Binds fun bindTreatmentsInterface(treatmentsPlugin: TreatmentsPlugin): TreatmentsInterface
|
||||||
@Binds fun bindDatabaseHelperInterface(databaseHelperProvider: DatabaseHelperProvider): DatabaseHelperInterface
|
@Binds fun bindDatabaseHelperInterface(databaseHelperProvider: DatabaseHelperProvider): DatabaseHelperInterface
|
||||||
@Binds fun bindNotificationHolderInterface(notificationHolder: NotificationHolder): NotificationHolderInterface
|
@Binds fun bindNotificationHolderInterface(notificationHolder: NotificationHolder): NotificationHolderInterface
|
||||||
@Binds fun bindImportExportPrefsInterface(importExportPrefs: ImportExportPrefs): ImportExportPrefsInterface
|
@Binds fun bindImportExportPrefsInterface(importExportPrefs: ImportExportPrefsImpl): ImportExportPrefs
|
||||||
@Binds fun bindIconsProviderInterface(iconsProvider: IconsProviderImplementation): IconsProvider
|
@Binds fun bindIconsProviderInterface(iconsProvider: IconsProviderImplementation): IconsProvider
|
||||||
@Binds fun bindLoopInterface(loopPlugin: LoopPlugin): LoopInterface
|
@Binds fun bindLoopInterface(loopPlugin: LoopPlugin): LoopInterface
|
||||||
@Binds fun bindIobCobCalculatorInterface(iobCobCalculatorPlugin: IobCobCalculatorPlugin): IobCobCalculator
|
@Binds fun bindIobCobCalculatorInterface(iobCobCalculatorPlugin: IobCobCalculatorPlugin): IobCobCalculator
|
||||||
|
|
|
@ -20,7 +20,7 @@ import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
import info.nightscout.androidaps.events.EventAppExit
|
import info.nightscout.androidaps.events.EventAppExit
|
||||||
import info.nightscout.androidaps.interfaces.Config
|
import info.nightscout.androidaps.interfaces.Config
|
||||||
import info.nightscout.androidaps.interfaces.ImportExportPrefsInterface
|
import info.nightscout.androidaps.interfaces.ImportExportPrefs
|
||||||
import info.nightscout.androidaps.logging.AAPSLogger
|
import info.nightscout.androidaps.logging.AAPSLogger
|
||||||
import info.nightscout.androidaps.logging.LTag
|
import info.nightscout.androidaps.logging.LTag
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
|
@ -50,7 +50,7 @@ import kotlin.system.exitProcess
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
class ImportExportPrefs @Inject constructor(
|
class ImportExportPrefsImpl @Inject constructor(
|
||||||
private var log: AAPSLogger,
|
private var log: AAPSLogger,
|
||||||
private val resourceHelper: ResourceHelper,
|
private val resourceHelper: ResourceHelper,
|
||||||
private val sp: SP,
|
private val sp: SP,
|
||||||
|
@ -64,7 +64,7 @@ class ImportExportPrefs @Inject constructor(
|
||||||
private val prefFileList: PrefFileListProvider,
|
private val prefFileList: PrefFileListProvider,
|
||||||
private val uel: UserEntryLogger,
|
private val uel: UserEntryLogger,
|
||||||
private val dateUtil: DateUtil
|
private val dateUtil: DateUtil
|
||||||
) : ImportExportPrefsInterface {
|
) : ImportExportPrefs {
|
||||||
|
|
||||||
override fun prefsFileExists(): Boolean {
|
override fun prefsFileExists(): Boolean {
|
||||||
return prefFileList.listPreferenceFiles().size > 0
|
return prefFileList.listPreferenceFiles().size > 0
|
|
@ -14,7 +14,7 @@ import info.nightscout.androidaps.databinding.MaintenanceFragmentBinding
|
||||||
import info.nightscout.androidaps.events.EventNewBG
|
import info.nightscout.androidaps.events.EventNewBG
|
||||||
import info.nightscout.androidaps.interfaces.DataSyncSelector
|
import info.nightscout.androidaps.interfaces.DataSyncSelector
|
||||||
import info.nightscout.androidaps.interfaces.DatabaseHelperInterface
|
import info.nightscout.androidaps.interfaces.DatabaseHelperInterface
|
||||||
import info.nightscout.androidaps.interfaces.ImportExportPrefsInterface
|
import info.nightscout.androidaps.interfaces.ImportExportPrefs
|
||||||
import info.nightscout.androidaps.interfaces.PumpSync
|
import info.nightscout.androidaps.interfaces.PumpSync
|
||||||
import info.nightscout.androidaps.logging.AAPSLogger
|
import info.nightscout.androidaps.logging.AAPSLogger
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
|
@ -35,7 +35,7 @@ class MaintenanceFragment : DaggerFragment() {
|
||||||
@Inject lateinit var maintenancePlugin: MaintenancePlugin
|
@Inject lateinit var maintenancePlugin: MaintenancePlugin
|
||||||
@Inject lateinit var rxBus: RxBusWrapper
|
@Inject lateinit var rxBus: RxBusWrapper
|
||||||
@Inject lateinit var resourceHelper: ResourceHelper
|
@Inject lateinit var resourceHelper: ResourceHelper
|
||||||
@Inject lateinit var importExportPrefs: ImportExportPrefsInterface
|
@Inject lateinit var importExportPrefs: ImportExportPrefs
|
||||||
@Inject lateinit var aapsSchedulers: AapsSchedulers
|
@Inject lateinit var aapsSchedulers: AapsSchedulers
|
||||||
@Inject lateinit var repository: AppRepository
|
@Inject lateinit var repository: AppRepository
|
||||||
@Inject lateinit var databaseHelper: DatabaseHelperInterface
|
@Inject lateinit var databaseHelper: DatabaseHelperInterface
|
||||||
|
|
|
@ -15,7 +15,7 @@ import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
import info.nightscout.androidaps.databinding.TreatmentsUserEntryFragmentBinding
|
import info.nightscout.androidaps.databinding.TreatmentsUserEntryFragmentBinding
|
||||||
import info.nightscout.androidaps.databinding.TreatmentsUserEntryItemBinding
|
import info.nightscout.androidaps.databinding.TreatmentsUserEntryItemBinding
|
||||||
import info.nightscout.androidaps.events.EventPreferenceChange
|
import info.nightscout.androidaps.events.EventPreferenceChange
|
||||||
import info.nightscout.androidaps.interfaces.ImportExportPrefsInterface
|
import info.nightscout.androidaps.interfaces.ImportExportPrefs
|
||||||
import info.nightscout.androidaps.interfaces.ProfileFunction
|
import info.nightscout.androidaps.interfaces.ProfileFunction
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
|
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
|
||||||
|
@ -42,7 +42,7 @@ class TreatmentsUserEntryFragment : DaggerFragment() {
|
||||||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||||
@Inject lateinit var rxBus: RxBusWrapper
|
@Inject lateinit var rxBus: RxBusWrapper
|
||||||
@Inject lateinit var translator: Translator
|
@Inject lateinit var translator: Translator
|
||||||
@Inject lateinit var importExportPrefs: ImportExportPrefsInterface
|
@Inject lateinit var importExportPrefs: ImportExportPrefs
|
||||||
@Inject lateinit var uel: UserEntryLogger
|
@Inject lateinit var uel: UserEntryLogger
|
||||||
@Inject lateinit var userEntryPresentationHelper: UserEntryPresentationHelper
|
@Inject lateinit var userEntryPresentationHelper: UserEntryPresentationHelper
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ class SWDefinition @Inject constructor(
|
||||||
private val loopPlugin: LoopPlugin,
|
private val loopPlugin: LoopPlugin,
|
||||||
private val nsClientPlugin: NSClientPlugin,
|
private val nsClientPlugin: NSClientPlugin,
|
||||||
private val nsProfilePlugin: NSProfilePlugin,
|
private val nsProfilePlugin: NSProfilePlugin,
|
||||||
private val importExportPrefs: ImportExportPrefsInterface,
|
private val importExportPrefs: ImportExportPrefs,
|
||||||
private val androidPermission: AndroidPermission,
|
private val androidPermission: AndroidPermission,
|
||||||
private val cryptoUtil: CryptoUtil,
|
private val cryptoUtil: CryptoUtil,
|
||||||
private val config: ConfigImpl
|
private val config: ConfigImpl
|
||||||
|
|
|
@ -6,7 +6,7 @@ import androidx.activity.result.contract.ActivityResultContracts
|
||||||
import androidx.core.app.ActivityCompat
|
import androidx.core.app.ActivityCompat
|
||||||
import dagger.android.support.DaggerAppCompatActivity
|
import dagger.android.support.DaggerAppCompatActivity
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.androidaps.core.R
|
||||||
import info.nightscout.androidaps.interfaces.ImportExportPrefsInterface
|
import info.nightscout.androidaps.interfaces.ImportExportPrefs
|
||||||
import info.nightscout.androidaps.plugins.general.maintenance.PrefsFileContract
|
import info.nightscout.androidaps.plugins.general.maintenance.PrefsFileContract
|
||||||
import info.nightscout.androidaps.utils.alertDialogs.OKDialog
|
import info.nightscout.androidaps.utils.alertDialogs.OKDialog
|
||||||
import info.nightscout.androidaps.utils.permissions.OptimizationPermissionContract
|
import info.nightscout.androidaps.utils.permissions.OptimizationPermissionContract
|
||||||
|
@ -16,7 +16,7 @@ import javax.inject.Inject
|
||||||
open class DaggerAppCompatActivityWithResult : DaggerAppCompatActivity() {
|
open class DaggerAppCompatActivityWithResult : DaggerAppCompatActivity() {
|
||||||
|
|
||||||
@Inject lateinit var resourceHelper: ResourceHelperImplementation
|
@Inject lateinit var resourceHelper: ResourceHelperImplementation
|
||||||
@Inject lateinit var importExportPrefs: ImportExportPrefsInterface
|
@Inject lateinit var importExportPrefs: ImportExportPrefs
|
||||||
|
|
||||||
val callForPrefFile = registerForActivityResult(PrefsFileContract()) {
|
val callForPrefFile = registerForActivityResult(PrefsFileContract()) {
|
||||||
it?.let {
|
it?.let {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import info.nightscout.androidaps.database.entities.UserEntry
|
||||||
import info.nightscout.androidaps.plugins.general.maintenance.PrefsFile
|
import info.nightscout.androidaps.plugins.general.maintenance.PrefsFile
|
||||||
import io.reactivex.Single
|
import io.reactivex.Single
|
||||||
|
|
||||||
interface ImportExportPrefsInterface {
|
interface ImportExportPrefs {
|
||||||
|
|
||||||
fun importSharedPreferences(activity: FragmentActivity, importFile: PrefsFile)
|
fun importSharedPreferences(activity: FragmentActivity, importFile: PrefsFile)
|
||||||
fun importSharedPreferences(activity: FragmentActivity)
|
fun importSharedPreferences(activity: FragmentActivity)
|
Loading…
Reference in a new issue