/** * Internal method to insert a new Cell Broadcast into the database and notify observers. * * @param message the message to insert * @return true if the database was updated, false otherwise */ boolean insertNewBroadcast(CellBroadcastMessage message) { SQLiteDatabase db = mOpenHelper.getWritableDatabase(); ContentValues cv = message.getContentValues(); long rowId = db.insert(CellBroadcastDatabaseHelper.TABLE_NAME, null, cv); if (rowId != -1) { return true; } else { Log.e(TAG, "failed to insert new broadcast into database"); return false; } }