Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit da6bd6f9 authored by Kevin Barry's avatar Kevin Barry Committed by Michael Chan
Browse files

Correct getViewTypeCount for Calendar AppWidget

This was incorreclty returning 4 when there are 5 possible view types:
    R.layout.appwidget_loading
    R.layout.appwidget_no_events
    R.layout.appwidget_day
    R.layout.widget_all_day_item
    R.layout.widget_item

In the right (wrong?) circumstances, the appwidget may use all 5 types
and then at layout or when trying to scroll the launcher (not the widget)
will get an FC along the lines of:

java.lang.ArrayIndexOutOfBoundsException: length=5; index=5
    at android.widget.AbsListView$RecycleBin.addScrapView(AbsListView.java:5970)
    ...
    at com.android.launcher2.LauncherAppWidgetHostView.onLayout(src:87)

Returning the correct value for getViewTypeCount eliminates this launcher FC.

Change-Id: Iaefeff7638d27457a2b3e366c40651d5d730dd5a
parent 276ff636
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment