summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2016-07-13 01:08:32 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-07-13 01:08:32 +0000
commitc6e5fdb7acf01d4c5824f9e3e212d046c90d61c1 (patch)
tree094187dd1244f3853e7e9c1cdf16a067353ebd15 /src/com/android/launcher3
parent2e22b5d2de066245f8c8f52343bb2a8b4e8eb563 (diff)
parentb93f34a8be4450d2b6cb47a73f43c84c194bdb95 (diff)
downloadandroid_packages_apps_Trebuchet-c6e5fdb7acf01d4c5824f9e3e212d046c90d61c1.tar.gz
android_packages_apps_Trebuchet-c6e5fdb7acf01d4c5824f9e3e212d046c90d61c1.tar.bz2
android_packages_apps_Trebuchet-c6e5fdb7acf01d4c5824f9e3e212d046c90d61c1.zip
Merge "Fixing issue with content description not being updated." into ub-launcher3-calgary
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r--src/com/android/launcher3/IconCache.java10
-rw-r--r--src/com/android/launcher3/ShortcutInfo.java2
2 files changed, 7 insertions, 5 deletions
diff --git a/src/com/android/launcher3/IconCache.java b/src/com/android/launcher3/IconCache.java
index 1fea6b4dc..9ce941b52 100644
--- a/src/com/android/launcher3/IconCache.java
+++ b/src/com/android/launcher3/IconCache.java
@@ -445,8 +445,8 @@ public class IconCache {
CacheEntry entry = cacheLocked(application.componentName, info, user,
false, useLowResIcon);
application.title = Utilities.trim(entry.title);
- application.iconBitmap = getNonNullIcon(entry, user);
application.contentDescription = entry.contentDescription;
+ application.iconBitmap = getNonNullIcon(entry, user);
application.usingLowResIcon = entry.isLowResIcon;
}
@@ -458,8 +458,8 @@ public class IconCache {
false, application.usingLowResIcon);
if (entry.icon != null && !isDefaultIcon(entry.icon, application.user)) {
application.title = Utilities.trim(entry.title);
- application.iconBitmap = entry.icon;
application.contentDescription = entry.contentDescription;
+ application.iconBitmap = entry.icon;
application.usingLowResIcon = entry.isLowResIcon;
}
}
@@ -492,6 +492,7 @@ public class IconCache {
if (component == null) {
shortcutInfo.setIcon(getDefaultIcon(user));
shortcutInfo.title = "";
+ shortcutInfo.contentDescription = "";
shortcutInfo.usingFallbackIcon = true;
shortcutInfo.usingLowResIcon = false;
} else {
@@ -509,6 +510,7 @@ public class IconCache {
CacheEntry entry = cacheLocked(component, info, user, usePkgIcon, useLowResIcon);
shortcutInfo.setIcon(getNonNullIcon(entry, user));
shortcutInfo.title = Utilities.trim(entry.title);
+ shortcutInfo.contentDescription = entry.contentDescription;
shortcutInfo.usingFallbackIcon = isDefaultIcon(entry.icon, user);
shortcutInfo.usingLowResIcon = entry.isLowResIcon;
}
@@ -520,10 +522,10 @@ public class IconCache {
PackageItemInfo infoInOut, boolean useLowResIcon) {
CacheEntry entry = getEntryForPackageLocked(
infoInOut.packageName, infoInOut.user, useLowResIcon);
- infoInOut.iconBitmap = getNonNullIcon(entry, infoInOut.user);
infoInOut.title = Utilities.trim(entry.title);
- infoInOut.usingLowResIcon = entry.isLowResIcon;
infoInOut.contentDescription = entry.contentDescription;
+ infoInOut.iconBitmap = getNonNullIcon(entry, infoInOut.user);
+ infoInOut.usingLowResIcon = entry.isLowResIcon;
}
public synchronized Bitmap getDefaultIcon(UserHandleCompat user) {
diff --git a/src/com/android/launcher3/ShortcutInfo.java b/src/com/android/launcher3/ShortcutInfo.java
index 3756ba1b3..b8f0ec9c4 100644
--- a/src/com/android/launcher3/ShortcutInfo.java
+++ b/src/com/android/launcher3/ShortcutInfo.java
@@ -299,7 +299,7 @@ public class ShortcutInfo extends ItemInfo {
if (TextUtils.isEmpty(label)) {
label = shortcutInfo.getShortLabel();
}
- this.contentDescription = UserManagerCompat.getInstance(context)
+ contentDescription = UserManagerCompat.getInstance(context)
.getBadgedLabelForUser(label, user);
LauncherAppState launcherAppState = LauncherAppState.getInstance();