Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b068759 authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Ensuring that each CacheEntry has a default title and content...

Merge "Ensuring that each CacheEntry has a default title and content description." into ub-launcher3-burnaby
parents 04a9bc4a cdefc631
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -73,8 +73,8 @@ public class IconCache {

    @Thunk static class CacheEntry {
        public Bitmap icon;
        public CharSequence title;
        public CharSequence contentDescription;
        public CharSequence title = "";
        public CharSequence contentDescription = "";
        public boolean isLowResIcon;
    }

@@ -575,7 +575,7 @@ public class IconCache {
        CacheEntry entry = mCache.get(cacheKey);
        if (entry == null || (entry.isLowResIcon && !useLowResIcon)) {
            entry = new CacheEntry();
            mCache.put(cacheKey, entry);
            boolean entryUpdated = true;

            // Check the DB first.
            if (!getEntryFromDB(cn, user, entry, useLowResIcon)) {
@@ -600,7 +600,13 @@ public class IconCache {

                } catch (NameNotFoundException e) {
                    if (DEBUG) Log.d(TAG, "Application not installed " + packageName);
                    entryUpdated = false;
                }
            }

            // Only add a filled-out entry to the cache
            if (entryUpdated) {
                mCache.put(cacheKey, entry);
            }
        }
        return entry;