TBLauncher
TBLauncher copied to clipboard
Widget crashes TB
Description
Bug A. Markdown Widget cannot be moved and resized. Bug B. It crashes TinyBit, even after the widget is uninstalled.
Steps to Reproduce
To reproduce the behavior:
- Install Markdown Widget.
- Add the widget (long-tap the desktop - select Markdown Widget - configure the widget).
- The widget appears.
- (Bug A) Long-tap or short-tap the widget.
- If there is another widget below, the long-tap or short-tap have effect on that other widget, and they ignore the Markdown Widget.
- Else (no other widget below), the long-tap or short-tap have effect on the desktop (the popup to add / modify / remove any widgets appears).
- (Bug B) Long-tap the desktop. The popup to add / modify / remove any widgets shows. Select to edit or remove widgets. TinyBit crashes.
- Uninstall the widget.
- Repeat step 5. TinyBit still crashes.
Crash log for Bug B
FATAL EXCEPTION: main
Process: rocks.tbog.tblauncher, PID: 7927
java.lang.NullPointerException: Attempt to invoke virtual method 'android.graphics.drawable.Drawable android.appwidget.AppWidgetProviderInfo.loadPreviewImage(android.content.Context, int)' on a null object reference
at rocks.tbog.tblauncher.entry.AppEntry$$ExternalSyntheticApiModelOutline0.m(SourceFile:4)
at rocks.tbog.tblauncher.widgets.WidgetManager.getWidgetPreview(SourceFile:18)
at rocks.tbog.tblauncher.widgets.WidgetManager.getWidgetListPopup(SourceFile:54)
at rocks.tbog.tblauncher.widgets.WidgetManager.showRemoveWidgetPopup(SourceFile:14)
at rocks.tbog.tblauncher.widgets.WidgetManager$$ExternalSyntheticLambda6.onItemClick(SourceFile:113)
at rocks.tbog.tblauncher.ui.ListPopup$$ExternalSyntheticLambda2.onClick(SourceFile:151)
at android.view.View.performClick(View.java:6312)
at android.widget.TextView.performClick(TextView.java:11202)
at android.view.View$PerformClick.run(View.java:23985)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6816)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1563)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1451)
Device info
- Device: Samsung
- OS: Android 7.1
- TinyBit Launcher version: 7.5 from F-droid
TB crashes even after the widget is uninstalled. I added details above.