diff --git a/quickstep/src/com/android/launcher3/appprediction/InstantAppItemInfo.java b/quickstep/src/com/android/launcher3/appprediction/InstantAppItemInfo.java
index 9c3b881..8baee00 100644
--- a/quickstep/src/com/android/launcher3/appprediction/InstantAppItemInfo.java
+++ b/quickstep/src/com/android/launcher3/appprediction/InstantAppItemInfo.java
@@ -22,6 +22,8 @@
 import android.content.Context;
 import android.content.Intent;
 
+import androidx.annotation.NonNull;
+
 import com.android.launcher3.LauncherSettings;
 import com.android.launcher3.model.data.AppInfo;
 import com.android.launcher3.model.data.WorkspaceItemInfo;
@@ -33,11 +35,13 @@
         this.componentName = new ComponentName(packageName, COMPONENT_CLASS_MARKER);
     }
 
+    @NonNull
     @Override
     public ComponentName getTargetComponent() {
         return componentName;
     }
 
+    @NonNull
     @Override
     public WorkspaceItemInfo makeWorkspaceItem(Context context) {
         WorkspaceItemInfo workspaceItemInfo = super.makeWorkspaceItem(context);
diff --git a/src/com/android/launcher3/icons/ComponentWithLabel.java b/src/com/android/launcher3/icons/ComponentWithLabel.java
index 372c591..30575fc 100644
--- a/src/com/android/launcher3/icons/ComponentWithLabel.java
+++ b/src/com/android/launcher3/icons/ComponentWithLabel.java
@@ -20,6 +20,8 @@
 import android.content.pm.PackageManager;
 import android.os.UserHandle;
 
+import androidx.annotation.NonNull;
+
 import com.android.launcher3.icons.cache.CachingLogic;
 
 public interface ComponentWithLabel {
@@ -42,22 +44,26 @@
         }
 
         @Override
-        public ComponentName getComponent(T object) {
+        @NonNull
+        public ComponentName getComponent(@NonNull T object) {
             return object.getComponent();
         }
 
+        @NonNull
         @Override
-        public UserHandle getUser(T object) {
+        public UserHandle getUser(@NonNull T object) {
             return object.getUser();
         }
 
+        @NonNull
         @Override
-        public CharSequence getLabel(T object) {
+        public CharSequence getLabel(@NonNull T object) {
             return object.getLabel(mPackageManager);
         }
 
+        @NonNull
         @Override
-        public BitmapInfo loadIcon(Context context, T object) {
+        public BitmapInfo loadIcon(@NonNull Context context, @NonNull T object) {
             return BitmapInfo.LOW_RES_INFO;
         }
 
diff --git a/src/com/android/launcher3/icons/ComponentWithLabelAndIcon.java b/src/com/android/launcher3/icons/ComponentWithLabelAndIcon.java
index c8606b1..0a52dd7 100644
--- a/src/com/android/launcher3/icons/ComponentWithLabelAndIcon.java
+++ b/src/com/android/launcher3/icons/ComponentWithLabelAndIcon.java
@@ -41,7 +41,8 @@
 
         @NonNull
         @Override
-        public BitmapInfo loadIcon(Context context, ComponentWithLabelAndIcon object) {
+        public BitmapInfo loadIcon(@NonNull Context context,
+                @NonNull ComponentWithLabelAndIcon object) {
             Drawable d = object.getFullResIcon(LauncherAppState.getInstance(context)
                     .getIconCache());
             if (d == null) {
diff --git a/src/com/android/launcher3/icons/IconCache.java b/src/com/android/launcher3/icons/IconCache.java
index 7621dc2..0b4a4a5 100644
--- a/src/com/android/launcher3/icons/IconCache.java
+++ b/src/com/android/launcher3/icons/IconCache.java
@@ -118,15 +118,16 @@
     }
 
     @Override
-    protected long getSerialNumberForUser(UserHandle user) {
+    protected long getSerialNumberForUser(@NonNull UserHandle user) {
         return mUserManager.getSerialNumberForUser(user);
     }
 
     @Override
-    protected boolean isInstantApp(ApplicationInfo info) {
+    protected boolean isInstantApp(@NonNull ApplicationInfo info) {
         return mInstantAppResolver.isInstantApp(info);
     }
 
+    @NonNull
     @Override
     public BaseIconFactory getIconFactory() {
         return LauncherIcons.obtain(mContext);
@@ -135,7 +136,8 @@
     /**
      * Updates the entries related to the given package in memory and persistent DB.
      */
-    public synchronized void updateIconsForPkg(String packageName, UserHandle user) {
+    public synchronized void updateIconsForPkg(@NonNull final String packageName,
+            @NonNull final UserHandle user) {
         removeIconsForPkg(packageName, user);
         try {
             PackageInfo info = mPackageManager.getPackageInfo(packageName,
@@ -471,7 +473,7 @@
      * Fill in {@param infoInOut} with the corresponding icon and label.
      */
     public synchronized void getTitleAndIconForApp(
-            PackageItemInfo infoInOut, boolean useLowResIcon) {
+            @NonNull final PackageItemInfo infoInOut, final boolean useLowResIcon) {
         CacheEntry entry = getEntryForPackageLocked(
                 infoInOut.packageName, infoInOut.user, useLowResIcon);
         applyCacheEntry(entry, infoInOut);
@@ -510,10 +512,16 @@
         return bitmap.withFlags(getUserFlagOpLocked(user));
     }
 
-    protected void applyCacheEntry(CacheEntry entry, ItemInfoWithIcon info) {
+    protected void applyCacheEntry(@NonNull final CacheEntry entry,
+            @NonNull final ItemInfoWithIcon info) {
         info.title = Utilities.trim(entry.title);
         info.contentDescription = entry.contentDescription;
-        info.bitmap = (entry.bitmap == null) ? getDefaultIcon(info.user) : entry.bitmap;
+        info.bitmap = entry.bitmap;
+        if (entry.bitmap == null) {
+            // TODO: entry.bitmap can never be null, so this should not happen at all.
+            Log.wtf(TAG, "Cannot find bitmap from the cache, default icon was loaded.");
+            info.bitmap = getDefaultIcon(info.user);
+        }
     }
 
     public Drawable getFullResIcon(LauncherActivityInfo info) {
@@ -526,6 +534,7 @@
     }
 
     @Override
+    @NonNull
     protected String getIconSystemState(String packageName) {
         return mIconProvider.getSystemStateForPackage(mSystemState, packageName);
     }
diff --git a/src/com/android/launcher3/icons/LauncherActivityCachingLogic.java b/src/com/android/launcher3/icons/LauncherActivityCachingLogic.java
index 4b8c1ad..406f697 100644
--- a/src/com/android/launcher3/icons/LauncherActivityCachingLogic.java
+++ b/src/com/android/launcher3/icons/LauncherActivityCachingLogic.java
@@ -20,6 +20,8 @@
 import android.content.pm.LauncherActivityInfo;
 import android.os.UserHandle;
 
+import androidx.annotation.NonNull;
+
 import com.android.launcher3.LauncherAppState;
 import com.android.launcher3.R;
 import com.android.launcher3.icons.BaseIconFactory.IconOptions;
@@ -40,23 +42,27 @@
                 R.string.launcher_activity_logic_class);
     }
 
+    @NonNull
     @Override
-    public ComponentName getComponent(LauncherActivityInfo object) {
+    public ComponentName getComponent(@NonNull LauncherActivityInfo object) {
         return object.getComponentName();
     }
 
+    @NonNull
     @Override
-    public UserHandle getUser(LauncherActivityInfo object) {
+    public UserHandle getUser(@NonNull LauncherActivityInfo object) {
         return object.getUser();
     }
 
+    @NonNull
     @Override
-    public CharSequence getLabel(LauncherActivityInfo object) {
+    public CharSequence getLabel(@NonNull LauncherActivityInfo object) {
         return object.getLabel();
     }
 
+    @NonNull
     @Override
-    public BitmapInfo loadIcon(Context context, LauncherActivityInfo object) {
+    public BitmapInfo loadIcon(@NonNull Context context, @NonNull LauncherActivityInfo object) {
         try (LauncherIcons li = LauncherIcons.obtain(context)) {
             return li.createBadgedIconBitmap(LauncherAppState.getInstance(context)
                             .getIconProvider().getIcon(object, li.mFillResIconDpi),
diff --git a/src/com/android/launcher3/icons/ShortcutCachingLogic.java b/src/com/android/launcher3/icons/ShortcutCachingLogic.java
index 1e46344..4890ba6 100644
--- a/src/com/android/launcher3/icons/ShortcutCachingLogic.java
+++ b/src/com/android/launcher3/icons/ShortcutCachingLogic.java
@@ -29,6 +29,7 @@
 import android.util.Log;
 
 import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
 
 import com.android.launcher3.LauncherAppState;
 import com.android.launcher3.icons.cache.CachingLogic;
@@ -43,29 +44,34 @@
     private static final String TAG = "ShortcutCachingLogic";
 
     @Override
-    public ComponentName getComponent(ShortcutInfo info) {
+    @NonNull
+    public ComponentName getComponent(@NonNull ShortcutInfo info) {
         return ShortcutKey.fromInfo(info).componentName;
     }
 
+    @NonNull
     @Override
-    public UserHandle getUser(ShortcutInfo info) {
+    public UserHandle getUser(@NonNull ShortcutInfo info) {
         return info.getUserHandle();
     }
 
+    @NonNull
     @Override
-    public CharSequence getLabel(ShortcutInfo info) {
+    public CharSequence getLabel(@NonNull ShortcutInfo info) {
         return info.getShortLabel();
     }
 
     @Override
-    public CharSequence getDescription(ShortcutInfo object, CharSequence fallback) {
+    @NonNull
+    public CharSequence getDescription(@NonNull ShortcutInfo object,
+            @NonNull CharSequence fallback) {
         CharSequence label = object.getLongLabel();
         return TextUtils.isEmpty(label) ? fallback : label;
     }
 
     @NonNull
     @Override
-    public BitmapInfo loadIcon(Context context, ShortcutInfo info) {
+    public BitmapInfo loadIcon(@NonNull Context context, @NonNull ShortcutInfo info) {
         try (LauncherIcons li = LauncherIcons.obtain(context)) {
             Drawable unbadgedDrawable = ShortcutCachingLogic.getIcon(
                     context, info, LauncherAppState.getIDP(context).fillResIconDpi);
@@ -76,7 +82,8 @@
     }
 
     @Override
-    public long getLastUpdatedTime(ShortcutInfo shortcutInfo, PackageInfo info) {
+    public long getLastUpdatedTime(@Nullable ShortcutInfo shortcutInfo,
+            @NonNull PackageInfo info) {
         if (shortcutInfo == null) {
             return info.lastUpdateTime;
         }
diff --git a/src/com/android/launcher3/model/data/AppInfo.java b/src/com/android/launcher3/model/data/AppInfo.java
index 5b2bcf5..24e7dd3 100644
--- a/src/com/android/launcher3/model/data/AppInfo.java
+++ b/src/com/android/launcher3/model/data/AppInfo.java
@@ -29,7 +29,6 @@
 import android.os.UserManager;
 
 import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
 import androidx.annotation.VisibleForTesting;
 
 import com.android.launcher3.LauncherSettings;
@@ -55,6 +54,7 @@
      */
     public Intent intent;
 
+    @NonNull
     public ComponentName componentName;
 
     // Section name used for indexing.
@@ -151,7 +151,7 @@
                         | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
     }
 
-    @Nullable
+    @NonNull
     @Override
     public ComponentName getTargetComponent() {
         return componentName;
diff --git a/tests/src/com/android/launcher3/model/CacheDataUpdatedTaskTest.java b/tests/src/com/android/launcher3/model/CacheDataUpdatedTaskTest.java
index 960d27d..7d36740 100644
--- a/tests/src/com/android/launcher3/model/CacheDataUpdatedTaskTest.java
+++ b/tests/src/com/android/launcher3/model/CacheDataUpdatedTaskTest.java
@@ -64,23 +64,26 @@
         IconCache iconCache = LauncherAppState.getInstance(context).getIconCache();
         CachingLogic<ItemInfo> placeholderLogic = new CachingLogic<ItemInfo>() {
             @Override
-            public ComponentName getComponent(ItemInfo info) {
+            @NonNull
+            public ComponentName getComponent(@NonNull ItemInfo info) {
                 return info.getTargetComponent();
             }
 
+            @NonNull
             @Override
-            public UserHandle getUser(ItemInfo info) {
+            public UserHandle getUser(@NonNull ItemInfo info) {
                 return info.user;
             }
 
+            @NonNull
             @Override
-            public CharSequence getLabel(ItemInfo info) {
+            public CharSequence getLabel(@NonNull ItemInfo info) {
                 return NEW_LABEL_PREFIX + info.id;
             }
 
             @NonNull
             @Override
-            public BitmapInfo loadIcon(Context context, ItemInfo info) {
+            public BitmapInfo loadIcon(@NonNull Context context, @NonNull ItemInfo info) {
                 return BitmapInfo.of(Bitmap.createBitmap(1, 1, Config.ARGB_8888), Color.RED);
             }
         };
