diff --git a/app/build.gradle b/app/build.gradle index c9b0e367..a3ccf478 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -41,11 +41,10 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:3.17.9' + implementation 'com.simplemobiletools:commons:3.17.11' implementation 'com.facebook.stetho:stetho:1.5.0' implementation 'com.android.support.constraint:constraint-layout:1.0.2' implementation 'com.shawnlin:number-picker:2.4.6' - implementation 'com.google.code.gson:gson:2.8.2' } Properties props = new Properties() diff --git a/app/src/main/kotlin/com/simplemobiletools/clock/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/clock/activities/MainActivity.kt index e432b87c..3bc4ac57 100644 --- a/app/src/main/kotlin/com/simplemobiletools/clock/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/clock/activities/MainActivity.kt @@ -19,11 +19,11 @@ import com.simplemobiletools.clock.extensions.dbHelper import com.simplemobiletools.clock.extensions.getNextAlarm import com.simplemobiletools.clock.extensions.rescheduleEnabledAlarms import com.simplemobiletools.clock.helpers.* -import com.simplemobiletools.clock.models.AlarmSound import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.LICENSE_NUMBER_PICKER import com.simplemobiletools.commons.helpers.LICENSE_STETHO import com.simplemobiletools.commons.helpers.isKitkatPlus +import com.simplemobiletools.commons.models.AlarmSound import com.simplemobiletools.commons.models.FAQItem import kotlinx.android.synthetic.main.activity_main.* import java.util.* diff --git a/app/src/main/kotlin/com/simplemobiletools/clock/adapters/ViewPagerAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/clock/adapters/ViewPagerAdapter.kt index 5e9517d8..4516fbc2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/clock/adapters/ViewPagerAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/clock/adapters/ViewPagerAdapter.kt @@ -11,7 +11,7 @@ import com.simplemobiletools.clock.fragments.TimerFragment import com.simplemobiletools.clock.helpers.TABS_COUNT import com.simplemobiletools.clock.helpers.TAB_ALARM import com.simplemobiletools.clock.helpers.TAB_TIMER -import com.simplemobiletools.clock.models.AlarmSound +import com.simplemobiletools.commons.models.AlarmSound class ViewPagerAdapter(fm: FragmentManager) : FragmentStatePagerAdapter(fm) { private val fragments = HashMap() diff --git a/app/src/main/kotlin/com/simplemobiletools/clock/dialogs/EditAlarmDialog.kt b/app/src/main/kotlin/com/simplemobiletools/clock/dialogs/EditAlarmDialog.kt index da82e5cb..ea53b78e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/clock/dialogs/EditAlarmDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/clock/dialogs/EditAlarmDialog.kt @@ -8,9 +8,11 @@ import android.widget.TextView import com.simplemobiletools.clock.R import com.simplemobiletools.clock.activities.SimpleActivity import com.simplemobiletools.clock.extensions.* +import com.simplemobiletools.clock.helpers.PICK_AUDIO_FILE_INTENT_ID import com.simplemobiletools.clock.models.Alarm -import com.simplemobiletools.clock.models.AlarmSound +import com.simplemobiletools.commons.dialogs.SelectAlarmSoundDialog import com.simplemobiletools.commons.extensions.* +import com.simplemobiletools.commons.models.AlarmSound import kotlinx.android.synthetic.main.dialog_edit_alarm.view.* class EditAlarmDialog(val activity: SimpleActivity, val alarm: Alarm, val callback: () -> Unit) { @@ -28,13 +30,13 @@ class EditAlarmDialog(val activity: SimpleActivity, val alarm: Alarm, val callba edit_alarm_sound.colorLeftDrawable(textColor) edit_alarm_sound.text = alarm.soundTitle edit_alarm_sound.setOnClickListener { - SelectAlarmSoundDialog(activity, alarm.soundUri, AudioManager.STREAM_ALARM, onAlarmPicked = { + SelectAlarmSoundDialog(activity, alarm.soundUri, AudioManager.STREAM_ALARM, PICK_AUDIO_FILE_INTENT_ID, onAlarmPicked = { if (it != null) { updateSelectedAlarmSound(it) } }, onAlarmSoundDeleted = { if (alarm.soundUri == it.uri) { - val defaultAlarm = AlarmSound(0, context.getDefaultAlarmTitle(), context.getDefaultAlarmUri().toString()) + val defaultAlarm = AlarmSound(0, context.getDefaultAlarmTitle(context.getString(R.string.alarm)), context.getDefaultAlarmUri().toString()) updateSelectedAlarmSound(defaultAlarm) } activity.checkAlarmsWithDeletedSoundUri(it.uri) diff --git a/app/src/main/kotlin/com/simplemobiletools/clock/dialogs/SelectAlarmSoundDialog.kt b/app/src/main/kotlin/com/simplemobiletools/clock/dialogs/SelectAlarmSoundDialog.kt deleted file mode 100644 index 6c0c1faf..00000000 --- a/app/src/main/kotlin/com/simplemobiletools/clock/dialogs/SelectAlarmSoundDialog.kt +++ /dev/null @@ -1,160 +0,0 @@ -package com.simplemobiletools.clock.dialogs - -import android.annotation.TargetApi -import android.content.Intent -import android.media.MediaPlayer -import android.net.Uri -import android.os.Build -import android.support.v7.app.AlertDialog -import android.view.ViewGroup -import android.widget.RadioGroup -import com.google.gson.Gson -import com.google.gson.reflect.TypeToken -import com.simplemobiletools.clock.R -import com.simplemobiletools.clock.activities.SimpleActivity -import com.simplemobiletools.clock.extensions.config -import com.simplemobiletools.clock.extensions.getAlarmSounds -import com.simplemobiletools.clock.helpers.PICK_AUDIO_FILE_INTENT_ID -import com.simplemobiletools.clock.models.AlarmSound -import com.simplemobiletools.commons.dialogs.RadioGroupDialog -import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor -import com.simplemobiletools.commons.extensions.setupDialogStuff -import com.simplemobiletools.commons.extensions.showErrorToast -import com.simplemobiletools.commons.helpers.isKitkatPlus -import com.simplemobiletools.commons.models.RadioItem -import com.simplemobiletools.commons.views.MyCompatRadioButton -import kotlinx.android.synthetic.main.dialog_select_alarm_sound.view.* - -class SelectAlarmSoundDialog(val activity: SimpleActivity, val currentUri: String, val audioStream: Int, val onAlarmPicked: (alarmSound: AlarmSound?) -> Unit, - val onAlarmSoundDeleted: (alarmSound: AlarmSound) -> Unit) { - private val ADD_NEW_SOUND_ID = -2 - - private val view = activity.layoutInflater.inflate(R.layout.dialog_select_alarm_sound, null) - private var systemAlarmSounds = ArrayList() - private var yourAlarmSounds = ArrayList() - private var mediaPlayer = MediaPlayer() - private val config = activity.config - private val dialog: AlertDialog - - init { - activity.getAlarmSounds { - systemAlarmSounds = it - gotSystemAlarms() - } - - view.dialog_select_alarm_your_label.setTextColor(activity.getAdjustedPrimaryColor()) - view.dialog_select_alarm_system_label.setTextColor(activity.getAdjustedPrimaryColor()) - - addYourAlarms() - - dialog = AlertDialog.Builder(activity) - .setOnDismissListener { mediaPlayer.stop() } - .setPositiveButton(R.string.ok, { dialog, which -> dialogConfirmed() }) - .setNegativeButton(R.string.cancel, null) - .create().apply { - activity.setupDialogStuff(view, this) - window.volumeControlStream = audioStream - } - } - - private fun addYourAlarms() { - view.dialog_select_alarm_your_radio.removeAllViews() - val token = object : TypeToken>() {}.type - yourAlarmSounds = Gson().fromJson>(config.yourAlarmSounds, token) ?: ArrayList() - yourAlarmSounds.add(AlarmSound(ADD_NEW_SOUND_ID, activity.getString(R.string.add_new_sound), "")) - yourAlarmSounds.forEach { - addAlarmSound(it, view.dialog_select_alarm_your_radio) - } - } - - private fun gotSystemAlarms() { - systemAlarmSounds.forEach { - addAlarmSound(it, view.dialog_select_alarm_system_radio) - } - } - - private fun addAlarmSound(alarmSound: AlarmSound, holder: ViewGroup) { - val radioButton = (activity.layoutInflater.inflate(R.layout.item_select_alarm, null) as MyCompatRadioButton).apply { - text = alarmSound.title - isChecked = alarmSound.uri == currentUri - id = alarmSound.id - setColors(config.textColor, activity.getAdjustedPrimaryColor(), config.backgroundColor) - setOnClickListener { - alarmClicked(alarmSound) - - if (holder == view.dialog_select_alarm_system_radio) { - view.dialog_select_alarm_your_radio.clearCheck() - } else { - view.dialog_select_alarm_system_radio.clearCheck() - } - } - - if (alarmSound.id != -2 && holder == view.dialog_select_alarm_your_radio) { - setOnLongClickListener { - val items = arrayListOf(RadioItem(1, context.getString(R.string.remove))) - - RadioGroupDialog(activity, items) { - removeAlarmSound(alarmSound) - } - true - } - } - } - - holder.addView(radioButton, RadioGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)) - } - - @TargetApi(Build.VERSION_CODES.KITKAT) - private fun alarmClicked(alarmSound: AlarmSound) { - if (alarmSound.id == ADD_NEW_SOUND_ID) { - val action = if (isKitkatPlus()) Intent.ACTION_OPEN_DOCUMENT else Intent.ACTION_GET_CONTENT - Intent(action).apply { - type = "audio/*" - activity.startActivityForResult(this, PICK_AUDIO_FILE_INTENT_ID) - - if (isKitkatPlus()) { - flags = flags or Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION - } - } - dialog.dismiss() - } else { - try { - mediaPlayer.stop() - mediaPlayer = MediaPlayer().apply { - setAudioStreamType(audioStream) - setDataSource(activity, Uri.parse(alarmSound.uri)) - isLooping = true - prepare() - start() - } - } catch (e: Exception) { - activity.showErrorToast(e) - } - } - } - - private fun removeAlarmSound(alarmSound: AlarmSound) { - val token = object : TypeToken>() {}.type - yourAlarmSounds = Gson().fromJson>(config.yourAlarmSounds, token) ?: ArrayList() - yourAlarmSounds.remove(alarmSound) - config.yourAlarmSounds = Gson().toJson(yourAlarmSounds) - addYourAlarms() - - if (alarmSound.id == view.dialog_select_alarm_your_radio.checkedRadioButtonId) { - view.dialog_select_alarm_your_radio.clearCheck() - view.dialog_select_alarm_system_radio.check(systemAlarmSounds.firstOrNull()?.id ?: 0) - } - - onAlarmSoundDeleted(alarmSound) - } - - private fun dialogConfirmed() { - if (view.dialog_select_alarm_your_radio.checkedRadioButtonId != -1) { - val checkedId = view.dialog_select_alarm_your_radio.checkedRadioButtonId - onAlarmPicked(yourAlarmSounds.firstOrNull { it.id == checkedId }) - } else { - val checkedId = view.dialog_select_alarm_system_radio.checkedRadioButtonId - onAlarmPicked(systemAlarmSounds.firstOrNull { it.id == checkedId }) - } - } -} diff --git a/app/src/main/kotlin/com/simplemobiletools/clock/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/clock/extensions/Activity.kt index d6711e6d..5badaddb 100644 --- a/app/src/main/kotlin/com/simplemobiletools/clock/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/clock/extensions/Activity.kt @@ -1,13 +1,7 @@ package com.simplemobiletools.clock.extensions import android.app.Activity -import android.media.RingtoneManager import android.view.WindowManager -import com.simplemobiletools.clock.models.AlarmSound -import com.simplemobiletools.commons.activities.BaseSimpleActivity -import com.simplemobiletools.commons.extensions.showErrorToast -import com.simplemobiletools.commons.helpers.PERMISSION_READ_STORAGE -import java.util.* fun Activity.showOverLockscreen() { window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON or @@ -15,42 +9,3 @@ fun Activity.showOverLockscreen() { WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED or WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON) } - -fun BaseSimpleActivity.getAlarmSounds(callback: (ArrayList) -> Unit) { - val alarms = ArrayList() - val manager = RingtoneManager(this) - manager.setType(RingtoneManager.TYPE_ALARM) - - try { - val cursor = manager.cursor - val defaultAlarm = AlarmSound(0, getDefaultAlarmTitle(), getDefaultAlarmUri().toString()) - alarms.add(defaultAlarm) - - var curId = 1 - while (cursor.moveToNext()) { - val title = cursor.getString(RingtoneManager.TITLE_COLUMN_INDEX) - var uri = cursor.getString(RingtoneManager.URI_COLUMN_INDEX) - val id = cursor.getString(RingtoneManager.ID_COLUMN_INDEX) - if (!uri.endsWith(id)) { - uri += "/$id" - } - val alarmSound = AlarmSound(curId++, title, uri) - alarms.add(alarmSound) - } - callback(alarms) - } catch (e: Exception) { - if (e is SecurityException) { - handlePermission(PERMISSION_READ_STORAGE) { - if (it) { - getAlarmSounds(callback) - } else { - showErrorToast(e) - callback(ArrayList()) - } - } - } else { - showErrorToast(e) - callback(ArrayList()) - } - } -} diff --git a/app/src/main/kotlin/com/simplemobiletools/clock/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/clock/extensions/Context.kt index b92f8d5a..840da6f1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/clock/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/clock/extensions/Context.kt @@ -7,7 +7,6 @@ import android.content.ComponentName import android.content.Context import android.content.Intent import android.media.AudioManager -import android.media.RingtoneManager import android.net.Uri import android.os.PowerManager import android.provider.Settings @@ -22,19 +21,17 @@ import com.simplemobiletools.clock.activities.SnoozeReminderActivity import com.simplemobiletools.clock.activities.SplashActivity import com.simplemobiletools.clock.helpers.* import com.simplemobiletools.clock.models.Alarm -import com.simplemobiletools.clock.models.AlarmSound import com.simplemobiletools.clock.models.MyTimeZone import com.simplemobiletools.clock.receivers.AlarmReceiver import com.simplemobiletools.clock.receivers.DateTimeWidgetUpdateReceiver import com.simplemobiletools.clock.receivers.HideAlarmReceiver import com.simplemobiletools.clock.receivers.HideTimerReceiver import com.simplemobiletools.clock.services.SnoozeService -import com.simplemobiletools.commons.extensions.formatMinutesToTimeString -import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor -import com.simplemobiletools.commons.extensions.toast +import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.isKitkatPlus import com.simplemobiletools.commons.helpers.isLollipopPlus import com.simplemobiletools.commons.helpers.isOreoPlus +import com.simplemobiletools.commons.models.AlarmSound import java.util.* import kotlin.math.pow @@ -77,11 +74,7 @@ fun Context.getAllTimeZonesModified(): ArrayList { fun Context.getModifiedTimeZoneTitle(id: Int) = getAllTimeZonesModified().firstOrNull { it.id == id }?.title ?: getDefaultTimeZoneTitle(id) -fun Context.getDefaultAlarmUri() = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM) - -fun Context.getDefaultAlarmTitle() = RingtoneManager.getRingtone(this, getDefaultAlarmUri())?.getTitle(this) ?: getString(R.string.alarm) - -fun Context.createNewAlarm(timeInMinutes: Int, weekDays: Int) = Alarm(0, timeInMinutes, weekDays, false, false, getDefaultAlarmTitle(), getDefaultAlarmUri().toString(), "") +fun Context.createNewAlarm(timeInMinutes: Int, weekDays: Int) = Alarm(0, timeInMinutes, weekDays, false, false, getDefaultAlarmTitle(getString(R.string.alarm)), getDefaultAlarmUri().toString(), "") fun Context.scheduleNextAlarm(alarm: Alarm, showToast: Boolean) { val calendar = Calendar.getInstance() @@ -271,14 +264,6 @@ fun Context.getTimerNotification(pendingIntent: PendingIntent, addDeleteIntent: return notification } -fun Context.grantReadUriPermission(uriString: String) { - try { - // ensure custom reminder sounds play well - grantUriPermission("com.android.systemui", Uri.parse(uriString), Intent.FLAG_GRANT_READ_URI_PERMISSION) - } catch (ignored: Exception) { - } -} - fun Context.getHideTimerPendingIntent(): PendingIntent { val intent = Intent(this, HideTimerReceiver::class.java) return PendingIntent.getBroadcast(this, TIMER_NOTIF_ID, intent, PendingIntent.FLAG_UPDATE_CURRENT) @@ -357,7 +342,7 @@ fun Context.getReminderActivityIntent(): PendingIntent { } fun Context.checkAlarmsWithDeletedSoundUri(uri: String) { - val defaultAlarm = AlarmSound(0, getDefaultAlarmTitle(), getDefaultAlarmUri().toString()) + val defaultAlarm = AlarmSound(0, getDefaultAlarmTitle(getString(R.string.alarm)), getDefaultAlarmUri().toString()) dbHelper.getAlarmsWithUri(uri).forEach { it.soundTitle = defaultAlarm.title it.soundUri = defaultAlarm.uri diff --git a/app/src/main/kotlin/com/simplemobiletools/clock/fragments/AlarmFragment.kt b/app/src/main/kotlin/com/simplemobiletools/clock/fragments/AlarmFragment.kt index 54be9f83..a932f5d4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/clock/fragments/AlarmFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/clock/fragments/AlarmFragment.kt @@ -13,9 +13,9 @@ import com.simplemobiletools.clock.extensions.* import com.simplemobiletools.clock.helpers.DEFAULT_ALARM_MINUTES import com.simplemobiletools.clock.interfaces.ToggleAlarmInterface import com.simplemobiletools.clock.models.Alarm -import com.simplemobiletools.clock.models.AlarmSound import com.simplemobiletools.commons.extensions.toast import com.simplemobiletools.commons.extensions.updateTextColors +import com.simplemobiletools.commons.models.AlarmSound import kotlinx.android.synthetic.main.fragment_alarm.view.* import java.util.* diff --git a/app/src/main/kotlin/com/simplemobiletools/clock/fragments/TimerFragment.kt b/app/src/main/kotlin/com/simplemobiletools/clock/fragments/TimerFragment.kt index 7ff91022..7ebced44 100644 --- a/app/src/main/kotlin/com/simplemobiletools/clock/fragments/TimerFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/clock/fragments/TimerFragment.kt @@ -14,10 +14,11 @@ import com.simplemobiletools.clock.R import com.simplemobiletools.clock.activities.ReminderActivity import com.simplemobiletools.clock.activities.SimpleActivity import com.simplemobiletools.clock.dialogs.MyTimePickerDialogDialog -import com.simplemobiletools.clock.dialogs.SelectAlarmSoundDialog import com.simplemobiletools.clock.extensions.* -import com.simplemobiletools.clock.models.AlarmSound +import com.simplemobiletools.clock.helpers.PICK_AUDIO_FILE_INTENT_ID +import com.simplemobiletools.commons.dialogs.SelectAlarmSoundDialog import com.simplemobiletools.commons.extensions.* +import com.simplemobiletools.commons.models.AlarmSound import kotlinx.android.synthetic.main.fragment_timer.view.* class TimerFragment : Fragment() { @@ -66,13 +67,13 @@ class TimerFragment : Fragment() { } timer_sound.setOnClickListener { - SelectAlarmSoundDialog(activity as SimpleActivity, config.timerSoundUri, AudioManager.STREAM_SYSTEM, onAlarmPicked = { + SelectAlarmSoundDialog(activity as SimpleActivity, config.timerSoundUri, AudioManager.STREAM_SYSTEM, PICK_AUDIO_FILE_INTENT_ID, onAlarmPicked = { if (it != null) { updateAlarmSound(it) } }, onAlarmSoundDeleted = { if (config.timerSoundUri == it.uri) { - val defaultAlarm = AlarmSound(0, context.getDefaultAlarmTitle(), context.getDefaultAlarmUri().toString()) + val defaultAlarm = AlarmSound(0, context.getDefaultAlarmTitle(getString(R.string.alarm)), context.getDefaultAlarmUri().toString()) updateAlarmSound(defaultAlarm) } context.checkAlarmsWithDeletedSoundUri(it.uri) diff --git a/app/src/main/kotlin/com/simplemobiletools/clock/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/clock/helpers/Config.kt index e6b7434f..a3e630a8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/clock/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/clock/helpers/Config.kt @@ -1,8 +1,9 @@ package com.simplemobiletools.clock.helpers import android.content.Context -import com.simplemobiletools.clock.extensions.getDefaultAlarmTitle -import com.simplemobiletools.clock.extensions.getDefaultAlarmUri +import com.simplemobiletools.clock.R +import com.simplemobiletools.commons.extensions.getDefaultAlarmTitle +import com.simplemobiletools.commons.extensions.getDefaultAlarmUri import com.simplemobiletools.commons.helpers.BaseConfig class Config(context: Context) : BaseConfig(context) { @@ -35,7 +36,7 @@ class Config(context: Context) : BaseConfig(context) { set(timerSoundUri) = prefs.edit().putString(TIMER_SOUND_URI, timerSoundUri).apply() var timerSoundTitle: String - get() = prefs.getString(TIMER_SOUND_TITLE, context.getDefaultAlarmTitle()) + get() = prefs.getString(TIMER_SOUND_TITLE, context.getDefaultAlarmTitle(context.getString(R.string.alarm))) set(timerSoundTitle) = prefs.edit().putString(TIMER_SOUND_TITLE, timerSoundTitle).apply() var timerMaxReminderSecs: Int @@ -49,8 +50,4 @@ class Config(context: Context) : BaseConfig(context) { var useTextShadow: Boolean get() = prefs.getBoolean(USE_TEXT_SHADOW, true) set(useTextShadow) = prefs.edit().putBoolean(USE_TEXT_SHADOW, useTextShadow).apply() - - var yourAlarmSounds: String - get() = prefs.getString(YOUR_ALARM_SOUNDS, "") - set(yourAlarmSounds) = prefs.edit().putString(YOUR_ALARM_SOUNDS, yourAlarmSounds).apply() } diff --git a/app/src/main/kotlin/com/simplemobiletools/clock/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/clock/helpers/Constants.kt index 7fd08987..b879b7a0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/clock/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/clock/helpers/Constants.kt @@ -14,7 +14,6 @@ const val TIMER_SOUND_TITLE = "timer_sound_title" const val TIMER_MAX_REMINDER_SECS = "timer_max_reminder_secs" const val ALARM_MAX_REMINDER_SECS = "alarm_max_reminder_secs" const val USE_TEXT_SHADOW = "use_text_shadow" -const val YOUR_ALARM_SOUNDS = "your_alarm_sounds" const val TABS_COUNT = 4 const val EDITED_TIME_ZONE_SEPARATOR = ":" diff --git a/app/src/main/kotlin/com/simplemobiletools/clock/models/AlarmSound.kt b/app/src/main/kotlin/com/simplemobiletools/clock/models/AlarmSound.kt deleted file mode 100644 index 8961a229..00000000 --- a/app/src/main/kotlin/com/simplemobiletools/clock/models/AlarmSound.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.simplemobiletools.clock.models - -data class AlarmSound(val id: Int, var title: String, var uri: String) diff --git a/app/src/main/res/layout/dialog_select_alarm_sound.xml b/app/src/main/res/layout/dialog_select_alarm_sound.xml deleted file mode 100644 index 00bce196..00000000 --- a/app/src/main/res/layout/dialog_select_alarm_sound.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/item_select_alarm.xml b/app/src/main/res/layout/item_select_alarm.xml deleted file mode 100644 index 0fcd2753..00000000 --- a/app/src/main/res/layout/item_select_alarm.xml +++ /dev/null @@ -1,8 +0,0 @@ - - diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 5460f1ae..6ad61845 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -5,7 +5,6 @@ Vibration Label Keine Tage ausgewählt - Wecker Timer Runde Die Stoppuhr wurde angehalten diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index acff6e47..e2a08cf7 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -5,7 +5,6 @@ Vibrer Titre Aucun jour choisi ! - Réveil Minuteur Tour Chronomètre arrêté diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 46c8acb8..9b75b3c6 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -5,7 +5,6 @@ Vibriraj Oznaka Nije odabran nijedan dan - Alarm Brojač Krug Štoperica je zaustavljena diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index d6c503e8..519c7bbc 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -5,7 +5,6 @@ Vibruoti Etiketė Nepasirinkta nė vienos dienos - Žadintuvas Laikmatis Etapas Chronometras buvo sustabdytas diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index a76106bb..73e8315f 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -5,7 +5,6 @@ Vibrar Legenda Nenhum dia selecionado - Alarme Temporizador Volta Cronómetro parado diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 75069b6d..f15ef32e 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -5,7 +5,6 @@ Vibrovanie Štítok Neboli označené žiadne dni - Budík Časovač Okruh Stopky boli zastavené diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index a1964d0f..517293e3 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -5,7 +5,6 @@ 震動 標籤 未選擇哪一天 - 鬧鐘 計時器 分段 碼錶已停止 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 7e2200c5..76161700 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -5,7 +5,6 @@ Vibrate Label No days selected - Alarm Timer Lap Stopwatch has been stopped