Bug 1305461 - [2.2] Replace @JNITarget annotation with @Keep for native reference field. r=sebastian
authorEugen Sawin <esawin@mozilla.com>
Mon, 26 Sep 2016 18:24:31 +0200
changeset 419808 5af529f03228e373ca20f6771620b65781db175f
parent 419807 a35bade493035b8339f2492735dcbf78a0120118
child 419809 548560e9e76273fa6df17415e9b29bfd0361e61b
push id31023
push usercykesiopka.bmo@gmail.com
push dateSat, 01 Oct 2016 01:30:33 +0000
reviewerssebastian
bugs1305461
milestone52.0a1
Bug 1305461 - [2.2] Replace @JNITarget annotation with @Keep for native reference field. r=sebastian
mobile/android/geckoview/src/main/java/org/mozilla/gecko/mozglue/NativeZip.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/mozglue/NativeZip.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/mozglue/NativeZip.java
@@ -1,28 +1,29 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.mozglue;
 
+import android.support.annotation.Keep;
 import org.mozilla.gecko.annotation.JNITarget;
 
 import java.io.InputStream;
 import java.nio.ByteBuffer;
 import java.util.zip.Inflater;
 import java.util.zip.InflaterInputStream;
 
 public class NativeZip implements NativeReference {
     private static final int DEFLATE = 8;
     private static final int STORE = 0;
 
     private volatile long mObj;
-    @JNITarget
+    @Keep
     private InputStream mInput;
 
     public NativeZip(String path) {
         mObj = getZip(path);
     }
 
     public NativeZip(InputStream input) {
         if (!(input instanceof ByteBufferInputStream)) {