TwidereProject/Twidere-Android — pull request #40 by vanita5 (2014-11-26 19:47:22+00:00)
Title: fix SQLiteConstraintException

Initial setup of Twidere throws the following exception:

android.database.sqlite.SQLiteConstraintException: tabs.name may not be NULL (code 19)
at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:782)
at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)
at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1469)
at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1339)
at org.mariotaku.twidere.util.SQLiteDatabaseWrapper.insert(SQLiteDatabaseWrapper.java:40)
at org.mariotaku.twidere.provider.TwidereDataProvider.bulkInsert(TwidereDataProvider.java:170)
at android.content.ContentProvider$Transport.bulkInsert(ContentProvider.java:233)
at android.content.ContentResolver.bulkInsert(ContentResolver.java:1251)
at org.mariotaku.twidere.activity.SettingsWizardActivity$AbsInitialSettingsTask.doInBackground(SettingsWizardActivity.java:526)
at org.mariotaku.twidere.activity.SettingsWizardActivity$AbsInitialSettingsTask.doInBackground(SettingsWizardActivity.java:481)
at org.mariotaku.twidere.task.AsyncTask$BackgroundRunnable.run(AsyncTask.java:138)
at java.lang.Thread.run(Thread.java:841)

Result: Tabs get not setup initially.

This bug is fixed by allowing tab names to have a null value, which should be okay.
Additionally icons may not be null anymore. This never seemed to happen anyway, so it's okay I guess.