diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2011-07-22 19:34:12 -0700 |
---|---|---|
committer | Svetoslav Ganov <svetoslavganov@google.com> | 2011-07-23 20:35:55 -0700 |
commit | 0ceb6ad890a341a9edda7b000aea0725c61380d4 (patch) | |
tree | 6919ceeba01ccea35668aa8b8978b2fb3a1db4cd /src/com | |
parent | 554ad399a5f7114943e0f9d0725b36eafd8cc327 (diff) | |
download | packages_apps_settings-0ceb6ad890a341a9edda7b000aea0725c61380d4.zip packages_apps_settings-0ceb6ad890a341a9edda7b000aea0725c61380d4.tar.gz packages_apps_settings-0ceb6ad890a341a9edda7b000aea0725c61380d4.tar.bz2 |
Accounts & Sync - sync status indicators missing contentDescription attributes.
1. Added the content descriptions.
bug:5033572
Change-Id: I4d04f4c6e7b79dcc9720b69505aa64e798a02fad
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/settings/AccountPreference.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/com/android/settings/AccountPreference.java b/src/com/android/settings/AccountPreference.java index f3d7d51..f76d5cb 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)) { |