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

Commit 0144004e authored by Isaac Katzenelson's avatar Isaac Katzenelson Committed by Android Git Automerger
Browse files

am 8a546132: Merge "Fix content description of time in alarms list" into klp-dev

* commit '8a546132':
  Fix content description of time in alarms list
parents 9313973f 8a546132
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ public class TextTime extends TextView {
    private CharSequence mFormat12;
    private CharSequence mFormat24;
    private CharSequence mFormat;
    private String mContentDescriptionFormat;

    private boolean mAttached;

@@ -107,6 +108,7 @@ public class TextTime extends TextView {
        } else {
            mFormat = mFormat12 == null ? DEFAULT_FORMAT_12_HOUR : mFormat12;
        }
        mContentDescriptionFormat = mFormat.toString();
    }

    @Override
@@ -154,5 +156,10 @@ public class TextTime extends TextView {
        calendar.set(Calendar.HOUR_OF_DAY, mHour);
        calendar.set(Calendar.MINUTE, mMinute);
        setText(DateFormat.format(mFormat, calendar));
        if (mContentDescriptionFormat != null) {
            setContentDescription(DateFormat.format(mContentDescriptionFormat, calendar));
        } else {
            setContentDescription(DateFormat.format(mFormat, calendar));
        }
    }
}