Эх сурвалжийг харах

codacy: Avoid using Literals in Conditional Statements

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger 6 жил өмнө
parent
commit
07cc2fc7e7

+ 2 - 1
src/main/java/com/owncloud/android/jobs/NotificationJob.java

@@ -88,6 +88,7 @@ public class NotificationJob extends Job {
     private static final String KEY_NOTIFICATION_ACTION_TYPE = "KEY_NOTIFICATION_ACTION_TYPE";
     private static final String PUSH_NOTIFICATION_ID = "PUSH_NOTIFICATION_ID";
     private static final String NUMERIC_NOTIFICATION_ID = "NUMERIC_NOTIFICATION_ID";
+    public static final String APP_SPREED = "spreed";
 
     private SecureRandom randomId = new SecureRandom();
     private Context context;
@@ -121,7 +122,7 @@ public class NotificationJob extends Job {
                                                                                   DecryptedPushMessage.class);
 
                         // We ignore Spreed messages for now
-                        if (!"spreed".equals(decryptedPushMessage.getApp())) {
+                        if (!APP_SPREED.equals(decryptedPushMessage.getApp())) {
                             fetchCompleteNotification(signatureVerification.getAccount(), decryptedPushMessage);
                         }
                     }