Updates visibility and openness of attributes and methods
More mock-friendly, better access visibility
This commit is contained in:
parent
c6f0da396f
commit
0c1224faf6
|
@ -5,7 +5,6 @@ import android.os.PowerManager
|
|||
import info.nightscout.annotations.OpenForTesting
|
||||
import info.nightscout.rx.logging.AAPSLogger
|
||||
import info.nightscout.rx.logging.LTag
|
||||
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
|
||||
|
@ -16,12 +15,12 @@ import javax.inject.Singleton
|
|||
@Singleton
|
||||
@OpenForTesting
|
||||
open class WearUtil @Inject constructor(
|
||||
open val context: Context,
|
||||
open val aapsLogger: AAPSLogger
|
||||
private val context: Context,
|
||||
private val aapsLogger: AAPSLogger,
|
||||
) {
|
||||
|
||||
private val debugWakelocks = false
|
||||
open val rateLimits: MutableMap<String, Long> = HashMap()
|
||||
private val rateLimits: MutableMap<String, Long> = HashMap()
|
||||
|
||||
//==============================================================================================
|
||||
// Time related util methods
|
||||
|
@ -30,11 +29,11 @@ open class WearUtil @Inject constructor(
|
|||
return System.currentTimeMillis()
|
||||
}
|
||||
|
||||
fun msSince(`when`: Long): Long {
|
||||
open fun msSince(`when`: Long): Long {
|
||||
return timestamp() - `when`
|
||||
}
|
||||
|
||||
fun msTill(`when`: Long): Long {
|
||||
open fun msTill(`when`: Long): Long {
|
||||
return `when` - timestamp()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue