Loading core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -52368,6 +52368,7 @@ package android.view.accessibility { method public final float getFontScale(); method @Nullable public final java.util.Locale getLocale(); method @NonNull public android.view.accessibility.CaptioningManager.CaptionStyle getUserStyle(); method public boolean isCallCaptioningEnabled(); method public final boolean isEnabled(); method public void removeCaptioningChangeListener(@NonNull android.view.accessibility.CaptioningManager.CaptioningChangeListener); } core/api/system-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -367,7 +367,6 @@ package android { field public static final int config_showDefaultAssistant = 17891329; // 0x1110001 field public static final int config_showDefaultEmergency = 17891330; // 0x1110002 field public static final int config_showDefaultHome = 17891331; // 0x1110003 field public static final int config_systemCaptionsServiceCallsEnabled; } public static final class R.color { core/java/android/view/accessibility/CaptioningManager.java +12 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.annotation.SystemService; import android.compat.annotation.UnsupportedAppUsage; import android.content.ContentResolver; import android.content.Context; import android.content.res.Resources; import android.database.ContentObserver; import android.graphics.Color; import android.graphics.Typeface; Loading @@ -30,6 +31,8 @@ import android.os.Handler; import android.provider.Settings.Secure; import android.text.TextUtils; import com.android.internal.R; import java.util.ArrayList; import java.util.Locale; Loading @@ -51,6 +54,7 @@ public class CaptioningManager { private final ArrayList<CaptioningChangeListener> mListeners = new ArrayList<>(); private final ContentResolver mContentResolver; private final ContentObserver mContentObserver; private final Resources mResources; /** * Creates a new captioning manager for the specified context. Loading @@ -62,6 +66,7 @@ public class CaptioningManager { final Handler handler = new Handler(context.getMainLooper()); mContentObserver = new MyContentObserver(handler); mResources = context.getResources(); } /** Loading Loading @@ -181,6 +186,13 @@ public class CaptioningManager { } } /** * Returns true if system wide call captioning is enabled for this device. */ public boolean isCallCaptioningEnabled() { return mResources.getBoolean(R.bool.config_systemCaptionsServiceCallsEnabled); } private void notifyEnabledChanged() { final boolean enabled = isEnabled(); synchronized (mListeners) { Loading core/res/res/values/public.xml +0 −2 Original line number Diff line number Diff line Loading @@ -3317,8 +3317,6 @@ </staging-public-group> <staging-public-group type="bool" first-id="0x01cf0000"> <!-- @hide @SystemApi --> <public name="config_systemCaptionsServiceCallsEnabled" /> <!-- @hide @TestApi --> <public name="config_preventImeStartupUnlessTextEditor" /> </staging-public-group> Loading core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -3654,6 +3654,8 @@ <java-symbol type="string" name="config_retailDemoPackage" /> <java-symbol type="string" name="config_retailDemoPackageSignature" /> <java-symbol type="bool" name="config_systemCaptionsServiceCallsEnabled" /> <java-symbol type="string" name="notification_channel_foreground_service" /> <java-symbol type="string" name="foreground_service_app_in_background" /> <java-symbol type="string" name="foreground_service_apps_in_background" /> Loading Loading
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -52368,6 +52368,7 @@ package android.view.accessibility { method public final float getFontScale(); method @Nullable public final java.util.Locale getLocale(); method @NonNull public android.view.accessibility.CaptioningManager.CaptionStyle getUserStyle(); method public boolean isCallCaptioningEnabled(); method public final boolean isEnabled(); method public void removeCaptioningChangeListener(@NonNull android.view.accessibility.CaptioningManager.CaptioningChangeListener); }
core/api/system-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -367,7 +367,6 @@ package android { field public static final int config_showDefaultAssistant = 17891329; // 0x1110001 field public static final int config_showDefaultEmergency = 17891330; // 0x1110002 field public static final int config_showDefaultHome = 17891331; // 0x1110003 field public static final int config_systemCaptionsServiceCallsEnabled; } public static final class R.color {
core/java/android/view/accessibility/CaptioningManager.java +12 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.annotation.SystemService; import android.compat.annotation.UnsupportedAppUsage; import android.content.ContentResolver; import android.content.Context; import android.content.res.Resources; import android.database.ContentObserver; import android.graphics.Color; import android.graphics.Typeface; Loading @@ -30,6 +31,8 @@ import android.os.Handler; import android.provider.Settings.Secure; import android.text.TextUtils; import com.android.internal.R; import java.util.ArrayList; import java.util.Locale; Loading @@ -51,6 +54,7 @@ public class CaptioningManager { private final ArrayList<CaptioningChangeListener> mListeners = new ArrayList<>(); private final ContentResolver mContentResolver; private final ContentObserver mContentObserver; private final Resources mResources; /** * Creates a new captioning manager for the specified context. Loading @@ -62,6 +66,7 @@ public class CaptioningManager { final Handler handler = new Handler(context.getMainLooper()); mContentObserver = new MyContentObserver(handler); mResources = context.getResources(); } /** Loading Loading @@ -181,6 +186,13 @@ public class CaptioningManager { } } /** * Returns true if system wide call captioning is enabled for this device. */ public boolean isCallCaptioningEnabled() { return mResources.getBoolean(R.bool.config_systemCaptionsServiceCallsEnabled); } private void notifyEnabledChanged() { final boolean enabled = isEnabled(); synchronized (mListeners) { Loading
core/res/res/values/public.xml +0 −2 Original line number Diff line number Diff line Loading @@ -3317,8 +3317,6 @@ </staging-public-group> <staging-public-group type="bool" first-id="0x01cf0000"> <!-- @hide @SystemApi --> <public name="config_systemCaptionsServiceCallsEnabled" /> <!-- @hide @TestApi --> <public name="config_preventImeStartupUnlessTextEditor" /> </staging-public-group> Loading
core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -3654,6 +3654,8 @@ <java-symbol type="string" name="config_retailDemoPackage" /> <java-symbol type="string" name="config_retailDemoPackageSignature" /> <java-symbol type="bool" name="config_systemCaptionsServiceCallsEnabled" /> <java-symbol type="string" name="notification_channel_foreground_service" /> <java-symbol type="string" name="foreground_service_app_in_background" /> <java-symbol type="string" name="foreground_service_apps_in_background" /> Loading