simplify :core:utils
This commit is contained in:
parent
81eb4f3a1c
commit
ebcea9eed8
61 changed files with 54 additions and 206 deletions
|
@ -13,6 +13,9 @@ apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|||
android {
|
||||
|
||||
namespace 'info.nightscout.interfaces'
|
||||
defaultConfig {
|
||||
minSdkVersion 25 // for wear
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -8,6 +8,7 @@ import android.view.MenuItem
|
|||
import androidx.core.view.MenuCompat
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import info.nightscout.core.main.R
|
||||
import info.nightscout.shared.interfaces.ResourceHelper
|
||||
|
||||
class ActionModeHelper<T>(val rh: ResourceHelper, val activity: FragmentActivity?, val fragment: Fragment?) {
|
|
@ -23,6 +23,7 @@ class CryptoUtil @Inject constructor(
|
|||
) {
|
||||
|
||||
companion object {
|
||||
|
||||
private const val IV_LENGTH_BYTE = 12
|
||||
private const val TAG_LENGTH_BIT = 128
|
||||
private const val AES_KEY_SIZE_BIT = 256
|
|
@ -2,4 +2,9 @@
|
|||
<resources>
|
||||
<string name="format_carbs">%1$d g</string>
|
||||
|
||||
<string name="count_selected">%1$d selected</string>
|
||||
<string name="remove_items">Remove Items</string>
|
||||
<string name="sort_items">Sort Items</string>
|
||||
<string name="remove_selected_items">Remove Selected Items</string>
|
||||
<string name="sort_label">Sort</string>
|
||||
</resources>
|
|
@ -18,7 +18,10 @@ android {
|
|||
|
||||
dependencies {
|
||||
|
||||
implementation project(':app-wear-shared:shared')
|
||||
api "com.google.dagger:dagger-android:$dagger_version"
|
||||
api "com.google.dagger:dagger-android-support:$dagger_version"
|
||||
|
||||
api "net.danlew:android.joda:$joda_version"
|
||||
|
||||
//Firebase
|
||||
api platform('com.google.firebase:firebase-bom:32.3.1')
|
||||
|
|
|
@ -2,11 +2,11 @@ package info.nightscout.core.utils.receivers
|
|||
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import androidx.annotation.OpenForTesting
|
||||
import androidx.work.Data
|
||||
import androidx.work.ExistingWorkPolicy
|
||||
import androidx.work.OneTimeWorkRequest
|
||||
import androidx.work.WorkManager
|
||||
import info.nightscout.annotations.OpenForTesting
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
import javax.inject.Inject
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="count_selected">%1$d избрано</string>
|
||||
<string name="remove_items">Премахни артикули</string>
|
||||
<string name="sort_items">Подреди артикули</string>
|
||||
<string name="remove_selected_items">Премахнете избраните елементи</string>
|
||||
<string name="sort_label">Сортирай</string>
|
||||
</resources>
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="count_selected">Vybráno: %1$d</string>
|
||||
<string name="remove_items">Odebrat položky</string>
|
||||
<string name="sort_items">Seřadit položky</string>
|
||||
<string name="remove_selected_items">Odebrat vybrané položky</string>
|
||||
<string name="sort_label">Seřadit</string>
|
||||
</resources>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="count_selected">%1$d valgt</string>
|
||||
<string name="remove_items">Fjern Emner</string>
|
||||
<string name="sort_items">Sortér Emner</string>
|
||||
<string name="remove_selected_items">Fjern valgte emner</string>
|
||||
<string name="sort_label">Sortér</string>
|
||||
</resources>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="count_selected">%1$d ausgewählt</string>
|
||||
<string name="remove_items">Entferne Elemente</string>
|
||||
<string name="sort_items">Sortiere Elemente</string>
|
||||
<string name="remove_selected_items">lösche ausgewählte Elemente</string>
|
||||
<string name="sort_label">Sortieren</string>
|
||||
</resources>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="count_selected">Επιλέχθηκε %1$d</string>
|
||||
<string name="remove_items">Αφαίρεση Στοιχείων</string>
|
||||
<string name="sort_items">Ταξινόμηση Στοιχείων</string>
|
||||
<string name="remove_selected_items">Αφαίρεση Επιλεγμένων Στοιχείων</string>
|
||||
<string name="sort_label">Ταξινόμηση</string>
|
||||
</resources>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="count_selected">%1$d seleccionado</string>
|
||||
<string name="remove_items">Eliminar elementos</string>
|
||||
<string name="sort_items">Ordenar elementos</string>
|
||||
<string name="remove_selected_items">Eliminar elementos seleccionados</string>
|
||||
<string name="sort_label">Ordenar</string>
|
||||
</resources>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="count_selected">%1$d séléctionné(s)</string>
|
||||
<string name="remove_items">Supprimer les éléments</string>
|
||||
<string name="sort_items">Trier les éléments</string>
|
||||
<string name="remove_selected_items">Supprimer les éléments sélectionnés</string>
|
||||
<string name="sort_label">Trier</string>
|
||||
</resources>
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="count_selected">%1$d selezionati</string>
|
||||
<string name="remove_items">Rimuovi elementi</string>
|
||||
<string name="sort_items">Ordina elementi</string>
|
||||
<string name="remove_selected_items">Rimuovi elementi selezionati</string>
|
||||
<string name="sort_label">Ordina</string>
|
||||
</resources>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="count_selected">%1$d נבחרו</string>
|
||||
<string name="remove_items">פריטים שהוסרו</string>
|
||||
<string name="sort_items">מיין פריטים</string>
|
||||
<string name="remove_selected_items">הסר פריטים נבחרים</string>
|
||||
<string name="sort_label">מיין</string>
|
||||
</resources>
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="count_selected">%1$d 선택됨</string>
|
||||
<string name="remove_items">항목 제거하기</string>
|
||||
<string name="sort_items">항목 분류하기</string>
|
||||
<string name="remove_selected_items">선택된 항목 제거하기</string>
|
||||
<string name="sort_label">분류</string>
|
||||
</resources>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="count_selected">%1$d pasirinkta</string>
|
||||
<string name="remove_items">Pašalinti elementus</string>
|
||||
<string name="sort_items">Rūšiuoti elementus</string>
|
||||
<string name="remove_selected_items">Pašalinti pasirinktus elementus</string>
|
||||
<string name="sort_label">Rūšiuoti</string>
|
||||
</resources>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="count_selected">%1$d geselecteerd</string>
|
||||
<string name="remove_items">Items verwijderen</string>
|
||||
<string name="sort_items">Sorteer items</string>
|
||||
<string name="remove_selected_items">Verwijder geselecteerde items</string>
|
||||
<string name="sort_label">Sorteren</string>
|
||||
</resources>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="count_selected">%1$d valgt</string>
|
||||
<string name="remove_items">Slett elementer</string>
|
||||
<string name="sort_items">Sorter elementer</string>
|
||||
<string name="remove_selected_items">Slett valgte elementer</string>
|
||||
<string name="sort_label">Sorter</string>
|
||||
</resources>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="count_selected">Wybrany %1$d</string>
|
||||
<string name="remove_items">Usuń pozycje</string>
|
||||
<string name="sort_items">Sortuj pozycje</string>
|
||||
<string name="remove_selected_items">Usuń zaznaczone pozycje</string>
|
||||
<string name="sort_label">Sortuj</string>
|
||||
</resources>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="count_selected">Selecionado %1$d</string>
|
||||
<string name="remove_items">Remover itens</string>
|
||||
<string name="sort_items">Ordenar Itens</string>
|
||||
<string name="remove_selected_items">Remover itens selecionados</string>
|
||||
<string name="sort_label">Ordenar</string>
|
||||
</resources>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="count_selected">%1$d selecionados</string>
|
||||
<string name="remove_items">Remover itens</string>
|
||||
<string name="sort_items">Ordenar itens</string>
|
||||
<string name="remove_selected_items">Remover itens selecionados</string>
|
||||
<string name="sort_label">Ordenar</string>
|
||||
</resources>
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="sort_label">Sortează</string>
|
||||
</resources>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="count_selected">Выбрано: %1$d</string>
|
||||
<string name="remove_items">Удалить элементы</string>
|
||||
<string name="sort_items">Сортировать элементы</string>
|
||||
<string name="remove_selected_items">Удалить выбранные элементы</string>
|
||||
<string name="sort_label">Сортировать</string>
|
||||
</resources>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="count_selected">%1$d vybraných</string>
|
||||
<string name="remove_items">Odstrániť položky</string>
|
||||
<string name="sort_items">Zoradiť položky</string>
|
||||
<string name="remove_selected_items">Odstrániť vybrané položky</string>
|
||||
<string name="sort_label">Zoradiť</string>
|
||||
</resources>
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="count_selected">%1$d valt</string>
|
||||
<string name="remove_items">Ta bort objekt</string>
|
||||
<string name="sort_items">Sortera objekt</string>
|
||||
<string name="remove_selected_items">Ta bort valda objekt</string>
|
||||
<string name="sort_label">Sortera</string>
|
||||
</resources>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="count_selected">%1$d seçildi</string>
|
||||
<string name="remove_items">Öğeleri kaldır</string>
|
||||
<string name="sort_items">Öğeleri Sırala</string>
|
||||
<string name="remove_selected_items">Seçilen öğeleri kaldır</string>
|
||||
<string name="sort_label">Sırala</string>
|
||||
</resources>
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="count_selected">已选中 %1$d 项</string>
|
||||
<string name="remove_items">删除项目</string>
|
||||
<string name="sort_items">项目排序</string>
|
||||
<string name="remove_selected_items">删除选中项</string>
|
||||
<string name="sort_label">排序</string>
|
||||
</resources>
|
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="count_selected">%1$d selected</string>
|
||||
<string name="remove_items">Remove Items</string>
|
||||
<string name="sort_items">Sort Items</string>
|
||||
<string name="remove_selected_items">Remove Selected Items</string>
|
||||
<string name="sort_label">Sort</string>
|
||||
|
||||
</resources>
|
|
@ -41,8 +41,6 @@ files:
|
|||
translation: /core/main/src/main/res/values-%android_code%/strings.xml
|
||||
- source: /core/interfaces/src/main/res/values/strings.xml
|
||||
translation: /core/interfaces/src/main/res/values-%android_code%/strings.xml
|
||||
- source: /core/utils/src/main/res/values/strings.xml
|
||||
translation: /core/utils/src/main/res/values-%android_code%/strings.xml
|
||||
- source: /core/ui/src/main/res/values/protection.xml
|
||||
translation: /core/ui/src/main/res/values-%android_code%/protection.xml
|
||||
- source: /core/validators/src/main/res/values/validator.xml
|
||||
|
|
|
@ -12,6 +12,9 @@ apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|||
android {
|
||||
|
||||
namespace 'info.nightscout.database.entities'
|
||||
defaultConfig {
|
||||
minSdkVersion 25 // for wear
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
buildConfig = false
|
||||
|
|
|
@ -18,6 +18,7 @@ android {
|
|||
dependencies {
|
||||
implementation project(':app-wear-shared:shared')
|
||||
implementation project(':core:interfaces')
|
||||
implementation project(':core:main')
|
||||
implementation project(':core:ui')
|
||||
implementation project(':core:utils')
|
||||
implementation project(':core:validators')
|
||||
|
|
|
@ -21,6 +21,7 @@ android {
|
|||
dependencies {
|
||||
implementation project(':core:libraries')
|
||||
implementation project(':core:interfaces')
|
||||
implementation project(':core:main')
|
||||
implementation project(':core:ui')
|
||||
implementation project(':core:utils')
|
||||
implementation project(':app-wear-shared:shared')
|
||||
|
|
|
@ -27,6 +27,7 @@ android {
|
|||
dependencies {
|
||||
implementation project(':core:libraries')
|
||||
implementation project(':core:interfaces')
|
||||
implementation project(':core:main')
|
||||
implementation project(':core:ui')
|
||||
implementation project(':core:utils')
|
||||
implementation project(':app-wear-shared:shared')
|
||||
|
|
|
@ -18,6 +18,7 @@ dependencies {
|
|||
implementation 'androidx.media3:media3-common:1.1.1'
|
||||
implementation project(':app-wear-shared:shared')
|
||||
implementation project(':core:interfaces')
|
||||
implementation project(':core:main')
|
||||
implementation project(':core:utils')
|
||||
implementation project(':core:ui')
|
||||
implementation project(':core:validators')
|
||||
|
|
|
@ -31,6 +31,7 @@ android {
|
|||
|
||||
dependencies {
|
||||
implementation project(':core:interfaces')
|
||||
implementation project(':core:main')
|
||||
implementation project(':core:utils')
|
||||
implementation project(':core:ui')
|
||||
implementation project(':core:validators')
|
||||
|
|
|
@ -29,6 +29,7 @@ dependencies {
|
|||
implementation project(':app-wear-shared:shared-impl')
|
||||
implementation project(':core:libraries')
|
||||
implementation project(':core:interfaces')
|
||||
implementation project(':core:main')
|
||||
implementation project(':core:utils')
|
||||
implementation project(':core:ui')
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ dependencies {
|
|||
implementation project(':app-wear-shared:shared')
|
||||
implementation project(':database:entities')
|
||||
implementation project(':core:interfaces')
|
||||
implementation project(':core:main')
|
||||
implementation project(':core:utils')
|
||||
implementation project(':core:ui')
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ dependencies {
|
|||
implementation project(':core:libraries')
|
||||
implementation project(':app-wear-shared:shared')
|
||||
implementation project(':core:interfaces')
|
||||
implementation project(':core:main')
|
||||
implementation project(':core:ui')
|
||||
implementation project(':core:utils')
|
||||
implementation project(':core:validators')
|
||||
|
|
|
@ -14,11 +14,10 @@ import info.nightscout.interfaces.notifications.Notification
|
|||
import info.nightscout.interfaces.plugin.ActivePlugin
|
||||
import info.nightscout.interfaces.profile.Profile
|
||||
import info.nightscout.interfaces.profile.ProfileFunction
|
||||
import info.nightscout.interfaces.pump.BolusProgressData
|
||||
import info.nightscout.interfaces.pump.DetailedBolusInfo
|
||||
import info.nightscout.interfaces.pump.DetailedBolusInfoStorage
|
||||
import info.nightscout.interfaces.pump.BolusProgressData
|
||||
import info.nightscout.interfaces.pump.PumpSync
|
||||
import info.nightscout.interfaces.pump.defs.PumpType
|
||||
import info.nightscout.interfaces.queue.Callback
|
||||
import info.nightscout.interfaces.queue.CommandQueue
|
||||
import info.nightscout.interfaces.ui.UiInteraction
|
||||
|
@ -28,7 +27,27 @@ import info.nightscout.pump.medtrum.R
|
|||
import info.nightscout.pump.medtrum.code.ConnectionState
|
||||
import info.nightscout.pump.medtrum.comm.enums.AlarmState
|
||||
import info.nightscout.pump.medtrum.comm.enums.MedtrumPumpState
|
||||
import info.nightscout.pump.medtrum.comm.packets.*
|
||||
import info.nightscout.pump.medtrum.comm.packets.ActivatePacket
|
||||
import info.nightscout.pump.medtrum.comm.packets.AuthorizePacket
|
||||
import info.nightscout.pump.medtrum.comm.packets.CancelBolusPacket
|
||||
import info.nightscout.pump.medtrum.comm.packets.CancelTempBasalPacket
|
||||
import info.nightscout.pump.medtrum.comm.packets.ClearPumpAlarmPacket
|
||||
import info.nightscout.pump.medtrum.comm.packets.GetDeviceTypePacket
|
||||
import info.nightscout.pump.medtrum.comm.packets.GetRecordPacket
|
||||
import info.nightscout.pump.medtrum.comm.packets.GetTimePacket
|
||||
import info.nightscout.pump.medtrum.comm.packets.MedtrumPacket
|
||||
import info.nightscout.pump.medtrum.comm.packets.NotificationPacket
|
||||
import info.nightscout.pump.medtrum.comm.packets.PrimePacket
|
||||
import info.nightscout.pump.medtrum.comm.packets.ResumePumpPacket
|
||||
import info.nightscout.pump.medtrum.comm.packets.SetBasalProfilePacket
|
||||
import info.nightscout.pump.medtrum.comm.packets.SetBolusPacket
|
||||
import info.nightscout.pump.medtrum.comm.packets.SetPatchPacket
|
||||
import info.nightscout.pump.medtrum.comm.packets.SetTempBasalPacket
|
||||
import info.nightscout.pump.medtrum.comm.packets.SetTimePacket
|
||||
import info.nightscout.pump.medtrum.comm.packets.SetTimeZonePacket
|
||||
import info.nightscout.pump.medtrum.comm.packets.StopPatchPacket
|
||||
import info.nightscout.pump.medtrum.comm.packets.SubscribePacket
|
||||
import info.nightscout.pump.medtrum.comm.packets.SynchronizePacket
|
||||
import info.nightscout.pump.medtrum.util.MedtrumSnUtil
|
||||
import info.nightscout.rx.AapsSchedulers
|
||||
import info.nightscout.rx.bus.RxBus
|
||||
|
|
|
@ -30,6 +30,7 @@ dependencies {
|
|||
implementation project(':app-wear-shared:shared')
|
||||
implementation project(':core:libraries')
|
||||
implementation project(':core:interfaces')
|
||||
implementation project(':core:main')
|
||||
implementation project(':core:utils')
|
||||
implementation project(':core:ui')
|
||||
implementation project(':core:validators')
|
||||
|
|
|
@ -30,6 +30,7 @@ dependencies {
|
|||
implementation project(':app-wear-shared:shared')
|
||||
implementation project(':core:libraries')
|
||||
implementation project(':core:interfaces')
|
||||
implementation project(':core:main')
|
||||
implementation project(':core:utils')
|
||||
implementation project(':core:ui')
|
||||
implementation project(':core:validators')
|
||||
|
|
|
@ -16,6 +16,7 @@ android {
|
|||
|
||||
dependencies {
|
||||
implementation project(':core:interfaces')
|
||||
implementation project(':core:main')
|
||||
implementation project(':core:utils')
|
||||
implementation project(':app-wear-shared:shared')
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ class QuickWizardListActivity : TranslatedDaggerAppCompatActivity(), OnStartDrag
|
|||
}
|
||||
addMenuProvider(object : MenuProvider {
|
||||
override fun onCreateMenu(menu: Menu, menuInflater: MenuInflater) {
|
||||
menuInflater.inflate(info.nightscout.core.utils.R.menu.menu_actions, menu)
|
||||
menuInflater.inflate(info.nightscout.core.main.R.menu.menu_actions, menu)
|
||||
}
|
||||
|
||||
override fun onMenuItemSelected(menuItem: MenuItem): Boolean =
|
||||
|
|
|
@ -95,6 +95,7 @@ allprojects {
|
|||
dependencies {
|
||||
implementation project(':app-wear-shared:shared')
|
||||
implementation project(':app-wear-shared:shared-impl')
|
||||
implementation project(':core:interfaces')
|
||||
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
|
||||
|
|
Loading…
Reference in a new issue