[android] fix missing window inset event on start

Register in onResume instead of onSafeCreate.
This makes sure we do not miss the event by registering too late.

Signed-off-by: Arnaud Vergnet <arnaud.vergnet@mailo.com>
This commit is contained in:
Arnaud Vergnet 2022-09-18 18:56:24 +02:00 committed by Roman Tsisyk
parent 0213853f77
commit d67225c2c8

View file

@ -25,7 +25,6 @@ import androidx.annotation.Nullable;
import androidx.annotation.StyleRes;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
@ -422,8 +421,6 @@ public class MwmActivity extends BaseMwmFragmentActivity
if (savedInstanceState == null && RoutingController.get().hasSavedRoute())
addTask(new Factory.RestoreRouteTask());
updateViewsInsets();
}
private void updateViewsInsets()
@ -1045,6 +1042,8 @@ public class MwmActivity extends BaseMwmFragmentActivity
mNavigationController.onActivityResumed(this);
mMapButtonsController.onResume();
mPlacePageController.onActivityResumed(this);
updateViewsInsets();
}
@Override