mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-26 11:51:10 +01:00
Allow voice notes to continue playback after leaving conversation.
This commit is contained in:
committed by
Greyson Parrelli
parent
7ef57cc0cf
commit
9effa47dd8
@@ -93,6 +93,15 @@ public final class AvatarUtil {
|
||||
}
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
public static Bitmap getBitmapForNotification(@NonNull Context context, @NonNull Recipient recipient) {
|
||||
try {
|
||||
return requestCircle(GlideApp.with(context).asBitmap(), context, recipient).submit().get();
|
||||
} catch (ExecutionException | InterruptedException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static GlideRequest<Drawable> getSelfAvatarOrFallbackIcon(@NonNull Context context, @DrawableRes int fallbackIcon) {
|
||||
return GlideApp.with(context)
|
||||
.asDrawable()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.thoughtcrime.securesms.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Color;
|
||||
import androidx.annotation.AttrRes;
|
||||
@@ -21,6 +22,10 @@ import org.thoughtcrime.securesms.R;
|
||||
|
||||
public class ThemeUtil {
|
||||
|
||||
public static boolean isDarkNotificationTheme(@NonNull Context context) {
|
||||
return (context.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES;
|
||||
}
|
||||
|
||||
public static boolean isDarkTheme(@NonNull Context context) {
|
||||
return getAttribute(context, R.attr.theme_type, "light").equals("dark");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user