From 24e9d6c5bf7ee92c5e84a12f12955bdf11a33807 Mon Sep 17 00:00:00 2001 From: Valeri Gokadze Date: Wed, 4 Dec 2024 22:52:27 +0400 Subject: [PATCH] Remove accidentally copied code --- app/proguard-rules.pro | 7 +----- .../retromusic/dialogs/SleepTimerDialog.kt | 25 +------------------ 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 49498d773..005f38ec7 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -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 \ No newline at end of file diff --git a/app/src/main/java/code/name/monkey/retromusic/dialogs/SleepTimerDialog.kt b/app/src/main/java/code/name/monkey/retromusic/dialogs/SleepTimerDialog.kt index a187a7f46..90e3a7572 100755 --- a/app/src/main/java/code/name/monkey/retromusic/dialogs/SleepTimerDialog.kt +++ b/app/src/main/java/code/name/monkey/retromusic/dialogs/SleepTimerDialog.kt @@ -131,29 +131,6 @@ class SleepTimerDialog : DialogFragment() { SystemClock.elapsedRealtime() + minutes * 60 * 1000 PreferenceUtil.nextSleepTimerElapsedRealTime = nextSleepTimerElapsedTime.toInt() val am = requireContext().getSystemService() - 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() {} } -} +} \ No newline at end of file