From 4c59d9d1b410e24cb22e7abadfb3e91762caafa8 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sat, 8 Sep 2012 13:20:04 +0200 Subject: [PATCH 1/5] Fix issue 1327, show relative names for poi subcategories --- .../src/net/osmand/osm/MapRenderingTypes.java | 3 ++- OsmAnd/src/net/osmand/OsmAndFormatter.java | 4 ---- .../src/net/osmand/plus/SpecialPhrases.java | 12 ++++++---- .../activities/EditPOIFilterActivity.java | 22 +++++++++++++++++-- 4 files changed, 30 insertions(+), 11 deletions(-) diff --git a/DataExtractionOSM/src/net/osmand/osm/MapRenderingTypes.java b/DataExtractionOSM/src/net/osmand/osm/MapRenderingTypes.java index c97dd162d6..b45a995624 100644 --- a/DataExtractionOSM/src/net/osmand/osm/MapRenderingTypes.java +++ b/DataExtractionOSM/src/net/osmand/osm/MapRenderingTypes.java @@ -12,6 +12,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.TreeMap; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; @@ -218,7 +219,7 @@ public class MapRenderingTypes { for(MapRulType type : types.values()){ if(type.poiCategory != null && type.targetTagValue == null) { if(!amenityTypeNameToTagVal.containsKey(type.poiCategory)) { - amenityTypeNameToTagVal.put(type.poiCategory, new LinkedHashMap()); + amenityTypeNameToTagVal.put(type.poiCategory, new TreeMap()); } String name = type.value; if (name != null) { diff --git a/OsmAnd/src/net/osmand/OsmAndFormatter.java b/OsmAnd/src/net/osmand/OsmAndFormatter.java index fd2a98aae1..1496b58bc2 100644 --- a/OsmAnd/src/net/osmand/OsmAndFormatter.java +++ b/OsmAnd/src/net/osmand/OsmAndFormatter.java @@ -201,10 +201,6 @@ public class OsmAndFormatter { public static String getPoiStringWithoutType(Amenity amenity, boolean en) { String type = SpecialPhrases.getSpecialPhrase(amenity.getSubType()); String n = amenity.getName(en); - - if (type == null) { - type = amenity.getSubType(); - } if (n.indexOf(type) != -1) { // type is contained in name e.g. // n = "Bakery the Corner" diff --git a/OsmAnd/src/net/osmand/plus/SpecialPhrases.java b/OsmAnd/src/net/osmand/plus/SpecialPhrases.java index 437cf53bab..0a7efe919b 100644 --- a/OsmAnd/src/net/osmand/plus/SpecialPhrases.java +++ b/OsmAnd/src/net/osmand/plus/SpecialPhrases.java @@ -26,18 +26,22 @@ public class SpecialPhrases { * * If the language isn't set yet, a nullpointer exception will be thrown * - * @param key the subtype to query + * @param value the subtype to query * @return the special phrase according to the asked key, or "null" if the key isn't found */ - public static String getSpecialPhrase(String key) { + public static String getSpecialPhrase(String value) { if (m == null) { // do not throw exception because OsmAndApplication is not always initiliazed before // this call log.warn("The language has not been set for special phrases"); - return null; + return value; } - return m.get(key); + String specialValue = m.get(value); + if(Algoritms.isEmpty(specialValue)) { + return value; + } + return specialValue; } /** diff --git a/OsmAnd/src/net/osmand/plus/activities/EditPOIFilterActivity.java b/OsmAnd/src/net/osmand/plus/activities/EditPOIFilterActivity.java index 9de4b7bfbf..f9a4ff1d10 100644 --- a/OsmAnd/src/net/osmand/plus/activities/EditPOIFilterActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/EditPOIFilterActivity.java @@ -3,7 +3,10 @@ */ package net.osmand.plus.activities; +import java.text.Collator; import java.text.MessageFormat; +import java.util.Arrays; +import java.util.Comparator; import java.util.LinkedHashSet; import java.util.Set; @@ -16,6 +19,7 @@ import net.osmand.plus.OsmandApplication; import net.osmand.plus.PoiFilter; import net.osmand.plus.PoiFiltersHelper; import net.osmand.plus.R; +import net.osmand.plus.SpecialPhrases; import net.osmand.plus.activities.search.SearchActivity; import net.osmand.plus.activities.search.SearchPOIActivity; import android.app.AlertDialog; @@ -197,8 +201,22 @@ public class EditPOIFilterActivity extends OsmandListActivity { } final String[] array = subCategories.toArray(new String[0]); + final Collator cl = Collator.getInstance(); + cl.setStrength(Collator.SECONDARY); + Arrays.sort(array, 0, array.length, new Comparator() { + + @Override + public int compare(String object1, String object2) { + String v1 = SpecialPhrases.getSpecialPhrase(object1).replace('_', ' '); + String v2 = SpecialPhrases.getSpecialPhrase(object2).replace('_', ' '); + return cl.compare(v1, v2); + } + }); + final String[] visibleNames = new String[array.length]; final boolean[] selected = new boolean[array.length]; - for (int i = 0; i < selected.length; i++) { + + for (int i = 0; i < array.length; i++) { + visibleNames[i] = SpecialPhrases.getSpecialPhrase(array[i]).replace('_', ' '); if (acceptedCategories == null) { selected[i] = true; } else { @@ -239,7 +257,7 @@ public class EditPOIFilterActivity extends OsmandListActivity { } }); - builder.setMultiChoiceItems(array, selected, new DialogInterface.OnMultiChoiceClickListener() { + builder.setMultiChoiceItems(visibleNames, selected, new DialogInterface.OnMultiChoiceClickListener() { @Override public void onClick(DialogInterface dialog, int item, boolean isChecked) { From 8a608c94ad471005d43e00b34d8d50b6c643b178 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sat, 8 Sep 2012 14:52:50 +0200 Subject: [PATCH 2/5] Add debug rendering coastline --- DataExtractionOSM/src/net/osmand/render/default.render.xml | 4 +++- Osmand-kernel/osmand/src/multipolygons.cpp | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/DataExtractionOSM/src/net/osmand/render/default.render.xml b/DataExtractionOSM/src/net/osmand/render/default.render.xml index e567e30a07..2e8b5ece4e 100644 --- a/DataExtractionOSM/src/net/osmand/render/default.render.xml +++ b/DataExtractionOSM/src/net/osmand/render/default.render.xml @@ -216,7 +216,8 @@ - + + @@ -1016,6 +1017,7 @@ + diff --git a/Osmand-kernel/osmand/src/multipolygons.cpp b/Osmand-kernel/osmand/src/multipolygons.cpp index f7b63ceb7f..377839fa25 100644 --- a/Osmand-kernel/osmand/src/multipolygons.cpp +++ b/Osmand-kernel/osmand/src/multipolygons.cpp @@ -57,6 +57,13 @@ bool processCoastlines(std::vector& coastLines, int leftX, int o->types.push_back(tag_value("natural", "coastline_broken")); res.push_back(o); } + // draw completed for debug purpose + for (int i = 0; i < completedRings.size(); i++) { + MapDataObject* o = new MapDataObject(); + o->points = completedRings[i]; + o->types.push_back(tag_value("natural", "coastline_line")); + res.push_back(o); + } } if (!showIfThereIncompleted && uncompletedRings.size() > 0) { From 71797021f42712eed24360fa0e04001f2d36486c Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sun, 9 Sep 2012 17:40:14 +0200 Subject: [PATCH 3/5] Fix touchable area for close button --- .../src/net/osmand/swing/OsmExtractionUI.java | 4 +- .../drawable-hdpi/headline_close_button.png | Bin 797 -> 989 bytes .../headline_close_button_pressed.png | Bin 1339 -> 1690 bytes .../drawable-large/headline_close_button.png | Bin 797 -> 989 bytes .../headline_close_button_pressed.png | Bin 1339 -> 1690 bytes .../drawable-mdpi/headline_close_button.png | Bin 773 -> 792 bytes .../headline_close_button_pressed.png | Bin 1273 -> 1418 bytes ...local_openstreetmap_list_item_category.xml | 1 + OsmAnd/src/net/osmand/AndroidUtils.java | 38 ------------------ .../plus/activities/MainMenuActivity.java | 3 -- .../plus/osmedit/EditingPOIActivity.java | 2 +- 11 files changed, 5 insertions(+), 43 deletions(-) diff --git a/DataExtractionOSM/src/net/osmand/swing/OsmExtractionUI.java b/DataExtractionOSM/src/net/osmand/swing/OsmExtractionUI.java index 3b9595d477..45389458bd 100644 --- a/DataExtractionOSM/src/net/osmand/swing/OsmExtractionUI.java +++ b/DataExtractionOSM/src/net/osmand/swing/OsmExtractionUI.java @@ -90,7 +90,9 @@ public class OsmExtractionUI implements IMapLocationListener { if(!(e instanceof ThreadDeath)){ ExceptionHandler.handle("Error in thread " + t.getName(), e); //$NON-NLS-1$ } - defaultHandler.uncaughtException(t, e); + if(defaultHandler != null){ + defaultHandler.uncaughtException(t, e); + } } }); diff --git a/OsmAnd/res/drawable-hdpi/headline_close_button.png b/OsmAnd/res/drawable-hdpi/headline_close_button.png index 50e3d030f4f950623a49609fe4992b6b1181fb62..99fe44d45eb7543bf1f3d9b524a26c927ea2a440 100644 GIT binary patch literal 989 zcmV<310wv1P)Px#24YJ`L;(K){{a7>y{D4^000Sa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~~fSD`MzGSmfFhPnXDP#0hs>H;i7U4Uh% b3$V;D&J-hazdG|400000NkvXXu0mjfE(dXI diff --git a/OsmAnd/res/drawable-hdpi/headline_close_button_pressed.png b/OsmAnd/res/drawable-hdpi/headline_close_button_pressed.png index 3bcf4c467780c3106fb8e4a02d9a7522231e90ca..a459359baa3e6e2e1b52360bd7718e95f57a2edf 100644 GIT binary patch literal 1690 zcmV;L24(q)P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyq> z4Idl`vzmsmSyYhc6-lLgXMC$P%4#vs#dFY(b3TswOTzQ5{W#Mfkg-b%d*1W-d_2oOP7>= zeSP2e_4OTi)OCVDgW=)f@91mS7hMP>L{`U6v zfn&#xW#Ks9Yc`ut@&YTBN;)<+c40w5L05Wu`XIwF++^0GKp;R2!*F`N-Wd@Qahswj zj;84~j{@WV24Z4jUW|{A?@LZj9`=WIxm@^@ApOk`3k!3nrKJrh6pC@JRx9KM&dkiz zYc!g_LqbA)*6i6cr>7;)({8IQ-<I+TN zw3lHRcSc4AKQNBt$RD@Q4R9Z_lFTuoKJVbd0cZ*p--#v7VhSp9033iqa7!jO5S@_ zUm8AeI`=^=0ssdt1<_jvS=p?(Y5?fx)eZwJo8WLbz;3tu8onTzy|8A?*s#TUxP)K` z?jAab#4sB>kf;onzzZS5hp@!j11u&}Rom@$i?5_krxT=7DL=5s;{k`m0cNw=-;@hV z<-9sDHk3VxjteCrN{)aeFc9MRvH05k>@X5n5B2m|{3RS38Ulu4_<_gA$H8i~g2`m^ z{{fmzUGeepb)orRmN|bYB^ZJOlE8o@?tD0RvDlh#*~>R>RbRc@Z3%?2*=(RvsrZ52 zZZ}vg7LZ6J0TcA}^mM757f+?ST`56Q;X}JAF9NXGZ$jHwbwAw{t1OSI&l@*xfXCzE z|Azbf`vIZAyUFX_r?PV*Zlwrff+lSJFaQuB57tCDZ+8-`o`9dn++m)#5sTY1_uX$<2e3c zo6QCzBO|_-Zj8+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2`; zEpaF^uw#E74sV4JlxSsvfy^K&IXSrl#1pc|M(mc7(KBM|ui{7dBD;!pNqLYLZ5nBV{a002ovPDHLkV1gJ1Zr%U@ diff --git a/OsmAnd/res/drawable-large/headline_close_button.png b/OsmAnd/res/drawable-large/headline_close_button.png index 50e3d030f4f950623a49609fe4992b6b1181fb62..99fe44d45eb7543bf1f3d9b524a26c927ea2a440 100644 GIT binary patch literal 989 zcmV<310wv1P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyq> z4Im9V-H<~700Uh~L_t(o!|m5!Xj@er2k`GX_uO-n+@wv+W)c-`(xsuDc4GBGJLbQM zflB7K?!gC{Ltlz7KKM{Nu?n)ji3)oVe6WIy+Bt?n#$c-mLqyQUt=nANu?`%}lH9bU zOWNF<`}3ilwsV~>O)`Z0eLcSmpL@@}zw^6*6DLlb)GJDz>uVRki-%(YnF)K9-v3g6 zzfbf>1L~Mha(APj5`u0eye;bc{)MQvInpF|%`a9i7$y7sTJ@bF*`I9n3_TvvqTot* zu4sL=SRtz+;GkOxZ;Sa(^(I{L4~B} zX_Sw2MYP_YxMvl1j{70@4d}<8~FstSwB1+~mC(>f{%~j}0!^F(>3La<@ zXbq?}$5stqM)%}0CyuT}mn#I*CP;-r<+aDI3%nNkueCa00f4XTZW;Ub*cYFCnJp}U zZd$Vm_&uA)$j9#u)(X3Ba92d@pE>u#UcuQvwu%7|wuLJ{fA?WqP)*&fd0^EE_EKCQ zda>1m7QYI?*-cL$&;)}=1uxrtPp()Q&o9`&-4$?WNcN}N^r0OI9UUA0Ze1nmhyCnZ zC{O(emD$h~hI`x!0xrf);=7GfW!xyO53SS+JIDRtuMOw*&g46VK>T^@+;OgPf~GJ8 zm(kV|`nI!2O^@dG4YIcKlFRa^7sr985&g zTqvcle)>9<24a*O?4r5paf65+S*uTHe?4i=4zy8mAVyb528oD1YUuDzMABR=r7wN{ zHqBmM8@uutpUIpwr$-Mo9=j4vM4$Z|b|spKhMd1jCr+F=`Tyrn)gOrdw$gG=00000 LNkvXXu0mjf;Oo&3 literal 797 zcmV+&1LFLNP)D7O@CmRS5MZLi1UH?+N{hX=jv9k<=*wtG zob^@0YPS`I1fg?*Aw8QQ(!LnV*Pc2EPrjK&b!wS5|!Iq_t~pjDbJfd;);splLBpB+qMvf_dEqHVovh(yq#9&R;4`#xT@ z@|=@7hJvj@9h~g%g2+b#l5Q|I z&Wwe`sevmJgxLW`YaN7gHwi+nq`M5|D$~~fSD`MzGSmfFhPnXDP#0hs>H;i7U4Uh% b3$V;D&J-hazdG|400000NkvXXu0mjfE(dXI diff --git a/OsmAnd/res/drawable-large/headline_close_button_pressed.png b/OsmAnd/res/drawable-large/headline_close_button_pressed.png index 3bcf4c467780c3106fb8e4a02d9a7522231e90ca..a459359baa3e6e2e1b52360bd7718e95f57a2edf 100644 GIT binary patch literal 1690 zcmV;L24(q)P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyq> z4Idl`vzmsmSyYhc6-lLgXMC$P%4#vs#dFY(b3TswOTzQ5{W#Mfkg-b%d*1W-d_2oOP7>= zeSP2e_4OTi)OCVDgW=)f@91mS7hMP>L{`U6v zfn&#xW#Ks9Yc`ut@&YTBN;)<+c40w5L05Wu`XIwF++^0GKp;R2!*F`N-Wd@Qahswj zj;84~j{@WV24Z4jUW|{A?@LZj9`=WIxm@^@ApOk`3k!3nrKJrh6pC@JRx9KM&dkiz zYc!g_LqbA)*6i6cr>7;)({8IQ-<I+TN zw3lHRcSc4AKQNBt$RD@Q4R9Z_lFTuoKJVbd0cZ*p--#v7VhSp9033iqa7!jO5S@_ zUm8AeI`=^=0ssdt1<_jvS=p?(Y5?fx)eZwJo8WLbz;3tu8onTzy|8A?*s#TUxP)K` z?jAab#4sB>kf;onzzZS5hp@!j11u&}Rom@$i?5_krxT=7DL=5s;{k`m0cNw=-;@hV z<-9sDHk3VxjteCrN{)aeFc9MRvH05k>@X5n5B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E8ds!b2-3 zJkW2_og%+p|3N!7H6<~YFE1~TfFe+38X6kJ+1c56PfrhKjPddD>IK#3n?hS`iQJmH ztW_$N5>vTSQ&S0OZK@1ZMGWf_URYR&nWFW0+jYmvw@Aa-y08FWnW-D*)5ET^_=F9AV#JWB=lwL&hqe_cm zn1qaj6Ydwwt?` zad2=*zIJt7eY06WPH?m$hC&PKLA}sjh`;$k0U912938~fUq3t53gocKO`c1@<^9*%!1=DgS{FqG!{ZrW3*c2`; zEpaF^uw#E74sV4JlxSsvfy^K&IXSrl#1pc|M(mc7(KBM|ui{7dBD;!pNqLYLZ5nBV{a002ovPDHLkV1gJ1Zr%U@ diff --git a/OsmAnd/res/drawable-mdpi/headline_close_button.png b/OsmAnd/res/drawable-mdpi/headline_close_button.png index 562eb6ef57a3be2cb87bb58c64b4a8168a0afb92..89aab11a0076717dd4e7bcc43b26e0448956e7cf 100644 GIT binary patch literal 792 zcmV+z1LypSP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyq> z4I>c+@t@BC00NjvL_t(Y$L*C}NEA^N$IqQRGrKeUHLL5cS>$I)lONfdVfCO``5^TW zmBES>Qbt)lL`p;j6&Qq3FO{K1MGuxA4}#AU6&P3%B^8pED6Ffj&blA7JG-aX3d3Dk z9|V7|=YP-rAMQEl0<5x95ILgLQIht*c&b3Hlz=7CyiB}80$^k*Dan%9Mb8idGG$1{ zvQ%&8h^c0yvA1QH6`dKnGylem9DH?CnMJ8DHh;DXOkN_n=~9Bq&Fc=z4za%3NsrYQ zn!&)+y<=W&-tCVL0RYH0ZeMMI>Dl>mtF%3x*k>br5!IW`Lc%L>tf?oFx z_4%nwmWkI8U_=-g4Tk4KQFVX5(Uiu8V8N6PjH|s*TwmZKgai}lt@y#9a!u{NaG4t! zfEeW=h6o%)A#9g{bKUD=QnMNeA^v5V0ssIan6C`{f-XO@z)}F7C7@~u?*g{>E!W!` z6TLjHCj66ZJsc{4(R16@iUNxoKvV<5^6=@)h`qggQ1PhnX4wpEN#|WB%B0S^V##bK zDuf&|M(lEo&U|CCQboog>8d6ajZFHq!K50<)Wg;c0jiEW%^eL+Nswp=l$1?C>mGK{ z(jz_o$?uiMnGq)6VIVevRE&87d?XCxff#s`GKNok`$|A@m*))M(VL>vpg2l_tGnN+ zw`ZRwghWEVIc@$0bIbCzA9iQ*u%`8DHIujV?T(5)Ka#Qq5m7|MT;I^kkJEP#U|?$W z0V4j@yz0W-S=t>Ju literal 773 zcmV+g1N!`lP)Fy1DPAb8}P54|Gu?eF&z}M8u-hF4_#y$^>&zo0~33N-H8HsX%Jg zMHdYOBZ6+aC_{>%AgHdgqJqe6I-PSLI`?$8ZlZ3sERZh#aL#$2^Lx%Y&z}Q`_|LRz zz}kY#`0S)IXo|~aQ*ynShC&Gq1|%%Ww5t1Y^peuNdqom0|;p_Y$mqs1 zHIf;RRfq4oRM=4=eN>@WRHp==^-kCOK2JGkueKmMl%#+@QDCJ?!?$eBxpAFAtYb7GTt=$GB6Ak&${_@qKiY96?%Ev>rBt^@tgIJI!#ss~yIN zI^6*WIqj)}q{4O$J~`L=(rW1z^|T)V%OMl=beK|us~G?dQ67q#3KuHR{xE5jN9bs zKaq=*u7MX%A3tnJ)h!uB1q;u|UU^3LVd(4BD4DZ<&WQ%+dc3!eqW}JRZya$aS>vQ- z#dvJFEE*2>{wVf)d}(Q^Ef$T`t(`CTZ)w$l{}cWlgv|+_9Se|K00000NkvXXu0mjf DADCvy diff --git a/OsmAnd/res/drawable-mdpi/headline_close_button_pressed.png b/OsmAnd/res/drawable-mdpi/headline_close_button_pressed.png index 50d936409bbbaaec807d844197ef17b51191323f..5ca5cc799fe0b50785c0cbd3fde6f4bf6de5d76c 100644 GIT binary patch literal 1418 zcmV;51$Fv~P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyq> z4I(5;S!%5S00jz3L_t(Y$IVuMOjB1B{_cBy5A1_NwZK+b4Zn5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VO(3 zy*~p0{x@u2etv!oCX?yT;c#9J4Gpb}h=^!LbpL>+kdTndz`($lf`Wn=JRXmh`}_O5 zak<+uK`A(bv~UjgLa-ZS?f?6gM|F*Cr+=wxawMgqE*eyLMe(US8eI z%*=kAi(E)W1oWK79#3?3{^V(l2^|gaG8NX;)I>PtXU?3FP^V;< z3wkboSfP!50%m0#=t=j5qSUD2o42O-VJ_v`_;|kj_4QL%2|u`dkPVfwzLudY{Yrat zvcJDyii_Rkl()3BxXLq)#)qZ%IxBy-6mbAleCQSUfhse0`18w`jwup1d^afe$2bob z6@0kY(|CX0v{*!~-XU*lYI@lz$A4NfFfbrnTwElKMx%Jav?!Q2Th()))f$(MtOii> zp`Q$Zy4O}d9G0+f&I7Z82fuyM@?hQqs`&+zfT}Z_&183Xw^XOo(Q>U;D`{A zRjWy+j&-2XXvhNx4oKB%H7zeHDw1s7x>be`0g;f9Ag0)nxHCOwOSEkNrd8A5=Lezq z82|;xHeSzJ1G_h}N4Lbp<|QQV6gXG02~hoL+3j`Ma6BCV{TW9KveScrMmmr z0P{?^p%KC6sK`>xW&Wu=D=W)YPWZ0$-}8~az8B8D0XI8O-q{?tjmo7XVk9j&O?d3i zr4tXV9~6MTq2_|u3U87UJLClg1@uFdlasU8A-4-eeyalZ)M;wokBN&vLY<8*PLq+6 znqE>_p>A8@^CaO?M|ydA9V{y=+vt?HwY4RCdwa_%sf&QHONF-iqX_MJ!Zj8g9IP@J z49`2|7K>%QQmNEY2iOb9e?bP4g^zwcI=K$H4U@?vY-nisBtAaA!pFx)>gMK_@9yqi z@HnVD#n;!j5byIk+-N${72~?iIq*bMW@l$lPfSc)9336KJT^A=>Eob|o1C2N#COXH jtdDcuL;v$8{CE5TT(vFMs`#Bx00000NkvXXu0mjfZzO17 diff --git a/OsmAnd/res/layout/local_openstreetmap_list_item_category.xml b/OsmAnd/res/layout/local_openstreetmap_list_item_category.xml index 3fd387b730..9a3d72a183 100644 --- a/OsmAnd/res/layout/local_openstreetmap_list_item_category.xml +++ b/OsmAnd/res/layout/local_openstreetmap_list_item_category.xml @@ -4,6 +4,7 @@ android:background="@drawable/tab_menu_item_small"> Date: Sun, 9 Sep 2012 17:41:29 +0200 Subject: [PATCH 4/5] Change log view --- OsmAnd/src/net/osmand/plus/OsmandApplication.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index b443c8bf44..97bc67bde4 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -46,7 +46,6 @@ import android.content.res.Configuration; import android.os.Build; import android.os.Handler; import android.text.format.DateFormat; -import android.util.Log; import android.view.accessibility.AccessibilityManager; import android.widget.Toast; @@ -510,10 +509,10 @@ public class OsmandApplication extends Application { PrintStream printStream = new PrintStream(out); ex.printStackTrace(printStream); StringBuilder msg = new StringBuilder(); - msg.append( - "Exception occured in thread " + thread.toString() + " : "). //$NON-NLS-1$ //$NON-NLS-2$ - append(DateFormat.format("MMMM dd, yyyy h:mm:ss", System.currentTimeMillis())).append("\n"). //$NON-NLS-1$//$NON-NLS-2$ - append(new String(out.toByteArray())); + msg.append("Version " + Version.getFullVersion(OsmandApplication.this)). //$NON-NLS-1$ + append("Exception occured in thread " + thread.toString() + " : "). //$NON-NLS-1$ //$NON-NLS-2$ + append(DateFormat.format("MMMM dd, yyyy h:mm:ss", System.currentTimeMillis())).append("\n"). //$NON-NLS-1$//$NON-NLS-2$ + append(new String(out.toByteArray())); if (file.getParentFile().canWrite()) { BufferedWriter writer = new BufferedWriter(new FileWriter(file, true)); From 3fbc2b001dbc4f85ce07c59fff5fe3ebbca7cf16 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sun, 9 Sep 2012 19:38:26 +0200 Subject: [PATCH 5/5] Fix cloudmade ETA --- OsmAnd/src/net/osmand/plus/routing/RouteProvider.java | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index 5e2abce3c1..f712deccff 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -451,6 +451,7 @@ public class RouteProvider { RouteDirectionInfo last = directions.get(directions.size() - 1); // update speed using time and idstance last.setAverageSpeed((distanceToEnd[last.routePointOffset] - distanceToEnd[offset])/last.getAverageSpeed()); + last.distance = (int) (distanceToEnd[last.routePointOffset] - distanceToEnd[offset]); } // save time as a speed because we don't know distance of the route segment float avgSpeed = time;