| OLD | NEW | 
|   1 /* |   1 /* | 
|   2  * This file is part of Adblock Plus <http://adblockplus.org/>, |   2  * This file is part of Adblock Plus <http://adblockplus.org/>, | 
|   3  * Copyright (C) 2006-2014 Eyeo GmbH |   3  * Copyright (C) 2006-2014 Eyeo GmbH | 
|   4  * |   4  * | 
|   5  * Adblock Plus is free software: you can redistribute it and/or modify |   5  * Adblock Plus is free software: you can redistribute it and/or modify | 
|   6  * it under the terms of the GNU General Public License version 3 as |   6  * it under the terms of the GNU General Public License version 3 as | 
|   7  * published by the Free Software Foundation. |   7  * published by the Free Software Foundation. | 
|   8  * |   8  * | 
|   9  * Adblock Plus is distributed in the hope that it will be useful, |   9  * Adblock Plus is distributed in the hope that it will be useful, | 
|  10  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  10  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| (...skipping 19 matching lines...) Expand all  Loading... | 
|  30     System.loadLibrary("adblockplus-jni"); |  30     System.loadLibrary("adblockplus-jni"); | 
|  31     registerNatives(); |  31     registerNatives(); | 
|  32   } |  32   } | 
|  33  |  33  | 
|  34   public UpdaterCallback() |  34   public UpdaterCallback() | 
|  35   { |  35   { | 
|  36     this.ptr = ctor(this); |  36     this.ptr = ctor(this); | 
|  37     this.disposer = new Disposer(this, new DisposeWrapper(this.ptr)); |  37     this.disposer = new Disposer(this, new DisposeWrapper(this.ptr)); | 
|  38   } |  38   } | 
|  39  |  39  | 
|  40   public abstract void updaterCallback(String arg); |  40   public abstract void updaterCallback(String error); | 
|  41  |  41  | 
|  42   @Override |  42   @Override | 
|  43   public void dispose() |  43   public void dispose() | 
|  44   { |  44   { | 
|  45     this.disposer.dispose(); |  45     this.disposer.dispose(); | 
|  46   } |  46   } | 
|  47  |  47  | 
|  48   private final static class DisposeWrapper implements Disposable |  48   private final static class DisposeWrapper implements Disposable | 
|  49   { |  49   { | 
|  50     private final long ptr; |  50     private final long ptr; | 
|  51  |  51  | 
|  52     public DisposeWrapper(final long ptr) |  52     public DisposeWrapper(final long ptr) | 
|  53     { |  53     { | 
|  54       this.ptr = ptr; |  54       this.ptr = ptr; | 
|  55     } |  55     } | 
|  56  |  56  | 
|  57     @Override |  57     @Override | 
|  58     public void dispose() |  58     public void dispose() | 
|  59     { |  59     { | 
|  60       dtor(this.ptr); |  60       dtor(this.ptr); | 
|  61     } |  61     } | 
|  62   } |  62   } | 
|  63  |  63  | 
|  64   private final static native void registerNatives(); |  64   private final static native void registerNatives(); | 
|  65  |  65  | 
|  66   private final static native long ctor(Object callbackObject); |  66   private final static native long ctor(Object callbackObject); | 
|  67  |  67  | 
|  68   private final static native void dtor(long ptr); |  68   private final static native void dtor(long ptr); | 
|  69 } |  69 } | 
| OLD | NEW |