Change the relative time format to LONG

The `SHORT` format, which abbreviates relative time as 'x min.
ago,' presents an accessibility issue for screen readers like
TalkBack. TalkBack announces this as 'x minimum. Ago', and the
dot after "min" is treated as period and causes a full-stop.

Attempts to directly modify TalkBack's pronunciation of this
text have proven difficult. Given the ample space available in
the user interface, using abbreviations isn't necessary.
Switching to the `LONG` format ('x minutes ago') would resolve
this accessibility problem while also making the interface
clearer for all users.

Bug: 318323722
Change-Id: I42ba960bd8d5d8fc8a9cb895ecf24c56dab6d2c4
This commit is contained in:
Lifu Tang
2024-05-29 20:52:18 +00:00
parent 1df39c3d5f
commit c233ecca5c
2 changed files with 2 additions and 2 deletions

View File

@@ -206,7 +206,7 @@ public class AppsPreferenceController extends BasePreferenceController implement
pref.setIcon(Utils.getBadgedIcon(mContext, appEntry.info));
pref.setSummary(StringUtil.formatRelativeTime(mContext,
System.currentTimeMillis() - stats.getLastTimeUsed(), false,
RelativeDateTimeFormatter.Style.SHORT));
RelativeDateTimeFormatter.Style.LONG));
pref.setOrder(showAppsCount++);
pref.setOnPreferenceClickListener(preference -> {
startAppInfoSettings(pkgName, appEntry.info.uid,