use of org.thoughtcrime.securesms.database.model.databaseprotos.Wallpaper in project Signal-Android by WhisperSystems.
the class WallpaperValues method setWallpaper.
public void setWallpaper(@NonNull Context context, @Nullable ChatWallpaper wallpaper) {
Wallpaper currentWallpaper = getCurrentWallpaper();
Uri currentUri = null;
if (currentWallpaper != null && currentWallpaper.hasFile()) {
currentUri = Uri.parse(currentWallpaper.getFile().getUri());
}
if (wallpaper != null) {
putBlob(KEY_WALLPAPER, wallpaper.serialize().toByteArray());
} else {
getStore().beginWrite().remove(KEY_WALLPAPER).apply();
}
if (currentUri != null) {
WallpaperStorage.onWallpaperDeselected(context, currentUri);
}
}
use of org.thoughtcrime.securesms.database.model.databaseprotos.Wallpaper in project Signal-Android by signalapp.
the class WallpaperValues method setWallpaper.
public void setWallpaper(@NonNull Context context, @Nullable ChatWallpaper wallpaper) {
Wallpaper currentWallpaper = getCurrentWallpaper();
Uri currentUri = null;
if (currentWallpaper != null && currentWallpaper.hasFile()) {
currentUri = Uri.parse(currentWallpaper.getFile().getUri());
}
if (wallpaper != null) {
putBlob(KEY_WALLPAPER, wallpaper.serialize().toByteArray());
} else {
getStore().beginWrite().remove(KEY_WALLPAPER).apply();
}
if (currentUri != null) {
WallpaperStorage.onWallpaperDeselected(context, currentUri);
}
}
Aggregations