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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
436 { | 436 { |
437 if (extra.getBoolean("enabled")) | 437 if (extra.getBoolean("enabled")) |
438 { | 438 { |
439 // Service is enabled in manual mode | 439 // Service is enabled in manual mode |
440 if (extra.getBoolean("manual")) | 440 if (extra.getBoolean("manual")) |
441 { | 441 { |
442 // Proxy is properly configured | 442 // Proxy is properly configured |
443 if (extra.getBoolean("configured")) | 443 if (extra.getBoolean("configured")) |
444 hideConfigurationMsg(); | 444 hideConfigurationMsg(); |
445 else | 445 else |
446 showConfigurationMsg(getString(R.string.msg_configuration, extra.g etInt("port"))); | 446 showConfigurationMsg(getString(R.string.msg_configuration)); |
Andrey Novikov
2013/03/07 10:26:34
This is for 2.x devices also, see my comments in s
| |
447 } | 447 } |
448 } | 448 } |
449 else | 449 else |
450 { | 450 { |
451 setFilteringEnabled(false); | 451 setFilteringEnabled(false); |
452 hideConfigurationMsg(); | 452 hideConfigurationMsg(); |
453 } | 453 } |
454 } | 454 } |
455 if (action.equals(ProxyService.BROADCAST_PROXY_FAILED)) | 455 if (action.equals(ProxyService.BROADCAST_PROXY_FAILED)) |
456 { | 456 { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
529 } | 529 } |
530 | 530 |
531 private ServiceConnection proxyServiceConnection = new ServiceConnection() | 531 private ServiceConnection proxyServiceConnection = new ServiceConnection() |
532 { | 532 { |
533 public void onServiceConnected(ComponentName className, IBinder service) | 533 public void onServiceConnected(ComponentName className, IBinder service) |
534 { | 534 { |
535 proxyService = ((ProxyService.LocalBinder) service).getService(); | 535 proxyService = ((ProxyService.LocalBinder) service).getService(); |
536 Log.d(TAG, "Proxy service connected"); | 536 Log.d(TAG, "Proxy service connected"); |
537 | 537 |
538 if (proxyService.isManual() && proxyService.noTraffic()) | 538 if (proxyService.isManual() && proxyService.noTraffic()) |
539 showConfigurationMsg(getString(R.string.msg_configuration, proxyService. port)); | 539 showConfigurationMsg(getString(R.string.msg_configuration)); |
Andrey Novikov
2013/03/07 10:26:34
This is for 2.x devices also, see my comments in s
| |
540 } | 540 } |
541 | 541 |
542 public void onServiceDisconnected(ComponentName className) | 542 public void onServiceDisconnected(ComponentName className) |
543 { | 543 { |
544 proxyService = null; | 544 proxyService = null; |
545 Log.d(TAG, "Proxy service disconnected"); | 545 Log.d(TAG, "Proxy service disconnected"); |
546 } | 546 } |
547 }; | 547 }; |
548 } | 548 } |
OLD | NEW |