mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-24 10:51:27 +01:00
Add support for borderless images.
Added support for 'borderless' images. Basically images that we'd like to render as if they were stickers, even though they're not stickers. On iOS, this will be stuff like memoji and bitmoji. On Android, in my initial pass, I've just added support for Giphy stickers. However, we can also detect bitmoji and keyboard stickers in the future. This is kind of a 'best effort' thing, so as long as we support receiving, we can just add sending support for more things as we go.
This commit is contained in:
@@ -14,6 +14,13 @@ public class GiphyImage {
|
||||
@JsonProperty
|
||||
private ImageTypes images;
|
||||
|
||||
@JsonProperty("is_sticker")
|
||||
private boolean isSticker;
|
||||
|
||||
public boolean isSticker() {
|
||||
return isSticker;
|
||||
}
|
||||
|
||||
public String getGifUrl() {
|
||||
ImageData data = getGifData();
|
||||
return data != null ? data.url : null;
|
||||
|
||||
@@ -42,10 +42,11 @@ public class GiphyActivity extends PassphraseRequiredActivity
|
||||
|
||||
private static final String TAG = GiphyActivity.class.getSimpleName();
|
||||
|
||||
public static final String EXTRA_IS_MMS = "extra_is_mms";
|
||||
public static final String EXTRA_WIDTH = "extra_width";
|
||||
public static final String EXTRA_HEIGHT = "extra_height";
|
||||
public static final String EXTRA_COLOR = "extra_color";
|
||||
public static final String EXTRA_IS_MMS = "extra_is_mms";
|
||||
public static final String EXTRA_WIDTH = "extra_width";
|
||||
public static final String EXTRA_HEIGHT = "extra_height";
|
||||
public static final String EXTRA_COLOR = "extra_color";
|
||||
public static final String EXTRA_BORDERLESS = "extra_borderless";
|
||||
|
||||
private final DynamicTheme dynamicTheme = new DynamicDarkToolbarTheme();
|
||||
private final DynamicLanguage dynamicLanguage = new DynamicLanguage();
|
||||
@@ -151,6 +152,7 @@ public class GiphyActivity extends PassphraseRequiredActivity
|
||||
intent.setData(uri);
|
||||
intent.putExtra(EXTRA_WIDTH, viewHolder.image.getGifWidth());
|
||||
intent.putExtra(EXTRA_HEIGHT, viewHolder.image.getGifHeight());
|
||||
intent.putExtra(EXTRA_BORDERLESS, viewHolder.image.isSticker());
|
||||
setResult(RESULT_OK, intent);
|
||||
finish();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user