Skip to content

Commit

Permalink
Optimize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
kylecorry31 committed Jan 23, 2024
1 parent fb0327a commit 6806c63
Show file tree
Hide file tree
Showing 56 changed files with 115 additions and 76 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ 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
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 6806c63

Please sign in to comment.