OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 @Override | 182 @Override |
183 public void waitForReady() | 183 public void waitForReady() |
184 { | 184 { |
185 if (engineCreated == null) | 185 if (engineCreated == null) |
186 { | 186 { |
187 throw new IllegalStateException("Usage exception: call retain(true) first"
); | 187 throw new IllegalStateException("Usage exception: call retain(true) first"
); |
188 } | 188 } |
189 | 189 |
190 try | 190 try |
191 { | 191 { |
192 Log.d(TAG, "Waiting for ready ..."); | 192 Log.d(TAG, "Waiting for ready in " + Thread.currentThread()); |
193 engineCreated.await(); | 193 engineCreated.await(); |
194 Log.d(TAG, "Ready"); | 194 Log.d(TAG, "Ready"); |
195 } | 195 } |
196 catch (InterruptedException e) | 196 catch (InterruptedException e) |
197 { | 197 { |
198 Log.w(TAG, "Interrupted", e); | 198 Log.w(TAG, "Interrupted", e); |
199 } | 199 } |
200 } | 200 } |
201 | 201 |
202 @Override | 202 @Override |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 engineDisposedCallback.run(); | 246 engineDisposedCallback.run(); |
247 } | 247 } |
248 } | 248 } |
249 | 249 |
250 @Override | 250 @Override |
251 public int getCounter() | 251 public int getCounter() |
252 { | 252 { |
253 return referenceCounter.get(); | 253 return referenceCounter.get(); |
254 } | 254 } |
255 } | 255 } |
OLD | NEW |