Fix #2215 Added BetaCheckerUtil class and made necessary changes (#2274)

* Fix #2215 Added BetaCheckerUtil class and made necessary changes

* Fix #2215 Fixed formatting error in LogSender class

* Fix #2215 Renamed BetaCheckerUtil to ConfigUtils

* Fix #2215 Fixed formatting in CommonsApplicationModule
This commit is contained in:
Ajinkya Korde 2019-01-08 01:01:00 +05:30 committed by Vivek Maskara
parent cd322d2f57
commit b05b302e65
9 changed files with 39 additions and 24 deletions

View file

@ -41,6 +41,7 @@ import fr.free.nrw.commons.logging.FileLoggingTree;
import fr.free.nrw.commons.logging.LogUtils;
import fr.free.nrw.commons.modifications.ModifierSequenceDao;
import fr.free.nrw.commons.upload.FileUtils;
import fr.free.nrw.commons.utils.ConfigUtils;
import fr.free.nrw.commons.utils.ContributionUtils;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
@ -61,9 +62,6 @@ public class CommonsApplication extends Application {
@Inject @Named("default_preferences") SharedPreferences defaultPrefs;
@Inject @Named("application_preferences") SharedPreferences applicationPrefs;
@Inject @Named("prefs") SharedPreferences otherPrefs;
@Inject
@Named("isBeta")
boolean isBeta;
/**
* Constants begin
@ -139,6 +137,7 @@ public class CommonsApplication extends Application {
*
*/
private void initTimber() {
boolean isBeta = ConfigUtils.isBetaFlavour();
String logFileName = isBeta ? "CommonsBetaAppLogs" : "CommonsAppLogs";
String logDirectory = LogUtils.getLogDirectory(isBeta);
FileLoggingTree tree = new FileLoggingTree(