mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-03-26 08:20:05 +01:00
removing some unused things
This commit is contained in:
parent
c15040c2f0
commit
af8f21f4a7
@ -1,9 +1,7 @@
|
|||||||
package com.simplemobiletools.clock.helpers
|
package com.simplemobiletools.clock.helpers
|
||||||
|
|
||||||
import com.simplemobiletools.clock.models.MyTimeZone
|
import com.simplemobiletools.clock.models.MyTimeZone
|
||||||
import java.util.Calendar
|
import java.util.*
|
||||||
import java.util.Date
|
|
||||||
import java.util.TimeZone
|
|
||||||
import kotlin.math.pow
|
import kotlin.math.pow
|
||||||
|
|
||||||
// shared preferences
|
// shared preferences
|
||||||
@ -35,7 +33,6 @@ const val PICK_AUDIO_FILE_INTENT_ID = 9994
|
|||||||
const val REMINDER_ACTIVITY_INTENT_ID = 9995
|
const val REMINDER_ACTIVITY_INTENT_ID = 9995
|
||||||
const val OPEN_ALARMS_TAB_INTENT_ID = 9996
|
const val OPEN_ALARMS_TAB_INTENT_ID = 9996
|
||||||
const val OPEN_STOPWATCH_TAB_INTENT_ID = 9993
|
const val OPEN_STOPWATCH_TAB_INTENT_ID = 9993
|
||||||
const val UPDATE_WIDGET_INTENT_ID = 9997
|
|
||||||
const val OPEN_APP_INTENT_ID = 9998
|
const val OPEN_APP_INTENT_ID = 9998
|
||||||
const val ALARM_NOTIF_ID = 9998
|
const val ALARM_NOTIF_ID = 9998
|
||||||
const val TIMER_RUNNING_NOTIF_ID = 10000
|
const val TIMER_RUNNING_NOTIF_ID = 10000
|
||||||
@ -61,15 +58,8 @@ const val SORT_BY_ALARM_TIME = 1
|
|||||||
const val TODAY_BIT = -1
|
const val TODAY_BIT = -1
|
||||||
const val TOMORROW_BIT = -2
|
const val TOMORROW_BIT = -2
|
||||||
|
|
||||||
const val DEFAULT_TIME = 300
|
|
||||||
|
|
||||||
fun getDefaultTimeZoneTitle(id: Int) = getAllTimeZones().firstOrNull { it.id == id }?.title ?: ""
|
fun getDefaultTimeZoneTitle(id: Int) = getAllTimeZones().firstOrNull { it.id == id }?.title ?: ""
|
||||||
|
|
||||||
fun getMSTillNextMinute(): Long {
|
|
||||||
val calendar = Calendar.getInstance()
|
|
||||||
return 60000L - calendar.get(Calendar.MILLISECOND) - calendar.get(Calendar.SECOND) * 1000
|
|
||||||
}
|
|
||||||
|
|
||||||
fun getPassedSeconds(): Int {
|
fun getPassedSeconds(): Int {
|
||||||
val calendar = Calendar.getInstance()
|
val calendar = Calendar.getInstance()
|
||||||
val isDaylightSavingActive = TimeZone.getDefault().inDaylightTime(Date())
|
val isDaylightSavingActive = TimeZone.getDefault().inDaylightTime(Date())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user