소스 검색

codacy: Avoid using Literals in Conditional Statements

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger 6 년 전
부모
커밋
07cc2fc7e7
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/main/java/com/owncloud/android/jobs/NotificationJob.java

+ 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);
                         }
                     }