From 9c6030ce0b2d29a3d189bd78e9b8810874ac0d7a Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Tue, 26 Sep 2023 12:44:36 +0200 Subject: [PATCH] :plugins:configuration cleanup --- app/src/main/kotlin/app/aaps/MainActivity.kt | 12 +++--- app/src/main/kotlin/app/aaps/MainApp.kt | 4 +- .../aaps/activities/MyPreferenceFragment.kt | 10 ++--- .../aaps/activities/PreferencesActivity.kt | 4 +- .../main/kotlin/app/aaps/di/AppComponent.kt | 2 +- .../kotlin/app/aaps/di/PluginsListModule.kt | 4 +- .../aaps/implementations/UiInteractionImpl.kt | 6 +-- .../app/aaps/receivers/KeepAliveWorker.kt | 6 +-- .../maintenance/MaintenancePluginTest.kt | 2 +- plugins/configuration/build.gradle | 3 +- .../configuration/AndroidPermissionImpl.kt | 4 +- .../DaggerAppCompatActivityWithResult.kt | 10 ++--- .../OptimizationPermissionContract.kt | 2 +- .../activities/SingleFragmentActivity.kt | 6 +-- .../configBuilder/ConfigBuilderFragment.kt | 10 ++--- .../configBuilder/ConfigBuilderPlugin.kt | 6 +-- .../configBuilder/RunningConfigurationImpl.kt | 4 +- .../events/EventConfigBuilderUpdateGui.kt | 2 +- .../configuration/di/ConfigurationModule.kt | 28 +++++++------- .../configuration/di/SetupWizardModule.kt | 38 +++++++++---------- .../CustomWatchfaceFileContract.kt | 4 +- .../maintenance/ImportExportPrefsImpl.kt | 20 +++++----- .../maintenance/MaintenanceFragment.kt | 8 ++-- .../maintenance/MaintenancePlugin.kt | 4 +- .../maintenance/PrefFileListProviderImpl.kt | 10 ++--- .../maintenance/PrefsFileContract.kt | 4 +- .../maintenance/PrefsMetadataKeyImpl.kt | 6 +-- .../CustomWatchfaceImportListActivity.kt | 8 ++-- .../activities/LogSettingActivity.kt | 6 +-- .../activities/PrefImportListActivity.kt | 14 +++---- .../maintenance/data/PrefsFormat.kt | 4 +- .../dialogs/PrefImportSummaryDialog.kt | 10 ++--- .../formats/EncryptedPrefsFormat.kt | 20 +++++----- .../configuration/setupwizard/SWDefinition.kt | 30 +++++++-------- .../setupwizard/SWEventListener.kt | 4 +- .../configuration/setupwizard/SWScreen.kt | 4 +- .../setupwizard/SetupWizardActivity.kt | 20 +++++----- .../setupwizard/elements/SWBreak.kt | 2 +- .../setupwizard/elements/SWButton.kt | 2 +- .../elements/SWEditEncryptedPassword.kt | 4 +- .../setupwizard/elements/SWEditIntNumber.kt | 4 +- .../setupwizard/elements/SWEditNumber.kt | 4 +- .../elements/SWEditNumberWithUnits.kt | 4 +- .../setupwizard/elements/SWEditString.kt | 2 +- .../setupwizard/elements/SWEditUrl.kt | 4 +- .../setupwizard/elements/SWFragment.kt | 4 +- .../setupwizard/elements/SWHtmlLink.kt | 2 +- .../setupwizard/elements/SWInfoText.kt | 2 +- .../setupwizard/elements/SWItem.kt | 2 +- .../setupwizard/elements/SWPlugin.kt | 8 ++-- .../setupwizard/elements/SWPreference.kt | 4 +- .../setupwizard/elements/SWRadioButton.kt | 2 +- .../setupwizard/events/EventSWLabel.kt | 2 +- .../formats/EncryptedPrefsFormatTest.kt | 14 +++---- .../formats/SingleStringStorage.kt | 2 +- 55 files changed, 204 insertions(+), 203 deletions(-) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/AndroidPermissionImpl.kt (98%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/activities/DaggerAppCompatActivityWithResult.kt (92%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/activities/OptimizationPermissionContract.kt (92%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/activities/SingleFragmentActivity.kt (92%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/configBuilder/ConfigBuilderFragment.kt (97%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/configBuilder/ConfigBuilderPlugin.kt (99%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/configBuilder/RunningConfigurationImpl.kt (98%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/configBuilder/events/EventConfigBuilderUpdateGui.kt (64%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/di/ConfigurationModule.kt (69%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/di/SetupWizardModule.kt (55%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/maintenance/CustomWatchfaceFileContract.kt (77%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/maintenance/ImportExportPrefsImpl.kt (96%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/maintenance/MaintenanceFragment.kt (97%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/maintenance/MaintenancePlugin.kt (99%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/maintenance/PrefFileListProviderImpl.kt (97%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/maintenance/PrefsFileContract.kt (86%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/maintenance/PrefsMetadataKeyImpl.kt (92%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/maintenance/activities/CustomWatchfaceImportListActivity.kt (96%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/maintenance/activities/LogSettingActivity.kt (91%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/maintenance/activities/PrefImportListActivity.kt (90%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/maintenance/data/PrefsFormat.kt (93%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/maintenance/dialogs/PrefImportSummaryDialog.kt (96%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/maintenance/formats/EncryptedPrefsFormat.kt (94%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/setupwizard/SWDefinition.kt (95%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/setupwizard/SWEventListener.kt (94%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/setupwizard/SWScreen.kt (90%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/setupwizard/SetupWizardActivity.kt (93%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/setupwizard/elements/SWBreak.kt (93%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/setupwizard/elements/SWButton.kt (95%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/setupwizard/elements/SWEditEncryptedPassword.kt (98%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/setupwizard/elements/SWEditIntNumber.kt (97%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/setupwizard/elements/SWEditNumber.kt (97%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/setupwizard/elements/SWEditNumberWithUnits.kt (97%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/setupwizard/elements/SWEditString.kt (97%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/setupwizard/elements/SWEditUrl.kt (93%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/setupwizard/elements/SWFragment.kt (82%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/setupwizard/elements/SWHtmlLink.kt (95%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/setupwizard/elements/SWInfoText.kt (94%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/setupwizard/elements/SWItem.kt (98%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/setupwizard/elements/SWPlugin.kt (91%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/setupwizard/elements/SWPreference.kt (90%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/setupwizard/elements/SWRadioButton.kt (97%) rename plugins/configuration/src/main/kotlin/app/aaps/{ => plugins}/configuration/setupwizard/events/EventSWLabel.kt (62%) diff --git a/app/src/main/kotlin/app/aaps/MainActivity.kt b/app/src/main/kotlin/app/aaps/MainActivity.kt index 901ffd821f..96744efb95 100644 --- a/app/src/main/kotlin/app/aaps/MainActivity.kt +++ b/app/src/main/kotlin/app/aaps/MainActivity.kt @@ -31,9 +31,6 @@ import androidx.core.view.MenuProvider import androidx.viewpager2.widget.ViewPager2 import app.aaps.activities.HistoryBrowseActivity import app.aaps.activities.PreferencesActivity -import app.aaps.configuration.activities.DaggerAppCompatActivityWithResult -import app.aaps.configuration.activities.SingleFragmentActivity -import app.aaps.configuration.setupwizard.SetupWizardActivity import app.aaps.core.interfaces.androidPermissions.AndroidPermission import app.aaps.core.interfaces.aps.Loop import app.aaps.core.interfaces.configuration.Config @@ -62,6 +59,9 @@ import app.aaps.core.ui.toast.ToastUtils import app.aaps.core.utils.isRunningRealPumpTest import app.aaps.database.entities.UserEntry.Action import app.aaps.database.entities.UserEntry.Sources +import app.aaps.plugins.configuration.activities.DaggerAppCompatActivityWithResult +import app.aaps.plugins.configuration.activities.SingleFragmentActivity +import app.aaps.plugins.configuration.setupwizard.SetupWizardActivity import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.tabs.TabLayoutMediator import com.google.firebase.crashlytics.FirebaseCrashlytics @@ -209,8 +209,8 @@ class MainActivity : DaggerAppCompatActivityWithResult() { R.id.nav_about -> { var message = "Build: ${BuildConfig.BUILDVERSION}\n" message += "Flavor: ${BuildConfig.FLAVOR}${BuildConfig.BUILD_TYPE}\n" - message += "${rh.gs(app.aaps.configuration.R.string.configbuilder_nightscoutversion_label)} ${activePlugin.activeNsClient?.detectedNsVersion() ?: rh.gs(info.nightscout.plugins.R.string.not_available_full)}" - if (config.isEngineeringMode()) message += "\n${rh.gs(app.aaps.configuration.R.string.engineering_mode_enabled)}" + message += "${rh.gs(app.aaps.plugins.configuration.R.string.configbuilder_nightscoutversion_label)} ${activePlugin.activeNsClient?.detectedNsVersion() ?: rh.gs(info.nightscout.plugins.R.string.not_available_full)}" + if (config.isEngineeringMode()) message += "\n${rh.gs(app.aaps.plugins.configuration.R.string.engineering_mode_enabled)}" if (config.isUnfinishedMode()) message += "\nUnfinished mode enabled" if (!fabricPrivacy.fabricEnabled()) message += "\n${rh.gs(app.aaps.core.ui.R.string.fabric_upload_disabled)}" message += rh.gs(app.aaps.core.ui.R.string.about_link_urls) @@ -309,7 +309,7 @@ class MainActivity : DaggerAppCompatActivityWithResult() { } private fun startWizard(): Boolean = - !sp.getBoolean(app.aaps.configuration.R.string.key_setupwizard_processed, false) + !sp.getBoolean(app.aaps.plugins.configuration.R.string.key_setupwizard_processed, false) override fun onPostCreate(savedInstanceState: Bundle?, persistentState: PersistableBundle?) { super.onPostCreate(savedInstanceState, persistentState) diff --git a/app/src/main/kotlin/app/aaps/MainApp.kt b/app/src/main/kotlin/app/aaps/MainApp.kt index aca19f24b5..4eeb983dd0 100644 --- a/app/src/main/kotlin/app/aaps/MainApp.kt +++ b/app/src/main/kotlin/app/aaps/MainApp.kt @@ -225,8 +225,8 @@ class MainApp : DaggerApplication() { } if (!sp.contains(info.nightscout.plugins.sync.R.string.key_ns_log_app_started_event)) sp.putBoolean(info.nightscout.plugins.sync.R.string.key_ns_log_app_started_event, config.APS) - if (sp.getString(app.aaps.configuration.R.string.key_maintenance_logs_email, "") == "logs@androidaps.org") - sp.putString(app.aaps.configuration.R.string.key_maintenance_logs_email, "logs@aaps.app") + if (sp.getString(app.aaps.plugins.configuration.R.string.key_maintenance_logs_email, "") == "logs@androidaps.org") + sp.putString(app.aaps.plugins.configuration.R.string.key_maintenance_logs_email, "logs@aaps.app") // fix values for theme switching sp.putString(info.nightscout.plugins.R.string.value_dark_theme, "dark") sp.putString(info.nightscout.plugins.R.string.value_light_theme, "light") diff --git a/app/src/main/kotlin/app/aaps/activities/MyPreferenceFragment.kt b/app/src/main/kotlin/app/aaps/activities/MyPreferenceFragment.kt index b47eab04d2..c71b7eda1f 100644 --- a/app/src/main/kotlin/app/aaps/activities/MyPreferenceFragment.kt +++ b/app/src/main/kotlin/app/aaps/activities/MyPreferenceFragment.kt @@ -15,7 +15,6 @@ import androidx.preference.PreferenceGroup import androidx.preference.PreferenceManager import androidx.preference.PreferenceScreen import androidx.preference.size -import app.aaps.configuration.maintenance.MaintenancePlugin import app.aaps.core.interfaces.configuration.Config import app.aaps.core.interfaces.nsclient.NSSettingsStatus import app.aaps.core.interfaces.plugin.PluginBase @@ -39,6 +38,7 @@ import app.aaps.plugins.aps.openAPSAMA.OpenAPSAMAPlugin import app.aaps.plugins.aps.openAPSSMB.OpenAPSSMBPlugin import app.aaps.plugins.aps.openAPSSMBDynamicISF.OpenAPSSMBDynamicISFPlugin import app.aaps.plugins.automation.AutomationPlugin +import app.aaps.plugins.configuration.maintenance.MaintenancePlugin import dagger.android.support.AndroidSupportInjection import info.nightscout.androidaps.R import info.nightscout.androidaps.danaRKorean.DanaRKoreanPlugin @@ -226,7 +226,7 @@ class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChang addPreferencesFromResourceIfEnabled(wearPlugin, rootKey) addPreferencesFromResourceIfEnabled(statusLinePlugin, rootKey) addPreferencesFromResource(R.xml.pref_alerts, rootKey) - addPreferencesFromResource(app.aaps.configuration.R.xml.pref_datachoices, rootKey) + addPreferencesFromResource(app.aaps.plugins.configuration.R.xml.pref_datachoices, rootKey) addPreferencesFromResourceIfEnabled(maintenancePlugin, rootKey) addPreferencesFromResourceIfEnabled(openHumansUploaderPlugin, rootKey) } @@ -252,7 +252,7 @@ class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChang } if (key == rh.gs(info.nightscout.core.utils.R.string.key_use_autosens) && sp.getBoolean(info.nightscout.core.utils.R.string.key_use_autosens, false)) { activity?.let { - OKDialog.show(it, rh.gs(app.aaps.configuration.R.string.configbuilder_sensitivity), rh.gs(R.string.sensitivity_warning)) + OKDialog.show(it, rh.gs(app.aaps.plugins.configuration.R.string.configbuilder_sensitivity), rh.gs(R.string.sensitivity_warning)) } } checkForBiometricFallback(key) @@ -278,7 +278,7 @@ class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChang activity?.let { val title = rh.gs(app.aaps.core.ui.R.string.unsecure_fallback_biometric) val message = - rh.gs(app.aaps.configuration.R.string.master_password_missing, rh.gs(app.aaps.configuration.R.string.configbuilder_general), rh.gs(app.aaps.configuration.R.string.protection)) + rh.gs(app.aaps.plugins.configuration.R.string.master_password_missing, rh.gs(app.aaps.plugins.configuration.R.string.configbuilder_general), rh.gs(app.aaps.plugins.configuration.R.string.protection)) OKDialog.show(it, title = title, message = message) } } @@ -439,7 +439,7 @@ class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChang context?.let { context -> when (preference.key) { rh.gs(info.nightscout.core.utils.R.string.key_master_password) -> { - passwordCheck.queryPassword(context, app.aaps.configuration.R.string.current_master_password, info.nightscout.core.utils.R.string.key_master_password, { + passwordCheck.queryPassword(context, app.aaps.plugins.configuration.R.string.current_master_password, info.nightscout.core.utils.R.string.key_master_password, { passwordCheck.setPassword(context, app.aaps.core.ui.R.string.master_password, info.nightscout.core.utils.R.string.key_master_password) }) true diff --git a/app/src/main/kotlin/app/aaps/activities/PreferencesActivity.kt b/app/src/main/kotlin/app/aaps/activities/PreferencesActivity.kt index 2115ee0f80..656146f503 100644 --- a/app/src/main/kotlin/app/aaps/activities/PreferencesActivity.kt +++ b/app/src/main/kotlin/app/aaps/activities/PreferencesActivity.kt @@ -8,7 +8,7 @@ import androidx.appcompat.widget.SearchView import androidx.core.view.MenuProvider import androidx.preference.PreferenceFragmentCompat import androidx.preference.PreferenceScreen -import app.aaps.configuration.activities.DaggerAppCompatActivityWithResult +import app.aaps.plugins.configuration.activities.DaggerAppCompatActivityWithResult import info.nightscout.androidaps.R import info.nightscout.androidaps.databinding.ActivityPreferencesBinding @@ -25,7 +25,7 @@ class PreferencesActivity : DaggerAppCompatActivityWithResult(), PreferenceFragm binding = ActivityPreferencesBinding.inflate(layoutInflater) setContentView(binding.root) - title = rh.gs(app.aaps.configuration.R.string.nav_preferences) + title = rh.gs(app.aaps.plugins.configuration.R.string.nav_preferences) supportActionBar?.setDisplayHomeAsUpEnabled(true) supportActionBar?.setDisplayShowHomeEnabled(true) myPreferenceFragment = MyPreferenceFragment() diff --git a/app/src/main/kotlin/app/aaps/di/AppComponent.kt b/app/src/main/kotlin/app/aaps/di/AppComponent.kt index ae16146a17..4971b924a5 100644 --- a/app/src/main/kotlin/app/aaps/di/AppComponent.kt +++ b/app/src/main/kotlin/app/aaps/di/AppComponent.kt @@ -1,12 +1,12 @@ package app.aaps.di import app.aaps.MainApp -import app.aaps.configuration.di.ConfigurationModule import app.aaps.core.main.di.CoreModule import app.aaps.core.validators.di.ValidatorsModule import app.aaps.implementation.di.ImplementationModule import app.aaps.plugins.aps.di.ApsModule import app.aaps.plugins.automation.di.AutomationModule +import app.aaps.plugins.configuration.di.ConfigurationModule import app.aaps.shared.impl.di.SharedImplModule import dagger.BindsInstance import dagger.Component diff --git a/app/src/main/kotlin/app/aaps/di/PluginsListModule.kt b/app/src/main/kotlin/app/aaps/di/PluginsListModule.kt index c518705f4f..a89810a1a5 100644 --- a/app/src/main/kotlin/app/aaps/di/PluginsListModule.kt +++ b/app/src/main/kotlin/app/aaps/di/PluginsListModule.kt @@ -1,7 +1,5 @@ package app.aaps.di -import app.aaps.configuration.configBuilder.ConfigBuilderPlugin -import app.aaps.configuration.maintenance.MaintenancePlugin import app.aaps.core.interfaces.plugin.PluginBase import app.aaps.plugins.aps.autotune.AutotunePlugin import app.aaps.plugins.aps.loop.LoopPlugin @@ -9,6 +7,8 @@ import app.aaps.plugins.aps.openAPSAMA.OpenAPSAMAPlugin import app.aaps.plugins.aps.openAPSSMB.OpenAPSSMBPlugin import app.aaps.plugins.aps.openAPSSMBDynamicISF.OpenAPSSMBDynamicISFPlugin import app.aaps.plugins.automation.AutomationPlugin +import app.aaps.plugins.configuration.configBuilder.ConfigBuilderPlugin +import app.aaps.plugins.configuration.maintenance.MaintenancePlugin import dagger.Binds import dagger.Module import dagger.multibindings.IntKey diff --git a/app/src/main/kotlin/app/aaps/implementations/UiInteractionImpl.kt b/app/src/main/kotlin/app/aaps/implementations/UiInteractionImpl.kt index 575947b15c..b367e1aff0 100644 --- a/app/src/main/kotlin/app/aaps/implementations/UiInteractionImpl.kt +++ b/app/src/main/kotlin/app/aaps/implementations/UiInteractionImpl.kt @@ -10,15 +10,15 @@ import app.aaps.MainActivity import app.aaps.activities.HistoryBrowseActivity import app.aaps.activities.MyPreferenceFragment import app.aaps.activities.PreferencesActivity -import app.aaps.configuration.activities.SingleFragmentActivity -import app.aaps.core.main.events.EventNewNotification import app.aaps.core.interfaces.notifications.Notification import app.aaps.core.interfaces.nsclient.NSAlarm import app.aaps.core.interfaces.rx.bus.RxBus import app.aaps.core.interfaces.ui.UiInteraction +import app.aaps.core.main.events.EventNewNotification +import app.aaps.core.ui.toast.ToastUtils +import app.aaps.plugins.configuration.activities.SingleFragmentActivity import dagger.android.HasAndroidInjector import info.nightscout.androidaps.R -import app.aaps.core.ui.toast.ToastUtils import info.nightscout.plugins.general.overview.notifications.NotificationWithAction import info.nightscout.ui.activities.BolusProgressHelperActivity import info.nightscout.ui.activities.ErrorHelperActivity diff --git a/app/src/main/kotlin/app/aaps/receivers/KeepAliveWorker.kt b/app/src/main/kotlin/app/aaps/receivers/KeepAliveWorker.kt index 4bef277f54..0483f61d56 100644 --- a/app/src/main/kotlin/app/aaps/receivers/KeepAliveWorker.kt +++ b/app/src/main/kotlin/app/aaps/receivers/KeepAliveWorker.kt @@ -9,9 +9,6 @@ import androidx.work.WorkManager import androidx.work.WorkQuery import androidx.work.WorkerParameters import androidx.work.workDataOf -import app.aaps.configuration.maintenance.MaintenancePlugin -import app.aaps.core.main.profile.ProfileSealed -import app.aaps.core.main.utils.worker.LoggingWorker import app.aaps.core.interfaces.alerts.LocalAlertUtils import app.aaps.core.interfaces.aps.Loop import app.aaps.core.interfaces.configuration.Config @@ -27,6 +24,9 @@ import app.aaps.core.interfaces.rx.events.EventProfileSwitchChanged import app.aaps.core.interfaces.sharedPreferences.SP import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.interfaces.utils.T +import app.aaps.core.main.profile.ProfileSealed +import app.aaps.core.main.utils.worker.LoggingWorker +import app.aaps.plugins.configuration.maintenance.MaintenancePlugin import com.google.common.util.concurrent.ListenableFuture import info.nightscout.androidaps.R import info.nightscout.database.impl.AppRepository diff --git a/app/src/test/kotlin/app/aaps/configuration/maintenance/MaintenancePluginTest.kt b/app/src/test/kotlin/app/aaps/configuration/maintenance/MaintenancePluginTest.kt index c0cf316d28..75aae777f1 100644 --- a/app/src/test/kotlin/app/aaps/configuration/maintenance/MaintenancePluginTest.kt +++ b/app/src/test/kotlin/app/aaps/configuration/maintenance/MaintenancePluginTest.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.maintenance +package app.aaps.plugins.configuration.maintenance import android.content.Context import app.aaps.core.interfaces.configuration.Config diff --git a/plugins/configuration/build.gradle b/plugins/configuration/build.gradle index b2ce9b4cae..cb33277adb 100644 --- a/plugins/configuration/build.gradle +++ b/plugins/configuration/build.gradle @@ -11,8 +11,9 @@ apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle" apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle" apply from: "${project.rootDir}/core/main/test_dependencies.gradle" apply from: "${project.rootDir}/core/main/jacoco_global.gradle" + android { - namespace 'app.aaps.configuration' + namespace 'app.aaps.plugins.configuration' } diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/AndroidPermissionImpl.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/AndroidPermissionImpl.kt similarity index 98% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/AndroidPermissionImpl.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/AndroidPermissionImpl.kt index d5c9193894..bb1f7a1a0a 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/AndroidPermissionImpl.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/AndroidPermissionImpl.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration +package app.aaps.plugins.configuration import android.Manifest import android.annotation.SuppressLint @@ -13,7 +13,6 @@ import android.os.PowerManager import android.provider.Settings import androidx.core.content.ContextCompat import androidx.fragment.app.FragmentActivity -import app.aaps.configuration.activities.DaggerAppCompatActivityWithResult import app.aaps.core.interfaces.androidPermissions.AndroidPermission import app.aaps.core.interfaces.configuration.Config import app.aaps.core.interfaces.notifications.Notification @@ -22,6 +21,7 @@ import app.aaps.core.interfaces.resources.ResourceHelper import app.aaps.core.interfaces.smsCommunicator.SmsCommunicator import app.aaps.core.ui.dialogs.OKDialog import app.aaps.core.ui.toast.ToastUtils +import app.aaps.plugins.configuration.activities.DaggerAppCompatActivityWithResult import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/activities/DaggerAppCompatActivityWithResult.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/activities/DaggerAppCompatActivityWithResult.kt similarity index 92% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/activities/DaggerAppCompatActivityWithResult.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/activities/DaggerAppCompatActivityWithResult.kt index 465feb5901..bcd52c2e03 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/activities/DaggerAppCompatActivityWithResult.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/activities/DaggerAppCompatActivityWithResult.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.activities +package app.aaps.plugins.configuration.activities import android.Manifest import android.content.Context @@ -6,18 +6,18 @@ import android.content.pm.PackageManager import android.os.Bundle import androidx.activity.result.contract.ActivityResultContracts import androidx.core.app.ActivityCompat -import app.aaps.configuration.R -import app.aaps.configuration.maintenance.CustomWatchfaceFileContract -import app.aaps.configuration.maintenance.PrefsFileContract import app.aaps.core.interfaces.logging.AAPSLogger import app.aaps.core.interfaces.logging.LTag import app.aaps.core.interfaces.maintenance.ImportExportPrefs import app.aaps.core.interfaces.resources.ResourceHelper import app.aaps.core.interfaces.rx.bus.RxBus import app.aaps.core.interfaces.rx.events.EventThemeSwitch -import dagger.android.support.DaggerAppCompatActivity import app.aaps.core.ui.dialogs.OKDialog import app.aaps.core.ui.locale.LocaleHelper +import app.aaps.plugins.configuration.R +import app.aaps.plugins.configuration.maintenance.CustomWatchfaceFileContract +import app.aaps.plugins.configuration.maintenance.PrefsFileContract +import dagger.android.support.DaggerAppCompatActivity import io.reactivex.rxjava3.disposables.CompositeDisposable import javax.inject.Inject diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/activities/OptimizationPermissionContract.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/activities/OptimizationPermissionContract.kt similarity index 92% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/activities/OptimizationPermissionContract.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/activities/OptimizationPermissionContract.kt index 9a379dd8ac..e77ab9e735 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/activities/OptimizationPermissionContract.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/activities/OptimizationPermissionContract.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.activities +package app.aaps.plugins.configuration.activities import android.content.Context import android.content.Intent diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/activities/SingleFragmentActivity.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/activities/SingleFragmentActivity.kt similarity index 92% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/activities/SingleFragmentActivity.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/activities/SingleFragmentActivity.kt index 40a174d79f..0f2886ff0f 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/activities/SingleFragmentActivity.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/activities/SingleFragmentActivity.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.activities +package app.aaps.plugins.configuration.activities import android.content.Intent import android.os.Bundle @@ -6,11 +6,11 @@ import android.view.Menu import android.view.MenuInflater import android.view.MenuItem import androidx.core.view.MenuProvider -import app.aaps.configuration.R import app.aaps.core.interfaces.plugin.ActivePlugin import app.aaps.core.interfaces.plugin.PluginBase import app.aaps.core.interfaces.protection.ProtectionCheck import app.aaps.core.interfaces.ui.UiInteraction +import app.aaps.plugins.configuration.R import javax.inject.Inject class SingleFragmentActivity : DaggerAppCompatActivityWithResult() { @@ -52,7 +52,7 @@ class SingleFragmentActivity : DaggerAppCompatActivityWithResult() { R.id.nav_plugin_preferences -> { protectionCheck.queryProtection(this@SingleFragmentActivity, ProtectionCheck.Protection.PREFERENCES, { val i = Intent(this@SingleFragmentActivity, uiInteraction.preferencesActivity) - .setAction("app.aaps.configuration.activities.SingleFragmentActivity") + .setAction("app.aaps.plugins.configuration.activities.SingleFragmentActivity") .putExtra("id", plugin?.preferencesId) startActivity(i) }, null) diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/configBuilder/ConfigBuilderFragment.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/configBuilder/ConfigBuilderFragment.kt similarity index 97% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/configBuilder/ConfigBuilderFragment.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/configBuilder/ConfigBuilderFragment.kt index b98df264a3..471abec321 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/configBuilder/ConfigBuilderFragment.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/configBuilder/ConfigBuilderFragment.kt @@ -1,13 +1,9 @@ -package app.aaps.configuration.configBuilder +package app.aaps.plugins.configuration.configBuilder import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import app.aaps.configuration.R -import app.aaps.configuration.configBuilder.events.EventConfigBuilderUpdateGui -import app.aaps.configuration.databinding.ConfigbuilderFragmentBinding -import app.aaps.core.main.utils.fabric.FabricPrivacy import app.aaps.core.interfaces.configuration.Config import app.aaps.core.interfaces.configuration.ConfigBuilder import app.aaps.core.interfaces.extensions.toVisibility @@ -18,6 +14,10 @@ import app.aaps.core.interfaces.protection.ProtectionCheck.Protection.PREFERENCE import app.aaps.core.interfaces.rx.AapsSchedulers import app.aaps.core.interfaces.rx.bus.RxBus import app.aaps.core.interfaces.ui.UiInteraction +import app.aaps.core.main.utils.fabric.FabricPrivacy +import app.aaps.plugins.configuration.R +import app.aaps.plugins.configuration.configBuilder.events.EventConfigBuilderUpdateGui +import app.aaps.plugins.configuration.databinding.ConfigbuilderFragmentBinding import dagger.android.support.DaggerFragment import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/configBuilder/ConfigBuilderPlugin.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/configBuilder/ConfigBuilderPlugin.kt similarity index 99% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/configBuilder/ConfigBuilderPlugin.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/configBuilder/ConfigBuilderPlugin.kt index 64a4be1670..3b719d5d5f 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/configBuilder/ConfigBuilderPlugin.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/configBuilder/ConfigBuilderPlugin.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.configBuilder +package app.aaps.plugins.configuration.configBuilder import android.content.Intent import android.view.LayoutInflater @@ -13,8 +13,6 @@ import androidx.annotation.StringRes import androidx.core.content.ContextCompat import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentActivity -import app.aaps.configuration.R -import app.aaps.configuration.configBuilder.events.EventConfigBuilderUpdateGui import app.aaps.core.interfaces.aps.APS import app.aaps.core.interfaces.aps.Sensitivity import app.aaps.core.interfaces.configuration.ConfigBuilder @@ -45,6 +43,8 @@ import app.aaps.core.ui.dialogs.OKDialog import app.aaps.database.entities.UserEntry.Action import app.aaps.database.entities.UserEntry.Sources import app.aaps.database.entities.ValueWithUnit +import app.aaps.plugins.configuration.R +import app.aaps.plugins.configuration.configBuilder.events.EventConfigBuilderUpdateGui import dagger.android.HasAndroidInjector import java.security.InvalidParameterException import javax.inject.Inject diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/configBuilder/RunningConfigurationImpl.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/configBuilder/RunningConfigurationImpl.kt similarity index 98% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/configBuilder/RunningConfigurationImpl.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/configBuilder/RunningConfigurationImpl.kt index fb7d9f7d8e..ce7f5d9988 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/configBuilder/RunningConfigurationImpl.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/configBuilder/RunningConfigurationImpl.kt @@ -1,6 +1,5 @@ -package app.aaps.configuration.configBuilder +package app.aaps.plugins.configuration.configBuilder -import app.aaps.configuration.R import app.aaps.core.interfaces.aps.Sensitivity import app.aaps.core.interfaces.configuration.Config import app.aaps.core.interfaces.configuration.ConfigBuilder @@ -20,6 +19,7 @@ import app.aaps.core.interfaces.smoothing.Smoothing import app.aaps.core.interfaces.ui.UiInteraction import app.aaps.core.nssdk.interfaces.RunningConfiguration import app.aaps.core.nssdk.localmodel.devicestatus.NSDeviceStatus +import app.aaps.plugins.configuration.R import org.json.JSONException import org.json.JSONObject import javax.inject.Inject diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/configBuilder/events/EventConfigBuilderUpdateGui.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/configBuilder/events/EventConfigBuilderUpdateGui.kt similarity index 64% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/configBuilder/events/EventConfigBuilderUpdateGui.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/configBuilder/events/EventConfigBuilderUpdateGui.kt index 75119a4f37..69600c52a9 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/configBuilder/events/EventConfigBuilderUpdateGui.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/configBuilder/events/EventConfigBuilderUpdateGui.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.configBuilder.events +package app.aaps.plugins.configuration.configBuilder.events import app.aaps.core.interfaces.rx.events.EventUpdateGui diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/di/ConfigurationModule.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/di/ConfigurationModule.kt similarity index 69% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/di/ConfigurationModule.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/di/ConfigurationModule.kt index b320df72ae..8642502b5d 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/di/ConfigurationModule.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/di/ConfigurationModule.kt @@ -1,25 +1,25 @@ -package app.aaps.configuration.di +package app.aaps.plugins.configuration.di -import app.aaps.configuration.AndroidPermissionImpl -import app.aaps.configuration.activities.SingleFragmentActivity -import app.aaps.configuration.configBuilder.ConfigBuilderFragment -import app.aaps.configuration.configBuilder.ConfigBuilderPlugin -import app.aaps.configuration.configBuilder.RunningConfigurationImpl -import app.aaps.configuration.maintenance.ImportExportPrefsImpl -import app.aaps.configuration.maintenance.MaintenanceFragment -import app.aaps.configuration.maintenance.PrefFileListProviderImpl -import app.aaps.configuration.maintenance.activities.CustomWatchfaceImportListActivity -import app.aaps.configuration.maintenance.activities.LogSettingActivity -import app.aaps.configuration.maintenance.activities.PrefImportListActivity -import app.aaps.configuration.maintenance.formats.EncryptedPrefsFormat import app.aaps.core.interfaces.androidPermissions.AndroidPermission import app.aaps.core.interfaces.configuration.ConfigBuilder import app.aaps.core.interfaces.maintenance.ImportExportPrefs import app.aaps.core.interfaces.maintenance.PrefFileListProvider +import app.aaps.core.nssdk.interfaces.RunningConfiguration +import app.aaps.plugins.configuration.AndroidPermissionImpl +import app.aaps.plugins.configuration.activities.SingleFragmentActivity +import app.aaps.plugins.configuration.configBuilder.ConfigBuilderFragment +import app.aaps.plugins.configuration.configBuilder.ConfigBuilderPlugin +import app.aaps.plugins.configuration.configBuilder.RunningConfigurationImpl +import app.aaps.plugins.configuration.maintenance.ImportExportPrefsImpl +import app.aaps.plugins.configuration.maintenance.MaintenanceFragment +import app.aaps.plugins.configuration.maintenance.PrefFileListProviderImpl +import app.aaps.plugins.configuration.maintenance.activities.CustomWatchfaceImportListActivity +import app.aaps.plugins.configuration.maintenance.activities.LogSettingActivity +import app.aaps.plugins.configuration.maintenance.activities.PrefImportListActivity +import app.aaps.plugins.configuration.maintenance.formats.EncryptedPrefsFormat import dagger.Binds import dagger.Module import dagger.android.ContributesAndroidInjector -import app.aaps.core.nssdk.interfaces.RunningConfiguration @Module( includes = [ diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/di/SetupWizardModule.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/di/SetupWizardModule.kt similarity index 55% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/di/SetupWizardModule.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/di/SetupWizardModule.kt index b75ee642cd..254109d6c5 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/di/SetupWizardModule.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/di/SetupWizardModule.kt @@ -1,23 +1,23 @@ -package app.aaps.configuration.di +package app.aaps.plugins.configuration.di -import app.aaps.configuration.setupwizard.SWEventListener -import app.aaps.configuration.setupwizard.SWScreen -import app.aaps.configuration.setupwizard.SetupWizardActivity -import app.aaps.configuration.setupwizard.elements.SWBreak -import app.aaps.configuration.setupwizard.elements.SWButton -import app.aaps.configuration.setupwizard.elements.SWEditEncryptedPassword -import app.aaps.configuration.setupwizard.elements.SWEditIntNumber -import app.aaps.configuration.setupwizard.elements.SWEditNumber -import app.aaps.configuration.setupwizard.elements.SWEditNumberWithUnits -import app.aaps.configuration.setupwizard.elements.SWEditString -import app.aaps.configuration.setupwizard.elements.SWEditUrl -import app.aaps.configuration.setupwizard.elements.SWFragment -import app.aaps.configuration.setupwizard.elements.SWHtmlLink -import app.aaps.configuration.setupwizard.elements.SWInfoText -import app.aaps.configuration.setupwizard.elements.SWItem -import app.aaps.configuration.setupwizard.elements.SWPlugin -import app.aaps.configuration.setupwizard.elements.SWPreference -import app.aaps.configuration.setupwizard.elements.SWRadioButton +import app.aaps.plugins.configuration.setupwizard.SWEventListener +import app.aaps.plugins.configuration.setupwizard.SWScreen +import app.aaps.plugins.configuration.setupwizard.SetupWizardActivity +import app.aaps.plugins.configuration.setupwizard.elements.SWBreak +import app.aaps.plugins.configuration.setupwizard.elements.SWButton +import app.aaps.plugins.configuration.setupwizard.elements.SWEditEncryptedPassword +import app.aaps.plugins.configuration.setupwizard.elements.SWEditIntNumber +import app.aaps.plugins.configuration.setupwizard.elements.SWEditNumber +import app.aaps.plugins.configuration.setupwizard.elements.SWEditNumberWithUnits +import app.aaps.plugins.configuration.setupwizard.elements.SWEditString +import app.aaps.plugins.configuration.setupwizard.elements.SWEditUrl +import app.aaps.plugins.configuration.setupwizard.elements.SWFragment +import app.aaps.plugins.configuration.setupwizard.elements.SWHtmlLink +import app.aaps.plugins.configuration.setupwizard.elements.SWInfoText +import app.aaps.plugins.configuration.setupwizard.elements.SWItem +import app.aaps.plugins.configuration.setupwizard.elements.SWPlugin +import app.aaps.plugins.configuration.setupwizard.elements.SWPreference +import app.aaps.plugins.configuration.setupwizard.elements.SWRadioButton import dagger.Module import dagger.android.ContributesAndroidInjector diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/CustomWatchfaceFileContract.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/CustomWatchfaceFileContract.kt similarity index 77% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/CustomWatchfaceFileContract.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/CustomWatchfaceFileContract.kt index dbb4703d1b..916bf49b6b 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/CustomWatchfaceFileContract.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/CustomWatchfaceFileContract.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.maintenance +package app.aaps.plugins.configuration.maintenance import android.content.Context import android.content.Intent @@ -20,6 +20,6 @@ class CustomWatchfaceFileContract : ActivityResultContract() { } override fun createIntent(context: Context, input: Void?): Intent { - return Intent(context, app.aaps.configuration.maintenance.activities.CustomWatchfaceImportListActivity::class.java) + return Intent(context, app.aaps.plugins.configuration.maintenance.activities.CustomWatchfaceImportListActivity::class.java) } } \ No newline at end of file diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/ImportExportPrefsImpl.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/ImportExportPrefsImpl.kt similarity index 96% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/ImportExportPrefsImpl.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/ImportExportPrefsImpl.kt index 2ab11b3515..88b50cd70c 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/ImportExportPrefsImpl.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/ImportExportPrefsImpl.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.maintenance +package app.aaps.plugins.configuration.maintenance import android.Manifest import android.bluetooth.BluetoothManager @@ -18,15 +18,6 @@ import androidx.work.OneTimeWorkRequest import androidx.work.WorkManager import androidx.work.WorkerParameters import androidx.work.workDataOf -import app.aaps.configuration.R -import app.aaps.configuration.activities.DaggerAppCompatActivityWithResult -import app.aaps.configuration.maintenance.data.PrefFileNotFoundError -import app.aaps.configuration.maintenance.data.PrefIOError -import app.aaps.configuration.maintenance.data.Prefs -import app.aaps.configuration.maintenance.data.PrefsFormat -import app.aaps.configuration.maintenance.data.PrefsStatusImpl -import app.aaps.configuration.maintenance.dialogs.PrefImportSummaryDialog -import app.aaps.configuration.maintenance.formats.EncryptedPrefsFormat import app.aaps.core.interfaces.androidPermissions.AndroidPermission import app.aaps.core.interfaces.configuration.Config import app.aaps.core.interfaces.db.PersistenceLayer @@ -61,6 +52,15 @@ import app.aaps.core.ui.toast.ToastUtils import app.aaps.database.entities.UserEntry import app.aaps.database.entities.UserEntry.Action import app.aaps.database.entities.UserEntry.Sources +import app.aaps.plugins.configuration.R +import app.aaps.plugins.configuration.activities.DaggerAppCompatActivityWithResult +import app.aaps.plugins.configuration.maintenance.data.PrefFileNotFoundError +import app.aaps.plugins.configuration.maintenance.data.PrefIOError +import app.aaps.plugins.configuration.maintenance.data.Prefs +import app.aaps.plugins.configuration.maintenance.data.PrefsFormat +import app.aaps.plugins.configuration.maintenance.data.PrefsStatusImpl +import app.aaps.plugins.configuration.maintenance.dialogs.PrefImportSummaryDialog +import app.aaps.plugins.configuration.maintenance.formats.EncryptedPrefsFormat import dagger.android.HasAndroidInjector import kotlinx.coroutines.Dispatchers import java.io.File diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/MaintenanceFragment.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/MaintenanceFragment.kt similarity index 97% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/MaintenanceFragment.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/MaintenanceFragment.kt index c86042b276..06c7369772 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/MaintenanceFragment.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/MaintenanceFragment.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.maintenance +package app.aaps.plugins.configuration.maintenance import android.content.Intent import android.os.Bundle @@ -6,9 +6,6 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.core.text.toSpanned -import app.aaps.configuration.R -import app.aaps.configuration.databinding.MaintenanceFragmentBinding -import app.aaps.configuration.maintenance.activities.LogSettingActivity import app.aaps.core.interfaces.db.PersistenceLayer import app.aaps.core.interfaces.extensions.runOnUiThread import app.aaps.core.interfaces.extensions.toVisibility @@ -34,6 +31,9 @@ import app.aaps.core.ui.dialogs.OKDialog import app.aaps.core.utils.HtmlHelper import app.aaps.database.entities.UserEntry.Action import app.aaps.database.entities.UserEntry.Sources +import app.aaps.plugins.configuration.R +import app.aaps.plugins.configuration.databinding.MaintenanceFragmentBinding +import app.aaps.plugins.configuration.maintenance.activities.LogSettingActivity import dagger.android.support.DaggerFragment import io.reactivex.rxjava3.core.Completable import io.reactivex.rxjava3.disposables.CompositeDisposable diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/MaintenancePlugin.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/MaintenancePlugin.kt similarity index 99% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/MaintenancePlugin.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/MaintenancePlugin.kt index 6e2a406429..9b373f07d3 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/MaintenancePlugin.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/MaintenancePlugin.kt @@ -1,10 +1,9 @@ -package app.aaps.configuration.maintenance +package app.aaps.plugins.configuration.maintenance import android.content.Context import android.content.Intent import android.net.Uri import androidx.core.content.FileProvider -import app.aaps.configuration.R import app.aaps.core.interfaces.configuration.Config import app.aaps.core.interfaces.logging.AAPSLogger import app.aaps.core.interfaces.logging.LoggerUtils @@ -15,6 +14,7 @@ import app.aaps.core.interfaces.plugin.PluginDescription import app.aaps.core.interfaces.plugin.PluginType import app.aaps.core.interfaces.resources.ResourceHelper import app.aaps.core.interfaces.sharedPreferences.SP +import app.aaps.plugins.configuration.R import dagger.android.HasAndroidInjector import java.io.BufferedInputStream import java.io.BufferedOutputStream diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/PrefFileListProviderImpl.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/PrefFileListProviderImpl.kt similarity index 97% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/PrefFileListProviderImpl.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/PrefFileListProviderImpl.kt index 4945d7b8c3..a903ec8973 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/PrefFileListProviderImpl.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/PrefFileListProviderImpl.kt @@ -1,12 +1,8 @@ -package app.aaps.configuration.maintenance +package app.aaps.plugins.configuration.maintenance import android.content.Context import android.os.Environment import app.aaps.annotations.OpenForTesting -import app.aaps.configuration.R -import app.aaps.configuration.maintenance.data.PrefMetadataMap -import app.aaps.configuration.maintenance.data.PrefsStatusImpl -import app.aaps.configuration.maintenance.formats.EncryptedPrefsFormat import app.aaps.core.interfaces.configuration.Config import app.aaps.core.interfaces.maintenance.PrefFileListProvider import app.aaps.core.interfaces.maintenance.PrefMetadata @@ -21,6 +17,10 @@ import app.aaps.core.interfaces.rx.weardata.ZipWatchfaceFormat import app.aaps.core.interfaces.sharedPreferences.SP import app.aaps.core.interfaces.storage.Storage import app.aaps.core.interfaces.versionChecker.VersionCheckerUtils +import app.aaps.plugins.configuration.R +import app.aaps.plugins.configuration.maintenance.data.PrefMetadataMap +import app.aaps.plugins.configuration.maintenance.data.PrefsStatusImpl +import app.aaps.plugins.configuration.maintenance.formats.EncryptedPrefsFormat import dagger.Lazy import dagger.Reusable import org.joda.time.DateTime diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/PrefsFileContract.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/PrefsFileContract.kt similarity index 86% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/PrefsFileContract.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/PrefsFileContract.kt index 7875727f92..c0271dc050 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/PrefsFileContract.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/PrefsFileContract.kt @@ -1,12 +1,12 @@ -package app.aaps.configuration.maintenance +package app.aaps.plugins.configuration.maintenance import android.content.Context import android.content.Intent import androidx.activity.result.contract.ActivityResultContract import androidx.fragment.app.FragmentActivity -import app.aaps.configuration.maintenance.activities.PrefImportListActivity import app.aaps.core.interfaces.maintenance.PrefsFile import app.aaps.core.utils.extensions.safeGetParcelableExtra +import app.aaps.plugins.configuration.maintenance.activities.PrefImportListActivity class PrefsFileContract : ActivityResultContract() { diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/PrefsMetadataKeyImpl.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/PrefsMetadataKeyImpl.kt similarity index 92% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/PrefsMetadataKeyImpl.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/PrefsMetadataKeyImpl.kt index c08e822e99..1ce2601e2e 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/PrefsMetadataKeyImpl.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/PrefsMetadataKeyImpl.kt @@ -1,11 +1,11 @@ -package app.aaps.configuration.maintenance +package app.aaps.plugins.configuration.maintenance import android.content.Context import androidx.annotation.DrawableRes import androidx.annotation.StringRes -import app.aaps.configuration.R -import app.aaps.configuration.maintenance.data.PrefsFormat import app.aaps.core.interfaces.maintenance.PrefsMetadataKey +import app.aaps.plugins.configuration.R +import app.aaps.plugins.configuration.maintenance.data.PrefsFormat enum class PrefsMetadataKeyImpl(override val key: String, @DrawableRes override val icon: Int, @StringRes override val label: Int) : PrefsMetadataKey { diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/activities/CustomWatchfaceImportListActivity.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/activities/CustomWatchfaceImportListActivity.kt similarity index 96% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/activities/CustomWatchfaceImportListActivity.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/activities/CustomWatchfaceImportListActivity.kt index 5e3a2fb277..f03eead2f7 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/activities/CustomWatchfaceImportListActivity.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/activities/CustomWatchfaceImportListActivity.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.maintenance.activities +package app.aaps.plugins.configuration.maintenance.activities import android.content.Intent import android.os.Bundle @@ -7,9 +7,6 @@ import android.view.ViewGroup import androidx.fragment.app.FragmentActivity import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView -import app.aaps.configuration.R -import app.aaps.configuration.databinding.CustomWatchfaceImportListActivityBinding -import app.aaps.configuration.databinding.CustomWatchfaceImportListItemBinding import app.aaps.core.interfaces.extensions.toVisibility import app.aaps.core.interfaces.logging.AAPSLogger import app.aaps.core.interfaces.maintenance.PrefFileListProvider @@ -31,6 +28,9 @@ import app.aaps.core.interfaces.rx.weardata.ZipWatchfaceFormat import app.aaps.core.interfaces.sharedPreferences.SP import app.aaps.core.interfaces.versionChecker.VersionCheckerUtils import app.aaps.core.ui.activities.TranslatedDaggerAppCompatActivity +import app.aaps.plugins.configuration.R +import app.aaps.plugins.configuration.databinding.CustomWatchfaceImportListActivityBinding +import app.aaps.plugins.configuration.databinding.CustomWatchfaceImportListItemBinding import javax.inject.Inject class CustomWatchfaceImportListActivity : TranslatedDaggerAppCompatActivity() { diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/activities/LogSettingActivity.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/activities/LogSettingActivity.kt similarity index 91% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/activities/LogSettingActivity.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/activities/LogSettingActivity.kt index e4a6199445..b4d35e8884 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/activities/LogSettingActivity.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/activities/LogSettingActivity.kt @@ -1,16 +1,16 @@ -package app.aaps.configuration.maintenance.activities +package app.aaps.plugins.configuration.maintenance.activities import android.os.Bundle import android.view.View import android.widget.CheckBox import android.widget.LinearLayout import android.widget.TextView -import app.aaps.configuration.R -import app.aaps.configuration.databinding.ActivityLogsettingBinding import app.aaps.core.interfaces.logging.L import app.aaps.core.interfaces.logging.LogElement import app.aaps.core.interfaces.resources.ResourceHelper import app.aaps.core.ui.activities.TranslatedDaggerAppCompatActivity +import app.aaps.plugins.configuration.R +import app.aaps.plugins.configuration.databinding.ActivityLogsettingBinding import javax.inject.Inject class LogSettingActivity : TranslatedDaggerAppCompatActivity() { diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/activities/PrefImportListActivity.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/activities/PrefImportListActivity.kt similarity index 90% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/activities/PrefImportListActivity.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/activities/PrefImportListActivity.kt index 312ddcb4b2..6e5149203d 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/activities/PrefImportListActivity.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/activities/PrefImportListActivity.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.maintenance.activities +package app.aaps.plugins.configuration.maintenance.activities import android.content.Intent import android.os.Bundle @@ -8,16 +8,16 @@ import android.view.ViewGroup import androidx.fragment.app.FragmentActivity import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView -import app.aaps.configuration.R -import app.aaps.configuration.databinding.MaintenanceImportListActivityBinding -import app.aaps.configuration.databinding.MaintenanceImportListItemBinding -import app.aaps.configuration.maintenance.PrefsFileContract -import app.aaps.configuration.maintenance.PrefsMetadataKeyImpl -import app.aaps.configuration.maintenance.data.PrefsStatusImpl import app.aaps.core.interfaces.maintenance.PrefFileListProvider import app.aaps.core.interfaces.maintenance.PrefsFile import app.aaps.core.interfaces.resources.ResourceHelper import app.aaps.core.ui.activities.TranslatedDaggerAppCompatActivity +import app.aaps.plugins.configuration.R +import app.aaps.plugins.configuration.databinding.MaintenanceImportListActivityBinding +import app.aaps.plugins.configuration.databinding.MaintenanceImportListItemBinding +import app.aaps.plugins.configuration.maintenance.PrefsFileContract +import app.aaps.plugins.configuration.maintenance.PrefsMetadataKeyImpl +import app.aaps.plugins.configuration.maintenance.data.PrefsStatusImpl import javax.inject.Inject class PrefImportListActivity : TranslatedDaggerAppCompatActivity() { diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/data/PrefsFormat.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/data/PrefsFormat.kt similarity index 93% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/data/PrefsFormat.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/data/PrefsFormat.kt index dfc9eb0b23..ab19c86665 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/data/PrefsFormat.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/data/PrefsFormat.kt @@ -1,10 +1,10 @@ -package app.aaps.configuration.maintenance.data +package app.aaps.plugins.configuration.maintenance.data import androidx.annotation.DrawableRes -import app.aaps.configuration.R import app.aaps.core.interfaces.maintenance.PrefMetadata import app.aaps.core.interfaces.maintenance.PrefsMetadataKey import app.aaps.core.interfaces.maintenance.PrefsStatus +import app.aaps.plugins.configuration.R import kotlinx.parcelize.Parcelize import java.io.File diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/dialogs/PrefImportSummaryDialog.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/dialogs/PrefImportSummaryDialog.kt similarity index 96% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/dialogs/PrefImportSummaryDialog.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/dialogs/PrefImportSummaryDialog.kt index cbdf7e0b6e..8012929956 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/dialogs/PrefImportSummaryDialog.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/dialogs/PrefImportSummaryDialog.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.maintenance.dialogs +package app.aaps.plugins.configuration.maintenance.dialogs import android.annotation.SuppressLint import android.content.Context @@ -16,12 +16,12 @@ import androidx.annotation.DrawableRes import androidx.annotation.StringRes import androidx.annotation.StyleRes import androidx.appcompat.view.ContextThemeWrapper -import app.aaps.configuration.R -import app.aaps.configuration.maintenance.data.Prefs -import app.aaps.configuration.maintenance.data.PrefsStatusImpl import app.aaps.core.interfaces.extensions.runOnUiThread -import com.google.android.material.dialog.MaterialAlertDialogBuilder import app.aaps.core.ui.toast.ToastUtils +import app.aaps.plugins.configuration.R +import app.aaps.plugins.configuration.maintenance.data.Prefs +import app.aaps.plugins.configuration.maintenance.data.PrefsStatusImpl +import com.google.android.material.dialog.MaterialAlertDialogBuilder import java.util.LinkedList object PrefImportSummaryDialog { diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/formats/EncryptedPrefsFormat.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/formats/EncryptedPrefsFormat.kt similarity index 94% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/formats/EncryptedPrefsFormat.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/formats/EncryptedPrefsFormat.kt index 349c66851e..b24e7fe503 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/maintenance/formats/EncryptedPrefsFormat.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/formats/EncryptedPrefsFormat.kt @@ -1,14 +1,5 @@ -package app.aaps.configuration.maintenance.formats +package app.aaps.plugins.configuration.maintenance.formats -import app.aaps.configuration.R -import app.aaps.configuration.maintenance.PrefsMetadataKeyImpl -import app.aaps.configuration.maintenance.data.PrefFileNotFoundError -import app.aaps.configuration.maintenance.data.PrefFormatError -import app.aaps.configuration.maintenance.data.PrefIOError -import app.aaps.configuration.maintenance.data.PrefMetadataMap -import app.aaps.configuration.maintenance.data.Prefs -import app.aaps.configuration.maintenance.data.PrefsFormat -import app.aaps.configuration.maintenance.data.PrefsStatusImpl import app.aaps.core.interfaces.maintenance.PrefMetadata import app.aaps.core.interfaces.maintenance.PrefsMetadataKey import app.aaps.core.interfaces.maintenance.PrefsStatus @@ -17,6 +8,15 @@ import app.aaps.core.interfaces.storage.Storage import app.aaps.core.main.utils.CryptoUtil import app.aaps.core.utils.hexStringToByteArray import app.aaps.core.utils.toHex +import app.aaps.plugins.configuration.R +import app.aaps.plugins.configuration.maintenance.PrefsMetadataKeyImpl +import app.aaps.plugins.configuration.maintenance.data.PrefFileNotFoundError +import app.aaps.plugins.configuration.maintenance.data.PrefFormatError +import app.aaps.plugins.configuration.maintenance.data.PrefIOError +import app.aaps.plugins.configuration.maintenance.data.PrefMetadataMap +import app.aaps.plugins.configuration.maintenance.data.Prefs +import app.aaps.plugins.configuration.maintenance.data.PrefsFormat +import app.aaps.plugins.configuration.maintenance.data.PrefsStatusImpl import org.json.JSONException import org.json.JSONObject import java.io.File diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/SWDefinition.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/SWDefinition.kt similarity index 95% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/SWDefinition.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/SWDefinition.kt index 30a527c051..59893a6672 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/SWDefinition.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/SWDefinition.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.setupwizard +package app.aaps.plugins.configuration.setupwizard import android.Manifest import android.content.Context @@ -6,20 +6,6 @@ import android.content.Intent import android.net.Uri import android.provider.Settings import androidx.appcompat.app.AppCompatActivity -import app.aaps.configuration.R -import app.aaps.configuration.setupwizard.elements.SWBreak -import app.aaps.configuration.setupwizard.elements.SWButton -import app.aaps.configuration.setupwizard.elements.SWEditEncryptedPassword -import app.aaps.configuration.setupwizard.elements.SWEditIntNumber -import app.aaps.configuration.setupwizard.elements.SWEditNumber -import app.aaps.configuration.setupwizard.elements.SWEditNumberWithUnits -import app.aaps.configuration.setupwizard.elements.SWEditString -import app.aaps.configuration.setupwizard.elements.SWFragment -import app.aaps.configuration.setupwizard.elements.SWHtmlLink -import app.aaps.configuration.setupwizard.elements.SWInfoText -import app.aaps.configuration.setupwizard.elements.SWPlugin -import app.aaps.configuration.setupwizard.elements.SWPreference -import app.aaps.configuration.setupwizard.elements.SWRadioButton import app.aaps.core.interfaces.androidPermissions.AndroidPermission import app.aaps.core.interfaces.aps.Loop import app.aaps.core.interfaces.configuration.Config @@ -47,6 +33,20 @@ import app.aaps.core.interfaces.utils.HardLimits import app.aaps.core.main.profile.ProfileSealed import app.aaps.core.main.utils.CryptoUtil import app.aaps.core.utils.isRunningTest +import app.aaps.plugins.configuration.R +import app.aaps.plugins.configuration.setupwizard.elements.SWBreak +import app.aaps.plugins.configuration.setupwizard.elements.SWButton +import app.aaps.plugins.configuration.setupwizard.elements.SWEditEncryptedPassword +import app.aaps.plugins.configuration.setupwizard.elements.SWEditIntNumber +import app.aaps.plugins.configuration.setupwizard.elements.SWEditNumber +import app.aaps.plugins.configuration.setupwizard.elements.SWEditNumberWithUnits +import app.aaps.plugins.configuration.setupwizard.elements.SWEditString +import app.aaps.plugins.configuration.setupwizard.elements.SWFragment +import app.aaps.plugins.configuration.setupwizard.elements.SWHtmlLink +import app.aaps.plugins.configuration.setupwizard.elements.SWInfoText +import app.aaps.plugins.configuration.setupwizard.elements.SWPlugin +import app.aaps.plugins.configuration.setupwizard.elements.SWPreference +import app.aaps.plugins.configuration.setupwizard.elements.SWRadioButton import dagger.android.HasAndroidInjector import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/SWEventListener.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/SWEventListener.kt similarity index 94% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/SWEventListener.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/SWEventListener.kt index a98614d6a8..79c0d3ee54 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/SWEventListener.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/SWEventListener.kt @@ -1,13 +1,13 @@ -package app.aaps.configuration.setupwizard +package app.aaps.plugins.configuration.setupwizard import android.annotation.SuppressLint import android.content.Context import android.view.View import android.widget.LinearLayout import android.widget.TextView -import app.aaps.configuration.setupwizard.elements.SWItem import app.aaps.core.interfaces.rx.AapsSchedulers import app.aaps.core.interfaces.rx.events.EventStatus +import app.aaps.plugins.configuration.setupwizard.elements.SWItem import dagger.android.HasAndroidInjector import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/SWScreen.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/SWScreen.kt similarity index 90% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/SWScreen.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/SWScreen.kt index be32f6afec..de8497856f 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/SWScreen.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/SWScreen.kt @@ -1,7 +1,7 @@ -package app.aaps.configuration.setupwizard +package app.aaps.plugins.configuration.setupwizard -import app.aaps.configuration.setupwizard.elements.SWItem import app.aaps.core.interfaces.resources.ResourceHelper +import app.aaps.plugins.configuration.setupwizard.elements.SWItem import dagger.android.HasAndroidInjector import javax.inject.Inject diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/SetupWizardActivity.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/SetupWizardActivity.kt similarity index 93% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/SetupWizardActivity.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/SetupWizardActivity.kt index a1097b756e..39aff3bd55 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/SetupWizardActivity.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/SetupWizardActivity.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.setupwizard +package app.aaps.plugins.configuration.setupwizard import android.content.Intent import android.os.Bundle @@ -9,11 +9,6 @@ import android.view.View import android.widget.TextView import androidx.activity.OnBackPressedCallback import androidx.core.view.MenuProvider -import app.aaps.configuration.R -import app.aaps.configuration.activities.DaggerAppCompatActivityWithResult -import app.aaps.configuration.databinding.ActivitySetupwizardBinding -import app.aaps.configuration.setupwizard.elements.SWItem -import app.aaps.core.main.utils.fabric.FabricPrivacy import app.aaps.core.interfaces.rx.AapsSchedulers import app.aaps.core.interfaces.rx.events.EventProfileStoreChanged import app.aaps.core.interfaces.rx.events.EventProfileSwitchChanged @@ -23,9 +18,14 @@ import app.aaps.core.interfaces.rx.events.EventSWSyncStatus import app.aaps.core.interfaces.rx.events.EventSWUpdate import app.aaps.core.interfaces.sharedPreferences.SP import app.aaps.core.interfaces.ui.UiInteraction -import dagger.android.HasAndroidInjector +import app.aaps.core.main.utils.fabric.FabricPrivacy import app.aaps.core.ui.dialogs.OKDialog import app.aaps.core.ui.locale.LocaleHelper.update +import app.aaps.plugins.configuration.R +import app.aaps.plugins.configuration.activities.DaggerAppCompatActivityWithResult +import app.aaps.plugins.configuration.databinding.ActivitySetupwizardBinding +import app.aaps.plugins.configuration.setupwizard.elements.SWItem +import dagger.android.HasAndroidInjector import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject @@ -166,7 +166,7 @@ class SetupWizardActivity : DaggerAppCompatActivityWithResult() { @Suppress("UNUSED_PARAMETER") fun showNextPage(view: View?) { finish() - val intent = Intent(this, SetupWizardActivity::class.java).setAction("app.aaps.configuration.setupwizard.SetupWizardActivity") + val intent = Intent(this, SetupWizardActivity::class.java).setAction("app.aaps.plugins.configuration.setupwizard.SetupWizardActivity") intent.putExtra(intentMessage, nextPage(null)) startActivity(intent) } @@ -174,7 +174,7 @@ class SetupWizardActivity : DaggerAppCompatActivityWithResult() { @Suppress("UNUSED_PARAMETER") fun showPreviousPage(view: View?) { finish() - val intent = Intent(this, SetupWizardActivity::class.java).setAction("app.aaps.configuration.setupwizard.SetupWizardActivity") + val intent = Intent(this, SetupWizardActivity::class.java).setAction("app.aaps.plugins.configuration.setupwizard.SetupWizardActivity") intent.putExtra(intentMessage, previousPage(null)) startActivity(intent) } @@ -183,7 +183,7 @@ class SetupWizardActivity : DaggerAppCompatActivityWithResult() { @Suppress("UNUSED_PARAMETER") fun finishSetupWizard(view: View?) { sp.putBoolean(R.string.key_setupwizard_processed, true) - val intent = Intent(this, uiInteraction.mainActivity).setAction("app.aaps.configuration.setupwizard.SetupWizardActivity") + val intent = Intent(this, uiInteraction.mainActivity).setAction("app.aaps.plugins.configuration.setupwizard.SetupWizardActivity") intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) startActivity(intent) finish() diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWBreak.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWBreak.kt similarity index 93% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWBreak.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWBreak.kt index abcac25a95..43a9507aa6 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWBreak.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWBreak.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.setupwizard.elements +package app.aaps.plugins.configuration.setupwizard.elements import android.view.View import android.widget.LinearLayout diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWButton.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWButton.kt similarity index 95% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWButton.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWButton.kt index 0b54ef0339..0c757ba0f0 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWButton.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWButton.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.setupwizard.elements +package app.aaps.plugins.configuration.setupwizard.elements import android.view.View import android.widget.Button diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWEditEncryptedPassword.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWEditEncryptedPassword.kt similarity index 98% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWEditEncryptedPassword.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWEditEncryptedPassword.kt index f6833f7487..81ebb93e8e 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWEditEncryptedPassword.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWEditEncryptedPassword.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.setupwizard.elements +package app.aaps.plugins.configuration.setupwizard.elements import android.graphics.Typeface import android.text.Editable @@ -9,8 +9,8 @@ import android.widget.Button import android.widget.EditText import android.widget.LinearLayout import android.widget.TextView -import app.aaps.core.main.utils.CryptoUtil import app.aaps.core.interfaces.extensions.toVisibility +import app.aaps.core.main.utils.CryptoUtil import dagger.android.HasAndroidInjector class SWEditEncryptedPassword(injector: HasAndroidInjector, private val cryptoUtil: CryptoUtil) : SWItem(injector, Type.STRING) { diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWEditIntNumber.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWEditIntNumber.kt similarity index 97% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWEditIntNumber.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWEditIntNumber.kt index 35efaa0638..05394004a3 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWEditIntNumber.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWEditIntNumber.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.setupwizard.elements +package app.aaps.plugins.configuration.setupwizard.elements import android.graphics.Typeface import android.text.Editable @@ -7,8 +7,8 @@ import android.view.View import android.widget.LinearLayout import android.widget.TextView import app.aaps.core.interfaces.utils.SafeParse -import dagger.android.HasAndroidInjector import app.aaps.core.ui.elements.NumberPicker +import dagger.android.HasAndroidInjector import java.text.DecimalFormat class SWEditIntNumber(injector: HasAndroidInjector, private val init: Int, private val min: Int, private val max: Int) : SWItem(injector, Type.NUMBER) { diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWEditNumber.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWEditNumber.kt similarity index 97% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWEditNumber.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWEditNumber.kt index 85b7d58a37..4e2b203b9a 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWEditNumber.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWEditNumber.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.setupwizard.elements +package app.aaps.plugins.configuration.setupwizard.elements import android.graphics.Typeface import android.text.Editable @@ -7,8 +7,8 @@ import android.view.View import android.widget.LinearLayout import android.widget.TextView import app.aaps.core.interfaces.utils.SafeParse -import dagger.android.HasAndroidInjector import app.aaps.core.ui.elements.NumberPicker +import dagger.android.HasAndroidInjector import java.text.DecimalFormat class SWEditNumber(injector: HasAndroidInjector, private val init: Double, private val min: Double, private val max: Double) : SWItem(injector, Type.DECIMAL_NUMBER) { diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWEditNumberWithUnits.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWEditNumberWithUnits.kt similarity index 97% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWEditNumberWithUnits.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWEditNumberWithUnits.kt index 4a1a832e00..ed43812cda 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWEditNumberWithUnits.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWEditNumberWithUnits.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.setupwizard.elements +package app.aaps.plugins.configuration.setupwizard.elements import android.graphics.Typeface import android.text.Editable @@ -10,8 +10,8 @@ import app.aaps.core.interfaces.configuration.Constants import app.aaps.core.interfaces.db.GlucoseUnit import app.aaps.core.interfaces.profile.ProfileUtil import app.aaps.core.interfaces.utils.SafeParse -import dagger.android.HasAndroidInjector import app.aaps.core.ui.elements.NumberPicker +import dagger.android.HasAndroidInjector import java.text.DecimalFormat import javax.inject.Inject diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWEditString.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWEditString.kt similarity index 97% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWEditString.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWEditString.kt index 28e935afe6..6dc25beacc 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWEditString.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWEditString.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.setupwizard.elements +package app.aaps.plugins.configuration.setupwizard.elements import android.graphics.Typeface import android.text.Editable diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWEditUrl.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWEditUrl.kt similarity index 93% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWEditUrl.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWEditUrl.kt index f2f36c34f8..9a475a5200 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWEditUrl.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWEditUrl.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.setupwizard.elements +package app.aaps.plugins.configuration.setupwizard.elements import android.graphics.Typeface import android.text.Editable @@ -9,7 +9,7 @@ import android.view.View import android.widget.EditText import android.widget.LinearLayout import android.widget.TextView -import app.aaps.configuration.setupwizard.events.EventSWLabel +import app.aaps.plugins.configuration.setupwizard.events.EventSWLabel import dagger.android.HasAndroidInjector class SWEditUrl(injector: HasAndroidInjector) : SWItem(injector, Type.URL) { diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWFragment.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWFragment.kt similarity index 82% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWFragment.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWFragment.kt index 98390d042a..1794da541e 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWFragment.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWFragment.kt @@ -1,8 +1,8 @@ -package app.aaps.configuration.setupwizard.elements +package app.aaps.plugins.configuration.setupwizard.elements import android.widget.LinearLayout import androidx.fragment.app.Fragment -import app.aaps.configuration.setupwizard.SWDefinition +import app.aaps.plugins.configuration.setupwizard.SWDefinition import dagger.android.HasAndroidInjector class SWFragment(injector: HasAndroidInjector, private var definition: SWDefinition) : SWItem(injector, Type.FRAGMENT) { diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWHtmlLink.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWHtmlLink.kt similarity index 95% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWHtmlLink.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWHtmlLink.kt index bb6aa587da..07603234eb 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWHtmlLink.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWHtmlLink.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.setupwizard.elements +package app.aaps.plugins.configuration.setupwizard.elements import android.text.util.Linkify import android.view.View diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWInfoText.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWInfoText.kt similarity index 94% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWInfoText.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWInfoText.kt index 13957e874f..bedcd41fc6 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWInfoText.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWInfoText.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.setupwizard.elements +package app.aaps.plugins.configuration.setupwizard.elements import android.view.View import android.widget.LinearLayout diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWItem.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWItem.kt similarity index 98% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWItem.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWItem.kt index 0462caa8f5..27dcbf9579 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWItem.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWItem.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.setupwizard.elements +package app.aaps.plugins.configuration.setupwizard.elements import android.content.Context import android.content.ContextWrapper diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWPlugin.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWPlugin.kt similarity index 91% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWPlugin.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWPlugin.kt index 1af96f14ba..05f6d514c5 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWPlugin.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWPlugin.kt @@ -1,15 +1,15 @@ -package app.aaps.configuration.setupwizard.elements +package app.aaps.plugins.configuration.setupwizard.elements import android.widget.LinearLayout import androidx.annotation.StringRes -import app.aaps.configuration.configBuilder.events.EventConfigBuilderUpdateGui -import app.aaps.configuration.setupwizard.SWDefinition -import app.aaps.core.main.utils.fabric.FabricPrivacy import app.aaps.core.interfaces.configuration.ConfigBuilder import app.aaps.core.interfaces.plugin.ActivePlugin import app.aaps.core.interfaces.plugin.PluginType import app.aaps.core.interfaces.rx.AapsSchedulers import app.aaps.core.interfaces.ui.UiInteraction +import app.aaps.core.main.utils.fabric.FabricPrivacy +import app.aaps.plugins.configuration.configBuilder.events.EventConfigBuilderUpdateGui +import app.aaps.plugins.configuration.setupwizard.SWDefinition import dagger.android.HasAndroidInjector import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWPreference.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWPreference.kt similarity index 90% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWPreference.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWPreference.kt index 6af378f6ee..d6e1b3f149 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWPreference.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWPreference.kt @@ -1,10 +1,10 @@ -package app.aaps.configuration.setupwizard.elements +package app.aaps.plugins.configuration.setupwizard.elements import android.os.Bundle import android.widget.LinearLayout import androidx.fragment.app.Fragment -import app.aaps.configuration.setupwizard.SWDefinition import app.aaps.core.interfaces.ui.UiInteraction +import app.aaps.plugins.configuration.setupwizard.SWDefinition import dagger.android.HasAndroidInjector import javax.inject.Inject diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWRadioButton.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWRadioButton.kt similarity index 97% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWRadioButton.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWRadioButton.kt index c4f909ae6e..ed70fe1c4b 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/elements/SWRadioButton.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWRadioButton.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.setupwizard.elements +package app.aaps.plugins.configuration.setupwizard.elements import android.view.View import android.view.ViewGroup diff --git a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/events/EventSWLabel.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/events/EventSWLabel.kt similarity index 62% rename from plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/events/EventSWLabel.kt rename to plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/events/EventSWLabel.kt index 42a5673929..1007113a74 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/configuration/setupwizard/events/EventSWLabel.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/events/EventSWLabel.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.setupwizard.events +package app.aaps.plugins.configuration.setupwizard.events import app.aaps.core.interfaces.rx.events.Event diff --git a/plugins/configuration/src/test/kotlin/app/aaps/configuration/maintenance/formats/EncryptedPrefsFormatTest.kt b/plugins/configuration/src/test/kotlin/app/aaps/configuration/maintenance/formats/EncryptedPrefsFormatTest.kt index c23b43bd89..5527a0d48b 100644 --- a/plugins/configuration/src/test/kotlin/app/aaps/configuration/maintenance/formats/EncryptedPrefsFormatTest.kt +++ b/plugins/configuration/src/test/kotlin/app/aaps/configuration/maintenance/formats/EncryptedPrefsFormatTest.kt @@ -1,13 +1,13 @@ -package app.aaps.configuration.maintenance.formats +package app.aaps.plugins.configuration.maintenance.formats -import app.aaps.configuration.maintenance.PrefsMetadataKeyImpl -import app.aaps.configuration.maintenance.data.PrefFormatError -import app.aaps.configuration.maintenance.data.Prefs -import app.aaps.configuration.maintenance.data.PrefsFormat -import app.aaps.configuration.maintenance.data.PrefsStatusImpl -import app.aaps.core.main.utils.CryptoUtil import app.aaps.core.interfaces.maintenance.PrefMetadata import app.aaps.core.interfaces.resources.ResourceHelper +import app.aaps.core.main.utils.CryptoUtil +import app.aaps.plugins.configuration.maintenance.PrefsMetadataKeyImpl +import app.aaps.plugins.configuration.maintenance.data.PrefFormatError +import app.aaps.plugins.configuration.maintenance.data.Prefs +import app.aaps.plugins.configuration.maintenance.data.PrefsFormat +import app.aaps.plugins.configuration.maintenance.data.PrefsStatusImpl import app.aaps.shared.tests.TestBase import com.google.common.truth.Truth.assertThat import com.google.common.truth.TruthJUnit.assume diff --git a/plugins/configuration/src/test/kotlin/app/aaps/configuration/maintenance/formats/SingleStringStorage.kt b/plugins/configuration/src/test/kotlin/app/aaps/configuration/maintenance/formats/SingleStringStorage.kt index 0af8015431..75db85e2a7 100644 --- a/plugins/configuration/src/test/kotlin/app/aaps/configuration/maintenance/formats/SingleStringStorage.kt +++ b/plugins/configuration/src/test/kotlin/app/aaps/configuration/maintenance/formats/SingleStringStorage.kt @@ -1,4 +1,4 @@ -package app.aaps.configuration.maintenance.formats +package app.aaps.plugins.configuration.maintenance.formats import app.aaps.core.interfaces.storage.Storage import java.io.File