updating commons and target SDK to 29
This commit is contained in:
parent
b85333c984
commit
37369233cf
|
@ -9,13 +9,13 @@ if (keystorePropertiesFile.exists()) {
|
|||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
buildToolsVersion "28.0.3"
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion "29.0.3"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.simplemobiletools.clock"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 28
|
||||
targetSdkVersion 29
|
||||
versionCode 15
|
||||
versionName "5.0.4"
|
||||
setProperty("archivesBaseName", "clock")
|
||||
|
@ -57,7 +57,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:5.20.10'
|
||||
implementation 'com.simplemobiletools:commons:5.22.10'
|
||||
implementation 'com.facebook.stetho:stetho:1.5.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
|
||||
implementation 'com.shawnlin:number-picker:2.4.6'
|
||||
|
|
|
@ -54,7 +54,7 @@ class AlarmsAdapter(activity: SimpleActivity, var alarms: ArrayList<Alarm>, val
|
|||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(R.layout.item_alarm, parent)
|
||||
|
||||
override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) {
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val alarm = alarms[position]
|
||||
holder.bindView(alarm, true, true) { itemView, layoutPosition ->
|
||||
setupView(itemView, alarm)
|
||||
|
|
|
@ -16,11 +16,11 @@ class Config(context: Context) : BaseConfig(context) {
|
|||
set(showSeconds) = prefs.edit().putBoolean(SHOW_SECONDS, showSeconds).apply()
|
||||
|
||||
var selectedTimeZones: Set<String>
|
||||
get() = prefs.getStringSet(SELECTED_TIME_ZONES, HashSet())
|
||||
get() = prefs.getStringSet(SELECTED_TIME_ZONES, HashSet())!!
|
||||
set(selectedTimeZones) = prefs.edit().putStringSet(SELECTED_TIME_ZONES, selectedTimeZones).apply()
|
||||
|
||||
var editedTimeZoneTitles: Set<String>
|
||||
get() = prefs.getStringSet(EDITED_TIME_ZONE_TITLES, HashSet())
|
||||
get() = prefs.getStringSet(EDITED_TIME_ZONE_TITLES, HashSet())!!
|
||||
set(editedTimeZoneTitles) = prefs.edit().putStringSet(EDITED_TIME_ZONE_TITLES, editedTimeZoneTitles).apply()
|
||||
|
||||
var timerSeconds: Int
|
||||
|
@ -32,11 +32,11 @@ class Config(context: Context) : BaseConfig(context) {
|
|||
set(timerVibrate) = prefs.edit().putBoolean(TIMER_VIBRATE, timerVibrate).apply()
|
||||
|
||||
var timerSoundUri: String
|
||||
get() = prefs.getString(TIMER_SOUND_URI, context.getDefaultAlarmUri(ALARM_SOUND_TYPE_ALARM).toString())
|
||||
get() = prefs.getString(TIMER_SOUND_URI, context.getDefaultAlarmUri(ALARM_SOUND_TYPE_ALARM).toString())!!
|
||||
set(timerSoundUri) = prefs.edit().putString(TIMER_SOUND_URI, timerSoundUri).apply()
|
||||
|
||||
var timerSoundTitle: String
|
||||
get() = prefs.getString(TIMER_SOUND_TITLE, context.getDefaultAlarmTitle(ALARM_SOUND_TYPE_ALARM))
|
||||
get() = prefs.getString(TIMER_SOUND_TITLE, context.getDefaultAlarmTitle(ALARM_SOUND_TYPE_ALARM))!!
|
||||
set(timerSoundTitle) = prefs.edit().putString(TIMER_SOUND_TITLE, timerSoundTitle).apply()
|
||||
|
||||
var timerMaxReminderSecs: Int
|
||||
|
|
|
@ -10,8 +10,8 @@ import com.simplemobiletools.clock.helpers.ALARM_ID
|
|||
import com.simplemobiletools.commons.helpers.MINUTE_SECONDS
|
||||
|
||||
class SnoozeService : IntentService("Snooze") {
|
||||
override fun onHandleIntent(intent: Intent) {
|
||||
val id = intent.getIntExtra(ALARM_ID, -1)
|
||||
override fun onHandleIntent(intent: Intent?) {
|
||||
val id = intent!!.getIntExtra(ALARM_ID, -1)
|
||||
val alarm = dbHelper.getAlarmWithId(id) ?: return
|
||||
hideNotification(id)
|
||||
setupAlarmClock(alarm, config.snoozeTime * MINUTE_SECONDS)
|
||||
|
|
Loading…
Reference in New Issue