X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=src%2Fro%2Fieval%2Ffonbot%2FHeavy.java;h=3af6bc463e6da2b1e236048c7a67ba4360213ff3;hb=4d0abc184849c968c33ffda5abd98156272541e8;hp=3249db8208a37e841c75a35380ac5cd03e5ea066;hpb=06a86a92d44173f1cdd7e595259596f09f30142f;p=fonbot.git diff --git a/src/ro/ieval/fonbot/Heavy.java b/src/ro/ieval/fonbot/Heavy.java index 3249db8..3af6bc4 100644 --- a/src/ro/ieval/fonbot/Heavy.java +++ b/src/ro/ieval/fonbot/Heavy.java @@ -461,9 +461,6 @@ final class Heavy { case REBOOT: Utils.sendMessage(context, replyTo, reboot_help); break; - case SHUTDOWN: - Utils.sendMessage(context, replyTo, shutdown_help); - break; case NOTIFY: Utils.sendMessage(context, replyTo, notify_help); } @@ -939,7 +936,7 @@ final class Heavy { * @see LocationManager#requestLocationUpdates(String, long, float, LocationListener) */ public static void location(final Context context, final Address replyTo, final String provider,final long minTime,final float minDistance){ - final LocationManager man=(LocationManager) context.getSystemService(Context.LOCATION_SERVICE); + final LocationManager man=(LocationManager) context.getApplicationContext().getSystemService(Context.LOCATION_SERVICE); if(locationListener!=null) nolocation(context, toNonNull(Address.BLACKHOLE)); Utils.registerOngoing(context, toNonNull(OngoingEvent.LOCATION)); @@ -1049,7 +1046,7 @@ final class Heavy { */ public static void nolocation(final Context context, final Address replyTo){ Utils.unregisterOngoing(context, toNonNull(OngoingEvent.LOCATION)); - final LocationManager man=(LocationManager) context.getSystemService(Context.LOCATION_SERVICE); + final LocationManager man=(LocationManager) context.getApplicationContext().getSystemService(Context.LOCATION_SERVICE); man.removeUpdates(locationListener); locationListener=null; Utils.sendMessage(context, replyTo, no_longer_listening_for_location_updates);