示例#1
0
 /** Fill in "application" with the icon and label for "info." */
 public synchronized void getTitleAndIcon(
     AppInfo application, LauncherActivityInfoCompat info, boolean useLowResIcon) {
   UserHandleCompat user = info == null ? application.user : info.getUser();
   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.usingLowResIcon = entry.isLowResIcon;
 }
示例#2
0
 /** Updates {@param application} only if a valid entry is found. */
 public synchronized void updateTitleAndIcon(AppInfo application) {
   CacheEntry entry =
       cacheLocked(
           application.componentName, null, application.user, 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.usingLowResIcon = entry.isLowResIcon;
   }
 }