Commit 5c096acc by Juanky Soriano

Use default text size if captioning manager is disabled

This fixes an issue where, even if captioning manager is disabled, the latest used captioning manager preference
related to text size is being applied.

In order to replicate:
1. Go to Captioning Preferences under device Settings and enable it
2. Change the text size to "very large"
3. Observe the selected text size is used for subtitles, for example in Youtube
4. Go to Captioning Preferences under device Settings and disable it
5. Observe the text size used for subtitles does not come back to normal, stays on "very large"
parent eb9de7a1
......@@ -229,7 +229,9 @@ public final class SubtitleView extends FrameLayout implements TextOutput {
* default size before API level 19.
*/
public void setUserDefaultTextSize() {
float fontScale = Util.SDK_INT >= 19 && !isInEditMode() ? getUserCaptionFontScaleV19() : 1f;
float fontScale = Util.SDK_INT >= 19 && isCaptionManagerEnabled() && !isInEditMode()
? getUserCaptionFontScaleV19()
: 1f;
setFractionalTextSize(DEFAULT_TEXT_SIZE_FRACTION * fontScale);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment