Bug 1548960 - Call super.onAttachedToWindow from GeckoView even when we have no session set. r=geckoview-reviewers,snorp

Differential Revision: https://phabricator.services.mozilla.com/D29916

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Eitan Isaacson 2019-05-06 16:38:18 +00:00
Родитель a8cc07510f
Коммит a9bf1e8fe8
1 изменённых файлов: 6 добавлений и 7 удалений

Просмотреть файл

@ -457,16 +457,15 @@ public class GeckoView extends FrameLayout {
@Override
public void onAttachedToWindow() {
if (mSession == null) {
if (mSession != null && mRuntime != null) {
if (!mSession.isOpen()) {
mSession.open(mRuntime);
}
mRuntime.orientationChanged();
} else {
Log.w(LOGTAG, "No GeckoSession attached to this GeckoView instance. Call setSession to attach a GeckoSession to this instance.");
return;
}
if (!mSession.isOpen()) {
mSession.open(mRuntime);
}
mRuntime.orientationChanged();
super.onAttachedToWindow();
}