Commit 50b49941 authored by Tanmoy Mollik's avatar Tanmoy Mollik Committed by Commit Bot

[Android] Open MainSettings from the profile icon in NewTabPage

The profile image in NewTabPage opens SyncAndServicesSettings page. When
MOBILE_IDENTITY_CONSISTENCY is on, it should instead open MainSettings
page.

Bug: 1129933
Change-Id: I84a1701214b271caf6bf2727391dbc8c7506d468
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2421508
Commit-Queue: Tanmoy Mollik <triploblastic@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808913}
parent 10a99569
......@@ -17,10 +17,12 @@ import org.chromium.base.supplier.ObservableSupplier;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.compositor.layouts.OverviewModeState;
import org.chromium.chrome.browser.feature_engagement.TrackerFactory;
import org.chromium.chrome.browser.flags.ChromeFeatureList;
import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher;
import org.chromium.chrome.browser.lifecycle.NativeInitObserver;
import org.chromium.chrome.browser.ntp.NewTabPage;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.settings.MainSettings;
import org.chromium.chrome.browser.settings.SettingsLauncher;
import org.chromium.chrome.browser.settings.SettingsLauncherImpl;
import org.chromium.chrome.browser.signin.IdentityServicesProvider;
......@@ -104,8 +106,11 @@ public class IdentityDiscController implements NativeInitObserver, ProfileDataCa
-> {
recordIdentityDiscUsed();
SettingsLauncher settingsLauncher = new SettingsLauncherImpl();
settingsLauncher.launchSettingsActivity(
mContext, SyncAndServicesSettings.class);
settingsLauncher.launchSettingsActivity(mContext,
ChromeFeatureList.isEnabled(
ChromeFeatureList.MOBILE_IDENTITY_CONSISTENCY)
? MainSettings.class
: SyncAndServicesSettings.class);
},
R.string.accessibility_toolbar_btn_identity_disc, false,
new IPHCommandBuilder(mContext.getResources(),
......
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