mirror of https://github.com/tasks/tasks
Remove ServiceComponent
parent
1804e00568
commit
91e7748263
@ -1,8 +0,0 @@
|
|||||||
package org.tasks.injection;
|
|
||||||
|
|
||||||
import dagger.Subcomponent;
|
|
||||||
|
|
||||||
@Subcomponent(modules = ServiceModule.class)
|
|
||||||
public interface ServiceComponent extends BaseServiceComponent {
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
package org.tasks.injection;
|
|
||||||
|
|
||||||
import dagger.Subcomponent;
|
|
||||||
|
|
||||||
@Subcomponent(modules = ServiceModule.class)
|
|
||||||
public interface ServiceComponent extends BaseServiceComponent {
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,9 +1,13 @@
|
|||||||
package org.tasks.injection;
|
package org.tasks.injection;
|
||||||
|
|
||||||
|
import org.tasks.dashclock.DashClockExtension;
|
||||||
|
|
||||||
import dagger.Component;
|
import dagger.Component;
|
||||||
|
|
||||||
@ApplicationScope
|
@ApplicationScope
|
||||||
@Component(modules = ApplicationModule.class)
|
@Component(modules = ApplicationModule.class)
|
||||||
public interface ApplicationComponent extends BaseApplicationComponent {
|
public interface ApplicationComponent extends BaseApplicationComponent {
|
||||||
SyncAdapterComponent plus(SyncAdapterModule syncAdapterModule);
|
SyncAdapterComponent plus(SyncAdapterModule syncAdapterModule);
|
||||||
|
|
||||||
|
void inject(DashClockExtension dashClockExtension);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,16 +0,0 @@
|
|||||||
package org.tasks.injection;
|
|
||||||
|
|
||||||
import com.google.android.apps.dashclock.api.DashClockExtension;
|
|
||||||
|
|
||||||
public abstract class InjectingDashClockExtension extends DashClockExtension {
|
|
||||||
@Override
|
|
||||||
public void onCreate() {
|
|
||||||
super.onCreate();
|
|
||||||
|
|
||||||
inject(((InjectingApplication) getApplication())
|
|
||||||
.getComponent()
|
|
||||||
.plus(new ServiceModule()));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected abstract void inject(ServiceComponent component);
|
|
||||||
}
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
package org.tasks.injection;
|
|
||||||
|
|
||||||
import org.tasks.dashclock.DashClockExtension;
|
|
||||||
|
|
||||||
import dagger.Subcomponent;
|
|
||||||
|
|
||||||
@Subcomponent(modules = ServiceModule.class)
|
|
||||||
public interface ServiceComponent extends BaseServiceComponent {
|
|
||||||
void inject(DashClockExtension dashClockExtension);
|
|
||||||
}
|
|
||||||
@ -1,15 +1,16 @@
|
|||||||
package org.tasks.injection;
|
package org.tasks.injection;
|
||||||
|
|
||||||
import org.tasks.Tasks;
|
import org.tasks.Tasks;
|
||||||
|
import org.tasks.widget.ScrollableWidgetUpdateService;
|
||||||
|
|
||||||
public interface BaseApplicationComponent {
|
public interface BaseApplicationComponent {
|
||||||
Tasks inject(Tasks tasks);
|
void inject(Tasks tasks);
|
||||||
|
|
||||||
|
void inject(ScrollableWidgetUpdateService scrollableWidgetUpdateService);
|
||||||
|
|
||||||
ActivityComponent plus(ActivityModule module);
|
ActivityComponent plus(ActivityModule module);
|
||||||
|
|
||||||
BroadcastComponent plus(BroadcastModule module);
|
BroadcastComponent plus(BroadcastModule module);
|
||||||
|
|
||||||
IntentServiceComponent plus(IntentServiceModule module);
|
IntentServiceComponent plus(IntentServiceModule module);
|
||||||
|
|
||||||
ServiceComponent plus(ServiceModule serviceModule);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +0,0 @@
|
|||||||
package org.tasks.injection;
|
|
||||||
|
|
||||||
import org.tasks.widget.ScrollableWidgetUpdateService;
|
|
||||||
|
|
||||||
import dagger.Subcomponent;
|
|
||||||
|
|
||||||
public interface BaseServiceComponent {
|
|
||||||
void inject(ScrollableWidgetUpdateService scrollableWidgetUpdateService);
|
|
||||||
}
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
package org.tasks.injection;
|
|
||||||
|
|
||||||
import android.widget.RemoteViewsService;
|
|
||||||
|
|
||||||
public abstract class InjectingRemoteViewsService extends RemoteViewsService {
|
|
||||||
@Override
|
|
||||||
public void onCreate() {
|
|
||||||
super.onCreate();
|
|
||||||
|
|
||||||
inject(((InjectingApplication) getApplication())
|
|
||||||
.getComponent()
|
|
||||||
.plus(new ServiceModule()));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected abstract void inject(ServiceComponent component);
|
|
||||||
}
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
package org.tasks.injection;
|
|
||||||
|
|
||||||
import dagger.Module;
|
|
||||||
|
|
||||||
@Module
|
|
||||||
public class ServiceModule {
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue