From daff04696f1d9e1864be5e2deaafd0bc54259738 Mon Sep 17 00:00:00 2001 From: Helperhaps Date: Thu, 24 Jan 2019 12:31:14 +0800 Subject: [PATCH] fix typo --- .../notification/AndroidNotification.java | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/src/main/java/cn/jpush/api/push/model/notification/AndroidNotification.java b/src/main/java/cn/jpush/api/push/model/notification/AndroidNotification.java index 40a1b8c4..555cf474 100644 --- a/src/main/java/cn/jpush/api/push/model/notification/AndroidNotification.java +++ b/src/main/java/cn/jpush/api/push/model/notification/AndroidNotification.java @@ -8,7 +8,7 @@ public class AndroidNotification extends PlatformNotification { public static final String NOTIFICATION_ANDROID = "android"; - + private static final String TITLE = "title"; private static final String BUILDER_ID = "builder_id"; private static final String INBOX = "inbox"; @@ -20,7 +20,7 @@ public class AndroidNotification extends PlatformNotification { private static final String CATEGORY = "category"; private static final String LARGE_ICON = "large_icon"; private static final String INTENT = "intent"; - + private final String title; private final int builderId; // 0 ~ 4 @@ -34,15 +34,15 @@ public class AndroidNotification extends PlatformNotification { private String category; private String large_icon; private JsonObject intent; - + private AndroidNotification(Object alert, String title, int builderId, int style, int alertType, String bigText, - Object inbox, String bigPicPath, int priority, String category,String large_icon,JsonObject intent, - Map extras, - Map numberExtras, - Map booleanExtras, + Object inbox, String bigPicPath, int priority, String category,String large_icon,JsonObject intent, + Map extras, + Map numberExtras, + Map booleanExtras, Map jsonExtras) { super(alert, extras, numberExtras, booleanExtras, jsonExtras); - + this.title = title; this.builderId = builderId; this.style = style; @@ -55,16 +55,16 @@ private AndroidNotification(Object alert, String title, int builderId, int style this.large_icon = large_icon; this.intent = intent; } - + public static Builder newBuilder() { return new Builder(); } - + public static AndroidNotification alert(String alert) { return newBuilder().setAlert(alert).build(); } - - + + @Override public String getPlatform() { return NOTIFICATION_ANDROID; @@ -77,11 +77,11 @@ protected Object getInbox() { protected void setInbox(Object inbox) { this.inbox = inbox; } - + @Override public JsonElement toJSON() { JsonObject json = super.toJSON().getAsJsonObject(); - + if (builderId > 0) { json.add(BUILDER_ID, new JsonPrimitive(this.builderId)); } @@ -120,7 +120,7 @@ public JsonElement toJSON() { if (null != category) { json.add(CATEGORY, new JsonPrimitive(category)); } - + if (null != large_icon) { json.add(LARGE_ICON, new JsonPrimitive(large_icon)); } @@ -128,11 +128,11 @@ public JsonElement toJSON() { if (null != intent) { json.add(INTENT, intent); } - + return json; } - - + + public static class Builder extends PlatformNotification.Builder { private String title; private int builderId; @@ -145,21 +145,21 @@ public static class Builder extends PlatformNotification.Builder