mirror of
https://github.com/cmclark00/RetroMusicPlayer.git
synced 2025-05-17 15:45:21 +01:00
Remove accidentally copied code
This commit is contained in:
parent
ee987b84fe
commit
24e9d6c5bf
2 changed files with 2 additions and 30 deletions
7
app/proguard-rules.pro
vendored
7
app/proguard-rules.pro
vendored
|
@ -20,11 +20,6 @@
|
|||
# debugging stack traces.
|
||||
-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
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
@ -78,4 +73,4 @@
|
|||
# TypeToken https://stackoverflow.com/questions/70969756/caused-by-java-lang-runtimeexception-missing-type-parameter
|
||||
-keep class 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
|
|
@ -131,29 +131,6 @@ class SleepTimerDialog : DialogFragment() {
|
|||
SystemClock.elapsedRealtime() + minutes * 60 * 1000
|
||||
PreferenceUtil.nextSleepTimerElapsedRealTime = nextSleepTimerElapsedTime.toInt()
|
||||
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) {
|
||||
Toast.makeText(
|
||||
|
@ -221,4 +198,4 @@ class SleepTimerDialog : DialogFragment() {
|
|||
|
||||
override fun onFinish() {}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue