This commit is contained in:
Naumov Dmitry 2021-01-17 15:30:30 +05:00
parent f1bdb378ea
commit e9a3a61f2e

View file

@ -148,11 +148,12 @@ public class DownloadOsmandIndexesHelper {
String date = ""; String date = "";
long dateModified = System.currentTimeMillis(); long dateModified = System.currentTimeMillis();
try { try {
ApplicationInfo appInfo = pm.getApplicationInfo(OsmandApplication.class.getPackage().getName(), 0); OsmandApplication app = settings.getContext();
ApplicationInfo appInfo = pm.getApplicationInfo(app.getPackageName(), 0);
dateModified = new File(appInfo.sourceDir).lastModified(); dateModified = new File(appInfo.sourceDir).lastModified();
date = AndroidUtils.formatDate((Context) settings.getContext(), dateModified); date = AndroidUtils.formatDate((Context) settings.getContext(), dateModified);
} catch (NameNotFoundException e) { } catch (NameNotFoundException e) {
//do nothing... log.error(e);
} }
List<AssetEntry> mapping = getBundledAssets(amanager); List<AssetEntry> mapping = getBundledAssets(amanager);
for (AssetEntry asset : mapping) { for (AssetEntry asset : mapping) {