summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherModel.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/LauncherModel.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/LauncherModel.java')
-rw-r--r--src/com/android/launcher3/LauncherModel.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index a975da459..310450fdf 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -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;