Small patches for android-launcher-plus

37 views
Skip to first unread message

Kevin TeslaCoil

unread,
Oct 17, 2011, 12:34:11 PM10/17/11
to android-appwid...@googlegroups.com
Hello group,

I have some small patches. If it's easier for me to submit via git/github let me know where the repo is (ADW rather than android-launcher-plus?)

(For svn r93)
1) WidgetRemoteViewsListAdapterHandleNullCursor.diff
It's possible for onQueryComplete to be called with a null cursor. Saw this in a crash report, I don't know the exact circumstance but checking for null before closing seems sane/easy.
2) IntegerValueOf.diff
FindBugs for Eclipse pointed these out, there's a few places where "new Integer(int)" is used rather than "Integer.valueOf(int)". Minor, but potentially faster and potentially saves some GC effort.

-Kevin

IntegerValueOf.diff
WidgetRemoteViewsListAdapterHandleNullCursor.diff

roee shlomo

unread,
Oct 17, 2011, 1:03:11 PM10/17/11
to android-appwid...@googlegroups.com

I experienced issue 1 as well.
I noticed it only happens on launchers with API v2 support.

A check for null is much better than a crash but it is important to also know the cause of the problem to make sure the lists would always stay updated.

And if anyone applies this patch please also change the notifyDataSetInvalidated calls to notifyDataSetChanged as I described in another thread.

Reply all
Reply to author
Forward
0 new messages