summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2013-12-11 15:22:14 -0800
committerAlan Viverette <alanv@google.com>2013-12-11 15:22:14 -0800
commit55d70620d9fda8afafb2fdec59757a710eec0e89 (patch)
treead265b887f5c323a7c7bf3fbf5b61308cadb4bc9 /media
parentf51021c32c1998456e1d8f6b0effc0297c2fff05 (diff)
downloadframeworks_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.java4
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);
}
/**