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

Commit a5e19ebb authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz
Browse files

[RON] Improve RON demotion menu talkback announcement

Test: Enable Talkback, post a RON and double click to hear announcement. Verify that talkback announce "Double-tap and hold to long press to open demotion menu"
Bug: 412556809
Flag: android.app.ui_rich_ongoing
Change-Id: Ie049abef6dc7bf4464b633556368ecfbeb5bcc57
parent 088ae231
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2271,6 +2271,8 @@
        few {# minutes}
        other {# minutes}
    }</string>
    <!-- Notification: Promoted Ongoing specific long click [CHAR LIMIT=NONE] -->
    <string name="notification_promoted_ongoing_long_click">to open demotion menu</string>

    <!-- Summary of battery saver not available [CHAR LIMIT=NONE] -->

+10 −1
Original line number Diff line number Diff line
@@ -4225,8 +4225,17 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
        super.onInitializeAccessibilityNodeInfoInternal(info);
        final boolean isLongClickable = isNotificationRowLongClickable();
        if (isLongClickable) {
            if (isPromotedOngoing()) {
                final AccessibilityAction longClick =
                        new AccessibilityAction(
                                AccessibilityAction.ACTION_LONG_CLICK.getId(),
                                getContext().getResources().getString(
                                        R.string.notification_promoted_ongoing_long_click));
                info.addAction(longClick);
            } else {
                info.addAction(AccessibilityAction.ACTION_LONG_CLICK);
            }
        }
        info.setLongClickable(isLongClickable);

        if (canViewBeDismissed() && !mIsSnoozed) {