File tree Expand file tree Collapse file tree
onebusaway-android/src/main/java/org/onebusaway/android/io/request/survey Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88import org .onebusaway .android .R ;
99import org .onebusaway .android .app .Application ;
10+ import org .onebusaway .android .io .elements .ObaRegion ;
1011import org .onebusaway .android .io .request .RequestBase ;
1112import org .onebusaway .android .io .request .survey .model .StudyResponse ;
1213import org .onebusaway .android .ui .survey .SurveyPreferences ;
@@ -28,7 +29,9 @@ public static class Builder {
2829 private static Uri URI = null ;
2930
3031 public Builder (Context context ) {
31- String baseUrl = Application .get ().getCurrentRegion ().getSidecarBaseUrl ();
32+ ObaRegion region = Application .get ().getCurrentRegion ();
33+ if (region == null ) return ;
34+ String baseUrl = region .getSidecarBaseUrl ();
3235 if (baseUrl == null ) return ;
3336 String studyAPIURL = baseUrl + Application .get ().getResources ().getString (R .string .studies_api_endpoint );
3437 studyAPIURL = studyAPIURL .replace ("regionID" , String .valueOf (Application .get ().getCurrentRegion ().getId ()));
You can’t perform that action at this time.
0 commit comments