@@ -112,6 +112,9 @@ public class AndroidNotification {
112
112
@ Key ("notification_count" )
113
113
private final Integer notificationCount ;
114
114
115
+ @ Key ("proxy" )
116
+ private final String proxy ;
117
+
115
118
private static final Map <Priority , String > PRIORITY_MAP =
116
119
ImmutableMap .<Priority , String >builder ()
117
120
.put (Priority .MIN , "PRIORITY_MIN" )
@@ -179,6 +182,11 @@ private AndroidNotification(Builder builder) {
179
182
checkArgument (builder .notificationCount >= 0 ,
180
183
"notificationCount if specified must be zero or positive valued" );
181
184
}
185
+ if (builder .proxy != null ) {
186
+ this .proxy = builder .proxy .name ();
187
+ } else {
188
+ this .proxy = null ;
189
+ }
182
190
this .notificationCount = builder .notificationCount ;
183
191
}
184
192
@@ -194,13 +202,19 @@ public String toString() {
194
202
return PRIORITY_MAP .get (this );
195
203
}
196
204
}
197
-
205
+
198
206
public enum Visibility {
199
207
PRIVATE ,
200
208
PUBLIC ,
201
209
SECRET ,
202
210
}
203
211
212
+ public enum Proxy {
213
+ ALLOW ,
214
+ DENY ,
215
+ IF_PRIORITY_LOWERED
216
+ }
217
+
204
218
/**
205
219
* Creates a new {@link AndroidNotification.Builder}.
206
220
*
@@ -237,6 +251,7 @@ public static class Builder {
237
251
private LightSettings lightSettings ;
238
252
private Boolean defaultLightSettings ;
239
253
private Visibility visibility ;
254
+ private Proxy proxy ;
240
255
241
256
private Builder () {}
242
257
@@ -602,6 +617,18 @@ public Builder setNotificationCount(int notificationCount) {
602
617
return this ;
603
618
}
604
619
620
+ /**
621
+ * Sets the proxy of this notification.
622
+ *
623
+ * @param proxy The proxy value, one of the values in {ALLOW, DENY, IF_PRIORITY_LOWERED}
624
+ *
625
+ * @return This builder.
626
+ */
627
+ public Builder setProxy (Proxy proxy ) {
628
+ this .proxy = proxy ;
629
+ return this ;
630
+ }
631
+
605
632
/**
606
633
* Creates a new {@link AndroidNotification} instance from the parameters set on this builder.
607
634
*
0 commit comments