summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/IconCache.java
diff options
context:
space:
mode:
authorKenny Guy <kennyguy@google.com>2014-06-20 21:24:53 +0100
committerKenny Guy <kennyguy@google.com>2014-06-23 16:42:37 +0100
commit01453e855fa87ee19f61223b2b1a6965071ee95a (patch)
treeffe8620af0bf0f072f4ae231ad11c28024ebbec5 /src/com/android/launcher3/IconCache.java
parent74b68a409766db18630f8131ca93b9269afab22e (diff)
downloadandroid_packages_apps_Trebuchet-01453e855fa87ee19f61223b2b1a6965071ee95a.tar.gz
android_packages_apps_Trebuchet-01453e855fa87ee19f61223b2b1a6965071ee95a.tar.bz2
android_packages_apps_Trebuchet-01453e855fa87ee19f61223b2b1a6965071ee95a.zip
Add content description to bagded icons.
Enabled accesibility so that icons badged by the managed profile have a content description that is different to the non-bagdged version. Bug: 15106236 Change-Id: Id483273173d9539916eebd59111d179087526be3
Diffstat (limited to 'src/com/android/launcher3/IconCache.java')
-rw-r--r--src/com/android/launcher3/IconCache.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/launcher3/IconCache.java b/src/com/android/launcher3/IconCache.java
index be02d3583..7d8628d9d 100644
--- a/src/com/android/launcher3/IconCache.java
+++ b/src/com/android/launcher3/IconCache.java
@@ -65,6 +65,7 @@ public class IconCache {
private static class CacheEntry {
public Bitmap icon;
public String title;
+ public String contentDescription;
}
private static class CacheKey {
@@ -240,6 +241,7 @@ public class IconCache {
application.title = entry.title;
application.iconBitmap = entry.icon;
+ application.contentDescription = entry.contentDescription;
}
}
@@ -262,6 +264,7 @@ public class IconCache {
CacheEntry entry = cacheLocked(component, launcherActInfo, null, user);
if (title != null) {
entry.title = title;
+ entry.contentDescription = mUserManager.getBadgedLabelForUser(title, user);
}
return entry.icon;
}
@@ -310,6 +313,7 @@ public class IconCache {
}
}
+ entry.contentDescription = mUserManager.getBadgedLabelForUser(entry.title, user);
entry.icon = Utilities.createIconBitmap(
info.getBadgedIcon(mIconDpi), mContext);
} else {