mirror of
https://github.com/androidx/media.git
synced 2025-05-08 08:00:49 +08:00
Don't render empty cues
This commit is contained in:
parent
ebe9ae6b13
commit
8a7d68da6c
@ -135,6 +135,11 @@ import android.util.Log;
|
||||
*/
|
||||
public void draw(Cue cue, CaptionStyleCompat style, float fontScale, Canvas canvas,
|
||||
int cueBoxLeft, int cueBoxTop, int cueBoxRight, int cueBoxBottom) {
|
||||
if (TextUtils.isEmpty(cue.text)) {
|
||||
// Nothing to draw;
|
||||
return;
|
||||
}
|
||||
|
||||
if (TextUtils.equals(cueText, cue.text)
|
||||
&& cuePosition == cue.position
|
||||
&& Util.areEqual(cueAlignment, cue.alignment)
|
||||
|
Loading…
x
Reference in New Issue
Block a user