diff --git a/app/src/main/kotlin/app/aaps/MainActivity.kt b/app/src/main/kotlin/app/aaps/MainActivity.kt index c9d420fe8a..7b68857b63 100644 --- a/app/src/main/kotlin/app/aaps/MainActivity.kt +++ b/app/src/main/kotlin/app/aaps/MainActivity.kt @@ -62,6 +62,7 @@ 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 app.aaps.plugins.constraints.signatureVerifier.SignatureVerifierPlugin import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.tabs.TabLayoutMediator import com.google.firebase.crashlytics.FirebaseCrashlytics @@ -70,7 +71,6 @@ import com.joanzapata.iconify.fonts.FontAwesomeModule import info.nightscout.androidaps.BuildConfig import info.nightscout.androidaps.R import info.nightscout.androidaps.databinding.ActivityMainBinding -import app.aaps.plugins.constraints.signatureVerifier.SignatureVerifierPlugin import info.nightscout.ui.activities.ProfileHelperActivity import info.nightscout.ui.activities.StatsActivity import info.nightscout.ui.activities.TreatmentsActivity @@ -127,7 +127,7 @@ class MainActivity : DaggerAppCompatActivityWithResult() { } // initialize screen wake lock - processPreferenceChange(EventPreferenceChange(rh.gs(info.nightscout.plugins.R.string.key_keep_screen_on))) + processPreferenceChange(EventPreferenceChange(rh.gs(app.aaps.plugins.main.R.string.key_keep_screen_on))) binding.mainPager.registerOnPageChangeCallback(object : ViewPager2.OnPageChangeCallback() { override fun onPageScrollStateChanged(state: Int) {} override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {} @@ -209,7 +209,7 @@ 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.plugins.configuration.R.string.configbuilder_nightscoutversion_label)} ${activePlugin.activeNsClient?.detectedNsVersion() ?: rh.gs(info.nightscout.plugins.R.string.not_available_full)}" + message += "${rh.gs(app.aaps.plugins.configuration.R.string.configbuilder_nightscoutversion_label)} ${activePlugin.activeNsClient?.detectedNsVersion() ?: rh.gs(app.aaps.plugins.main.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)}" @@ -334,13 +334,13 @@ class MainActivity : DaggerAppCompatActivityWithResult() { } private fun setWakeLock() { - val keepScreenOn = sp.getBoolean(info.nightscout.plugins.R.string.key_keep_screen_on, false) + val keepScreenOn = sp.getBoolean(app.aaps.plugins.main.R.string.key_keep_screen_on, false) if (keepScreenOn) window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) else window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) } private fun processPreferenceChange(ev: EventPreferenceChange) { - if (ev.isChanged(rh.gs(info.nightscout.plugins.R.string.key_keep_screen_on))) setWakeLock() - if (ev.isChanged(rh.gs(info.nightscout.plugins.R.string.key_skin))) recreate() + if (ev.isChanged(rh.gs(app.aaps.plugins.main.R.string.key_keep_screen_on))) setWakeLock() + if (ev.isChanged(rh.gs(app.aaps.plugins.main.R.string.key_skin))) recreate() } private fun setupViews() { @@ -374,7 +374,7 @@ class MainActivity : DaggerAppCompatActivityWithResult() { checkPluginPreferences(binding.mainPager) // Tabs - if (sp.getBoolean(info.nightscout.plugins.R.string.key_short_tabtitles, false)) { + if (sp.getBoolean(app.aaps.plugins.main.R.string.key_short_tabtitles, false)) { binding.tabsNormal.visibility = View.GONE binding.tabsCompact.visibility = View.VISIBLE binding.toolbar.layoutParams = LinearLayout.LayoutParams(Toolbar.LayoutParams.MATCH_PARENT, resources.getDimension(app.aaps.core.ui.R.dimen.compact_height).toInt()) diff --git a/app/src/main/kotlin/app/aaps/MainApp.kt b/app/src/main/kotlin/app/aaps/MainApp.kt index 4eeb983dd0..a59d595b27 100644 --- a/app/src/main/kotlin/app/aaps/MainApp.kt +++ b/app/src/main/kotlin/app/aaps/MainApp.kt @@ -36,6 +36,8 @@ import app.aaps.implementation.lifecycle.ProcessLifecycleListener import app.aaps.implementation.plugin.PluginStore import app.aaps.implementation.receivers.NetworkChangeReceiver import app.aaps.plugins.aps.utils.StaticInjector +import app.aaps.plugins.main.general.overview.notifications.NotificationStore +import app.aaps.plugins.main.general.themes.ThemeSwitcherPlugin import app.aaps.receivers.BTReceiver import app.aaps.receivers.ChargingStateReceiver import app.aaps.receivers.KeepAliveWorker @@ -47,8 +49,6 @@ import info.nightscout.androidaps.R import info.nightscout.database.impl.AppRepository import info.nightscout.database.impl.transactions.InsertIfNewByTimestampTherapyEventTransaction import info.nightscout.database.impl.transactions.VersionChangeTransaction -import info.nightscout.plugins.general.overview.notifications.NotificationStore -import info.nightscout.plugins.general.themes.ThemeSwitcherPlugin import info.nightscout.ui.activityMonitor.ActivityMonitor import info.nightscout.ui.widget.Widget import io.reactivex.rxjava3.disposables.CompositeDisposable @@ -80,12 +80,12 @@ class MainApp : DaggerApplication() { @Inject lateinit var compatDBHelper: CompatDBHelper @Inject lateinit var repository: AppRepository @Inject lateinit var dateUtil: DateUtil - @Suppress("unused") @Inject lateinit var staticInjector: StaticInjector// TODO avoid , here fake only to initialize + @Suppress("unused") @Inject lateinit var staticInjector: StaticInjector// better avoid, here fake only to initialize @Inject lateinit var uel: UserEntryLogger @Inject lateinit var uiInteraction: UiInteraction @Inject lateinit var notificationStore: NotificationStore @Inject lateinit var processLifecycleListener: Provider - @Inject lateinit var profileSwitchPlugin: ThemeSwitcherPlugin + @Inject lateinit var themeSwitcherPlugin: ThemeSwitcherPlugin @Inject lateinit var localAlertUtils: LocalAlertUtils @Inject lateinit var rh: Provider @@ -110,7 +110,7 @@ class MainApp : DaggerApplication() { } disposable += compatDBHelper.dbChangeDisposable() registerActivityLifecycleCallbacks(activityMonitor) - runOnUiThread { profileSwitchPlugin.setThemeMode() } + runOnUiThread { themeSwitcherPlugin.setThemeMode() } aapsLogger.debug("Version: " + BuildConfig.VERSION_NAME) aapsLogger.debug("BuildVersion: " + BuildConfig.BUILDVERSION) aapsLogger.debug("Remote: " + BuildConfig.REMOTE) @@ -228,9 +228,9 @@ class MainApp : DaggerApplication() { 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") - sp.putString(info.nightscout.plugins.R.string.value_system_theme, "system") + sp.putString(app.aaps.plugins.main.R.string.value_dark_theme, "dark") + sp.putString(app.aaps.plugins.main.R.string.value_light_theme, "light") + sp.putString(app.aaps.plugins.main.R.string.value_system_theme, "system") } diff --git a/app/src/main/kotlin/app/aaps/activities/HistoryBrowseActivity.kt b/app/src/main/kotlin/app/aaps/activities/HistoryBrowseActivity.kt index af6874d304..aa64fe3aa8 100644 --- a/app/src/main/kotlin/app/aaps/activities/HistoryBrowseActivity.kt +++ b/app/src/main/kotlin/app/aaps/activities/HistoryBrowseActivity.kt @@ -8,9 +8,6 @@ import android.view.ViewGroup import android.widget.LinearLayout import android.widget.RelativeLayout import android.widget.TextView -import app.aaps.core.main.events.EventIobCalculationProgress -import app.aaps.core.main.utils.fabric.FabricPrivacy -import app.aaps.core.main.workflow.CalculationWorkflow import app.aaps.core.interfaces.configuration.Config import app.aaps.core.interfaces.extensions.toVisibility import app.aaps.core.interfaces.extensions.toVisibilityKeepSpace @@ -29,12 +26,15 @@ import app.aaps.core.interfaces.rx.events.EventScale import app.aaps.core.interfaces.rx.events.EventUpdateOverviewGraph import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.interfaces.utils.T +import app.aaps.core.main.events.EventIobCalculationProgress +import app.aaps.core.main.utils.fabric.FabricPrivacy +import app.aaps.core.main.workflow.CalculationWorkflow +import app.aaps.core.ui.activities.TranslatedDaggerAppCompatActivity +import app.aaps.plugins.main.general.overview.graphData.GraphData import com.google.android.material.datepicker.MaterialDatePicker import com.jjoe64.graphview.GraphView import dagger.android.HasAndroidInjector import info.nightscout.androidaps.databinding.ActivityHistorybrowseBinding -import app.aaps.core.ui.activities.TranslatedDaggerAppCompatActivity -import info.nightscout.plugins.general.overview.graphData.GraphData import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.util.Calendar @@ -76,7 +76,7 @@ class HistoryBrowseActivity : TranslatedDaggerAppCompatActivity() { binding = ActivityHistorybrowseBinding.inflate(layoutInflater) setContentView(binding.root) - title = rh.gs(info.nightscout.plugins.R.string.nav_history_browser) + title = rh.gs(app.aaps.plugins.main.R.string.nav_history_browser) supportActionBar?.setDisplayHomeAsUpEnabled(true) supportActionBar?.setDisplayShowHomeEnabled(true) diff --git a/app/src/main/kotlin/app/aaps/activities/HistoryBrowserData.kt b/app/src/main/kotlin/app/aaps/activities/HistoryBrowserData.kt index ff4ec88c38..e93f9e29a6 100644 --- a/app/src/main/kotlin/app/aaps/activities/HistoryBrowserData.kt +++ b/app/src/main/kotlin/app/aaps/activities/HistoryBrowserData.kt @@ -14,9 +14,9 @@ import app.aaps.core.main.graph.OverviewData import app.aaps.core.main.utils.fabric.FabricPrivacy import app.aaps.core.main.workflow.CalculationWorkflow import app.aaps.implementation.overview.OverviewDataImpl +import app.aaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin import dagger.android.HasAndroidInjector import info.nightscout.database.impl.AppRepository -import info.nightscout.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/kotlin/app/aaps/activities/MyPreferenceFragment.kt b/app/src/main/kotlin/app/aaps/activities/MyPreferenceFragment.kt index f0b06e98e3..d3f951a28d 100644 --- a/app/src/main/kotlin/app/aaps/activities/MyPreferenceFragment.kt +++ b/app/src/main/kotlin/app/aaps/activities/MyPreferenceFragment.kt @@ -41,6 +41,8 @@ import app.aaps.plugins.automation.AutomationPlugin import app.aaps.plugins.configuration.maintenance.MaintenancePlugin import app.aaps.plugins.constraints.safety.SafetyPlugin import app.aaps.plugins.insulin.InsulinOrefFreePeakPlugin +import app.aaps.plugins.main.general.smsCommunicator.SmsCommunicatorPlugin +import app.aaps.plugins.main.general.wear.WearPlugin import dagger.android.support.AndroidSupportInjection import info.nightscout.androidaps.R import info.nightscout.androidaps.danaRKorean.DanaRKoreanPlugin @@ -49,8 +51,6 @@ import info.nightscout.androidaps.danar.DanaRPlugin import info.nightscout.androidaps.plugins.pump.eopatch.EopatchPumpPlugin import info.nightscout.androidaps.plugins.pump.insight.LocalInsightPlugin import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicPumpPlugin -import info.nightscout.plugins.general.smsCommunicator.SmsCommunicatorPlugin -import info.nightscout.plugins.general.wear.WearPlugin import info.nightscout.plugins.sync.nsclient.NSClientPlugin import info.nightscout.plugins.sync.nsclientV3.NSClientV3Plugin import info.nightscout.plugins.sync.openhumans.OpenHumansUploaderPlugin @@ -186,7 +186,7 @@ class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChang addPreferencesFromResource(pluginId, rootKey) } else { addPreferencesFromResource(R.xml.pref_general, rootKey) - addPreferencesFromResource(info.nightscout.plugins.R.xml.pref_overview, rootKey) + addPreferencesFromResource(app.aaps.plugins.main.R.xml.pref_overview, rootKey) addPreferencesFromResourceIfEnabled(safetyPlugin, rootKey) addPreferencesFromResourceIfEnabled(eversensePlugin, rootKey) addPreferencesFromResourceIfEnabled(dexcomPlugin, rootKey) @@ -243,7 +243,7 @@ class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChang //recreate() does not update language so better close settings activity?.finish() } - if (key == rh.gs(info.nightscout.plugins.R.string.key_short_tabtitles)) { + if (key == rh.gs(app.aaps.plugins.main.R.string.key_short_tabtitles)) { rxBus.send(EventRebuildTabs()) } if (key == rh.gs(info.nightscout.core.utils.R.string.key_units)) { @@ -475,7 +475,7 @@ class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChang true } // NSClient copy settings - rh.gs(info.nightscout.plugins.R.string.key_statuslights_copy_ns) -> { + rh.gs(app.aaps.plugins.main.R.string.key_statuslights_copy_ns) -> { nsSettingStatus.copyStatusLightsNsSettings(context) true } diff --git a/app/src/main/kotlin/app/aaps/di/AppComponent.kt b/app/src/main/kotlin/app/aaps/di/AppComponent.kt index c3a290caff..94ae6cc216 100644 --- a/app/src/main/kotlin/app/aaps/di/AppComponent.kt +++ b/app/src/main/kotlin/app/aaps/di/AppComponent.kt @@ -9,6 +9,7 @@ import app.aaps.plugins.automation.di.AutomationModule import app.aaps.plugins.configuration.di.ConfigurationModule import app.aaps.plugins.constraints.di.PluginsConstraintsModule import app.aaps.plugins.insulin.di.InsulinModule +import app.aaps.plugins.main.di.PluginsModule import app.aaps.shared.impl.di.SharedImplModule import dagger.BindsInstance import dagger.Component @@ -23,7 +24,6 @@ import info.nightscout.androidaps.plugins.pump.medtronic.di.MedtronicModule import info.nightscout.androidaps.plugins.pump.omnipod.dash.di.OmnipodDashModule import info.nightscout.androidaps.plugins.pump.omnipod.eros.di.OmnipodErosModule import info.nightscout.database.impl.DatabaseModule -import info.nightscout.plugins.di.PluginsModule import info.nightscout.plugins.sync.di.OpenHumansModule import info.nightscout.plugins.sync.di.SyncModule import info.nightscout.pump.combo.di.ComboModule diff --git a/app/src/main/kotlin/app/aaps/di/PluginsListModule.kt b/app/src/main/kotlin/app/aaps/di/PluginsListModule.kt index 5d8281611c..00d2180f77 100644 --- a/app/src/main/kotlin/app/aaps/di/PluginsListModule.kt +++ b/app/src/main/kotlin/app/aaps/di/PluginsListModule.kt @@ -20,6 +20,15 @@ import app.aaps.plugins.insulin.InsulinLyumjevPlugin import app.aaps.plugins.insulin.InsulinOrefFreePeakPlugin import app.aaps.plugins.insulin.InsulinOrefRapidActingPlugin import app.aaps.plugins.insulin.InsulinOrefUltraRapidActingPlugin +import app.aaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin +import app.aaps.plugins.main.general.actions.ActionsPlugin +import app.aaps.plugins.main.general.food.FoodPlugin +import app.aaps.plugins.main.general.overview.OverviewPlugin +import app.aaps.plugins.main.general.persistentNotification.PersistentNotificationPlugin +import app.aaps.plugins.main.general.smsCommunicator.SmsCommunicatorPlugin +import app.aaps.plugins.main.general.themes.ThemeSwitcherPlugin +import app.aaps.plugins.main.general.wear.WearPlugin +import app.aaps.plugins.main.profile.ProfilePlugin import dagger.Binds import dagger.Module import dagger.multibindings.IntKey @@ -32,15 +41,6 @@ import info.nightscout.androidaps.plugins.pump.insight.LocalInsightPlugin import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicPumpPlugin import info.nightscout.androidaps.plugins.pump.omnipod.dash.OmnipodDashPumpPlugin import info.nightscout.androidaps.plugins.pump.omnipod.eros.OmnipodErosPumpPlugin -import info.nightscout.plugins.general.actions.ActionsPlugin -import info.nightscout.plugins.general.food.FoodPlugin -import info.nightscout.plugins.general.overview.OverviewPlugin -import info.nightscout.plugins.general.persistentNotification.PersistentNotificationPlugin -import info.nightscout.plugins.general.smsCommunicator.SmsCommunicatorPlugin -import info.nightscout.plugins.general.themes.ThemeSwitcherPlugin -import info.nightscout.plugins.general.wear.WearPlugin -import info.nightscout.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin -import info.nightscout.plugins.profile.ProfilePlugin import info.nightscout.plugins.sync.dataBroadcaster.DataBroadcastPlugin import info.nightscout.plugins.sync.nsclient.NSClientPlugin import info.nightscout.plugins.sync.nsclientV3.NSClientV3Plugin diff --git a/app/src/main/kotlin/app/aaps/implementations/InstantiatorImpl.kt b/app/src/main/kotlin/app/aaps/implementations/InstantiatorImpl.kt index b4074501f7..b18aa83142 100644 --- a/app/src/main/kotlin/app/aaps/implementations/InstantiatorImpl.kt +++ b/app/src/main/kotlin/app/aaps/implementations/InstantiatorImpl.kt @@ -7,9 +7,9 @@ import app.aaps.core.interfaces.profile.ProfileStore import app.aaps.core.interfaces.utils.DateUtil import app.aaps.implementation.profile.ProfileStoreObject import app.aaps.plugins.aps.APSResultObject +import app.aaps.plugins.iob.iobCobCalculator.data.AutosensDataObject import dagger.Reusable import dagger.android.HasAndroidInjector -import info.nightscout.plugins.iob.iobCobCalculator.data.AutosensDataObject import org.json.JSONObject import javax.inject.Inject diff --git a/app/src/main/kotlin/app/aaps/implementations/UiInteractionImpl.kt b/app/src/main/kotlin/app/aaps/implementations/UiInteractionImpl.kt index b367e1aff0..2218d96113 100644 --- a/app/src/main/kotlin/app/aaps/implementations/UiInteractionImpl.kt +++ b/app/src/main/kotlin/app/aaps/implementations/UiInteractionImpl.kt @@ -17,9 +17,9 @@ 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 app.aaps.plugins.main.general.overview.notifications.NotificationWithAction import dagger.android.HasAndroidInjector import info.nightscout.androidaps.R -import info.nightscout.plugins.general.overview.notifications.NotificationWithAction import info.nightscout.ui.activities.BolusProgressHelperActivity import info.nightscout.ui.activities.ErrorHelperActivity import info.nightscout.ui.activities.QuickWizardListActivity diff --git a/app/src/main/kotlin/app/aaps/receivers/AutoStartReceiver.kt b/app/src/main/kotlin/app/aaps/receivers/AutoStartReceiver.kt index 24c45e74d4..f77791ac6a 100644 --- a/app/src/main/kotlin/app/aaps/receivers/AutoStartReceiver.kt +++ b/app/src/main/kotlin/app/aaps/receivers/AutoStartReceiver.kt @@ -2,8 +2,8 @@ package app.aaps.receivers import android.content.Context import android.content.Intent +import app.aaps.plugins.main.general.persistentNotification.DummyServiceHelper import dagger.android.DaggerBroadcastReceiver -import info.nightscout.plugins.general.persistentNotification.DummyServiceHelper import javax.inject.Inject class AutoStartReceiver : DaggerBroadcastReceiver() { diff --git a/app/src/main/kotlin/app/aaps/receivers/DataReceiver.kt b/app/src/main/kotlin/app/aaps/receivers/DataReceiver.kt index 815b507bac..1eb509ac49 100644 --- a/app/src/main/kotlin/app/aaps/receivers/DataReceiver.kt +++ b/app/src/main/kotlin/app/aaps/receivers/DataReceiver.kt @@ -12,8 +12,8 @@ import app.aaps.core.utils.extensions.copyDouble import app.aaps.core.utils.extensions.copyLong import app.aaps.core.utils.extensions.copyString import app.aaps.core.utils.receivers.DataWorkerStorage +import app.aaps.plugins.main.general.smsCommunicator.SmsCommunicatorPlugin import dagger.android.DaggerBroadcastReceiver -import info.nightscout.plugins.general.smsCommunicator.SmsCommunicatorPlugin import info.nightscout.source.AidexPlugin import info.nightscout.source.DexcomPlugin import info.nightscout.source.EversensePlugin diff --git a/app/src/main/kotlin/app/aaps/workflow/CalculationWorkflowImpl.kt b/app/src/main/kotlin/app/aaps/workflow/CalculationWorkflowImpl.kt index 46af8b740f..4013d433d8 100644 --- a/app/src/main/kotlin/app/aaps/workflow/CalculationWorkflowImpl.kt +++ b/app/src/main/kotlin/app/aaps/workflow/CalculationWorkflowImpl.kt @@ -29,8 +29,8 @@ import app.aaps.core.main.workflow.CalculationWorkflow.Companion.MAIN_CALCULATIO import app.aaps.core.main.workflow.CalculationWorkflow.Companion.PASS import app.aaps.core.utils.receivers.DataWorkerStorage import app.aaps.core.utils.worker.then +import app.aaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin import dagger.android.HasAndroidInjector -import info.nightscout.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin import info.nightscout.workflow.DummyWorker import info.nightscout.workflow.InvokeLoopWorker import info.nightscout.workflow.LoadBgDataWorker diff --git a/app/src/main/res/xml/pref_general.xml b/app/src/main/res/xml/pref_general.xml index cb89831ba4..82ae91d083 100644 --- a/app/src/main/res/xml/pref_general.xml +++ b/app/src/main/res/xml/pref_general.xml @@ -97,7 +97,7 @@ - diff --git a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/triggers/TriggerAutosensValueTest.kt b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/triggers/TriggerAutosensValueTest.kt index 765e255d2d..93ca063187 100644 --- a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/triggers/TriggerAutosensValueTest.kt +++ b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/triggers/TriggerAutosensValueTest.kt @@ -2,8 +2,8 @@ package app.aaps.plugins.automation.triggers import app.aaps.plugins.automation.R import app.aaps.plugins.automation.elements.Comparator +import app.aaps.plugins.iob.iobCobCalculator.data.AutosensDataObject import com.google.common.truth.Truth.assertThat -import info.nightscout.plugins.iob.iobCobCalculator.data.AutosensDataObject import org.json.JSONObject import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test diff --git a/plugins/main/build.gradle b/plugins/main/build.gradle index efa697e097..42103017e3 100644 --- a/plugins/main/build.gradle +++ b/plugins/main/build.gradle @@ -11,7 +11,7 @@ apply from: "${project.rootDir}/core/main/test_dependencies.gradle" apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle" apply from: "${project.rootDir}/core/main/jacoco_global.gradle" android { - namespace 'info.nightscout.plugins' + namespace 'app.aaps.plugins.main' } dependencies { diff --git a/plugins/main/src/main/AndroidManifest.xml b/plugins/main/src/main/AndroidManifest.xml index b830dd73bb..3b6b9488e3 100644 --- a/plugins/main/src/main/AndroidManifest.xml +++ b/plugins/main/src/main/AndroidManifest.xml @@ -17,7 +17,7 @@ android:exported="false" android:theme="@style/AppTheme"> - + @@ -28,10 +28,10 @@ android:exported="false" android:theme="@style/AppTheme" /> - + - llp.setMargins(0, 25, 0, 25) // llp.setMargins(left, top, right, bottom); + llp.setMargins(0, 25, 0, 25) llp.gravity = Gravity.CENTER } it.setOnClickListener { @@ -112,13 +113,13 @@ class TimeListEdit( private fun inflateRow(position: Int) { val resource = - if (data2 == null) info.nightscout.plugins.R.layout.timelistedit_element - else info.nightscout.plugins.R.layout.timelistedit_element_vertical + if (data2 == null) R.layout.timelistedit_element + else R.layout.timelistedit_element_vertical val childView = LayoutInflater.from(context).inflate(resource, layout, false).also { intervals[position] = it layout?.addView(it) } - childView.findViewById(info.nightscout.plugins.R.id.timelistedit_add).also { + childView.findViewById(R.id.timelistedit_add).also { addButtons[position] = it it.setOnClickListener { val seconds = secondFromMidnight(position) @@ -135,7 +136,7 @@ class TimeListEdit( fillView() } } - childView.findViewById(info.nightscout.plugins.R.id.timelistedit_remove).also { + childView.findViewById(R.id.timelistedit_remove).also { removeButtons[position] = it it.setOnClickListener { removeItem(position) @@ -144,7 +145,7 @@ class TimeListEdit( fillView() } } - SpinnerHelper(childView.findViewById(info.nightscout.plugins.R.id.timelistedit_time)).also { + SpinnerHelper(childView.findViewById(R.id.timelistedit_time)).also { spinners[position] = it it.setOnItemSelectedListener( object : AdapterView.OnItemSelectedListener { @@ -160,7 +161,7 @@ class TimeListEdit( } ) } - childView.findViewById(info.nightscout.plugins.R.id.timelistedit_edit1).also { + childView.findViewById(R.id.timelistedit_edit1).also { numberPickers1[position] = it it.setTextWatcher(object : TextWatcher { override fun afterTextChanged(s: Editable) { @@ -180,7 +181,7 @@ class TimeListEdit( }) it.tag = "$tagPrefix-1-$position" } - childView.findViewById(info.nightscout.plugins.R.id.timelistedit_edit2).also { + childView.findViewById(R.id.timelistedit_edit2).also { numberPickers2[position] = it it.setTextWatcher(object : TextWatcher { override fun afterTextChanged(s: Editable) { diff --git a/plugins/main/src/main/java/info/nightscout/plugins/skins/SkinButtonsOn.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/skins/SkinButtonsOn.kt similarity index 84% rename from plugins/main/src/main/java/info/nightscout/plugins/skins/SkinButtonsOn.kt rename to plugins/main/src/main/kotlin/app/aaps/plugins/main/skins/SkinButtonsOn.kt index 3464cf41b4..ee46b5de4b 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/skins/SkinButtonsOn.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/skins/SkinButtonsOn.kt @@ -1,7 +1,7 @@ -package info.nightscout.plugins.skins +package app.aaps.plugins.main.skins import app.aaps.core.interfaces.configuration.Config -import info.nightscout.plugins.R +import app.aaps.plugins.main.R import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/main/src/main/java/info/nightscout/plugins/skins/SkinClassic.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/skins/SkinClassic.kt similarity index 84% rename from plugins/main/src/main/java/info/nightscout/plugins/skins/SkinClassic.kt rename to plugins/main/src/main/kotlin/app/aaps/plugins/main/skins/SkinClassic.kt index 044b18ea4c..653f0b3f8f 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/skins/SkinClassic.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/skins/SkinClassic.kt @@ -1,8 +1,8 @@ -package info.nightscout.plugins.skins +package app.aaps.plugins.main.skins import app.aaps.core.interfaces.configuration.Config -import info.nightscout.plugins.R -import info.nightscout.plugins.databinding.OverviewFragmentBinding +import app.aaps.plugins.main.R +import app.aaps.plugins.main.databinding.OverviewFragmentBinding import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/main/src/main/java/info/nightscout/plugins/skins/SkinInterface.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/skins/SkinInterface.kt similarity index 94% rename from plugins/main/src/main/java/info/nightscout/plugins/skins/SkinInterface.kt rename to plugins/main/src/main/kotlin/app/aaps/plugins/main/skins/SkinInterface.kt index 8c00941204..60b78be9fe 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/skins/SkinInterface.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/skins/SkinInterface.kt @@ -1,13 +1,13 @@ -package info.nightscout.plugins.skins +package app.aaps.plugins.main.skins import android.util.TypedValue.COMPLEX_UNIT_PX import android.view.View import android.widget.LinearLayout import androidx.annotation.StringRes import androidx.constraintlayout.widget.ConstraintLayout -import info.nightscout.plugins.R -import info.nightscout.plugins.databinding.ActionsFragmentBinding -import info.nightscout.plugins.databinding.OverviewFragmentBinding +import app.aaps.plugins.main.R +import app.aaps.plugins.main.databinding.ActionsFragmentBinding +import app.aaps.plugins.main.databinding.OverviewFragmentBinding interface SkinInterface { diff --git a/plugins/main/src/main/java/info/nightscout/plugins/skins/SkinLargeDisplay.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/skins/SkinLargeDisplay.kt similarity index 84% rename from plugins/main/src/main/java/info/nightscout/plugins/skins/SkinLargeDisplay.kt rename to plugins/main/src/main/kotlin/app/aaps/plugins/main/skins/SkinLargeDisplay.kt index 8116e203f3..bc4750fd0b 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/skins/SkinLargeDisplay.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/skins/SkinLargeDisplay.kt @@ -1,8 +1,8 @@ -package info.nightscout.plugins.skins +package app.aaps.plugins.main.skins import app.aaps.core.interfaces.configuration.Config -import info.nightscout.plugins.R -import info.nightscout.plugins.databinding.OverviewFragmentBinding +import app.aaps.plugins.main.R +import app.aaps.plugins.main.databinding.OverviewFragmentBinding import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/main/src/main/java/info/nightscout/plugins/skins/SkinListPreference.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/skins/SkinListPreference.kt similarity index 93% rename from plugins/main/src/main/java/info/nightscout/plugins/skins/SkinListPreference.kt rename to plugins/main/src/main/kotlin/app/aaps/plugins/main/skins/SkinListPreference.kt index 137e5749d3..eff2589464 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/skins/SkinListPreference.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/skins/SkinListPreference.kt @@ -1,10 +1,10 @@ -package info.nightscout.plugins.skins +package app.aaps.plugins.main.skins import android.content.Context import android.util.AttributeSet import androidx.preference.ListPreference import dagger.android.HasAndroidInjector -import java.util.* +import java.util.Vector import javax.inject.Inject class SkinListPreference(context: Context, attrs: AttributeSet?) diff --git a/plugins/main/src/main/java/info/nightscout/plugins/skins/SkinLowRes.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/skins/SkinLowRes.kt similarity index 93% rename from plugins/main/src/main/java/info/nightscout/plugins/skins/SkinLowRes.kt rename to plugins/main/src/main/kotlin/app/aaps/plugins/main/skins/SkinLowRes.kt index 2b691a3a40..6ec62360f9 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/skins/SkinLowRes.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/skins/SkinLowRes.kt @@ -1,11 +1,11 @@ -package info.nightscout.plugins.skins +package app.aaps.plugins.main.skins import android.view.View.GONE import android.view.ViewGroup import app.aaps.core.interfaces.configuration.Config -import info.nightscout.plugins.R -import info.nightscout.plugins.databinding.ActionsFragmentBinding -import info.nightscout.plugins.databinding.OverviewFragmentBinding +import app.aaps.plugins.main.R +import app.aaps.plugins.main.databinding.ActionsFragmentBinding +import app.aaps.plugins.main.databinding.OverviewFragmentBinding import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/main/src/main/java/info/nightscout/plugins/skins/SkinProvider.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/skins/SkinProvider.kt similarity index 87% rename from plugins/main/src/main/java/info/nightscout/plugins/skins/SkinProvider.kt rename to plugins/main/src/main/kotlin/app/aaps/plugins/main/skins/SkinProvider.kt index f85ff8788b..ffba114e27 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/skins/SkinProvider.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/skins/SkinProvider.kt @@ -1,8 +1,8 @@ -package info.nightscout.plugins.skins +package app.aaps.plugins.main.skins import app.aaps.core.interfaces.sharedPreferences.SP -import info.nightscout.plugins.R -import info.nightscout.plugins.di.SkinsModule +import app.aaps.plugins.main.R +import app.aaps.plugins.main.di.SkinsModule import java.util.Collections import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/main/src/main/res/layout/actions_stats_fragment.xml b/plugins/main/src/main/res/layout/actions_stats_fragment.xml index 92369d4d14..4822b44d5a 100644 --- a/plugins/main/src/main/res/layout/actions_stats_fragment.xml +++ b/plugins/main/src/main/res/layout/actions_stats_fragment.xml @@ -4,7 +4,7 @@ android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="0,2,4" - tools:context="info.nightscout.plugins.general.actions.ActionsFragment"> + tools:context=".general.actions.ActionsFragment"> + tools:context=".general.wear.activities.CwfInfosActivity"> + tools:context=".profile.ProfileFragment"> + tools:context=".general.smsCommunicator.SmsCommunicatorFragment"> + tools:context=".general.wear.WearFragment">