diff options
author | Alan Viverette <alanv@google.com> | 2013-12-11 15:22:14 -0800 |
---|---|---|
committer | Alan Viverette <alanv@google.com> | 2013-12-11 15:22:14 -0800 |
commit | 55d70620d9fda8afafb2fdec59757a710eec0e89 (patch) | |
tree | ad265b887f5c323a7c7bf3fbf5b61308cadb4bc9 /media | |
parent | f51021c32c1998456e1d8f6b0effc0297c2fff05 (diff) | |
download | frameworks_base-55d70620d9fda8afafb2fdec59757a710eec0e89.zip frameworks_base-55d70620d9fda8afafb2fdec59757a710eec0e89.tar.gz frameworks_base-55d70620d9fda8afafb2fdec59757a710eec0e89.tar.bz2 |
Add caption window color attribute
The WebVTT rendering implementation interprets window color as region
color, since there is no window for non-region captions.
BUG: 12020757
Change-Id: Ie891e1343d718783fc32c712860f886de22558ec
Diffstat (limited to 'media')
-rw-r--r-- | media/java/android/media/WebVttRenderer.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/media/java/android/media/WebVttRenderer.java b/media/java/android/media/WebVttRenderer.java index b09c5bd..58d3520 100644 --- a/media/java/android/media/WebVttRenderer.java +++ b/media/java/android/media/WebVttRenderer.java @@ -1525,6 +1525,8 @@ class WebVttRenderingWidget extends ViewGroup implements SubtitleTrack.Rendering if (DEBUG) { setBackgroundColor(DEBUG_REGION_BACKGROUND); + } else { + setBackgroundColor(captionStyle.windowColor); } } @@ -1537,6 +1539,8 @@ class WebVttRenderingWidget extends ViewGroup implements SubtitleTrack.Rendering final CueLayout cueBox = mRegionCueBoxes.get(i); cueBox.setCaptionStyle(captionStyle, fontSize); } + + setBackgroundColor(captionStyle.windowColor); } /** |