From 0f0d7db18f375f4820d0b6641b01de05ddc271b9 Mon Sep 17 00:00:00 2001 From: afischerdev Date: Sun, 7 Nov 2021 13:32:44 +0100 Subject: [PATCH 1/4] Comparison profiles for download --- .../src/main/assets/segments4.zip | Bin 1097 -> 1113 bytes .../src/main/assets/serverconfig.txt | 2 +- misc/profiles2/readme.txt | 4 ++++ 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 misc/profiles2/readme.txt diff --git a/brouter-routing-app/src/main/assets/segments4.zip b/brouter-routing-app/src/main/assets/segments4.zip index b34a879be27a8cbc1f36df41869dea8982fe153e..310b75f71c750a63daf28dc02e22bbce336306ae 100644 GIT binary patch delta 471 zcmX@fag(Dyz?+#xgn@y9gF!7TJ^1PF*YSyr3=Bfd3=9H5(c;vivecsF{JgZxbiI;_ zlBt1?eYXvG_OPFj=XkQqt6|Y{rb@^DS_cR3DZUXxtX}sH>|dXAyxYoFq?J$VTtUae z63h8|4>l-SR4!9^p|Ch8W2YP14@_#!yKl>fVM) z*>fJnOw+TTAS)les{VJ`)a>dXu{W3B(_N*geckWxac*h%_Dw#jlh^hq8P;;jdB=9M zme^ccXb>Uc>vnqH+d$4wYr6jF@2h?KXBn@}w)4iap)s#DX5Q%%vCL_ho$tzOd$qE; zIb&(~zEviA$$YI3?K&rItXeX;A}CeseaXrx_fNP5#;rV`vFC+|Z^A1f&x~-}J delta 455 zcmV;&0XY8I2+0V4P)h>@6aWAK2mmByPg8YLp8`<<007DY000mG0047ka&~2MV{dL| zX=g5UcyyIfL5kxr5WENShlX6o2`qbB$P4zk4+w3k9XFQLqFbKe->>AvVKQ?V1|M9d zs%lED!+v)Fj|IWYEd@aj85JWH(keCeFHr_g5IOlbxQAgc@<$etncP)1rn-bruD zg+PLb)ze1&lY1_T=V9S=1xz5yS56qVX%KNDKyZ>57*rx~Su5;!M%PHGTxJdDv6O6o zPN!aFt|gD2Hh6m2?DuKE3nJ5;ze{Wv`Bf7e{z;~Nhjw+V&6R5R7!i!x4h#8urnp#h zxslv-xwkrh-+y+ji{F%O>e-=oUIbY7}8!w-JjiQAf zZHv;>vMYIy-5@&0E-+n5(Rb#?L?OJWwLp+4J%^71@_)0B0s8?CBxO%ibyA-KQ2_t| x$^w&^127g|4?Zce!PfznUAiQ)!PfyJaxFopos-@JECGL$3j|08ZUX=S008Nb$0Gm$ diff --git a/brouter-routing-app/src/main/assets/serverconfig.txt b/brouter-routing-app/src/main/assets/serverconfig.txt index 61377aa..9128b11 100644 --- a/brouter-routing-app/src/main/assets/serverconfig.txt +++ b/brouter-routing-app/src/main/assets/serverconfig.txt @@ -13,4 +13,4 @@ profiles_url=https://brouter.de/brouter/profiles2/ # these are comma separated arrays check_lookup=lookups.dat -check_profiles=car-eco.brf,car-eco-de.brf,car-eco-suspect_scan.brf,car-fast.brf,car-traffic_analysis.brf,fastbike.brf,fastbike-asia-pacific.brf,fastbike-lowtraffic.brf,fastbike-verylowtraffic.brf,hiking-beta.brf,moped.brf,rail.brf,river.brf,shortest.brf,trekking.brf,vm-forum-liegerad-schnell.brf,vm-forum-velomobil-schnell.brf \ No newline at end of file +check_profiles=car-eco.brf,car-eco-de.brf,car-eco-suspect_scan.brf,car-fast.brf,fastbike.brf,fastbike-asia-pacific.brf,fastbike-lowtraffic.brf,fastbike-verylowtraffic.brf,hiking-beta.brf,moped.brf,rail.brf,river.brf,safety.brf,shortest.brf,trekking.brf,trekking-ignore-cr.brf,trekking-noferries.brf,trekking-nosteps.brf,trekking-steep.brf,vm-forum-liegerad-schnell.brf,vm-forum-velomobil-schnell.brf \ No newline at end of file diff --git a/misc/profiles2/readme.txt b/misc/profiles2/readme.txt new file mode 100644 index 0000000..207b329 --- /dev/null +++ b/misc/profiles2/readme.txt @@ -0,0 +1,4 @@ +NOTE: + +Please copy a profile before you edit it. +The delivered profiles will be overwritten when the lookups.dat changes. \ No newline at end of file From 83693903ee7a4d232bebe572b7fa6cecd23729ae Mon Sep 17 00:00:00 2001 From: afischerdev Date: Sun, 7 Nov 2021 13:40:14 +0100 Subject: [PATCH 2/4] change import path internal coord reader --- .../java/btools/routingapp/CoordinateReaderInternal.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/brouter-routing-app/src/main/java/btools/routingapp/CoordinateReaderInternal.java b/brouter-routing-app/src/main/java/btools/routingapp/CoordinateReaderInternal.java index cfe5b38..7a7927f 100644 --- a/brouter-routing-app/src/main/java/btools/routingapp/CoordinateReaderInternal.java +++ b/brouter-routing-app/src/main/java/btools/routingapp/CoordinateReaderInternal.java @@ -41,9 +41,9 @@ public class CoordinateReaderInternal extends CoordinateReader } else { - internalDir = basedir + "/import"; - tracksdir = "/import/tracks"; - rootdir = "/import"; + internalDir = basedir + "/brouter/import"; + tracksdir = "/brouter/import/tracks"; + rootdir = "/brouter/import"; } } From 78baefcfeb01e57a29342607caddda4b7ffabf10 Mon Sep 17 00:00:00 2001 From: afischerdev Date: Sun, 7 Nov 2021 13:56:21 +0100 Subject: [PATCH 3/4] change migration check --- .../src/main/java/btools/routingapp/BRouterView.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/brouter-routing-app/src/main/java/btools/routingapp/BRouterView.java b/brouter-routing-app/src/main/java/btools/routingapp/BRouterView.java index ada010e..2f630a1 100644 --- a/brouter-routing-app/src/main/java/btools/routingapp/BRouterView.java +++ b/brouter-routing-app/src/main/java/btools/routingapp/BRouterView.java @@ -128,7 +128,8 @@ public class BRouterView extends View File brd = new File( baseDir, "brouter" ); if ( brd.isDirectory() ) { - if (brd.getAbsolutePath().contains("/Android/data/")) { + if ( android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.Q && + !brd.getAbsolutePath().contains("/Android/media/btools.routingapp")) { String message = "(previous basedir " + baseDir + " has to migrate )" ; ( (BRouterActivity) getContext() ).selectBasedir( ( (BRouterActivity) getContext() ).getStorageDirectories(), guessBaseDir(), message ); From 30b2c5d6aace068d8cea45066f048d0972640e27 Mon Sep 17 00:00:00 2001 From: afischerdev Date: Sun, 7 Nov 2021 14:24:16 +0100 Subject: [PATCH 4/4] check rd5 available --- .../src/main/java/btools/routingapp/BInstallerView.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/brouter-routing-app/src/main/java/btools/routingapp/BInstallerView.java b/brouter-routing-app/src/main/java/btools/routingapp/BInstallerView.java index 8bc737d..a610a63 100644 --- a/brouter-routing-app/src/main/java/btools/routingapp/BInstallerView.java +++ b/brouter-routing-app/src/main/java/btools/routingapp/BInstallerView.java @@ -64,6 +64,7 @@ public class BInstallerView extends View private long availableSize; private File baseDir; + private File segmentDir; private boolean isDownloading = false; public static boolean downloadCanceled = false; @@ -301,7 +302,7 @@ public class BInstallerView extends View public void startInstaller() { baseDir = ConfigHelper.getBaseDir( getContext() ); - + segmentDir = new File( baseDir, "brouter/segments4"); try { AssetManager assetManager = getContext().getAssets(); @@ -448,7 +449,9 @@ public class BInstallerView extends View if ( isDownloading ) btnText = "Cancel Download"; else if ( delTiles > 0 ) btnText = "Delete " + delTiles + " tiles"; else if ( rd5Tiles > 0 ) btnText = "Start Download"; - else if ( tilesVisible && rd5Tiles == 0) btnText = "Update all"; + else if ( tilesVisible && + rd5Tiles == 0 && + RoutingHelper.hasDirectoryAnyDatafiles( segmentDir )) btnText = "Update all"; if ( btnText != null ) {