@@ -112,6 +112,9 @@ public class AndroidNotification {
112112 @ Key ("notification_count" )
113113 private final Integer notificationCount ;
114114
115+ @ Key ("proxy" )
116+ private final String proxy ;
117+
115118 private static final Map <Priority , String > PRIORITY_MAP =
116119 ImmutableMap .<Priority , String >builder ()
117120 .put (Priority .MIN , "PRIORITY_MIN" )
@@ -179,6 +182,11 @@ private AndroidNotification(Builder builder) {
179182 checkArgument (builder .notificationCount >= 0 ,
180183 "notificationCount if specified must be zero or positive valued" );
181184 }
185+ if (builder .proxy != null ) {
186+ this .proxy = builder .proxy .name ();
187+ } else {
188+ this .proxy = null ;
189+ }
182190 this .notificationCount = builder .notificationCount ;
183191 }
184192
@@ -194,13 +202,20 @@ public String toString() {
194202 return PRIORITY_MAP .get (this );
195203 }
196204 }
197-
205+
198206 public enum Visibility {
199207 PRIVATE ,
200208 PUBLIC ,
201209 SECRET ,
202210 }
203211
212+ public enum Proxy {
213+ PROXY_UNSPECIFIED ,
214+ ALLOW ,
215+ DENY ,
216+ IF_PRIORITY_LOWERED
217+ }
218+
204219 /**
205220 * Creates a new {@link AndroidNotification.Builder}.
206221 *
@@ -237,6 +252,7 @@ public static class Builder {
237252 private LightSettings lightSettings ;
238253 private Boolean defaultLightSettings ;
239254 private Visibility visibility ;
255+ private Proxy proxy ;
240256
241257 private Builder () {}
242258
@@ -602,6 +618,19 @@ public Builder setNotificationCount(int notificationCount) {
602618 return this ;
603619 }
604620
621+ /**
622+ * Sets the proxy of this notification.
623+ *
624+ * @param proxy The proxy value. one of the values in
625+ * {PROXY_UNSPECIFIED, ALLOW, DENY, IF_PRIORITY_LOWERED}
626+ *
627+ * @return This builder.
628+ */
629+ public Builder setProxy (Proxy proxy ) {
630+ this .proxy = proxy ;
631+ return this ;
632+ }
633+
605634 /**
606635 * Creates a new {@link AndroidNotification} instance from the parameters set on this builder.
607636 *
0 commit comments