[android][drape] Don't show "location timeout" in NotFollowNoPosition #6466

Merged
root merged 1 commit from rt-android-fix-location-timeout-dialog into master 2023-11-05 12:55:10 +00:00
2 changed files with 8 additions and 2 deletions

View file

@ -1979,6 +1979,12 @@ public class MwmActivity extends BaseMwmFragmentActivity
return;
}
if (LocationState.nativeGetMode() == LocationState.NOT_FOLLOW_NO_POSITION)
{
Logger.d(LOCATION_TAG, "Don't show 'location timeout' error dialog in NOT_FOLLOW_NO_POSITION mode");
return;
}
Logger.d(LOCATION_TAG, "services = " + LocationUtils.areLocationServicesTurnedOn(this));
//

View file

@ -659,7 +659,7 @@ void MyPositionController::ChangeMode(location::EMyPositionMode newMode)
m_pendingTimer.Reset();
m_pendingStarted = true;
}
else if (newMode != location::NotFollowNoPosition)
else
{
m_pendingStarted = false;
}
@ -922,7 +922,7 @@ void MyPositionController::DeactivateRouting()
void MyPositionController::CheckIsWaitingForLocation()
{
if (IsWaitingForLocation() || m_mode == location::NotFollowNoPosition)
if (IsWaitingForLocation())
{
CHECK_ON_TIMEOUT(m_locationWaitingNotifyId, kMaxPendingLocationTimeSec, CheckIsWaitingForLocation);
if (m_pendingStarted && m_pendingTimer.ElapsedSeconds() >= kMaxPendingLocationTimeSec)