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

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

Merge "Fix talkback issue on bar chart" into qt-dev

parents 1369a3b5 7007e794
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.settingslib.widget;

import android.content.Context;
import android.content.res.TypedArray;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.LayoutInflater;
@@ -73,8 +74,13 @@ public class BarView extends LinearLayout {
        mIcon.setImageDrawable(barViewInfo.getIcon());
        mBarTitle.setText(barViewInfo.getTitle());
        mBarSummary.setText(barViewInfo.getSummary());

        final CharSequence barViewInfoContent = barViewInfo.getContentDescription();
        if (!TextUtils.isEmpty(barViewInfoContent)
                && !TextUtils.equals((barViewInfo.getTitle()), barViewInfoContent)) {
            mIcon.setContentDescription(barViewInfo.getContentDescription());
        }
    }

    @VisibleForTesting
    CharSequence getTitle() {