Bug 1476552 - GeckoSession::WebResponseInfo Kotlin annotations and static r=sebastian
authorRaynald Mirville <raynald.mirville@gmail.com>
Tue, 28 Aug 2018 13:02:23 +0000
changeset 481936 a2e7223d34fcb8eefedf5aa303ad9f0b9fe9b5e0
parent 481935 6f6eab842feaf00a38653dd4405aca1ec4d075db
child 481937 684d84410d7f92e221ae395959bb7b7d5da33a94
push id232
push userfmarier@mozilla.com
push dateWed, 05 Sep 2018 20:45:54 +0000
reviewerssebastian
bugs1476552
milestone63.0a1
Bug 1476552 - GeckoSession::WebResponseInfo Kotlin annotations and static r=sebastian MozReview-Commit-ID: 1HWEStKaGVl Bug 1476552 part 1 - Add @NonNull/@Nullable annotations to GeckoSession::WebResponseInfo for Kotlin interoperability Bug 1476552 part 2 - Make GeckoSession::WebResponseInfo static MozReview-Commit-ID: 4ce92G7i2nz Differential Revision: https://phabricator.services.mozilla.com/D2885
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
@@ -2064,37 +2064,37 @@ public class GeckoSession extends LayerS
             return ContentDelegate.ELEMENT_TYPE_AUDIO;
         }
         return ContentDelegate.ELEMENT_TYPE_NONE;
     }
 
     /**
      * WebResponseInfo contains information about a single web response.
      */
-    public class WebResponseInfo {
+    static public class WebResponseInfo {
         /**
          * The URI of the response. Cannot be null.
          */
-        public final String uri;
+        @NonNull public final String uri;
 
         /**
          * The content type (mime type) of the response. May be null.
          */
-        public final String contentType;
+        @Nullable public final String contentType;
 
         /**
          * The content length of the response. May be 0 if unknokwn.
          */
-        public final long contentLength;
+        @Nullable public final long contentLength;
 
         /**
          * The filename obtained from the content disposition, if any.
          * May be null.
          */
-        public final String filename;
+        @Nullable public final String filename;
 
         /* package */ WebResponseInfo(GeckoBundle message) {
             uri = message.getString("uri");
             if (uri == null) {
                 throw new IllegalArgumentException("URI cannot be null");
             }
 
             contentType = message.getString("contentType");