mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 02:38:20 +00:00
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
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user