Add profile params to mode bean

This commit is contained in:
Vitaliy 2020-01-31 16:25:29 +02:00
parent cb6fc92842
commit acddd4f4ff
2 changed files with 16 additions and 1 deletions

View file

@ -593,6 +593,9 @@ public class ApplicationMode {
builder.setIconColor(modeBean.iconColor);
builder.setRoutingProfile(modeBean.routingProfile);
builder.setRouteService(modeBean.routeService);
builder.setLocationIcon(modeBean.locIcon);
builder.setNavigationIcon(modeBean.navIcon);
builder.setOrder(modeBean.order);
return builder;
}
@ -606,6 +609,9 @@ public class ApplicationMode {
mb.parent = parentAppMode != null ? parentAppMode.getStringKey() : null;
mb.routeService = getRouteService();
mb.routingProfile = getRoutingProfile();
mb.locIcon = getLocationIcon();
mb.navIcon = getNavigationIcon();
mb.order = getOrder();
Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create();
return gson.toJson(mb);
}
@ -798,5 +804,11 @@ public class ApplicationMode {
String routingProfile = null;
@Expose
RouteService routeService = RouteService.OSMAND;
@Expose
LocationIcon locIcon = null;
@Expose
NavigationIcon navIcon = null;
@Expose
int order = -1;
}
}

View file

@ -3687,7 +3687,10 @@ public class OsmandSettings {
PARENT_APP_MODE.getId(),
ROUTING_PROFILE.getId(),
ROUTE_SERVICE.getId(),
USER_PROFILE_NAME.getId()
USER_PROFILE_NAME.getId(),
LOCATION_ICON.getId(),
NAVIGATION_ICON.getId(),
APP_MODE_ORDER.getId()
};
public class PreferencesDataStore extends PreferenceDataStore {