mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 14:53:59 +01:00 
			
		
		
		
	Refactoring based on comments
This commit is contained in:
		
							parent
							
								
									e1afa6081e
								
							
						
					
					
						commit
						eb3e448452
					
				
					 17 changed files with 51 additions and 103 deletions
				
			
		|  | @ -1,10 +0,0 @@ | |||
| package fr.free.nrw.commons.di; | ||||
| 
 | ||||
| import java.lang.annotation.Retention; | ||||
| import java.lang.annotation.RetentionPolicy; | ||||
| 
 | ||||
| import javax.inject.Qualifier; | ||||
| 
 | ||||
| @Qualifier | ||||
| @Retention(RetentionPolicy.RUNTIME) | ||||
| public @interface ApplicationContext {} | ||||
|  | @ -29,18 +29,12 @@ public class ApplicationlessInjection | |||
| 
 | ||||
|     private static ApplicationlessInjection instance = null; | ||||
| 
 | ||||
|     @Inject | ||||
|     DispatchingAndroidInjector<Activity> activityInjector; | ||||
|     @Inject | ||||
|     DispatchingAndroidInjector<BroadcastReceiver> broadcastReceiverInjector; | ||||
|     @Inject | ||||
|     DispatchingAndroidInjector<android.app.Fragment> fragmentInjector; | ||||
|     @Inject | ||||
|     DispatchingAndroidInjector<Fragment> supportFragmentInjector; | ||||
|     @Inject | ||||
|     DispatchingAndroidInjector<Service> serviceInjector; | ||||
|     @Inject | ||||
|     DispatchingAndroidInjector<ContentProvider> contentProviderInjector; | ||||
|     @Inject DispatchingAndroidInjector<Activity> activityInjector; | ||||
|     @Inject DispatchingAndroidInjector<BroadcastReceiver> broadcastReceiverInjector; | ||||
|     @Inject DispatchingAndroidInjector<android.app.Fragment> fragmentInjector; | ||||
|     @Inject DispatchingAndroidInjector<Fragment> supportFragmentInjector; | ||||
|     @Inject DispatchingAndroidInjector<Service> serviceInjector; | ||||
|     @Inject DispatchingAndroidInjector<ContentProvider> contentProviderInjector; | ||||
| 
 | ||||
|     private CommonsApplicationComponent commonsApplicationComponent; | ||||
| 
 | ||||
|  |  | |||
|  | @ -12,7 +12,7 @@ import dagger.android.AndroidInjector; | |||
| import dagger.android.DispatchingAndroidInjector; | ||||
| import dagger.android.support.HasSupportFragmentInjector; | ||||
| 
 | ||||
| public abstract class FixedDaggerAppCompatActivity extends AppCompatActivity implements HasSupportFragmentInjector { | ||||
| public abstract class CommonsDaggerAppCompatActivity extends AppCompatActivity implements HasSupportFragmentInjector { | ||||
| 
 | ||||
|     @Inject | ||||
|     DispatchingAndroidInjector<Fragment> supportFragmentInjector; | ||||
|  | @ -6,9 +6,9 @@ import android.content.Intent; | |||
| 
 | ||||
| import dagger.android.AndroidInjector; | ||||
| 
 | ||||
| public abstract class FixedDaggerBroadcastReceiver extends BroadcastReceiver { | ||||
| public abstract class CommonsDaggerBroadcastReceiver extends BroadcastReceiver { | ||||
| 
 | ||||
|     public FixedDaggerBroadcastReceiver() { | ||||
|     public CommonsDaggerBroadcastReceiver() { | ||||
|         super(); | ||||
|     } | ||||
| 
 | ||||
|  | @ -5,9 +5,9 @@ import android.content.ContentProvider; | |||
| import dagger.android.AndroidInjector; | ||||
| 
 | ||||
| 
 | ||||
| public abstract class FixedDaggerContentProvider extends ContentProvider { | ||||
| public abstract class CommonsDaggerContentProvider extends ContentProvider { | ||||
| 
 | ||||
|     public FixedDaggerContentProvider() { | ||||
|     public CommonsDaggerContentProvider() { | ||||
|         super(); | ||||
|     } | ||||
| 
 | ||||
|  | @ -5,9 +5,9 @@ import android.app.Service; | |||
| 
 | ||||
| import dagger.android.AndroidInjector; | ||||
| 
 | ||||
| public abstract class FixedDaggerIntentService extends IntentService { | ||||
| public abstract class CommonsDaggerIntentService extends IntentService { | ||||
| 
 | ||||
|     public FixedDaggerIntentService(String name) { | ||||
|     public CommonsDaggerIntentService(String name) { | ||||
|         super(name); | ||||
|     } | ||||
| 
 | ||||
|  | @ -4,9 +4,9 @@ import android.app.Service; | |||
| 
 | ||||
| import dagger.android.AndroidInjector; | ||||
| 
 | ||||
| public abstract class FixedDaggerService extends Service { | ||||
| public abstract class CommonsDaggerService extends Service { | ||||
| 
 | ||||
|     public FixedDaggerService() { | ||||
|     public CommonsDaggerService() { | ||||
|         super(); | ||||
|     } | ||||
| 
 | ||||
|  | @ -10,7 +10,7 @@ import dagger.android.AndroidInjector; | |||
| import dagger.android.DispatchingAndroidInjector; | ||||
| import dagger.android.support.HasSupportFragmentInjector; | ||||
| 
 | ||||
| public abstract class FixedDaggerFragment extends Fragment implements HasSupportFragmentInjector { | ||||
| public abstract class CommonsDaggerSupportFragment extends Fragment implements HasSupportFragmentInjector { | ||||
| 
 | ||||
|     @Inject | ||||
|     DispatchingAndroidInjector<Fragment> childFragmentInjector; | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 maskara
						maskara