mirror of
https://github.com/etesync/android
synced 2024-12-23 15:18:14 +00:00
BuildConfig: use build time instead of current time for timestamp
This commit is contained in:
parent
b63fc70cfb
commit
9dbc32d30b
@ -20,7 +20,7 @@ android {
|
||||
versionCode 86
|
||||
versionName "0.9.1.2"
|
||||
|
||||
buildConfigField "java.util.Date", "buildTime", "new java.util.Date()"
|
||||
buildConfigField "long", "buildTime", System.currentTimeMillis() + "L"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
|
@ -26,6 +26,7 @@ import java.io.IOException;
|
||||
import java.io.StringReader;
|
||||
import java.net.CookieManager;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@ -40,7 +41,7 @@ public class HttpClient extends OkHttpClient {
|
||||
|
||||
static final String userAgent;
|
||||
static {
|
||||
String date = new SimpleDateFormat("yyyy/MM/dd", Locale.US).format(BuildConfig.buildTime);
|
||||
String date = new SimpleDateFormat("yyyy/MM/dd", Locale.US).format(new Date(BuildConfig.buildTime));
|
||||
userAgent = "DAVdroid/" + BuildConfig.VERSION_NAME + " (" + date + "; dav4android) Android/" + Build.VERSION.RELEASE;
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,7 @@ import org.apache.commons.lang3.text.WordUtils;
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
|
||||
import at.bitfire.dav4android.exception.HttpException;
|
||||
import at.bitfire.davdroid.BuildConfig;
|
||||
@ -191,7 +192,7 @@ public class DebugInfoActivity extends Activity implements LoaderManager.LoaderC
|
||||
} catch(PackageManager.NameNotFoundException e) {}
|
||||
report.append(
|
||||
"SOFTWARE INFORMATION\n" +
|
||||
"DAVdroid version: " + BuildConfig.VERSION_NAME + " (" + BuildConfig.VERSION_CODE + ") " + BuildConfig.buildTime.toString() + "\n" +
|
||||
"DAVdroid version: " + BuildConfig.VERSION_NAME + " (" + BuildConfig.VERSION_CODE + ") " + new Date(BuildConfig.buildTime) + "\n" +
|
||||
"Installed from: " + installedFrom + "\n" +
|
||||
"JB Workaround installed: " + (workaroundInstalled ? "yes" : "no") + "\n\n"
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user