From f957625f34f13ef8339815ec0d4a188e1cded166 Mon Sep 17 00:00:00 2001 From: Eugene Crosser Date: Thu, 2 Feb 2012 01:32:19 +0400 Subject: [PATCH] add missing controls on managing wifi --- src/org/average/whereami/WhereAmI.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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. */ -- 2.43.0