Commit 09981053 authored by Boris Sazonov's avatar Boris Sazonov Committed by Commit Bot

[Unity][Android] Change consent bump screen title

This CL adds a protected getTitleTextId() method to SigninFragmentBase.
This method is overridden in ConsentBumpFragment to use a different
title text there.

Bug: 869426
Change-Id: I15547bfe3ea8f5de97045a9e66465dd63e58f294
Reviewed-on: https://chromium-review.googlesource.com/1183185Reviewed-by: default avatarTheresa <twellington@chromium.org>
Commit-Queue: Boris Sazonov <bsazonov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584979}
parent d9bdb7ec
......@@ -41,7 +41,7 @@
android:layout_marginStart="@dimen/signin_margin_start"
android:layout_marginTop="15dp"
android:layout_marginEnd="@dimen/signin_margin_end"
android:text="@string/consent_bump_title"
android:text="@string/consent_bump_more_options_title"
android:textAppearance="@style/BlackHeadline1"/>
<TextView
android:id="@+id/consent_bump_description"
......
......@@ -62,6 +62,12 @@ public class ConsentBumpFragment extends SigninFragmentBase {
callback.run();
}
@Override
@StringRes
protected int getTitleTextId() {
return R.string.consent_bump_title;
}
@Override
@StringRes
protected int getNegativeButtonTextId() {
......
......@@ -192,6 +192,15 @@ public abstract class SigninFragmentBase
protected abstract void onSigninAccepted(String accountName, boolean isDefaultAccount,
boolean settingsClicked, Runnable callback);
/**
* Returns the string resource id for the title TextView. This is invoked once from
* {@link #onCreateView}. Subclasses may override this method to customize the title text.
*/
@StringRes
protected int getTitleTextId() {
return R.string.signin_title;
}
/**
* Returns the string resource id for the negative button. This is invoked once from
* {@link #onCreateView}.
......@@ -333,7 +342,7 @@ public abstract class SigninFragmentBase
/** Sets texts for immutable elements. Accept button text is set by {@link #setHasAccounts}. */
private void updateConsentText() {
mConsentTextTracker.setText(mView.getTitleView(), R.string.signin_title);
mConsentTextTracker.setText(mView.getTitleView(), getTitleTextId());
mConsentTextTracker.setText(
mView.getSyncDescriptionView(), R.string.signin_sync_description);
......
......@@ -2597,10 +2597,13 @@ To obtain new licenses, connect to the internet and play your downloaded content
Choose an account
</message>
<!-- Consent bump screen strings -->
<message name="IDS_CONSENT_BUMP_TITLE" desc="Text for the title of the basic consent bump screen. This screen describes the user personalized and non-personalized features that depend on Unified Consent.">
Get more Google smarts
</message>
<message name="IDS_CONSENT_BUMP_MORE_OPTIONS" desc="Text for the button in the basic consent bump screen that opens the advanced consent bump screen. The advanced consent bump screen lets the user select from several options to enable or customize personalized and non-personalized services. [CHAR-LIMIT=20]">
More options
</message>
<message name="IDS_CONSENT_BUMP_TITLE" desc="Text for the title of the consent bump screen with advanced options. This screen lets user select from several options to enable or customize personalized and non-personalized services.">
<message name="IDS_CONSENT_BUMP_MORE_OPTIONS_TITLE" desc="Text for the title of the consent bump screen with advanced options. This screen lets user select from several options to enable or customize personalized and non-personalized services.">
Control sync, personalization, and more
</message>
<message name="IDS_CONSENT_BUMP_DESCRIPTION" desc="Text that explains why the consent bump screen has been shown.">
......
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