Commit 6450628a authored by Michael van Ouwerkerk's avatar Michael van Ouwerkerk Committed by Commit Bot

Return before trial group check if module extras are not set.

Bug: 843161
Change-Id: I705cf2ee2665ebd8245ccafb5e157d2039cf86f5
Reviewed-on: https://chromium-review.googlesource.com/1122410Reviewed-by: default avatarBenoit L <lizeb@chromium.org>
Commit-Queue: Michael van Ouwerkerk <mvanouwerkerk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572249}
parent 5cc259ed
...@@ -350,20 +350,25 @@ public class CustomTabActivity extends ChromeActivity { ...@@ -350,20 +350,25 @@ public class CustomTabActivity extends ChromeActivity {
* is not loaded yet. * is not loaded yet.
*/ */
private void maybeLoadModule() { private void maybeLoadModule() {
// TODO(https://crbug.com/853728): Load the module in the background. String packageName = mIntentDataProvider.getModulePackageName();
String className = mIntentDataProvider.getModuleClassName();
// Return early if these were not provided. It's important to do this before checking the
// feature experiment group, to avoid entering users into the experiment that do not even
// receive the intent extras for using the feature.
if (packageName == null || className == null) return;
if (!ChromeFeatureList.isEnabled(ChromeFeatureList.CCT_MODULE)) { if (!ChromeFeatureList.isEnabled(ChromeFeatureList.CCT_MODULE)) {
Log.w(TAG, "The %s feature is disabled.", ChromeFeatureList.CCT_MODULE); Log.w(TAG, "The %s feature is disabled.", ChromeFeatureList.CCT_MODULE);
return; return;
} }
String packageName = mIntentDataProvider.getModulePackageName();
if (!ExternalAuthUtils.getInstance().isGoogleSigned(packageName)) { if (!ExternalAuthUtils.getInstance().isGoogleSigned(packageName)) {
Log.w(TAG, "The %s package is not Google-signed.", packageName); Log.w(TAG, "The %s package is not Google-signed.", packageName);
return; return;
} }
ModuleEntryPoint entryPoint = // TODO(https://crbug.com/853728): Load the module in the background.
mConnection.loadModule(packageName, mIntentDataProvider.getModuleClassName()); ModuleEntryPoint entryPoint = mConnection.loadModule(packageName, className);
if (entryPoint == null) return; if (entryPoint == null) return;
mActivityDelegate = entryPoint.createActivityDelegate(new ActivityHostImpl(this)); mActivityDelegate = entryPoint.createActivityDelegate(new ActivityHostImpl(this));
......
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