Explicit Nullbility in Launcher (Part 2)

This CL updates the nullabality on methods associated with IconCache in Launcher.

Bug: 242895652
Test: manual
Change-Id: I4832c0950141c8a52c8a9e62659ccabb082897c8
This commit is contained in:
Pinyao Ting
2022-08-19 10:53:40 -07:00
parent 211496e3d8
commit 023b973d15
8 changed files with 63 additions and 27 deletions
@@ -64,23 +64,26 @@ public class CacheDataUpdatedTaskTest {
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);
}
};