Loading core/java/android/provider/Settings.java +10 −0 Original line number Diff line number Diff line Loading @@ -5589,6 +5589,15 @@ public final class Settings { private static final Validator ALLOW_MOCK_LOCATION_VALIDATOR = BOOLEAN_VALIDATOR; /** * Setting to indicate that on device captions are enabled. * * @hide */ public static final String ODI_CAPTIONS_ENABLED = "odi_captions_enabled"; private static final Validator ODI_CAPTIONS_ENABLED_VALIDATOR = BOOLEAN_VALIDATOR; /** * On Android 8.0 (API level 26) and higher versions of the platform, * a 64-bit number (expressed as a hexadecimal string), unique to Loading Loading @@ -8950,6 +8959,7 @@ public final class Settings { VALIDATORS.put(SILENCE_TIMER_GESTURE_COUNT, SILENCE_GESTURE_COUNT_VALIDATOR); VALIDATORS.put(SILENCE_CALL_GESTURE_COUNT, SILENCE_GESTURE_COUNT_VALIDATOR); VALIDATORS.put(SILENCE_NOTIFICATION_GESTURE_COUNT, SILENCE_GESTURE_COUNT_VALIDATOR); VALIDATORS.put(ODI_CAPTIONS_ENABLED, ODI_CAPTIONS_ENABLED_VALIDATOR); } /** Loading core/res/res/values/config.xml +6 −0 Original line number Diff line number Diff line Loading @@ -3513,6 +3513,12 @@ --> <string name="config_defaultAttentionService" translatable="false"></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 package name for the incident report approver app. This app is usually PermissionController or an app that replaces it. When a bugreport or incident report with EXPLICT-level sharing flags is going to be Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -3382,6 +3382,7 @@ <java-symbol type="string" name="config_defaultAppPredictionService" /> <java-symbol type="string" name="config_defaultContentSuggestionsService" /> <java-symbol type="string" name="config_defaultAttentionService" /> <java-symbol type="string" name="config_defaultSystemCaptionsService" /> <java-symbol type="string" name="notification_channel_foreground_service" /> <java-symbol type="string" name="foreground_service_app_in_background" /> Loading packages/SystemUI/plugin/src/com/android/systemui/plugins/VolumeDialogController.java +5 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,10 @@ public interface VolumeDialogController { void userActivity(); void getState(); boolean areCaptionsEnabled(); void setCaptionsEnabled(boolean isEnabled); void getCaptionsComponentState(); @ProvidesInterface(version = StreamState.VERSION) public static final class StreamState { public static final int VERSION = 1; Loading Loading @@ -186,5 +190,6 @@ public interface VolumeDialogController { void onScreenOff(); void onShowSafetyWarning(int flags); void onAccessibilityModeChanged(Boolean showA11yStream); void onCaptionComponentStateChanged(Boolean isComponentEnabled); } } packages/SystemUI/res/drawable/ic_volume_odi_captions.xml 0 → 100644 +24 −0 Original line number Diff line number Diff line <!-- Copyright (C) 2019 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24"> <path android:fillColor="#FF000000" android:pathData="M20,4C21.1,4 22,4.9 22,6L22,18C22,19.1 21.1,20 20,20L4,20C2.9,20 2,19.1 2,18L2,6C2,4.9 2.9,4 4,4L20,4ZM20,18L20,6L4,6L4,18L20,18ZM6,10L8,10L8,12L6,12L6,10ZM6,14L14,14L14,16L6,16L6,14ZM16,14L18,14L18,16L16,16L16,14ZM10,10L18,10L18,12L10,12L10,10Z"/> </vector> Loading
core/java/android/provider/Settings.java +10 −0 Original line number Diff line number Diff line Loading @@ -5589,6 +5589,15 @@ public final class Settings { private static final Validator ALLOW_MOCK_LOCATION_VALIDATOR = BOOLEAN_VALIDATOR; /** * Setting to indicate that on device captions are enabled. * * @hide */ public static final String ODI_CAPTIONS_ENABLED = "odi_captions_enabled"; private static final Validator ODI_CAPTIONS_ENABLED_VALIDATOR = BOOLEAN_VALIDATOR; /** * On Android 8.0 (API level 26) and higher versions of the platform, * a 64-bit number (expressed as a hexadecimal string), unique to Loading Loading @@ -8950,6 +8959,7 @@ public final class Settings { VALIDATORS.put(SILENCE_TIMER_GESTURE_COUNT, SILENCE_GESTURE_COUNT_VALIDATOR); VALIDATORS.put(SILENCE_CALL_GESTURE_COUNT, SILENCE_GESTURE_COUNT_VALIDATOR); VALIDATORS.put(SILENCE_NOTIFICATION_GESTURE_COUNT, SILENCE_GESTURE_COUNT_VALIDATOR); VALIDATORS.put(ODI_CAPTIONS_ENABLED, ODI_CAPTIONS_ENABLED_VALIDATOR); } /** Loading
core/res/res/values/config.xml +6 −0 Original line number Diff line number Diff line Loading @@ -3513,6 +3513,12 @@ --> <string name="config_defaultAttentionService" translatable="false"></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 package name for the incident report approver app. This app is usually PermissionController or an app that replaces it. When a bugreport or incident report with EXPLICT-level sharing flags is going to be Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -3382,6 +3382,7 @@ <java-symbol type="string" name="config_defaultAppPredictionService" /> <java-symbol type="string" name="config_defaultContentSuggestionsService" /> <java-symbol type="string" name="config_defaultAttentionService" /> <java-symbol type="string" name="config_defaultSystemCaptionsService" /> <java-symbol type="string" name="notification_channel_foreground_service" /> <java-symbol type="string" name="foreground_service_app_in_background" /> Loading
packages/SystemUI/plugin/src/com/android/systemui/plugins/VolumeDialogController.java +5 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,10 @@ public interface VolumeDialogController { void userActivity(); void getState(); boolean areCaptionsEnabled(); void setCaptionsEnabled(boolean isEnabled); void getCaptionsComponentState(); @ProvidesInterface(version = StreamState.VERSION) public static final class StreamState { public static final int VERSION = 1; Loading Loading @@ -186,5 +190,6 @@ public interface VolumeDialogController { void onScreenOff(); void onShowSafetyWarning(int flags); void onAccessibilityModeChanged(Boolean showA11yStream); void onCaptionComponentStateChanged(Boolean isComponentEnabled); } }
packages/SystemUI/res/drawable/ic_volume_odi_captions.xml 0 → 100644 +24 −0 Original line number Diff line number Diff line <!-- Copyright (C) 2019 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24"> <path android:fillColor="#FF000000" android:pathData="M20,4C21.1,4 22,4.9 22,6L22,18C22,19.1 21.1,20 20,20L4,20C2.9,20 2,19.1 2,18L2,6C2,4.9 2.9,4 4,4L20,4ZM20,18L20,6L4,6L4,18L20,18ZM6,10L8,10L8,12L6,12L6,10ZM6,14L14,14L14,16L6,16L6,14ZM16,14L18,14L18,16L16,16L16,14ZM10,10L18,10L18,12L10,12L10,10Z"/> </vector>