mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-30 22:34:02 +01:00 
			
		
		
		
	Fix conflict between different product flavors (#1726)
* Fix conflict between different product flavors so that beta and prod apps could coexist * Fix category content provider
This commit is contained in:
		
							parent
							
								
									2d831c089d
								
							
						
					
					
						commit
						25b463901f
					
				
					 21 changed files with 120 additions and 101 deletions
				
			
		|  | @ -107,7 +107,7 @@ public  class       ContributionsActivity | |||
|     @Override | ||||
|     protected void onAuthCookieAcquired(String authCookie) { | ||||
|         // Do a sync everytime we get here! | ||||
|         requestSync(sessionManager.getCurrentAccount(), ContributionsContentProvider.CONTRIBUTION_AUTHORITY, new Bundle()); | ||||
|         requestSync(sessionManager.getCurrentAccount(), BuildConfig.CONTRIBUTION_AUTHORITY, new Bundle()); | ||||
|         Intent uploadServiceIntent = new Intent(this, UploadService.class); | ||||
|         uploadServiceIntent.setAction(UploadService.ACTION_START_SERVICE); | ||||
|         startService(uploadServiceIntent); | ||||
|  |  | |||
|  | @ -11,6 +11,7 @@ import android.text.TextUtils; | |||
| 
 | ||||
| import javax.inject.Inject; | ||||
| 
 | ||||
| import fr.free.nrw.commons.BuildConfig; | ||||
| import fr.free.nrw.commons.data.DBOpenHelper; | ||||
| import fr.free.nrw.commons.di.CommonsDaggerContentProvider; | ||||
| import timber.log.Timber; | ||||
|  | @ -25,13 +26,12 @@ public class ContributionsContentProvider extends CommonsDaggerContentProvider { | |||
|     private static final int CONTRIBUTIONS_ID = 2; | ||||
|     private static final String BASE_PATH = "contributions"; | ||||
|     private static final UriMatcher uriMatcher = new UriMatcher(NO_MATCH); | ||||
|     public static final String CONTRIBUTION_AUTHORITY = "fr.free.nrw.commons.contributions.contentprovider"; | ||||
| 
 | ||||
|     public static final Uri BASE_URI = Uri.parse("content://" + CONTRIBUTION_AUTHORITY + "/" + BASE_PATH); | ||||
|     public static final Uri BASE_URI = Uri.parse("content://" + BuildConfig.CONTRIBUTION_AUTHORITY + "/" + BASE_PATH); | ||||
| 
 | ||||
|     static { | ||||
|         uriMatcher.addURI(CONTRIBUTION_AUTHORITY, BASE_PATH, CONTRIBUTIONS); | ||||
|         uriMatcher.addURI(CONTRIBUTION_AUTHORITY, BASE_PATH + "/#", CONTRIBUTIONS_ID); | ||||
|         uriMatcher.addURI(BuildConfig.CONTRIBUTION_AUTHORITY, BASE_PATH, CONTRIBUTIONS); | ||||
|         uriMatcher.addURI(BuildConfig.CONTRIBUTION_AUTHORITY, BASE_PATH + "/#", CONTRIBUTIONS_ID); | ||||
|     } | ||||
| 
 | ||||
|     public static Uri uriForId(int id) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Vivek Maskara
						Vivek Maskara