Skip to content

Commit

Permalink
Refine code style
Browse files Browse the repository at this point in the history
  • Loading branch information
Mygod committed Apr 18, 2023
1 parent e96c1f3 commit 673a8c4
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ import android.content.Context
import android.content.Intent
import android.os.SystemClock
import androidx.core.content.getSystemService
import be.mygod.pogoplusplus.App.Companion.app

class SfidaTimeoutReceiver : BroadcastReceiver() {
companion object {
private val alarm by lazy { App.app.getSystemService<AlarmManager>()!! }
private val alarm by lazy { app.getSystemService<AlarmManager>()!! }
private val timeoutIntent by lazy {
PendingIntent.getBroadcast(App.app, 0, Intent(App.app, SfidaTimeoutReceiver::class.java), PendingIntent.FLAG_MUTABLE)
PendingIntent.getBroadcast(app, 0, Intent(app, SfidaTimeoutReceiver::class.java),
PendingIntent.FLAG_MUTABLE)
}
// 1h 12.457s - 1h 11m 6.778s
fun reportConnection() = alarm.setWindow(AlarmManager.ELAPSED_REALTIME_WAKEUP,
Expand Down

0 comments on commit 673a8c4

Please sign in to comment.