<!-- Do not translate. This is a stub which will be removed soon. -->
<string name="time_zone_auto_stub" translatable="false">Select Time Zone</string>
+ <!-- Content description of the enabled sync icon for accessibility. [CHAR LIMIT=NONE] -->
+ <string name="accessibility_sync_enabled">Sync enabled</string>
+ <!-- Content description of the disabled sync icon for accessibility. [CHAR LIMIT=NONE] -->
+ <string name="accessibility_sync_disabled">Sync disabled</string>
+ <!-- Content description of the disabled sync icon for accessibility. [CHAR LIMIT=NONE] -->
+ <string name="accessibility_sync_error">Sync error.</string>
+
<!-- Account specific sync settings title [CHAR LIMIT=35] -->
<string name="account_sync_settings_title">Sync settings</string>
<!-- Message when sync is currently failing [CHAR LIMIT=100] -->
setSummary(getSyncStatusMessage(mStatus));
mSyncStatusIcon = (ImageView) view.findViewById(R.id.syncStatusIcon);
mSyncStatusIcon.setImageResource(getSyncStatusIcon(mStatus));
+ mSyncStatusIcon.setContentDescription(getSyncContentDescription(mStatus));
}
public void setProviderIcon(Drawable icon) {
return res;
}
+ private String getSyncContentDescription(int status) {
+ switch (status) {
+ case SYNC_ENABLED:
+ return getContext().getString(R.string.accessibility_sync_enabled);
+ case SYNC_DISABLED:
+ return getContext().getString(R.string.accessibility_sync_disabled);
+ case SYNC_ERROR:
+ return getContext().getString(R.string.accessibility_sync_error);
+ default:
+ Log.e(TAG, "Unknown sync status: " + status);
+ return getContext().getString(R.string.accessibility_sync_error);
+ }
+ }
+
@Override
public int compareTo(Preference other) {
if (!(other instanceof AccountPreference)) {