mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 02:10:44 +01:00
Fix wallpaper migration getting stuck on malformed files.
Closes #13769
This commit is contained in:
@@ -2061,7 +2061,18 @@ open class RecipientTable(context: Context, databaseHelper: SignalDatabase) : Da
|
||||
* Migrates all recipients using [legacyUri] for their wallpaper to [newUri].
|
||||
* Needed for an app migration.
|
||||
*/
|
||||
fun migrateWallpaperUri(legacyUri: Uri, newUri: Uri): Int {
|
||||
fun migrateWallpaperUri(legacyUri: Uri, newUri: Uri?): Int {
|
||||
if (newUri == null) {
|
||||
return writableDatabase
|
||||
.update(TABLE_NAME)
|
||||
.values(
|
||||
WALLPAPER to null,
|
||||
WALLPAPER_URI to null
|
||||
)
|
||||
.where("$WALLPAPER_URI = ?", legacyUri)
|
||||
.run()
|
||||
}
|
||||
|
||||
val newWallpaper = ChatWallpaperFactory.create(newUri)
|
||||
|
||||
return writableDatabase
|
||||
|
||||
Reference in New Issue
Block a user