Remove accidentally copied code

This commit is contained in:
Valeri Gokadze 2024-12-04 22:52:27 +04:00
parent ee987b84fe
commit 24e9d6c5bf
2 changed files with 2 additions and 30 deletions

View file

@ -20,11 +20,6 @@
# debugging stack traces. # debugging stack traces.
-keepattributes SourceFile,LineNumberTable -keepattributes SourceFile,LineNumberTable
# required after agp 8 made r8 full mode default
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
-keep,allowobfuscation,allowshrinking public class * implements java.lang.reflect.Type
# If you keep the line number information, uncomment this to # If you keep the line number information, uncomment this to
# hide the original source file name. # hide the original source file name.
#-renamesourcefileattribute SourceFile #-renamesourcefileattribute SourceFile
@ -78,4 +73,4 @@
# TypeToken https://stackoverflow.com/questions/70969756/caused-by-java-lang-runtimeexception-missing-type-parameter # TypeToken https://stackoverflow.com/questions/70969756/caused-by-java-lang-runtimeexception-missing-type-parameter
-keep class com.google.gson.reflect.TypeToken -keep class com.google.gson.reflect.TypeToken
-keep class * extends com.google.gson.reflect.TypeToken -keep class * extends com.google.gson.reflect.TypeToken
-keep public class * implements java.lang.reflect.Type -keep public class * implements java.lang.reflect.Type

View file

@ -131,29 +131,6 @@ class SleepTimerDialog : DialogFragment() {
SystemClock.elapsedRealtime() + minutes * 60 * 1000 SystemClock.elapsedRealtime() + minutes * 60 * 1000
PreferenceUtil.nextSleepTimerElapsedRealTime = nextSleepTimerElapsedTime.toInt() PreferenceUtil.nextSleepTimerElapsedRealTime = nextSleepTimerElapsedTime.toInt()
val am = requireContext().getSystemService<AlarmManager>() val am = requireContext().getSystemService<AlarmManager>()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
if (am?.canScheduleExactAlarms() == false) {
Intent().also { intent ->
intent.action = Settings.ACTION_REQUEST_SCHEDULE_EXACT_ALARM
context.startActivity(intent)
}
} else {
am?.setExact(
AlarmManager.ELAPSED_REALTIME_WAKEUP,
nextSleepTimerElapsedTime,
pi
)
Toast.makeText(
requireContext(),
requireContext().resources.getString(
R.string.sleep_timer_set,
minutes
),
Toast.LENGTH_SHORT
).show()
}
}
if (VersionUtils.hasS() && am?.canScheduleExactAlarms() != true) { if (VersionUtils.hasS() && am?.canScheduleExactAlarms() != true) {
Toast.makeText( Toast.makeText(
@ -221,4 +198,4 @@ class SleepTimerDialog : DialogFragment() {
override fun onFinish() {} override fun onFinish() {}
} }
} }