@@ -31,7 +31,7 @@ public ArrayList<RouteInfoModel> parse() throws ErrorHandling {
3131 } else {
3232 try {
3333 JSONObject json = new JSONObject (result );
34- if (!json .getString ("status" ).equals (KeyConstants .OK )) {
34+ if (!json .getString ("status" ).equals (Constants .OK )) {
3535 throw new ErrorHandling (json );
3636 } else {
3737 JSONArray jsonRoutes = json .getJSONArray ("routes" );
@@ -46,7 +46,7 @@ public ArrayList<RouteInfoModel> parse() throws ErrorHandling {
4646 JSONObject leg = jsonRoute .getJSONArray ("legs" ).getJSONObject (0 );
4747 JSONArray steps = leg .getJSONArray ("steps" );
4848
49- routeInfoModel .setName (leg .getString (KeyConstants .START_ADDRESS ) + " to " + leg .getString (KeyConstants .END_ADDRESS ));
49+ routeInfoModel .setName (leg .getString (Constants .START_ADDRESS ) + " to " + leg .getString (Constants .END_ADDRESS ));
5050 routeInfoModel .setCopyright (jsonRoute .getString ("copyrights" ));
5151 routeInfoModel .setDurationText (leg .getJSONObject ("duration" ).getString ("text" ));
5252 routeInfoModel .setDurationValue (leg .getJSONObject ("duration" ).getInt ("value" ));
@@ -60,7 +60,7 @@ public ArrayList<RouteInfoModel> parse() throws ErrorHandling {
6060
6161 for (int y = 0 ; y < steps .length (); ++y ) {
6262 JSONObject step = steps .getJSONObject (y );
63- JSONObject start = step .getJSONObject (KeyConstants .START_LOCATION );
63+ JSONObject start = step .getJSONObject (Constants .START_LOCATION );
6464 LatLng position = new LatLng (start .getDouble ("lat" ), start .getDouble ("lng" ));
6565 stepsModel .setPoint (position );
6666 int length = step .getJSONObject ("distance" ).getInt ("value" );
0 commit comments