Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/org/adblockplus/android/Preferences.java

Issue 8959120: android: IllegalArgumentException on exiting preferences (Closed)
Patch Set: Created Nov. 30, 2012, 10:23 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/org/adblockplus/android/Preferences.java
===================================================================
--- a/src/org/adblockplus/android/Preferences.java
+++ b/src/org/adblockplus/android/Preferences.java
@@ -217,7 +217,14 @@
public void onPause()
{
super.onPause();
- unregisterReceiver(receiver);
+ try
+ {
+ unregisterReceiver(receiver);
+ }
+ catch (IllegalArgumentException e)
+ {
+ // ignore - it is thrown if receiver is not registered but it can not be true in normal conditions
+ }
unbindService(proxyServiceConnection);
proxyService = null;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld