summaryrefslogtreecommitdiffstats
path: root/core/java/com
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2014-06-05 20:37:21 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-06-05 20:37:22 +0000
commit4586b0da631758e2753c3f0936f410ff3a6c3bda (patch)
tree92cbb9d3d322db8586389a60648c8509979f7372 /core/java/com
parent1494f8671ef6d9e6f14fb18b2248eecc37d0dcfc (diff)
parente88aee8ad85b01229b12dbc0c3cc2f0b8b490192 (diff)
downloadframeworks_base-4586b0da631758e2753c3f0936f410ff3a6c3bda.zip
frameworks_base-4586b0da631758e2753c3f0936f410ff3a6c3bda.tar.gz
frameworks_base-4586b0da631758e2753c3f0936f410ff3a6c3bda.tar.bz2
Merge "Add defaults for caption colors and edge type" into lmp-preview-dev
Diffstat (limited to 'core/java/com')
-rw-r--r--core/java/com/android/internal/widget/SubtitleView.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/java/com/android/internal/widget/SubtitleView.java b/core/java/com/android/internal/widget/SubtitleView.java
index 117463a..2f987e9 100644
--- a/core/java/com/android/internal/widget/SubtitleView.java
+++ b/core/java/com/android/internal/widget/SubtitleView.java
@@ -271,10 +271,13 @@ public class SubtitleView extends View {
style = CaptionStyle.PRESETS[styleId];
}
- mForegroundColor = style.foregroundColor;
- mBackgroundColor = style.backgroundColor;
- mEdgeType = style.edgeType;
- mEdgeColor = style.edgeColor;
+ final CaptionStyle defStyle = CaptionStyle.DEFAULT;
+ mForegroundColor = style.hasForegroundColor() ?
+ style.foregroundColor : defStyle.foregroundColor;
+ mBackgroundColor = style.hasBackgroundColor() ?
+ style.backgroundColor : defStyle.backgroundColor;
+ mEdgeType = style.hasEdgeType() ? style.edgeType : defStyle.edgeType;
+ mEdgeColor = style.hasEdgeColor() ? style.edgeColor : defStyle.edgeColor;
mHasMeasurements = false;
final Typeface typeface = style.getTypeface();