From 6806c63134b5e0f4031a6dbe81cad6d931f52c5e Mon Sep 17 00:00:00 2001 From: Kyle Corry Date: Tue, 23 Jan 2024 17:39:43 -0500 Subject: [PATCH] Optimize imports --- .../trail_sense/astronomy/ui/AstronomyFragment.kt | 2 +- .../calibration/ui/CalibrateAltimeterFragment.kt | 2 +- .../calibration/ui/CalibrateBarometerFragment.kt | 2 +- .../calibration/ui/CalibrateCompassFragment.kt | 2 +- .../infrastructure/persistence/BeaconDao.kt | 7 ++++++- .../infrastructure/persistence/BeaconGroupDao.kt | 7 ++++++- .../beacons/ui/form/CreateBeaconData.kt | 1 - .../navigation/domain/NavigationService.kt | 1 - .../infrastructure/NavigationPreferences.kt | 2 +- .../infrastructure/commands/BacktrackCommand.kt | 2 +- .../paths/infrastructure/persistence/PathDao.kt | 7 ++++++- .../infrastructure/persistence/PathGroupDao.kt | 7 ++++++- .../infrastructure/persistence/WaypointDao.kt | 7 ++++++- .../navigation/paths/ui/PathOverviewFragment.kt | 2 +- .../paths/ui/drawing/ClippedPathRenderer.kt | 4 ---- .../navigation/ui/LinearCompassView.kt | 2 -- .../navigation/ui/LocationBottomSheet.kt | 4 ++-- .../trail_sense/navigation/ui/RadarCompassView.kt | 4 ---- .../trail_sense/navigation/ui/RoundCompassView.kt | 1 - .../trail_sense/quickactions/QuickActionRuler.kt | 2 -- .../receivers/ServiceRestartAlerter.kt | 1 - .../kylecorry/trail_sense/shared/FormatService.kt | 6 +++--- .../shared/camera/AugmentedRealityUtils.kt | 1 - .../trail_sense/shared/camera/ShutterButton.kt | 1 - .../trail_sense/shared/database/AppDatabase.kt | 14 ++++++++++++-- .../trail_sense/shared/io/MapExportService.kt | 15 ++++++++++++++- .../QuickRecalibrationOrientationSensor.kt | 1 - .../shared/sensors/providers/CompassProvider.kt | 1 - .../kylecorry/trail_sense/shared/sharing/Share.kt | 2 +- .../trail_sense/shared/views/CameraView.kt | 1 - .../shared/views/CoordinateInputView.kt | 2 +- .../shared/views/PerspectiveCorrectionView.kt | 2 -- .../tools/augmented_reality/ARLineLayer.kt | 6 ------ .../tools/augmented_reality/ARMarker.kt | 3 --- .../tools/augmented_reality/SunCalibrator.kt | 1 - .../SimplePerspectiveCameraAnglePixelMapper.kt | 1 - .../battery/infrastructure/BatteryService.kt | 1 - .../trail_sense/tools/battery/ui/BatteryChart.kt | 1 - .../cliffheight/ui/ToolCliffHeightFragment.kt | 1 - .../trail_sense/tools/guide/ui/GuideFragment.kt | 1 - .../tools/maps/infrastructure/MapDao.kt | 7 ++++++- .../infrastructure/layers/BaseLayerManager.kt | 1 - .../maps/infrastructure/layers/ILayerManager.kt | 1 - .../layers/MyLocationLayerManager.kt | 1 - .../trail_sense/tools/maps/ui/BasePhotoMapView.kt | 1 - .../tools/maps/ui/MapCalibrationView.kt | 1 - .../tools/maps/ui/mappers/MapMapper.kt | 2 +- .../tools/notes/infrastructure/NoteDao.kt | 7 ++++++- .../tools/packs/infrastructure/PackDao.kt | 7 ++++++- .../tools/packs/infrastructure/PackItemDao.kt | 7 ++++++- .../trail_sense/tools/ruler/ui/RulerView.kt | 1 - .../infrastructure/commands/WeatherObserver.kt | 2 +- .../infrastructure/persistence/CloudReadingDao.kt | 7 ++++++- .../persistence/LightningStrikeDao.kt | 7 ++++++- .../persistence/PressureReadingDao.kt | 7 ++++++- .../weather/ui/TemperatureEstimationFragment.kt | 2 +- 56 files changed, 115 insertions(+), 76 deletions(-) diff --git a/app/src/main/java/com/kylecorry/trail_sense/astronomy/ui/AstronomyFragment.kt b/app/src/main/java/com/kylecorry/trail_sense/astronomy/ui/AstronomyFragment.kt index 9c300ee39..010546bac 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/astronomy/ui/AstronomyFragment.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/astronomy/ui/AstronomyFragment.kt @@ -14,9 +14,9 @@ import com.kylecorry.andromeda.core.time.CoroutineTimer import com.kylecorry.andromeda.core.ui.setOnProgressChangeListener import com.kylecorry.andromeda.fragments.BoundFragment import com.kylecorry.andromeda.fragments.inBackground -import com.kylecorry.andromeda.sense.location.IGPS import com.kylecorry.andromeda.markdown.MarkdownService import com.kylecorry.andromeda.pickers.Pickers +import com.kylecorry.andromeda.sense.location.IGPS import com.kylecorry.sol.science.astronomy.SunTimesMode import com.kylecorry.sol.science.astronomy.moon.MoonTruePhase import com.kylecorry.sol.time.Time.toZonedDateTime diff --git a/app/src/main/java/com/kylecorry/trail_sense/calibration/ui/CalibrateAltimeterFragment.kt b/app/src/main/java/com/kylecorry/trail_sense/calibration/ui/CalibrateAltimeterFragment.kt index 439581802..456acdd9f 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/calibration/ui/CalibrateAltimeterFragment.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/calibration/ui/CalibrateAltimeterFragment.kt @@ -16,10 +16,10 @@ import com.kylecorry.andromeda.core.time.CoroutineTimer import com.kylecorry.andromeda.core.time.Throttle import com.kylecorry.andromeda.fragments.AndromedaPreferenceFragment import com.kylecorry.andromeda.fragments.inBackground -import com.kylecorry.andromeda.sense.location.IGPS import com.kylecorry.andromeda.pickers.Pickers import com.kylecorry.andromeda.sense.altitude.FusedAltimeter import com.kylecorry.andromeda.sense.barometer.IBarometer +import com.kylecorry.andromeda.sense.location.IGPS import com.kylecorry.andromeda.sense.readAll import com.kylecorry.luna.coroutines.CoroutineQueueRunner import com.kylecorry.sol.science.geology.Geology diff --git a/app/src/main/java/com/kylecorry/trail_sense/calibration/ui/CalibrateBarometerFragment.kt b/app/src/main/java/com/kylecorry/trail_sense/calibration/ui/CalibrateBarometerFragment.kt index 397c6f0f4..0515cb65b 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/calibration/ui/CalibrateBarometerFragment.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/calibration/ui/CalibrateBarometerFragment.kt @@ -6,8 +6,8 @@ import androidx.preference.Preference import androidx.preference.SeekBarPreference import androidx.preference.SwitchPreferenceCompat import com.kylecorry.andromeda.core.system.Resources -import com.kylecorry.andromeda.core.time.Throttle import com.kylecorry.andromeda.core.time.CoroutineTimer +import com.kylecorry.andromeda.core.time.Throttle import com.kylecorry.andromeda.fragments.AndromedaPreferenceFragment import com.kylecorry.andromeda.fragments.inBackground import com.kylecorry.andromeda.fragments.observe diff --git a/app/src/main/java/com/kylecorry/trail_sense/calibration/ui/CalibrateCompassFragment.kt b/app/src/main/java/com/kylecorry/trail_sense/calibration/ui/CalibrateCompassFragment.kt index 010033387..08a205c22 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/calibration/ui/CalibrateCompassFragment.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/calibration/ui/CalibrateCompassFragment.kt @@ -14,8 +14,8 @@ import com.kylecorry.andromeda.core.system.Resources import com.kylecorry.andromeda.core.time.Throttle import com.kylecorry.andromeda.core.topics.generic.asLiveData import com.kylecorry.andromeda.fragments.AndromedaPreferenceFragment -import com.kylecorry.andromeda.sense.location.IGPS import com.kylecorry.andromeda.sense.compass.ICompass +import com.kylecorry.andromeda.sense.location.IGPS import com.kylecorry.sol.science.geology.Geology import com.kylecorry.trail_sense.R import com.kylecorry.trail_sense.shared.FormatService diff --git a/app/src/main/java/com/kylecorry/trail_sense/navigation/beacons/infrastructure/persistence/BeaconDao.kt b/app/src/main/java/com/kylecorry/trail_sense/navigation/beacons/infrastructure/persistence/BeaconDao.kt index 5663bf088..0da8a0b15 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/navigation/beacons/infrastructure/persistence/BeaconDao.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/navigation/beacons/infrastructure/persistence/BeaconDao.kt @@ -1,6 +1,11 @@ package com.kylecorry.trail_sense.navigation.beacons.infrastructure.persistence -import androidx.room.* +import androidx.room.Dao +import androidx.room.Delete +import androidx.room.Insert +import androidx.room.OnConflictStrategy +import androidx.room.Query +import androidx.room.Update import kotlinx.coroutines.flow.Flow @Dao diff --git a/app/src/main/java/com/kylecorry/trail_sense/navigation/beacons/infrastructure/persistence/BeaconGroupDao.kt b/app/src/main/java/com/kylecorry/trail_sense/navigation/beacons/infrastructure/persistence/BeaconGroupDao.kt index f9cb5dc64..42984e58c 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/navigation/beacons/infrastructure/persistence/BeaconGroupDao.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/navigation/beacons/infrastructure/persistence/BeaconGroupDao.kt @@ -1,6 +1,11 @@ package com.kylecorry.trail_sense.navigation.beacons.infrastructure.persistence -import androidx.room.* +import androidx.room.Dao +import androidx.room.Delete +import androidx.room.Insert +import androidx.room.OnConflictStrategy +import androidx.room.Query +import androidx.room.Update @Dao interface BeaconGroupDao { diff --git a/app/src/main/java/com/kylecorry/trail_sense/navigation/beacons/ui/form/CreateBeaconData.kt b/app/src/main/java/com/kylecorry/trail_sense/navigation/beacons/ui/form/CreateBeaconData.kt index 6e5b4797e..c24c10959 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/navigation/beacons/ui/form/CreateBeaconData.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/navigation/beacons/ui/form/CreateBeaconData.kt @@ -4,7 +4,6 @@ import com.kylecorry.andromeda.core.specifications.Specification import com.kylecorry.andromeda.core.system.GeoUri import com.kylecorry.sol.science.geology.Geology import com.kylecorry.sol.units.Bearing -import com.kylecorry.sol.units.CompassDirection import com.kylecorry.sol.units.Coordinate import com.kylecorry.sol.units.Distance import com.kylecorry.trail_sense.navigation.beacons.domain.Beacon diff --git a/app/src/main/java/com/kylecorry/trail_sense/navigation/domain/NavigationService.kt b/app/src/main/java/com/kylecorry/trail_sense/navigation/domain/NavigationService.kt index 90bc3e7f3..a73373944 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/navigation/domain/NavigationService.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/navigation/domain/NavigationService.kt @@ -4,7 +4,6 @@ import com.kylecorry.sol.math.SolMath.clamp import com.kylecorry.sol.math.SolMath.deltaAngle import com.kylecorry.sol.science.geology.Geology import com.kylecorry.sol.science.geology.NavigationVector -import com.kylecorry.sol.units.Bearing import com.kylecorry.sol.units.Coordinate import com.kylecorry.trail_sense.navigation.beacons.domain.Beacon import com.kylecorry.trail_sense.shared.Position diff --git a/app/src/main/java/com/kylecorry/trail_sense/navigation/infrastructure/NavigationPreferences.kt b/app/src/main/java/com/kylecorry/trail_sense/navigation/infrastructure/NavigationPreferences.kt index 21c48a400..b51494734 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/navigation/infrastructure/NavigationPreferences.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/navigation/infrastructure/NavigationPreferences.kt @@ -3,10 +3,10 @@ package com.kylecorry.trail_sense.navigation.infrastructure import android.content.Context import com.kylecorry.andromeda.core.toFloatCompat import com.kylecorry.andromeda.core.toIntCompat -import com.kylecorry.sol.science.geography.CoordinateFormat import com.kylecorry.andromeda.preferences.BooleanPreference import com.kylecorry.andromeda.preferences.IntEnumPreference import com.kylecorry.andromeda.preferences.StringEnumPreference +import com.kylecorry.sol.science.geography.CoordinateFormat import com.kylecorry.sol.units.Distance import com.kylecorry.sol.units.DistanceUnits import com.kylecorry.trail_sense.R diff --git a/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/infrastructure/commands/BacktrackCommand.kt b/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/infrastructure/commands/BacktrackCommand.kt index a6fbe4c69..a316a4cab 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/infrastructure/commands/BacktrackCommand.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/infrastructure/commands/BacktrackCommand.kt @@ -1,6 +1,7 @@ package com.kylecorry.trail_sense.navigation.paths.infrastructure.commands import android.content.Context +import com.kylecorry.andromeda.sense.readAll import com.kylecorry.sol.units.Distance import com.kylecorry.trail_sense.navigation.paths.domain.PathPoint import com.kylecorry.trail_sense.navigation.paths.infrastructure.alerts.BacktrackAlerter @@ -13,7 +14,6 @@ import com.kylecorry.trail_sense.shared.extensions.onIO import com.kylecorry.trail_sense.shared.networkQuality import com.kylecorry.trail_sense.shared.sensors.NullCellSignalSensor import com.kylecorry.trail_sense.shared.sensors.SensorService -import com.kylecorry.andromeda.sense.readAll import java.time.Duration import java.time.Instant diff --git a/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/infrastructure/persistence/PathDao.kt b/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/infrastructure/persistence/PathDao.kt index 85118fa5d..46b5c82fb 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/infrastructure/persistence/PathDao.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/infrastructure/persistence/PathDao.kt @@ -1,7 +1,12 @@ package com.kylecorry.trail_sense.navigation.paths.infrastructure.persistence import androidx.lifecycle.LiveData -import androidx.room.* +import androidx.room.Dao +import androidx.room.Delete +import androidx.room.Insert +import androidx.room.OnConflictStrategy +import androidx.room.Query +import androidx.room.Update import kotlinx.coroutines.flow.Flow @Dao diff --git a/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/infrastructure/persistence/PathGroupDao.kt b/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/infrastructure/persistence/PathGroupDao.kt index 0eaeba603..177a4c004 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/infrastructure/persistence/PathGroupDao.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/infrastructure/persistence/PathGroupDao.kt @@ -1,6 +1,11 @@ package com.kylecorry.trail_sense.navigation.paths.infrastructure.persistence -import androidx.room.* +import androidx.room.Dao +import androidx.room.Delete +import androidx.room.Insert +import androidx.room.OnConflictStrategy +import androidx.room.Query +import androidx.room.Update @Dao interface PathGroupDao { diff --git a/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/infrastructure/persistence/WaypointDao.kt b/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/infrastructure/persistence/WaypointDao.kt index d13754607..1bd71801e 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/infrastructure/persistence/WaypointDao.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/infrastructure/persistence/WaypointDao.kt @@ -1,7 +1,12 @@ package com.kylecorry.trail_sense.navigation.paths.infrastructure.persistence import androidx.lifecycle.LiveData -import androidx.room.* +import androidx.room.Dao +import androidx.room.Delete +import androidx.room.Insert +import androidx.room.OnConflictStrategy +import androidx.room.Query +import androidx.room.Update import com.kylecorry.trail_sense.navigation.paths.domain.WaypointEntity @Dao diff --git a/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/ui/PathOverviewFragment.kt b/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/ui/PathOverviewFragment.kt index 7529ff217..99ca4632c 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/ui/PathOverviewFragment.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/ui/PathOverviewFragment.kt @@ -12,8 +12,8 @@ import androidx.navigation.fragment.findNavController import com.kylecorry.andromeda.alerts.Alerts import com.kylecorry.andromeda.alerts.toast import com.kylecorry.andromeda.core.system.Resources -import com.kylecorry.andromeda.core.time.Throttle import com.kylecorry.andromeda.core.time.CoroutineTimer +import com.kylecorry.andromeda.core.time.Throttle import com.kylecorry.andromeda.core.tryOrNothing import com.kylecorry.andromeda.core.ui.Colors import com.kylecorry.andromeda.fragments.BoundFragment diff --git a/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/ui/drawing/ClippedPathRenderer.kt b/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/ui/drawing/ClippedPathRenderer.kt index 95dcf0371..f96e7fb35 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/ui/drawing/ClippedPathRenderer.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/navigation/paths/ui/drawing/ClippedPathRenderer.kt @@ -1,14 +1,10 @@ package com.kylecorry.trail_sense.navigation.paths.ui.drawing import com.kylecorry.andromeda.core.units.PixelCoordinate -import com.kylecorry.sol.math.geometry.Geometry import com.kylecorry.sol.math.geometry.Rectangle import com.kylecorry.sol.science.geology.CoordinateBounds import com.kylecorry.sol.units.Coordinate import com.kylecorry.trail_sense.shared.canvas.LineClipper -import com.kylecorry.trail_sense.shared.extensions.isSamePixel -import com.kylecorry.trail_sense.shared.toPixelCoordinate -import com.kylecorry.trail_sense.shared.toVector2 class ClippedPathRenderer( private val bounds: Rectangle, diff --git a/app/src/main/java/com/kylecorry/trail_sense/navigation/ui/LinearCompassView.kt b/app/src/main/java/com/kylecorry/trail_sense/navigation/ui/LinearCompassView.kt index 4e74439b7..4a9154319 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/navigation/ui/LinearCompassView.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/navigation/ui/LinearCompassView.kt @@ -12,10 +12,8 @@ import com.kylecorry.sol.units.CompassDirection import com.kylecorry.sol.units.Coordinate import com.kylecorry.trail_sense.R import com.kylecorry.trail_sense.shared.CustomUiUtils.getCardinalDirectionColor -import com.kylecorry.trail_sense.shared.CustomUiUtils.getPrimaryColor import com.kylecorry.trail_sense.shared.FormatService import com.kylecorry.trail_sense.shared.camera.AugmentedRealityUtils -import com.kylecorry.trail_sense.shared.colors.AppColor import com.kylecorry.trail_sense.shared.extensions.getValuesBetween class LinearCompassView : BaseCompassView { diff --git a/app/src/main/java/com/kylecorry/trail_sense/navigation/ui/LocationBottomSheet.kt b/app/src/main/java/com/kylecorry/trail_sense/navigation/ui/LocationBottomSheet.kt index e1ece87f4..b2abe9981 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/navigation/ui/LocationBottomSheet.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/navigation/ui/LocationBottomSheet.kt @@ -8,10 +8,10 @@ import androidx.core.view.isVisible import com.kylecorry.andromeda.core.system.Resources import com.kylecorry.andromeda.core.time.CoroutineTimer import com.kylecorry.andromeda.core.ui.setCompoundDrawables -import com.kylecorry.sol.science.geography.CoordinateFormat import com.kylecorry.andromeda.fragments.BoundBottomSheetDialogFragment -import com.kylecorry.andromeda.sense.location.IGPS import com.kylecorry.andromeda.pickers.Pickers +import com.kylecorry.andromeda.sense.location.IGPS +import com.kylecorry.sol.science.geography.CoordinateFormat import com.kylecorry.sol.units.Distance import com.kylecorry.trail_sense.R import com.kylecorry.trail_sense.databinding.FragmentLocationBinding diff --git a/app/src/main/java/com/kylecorry/trail_sense/navigation/ui/RadarCompassView.kt b/app/src/main/java/com/kylecorry/trail_sense/navigation/ui/RadarCompassView.kt index 2b0513392..057192766 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/navigation/ui/RadarCompassView.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/navigation/ui/RadarCompassView.kt @@ -12,8 +12,6 @@ import androidx.core.view.isVisible import com.kylecorry.andromeda.canvas.ArcMode import com.kylecorry.andromeda.canvas.ImageMode import com.kylecorry.andromeda.canvas.TextMode -import com.kylecorry.andromeda.core.cache.LRUCache -import com.kylecorry.andromeda.core.cache.MemoryCachedValue import com.kylecorry.andromeda.core.system.Resources import com.kylecorry.andromeda.core.units.PixelCoordinate import com.kylecorry.sol.math.SolMath.deltaAngle @@ -31,9 +29,7 @@ import com.kylecorry.trail_sense.shared.CustomUiUtils.getCardinalDirectionColor import com.kylecorry.trail_sense.shared.DistanceUtils.toRelativeDistance import com.kylecorry.trail_sense.shared.FormatService import com.kylecorry.trail_sense.shared.Units -import com.kylecorry.trail_sense.shared.colors.AppColor import com.kylecorry.trail_sense.shared.data.SimpleCachedValue -import com.kylecorry.trail_sense.shared.extensions.HashUtils import com.kylecorry.trail_sense.shared.maps.ICoordinateToPixelStrategy import kotlin.math.min diff --git a/app/src/main/java/com/kylecorry/trail_sense/navigation/ui/RoundCompassView.kt b/app/src/main/java/com/kylecorry/trail_sense/navigation/ui/RoundCompassView.kt index fa02a5b3d..a631f5561 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/navigation/ui/RoundCompassView.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/navigation/ui/RoundCompassView.kt @@ -16,7 +16,6 @@ import com.kylecorry.sol.units.Coordinate import com.kylecorry.trail_sense.R import com.kylecorry.trail_sense.shared.CustomUiUtils.getCardinalDirectionColor import com.kylecorry.trail_sense.shared.FormatService -import com.kylecorry.trail_sense.shared.colors.AppColor import kotlin.math.min diff --git a/app/src/main/java/com/kylecorry/trail_sense/quickactions/QuickActionRuler.kt b/app/src/main/java/com/kylecorry/trail_sense/quickactions/QuickActionRuler.kt index 64dee6536..6d5ad9ced 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/quickactions/QuickActionRuler.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/quickactions/QuickActionRuler.kt @@ -2,10 +2,8 @@ package com.kylecorry.trail_sense.quickactions import android.view.ViewGroup import android.widget.ImageButton -import androidx.constraintlayout.widget.ConstraintLayout import androidx.coordinatorlayout.widget.CoordinatorLayout import androidx.core.view.isVisible -import androidx.core.view.updateLayoutParams import androidx.fragment.app.Fragment import com.kylecorry.andromeda.core.system.Resources import com.kylecorry.trail_sense.R diff --git a/app/src/main/java/com/kylecorry/trail_sense/receivers/ServiceRestartAlerter.kt b/app/src/main/java/com/kylecorry/trail_sense/receivers/ServiceRestartAlerter.kt index e6e3cc05a..57bc636a1 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/receivers/ServiceRestartAlerter.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/receivers/ServiceRestartAlerter.kt @@ -1,6 +1,5 @@ package com.kylecorry.trail_sense.receivers -import android.app.PendingIntent import android.content.Context import com.kylecorry.andromeda.notify.Notify import com.kylecorry.trail_sense.NotificationChannels diff --git a/app/src/main/java/com/kylecorry/trail_sense/shared/FormatService.kt b/app/src/main/java/com/kylecorry/trail_sense/shared/FormatService.kt index ddefedffd..3d47fbdf5 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/shared/FormatService.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/shared/FormatService.kt @@ -9,6 +9,9 @@ import com.kylecorry.andromeda.battery.BatteryHealth import com.kylecorry.andromeda.core.math.DecimalFormatter import com.kylecorry.andromeda.core.sensors.Quality import com.kylecorry.andromeda.core.system.ResourceCache +import com.kylecorry.andromeda.signal.CellNetwork +import com.kylecorry.sol.science.astronomy.moon.MoonTruePhase +import com.kylecorry.sol.science.geography.CoordinateFormat import com.kylecorry.sol.science.geography.CoordinateFormatter.toDecimalDegrees import com.kylecorry.sol.science.geography.CoordinateFormatter.toDegreeDecimalMinutes import com.kylecorry.sol.science.geography.CoordinateFormatter.toDegreeMinutesSeconds @@ -16,9 +19,6 @@ import com.kylecorry.sol.science.geography.CoordinateFormatter.toMGRS import com.kylecorry.sol.science.geography.CoordinateFormatter.toOSGB import com.kylecorry.sol.science.geography.CoordinateFormatter.toUSNG import com.kylecorry.sol.science.geography.CoordinateFormatter.toUTM -import com.kylecorry.sol.science.geography.CoordinateFormat -import com.kylecorry.andromeda.signal.CellNetwork -import com.kylecorry.sol.science.astronomy.moon.MoonTruePhase import com.kylecorry.sol.science.meteorology.Precipitation import com.kylecorry.sol.science.meteorology.WeatherCondition import com.kylecorry.sol.science.shared.Season diff --git a/app/src/main/java/com/kylecorry/trail_sense/shared/camera/AugmentedRealityUtils.kt b/app/src/main/java/com/kylecorry/trail_sense/shared/camera/AugmentedRealityUtils.kt index 5ed60af3a..034e10cb4 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/shared/camera/AugmentedRealityUtils.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/shared/camera/AugmentedRealityUtils.kt @@ -12,7 +12,6 @@ import com.kylecorry.sol.math.Vector3 import com.kylecorry.sol.math.geometry.Size import com.kylecorry.sol.units.Coordinate import com.kylecorry.sol.units.Distance -import com.kylecorry.trail_sense.tools.augmented_reality.AugmentedRealityView import com.kylecorry.trail_sense.tools.augmented_reality.mapper.CameraAnglePixelMapper import com.kylecorry.trail_sense.tools.augmented_reality.mapper.LinearCameraAnglePixelMapper import com.kylecorry.trail_sense.tools.augmented_reality.mapper.SimplePerspectiveCameraAnglePixelMapper diff --git a/app/src/main/java/com/kylecorry/trail_sense/shared/camera/ShutterButton.kt b/app/src/main/java/com/kylecorry/trail_sense/shared/camera/ShutterButton.kt index fb0118db0..367cd31c1 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/shared/camera/ShutterButton.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/shared/camera/ShutterButton.kt @@ -7,7 +7,6 @@ import android.view.MotionEvent import com.kylecorry.andromeda.canvas.CanvasView import com.kylecorry.andromeda.core.system.Resources import com.kylecorry.trail_sense.shared.CustomUiUtils.getPrimaryColor -import com.kylecorry.trail_sense.shared.colors.AppColor import kotlin.math.min class ShutterButton(context: Context, attrs: AttributeSet? = null) : CanvasView(context, attrs) { diff --git a/app/src/main/java/com/kylecorry/trail_sense/shared/database/AppDatabase.kt b/app/src/main/java/com/kylecorry/trail_sense/shared/database/AppDatabase.kt index a8b2013c9..f3ba77383 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/shared/database/AppDatabase.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/shared/database/AppDatabase.kt @@ -14,7 +14,12 @@ import com.kylecorry.trail_sense.navigation.beacons.infrastructure.persistence.B import com.kylecorry.trail_sense.navigation.beacons.infrastructure.persistence.BeaconGroupDao import com.kylecorry.trail_sense.navigation.beacons.infrastructure.persistence.BeaconGroupEntity import com.kylecorry.trail_sense.navigation.paths.domain.WaypointEntity -import com.kylecorry.trail_sense.navigation.paths.infrastructure.persistence.* +import com.kylecorry.trail_sense.navigation.paths.infrastructure.persistence.PathDao +import com.kylecorry.trail_sense.navigation.paths.infrastructure.persistence.PathDatabaseMigrationWorker +import com.kylecorry.trail_sense.navigation.paths.infrastructure.persistence.PathEntity +import com.kylecorry.trail_sense.navigation.paths.infrastructure.persistence.PathGroupDao +import com.kylecorry.trail_sense.navigation.paths.infrastructure.persistence.PathGroupEntity +import com.kylecorry.trail_sense.navigation.paths.infrastructure.persistence.WaypointDao import com.kylecorry.trail_sense.tools.battery.domain.BatteryReadingEntity import com.kylecorry.trail_sense.tools.battery.infrastructure.persistence.BatteryDao import com.kylecorry.trail_sense.tools.maps.domain.MapEntity @@ -32,7 +37,12 @@ import com.kylecorry.trail_sense.tools.tides.infrastructure.persistence.TideTabl import com.kylecorry.trail_sense.tools.tides.infrastructure.persistence.TideTableDatabaseMigrationWorker import com.kylecorry.trail_sense.tools.tides.infrastructure.persistence.TideTableEntity import com.kylecorry.trail_sense.tools.tides.infrastructure.persistence.TideTableRowEntity -import com.kylecorry.trail_sense.weather.infrastructure.persistence.* +import com.kylecorry.trail_sense.weather.infrastructure.persistence.CloudReadingDao +import com.kylecorry.trail_sense.weather.infrastructure.persistence.CloudReadingEntity +import com.kylecorry.trail_sense.weather.infrastructure.persistence.LightningStrikeDao +import com.kylecorry.trail_sense.weather.infrastructure.persistence.LightningStrikeEntity +import com.kylecorry.trail_sense.weather.infrastructure.persistence.PressureReadingDao +import com.kylecorry.trail_sense.weather.infrastructure.persistence.PressureReadingEntity /** * The Room database for this app diff --git a/app/src/main/java/com/kylecorry/trail_sense/shared/io/MapExportService.kt b/app/src/main/java/com/kylecorry/trail_sense/shared/io/MapExportService.kt index 7da8d4bc7..901163a00 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/shared/io/MapExportService.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/shared/io/MapExportService.kt @@ -4,7 +4,20 @@ import android.content.Context import android.graphics.Bitmap import android.util.Size import com.kylecorry.andromeda.core.bitmap.BitmapUtils.rotate -import com.kylecorry.andromeda.pdf.* +import com.kylecorry.andromeda.pdf.Datum +import com.kylecorry.andromeda.pdf.GeographicCoordinateSystem +import com.kylecorry.andromeda.pdf.PDFObject +import com.kylecorry.andromeda.pdf.PdfConvert +import com.kylecorry.andromeda.pdf.ProjectedCoordinateSystem +import com.kylecorry.andromeda.pdf.Spheroid +import com.kylecorry.andromeda.pdf.bbox +import com.kylecorry.andromeda.pdf.catalog +import com.kylecorry.andromeda.pdf.gcs +import com.kylecorry.andromeda.pdf.geo +import com.kylecorry.andromeda.pdf.image +import com.kylecorry.andromeda.pdf.page +import com.kylecorry.andromeda.pdf.pages +import com.kylecorry.andromeda.pdf.viewport import com.kylecorry.sol.science.geology.ReferenceEllipsoid import com.kylecorry.trail_sense.tools.maps.domain.MapProjectionType import com.kylecorry.trail_sense.tools.maps.domain.PhotoMap diff --git a/app/src/main/java/com/kylecorry/trail_sense/shared/sensors/compass/QuickRecalibrationOrientationSensor.kt b/app/src/main/java/com/kylecorry/trail_sense/shared/sensors/compass/QuickRecalibrationOrientationSensor.kt index 833a18be4..a349b7692 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/shared/sensors/compass/QuickRecalibrationOrientationSensor.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/shared/sensors/compass/QuickRecalibrationOrientationSensor.kt @@ -6,7 +6,6 @@ import com.kylecorry.andromeda.core.sensors.AbstractSensor import com.kylecorry.andromeda.sense.orientation.IOrientationSensor import com.kylecorry.sol.math.Quaternion import com.kylecorry.sol.math.SolMath.real -import com.kylecorry.sol.math.filters.LowPassFilter import com.kylecorry.trail_sense.tools.metaldetector.ui.Debouncer import java.time.Duration import kotlin.math.sqrt diff --git a/app/src/main/java/com/kylecorry/trail_sense/shared/sensors/providers/CompassProvider.kt b/app/src/main/java/com/kylecorry/trail_sense/shared/sensors/providers/CompassProvider.kt index f00640b8a..cc42501b2 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/shared/sensors/providers/CompassProvider.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/shared/sensors/providers/CompassProvider.kt @@ -5,7 +5,6 @@ import android.hardware.Sensor import android.hardware.SensorManager import android.view.Surface import com.kylecorry.andromeda.sense.Sensors -import com.kylecorry.andromeda.sense.accelerometer.Accelerometer import com.kylecorry.andromeda.sense.accelerometer.GravitySensor import com.kylecorry.andromeda.sense.accelerometer.LowPassAccelerometer import com.kylecorry.andromeda.sense.compass.Compass diff --git a/app/src/main/java/com/kylecorry/trail_sense/shared/sharing/Share.kt b/app/src/main/java/com/kylecorry/trail_sense/shared/sharing/Share.kt index 34e3ebe1f..6280e0044 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/shared/sharing/Share.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/shared/sharing/Share.kt @@ -1,8 +1,8 @@ package com.kylecorry.trail_sense.shared.sharing import androidx.fragment.app.Fragment -import com.kylecorry.sol.science.geography.CoordinateFormat import com.kylecorry.andromeda.fragments.show +import com.kylecorry.sol.science.geography.CoordinateFormat import com.kylecorry.sol.units.Coordinate import com.kylecorry.trail_sense.R import com.kylecorry.trail_sense.navigation.infrastructure.share.LocationCopy diff --git a/app/src/main/java/com/kylecorry/trail_sense/shared/views/CameraView.kt b/app/src/main/java/com/kylecorry/trail_sense/shared/views/CameraView.kt index c5f307c19..113a39b51 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/shared/views/CameraView.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/shared/views/CameraView.kt @@ -25,7 +25,6 @@ import com.kylecorry.andromeda.core.ui.setOnProgressChangeListener import com.kylecorry.sol.math.SolMath import com.kylecorry.trail_sense.R import java.io.File -import kotlin.math.abs class CameraView(context: Context, attrs: AttributeSet?) : FrameLayout(context, attrs) { diff --git a/app/src/main/java/com/kylecorry/trail_sense/shared/views/CoordinateInputView.kt b/app/src/main/java/com/kylecorry/trail_sense/shared/views/CoordinateInputView.kt index 542465a80..9e6623eb3 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/shared/views/CoordinateInputView.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/shared/views/CoordinateInputView.kt @@ -11,8 +11,8 @@ import androidx.core.view.isVisible import androidx.core.widget.addTextChangedListener import com.kylecorry.andromeda.alerts.Alerts import com.kylecorry.andromeda.core.time.CoroutineTimer -import com.kylecorry.sol.science.geography.CoordinateFormatter.parse import com.kylecorry.andromeda.sense.location.IGPS +import com.kylecorry.sol.science.geography.CoordinateFormatter.parse import com.kylecorry.sol.units.Coordinate import com.kylecorry.trail_sense.R import com.kylecorry.trail_sense.navigation.beacons.domain.Beacon diff --git a/app/src/main/java/com/kylecorry/trail_sense/shared/views/PerspectiveCorrectionView.kt b/app/src/main/java/com/kylecorry/trail_sense/shared/views/PerspectiveCorrectionView.kt index 156d282a1..344ba00f1 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/shared/views/PerspectiveCorrectionView.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/shared/views/PerspectiveCorrectionView.kt @@ -13,9 +13,7 @@ import com.kylecorry.andromeda.core.bitmap.BitmapUtils.resizeToFit import com.kylecorry.andromeda.core.system.Resources import com.kylecorry.andromeda.core.units.PixelCoordinate import com.kylecorry.sol.math.geometry.Size -import com.kylecorry.trail_sense.R import com.kylecorry.trail_sense.shared.CustomUiUtils.getPrimaryColor -import com.kylecorry.trail_sense.shared.colors.AppColor import com.kylecorry.trail_sense.shared.io.FileSubsystem import com.kylecorry.trail_sense.tools.maps.domain.ImageMagnifier import com.kylecorry.trail_sense.tools.maps.domain.PercentBounds diff --git a/app/src/main/java/com/kylecorry/trail_sense/tools/augmented_reality/ARLineLayer.kt b/app/src/main/java/com/kylecorry/trail_sense/tools/augmented_reality/ARLineLayer.kt index 35d30c925..0c803492c 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/tools/augmented_reality/ARLineLayer.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/tools/augmented_reality/ARLineLayer.kt @@ -2,15 +2,9 @@ package com.kylecorry.trail_sense.tools.augmented_reality import com.kylecorry.andromeda.canvas.ICanvasDrawer import com.kylecorry.andromeda.canvas.StrokeCap -import com.kylecorry.andromeda.canvas.StrokeJoin import com.kylecorry.andromeda.core.units.PixelCoordinate -import com.kylecorry.sol.math.geometry.Geometry -import com.kylecorry.sol.math.geometry.Rectangle import com.kylecorry.trail_sense.shared.canvas.LineClipper -import com.kylecorry.trail_sense.shared.extensions.isSamePixel import com.kylecorry.trail_sense.shared.getBounds -import com.kylecorry.trail_sense.shared.toPixelCoordinate -import com.kylecorry.trail_sense.shared.toVector2 import com.kylecorry.trail_sense.tools.augmented_reality.position.AugmentedRealityCoordinate class ARLineLayer : ARLayer { diff --git a/app/src/main/java/com/kylecorry/trail_sense/tools/augmented_reality/ARMarker.kt b/app/src/main/java/com/kylecorry/trail_sense/tools/augmented_reality/ARMarker.kt index d51e92a02..192f6305b 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/tools/augmented_reality/ARMarker.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/tools/augmented_reality/ARMarker.kt @@ -1,11 +1,8 @@ package com.kylecorry.trail_sense.tools.augmented_reality import com.kylecorry.andromeda.canvas.ICanvasDrawer -import com.kylecorry.sol.units.Coordinate import com.kylecorry.trail_sense.shared.canvas.PixelCircle import com.kylecorry.trail_sense.tools.augmented_reality.position.ARPoint -import com.kylecorry.trail_sense.tools.augmented_reality.position.GeographicARPoint -import com.kylecorry.trail_sense.tools.augmented_reality.position.SphericalARPoint class ARMarker( val point: ARPoint, diff --git a/app/src/main/java/com/kylecorry/trail_sense/tools/augmented_reality/SunCalibrator.kt b/app/src/main/java/com/kylecorry/trail_sense/tools/augmented_reality/SunCalibrator.kt index 65edf7a77..c5e014f82 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/tools/augmented_reality/SunCalibrator.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/tools/augmented_reality/SunCalibrator.kt @@ -3,7 +3,6 @@ package com.kylecorry.trail_sense.tools.augmented_reality import com.kylecorry.andromeda.core.bitmap.BitmapUtils.resizeToFit import com.kylecorry.andromeda.core.coroutines.onDefault import com.kylecorry.andromeda.core.units.PixelCoordinate -import com.kylecorry.sol.math.Euler import com.kylecorry.sol.math.Quaternion import com.kylecorry.trail_sense.astronomy.domain.AstronomyService import com.kylecorry.trail_sense.shared.camera.GrayscaleMomentFinder diff --git a/app/src/main/java/com/kylecorry/trail_sense/tools/augmented_reality/mapper/SimplePerspectiveCameraAnglePixelMapper.kt b/app/src/main/java/com/kylecorry/trail_sense/tools/augmented_reality/mapper/SimplePerspectiveCameraAnglePixelMapper.kt index 39f1e3290..10138dee5 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/tools/augmented_reality/mapper/SimplePerspectiveCameraAnglePixelMapper.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/tools/augmented_reality/mapper/SimplePerspectiveCameraAnglePixelMapper.kt @@ -2,7 +2,6 @@ package com.kylecorry.trail_sense.tools.augmented_reality.mapper import android.graphics.RectF import com.kylecorry.andromeda.core.units.PixelCoordinate -import com.kylecorry.sol.math.SolMath import com.kylecorry.sol.math.SolMath.toRadians import com.kylecorry.sol.math.Vector2 import com.kylecorry.sol.math.Vector3 diff --git a/app/src/main/java/com/kylecorry/trail_sense/tools/battery/infrastructure/BatteryService.kt b/app/src/main/java/com/kylecorry/trail_sense/tools/battery/infrastructure/BatteryService.kt index 279f8254a..dc5e05894 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/tools/battery/infrastructure/BatteryService.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/tools/battery/infrastructure/BatteryService.kt @@ -3,7 +3,6 @@ package com.kylecorry.trail_sense.tools.battery.infrastructure import android.content.Context import com.kylecorry.andromeda.battery.IBattery import com.kylecorry.trail_sense.R -import com.kylecorry.trail_sense.navigation.paths.infrastructure.BacktrackIsEnabled import com.kylecorry.trail_sense.navigation.paths.infrastructure.BacktrackScheduler import com.kylecorry.trail_sense.shared.UserPreferences import com.kylecorry.trail_sense.tools.battery.domain.BatteryReading diff --git a/app/src/main/java/com/kylecorry/trail_sense/tools/battery/ui/BatteryChart.kt b/app/src/main/java/com/kylecorry/trail_sense/tools/battery/ui/BatteryChart.kt index 71ef6d9f0..5af5eeb71 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/tools/battery/ui/BatteryChart.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/tools/battery/ui/BatteryChart.kt @@ -7,7 +7,6 @@ import com.kylecorry.andromeda.views.chart.data.AreaChartLayer import com.kylecorry.sol.units.Reading import com.kylecorry.trail_sense.R import com.kylecorry.trail_sense.shared.CustomUiUtils.getPrimaryColor -import com.kylecorry.trail_sense.shared.colors.AppColor import com.kylecorry.trail_sense.tools.battery.domain.BatteryReading class BatteryChart(private val chart: Chart) { diff --git a/app/src/main/java/com/kylecorry/trail_sense/tools/cliffheight/ui/ToolCliffHeightFragment.kt b/app/src/main/java/com/kylecorry/trail_sense/tools/cliffheight/ui/ToolCliffHeightFragment.kt index 842e4573e..49b3bcc65 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/tools/cliffheight/ui/ToolCliffHeightFragment.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/tools/cliffheight/ui/ToolCliffHeightFragment.kt @@ -6,7 +6,6 @@ import android.view.LayoutInflater import android.view.MotionEvent import android.view.View import android.view.ViewGroup -import com.kylecorry.andromeda.alerts.Alerts import com.kylecorry.andromeda.core.time.CoroutineTimer import com.kylecorry.andromeda.fragments.BoundFragment import com.kylecorry.sol.units.Coordinate diff --git a/app/src/main/java/com/kylecorry/trail_sense/tools/guide/ui/GuideFragment.kt b/app/src/main/java/com/kylecorry/trail_sense/tools/guide/ui/GuideFragment.kt index fda448c91..698638088 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/tools/guide/ui/GuideFragment.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/tools/guide/ui/GuideFragment.kt @@ -1,7 +1,6 @@ package com.kylecorry.trail_sense.tools.guide.ui import android.os.Bundle -import android.text.method.LinkMovementMethod import android.view.LayoutInflater import android.view.View import android.view.ViewGroup diff --git a/app/src/main/java/com/kylecorry/trail_sense/tools/maps/infrastructure/MapDao.kt b/app/src/main/java/com/kylecorry/trail_sense/tools/maps/infrastructure/MapDao.kt index badb10e67..fb9b6a7aa 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/tools/maps/infrastructure/MapDao.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/tools/maps/infrastructure/MapDao.kt @@ -1,6 +1,11 @@ package com.kylecorry.trail_sense.tools.maps.infrastructure -import androidx.room.* +import androidx.room.Dao +import androidx.room.Delete +import androidx.room.Insert +import androidx.room.OnConflictStrategy +import androidx.room.Query +import androidx.room.Update import com.kylecorry.trail_sense.tools.maps.domain.MapEntity @Dao diff --git a/app/src/main/java/com/kylecorry/trail_sense/tools/maps/infrastructure/layers/BaseLayerManager.kt b/app/src/main/java/com/kylecorry/trail_sense/tools/maps/infrastructure/layers/BaseLayerManager.kt index 8fd7bb9b5..f9736ddff 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/tools/maps/infrastructure/layers/BaseLayerManager.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/tools/maps/infrastructure/layers/BaseLayerManager.kt @@ -1,7 +1,6 @@ package com.kylecorry.trail_sense.tools.maps.infrastructure.layers import com.kylecorry.sol.science.geology.CoordinateBounds -import com.kylecorry.sol.units.Bearing import com.kylecorry.sol.units.Coordinate abstract class BaseLayerManager : ILayerManager { diff --git a/app/src/main/java/com/kylecorry/trail_sense/tools/maps/infrastructure/layers/ILayerManager.kt b/app/src/main/java/com/kylecorry/trail_sense/tools/maps/infrastructure/layers/ILayerManager.kt index 9cb1e94d5..60f36025a 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/tools/maps/infrastructure/layers/ILayerManager.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/tools/maps/infrastructure/layers/ILayerManager.kt @@ -1,7 +1,6 @@ package com.kylecorry.trail_sense.tools.maps.infrastructure.layers import com.kylecorry.sol.science.geology.CoordinateBounds -import com.kylecorry.sol.units.Bearing import com.kylecorry.sol.units.Coordinate interface ILayerManager { diff --git a/app/src/main/java/com/kylecorry/trail_sense/tools/maps/infrastructure/layers/MyLocationLayerManager.kt b/app/src/main/java/com/kylecorry/trail_sense/tools/maps/infrastructure/layers/MyLocationLayerManager.kt index dde4f8ef1..03efdcbb2 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/tools/maps/infrastructure/layers/MyLocationLayerManager.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/tools/maps/infrastructure/layers/MyLocationLayerManager.kt @@ -1,7 +1,6 @@ package com.kylecorry.trail_sense.tools.maps.infrastructure.layers import androidx.annotation.ColorInt -import com.kylecorry.sol.units.Bearing import com.kylecorry.sol.units.Coordinate import com.kylecorry.trail_sense.navigation.ui.layers.MyLocationLayer diff --git a/app/src/main/java/com/kylecorry/trail_sense/tools/maps/ui/BasePhotoMapView.kt b/app/src/main/java/com/kylecorry/trail_sense/tools/maps/ui/BasePhotoMapView.kt index 62675efe8..22ada0c83 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/tools/maps/ui/BasePhotoMapView.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/tools/maps/ui/BasePhotoMapView.kt @@ -8,7 +8,6 @@ import com.kylecorry.andromeda.core.units.PixelCoordinate import com.kylecorry.sol.math.SolMath import com.kylecorry.sol.math.Vector2 import com.kylecorry.sol.science.geology.projections.IMapProjection -import com.kylecorry.sol.units.Bearing import com.kylecorry.sol.units.Coordinate import com.kylecorry.trail_sense.R import com.kylecorry.trail_sense.navigation.ui.layers.ILayer diff --git a/app/src/main/java/com/kylecorry/trail_sense/tools/maps/ui/MapCalibrationView.kt b/app/src/main/java/com/kylecorry/trail_sense/tools/maps/ui/MapCalibrationView.kt index 6867e9dd8..299ead210 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/tools/maps/ui/MapCalibrationView.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/tools/maps/ui/MapCalibrationView.kt @@ -7,7 +7,6 @@ import android.view.MotionEvent import com.kylecorry.andromeda.canvas.TextMode import com.kylecorry.andromeda.core.system.Resources import com.kylecorry.trail_sense.shared.CustomUiUtils.getPrimaryMarkerColor -import com.kylecorry.trail_sense.shared.colors.AppColor import com.kylecorry.trail_sense.tools.maps.domain.PercentCoordinate import com.kylecorry.trail_sense.tools.maps.domain.PhotoMap diff --git a/app/src/main/java/com/kylecorry/trail_sense/tools/maps/ui/mappers/MapMapper.kt b/app/src/main/java/com/kylecorry/trail_sense/tools/maps/ui/mappers/MapMapper.kt index 9a69243e7..b6e4bdb91 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/tools/maps/ui/mappers/MapMapper.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/tools/maps/ui/mappers/MapMapper.kt @@ -6,8 +6,8 @@ import android.util.Size import androidx.lifecycle.LifecycleOwner import com.kylecorry.andromeda.core.bitmap.BitmapUtils.rotate import com.kylecorry.andromeda.core.system.Resources -import com.kylecorry.andromeda.sense.location.IGPS import com.kylecorry.andromeda.print.Printer +import com.kylecorry.andromeda.sense.location.IGPS import com.kylecorry.andromeda.views.list.AsyncListIcon import com.kylecorry.andromeda.views.list.ListItem import com.kylecorry.andromeda.views.list.ListItemMapper diff --git a/app/src/main/java/com/kylecorry/trail_sense/tools/notes/infrastructure/NoteDao.kt b/app/src/main/java/com/kylecorry/trail_sense/tools/notes/infrastructure/NoteDao.kt index 7de700079..05cfc997a 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/tools/notes/infrastructure/NoteDao.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/tools/notes/infrastructure/NoteDao.kt @@ -1,7 +1,12 @@ package com.kylecorry.trail_sense.tools.notes.infrastructure import androidx.lifecycle.LiveData -import androidx.room.* +import androidx.room.Dao +import androidx.room.Delete +import androidx.room.Insert +import androidx.room.OnConflictStrategy +import androidx.room.Query +import androidx.room.Update import com.kylecorry.trail_sense.tools.notes.domain.Note @Dao diff --git a/app/src/main/java/com/kylecorry/trail_sense/tools/packs/infrastructure/PackDao.kt b/app/src/main/java/com/kylecorry/trail_sense/tools/packs/infrastructure/PackDao.kt index 8ce5fefe9..8fc08eec9 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/tools/packs/infrastructure/PackDao.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/tools/packs/infrastructure/PackDao.kt @@ -1,7 +1,12 @@ package com.kylecorry.trail_sense.tools.packs.infrastructure import androidx.lifecycle.LiveData -import androidx.room.* +import androidx.room.Dao +import androidx.room.Delete +import androidx.room.Insert +import androidx.room.OnConflictStrategy +import androidx.room.Query +import androidx.room.Update @Dao interface PackDao { diff --git a/app/src/main/java/com/kylecorry/trail_sense/tools/packs/infrastructure/PackItemDao.kt b/app/src/main/java/com/kylecorry/trail_sense/tools/packs/infrastructure/PackItemDao.kt index 73e862efe..6bf7d698e 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/tools/packs/infrastructure/PackItemDao.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/tools/packs/infrastructure/PackItemDao.kt @@ -1,7 +1,12 @@ package com.kylecorry.trail_sense.tools.packs.infrastructure import androidx.lifecycle.LiveData -import androidx.room.* +import androidx.room.Dao +import androidx.room.Delete +import androidx.room.Insert +import androidx.room.OnConflictStrategy +import androidx.room.Query +import androidx.room.Update @Dao interface PackItemDao { diff --git a/app/src/main/java/com/kylecorry/trail_sense/tools/ruler/ui/RulerView.kt b/app/src/main/java/com/kylecorry/trail_sense/tools/ruler/ui/RulerView.kt index b772a8018..cb2221ca4 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/tools/ruler/ui/RulerView.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/tools/ruler/ui/RulerView.kt @@ -13,7 +13,6 @@ import com.kylecorry.sol.units.Distance import com.kylecorry.sol.units.DistanceUnits import com.kylecorry.trail_sense.shared.CustomUiUtils.getPrimaryColor import com.kylecorry.trail_sense.shared.UserPreferences -import com.kylecorry.trail_sense.shared.colors.AppColor import kotlin.math.roundToInt class RulerView : CanvasView { diff --git a/app/src/main/java/com/kylecorry/trail_sense/weather/infrastructure/commands/WeatherObserver.kt b/app/src/main/java/com/kylecorry/trail_sense/weather/infrastructure/commands/WeatherObserver.kt index 5016974d7..29d17ca27 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/weather/infrastructure/commands/WeatherObserver.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/weather/infrastructure/commands/WeatherObserver.kt @@ -2,12 +2,12 @@ package com.kylecorry.trail_sense.weather.infrastructure.commands import android.content.Context import com.kylecorry.andromeda.sense.location.IGPS +import com.kylecorry.andromeda.sense.readAll import com.kylecorry.sol.math.SolMath.real import com.kylecorry.sol.units.Reading import com.kylecorry.trail_sense.shared.extensions.onDefault import com.kylecorry.trail_sense.shared.sensors.SensorService import com.kylecorry.trail_sense.shared.sensors.altimeter.AltimeterWrapper -import com.kylecorry.andromeda.sense.readAll import com.kylecorry.trail_sense.shared.sensors.thermometer.HistoricThermometer import com.kylecorry.trail_sense.weather.domain.RawWeatherObservation import java.time.Duration diff --git a/app/src/main/java/com/kylecorry/trail_sense/weather/infrastructure/persistence/CloudReadingDao.kt b/app/src/main/java/com/kylecorry/trail_sense/weather/infrastructure/persistence/CloudReadingDao.kt index 6ff466eb8..ee5ae9f2f 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/weather/infrastructure/persistence/CloudReadingDao.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/weather/infrastructure/persistence/CloudReadingDao.kt @@ -1,7 +1,12 @@ package com.kylecorry.trail_sense.weather.infrastructure.persistence import androidx.lifecycle.LiveData -import androidx.room.* +import androidx.room.Dao +import androidx.room.Delete +import androidx.room.Insert +import androidx.room.OnConflictStrategy +import androidx.room.Query +import androidx.room.Update @Dao interface CloudReadingDao { diff --git a/app/src/main/java/com/kylecorry/trail_sense/weather/infrastructure/persistence/LightningStrikeDao.kt b/app/src/main/java/com/kylecorry/trail_sense/weather/infrastructure/persistence/LightningStrikeDao.kt index f18d6840f..80fbaa0b1 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/weather/infrastructure/persistence/LightningStrikeDao.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/weather/infrastructure/persistence/LightningStrikeDao.kt @@ -1,7 +1,12 @@ package com.kylecorry.trail_sense.weather.infrastructure.persistence import androidx.lifecycle.LiveData -import androidx.room.* +import androidx.room.Dao +import androidx.room.Delete +import androidx.room.Insert +import androidx.room.OnConflictStrategy +import androidx.room.Query +import androidx.room.Update @Dao interface LightningStrikeDao { diff --git a/app/src/main/java/com/kylecorry/trail_sense/weather/infrastructure/persistence/PressureReadingDao.kt b/app/src/main/java/com/kylecorry/trail_sense/weather/infrastructure/persistence/PressureReadingDao.kt index 0d69f9bd9..51aae0bd7 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/weather/infrastructure/persistence/PressureReadingDao.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/weather/infrastructure/persistence/PressureReadingDao.kt @@ -1,7 +1,12 @@ package com.kylecorry.trail_sense.weather.infrastructure.persistence import androidx.lifecycle.LiveData -import androidx.room.* +import androidx.room.Dao +import androidx.room.Delete +import androidx.room.Insert +import androidx.room.OnConflictStrategy +import androidx.room.Query +import androidx.room.Update @Dao interface PressureReadingDao { diff --git a/app/src/main/java/com/kylecorry/trail_sense/weather/ui/TemperatureEstimationFragment.kt b/app/src/main/java/com/kylecorry/trail_sense/weather/ui/TemperatureEstimationFragment.kt index fd487d1ed..e6f9096d4 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/weather/ui/TemperatureEstimationFragment.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/weather/ui/TemperatureEstimationFragment.kt @@ -8,6 +8,7 @@ import androidx.core.view.isVisible import com.kylecorry.andromeda.core.time.CoroutineTimer import com.kylecorry.andromeda.fragments.BoundFragment import com.kylecorry.andromeda.fragments.inBackground +import com.kylecorry.andromeda.sense.readAll import com.kylecorry.sol.math.SolMath.roundPlaces import com.kylecorry.sol.science.meteorology.Meteorology import com.kylecorry.sol.units.Distance @@ -21,7 +22,6 @@ import com.kylecorry.trail_sense.shared.UserPreferences import com.kylecorry.trail_sense.shared.extensions.onMain import com.kylecorry.trail_sense.shared.sensors.LocationSubsystem import com.kylecorry.trail_sense.shared.sensors.SensorService -import com.kylecorry.andromeda.sense.readAll import com.kylecorry.trail_sense.shared.views.UnitInputView import java.time.Duration import kotlin.math.roundToInt