mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +01:00
register receiver with app context rather than a single activity's so
that it doesn't leak when that activity goes away.
This commit is contained in:
parent
0354c3f1d9
commit
526b3c1bef
1 changed files with 2 additions and 2 deletions
|
@ -80,8 +80,8 @@ public class NetStateCache {
|
|||
IntentFilter filter = new IntentFilter();
|
||||
filter.addAction( ConnectivityManager.CONNECTIVITY_ACTION );
|
||||
|
||||
Intent intent = context.registerReceiver( s_receiver,
|
||||
filter );
|
||||
Intent intent = context.getApplicationContext().
|
||||
registerReceiver( s_receiver, filter );
|
||||
|
||||
s_ifs = new HashSet<StateChangedIf>();
|
||||
s_haveReceiver = true;
|
||||
|
|
Loading…
Reference in a new issue