From 94ca84ff296813d6c1cdebd78a5a24ae2f578de5 Mon Sep 17 00:00:00 2001 From: jaewan Date: Mon, 30 Mar 2020 14:59:57 +0100 Subject: [PATCH] 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 --- .../android/exoplayer2/ui/PlayerNotificationManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java index 047041dd60..cf8fd2e3ee 100644 --- a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java +++ b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java @@ -140,7 +140,7 @@ public class PlayerNotificationManager { * * @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. @@ -160,7 +160,7 @@ public class PlayerNotificationManager { * @param player The {@link Player} for which a notification is being built. */ @Nullable - String getCurrentContentText(Player player); + CharSequence getCurrentContentText(Player player); /** * 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. */ @Nullable - default String getCurrentSubText(Player player) { + default CharSequence getCurrentSubText(Player player) { return null; }