]> iEval git - fonbot.git/blobdiff - src/ro/ieval/fonbot/Heavy.java
Remove the SHUTDOWN command
[fonbot.git] / src / ro / ieval / fonbot / Heavy.java
index f734437f4c452d8c3ee8dc11f25db109dbfa11f1..3af6bc463e6da2b1e236048c7a67ba4360213ff3 100644 (file)
@@ -166,6 +166,7 @@ final class Heavy {
                        final Date locationDate=new Date(loc.getTime());
                        sb.append(" ");
                        sb.append(toNonNull(context.getString(at)));
+                       sb.append(" ");
                        sb.append(locationDate.toString());
                        Utils.sendMessage(toNonNull(context), toNonNull(replyTo), toNonNull(sb.toString()));
                }
@@ -460,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);
                }
@@ -938,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));
@@ -1048,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);
This page took 0.023978 seconds and 4 git commands to generate.