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

Do tab-reparenting tasks after native is fully initialized

Similar to crrev.com/c/2606874, add an extra check to avoid calling
feature list before native is initialized.

Bug: 1162510
Change-Id: I6f45bc0dbd7081abd41c105223f4b312d0af5ddb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2645506
Commit-Queue: Lijin Shen <lazzzis@google.com>
Commit-Queue: Theresa  <twellington@chromium.org>
Auto-Submit: Lijin Shen <lazzzis@google.com>
Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#846372}
parent 616e6440
...@@ -2431,7 +2431,8 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent> ...@@ -2431,7 +2431,8 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
// Note: order matters here because the call to super will recreate the activity. // Note: order matters here because the call to super will recreate the activity.
// Note: it's possible for this method to be called before mNightModeReparentingController // Note: it's possible for this method to be called before mNightModeReparentingController
// is constructed. // is constructed.
if (ChromeFeatureList.isEnabled(ChromeFeatureList.ANDROID_NIGHT_MODE_TAB_REPARENTING) if (FeatureList.isInitialized()
&& ChromeFeatureList.isEnabled(ChromeFeatureList.ANDROID_NIGHT_MODE_TAB_REPARENTING)
&& mTabReparentingController != null) { && mTabReparentingController != null) {
mTabReparentingController.prepareTabsForReparenting(); mTabReparentingController.prepareTabsForReparenting();
} }
......
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