Skip to content

Commit daff046

Browse files
author
Helperhaps
committed
fix typo
1 parent c0dcac5 commit daff046

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

src/main/java/cn/jpush/api/push/model/notification/AndroidNotification.java

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
public class AndroidNotification extends PlatformNotification {
1010
public static final String NOTIFICATION_ANDROID = "android";
11-
11+
1212
private static final String TITLE = "title";
1313
private static final String BUILDER_ID = "builder_id";
1414
private static final String INBOX = "inbox";
@@ -20,7 +20,7 @@ public class AndroidNotification extends PlatformNotification {
2020
private static final String CATEGORY = "category";
2121
private static final String LARGE_ICON = "large_icon";
2222
private static final String INTENT = "intent";
23-
23+
2424
private final String title;
2525
private final int builderId;
2626
// 0 ~ 4
@@ -34,15 +34,15 @@ public class AndroidNotification extends PlatformNotification {
3434
private String category;
3535
private String large_icon;
3636
private JsonObject intent;
37-
37+
3838
private AndroidNotification(Object alert, String title, int builderId, int style, int alertType, String bigText,
39-
Object inbox, String bigPicPath, int priority, String category,String large_icon,JsonObject intent,
40-
Map<String, String> extras,
41-
Map<String, Number> numberExtras,
42-
Map<String, Boolean> booleanExtras,
39+
Object inbox, String bigPicPath, int priority, String category,String large_icon,JsonObject intent,
40+
Map<String, String> extras,
41+
Map<String, Number> numberExtras,
42+
Map<String, Boolean> booleanExtras,
4343
Map<String, JsonObject> jsonExtras) {
4444
super(alert, extras, numberExtras, booleanExtras, jsonExtras);
45-
45+
4646
this.title = title;
4747
this.builderId = builderId;
4848
this.style = style;
@@ -55,16 +55,16 @@ private AndroidNotification(Object alert, String title, int builderId, int style
5555
this.large_icon = large_icon;
5656
this.intent = intent;
5757
}
58-
58+
5959
public static Builder newBuilder() {
6060
return new Builder();
6161
}
62-
62+
6363
public static AndroidNotification alert(String alert) {
6464
return newBuilder().setAlert(alert).build();
6565
}
66-
67-
66+
67+
6868
@Override
6969
public String getPlatform() {
7070
return NOTIFICATION_ANDROID;
@@ -77,11 +77,11 @@ protected Object getInbox() {
7777
protected void setInbox(Object inbox) {
7878
this.inbox = inbox;
7979
}
80-
80+
8181
@Override
8282
public JsonElement toJSON() {
8383
JsonObject json = super.toJSON().getAsJsonObject();
84-
84+
8585
if (builderId > 0) {
8686
json.add(BUILDER_ID, new JsonPrimitive(this.builderId));
8787
}
@@ -120,19 +120,19 @@ public JsonElement toJSON() {
120120
if (null != category) {
121121
json.add(CATEGORY, new JsonPrimitive(category));
122122
}
123-
123+
124124
if (null != large_icon) {
125125
json.add(LARGE_ICON, new JsonPrimitive(large_icon));
126126
}
127127

128128
if (null != intent) {
129129
json.add(INTENT, intent);
130130
}
131-
131+
132132
return json;
133133
}
134-
135-
134+
135+
136136
public static class Builder extends PlatformNotification.Builder<AndroidNotification, Builder> {
137137
private String title;
138138
private int builderId;
@@ -145,21 +145,21 @@ public static class Builder extends PlatformNotification.Builder<AndroidNotifica
145145
private String category;
146146
private String large_icon;
147147
private JsonObject intent;
148-
148+
149149
protected Builder getThis() {
150150
return this;
151151
}
152-
152+
153153
public Builder setTitle(String title) {
154154
this.title = title;
155155
return this;
156156
}
157-
157+
158158
public Builder setBuilderId(int builderId) {
159159
this.builderId = builderId;
160160
return this;
161161
}
162-
162+
163163
public Builder setAlert(Object alert) {
164164
this.alert = alert;
165165
return this;
@@ -203,22 +203,22 @@ public Builder setInbox(Object inbox) {
203203
this.inbox = inbox;
204204
return this;
205205
}
206-
206+
207207
public Builder setLargeIcon(String largeIcon) {
208208
this.large_icon = largeIcon;
209209
return this;
210210
}
211-
211+
212212
public Builder setIntent(JsonObject intent) {
213-
if (null == inbox) {
213+
if (null == intent) {
214214
LOG.warn("Null intent. Throw away it.");
215215
return this;
216216
}
217217
this.intent = intent;
218218
return this;
219219
}
220-
221-
220+
221+
222222
public AndroidNotification build() {
223223
return new AndroidNotification(alert, title, builderId, style, alert_type, big_text, inbox, big_pic_path, priority,
224224
category, large_icon, intent,extrasBuilder, numberExtrasBuilder, booleanExtrasBuilder, jsonExtrasBuilder);

0 commit comments

Comments
 (0)