From: Eugene Crosser Date: Wed, 1 Feb 2012 21:32:19 +0000 (+0400) Subject: add missing controls on managing wifi X-Git-Url: http://average.org/gitweb/?a=commitdiff_plain;h=f957625f34f13ef8339815ec0d4a188e1cded166;p=WhereAmI.git add missing controls on managing wifi --- diff --git a/src/org/average/whereami/WhereAmI.java b/src/org/average/whereami/WhereAmI.java index 2fed78c..9ee5fd1 100644 --- a/src/org/average/whereami/WhereAmI.java +++ b/src/org/average/whereami/WhereAmI.java @@ -57,8 +57,10 @@ public class WhereAmI extends Activity tv.setText(str); runningtasks--; if (runningtasks <= 0) { - boolean wifion = wifiman.setWifiEnabled(false); - Log.w(TAG, "disabling wifi result " + wifion); + if (managewifi) { + boolean wifion = wifiman.setWifiEnabled(false); + Log.w(TAG, "disabling wifi result " + wifion); + } Time tm = new Time(); tm.setToNow(); tvs.setText(R.string.lasttry); @@ -258,8 +260,10 @@ public class WhereAmI extends Activity unregisterReceiver(connChanged); connChangedRegistered = false; } - boolean wifion = wifiman.setWifiEnabled(false); - Log.w(TAG, "disabling wifi result " + wifion); + if (managewifi) { + boolean wifion = wifiman.setWifiEnabled(false); + Log.w(TAG, "disabling wifi result " + wifion); + } } /** Called when the menu is activated. */