[Notification] Show Dismiss action only on A12
This commit is contained in:
parent
bcd3126885
commit
0c438375f7
1 changed files with 4 additions and 2 deletions
|
@ -91,7 +91,7 @@ class PlayingNotificationImpl(
|
||||||
)
|
)
|
||||||
val dismissAction = NotificationCompat.Action(
|
val dismissAction = NotificationCompat.Action(
|
||||||
R.drawable.ic_close,
|
R.drawable.ic_close,
|
||||||
context.getString(R.string.customactivityoncrash_error_activity_error_details_close),
|
context.getString(R.string.action_cancel),
|
||||||
retrievePlaybackAction(ACTION_QUIT)
|
retrievePlaybackAction(ACTION_QUIT)
|
||||||
)
|
)
|
||||||
setSmallIcon(R.drawable.ic_notification)
|
setSmallIcon(R.drawable.ic_notification)
|
||||||
|
@ -102,7 +102,9 @@ class PlayingNotificationImpl(
|
||||||
addAction(previousAction)
|
addAction(previousAction)
|
||||||
addAction(playPauseAction)
|
addAction(playPauseAction)
|
||||||
addAction(nextAction)
|
addAction(nextAction)
|
||||||
addAction(dismissAction)
|
if (VersionUtils.hasS()) {
|
||||||
|
addAction(dismissAction)
|
||||||
|
}
|
||||||
|
|
||||||
setStyle(
|
setStyle(
|
||||||
MediaStyle()
|
MediaStyle()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue