Loading app/src/main/java/org/lineageos/recorder/service/SoundRecorderService.java +2 −1 Original line number Diff line number Diff line Loading @@ -448,7 +448,6 @@ public class SoundRecorderService extends Service { String duration = DateUtils.formatElapsedTime(elapsedTime); NotificationCompat.Builder nb = new NotificationCompat.Builder(this, NOTIFICATION_CHANNEL) .setOngoing(true) .setContentTitle(getString(R.string.sound_notification_title)) .setContentText(getString(R.string.sound_notification_message, duration)) .setSmallIcon(R.drawable.ic_notification_sound) .setColor(ContextCompat.getColor(this, R.color.colorAccent)) Loading @@ -459,12 +458,14 @@ public class SoundRecorderService extends Service { new Intent(this, SoundRecorderService.class) .setAction(ACTION_RESUME), PendingIntent.FLAG_IMMUTABLE); nb.setContentTitle(getString(R.string.sound_recording_title_paused)); nb.addAction(R.drawable.ic_resume, getString(R.string.resume), resumePIntent); } else { PendingIntent pausePIntent = PendingIntent.getService(this, 0, new Intent(this, SoundRecorderService.class) .setAction(ACTION_PAUSE), PendingIntent.FLAG_IMMUTABLE); nb.setContentTitle(getString(R.string.sound_recording_title_working)); nb.addAction(R.drawable.ic_pause, getString(R.string.pause), pausePIntent); } nb.addAction(R.drawable.ic_stop, getString(R.string.stop), stopPIntent); Loading Loading
app/src/main/java/org/lineageos/recorder/service/SoundRecorderService.java +2 −1 Original line number Diff line number Diff line Loading @@ -448,7 +448,6 @@ public class SoundRecorderService extends Service { String duration = DateUtils.formatElapsedTime(elapsedTime); NotificationCompat.Builder nb = new NotificationCompat.Builder(this, NOTIFICATION_CHANNEL) .setOngoing(true) .setContentTitle(getString(R.string.sound_notification_title)) .setContentText(getString(R.string.sound_notification_message, duration)) .setSmallIcon(R.drawable.ic_notification_sound) .setColor(ContextCompat.getColor(this, R.color.colorAccent)) Loading @@ -459,12 +458,14 @@ public class SoundRecorderService extends Service { new Intent(this, SoundRecorderService.class) .setAction(ACTION_RESUME), PendingIntent.FLAG_IMMUTABLE); nb.setContentTitle(getString(R.string.sound_recording_title_paused)); nb.addAction(R.drawable.ic_resume, getString(R.string.resume), resumePIntent); } else { PendingIntent pausePIntent = PendingIntent.getService(this, 0, new Intent(this, SoundRecorderService.class) .setAction(ACTION_PAUSE), PendingIntent.FLAG_IMMUTABLE); nb.setContentTitle(getString(R.string.sound_recording_title_working)); nb.addAction(R.drawable.ic_pause, getString(R.string.pause), pausePIntent); } nb.addAction(R.drawable.ic_stop, getString(R.string.stop), stopPIntent); Loading