// Path: src/main/java/com/aragaer/jtt/astronomy/AstronomyModule.java
// @Module
// public class AstronomyModule {
// 
//     private final Context _context;
// 
//     public AstronomyModule(Context context) {
//         _context = context;
//     }
// 
//     @Provides public SolarEventCalculator provideSolarEventCalculator(LocationHandler locationHandler) {
//         return new SscAdapter(locationHandler);
//     }
// 
//     @Provides public LocationHandler provideLocationHandler() {
//         return new AndroidLocationHandler(_context);
//     }
// }
// 
// Path: src/main/java/com/aragaer/jtt/mechanics/MechanicsModule.java
// @Module
// public class MechanicsModule {
// 
//     private final Context _context;
// 
//     public MechanicsModule(Context context) {
//         _context = context;
//     }
// 
//     @Singleton @Provides public Ticker provideTicker(Clockwork clockwork,
//                                                      Announcer announcer) {
//         return new AndroidTicker(clockwork, announcer);
//     }
// 
//     @Provides public Announcer provideAnnouncer(IntervalProvider provider) {
//         return new AndroidAnnouncer(_context, provider);
//     }
// }
// 
// Path: src/main/java/com/aragaer/jtt/mechanics/Ticker.java
// public interface Ticker {
//     void start();
//     void stop();
// }


import com.aragaer.jtt.astronomy.AstronomyModule;
import com.aragaer.jtt.mechanics.MechanicsModule;
import com.aragaer.jtt.mechanics.Ticker;
import android.app.Service;
import android.content.*;
import android.os.IBinder;
import android.preference.PreferenceManager;
import android.util.Log;
// -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; -*-
// vim: et ts=4 sts=4 sw=4 syntax=java
package com.aragaer.jtt;




public class JttService extends Service implements SharedPreferences.OnSharedPreferenceChangeListener {
    private static final String TAG = "JTT_SERVICE";
    private JttStatus status_notify;
    private Ticker ticker;

    @Override public IBinder onBind(Intent intent) {
        return null;
    }

    @Override public void onCreate() {
        super.onCreate();
        ServiceComponent component = DaggerServiceComponent
                .builder()
                .astronomyModule(new AstronomyModule(this))
                .mechanicsModule(new MechanicsModule(this))
                .build();
        ticker = component.getTicker();
        registerReceiver(on, new IntentFilter(Intent.ACTION_SCREEN_ON));
        registerReceiver(off, new IntentFilter(Intent.ACTION_SCREEN_OFF));
// Path: src/main/java/com/aragaer/jtt/astronomy/AstronomyModule.java
// @Module
// public class AstronomyModule {
// 
//     private final Context _context;
// 
//     public AstronomyModule(Context context) {
//         _context = context;
//     }
// 
//     @Provides public SolarEventCalculator provideSolarEventCalculator(LocationHandler locationHandler) {
//         return new SscAdapter(locationHandler);
//     }
// 
//     @Provides public LocationHandler provideLocationHandler() {
//         return new AndroidLocationHandler(_context);
//     }
// }
// 
// Path: src/main/java/com/aragaer/jtt/mechanics/MechanicsModule.java
// @Module
// public class MechanicsModule {
// 
//     private final Context _context;
// 
//     public MechanicsModule(Context context) {
//         _context = context;
//     }
// 
//     @Singleton @Provides public Ticker provideTicker(Clockwork clockwork,
//                                                      Announcer announcer) {
//         return new AndroidTicker(clockwork, announcer);
//     }
// 
//     @Provides public Announcer provideAnnouncer(IntervalProvider provider) {
//         return new AndroidAnnouncer(_context, provider);
//     }
// }
// 
// Path: src/main/java/com/aragaer/jtt/mechanics/Ticker.java
// public interface Ticker {
//     void start();
//     void stop();
// }


// Path: src/main/java/com/aragaer/jtt/JttService.java
import com.aragaer.jtt.astronomy.AstronomyModule;
import com.aragaer.jtt.mechanics.MechanicsModule;
import com.aragaer.jtt.mechanics.Ticker;
import android.app.Service;
import android.content.*;
import android.os.IBinder;
import android.preference.PreferenceManager;
import android.util.Log;

// -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; -*-
// vim: et ts=4 sts=4 sw=4 syntax=java
package com.aragaer.jtt;




public class JttService extends Service implements SharedPreferences.OnSharedPreferenceChangeListener {
    private static final String TAG = "JTT_SERVICE";
    private JttStatus status_notify;
    private Ticker ticker;

    @Override public IBinder onBind(Intent intent) {
        return null;
    }

    @Override public void onCreate() {
        super.onCreate();
        ServiceComponent component = DaggerServiceComponent
                .builder()
                .astronomyModule(new AstronomyModule(this))
                .mechanicsModule(new MechanicsModule(this))
                .build();
        ticker = component.getTicker();
        registerReceiver(on, new IntentFilter(Intent.ACTION_SCREEN_ON));
        registerReceiver(off, new IntentFilter(Intent.ACTION_SCREEN_OFF));
        Log.i(TAG, "Service created");