mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-12-11 18:03:00 +03:00
Fix a crash with resources being null
This commit is contained in:
parent
35fd4d36a9
commit
fafca26572
1 changed files with 15 additions and 11 deletions
|
@ -447,11 +447,14 @@ public class CallNotificationController extends BaseController {
|
|||
script.forEach(output);
|
||||
output.copyTo(resource);
|
||||
|
||||
if (getResources() != null) {
|
||||
incomingTextRelativeLayout.setBackground(getResources().getDrawable(R.drawable
|
||||
.incoming_gradient));
|
||||
constraintLayout.setBackground(new BitmapDrawable(resource));
|
||||
}
|
||||
} else if (AvatarStatusCodeHolder.getInstance().getStatusCode() == 201) {
|
||||
Palette palette = Palette.from(resource).generate();
|
||||
if (getResources() != null) {
|
||||
int color = palette.getDominantColor(getResources().getColor(R.color.grey950));
|
||||
|
||||
if (color != getResources().getColor(R.color.grey950)) {
|
||||
|
@ -464,6 +467,7 @@ public class CallNotificationController extends BaseController {
|
|||
constraintLayout.setBackgroundColor(color);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue