Commit 5ce2f677 authored by Peter Kotwicz's avatar Peter Kotwicz Committed by Commit Bot

[Android] Remove redundant notifyRendererPreferenceUpdate() calls

Remove WebContents#notifyRendererPreferenceUpdate() calls in
CustomTabActivityTabController.java and WebApkActivity.java which are
redundant to WebContents#notifyRendererPreferenceUpdate() call in
TabImpl#initWebContents()

BUG=1059580

Change-Id: I6f55adb5ce7e29f1b00b45ef2dad31ca960bafe5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2093995
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: default avatarJinsuk Kim <jinsukkim@chromium.org>
Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#749203}
parent 4ba68200
...@@ -276,10 +276,6 @@ public class CustomTabActivityTabController ...@@ -276,10 +276,6 @@ public class CustomTabActivityTabController
if (tab == null) return null; if (tab == null) return null;
TabAssociatedApp.from(tab).setAppId(mConnection.getClientPackageNameForSession(mSession)); TabAssociatedApp.from(tab).setAppId(mConnection.getClientPackageNameForSession(mSession));
if (mIntentDataProvider.shouldEnableEmbeddedMediaExperience()) {
// Configures web preferences for viewing downloaded media.
if (tab.getWebContents() != null) tab.getWebContents().notifyRendererPreferenceUpdate();
}
initializeTab(tab); initializeTab(tab);
return tab; return tab;
} }
...@@ -378,10 +374,6 @@ public class CustomTabActivityTabController ...@@ -378,10 +374,6 @@ public class CustomTabActivityTabController
TabAssociatedApp.from(tab).setAppId(mConnection.getClientPackageNameForSession(mSession)); TabAssociatedApp.from(tab).setAppId(mConnection.getClientPackageNameForSession(mSession));
if (mIntentDataProvider.shouldEnableEmbeddedMediaExperience()) {
if (tab.getWebContents() != null) tab.getWebContents().notifyRendererPreferenceUpdate();
}
initializeTab(tab); initializeTab(tab);
if (mIntentDataProvider.getTranslateLanguage() != null) { if (mIntentDataProvider.getTranslateLanguage() != null) {
......
...@@ -5,13 +5,11 @@ ...@@ -5,13 +5,11 @@
package org.chromium.chrome.browser.webapps; package org.chromium.chrome.browser.webapps;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle;
import androidx.browser.trusted.sharing.ShareData; import androidx.browser.trusted.sharing.ShareData;
import org.chromium.base.IntentUtils; import org.chromium.base.IntentUtils;
import org.chromium.chrome.browser.flags.ActivityType; import org.chromium.chrome.browser.flags.ActivityType;
import org.chromium.content_public.browser.WebContents;
import org.chromium.webapk.lib.common.WebApkConstants; import org.chromium.webapk.lib.common.WebApkConstants;
/** /**
...@@ -31,13 +29,6 @@ public class WebApkActivity extends WebappActivity { ...@@ -31,13 +29,6 @@ public class WebApkActivity extends WebappActivity {
return (intent == null) ? WebApkInfo.createEmpty() : WebApkInfo.create(intent); return (intent == null) ? WebApkInfo.createEmpty() : WebApkInfo.create(intent);
} }
@Override
protected void initializeUI(Bundle savedInstance) {
super.initializeUI(savedInstance);
WebContents webContents = getActivityTab().getWebContents();
if (webContents != null) webContents.notifyRendererPreferenceUpdate();
}
@Override @Override
public boolean shouldPreferLightweightFre(Intent intent) { public boolean shouldPreferLightweightFre(Intent intent) {
// We cannot use getWebApkPackageName() because // We cannot use getWebApkPackageName() because
......
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