Added updated time to debug info

pull/209/head
M66B 2 years ago
parent 7bedb14dd0
commit 19a179edb8

@ -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 {

@ -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()));

Loading…
Cancel
Save