summaryrefslogtreecommitdiffstats
path: root/core/java/com
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2014-06-05 21:00:32 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-06-05 21:00:32 +0000
commitc954e61cd73875e74115c778cb5e35eab9695a59 (patch)
treeab3065d28516570d2847d6bc9206b67e97cdb576 /core/java/com
parent70dbeacadcd2a8469ff7d451c570d8236cb96370 (diff)
parent4586b0da631758e2753c3f0936f410ff3a6c3bda (diff)
downloadframeworks_base-c954e61cd73875e74115c778cb5e35eab9695a59.zip
frameworks_base-c954e61cd73875e74115c778cb5e35eab9695a59.tar.gz
frameworks_base-c954e61cd73875e74115c778cb5e35eab9695a59.tar.bz2
am 3966c960: Merge "Add defaults for caption colors and edge type" into lmp-preview-dev
* commit '3966c9604e55c9183a6d1ba8b3540add3be4434f': Add defaults for caption colors and edge type
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();