package ru.nsu.bobrofon.easysshfs;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.NetworkInfo;
import android.net.wifi.WifiManager;

import ru.nsu.bobrofon.easysshfs.mountpointList.MountPointsList;

public class InternetStateChangeReceiver extends BroadcastReceiver {
	public InternetStateChangeReceiver() {
	}

	@Override
	public void onReceive(Context context, Intent intent) {
		NetworkInfo info = intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO);
		if(info != null) {
			if(info.isConnected()) {
				MountPointsList.getIntent(context).autoMount();
			}
			else if (!info.isConnectedOrConnecting()) {
				MountPointsList.getIntent(context).umount();
			}
		}
	}
}

@@ -451,16 +451,110 @@
 tent) %7B%0A
+%09%09if (!WifiManager.NETWORK_STATE_CHANGED_ACTION.equals(intent.getAction())) %7B%0A%09%09%09return;%0A%09%09%7D%0A%0A
 %09%09Networ

Fix lintian warning