disables log
This commit is contained in:
parent
86758eb1d0
commit
31440720d0
|
@ -41,6 +41,7 @@ android {
|
||||||
|
|
||||||
buildConfigField 'boolean', 'LEAK_CANARY_ENABLED', 'Boolean.parseBoolean("false")'
|
buildConfigField 'boolean', 'LEAK_CANARY_ENABLED', 'Boolean.parseBoolean("false")'
|
||||||
buildConfigField 'boolean', 'SHOW_CUSTOM_TOKEN_DIALOG', 'Boolean.parseBoolean("false")'
|
buildConfigField 'boolean', 'SHOW_CUSTOM_TOKEN_DIALOG', 'Boolean.parseBoolean("false")'
|
||||||
|
buildConfigField 'boolean', 'HOTMOBI_LOG_ENABLED', 'Boolean.parseBoolean("false")'
|
||||||
|
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,6 +128,7 @@ public class HotMobiLogger implements HotMobiConstants {
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T extends LogModel> void log(UserKey accountId, final T event, final PreProcessing<T> preProcessing) {
|
public <T extends LogModel> void log(UserKey accountId, final T event, final PreProcessing<T> preProcessing) {
|
||||||
|
if (!BuildConfig.HOTMOBI_LOG_ENABLED) return;
|
||||||
mExecutor.execute(new WriteLogTask<>(mApplication, accountId, event, preProcessing));
|
mExecutor.execute(new WriteLogTask<>(mApplication, accountId, event, preProcessing));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,6 +149,7 @@ public class HotMobiLogger implements HotMobiConstants {
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T extends LogModel> void logList(List<T> events, UserKey accountId, String type, final PreProcessing<T> preProcessing) {
|
public <T extends LogModel> void logList(List<T> events, UserKey accountId, String type, final PreProcessing<T> preProcessing) {
|
||||||
|
if (!BuildConfig.HOTMOBI_LOG_ENABLED) return;
|
||||||
mExecutor.execute(new WriteLogTask<>(mApplication, accountId, type, events, preProcessing));
|
mExecutor.execute(new WriteLogTask<>(mApplication, accountId, type, events, preProcessing));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class UploadLogsTask implements Runnable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
if (!BuildConfig.HOTMOBI_LOG_ENABLED) return;
|
||||||
final SharedPreferences prefs = context.getSharedPreferences(HotMobiConstants.SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE);
|
final SharedPreferences prefs = context.getSharedPreferences(HotMobiConstants.SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE);
|
||||||
|
|
||||||
if (prefs.contains(HotMobiConstants.KEY_LAST_UPLOAD_TIME)) {
|
if (prefs.contains(HotMobiConstants.KEY_LAST_UPLOAD_TIME)) {
|
||||||
|
|
Loading…
Reference in New Issue