From e9a3a61f2e7a630fde7647aa3ff58b4dd6132448 Mon Sep 17 00:00:00 2001 From: Naumov Dmitry Date: Sun, 17 Jan 2021 15:30:30 +0500 Subject: [PATCH] Fix #10464 --- .../osmand/plus/download/DownloadOsmandIndexesHelper.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java b/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java index f6381b3552..d77245cecb 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java @@ -148,11 +148,12 @@ public class DownloadOsmandIndexesHelper { String date = ""; long dateModified = System.currentTimeMillis(); 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(); date = AndroidUtils.formatDate((Context) settings.getContext(), dateModified); } catch (NameNotFoundException e) { - //do nothing... + log.error(e); } List mapping = getBundledAssets(amanager); for (AssetEntry asset : mapping) {