fix: NPE in when getting icon results
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
This commit is contained in:
1 parent
be5b155776
commit
dfde0a31c5
2 files changed
+8
-3
No files matched your search
@@ -37,6 +37,8 @@ Compatibility list:
|
||||
* [Lawnchair] Add work profile customization and fix issues (https://github.com/LawnchairLauncher/lawnchair/pull/6167)
|
||||
* [Lawnchair] Update Google Fonts listing to 03022026 (https://github.com/LawnchairLauncher/lawnchair/pull/6193)
|
||||
* [Lawnchair] Compare GitHub digest with actual downloaded file in Nightly updater
|
||||
* [Lawnchair] Enable wrap adaptive icons by default (only on by default)
|
||||
* [Lawnchair] Enable bulk icon loading by default (toggle removed, on by default)
|
||||
|
||||
#### Fixes
|
||||
* [Launcher] Limited Android 11 support
|
||||
@@ -69,6 +71,7 @@ Compatibility list:
|
||||
* [Launcher] Launcher render At a Glance widget as search widget in preview
|
||||
* [Lawnchair/Iconloaderlib] Use correct default percentage for icon adaptive lightness
|
||||
* [Lawnchair/Iconloaderlib] Correct wrap adaptive drawable behaviour
|
||||
* [Launcher] Null exception in FloatingIconView
|
||||
|
||||
### 🥞 Development 4 Release 1 (Snapshot 10)
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ import com.android.launcher3.model.data.ItemInfoWithIcon;
|
||||
import com.android.launcher3.popup.SystemShortcut;
|
||||
import com.android.launcher3.shortcuts.DeepShortcutView;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
@@ -331,11 +332,12 @@ public class FloatingIconView extends FrameLayout implements
|
||||
}
|
||||
}
|
||||
|
||||
drawable = drawable == null ? null : drawable.getConstantState().newDrawable();
|
||||
drawable = drawable == null ? null : Objects.requireNonNull(drawable.getConstantState()).newDrawable();
|
||||
int iconOffset = getOffsetForIconBounds(l, drawable, pos);
|
||||
// Clone right away as we are on the background thread instead of blocking the
|
||||
// main thread later
|
||||
Drawable btvClone = btvIcon == null ? null : btvIcon.getConstantState().newDrawable();
|
||||
Drawable btvClone = btvIcon == null ? null : Objects.requireNonNull(
|
||||
btvIcon.getConstantState()).newDrawable();
|
||||
synchronized (outIconLoadResult) {
|
||||
outIconLoadResult.btvDrawable = () -> btvClone;
|
||||
outIconLoadResult.drawable = drawable;
|
||||
@@ -736,4 +738,4 @@ public class FloatingIconView extends FrameLayout implements
|
||||
this.isThemed = isThemed;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user