| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * This file is part of the Adblock Plus, | 2 * This file is part of the Adblock Plus, |
| 3 * Copyright (C) 2006-2012 Eyeo GmbH | 3 * Copyright (C) 2006-2012 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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 447 } | 447 } |
| 448 }); | 448 }); |
| 449 interactive = true; | 449 interactive = true; |
| 450 } | 450 } |
| 451 | 451 |
| 452 /** | 452 /** |
| 453 * Notifies JS code that application quit interactive mode. | 453 * Notifies JS code that application quit interactive mode. |
| 454 */ | 454 */ |
| 455 public void stopInteractive() | 455 public void stopInteractive() |
| 456 { | 456 { |
| 457 // onStop is sometimes called without prior calling onStart | |
| 458 // by Android system | |
| 459 if (js == null) | |
|
Felix Dahlke
2012/11/28 08:12:56
This is the same safe guard as in issue 8956033 -
Andrey Novikov
2012/11/28 08:25:01
If the problem will occur elsewhere I will do.
| |
| 460 return; | |
| 461 | |
| 457 js.execute(new Runnable() | 462 js.execute(new Runnable() |
| 458 { | 463 { |
| 459 @Override | 464 @Override |
| 460 public void run() | 465 public void run() |
| 461 { | 466 { |
| 462 js.evaluate("stopInteractive()"); | 467 js.evaluate("stopInteractive()"); |
| 463 } | 468 } |
| 464 }); | 469 }); |
| 465 interactive = false; | 470 interactive = false; |
| 466 } | 471 } |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1033 } | 1038 } |
| 1034 return result; | 1039 return result; |
| 1035 } | 1040 } |
| 1036 | 1041 |
| 1037 protected void onProgressUpdate(Integer... progress) | 1042 protected void onProgressUpdate(Integer... progress) |
| 1038 { | 1043 { |
| 1039 Log.d("HTTP", "Progress: " + progress[0].intValue()); | 1044 Log.d("HTTP", "Progress: " + progress[0].intValue()); |
| 1040 } | 1045 } |
| 1041 } | 1046 } |
| 1042 } | 1047 } |
| OLD | NEW |