1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-03-15 08:29:24 +00:00

Added updated time to debug info

This commit is contained in:
M66B 2022-07-20 22:10:07 +02:00
parent 7bedb14dd0
commit 19a179edb8
2 changed files with 13 additions and 0 deletions

View file

@ -1155,6 +1155,18 @@ public class Helper {
return 0;
}
static long getUpdateTime(Context context) {
try {
PackageManager pm = context.getPackageManager();
PackageInfo pi = pm.getPackageInfo(BuildConfig.APPLICATION_ID, 0);
if (pi != null)
return pi.lastUpdateTime;
} catch (Throwable ex) {
Log.e(ex);
}
return 0;
}
static int getTargetSdk(Context context) {
if (targetSdk == null)
try {

View file

@ -1873,6 +1873,7 @@ public class Log {
sb.append(String.format("Installer: %s\r\n", installer));
sb.append(String.format("Installed: %s\r\n", new Date(Helper.getInstallTime(context))));
sb.append(String.format("Updated: %s\r\n", new Date(Helper.getUpdateTime(context))));
sb.append(String.format("Last cleanup: %s\r\n", new Date(last_cleanup)));
sb.append(String.format("Now: %s\r\n", new Date()));