forked from organicmaps/organicmaps
[android] Disclaimer fix
Signed-off-by: Andrew Shkrob <andrew.shkrob.social@yandex.by>
This commit is contained in:
parent
bcccd37a7d
commit
be4b458a0a
2 changed files with 5 additions and 10 deletions
android/src/app/organicmaps
|
@ -1581,7 +1581,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onShowDisclaimer()
|
||||
public void onShowDisclaimer(@Nullable MapObject startPoint, @Nullable MapObject endPoint)
|
||||
{
|
||||
final StringBuilder builder = new StringBuilder();
|
||||
for (int resId : new int[] { R.string.dialog_routing_disclaimer_priority, R.string.dialog_routing_disclaimer_precision,
|
||||
|
@ -1596,7 +1596,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
.setNegativeButton(R.string.decline, null)
|
||||
.setPositiveButton(R.string.accept, (dlg, which) -> {
|
||||
Config.acceptRoutingDisclaimer();
|
||||
RoutingController.get().prepare();
|
||||
RoutingController.get().prepare(startPoint, endPoint);
|
||||
})
|
||||
.show();
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ public class RoutingController implements Initializable<Void>
|
|||
default boolean isSubwayEnabled() { return false; }
|
||||
default void onCommonBuildError(int lastResultCode, @NonNull String[] lastMissingMaps) {}
|
||||
default void onDrivingOptionsBuildError() {}
|
||||
default void onShowDisclaimer() {}
|
||||
default void onShowDisclaimer(@Nullable MapObject startPoint, @Nullable MapObject endPoint) {}
|
||||
default void onSuggestRebuildRoute() {}
|
||||
|
||||
/**
|
||||
|
@ -164,7 +164,7 @@ public class RoutingController implements Initializable<Void>
|
|||
private final Framework.RoutingLoadPointsListener mRoutingLoadPointsListener =
|
||||
success -> {
|
||||
if (success)
|
||||
prepare();
|
||||
prepare(getStartPoint(), getEndPoint());
|
||||
};
|
||||
|
||||
public static RoutingController get()
|
||||
|
@ -353,11 +353,6 @@ public class RoutingController implements Initializable<Void>
|
|||
prepare(getStartPoint(), getEndPoint(), false);
|
||||
}
|
||||
|
||||
public void prepare()
|
||||
{
|
||||
prepare(getStartPoint(), getEndPoint());
|
||||
}
|
||||
|
||||
public void prepare(@Nullable MapObject startPoint, @Nullable MapObject endPoint)
|
||||
{
|
||||
prepare(startPoint, endPoint, false);
|
||||
|
@ -370,7 +365,7 @@ public class RoutingController implements Initializable<Void>
|
|||
if (!Config.isRoutingDisclaimerAccepted())
|
||||
{
|
||||
if (mContainer != null)
|
||||
mContainer.onShowDisclaimer();
|
||||
mContainer.onShowDisclaimer(startPoint, endPoint);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue