From 6c1ec0069384f18321da5e111aacd4d94ada7a39 Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Fri, 10 Aug 2018 01:37:47 +0200 Subject: [PATCH] Small fixes Signed-off-by: Mario Danic --- .../CallNotificationController.java | 35 ++++++++++--------- .../drawable/ic_people_group_black_24px.xml | 27 -------------- 2 files changed, 18 insertions(+), 44 deletions(-) delete mode 100644 app/src/main/res/drawable/ic_people_group_black_24px.xml diff --git a/app/src/main/java/com/nextcloud/talk/controllers/CallNotificationController.java b/app/src/main/java/com/nextcloud/talk/controllers/CallNotificationController.java index edb0f9065..b8b5d0b68 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/CallNotificationController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/CallNotificationController.java @@ -420,25 +420,26 @@ public class CallNotificationController extends BaseController { (getActivity()).getBitmapPool(), resource, avatarSize, avatarSize)); } - if (AvatarStatusCodeHolder.getInstance().getStatusCode() == 200) { - final Allocation input = Allocation.createFromBitmap(renderScript, resource); - final Allocation output = Allocation.createTyped(renderScript, input.getType()); - final ScriptIntrinsicBlur script = ScriptIntrinsicBlur.create(renderScript, Element - .U8_4(renderScript)); - script.setRadius(15f); - script.setInput(input); - script.forEach(output); - output.copyTo(resource); + if (AvatarStatusCodeHolder.getInstance().getStatusCode() == 200 && + userBeingCalled.hasSpreedCapabilityWithName("no-ping")) { + final Allocation input = Allocation.createFromBitmap(renderScript, resource); + final Allocation output = Allocation.createTyped(renderScript, input.getType()); + final ScriptIntrinsicBlur script = ScriptIntrinsicBlur.create(renderScript, Element + .U8_4(renderScript)); + script.setRadius(15f); + script.setInput(input); + script.forEach(output); + output.copyTo(resource); - 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(); - constraintLayout.setBackgroundColor(palette.getDominantColor( - getResources().getColor(R.color.grey950))); + 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(); + constraintLayout.setBackgroundColor(palette.getDominantColor( + getResources().getColor(R.color.grey950))); + } } - } }); diff --git a/app/src/main/res/drawable/ic_people_group_black_24px.xml b/app/src/main/res/drawable/ic_people_group_black_24px.xml deleted file mode 100644 index 8d90bfb67..000000000 --- a/app/src/main/res/drawable/ic_people_group_black_24px.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - -