Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2015-12-14 01:31:26 +01:00
commit d565429cc6
3 changed files with 20 additions and 4 deletions

View file

@ -74,7 +74,6 @@ public class Reshaper {
} }
} }
/*
public static void main(String[] args) { public static void main(String[] args) {
// char[] c = new char[] {'א', 'ד','ם', ' ', '1', '2'} ; // char[] c = new char[] {'א', 'ד','ם', ' ', '1', '2'} ;
// String reshape = "אדם"; // String reshape = "אדם";
@ -83,6 +82,16 @@ public class Reshaper {
for(int i=0; i < reshape.length(); i++) { for(int i=0; i < reshape.length(); i++) {
System.out.println(reshape.charAt(i)); System.out.println(reshape.charAt(i));
} }
}*/ test2();
}
private static void test2() {
String s = "گچ پژ نمکی باللغة العربي";
String reshape = reshape(s);
if (!reshape.equals("ﻲﺑﺮﻌﻟﺍ ﺔﻐﻠﻟﺎﺑ ﯽﮑﻤﻧ ﮋﭘ ﭻﮔ")) {
throw new IllegalArgumentException("BUG!!!");
}
}
} }

View file

@ -173,8 +173,8 @@ public class RouteCalculationResult {
private static void attachAlarmInfo(List<AlarmInfo> alarms, RouteSegmentResult res, int intId, int locInd) { private static void attachAlarmInfo(List<AlarmInfo> alarms, RouteSegmentResult res, int intId, int locInd) {
int[] pointTypes = res.getObject().getPointTypes(intId); int[] pointTypes = res.getObject().getPointTypes(intId);
RouteRegion reg = res.getObject().region;
if (pointTypes != null) { if (pointTypes != null) {
RouteRegion reg = res.getObject().region;
for (int r = 0; r < pointTypes.length; r++) { for (int r = 0; r < pointTypes.length; r++) {
RouteTypeRule typeRule = reg.quickGetEncodingRule(pointTypes[r]); RouteTypeRule typeRule = reg.quickGetEncodingRule(pointTypes[r]);
int x31 = res.getObject().getPoint31XTile(intId); int x31 = res.getObject().getPoint31XTile(intId);
@ -261,6 +261,12 @@ public class RouteCalculationResult {
String description = toString(turn, ctx) + " " + RoutingHelper.formatStreetName(info.getStreetName(), String description = toString(turn, ctx) + " " + RoutingHelper.formatStreetName(info.getStreetName(),
info.getRef(), info.getDestinationName()); info.getRef(), info.getDestinationName());
String[] pointNames = s.getObject().getPointNames(s.getStartPointIndex());
if(pointNames != null) {
for (int t = 0; t < pointNames.length; t++) {
description += " " + pointNames[t];
}
}
info.setDescriptionRoute(description); info.setDescriptionRoute(description);
info.routePointOffset = prevLocationSize; info.routePointOffset = prevLocationSize;
if(directions.size() > 0 && prevDirectionTime > 0 && prevDirectionDistance > 0) { if(directions.size() > 0 && prevDirectionTime > 0 && prevDirectionDistance > 0) {

View file

@ -1,6 +1,8 @@
package net.osmand.parkingPlugin; package net.osmand.parkingPlugin;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog;
import android.content.ActivityNotFoundException; import android.content.ActivityNotFoundException;
import android.content.ComponentName; import android.content.ComponentName;
import android.content.DialogInterface; import android.content.DialogInterface;
@ -9,7 +11,6 @@ import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo; import android.content.pm.ResolveInfo;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.app.AlertDialog;
public class ParkingPluginActivity extends Activity { public class ParkingPluginActivity extends Activity {
private static final String OSMAND_COMPONENT = "net.osmand"; //$NON-NLS-1$ private static final String OSMAND_COMPONENT = "net.osmand"; //$NON-NLS-1$