summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/res/res/values/config.xml6
-rw-r--r--core/res/res/values/symbols.xml1
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java38
-rw-r--r--services/core/java/com/android/server/pm/IPackageManagerBase.java2
4 files changed, 3 insertions, 44 deletions
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index e1b7a0c08cb3..01618332a4e1 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -4105,12 +4105,6 @@
<!-- Intent extra key for the event code int array while requesting ambient context consent. -->
<string translatable="false" name="config_ambientContextEventArrayExtraKey"></string>
- <!-- The component name for the system-wide captions service.
- This service must be trusted, as it controls part of the UI of the volume bar.
- Example: "com.android.captions/.SystemCaptionsService"
- -->
- <string name="config_defaultSystemCaptionsService" translatable="false"></string>
-
<!-- The component name for the system-wide captions manager service.
This service must be trusted, as the system binds to it and keeps it running.
Example: "com.android.captions/.SystemCaptionsManagerService"
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 94c9a122ee75..f60896861f44 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -3708,7 +3708,6 @@
<java-symbol type="string" name="config_defaultMusicRecognitionService" />
<java-symbol type="string" name="config_defaultAttentionService" />
<java-symbol type="string" name="config_defaultRotationResolverService" />
- <java-symbol type="string" name="config_defaultSystemCaptionsService" />
<java-symbol type="string" name="config_defaultSystemCaptionsManagerService" />
<java-symbol type="string" name="config_defaultAmbientContextDetectionService" />
<java-symbol type="string" name="config_defaultAmbientContextConsentComponent" />
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java
index 85a6eebf6bd7..e4c83a543d89 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java
@@ -49,7 +49,6 @@ import android.os.VibrationEffect;
import android.provider.Settings;
import android.service.notification.Condition;
import android.service.notification.ZenModeConfig;
-import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.Log;
import android.util.Slog;
@@ -418,41 +417,8 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa
}
private void onGetCaptionsComponentStateW(boolean fromTooltip) {
- if (mCaptioningManager.isSystemAudioCaptioningUiEnabled()) {
- mCallbacks.onCaptionComponentStateChanged(true, fromTooltip);
- return;
- }
-
- // TODO(b/220968335): Remove this check once system captions component migrates
- // to new CaptioningManager APIs.
- try {
- String componentNameString = mContext.getString(
- com.android.internal.R.string.config_defaultSystemCaptionsService);
- if (TextUtils.isEmpty(componentNameString)) {
- // component doesn't exist
- mCallbacks.onCaptionComponentStateChanged(false, fromTooltip);
- return;
- }
-
- if (D.BUG) {
- Log.i(TAG, String.format(
- "isCaptionsServiceEnabled componentNameString=%s", componentNameString));
- }
-
- ComponentName componentName = ComponentName.unflattenFromString(componentNameString);
- if (componentName == null) {
- mCallbacks.onCaptionComponentStateChanged(false, fromTooltip);
- return;
- }
-
- mCallbacks.onCaptionComponentStateChanged(
- mPackageManager.getComponentEnabledSetting(componentName)
- == PackageManager.COMPONENT_ENABLED_STATE_ENABLED, fromTooltip);
- } catch (Exception ex) {
- Log.e(TAG,
- "isCaptionsServiceEnabled failed to check for captions component", ex);
- mCallbacks.onCaptionComponentStateChanged(false, fromTooltip);
- }
+ mCallbacks.onCaptionComponentStateChanged(
+ mCaptioningManager.isSystemAudioCaptioningUiEnabled(), fromTooltip);
}
private void onAccessibilityModeChanged(Boolean showA11yStream) {
diff --git a/services/core/java/com/android/server/pm/IPackageManagerBase.java b/services/core/java/com/android/server/pm/IPackageManagerBase.java
index e1aee6d747f4..ba7309f0283d 100644
--- a/services/core/java/com/android/server/pm/IPackageManagerBase.java
+++ b/services/core/java/com/android/server/pm/IPackageManagerBase.java
@@ -803,7 +803,7 @@ public abstract class IPackageManagerBase extends IPackageManager.Stub {
public final String getSystemCaptionsServicePackageName() {
return mService.ensureSystemPackageName(snapshot(),
mService.getPackageFromComponentString(
- R.string.config_defaultSystemCaptionsService));
+ R.string.config_defaultSystemCaptionsManagerService));
}
@Nullable