Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4b82216 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use default accessibility notification sound be accessibility volume key shortcut ringtone."

parents 3a38753d f5cabd27
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -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)
+3 −1
Original line number Diff line number Diff line
@@ -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
+1 −0
Original line number Diff line number Diff line
@@ -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" />