Commit 90ac442e authored by Lijin Shen's avatar Lijin Shen Committed by Chromium LUCI CQ

Cache flag of layout change to avoid crash on config change

There is no guarantee native will be initialized when
onConfigurationChanged is called

Bug: 1162510
Change-Id: Iac48e4dc0c9ab3c6a080a72afeee52657fd32aa8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2606874
Commit-Queue: Lijin Shen <lazzzis@google.com>
Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#840298}
parent a9de4165
......@@ -40,6 +40,7 @@ import org.chromium.base.ApplicationStatus;
import org.chromium.base.Callback;
import org.chromium.base.CommandLine;
import org.chromium.base.ContextUtils;
import org.chromium.base.FeatureList;
import org.chromium.base.MathUtils;
import org.chromium.base.StrictModeContext;
import org.chromium.base.SysUtils;
......@@ -1813,7 +1814,8 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
@Override
public void performOnConfigurationChanged(Configuration newConfig) {
super.performOnConfigurationChanged(newConfig);
if (ChromeFeatureList.isEnabled(ChromeFeatureList.ANDROID_LAYOUT_CHANGE_TAB_REPARENT)
if (FeatureList.isInitialized()
&& ChromeFeatureList.isEnabled(ChromeFeatureList.ANDROID_LAYOUT_CHANGE_TAB_REPARENT)
&& didChangeTabletMode()) {
onScreenLayoutSizeChange();
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment