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:
1 parent
74b68a4097
commit
01453e855f
9 files changed
+34
-2
No files matched your search
@@ -2820,6 +2820,7 @@ public class LauncherModel extends BroadcastReceiver
|
||||
if (isShortcutInfoUpdateable(i)) {
|
||||
ShortcutInfo info = (ShortcutInfo) i;
|
||||
info.title = a.title.toString();
|
||||
info.contentDescription = a.contentDescription;
|
||||
updateItemInDatabase(context, info);
|
||||
}
|
||||
}
|
||||
@@ -2955,6 +2956,8 @@ public class LauncherModel extends BroadcastReceiver
|
||||
info.title = "";
|
||||
}
|
||||
info.user = UserHandleCompat.myUserHandle();
|
||||
info.contentDescription = mUserManager.getBadgedLabelForUser(
|
||||
info.title.toString(), info.user);
|
||||
info.setIcon(mIconCache.getIcon(intent, info.title.toString(), info.user));
|
||||
info.itemType = LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT;
|
||||
info.restoredIntent = intent;
|
||||
@@ -3061,6 +3064,8 @@ public class LauncherModel extends BroadcastReceiver
|
||||
}
|
||||
info.itemType = LauncherSettings.Favorites.ITEM_TYPE_APPLICATION;
|
||||
info.user = user;
|
||||
info.contentDescription = mUserManager.getBadgedLabelForUser(
|
||||
info.title.toString(), info.user);
|
||||
return info;
|
||||
}
|
||||
|
||||
@@ -3336,6 +3341,8 @@ public class LauncherModel extends BroadcastReceiver
|
||||
info.setIcon(icon);
|
||||
|
||||
info.title = name;
|
||||
info.contentDescription = mUserManager.getBadgedLabelForUser(
|
||||
info.title.toString(), info.user);
|
||||
info.intent = intent;
|
||||
info.customIcon = customIcon;
|
||||
info.iconResource = iconResource;
|
||||
|
||||
Reference in new issue
Block a user