Merge "Fix Live Caption does not follow caption size if caption is not enabled" into tm-dev am: 1ce6beb80f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17859333 Change-Id: I490ca541e33e0c65ecac53700c2d248fcd496f04 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
package com.android.settings.accessibility;
|
||||
|
||||
import static com.android.settings.accessibility.AccessibilityUtil.State.ON;
|
||||
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
@@ -400,6 +402,7 @@ public class CaptionAppearanceFragment extends DashboardFragment
|
||||
}
|
||||
|
||||
refreshPreviewText();
|
||||
enableCaptioningManager();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -409,16 +412,26 @@ public class CaptionAppearanceFragment extends DashboardFragment
|
||||
Settings.Secure.putString(
|
||||
cr, Settings.Secure.ACCESSIBILITY_CAPTIONING_TYPEFACE, (String) value);
|
||||
refreshPreviewText();
|
||||
enableCaptioningManager();
|
||||
} else if (mFontSize == preference) {
|
||||
Settings.Secure.putFloat(
|
||||
cr, Settings.Secure.ACCESSIBILITY_CAPTIONING_FONT_SCALE,
|
||||
Float.parseFloat((String) value));
|
||||
refreshPreviewText();
|
||||
enableCaptioningManager();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void enableCaptioningManager() {
|
||||
if (mCaptioningManager.isEnabled()) {
|
||||
return;
|
||||
}
|
||||
Settings.Secure.putInt(getContentResolver(),
|
||||
Settings.Secure.ACCESSIBILITY_CAPTIONING_ENABLED, ON);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHelpResource() {
|
||||
return R.string.help_url_caption;
|
||||
|
Reference in New Issue
Block a user