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

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

Merge "Refocus conversation expand button in TalkBack" into rvc-dev

parents a65d7258 4055c086
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1223,7 +1223,6 @@ public class ConversationLayout extends FrameLayout
            mExpandButtonContainer.setVisibility(VISIBLE);
            mExpandButtonInnerContainer.setOnClickListener(onClickListener);
        } else {
            // TODO: handle content paddings to end of layout
            mExpandButtonContainer.setVisibility(GONE);
        }
        updateContentEndPaddings();
+3 −3
Original line number Diff line number Diff line
@@ -557,9 +557,9 @@ public class NotificationContentView extends FrameLayout {

    private void focusExpandButtonIfNecessary() {
        if (mFocusOnVisibilityChange) {
            NotificationHeaderView header = getVisibleNotificationHeader();
            if (header != null) {
                ImageView expandButton = header.getExpandButton();
            NotificationViewWrapper wrapper = getVisibleWrapper(mVisibleType);
            if (wrapper != null) {
                View expandButton = wrapper.getExpandButton();
                if (expandButton != null) {
                    expandButton.requestAccessibilityFocus();
                }
+5 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ class NotificationConversationTemplateViewWrapper constructor(
    private lateinit var conversationBadgeBg: View
    private lateinit var expandButton: View
    private lateinit var expandButtonContainer: View
    private lateinit var expandButtonInnerContainer: View
    private lateinit var imageMessageContainer: ViewGroup
    private lateinit var messagingLinearLayout: MessagingLinearLayout
    private lateinit var conversationTitleView: View
@@ -69,6 +70,8 @@ class NotificationConversationTemplateViewWrapper constructor(
            expandButton = requireViewById(com.android.internal.R.id.expand_button)
            expandButtonContainer =
                    requireViewById(com.android.internal.R.id.expand_button_container)
            expandButtonInnerContainer =
                    requireViewById(com.android.internal.R.id.expand_button_inner_container)
            importanceRing = requireViewById(com.android.internal.R.id.conversation_icon_badge_ring)
            appName = requireViewById(com.android.internal.R.id.app_name_text)
            conversationTitleView = requireViewById(com.android.internal.R.id.conversation_text)
@@ -134,6 +137,8 @@ class NotificationConversationTemplateViewWrapper constructor(
        )
    }

    override fun getExpandButton() = expandButtonInnerContainer

    override fun setShelfIconVisible(visible: Boolean) {
        if (conversationLayout.isImportantConversation) {
            if (conversationIconView.visibility != GONE) {
+5 −0
Original line number Diff line number Diff line
@@ -316,6 +316,11 @@ public class NotificationHeaderViewWrapper extends NotificationViewWrapper {
        return mNotificationHeader;
    }

    @Override
    public View getExpandButton() {
        return mExpandButton;
    }

    @Override
    public int getOriginalIconColor() {
        return mIcon.getOriginalIconColor();
+7 −0
Original line number Diff line number Diff line
@@ -240,6 +240,13 @@ public abstract class NotificationViewWrapper implements TransformableView {
        return null;
    }

    /**
     * @return the expand button if it exists
     */
    public @Nullable View getExpandButton() {
        return null;
    }

    public int getOriginalIconColor() {
        return Notification.COLOR_INVALID;
    }
Loading