We were getting an IllegalArgumentException during channel creation on
some Samsung phones. Stack trace didn't give me much more than that, so
just adding in some additional safeguards that make sense based on
reading AOSP.
@ -247,6 +247,7 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
if(oldVersion<NOTIFICATION_CHANNELS){
db.execSQL("ALTER TABLE recipient_preferences ADD COLUMN notification_channel TEXT DEFAULT NULL");
NotificationChannels.create(context);
try(Cursorcursor=db.rawQuery("SELECT recipient_ids, system_display_name, signal_profile_name, notification, vibrate FROM recipient_preferences WHERE notification NOT NULL OR vibrate != 0",null)){
while(cursor!=null&&cursor.moveToNext()){
@ -257,7 +258,7 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {