Loading core/java/com/android/internal/accessibility/AccessibilityShortcutController.java +11 −2 Original line number Diff line number Diff line Loading @@ -438,9 +438,18 @@ public class AccessibilityShortcutController { ? AudioAttributes.USAGE_ASSISTANCE_ACCESSIBILITY : AudioAttributes.USAGE_NOTIFICATION_EVENT; // Play a notification tone final Ringtone tone = mFrameworkObjectProvider.getRingtone(mContext, // Use the default accessibility notification sound instead to avoid users confusing the new // notification received. Point to the default notification sound if the sound does not // exist. final Uri ringtoneUri = Uri.parse("file://" + mContext.getString(R.string.config_defaultAccessibilityNotificationSound)); Ringtone tone = mFrameworkObjectProvider.getRingtone(mContext, ringtoneUri); if (tone == null) { tone = mFrameworkObjectProvider.getRingtone(mContext, Settings.System.DEFAULT_NOTIFICATION_URI); } // Play a notification tone if (tone != null) { tone.setAudioAttributes(new AudioAttributes.Builder() .setUsage(audioAttributesUsage) Loading core/res/res/values/config.xml +3 −1 Original line number Diff line number Diff line Loading @@ -4098,7 +4098,9 @@ exists on the device, the accessibility shortcut will be disabled by default. --> <string name="config_defaultAccessibilityService" translatable="false"></string> <!-- Flag indicates that whether escrow token API is enabled for TrustAgent --> <!-- URI for default Accessibility notification sound when to enable accessibility shortcut. --> <string name="config_defaultAccessibilityNotificationSound" translatable="false"></string> <!-- Warning: This API can be dangerous when not implemented properly. In particular, escrow token must NOT be retrievable from device storage. In other words, either escrow token is not stored on device or its ciphertext is stored on device while Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -3480,6 +3480,7 @@ <java-symbol type="string" name="color_correction_feature_name" /> <java-symbol type="string" name="reduce_bright_colors_feature_name" /> <java-symbol type="string" name="config_defaultAccessibilityService" /> <java-symbol type="string" name="config_defaultAccessibilityNotificationSound" /> <java-symbol type="string" name="accessibility_shortcut_spoken_feedback" /> <java-symbol type="string" name="accessibility_select_shortcut_menu_title" /> Loading Loading
core/java/com/android/internal/accessibility/AccessibilityShortcutController.java +11 −2 Original line number Diff line number Diff line Loading @@ -438,9 +438,18 @@ public class AccessibilityShortcutController { ? AudioAttributes.USAGE_ASSISTANCE_ACCESSIBILITY : AudioAttributes.USAGE_NOTIFICATION_EVENT; // Play a notification tone final Ringtone tone = mFrameworkObjectProvider.getRingtone(mContext, // Use the default accessibility notification sound instead to avoid users confusing the new // notification received. Point to the default notification sound if the sound does not // exist. final Uri ringtoneUri = Uri.parse("file://" + mContext.getString(R.string.config_defaultAccessibilityNotificationSound)); Ringtone tone = mFrameworkObjectProvider.getRingtone(mContext, ringtoneUri); if (tone == null) { tone = mFrameworkObjectProvider.getRingtone(mContext, Settings.System.DEFAULT_NOTIFICATION_URI); } // Play a notification tone if (tone != null) { tone.setAudioAttributes(new AudioAttributes.Builder() .setUsage(audioAttributesUsage) Loading
core/res/res/values/config.xml +3 −1 Original line number Diff line number Diff line Loading @@ -4098,7 +4098,9 @@ exists on the device, the accessibility shortcut will be disabled by default. --> <string name="config_defaultAccessibilityService" translatable="false"></string> <!-- Flag indicates that whether escrow token API is enabled for TrustAgent --> <!-- URI for default Accessibility notification sound when to enable accessibility shortcut. --> <string name="config_defaultAccessibilityNotificationSound" translatable="false"></string> <!-- Warning: This API can be dangerous when not implemented properly. In particular, escrow token must NOT be retrievable from device storage. In other words, either escrow token is not stored on device or its ciphertext is stored on device while Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -3480,6 +3480,7 @@ <java-symbol type="string" name="color_correction_feature_name" /> <java-symbol type="string" name="reduce_bright_colors_feature_name" /> <java-symbol type="string" name="config_defaultAccessibilityService" /> <java-symbol type="string" name="config_defaultAccessibilityNotificationSound" /> <java-symbol type="string" name="accessibility_shortcut_spoken_feedback" /> <java-symbol type="string" name="accessibility_select_shortcut_menu_title" /> Loading