Skip to content

Commit bcae13b

Browse files
Bump android-gradle-plugin from 8.6.1 to 8.7.1 (#3112)
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: ashiagr <[email protected]>
1 parent 565d4f7 commit bcae13b

File tree

5 files changed

+9
-27
lines changed

5 files changed

+9
-27
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
2424
<uses-permission android:name="com.android.vending.CHECK_LICENSE"/>
2525
<uses-permission android:name="com.android.vending.BILLING" />
26-
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
2726
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
2827
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
2928

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
[versions]
1919
aboutlibraries = "11.2.3"
20-
android-gradle-plugin = "8.6.1"
20+
android-gradle-plugin = "8.7.1"
2121
billing = "7.0.0"
2222
coil = "2.7.0"
2323
compose = "2024.10.00" # https://developer.android.com/jetpack/compose/bom/bom-mapping

modules/services/repositories/src/main/AndroidManifest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
xmlns:tools="http://schemas.android.com/tools">
55

66
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
7-
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
87

98
<application android:usesCleartextTraffic="true">
109
<provider

modules/services/repositories/src/main/java/au/com/shiftyjelly/pocketcasts/repositories/playback/SleepTimer.kt

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ import android.app.AlarmManager
44
import android.app.PendingIntent
55
import android.content.Context
66
import android.content.Intent
7-
import android.os.Build
8-
import android.provider.Settings.ACTION_REQUEST_SCHEDULE_EXACT_ALARM
97
import android.text.format.DateUtils
10-
import android.widget.Toast
118
import au.com.shiftyjelly.pocketcasts.analytics.AnalyticsEvent.PLAYER_SLEEP_TIMER_RESTARTED
129
import au.com.shiftyjelly.pocketcasts.analytics.AnalyticsTracker
1310
import au.com.shiftyjelly.pocketcasts.utils.log.LogBuffer
@@ -18,7 +15,6 @@ import javax.inject.Singleton
1815
import kotlin.time.Duration
1916
import kotlin.time.Duration.Companion.milliseconds
2017
import kotlin.time.Duration.Companion.minutes
21-
import au.com.shiftyjelly.pocketcasts.localization.R as LR
2218

2319
@Singleton
2420
class SleepTimer @Inject constructor(
@@ -134,26 +130,15 @@ class SleepTimer @Inject constructor(
134130
val sleepIntent = getSleepIntent()
135131
val alarmManager = getAlarmManager()
136132
alarmManager.cancel(sleepIntent)
137-
138-
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && !alarmManager.canScheduleExactAlarms()) {
139-
Toast.makeText(context, LR.string.player_sleep_timer_start_failed, Toast.LENGTH_LONG).show()
140-
context.startActivity(
141-
Intent(ACTION_REQUEST_SCHEDULE_EXACT_ALARM)
142-
// Because we're not launching this from an activity context, we must add the FLAG_ACTIVITY_NEW_TASK flag
143-
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK),
144-
)
133+
return try {
134+
LogBuffer.i(TAG, "Starting...")
135+
alarmManager.setAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, timeMs, sleepIntent)
136+
sleepTimeMs = timeMs
137+
lastTimeSleepTimeHasFinished = timeMs.milliseconds
138+
true
139+
} catch (e: Exception) {
140+
LogBuffer.e(LogBuffer.TAG_CRASH, e, "Unable to start sleep timer.")
145141
false
146-
} else {
147-
return try {
148-
LogBuffer.i(TAG, "Starting...")
149-
alarmManager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, timeMs, sleepIntent)
150-
sleepTimeMs = timeMs
151-
lastTimeSleepTimeHasFinished = timeMs.milliseconds
152-
true
153-
} catch (e: Exception) {
154-
LogBuffer.e(LogBuffer.TAG_CRASH, e, "Unable to start sleep timer.")
155-
false
156-
}
157142
}
158143
}
159144

wear/src/main/AndroidManifest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
1010
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
1111
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
12-
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
1312
<uses-permission android:name="android.permission.VIBRATE"/>
1413
<uses-permission android:name="android.permission.WAKE_LOCK" />
1514
<uses-permission android:name="com.android.vending.BILLING" />

0 commit comments

Comments
 (0)