1
0
mirror of https://github.com/moparisthebest/SSLDroid synced 2024-10-31 15:25:03 -04:00

Enhanced logging for Network status change, so that we are able to

filter better on change events in future

Signed-off-by: Balint Kovacs <blint@blint.hu>
This commit is contained in:
Balint Kovacs 2011-06-10 09:25:41 +02:00
parent c3add3dbf8
commit c8a4d2a459

View File

@ -13,13 +13,13 @@ public class NetworkChangeReceiver extends BroadcastReceiver {
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService( Context.CONNECTIVITY_SERVICE ); ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService( Context.CONNECTIVITY_SERVICE );
NetworkInfo activeNetInfo = connectivityManager.getActiveNetworkInfo(); NetworkInfo activeNetInfo = connectivityManager.getActiveNetworkInfo();
Log.d("SSLDroid", activeNetInfo.toString());
if ( activeNetInfo == null ) { if ( activeNetInfo == null ) {
Intent i = new Intent(); Intent i = new Intent();
i.setAction("hu.blint.ssldroid.SSLDroid"); i.setAction("hu.blint.ssldroid.SSLDroid");
context.stopService(i); context.stopService(i);
return; return;
} }
Log.d("SSLDroid", activeNetInfo.toString());
if (activeNetInfo.isAvailable()) { if (activeNetInfo.isAvailable()) {
Intent i = new Intent(); Intent i = new Intent();
i.setAction("hu.blint.ssldroid.SSLDroid"); i.setAction("hu.blint.ssldroid.SSLDroid");