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

Commit b68bde55 authored by Jason Hsu's avatar Jason Hsu Committed by Android (Google) Code Review
Browse files

Merge "[HA Input] Show notification to hint user can change input device when calling" into main

parents c2b9747b 8f561169
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ public class SystemNotificationChannels {
    @Deprecated public static final String SYSTEM_CHANGES_DEPRECATED = "SYSTEM_CHANGES";
    public static final String SYSTEM_CHANGES = "SYSTEM_CHANGES_ALERTS";
    public static final String ACCESSIBILITY_MAGNIFICATION = "ACCESSIBILITY_MAGNIFICATION";
    public static final String ACCESSIBILITY_HEARING_DEVICE = "ACCESSIBILITY_HEARING_DEVICE";
    public static final String ACCESSIBILITY_SECURITY_POLICY = "ACCESSIBILITY_SECURITY_POLICY";
    public static final String ABUSIVE_BACKGROUND_APPS = "ABUSIVE_BACKGROUND_APPS";

@@ -203,6 +204,13 @@ public class SystemNotificationChannels {
        newFeaturePrompt.setBlockable(true);
        channelsList.add(newFeaturePrompt);

        final NotificationChannel accessibilityHearingDeviceChannel = new NotificationChannel(
                ACCESSIBILITY_HEARING_DEVICE,
                context.getString(R.string.notification_channel_accessibility_hearing_device),
                NotificationManager.IMPORTANCE_HIGH);
        accessibilityHearingDeviceChannel.setBlockable(true);
        channelsList.add(accessibilityHearingDeviceChannel);

        final NotificationChannel accessibilitySecurityPolicyChannel = new NotificationChannel(
                ACCESSIBILITY_SECURITY_POLICY,
                context.getString(R.string.notification_channel_accessibility_security_policy),
+17 −0
Original line number Diff line number Diff line
@@ -880,6 +880,10 @@
         magnification. [CHAR_LIMIT=NONE]-->
    <string name="notification_channel_accessibility_magnification">Magnification</string>
    <!-- Text shown when viewing channel settings for notifications related to accessibility
     hearing device. [CHAR_LIMIT=NONE]-->
    <string name="notification_channel_accessibility_hearing_device">Hearing device</string>
    <!-- Text shown when viewing channel settings for notifications related to accessibility
         security policy. [CHAR_LIMIT=NONE]-->
    <string name="notification_channel_accessibility_security_policy">Accessibility usage</string>
@@ -4985,6 +4989,19 @@
    <!-- Text used to describe system navigation features, shown within a UI allowing a user to assign system magnification features to the Accessibility button in the navigation bar. -->
    <string name="accessibility_magnification_chooser_text">Magnification</string>
    <!-- Notification title for switching input to the phone's microphone. It will be shown when making a phone call with the hearing device. [CHAR LIMIT=none] -->
    <string name="hearing_device_switch_phone_mic_notification_title">Switch to phone mic?</string>
    <!-- Notification title for switching input to the hearing device's microphone. It will be shown when making a phone call with the hearing device. [CHAR LIMIT=none] -->
    <string name="hearing_device_switch_hearing_mic_notification_title">Switch to hearing aid mic?</string>
    <!-- Notification content for switching input to the phone's microphone. It will be shown when making a phone call with the hearing device. [CHAR LIMIT=none] -->
    <string name="hearing_device_switch_phone_mic_notification_text">For better sound or if your hearing aid battery is low. This only switches your mic during the call.</string>
    <!-- Notification content for switching input to the hearing device's microphone. It will be shown when making a phone call with the hearing device. [CHAR LIMIT=none] -->
    <string name="hearing_device_switch_hearing_mic_notification_text">You can use your hearing aid microphone for hands-free calling. This only switches your mic during the call.</string>
    <!-- Notification action button. Click it will switch the input between phone's microphone and hearing device's microphone. It will be shown when making a phone call with the hearing device. [CHAR LIMIT=none] -->
    <string name="hearing_device_notification_switch_button">Switch</string>
    <!-- Notification action button. Click it will open the bluetooth device details page for this hearing device. It will be shown when making a phone call with the hearing device. [CHAR LIMIT=none] -->
    <string name="hearing_device_notification_settings_button">Settings</string>
    <!-- Text spoken when the current user is switched if accessibility is enabled. [CHAR LIMIT=none] -->
    <string name="user_switched">Current user <xliff:g id="name" example="Bob">%1$s</xliff:g>.</string>
    <!-- Message shown when switching to a user [CHAR LIMIT=none] -->
+8 −0
Original line number Diff line number Diff line
@@ -3839,6 +3839,13 @@
  <java-symbol type="string" name="reduce_bright_colors_feature_name" />
  <java-symbol type="string" name="one_handed_mode_feature_name" />

  <java-symbol type="string" name="hearing_device_switch_phone_mic_notification_title" />
  <java-symbol type="string" name="hearing_device_switch_hearing_mic_notification_title" />
  <java-symbol type="string" name="hearing_device_switch_phone_mic_notification_text" />
  <java-symbol type="string" name="hearing_device_switch_hearing_mic_notification_text" />
  <java-symbol type="string" name="hearing_device_notification_switch_button" />
  <java-symbol type="string" name="hearing_device_notification_settings_button" />

  <!-- com.android.internal.widget.RecyclerView -->
  <java-symbol type="id" name="item_touch_helper_previous_elevation"/>
  <java-symbol type="dimen" name="item_touch_helper_max_drag_scroll_per_frame"/>
@@ -4025,6 +4032,7 @@
  <java-symbol type="string" name="notification_channel_heavy_weight_app" />
  <java-symbol type="string" name="notification_channel_system_changes" />
  <java-symbol type="string" name="notification_channel_accessibility_magnification" />
  <java-symbol type="string" name="notification_channel_accessibility_hearing_device" />
  <java-symbol type="string" name="notification_channel_accessibility_security_policy" />
  <java-symbol type="string" name="notification_channel_display" />
  <java-symbol type="string" name="config_defaultAutofillService" />
+3 −2
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.internal.notification;

import static com.android.internal.notification.SystemNotificationChannels.ABUSIVE_BACKGROUND_APPS;
import static com.android.internal.notification.SystemNotificationChannels.ACCESSIBILITY_HEARING_DEVICE;
import static com.android.internal.notification.SystemNotificationChannels.ACCESSIBILITY_MAGNIFICATION;
import static com.android.internal.notification.SystemNotificationChannels.ACCESSIBILITY_SECURITY_POLICY;
import static com.android.internal.notification.SystemNotificationChannels.ACCOUNT;
@@ -90,8 +91,8 @@ public class SystemNotificationChannelsTest {
                        DEVELOPER_IMPORTANT, UPDATES, NETWORK_STATUS, NETWORK_ALERTS,
                        NETWORK_AVAILABLE, VPN, DEVICE_ADMIN, ALERTS, RETAIL_MODE, USB,
                        FOREGROUND_SERVICE, HEAVY_WEIGHT_APP, SYSTEM_CHANGES,
                        ACCESSIBILITY_MAGNIFICATION, ACCESSIBILITY_SECURITY_POLICY,
                        ABUSIVE_BACKGROUND_APPS);
                        ACCESSIBILITY_MAGNIFICATION, ACCESSIBILITY_HEARING_DEVICE,
                        ACCESSIBILITY_SECURITY_POLICY, ABUSIVE_BACKGROUND_APPS);
    }

    @Test
+4 −0
Original line number Diff line number Diff line
@@ -420,5 +420,9 @@ message SystemMessage {
    // Notify the user that accessibility floating menu is hidden.
    // Package: com.android.systemui
    NOTE_A11Y_FLOATING_MENU_HIDDEN = 1009;

    // Notify the hearing aid user that input device can be changed to builtin device or hearing device.
    // Package: android
    NOTE_HEARING_DEVICE_INPUT_SWITCH = 1012;
  }
}
Loading