mirror of
https://github.com/androidx/media.git
synced 2025-05-09 16:40:55 +08:00
Allow developers to specify CharSequence for Notification strings
CharSequence is used by Notification builders and allows to set Spannable text. It's the base interface of the String class, so apps wouldn't be break after the update. PiperOrigin-RevId: 303731890
This commit is contained in:
parent
f0e734d33e
commit
94ca84ff29
@ -140,7 +140,7 @@ public class PlayerNotificationManager {
|
|||||||
*
|
*
|
||||||
* @param player The {@link Player} for which a notification is being built.
|
* @param player The {@link Player} for which a notification is being built.
|
||||||
*/
|
*/
|
||||||
String getCurrentContentTitle(Player player);
|
CharSequence getCurrentContentTitle(Player player);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a content intent for the current media item.
|
* Creates a content intent for the current media item.
|
||||||
@ -160,7 +160,7 @@ public class PlayerNotificationManager {
|
|||||||
* @param player The {@link Player} for which a notification is being built.
|
* @param player The {@link Player} for which a notification is being built.
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
String getCurrentContentText(Player player);
|
CharSequence getCurrentContentText(Player player);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the content sub text for the current media item.
|
* Gets the content sub text for the current media item.
|
||||||
@ -170,7 +170,7 @@ public class PlayerNotificationManager {
|
|||||||
* @param player The {@link Player} for which a notification is being built.
|
* @param player The {@link Player} for which a notification is being built.
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
default String getCurrentSubText(Player player) {
|
default CharSequence getCurrentSubText(Player player) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user