Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -29919,6 +29919,7 @@ package android.view.accessibility { field public final int edgeColor; field public final int edgeType; field public final int foregroundColor; field public final int windowColor; } public static abstract class CaptioningManager.CaptioningChangeListener { core/java/android/provider/Settings.java +10 −0 Original line number Diff line number Diff line Loading @@ -3740,6 +3740,16 @@ public final class Settings { public static final String ACCESSIBILITY_CAPTIONING_EDGE_COLOR = "accessibility_captioning_edge_color"; /** * Integer property that specifes the window color for captions as a * packed 32-bit color. * * @see android.graphics.Color#argb * @hide */ public static final String ACCESSIBILITY_CAPTIONING_WINDOW_COLOR = "accessibility_captioning_window_color"; /** * String property that specifies the typeface for captions, one of: * <ul> Loading core/java/android/view/accessibility/CaptioningManager.java +17 −11 Original line number Diff line number Diff line Loading @@ -293,6 +293,9 @@ public class CaptioningManager { */ public final int edgeColor; /** The preferred window color for video captions. */ public final int windowColor; /** * @hide */ Loading @@ -301,11 +304,12 @@ public class CaptioningManager { private Typeface mParsedTypeface; private CaptionStyle(int foregroundColor, int backgroundColor, int edgeType, int edgeColor, String rawTypeface) { int windowColor, String rawTypeface) { this.foregroundColor = foregroundColor; this.backgroundColor = backgroundColor; this.edgeType = edgeType; this.edgeColor = edgeColor; this.windowColor = windowColor; mRawTypeface = rawTypeface; } Loading Loading @@ -334,25 +338,27 @@ public class CaptioningManager { cr, Secure.ACCESSIBILITY_CAPTIONING_EDGE_TYPE, defStyle.edgeType); final int edgeColor = Secure.getInt( cr, Secure.ACCESSIBILITY_CAPTIONING_EDGE_COLOR, defStyle.edgeColor); final int windowColor = Secure.getInt( cr, Secure.ACCESSIBILITY_CAPTIONING_WINDOW_COLOR, defStyle.windowColor); String rawTypeface = Secure.getString(cr, Secure.ACCESSIBILITY_CAPTIONING_TYPEFACE); if (rawTypeface == null) { rawTypeface = defStyle.mRawTypeface; } return new CaptionStyle( foregroundColor, backgroundColor, edgeType, edgeColor, rawTypeface); return new CaptionStyle(foregroundColor, backgroundColor, edgeType, edgeColor, windowColor, rawTypeface); } static { WHITE_ON_BLACK = new CaptionStyle( Color.WHITE, Color.BLACK, EDGE_TYPE_NONE, Color.BLACK, null); BLACK_ON_WHITE = new CaptionStyle( Color.BLACK, Color.WHITE, EDGE_TYPE_NONE, Color.BLACK, null); YELLOW_ON_BLACK = new CaptionStyle( Color.YELLOW, Color.BLACK, EDGE_TYPE_NONE, Color.BLACK, null); YELLOW_ON_BLUE = new CaptionStyle( Color.YELLOW, Color.BLUE, EDGE_TYPE_NONE, Color.BLACK, null); WHITE_ON_BLACK = new CaptionStyle(Color.WHITE, Color.BLACK, EDGE_TYPE_NONE, Color.BLACK, Color.TRANSPARENT, null); BLACK_ON_WHITE = new CaptionStyle(Color.BLACK, Color.WHITE, EDGE_TYPE_NONE, Color.BLACK, Color.TRANSPARENT, null); YELLOW_ON_BLACK = new CaptionStyle(Color.YELLOW, Color.BLACK, EDGE_TYPE_NONE, Color.BLACK, Color.TRANSPARENT, null); YELLOW_ON_BLUE = new CaptionStyle(Color.YELLOW, Color.BLUE, EDGE_TYPE_NONE, Color.BLACK, Color.TRANSPARENT, null); PRESETS = new CaptionStyle[] { WHITE_ON_BLACK, BLACK_ON_WHITE, YELLOW_ON_BLACK, YELLOW_ON_BLUE Loading media/java/android/media/WebVttRenderer.java +4 −0 Original line number Diff line number Diff line Loading @@ -1525,6 +1525,8 @@ class WebVttRenderingWidget extends ViewGroup implements SubtitleTrack.Rendering if (DEBUG) { setBackgroundColor(DEBUG_REGION_BACKGROUND); } else { setBackgroundColor(captionStyle.windowColor); } } Loading @@ -1537,6 +1539,8 @@ class WebVttRenderingWidget extends ViewGroup implements SubtitleTrack.Rendering final CueLayout cueBox = mRegionCueBoxes.get(i); cueBox.setCaptionStyle(captionStyle, fontSize); } setBackgroundColor(captionStyle.windowColor); } /** Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -29919,6 +29919,7 @@ package android.view.accessibility { field public final int edgeColor; field public final int edgeType; field public final int foregroundColor; field public final int windowColor; } public static abstract class CaptioningManager.CaptioningChangeListener {
core/java/android/provider/Settings.java +10 −0 Original line number Diff line number Diff line Loading @@ -3740,6 +3740,16 @@ public final class Settings { public static final String ACCESSIBILITY_CAPTIONING_EDGE_COLOR = "accessibility_captioning_edge_color"; /** * Integer property that specifes the window color for captions as a * packed 32-bit color. * * @see android.graphics.Color#argb * @hide */ public static final String ACCESSIBILITY_CAPTIONING_WINDOW_COLOR = "accessibility_captioning_window_color"; /** * String property that specifies the typeface for captions, one of: * <ul> Loading
core/java/android/view/accessibility/CaptioningManager.java +17 −11 Original line number Diff line number Diff line Loading @@ -293,6 +293,9 @@ public class CaptioningManager { */ public final int edgeColor; /** The preferred window color for video captions. */ public final int windowColor; /** * @hide */ Loading @@ -301,11 +304,12 @@ public class CaptioningManager { private Typeface mParsedTypeface; private CaptionStyle(int foregroundColor, int backgroundColor, int edgeType, int edgeColor, String rawTypeface) { int windowColor, String rawTypeface) { this.foregroundColor = foregroundColor; this.backgroundColor = backgroundColor; this.edgeType = edgeType; this.edgeColor = edgeColor; this.windowColor = windowColor; mRawTypeface = rawTypeface; } Loading Loading @@ -334,25 +338,27 @@ public class CaptioningManager { cr, Secure.ACCESSIBILITY_CAPTIONING_EDGE_TYPE, defStyle.edgeType); final int edgeColor = Secure.getInt( cr, Secure.ACCESSIBILITY_CAPTIONING_EDGE_COLOR, defStyle.edgeColor); final int windowColor = Secure.getInt( cr, Secure.ACCESSIBILITY_CAPTIONING_WINDOW_COLOR, defStyle.windowColor); String rawTypeface = Secure.getString(cr, Secure.ACCESSIBILITY_CAPTIONING_TYPEFACE); if (rawTypeface == null) { rawTypeface = defStyle.mRawTypeface; } return new CaptionStyle( foregroundColor, backgroundColor, edgeType, edgeColor, rawTypeface); return new CaptionStyle(foregroundColor, backgroundColor, edgeType, edgeColor, windowColor, rawTypeface); } static { WHITE_ON_BLACK = new CaptionStyle( Color.WHITE, Color.BLACK, EDGE_TYPE_NONE, Color.BLACK, null); BLACK_ON_WHITE = new CaptionStyle( Color.BLACK, Color.WHITE, EDGE_TYPE_NONE, Color.BLACK, null); YELLOW_ON_BLACK = new CaptionStyle( Color.YELLOW, Color.BLACK, EDGE_TYPE_NONE, Color.BLACK, null); YELLOW_ON_BLUE = new CaptionStyle( Color.YELLOW, Color.BLUE, EDGE_TYPE_NONE, Color.BLACK, null); WHITE_ON_BLACK = new CaptionStyle(Color.WHITE, Color.BLACK, EDGE_TYPE_NONE, Color.BLACK, Color.TRANSPARENT, null); BLACK_ON_WHITE = new CaptionStyle(Color.BLACK, Color.WHITE, EDGE_TYPE_NONE, Color.BLACK, Color.TRANSPARENT, null); YELLOW_ON_BLACK = new CaptionStyle(Color.YELLOW, Color.BLACK, EDGE_TYPE_NONE, Color.BLACK, Color.TRANSPARENT, null); YELLOW_ON_BLUE = new CaptionStyle(Color.YELLOW, Color.BLUE, EDGE_TYPE_NONE, Color.BLACK, Color.TRANSPARENT, null); PRESETS = new CaptionStyle[] { WHITE_ON_BLACK, BLACK_ON_WHITE, YELLOW_ON_BLACK, YELLOW_ON_BLUE Loading
media/java/android/media/WebVttRenderer.java +4 −0 Original line number Diff line number Diff line Loading @@ -1525,6 +1525,8 @@ class WebVttRenderingWidget extends ViewGroup implements SubtitleTrack.Rendering if (DEBUG) { setBackgroundColor(DEBUG_REGION_BACKGROUND); } else { setBackgroundColor(captionStyle.windowColor); } } Loading @@ -1537,6 +1539,8 @@ class WebVttRenderingWidget extends ViewGroup implements SubtitleTrack.Rendering final CueLayout cueBox = mRegionCueBoxes.get(i); cueBox.setCaptionStyle(captionStyle, fontSize); } setBackgroundColor(captionStyle.windowColor); } /** Loading