adiraga / droid-notify

Automatically exported from code.google.com/p/droid-notify
0 stars 0 forks source link

K-9 Mail Notification Preferences ArrayIndexOutOfBounds #138

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Go into Settings->Notifications->K-9->Statusbar Notifications
2. Error is being reported (Application stopped)
3.

What version of the product are you using? On what operating system?
AOKP B38, Droid Notify Lite v3.11

Logcat shows ArrayIndexOutOfBounds in ListPreferences.getEntry, length=58, 
index=61

If you need more details, please let know.

Original issue reported on code.google.com by reg.void...@gmail.com on 20 Jun 2012 at 4:22

GoogleCodeExporter commented 9 years ago
I can't reproduce this. There was an error with the Status Bar Notification 
Icons, but this should not be fixed. Try uninstalling the app and then 
re-installing it.

Original comment by cs3vi...@gmail.com on 21 Jun 2012 at 5:23

GoogleCodeExporter commented 9 years ago
I uninstalled and re-installed and get the same error on opening K-9 Statusbar 
Notifications settings. I looked at the icons I can choose from (e.g. in 
Statusbar Notifications for SMS) and I see a total of 58 icons. Interestingly, 
in the list of icons, entry nr. 8 and entry nr. 42 shows no icon but only the 
radio checkbox. This list is the same for all statusbar notification settings.

Is there anything I can do other than re-installing?

Original comment by reg.void...@gmail.com on 21 Jun 2012 at 6:56

GoogleCodeExporter commented 9 years ago
I worked around it by exporting prefs and manually setting the icon preference 
from its default value "status_bar_notification_email_white" to some value 
further up in the options array (e.g. "status_bar_notification_sms_blue"). This 
allowed me to enter preferences without FC and choose from the available icons.

Looking at the code, I believe the error is from the definition of string array 
"notification_icon_options" which only holds 58 entries, while the 
corresponding entry images preferences references "notification_icon_images" 
which holds 69 image references. The default value for K-9 image is set to 
"status_bar_notification_email_white" and being at position 61, is out of range 
of the "notification_icon_options" array leading to the reported 
ArrayIndexOutOfBounds.

With regard to entries 8 and 42, they are simply full white and therefore not 
visible on white background, so no issue with these.

Original comment by reg.void...@gmail.com on 5 Jul 2012 at 12:55