diff --git a/res/values/strings.xml b/res/values/strings.xml
index 78a8069aec9..1e362d1f0c9 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -3201,6 +3201,13 @@ found in the list of installed applications.
Select Time Zone
+
+ Sync enabled
+
+ Sync disabled
+
+ Sync error.
+
Sync settings
diff --git a/src/com/android/settings/AccountPreference.java b/src/com/android/settings/AccountPreference.java
index f3d7d512893..f76d5cb1873 100644
--- a/src/com/android/settings/AccountPreference.java
+++ b/src/com/android/settings/AccountPreference.java
@@ -71,6 +71,7 @@ public class AccountPreference extends Preference {
setSummary(getSyncStatusMessage(mStatus));
mSyncStatusIcon = (ImageView) view.findViewById(R.id.syncStatusIcon);
mSyncStatusIcon.setImageResource(getSyncStatusIcon(mStatus));
+ mSyncStatusIcon.setContentDescription(getSyncContentDescription(mStatus));
}
public void setProviderIcon(Drawable icon) {
@@ -126,6 +127,20 @@ public class AccountPreference extends Preference {
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)) {