فهرست منبع

Comment on the setColor usage

Signed-off-by: Mario Danic <mario@lovelyhq.com>
Mario Danic 7 سال پیش
والد
کامیت
59e9da8984
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      app/src/main/java/com/nextcloud/talk/services/firebase/MagicFirebaseMessagingService.java

+ 2 - 0
app/src/main/java/com/nextcloud/talk/services/firebase/MagicFirebaseMessagingService.java

@@ -145,6 +145,8 @@ public class MagicFirebaseMessagingService extends FirebaseMessagingService {
                                     .setAutoCancel(true);
 
                             if (Build.VERSION.SDK_INT >= 23) {
+                                // This method should exist since API 21, but some phones don't have it
+                                // So as a safeguard, we don't use it until 23
                                 notificationBuilder.setColor(getResources().getColor(R.color.colorPrimary));
                             } else {
                                 BitmapDrawable tintedDrawable = (BitmapDrawable) ColorUtils.getTintedDrawable(getResources(), smallIcon,