k9mail/k-9 — pull request #124 by wilian-cb (2012-02-12 15:54:40+00:00)
Title: Creating and Initializing special accounts variables of the Accounts activity to avoid NullPointerException

Creating and initializing special accounts in the refresh method of the Accounts activity to avoid NullPointerException that can be thrown when the activity is resumed. This error forced the application to close right away and happened because the initialization of the special accounts variables is done in the onCreate method of Accounts activity only when the 'hide special accounts' selection isn't checked.

Scenario that caused the error:
1. Before starting the application the option 'hide special accounts' is checked
2. The user starts the application and changes this option in the menu
3. The user clicks back button 2 times to come back to Accounts screen
4. NullPointerException forces the application to close

Constant added to represent the number of special accounts to be used in the initialization of the ArrayList that represents the special accounts to be used in the list adapter of the activity.