Fix exception
This commit is contained in:
parent
ceded9c1fa
commit
3cd5fac71c
6 changed files with 26 additions and 16 deletions
|
@ -398,14 +398,17 @@ public class ResourceManager {
|
||||||
file.mkdirs();
|
file.mkdirs();
|
||||||
List<String> warnings = new ArrayList<String>();
|
List<String> warnings = new ArrayList<String>();
|
||||||
if (file.exists() && file.canRead()) {
|
if (file.exists() && file.canRead()) {
|
||||||
for (File f : file.listFiles()) {
|
File[] lf = file.listFiles();
|
||||||
if(f.isDirectory()) {
|
if (lf != null) {
|
||||||
File conf = new File(f, "_config.p");
|
for (File f : lf) {
|
||||||
if(!conf.exists()) {
|
if (f.isDirectory()) {
|
||||||
conf = new File(f, "_ttsconfig.p");
|
File conf = new File(f, "_config.p");
|
||||||
}
|
if (!conf.exists()) {
|
||||||
if(conf.exists()) {
|
conf = new File(f, "_ttsconfig.p");
|
||||||
indexFileNames.put(f.getName(), MessageFormat.format("{0,date,dd.MM.yyyy}", new Date(conf.lastModified()))); //$NON-NLS-1$
|
}
|
||||||
|
if (conf.exists()) {
|
||||||
|
indexFileNames.put(f.getName(), MessageFormat.format("{0,date,dd.MM.yyyy}", new Date(conf.lastModified()))); //$NON-NLS-1$
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -411,9 +411,12 @@ public class DownloadIndexActivity extends OsmandExpandableListActivity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (IndexItem file : downloadListIndexThread.getCachedIndexFiles()) {
|
List<IndexItem> cachedIndexFiles = downloadListIndexThread.getCachedIndexFiles();
|
||||||
if (file.getType() == type) {
|
if (cachedIndexFiles != null) {
|
||||||
filtered.add(file);
|
for (IndexItem file : cachedIndexFiles) {
|
||||||
|
if (file.getType() == type) {
|
||||||
|
filtered.add(file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return filtered;
|
return filtered;
|
||||||
|
|
|
@ -1238,7 +1238,9 @@ public class MapActivity extends AccessibleActivity implements IMapLocationListe
|
||||||
|| settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_COMPASS ? OsmandSettings.BOTTOM_CONSTANT :
|
|| settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_COMPASS ? OsmandSettings.BOTTOM_CONSTANT :
|
||||||
OsmandSettings.CENTER_CONSTANT);
|
OsmandSettings.CENTER_CONSTANT);
|
||||||
registerUnregisterSensor(getLastKnownLocation(), false);
|
registerUnregisterSensor(getLastKnownLocation(), false);
|
||||||
mapLayers.getMapInfoLayer().recreateControls();
|
if (mapLayers.getMapInfoLayer() != null) {
|
||||||
|
mapLayers.getMapInfoLayer().recreateControls();
|
||||||
|
}
|
||||||
mapLayers.updateLayers(mapView);
|
mapLayers.updateLayers(mapView);
|
||||||
|
|
||||||
getMyApplication().getDaynightHelper().setDayNightMode(settings.DAYNIGHT_MODE.get());
|
getMyApplication().getDaynightHelper().setDayNightMode(settings.DAYNIGHT_MODE.get());
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class SearchBuildingByNameActivity extends SearchByNameAbstractActivity<B
|
||||||
setLabelText(R.string.incremental_search_building);
|
setLabelText(R.string.incremental_search_building);
|
||||||
progress.setVisibility(View.INVISIBLE);
|
progress.setVisibility(View.INVISIBLE);
|
||||||
finishInitializing(result);
|
finishInitializing(result);
|
||||||
if (result.isEmpty()) {
|
if (result == null || result.isEmpty()) {
|
||||||
Toast.makeText(SearchBuildingByNameActivity.this,
|
Toast.makeText(SearchBuildingByNameActivity.this,
|
||||||
R.string.no_buildings_found, Toast.LENGTH_LONG).show();
|
R.string.no_buildings_found, Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
|
|
|
@ -587,8 +587,9 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
||||||
mediaRec.release();
|
mediaRec.release();
|
||||||
mediaRec = null;
|
mediaRec = null;
|
||||||
}
|
}
|
||||||
setRecordListener(recordControl, mapActivity);
|
if (recordControl != null) {
|
||||||
app.getSettings().SHOW_RECORDINGS.set(true);
|
setRecordListener(recordControl, mapActivity);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -739,6 +740,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
||||||
par.removeView(recordControl);
|
par.removeView(recordControl);
|
||||||
}
|
}
|
||||||
stopRecording(mapActivity);
|
stopRecording(mapActivity);
|
||||||
|
app.getSettings().SHOW_RECORDINGS.set(true);
|
||||||
indexFile(f);
|
indexFile(f);
|
||||||
mapActivity.getMapView().refreshMap();
|
mapActivity.getMapView().refreshMap();
|
||||||
}
|
}
|
||||||
|
|
|
@ -209,7 +209,7 @@ public class OsmandMapTileView extends SurfaceView implements IMapDownloaderCall
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void removeLayer(OsmandMapLayer layer) {
|
public synchronized void removeLayer(OsmandMapLayer layer) {
|
||||||
layers.remove(layer);
|
while(layers.remove(layer));
|
||||||
zOrders.remove(layer);
|
zOrders.remove(layer);
|
||||||
layer.destroyLayer();
|
layer.destroyLayer();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue