This looks like a change in original behavior, doesn't it? Please separate it from this pull-request. We need to test/discuss? 
Is need to be in OsmandPlugin.getEnabledPlugin(PlanningPlugin.class).getPlanningMode() brackets?