task = new BgUpdate();
task.execute();
}
+
+ public void cancel() {
+ task.cancel(true);
+ }
}
private UpdateTarget[] ut;
public void run() {
Log.w("WhereAmI", "resetInfo starting");
unregisterReceiver(connChanged);
- boolean wifion = wifiman.setWifiEnabled(false);
- Log.w("WhereAmI", "disabling wifi result " + wifion);
if (runningtasks > 0) {
+ for (int i = 0; i < ut.length; i++) {
+ ut[i].cancel();
+ }
Time tm = new Time();
tm.setToNow();
tvs.setText(R.string.failtry);
tvs.append(tm.format(" %d/%m/%Y %H:%M:%S"));
}
+ boolean wifion = wifiman.setWifiEnabled(false);
+ Log.w("WhereAmI", "disabling wifi result " + wifion);
}
};