diff options
author | Alan Viverette <alanv@google.com> | 2013-12-20 00:40:35 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-12-20 00:40:36 +0000 |
commit | ca7a2576289f371acc28e39825a2fe05a587b29b (patch) | |
tree | ebb1586fb029cc05a836d56b6de95d76f3d7aade /core/java/android/view/accessibility | |
parent | e754e7880a76d23f06235e200e42704e1ace2977 (diff) | |
parent | ce32ea7345f0157a595b1dd4306a9a65f444d7c2 (diff) | |
download | frameworks_base-ca7a2576289f371acc28e39825a2fe05a587b29b.zip frameworks_base-ca7a2576289f371acc28e39825a2fe05a587b29b.tar.gz frameworks_base-ca7a2576289f371acc28e39825a2fe05a587b29b.tar.bz2 |
Merge "Add APIs and implementation for additional caption edge types"
Diffstat (limited to 'core/java/android/view/accessibility')
-rw-r--r-- | core/java/android/view/accessibility/CaptioningManager.java | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/core/java/android/view/accessibility/CaptioningManager.java b/core/java/android/view/accessibility/CaptioningManager.java index 02929ed..a0134d6 100644 --- a/core/java/android/view/accessibility/CaptioningManager.java +++ b/core/java/android/view/accessibility/CaptioningManager.java @@ -250,6 +250,9 @@ public class CaptioningManager { * background colors, edge properties, and typeface. */ public static final class CaptionStyle { + /** Packed value for a color of 'none' and a cached opacity of 100%. */ + private static final int COLOR_NONE_OPAQUE = 0x000000FF; + private static final CaptionStyle WHITE_ON_BLACK; private static final CaptionStyle BLACK_ON_WHITE; private static final CaptionStyle YELLOW_ON_BLACK; @@ -271,6 +274,12 @@ public class CaptioningManager { /** Edge type value specifying drop-shadowed character edges. */ public static final int EDGE_TYPE_DROP_SHADOW = 2; + /** Edge type value specifying raised bevel character edges. */ + public static final int EDGE_TYPE_RAISED = 3; + + /** Edge type value specifying depressed bevel character edges. */ + public static final int EDGE_TYPE_DEPRESSED = 4; + /** The preferred foreground color for video captions. */ public final int foregroundColor; @@ -283,6 +292,8 @@ public class CaptioningManager { * <li>{@link #EDGE_TYPE_NONE} * <li>{@link #EDGE_TYPE_OUTLINE} * <li>{@link #EDGE_TYPE_DROP_SHADOW} + * <li>{@link #EDGE_TYPE_RAISED} + * <li>{@link #EDGE_TYPE_DEPRESSED} * </ul> */ public final int edgeType; @@ -352,13 +363,13 @@ public class CaptioningManager { static { WHITE_ON_BLACK = new CaptionStyle(Color.WHITE, Color.BLACK, EDGE_TYPE_NONE, - Color.BLACK, Color.TRANSPARENT, null); + Color.BLACK, COLOR_NONE_OPAQUE, null); BLACK_ON_WHITE = new CaptionStyle(Color.BLACK, Color.WHITE, EDGE_TYPE_NONE, - Color.BLACK, Color.TRANSPARENT, null); + Color.BLACK, COLOR_NONE_OPAQUE, null); YELLOW_ON_BLACK = new CaptionStyle(Color.YELLOW, Color.BLACK, EDGE_TYPE_NONE, - Color.BLACK, Color.TRANSPARENT, null); + Color.BLACK, COLOR_NONE_OPAQUE, null); YELLOW_ON_BLUE = new CaptionStyle(Color.YELLOW, Color.BLUE, EDGE_TYPE_NONE, - Color.BLACK, Color.TRANSPARENT, null); + Color.BLACK, COLOR_NONE_OPAQUE, null); PRESETS = new CaptionStyle[] { WHITE_ON_BLACK, BLACK_ON_WHITE, YELLOW_ON_BLACK, YELLOW_ON_BLUE |