checkpoint

This commit is contained in:
voussoir 2023-03-13 18:41:25 -07:00
parent 99b801b31f
commit 71d94c8fcc
2 changed files with 7 additions and 8 deletions

View file

@ -33,7 +33,6 @@ object Keys {
// intent actions
const val ACTION_START: String = "org.y20k.trackbook.action.START"
const val ACTION_STOP: String = "org.y20k.trackbook.action.STOP"
const val ACTION_RESUME: String = "org.y20k.trackbook.action.RESUME"
// args
const val ARG_TRACK_TITLE: String = "ArgTrackTitle"
@ -68,10 +67,8 @@ object Keys {
const val STATE_THEME_DARK_MODE: String = "stateDarkMode"
// dialog types
const val DIALOG_RESUME_EMPTY_RECORDING: Int = 0
const val DIALOG_DELETE_TRACK: Int = 1
const val DIALOG_DELETE_NON_STARRED: Int = 2
const val DIALOG_DELETE_CURRENT_RECORDING: Int = 3
// dialog results
const val DIALOG_EMPTY_PAYLOAD_STRING: String = ""

View file

@ -100,7 +100,7 @@ class NotificationHelper(private val trackerService: TrackerService) {
private val resumeActionPendingIntent = PendingIntent.getService(
trackerService,
16,
Intent(trackerService, TrackerService::class.java).setAction(Keys.ACTION_RESUME),
Intent(trackerService, TrackerService::class.java).setAction(Keys.ACTION_START),
PendingIntent.FLAG_IMMUTABLE
)
private val showActionPendingIntent: PendingIntent? = TaskStackBuilder.create(trackerService).run {
@ -112,14 +112,16 @@ class NotificationHelper(private val trackerService: TrackerService) {
private val stopAction = NotificationCompat.Action(
R.drawable.ic_notification_action_stop_24dp,
trackerService.getString(R.string.notification_pause),
stopActionPendingIntent)
stopActionPendingIntent
)
private val resumeAction = NotificationCompat.Action(
R.drawable.ic_notification_action_resume_36dp,
trackerService.getString(R.string.notification_resume),
resumeActionPendingIntent)
resumeActionPendingIntent
)
private val showAction = NotificationCompat.Action(
R.drawable.ic_notification_action_show_36dp,
trackerService.getString(R.string.notification_show),
showActionPendingIntent)
showActionPendingIntent
)
}