Merge "Set suw description textview to fixed id" into qt-dev

This commit is contained in:
Pasty Chang
2019-04-14 03:53:16 +00:00
committed by Android (Google) Code Review
24 changed files with 26 additions and 24 deletions

View File

@@ -34,7 +34,7 @@
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/message" android:id="@+id/sud_layout_description"
style="@style/SudDescription.Glif" style="@style/SudDescription.Glif"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@@ -70,7 +70,7 @@
android:paddingRight="0dp"> android:paddingRight="0dp">
<TextView <TextView
android:id="@+id/message" android:id="@+id/sud_layout_description"
style="@style/SudDescription.Glif" style="@style/SudDescription.Glif"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@@ -28,7 +28,7 @@
android:layout_height="match_parent"> android:layout_height="match_parent">
<TextView <TextView
android:id="@+id/detailsText" android:id="@+id/sud_layout_description"
style="@style/SudDescription.Glif" style="@style/SudDescription.Glif"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@@ -48,7 +48,7 @@
<TextView <TextView
style="@style/SudDescription.Glif" style="@style/SudDescription.Glif"
android:id="@+id/detailsText" android:id="@+id/sud_layout_description"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="?attr/sudMarginSides" android:layout_marginStart="?attr/sudMarginSides"

View File

@@ -30,7 +30,7 @@
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/encryption_message" android:id="@+id/sud_layout_description"
style="@style/SudDescription.Glif" style="@style/SudDescription.Glif"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />

View File

@@ -33,7 +33,7 @@
android:orientation="vertical"> android:orientation="vertical">
<com.google.android.setupdesign.view.RichTextView <com.google.android.setupdesign.view.RichTextView
android:id="@+id/description_text" android:id="@+id/sud_layout_description"
style="@style/SudDescription.Glif" style="@style/SudDescription.Glif"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@@ -38,7 +38,7 @@
<TextView <TextView
style="@style/SudDescription.Glif" style="@style/SudDescription.Glif"
android:id="@+id/start_message" android:id="@+id/sud_layout_description"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minLines="3" android:minLines="3"

View File

@@ -39,6 +39,7 @@
<TextView <TextView
style="@style/SudDescription.Glif" style="@style/SudDescription.Glif"
android:id="@+id/sud_layout_description"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sud_description_glif_margin_top" android:layout_marginTop="@dimen/sud_description_glif_margin_top"

View File

@@ -31,7 +31,7 @@
android:clipChildren="false"> android:clipChildren="false">
<TextView <TextView
android:id="@+id/message" android:id="@+id/sud_layout_description"
style="@style/SudDescription.Glif" style="@style/SudDescription.Glif"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@@ -31,7 +31,7 @@
android:orientation="vertical"> android:orientation="vertical">
<com.google.android.setupdesign.view.RichTextView <com.google.android.setupdesign.view.RichTextView
android:id="@+id/description_text" android:id="@+id/sud_layout_description"
style="@style/SudDescription.Glif" style="@style/SudDescription.Glif"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@@ -41,6 +41,7 @@
<TextView <TextView
style="@style/TextAppearance.SudGlifItemSummary" style="@style/TextAppearance.SudGlifItemSummary"
android:id="@+id/sud_layout_description"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/master_clear_desc"/> android:text="@string/master_clear_desc"/>

View File

@@ -31,7 +31,7 @@
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/master_clear_confirm" android:id="@+id/sud_layout_description"
style="@style/SudItemTitle.GlifDescription" style="@style/SudItemTitle.GlifDescription"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@@ -33,7 +33,7 @@
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/message" android:id="@+id/sud_layout_description"
style="@style/SudDescription.Glif" style="@style/SudDescription.Glif"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@@ -141,7 +141,7 @@ public class EncryptionInterstitial extends SettingsActivity {
R.string.encryption_interstitial_message_password; R.string.encryption_interstitial_message_password;
break; break;
} }
TextView message = (TextView) getActivity().findViewById(R.id.encryption_message); TextView message = (TextView) getActivity().findViewById(R.id.sud_layout_description);
message.setText(msgId); message.setText(msgId);
setRequirePasswordState(getActivity().getIntent().getBooleanExtra( setRequirePasswordState(getActivity().getIntent().getBooleanExtra(

View File

@@ -207,7 +207,7 @@ public class MasterClearConfirm extends InstrumentedFragment {
private void setAccessibilityTitle() { private void setAccessibilityTitle() {
CharSequence currentTitle = getActivity().getTitle(); CharSequence currentTitle = getActivity().getTitle();
TextView confirmationMessage = mContentView.findViewById(R.id.master_clear_confirm); TextView confirmationMessage = mContentView.findViewById(R.id.sud_layout_description);
if (confirmationMessage != null) { if (confirmationMessage != null) {
String accessibleText = new StringBuilder(currentTitle).append(",").append( String accessibleText = new StringBuilder(currentTitle).append(",").append(
confirmationMessage.getText()).toString(); confirmationMessage.getText()).toString();
@@ -218,7 +218,7 @@ public class MasterClearConfirm extends InstrumentedFragment {
@VisibleForTesting @VisibleForTesting
void setSubtitle() { void setSubtitle() {
if (mEraseEsims) { if (mEraseEsims) {
((TextView) mContentView.findViewById(R.id.master_clear_confirm)) ((TextView) mContentView.findViewById(R.id.sud_layout_description))
.setText(R.string.master_clear_final_desc_esim); .setText(R.string.master_clear_final_desc_esim);
} }
} }

View File

@@ -276,7 +276,7 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase
protected void initViews() { protected void initViews() {
super.initViews(); super.initViews();
TextView description = (TextView) findViewById(R.id.description_text); TextView description = (TextView) findViewById(R.id.sud_layout_description);
if (mBiometricUnlockDisabledByAdmin) { if (mBiometricUnlockDisabledByAdmin) {
description.setText(getDescriptionResDisabledByAdmin()); description.setText(getDescriptionResDisabledByAdmin());
} }

View File

@@ -131,7 +131,7 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.fingerprint_enroll_enrolling); setContentView(R.layout.fingerprint_enroll_enrolling);
setHeaderText(R.string.security_settings_fingerprint_enroll_repeat_title); setHeaderText(R.string.security_settings_fingerprint_enroll_repeat_title);
mStartMessage = (TextView) findViewById(R.id.start_message); mStartMessage = (TextView) findViewById(R.id.sud_layout_description);
mRepeatMessage = (TextView) findViewById(R.id.repeat_message); mRepeatMessage = (TextView) findViewById(R.id.repeat_message);
mErrorText = (TextView) findViewById(R.id.error_text); mErrorText = (TextView) findViewById(R.id.error_text);
mProgressBar = (ProgressBar) findViewById(R.id.fingerprint_progress_bar); mProgressBar = (ProgressBar) findViewById(R.id.fingerprint_progress_bar);

View File

@@ -89,7 +89,7 @@ public class SetupFingerprintEnrollIntroduction extends FingerprintEnrollIntrodu
protected void initViews() { protected void initViews() {
super.initViews(); super.initViews();
TextView description = (TextView) findViewById(R.id.description_text); TextView description = (TextView) findViewById(R.id.sud_layout_description);
description.setText( description.setText(
R.string.security_settings_fingerprint_enroll_introduction_message_setup); R.string.security_settings_fingerprint_enroll_introduction_message_setup);

View File

@@ -123,7 +123,7 @@ public class RedactionInterstitial extends SettingsActivity {
mUserId = Utils.getUserIdFromBundle( mUserId = Utils.getUserIdFromBundle(
getContext(), getActivity().getIntent().getExtras()); getContext(), getActivity().getIntent().getExtras());
if (UserManager.get(getContext()).isManagedProfile(mUserId)) { if (UserManager.get(getContext()).isManagedProfile(mUserId)) {
((TextView) view.findViewById(R.id.message)) ((TextView) view.findViewById(R.id.sud_layout_description))
.setText(R.string.lock_screen_notifications_interstitial_message_profile); .setText(R.string.lock_screen_notifications_interstitial_message_profile);
mShowAllButton.setText(R.string.lock_screen_notifications_summary_show_profile); mShowAllButton.setText(R.string.lock_screen_notifications_summary_show_profile);
mRedactSensitiveButton mRedactSensitiveButton

View File

@@ -443,7 +443,7 @@ public class ChooseLockPassword extends SettingsActivity {
mSkipOrClearButton = mixin.getSecondaryButton(); mSkipOrClearButton = mixin.getSecondaryButton();
mNextButton = mixin.getPrimaryButton(); mNextButton = mixin.getPrimaryButton();
mMessage = view.findViewById(R.id.message); mMessage = view.findViewById(R.id.sud_layout_description);
if (mForFingerprint) { if (mForFingerprint) {
mLayout.setIcon(getActivity().getDrawable(R.drawable.ic_fingerprint_header)); mLayout.setIcon(getActivity().getDrawable(R.drawable.ic_fingerprint_header));
} else if (mForFace) { } else if (mForFace) {

View File

@@ -520,7 +520,7 @@ public class ChooseLockPattern extends SettingsActivity {
mTitleText = view.findViewById(R.id.suc_layout_title); mTitleText = view.findViewById(R.id.suc_layout_title);
mHeaderText = (TextView) view.findViewById(R.id.headerText); mHeaderText = (TextView) view.findViewById(R.id.headerText);
mDefaultHeaderColorList = mHeaderText.getTextColors(); mDefaultHeaderColorList = mHeaderText.getTextColors();
mMessageText = view.findViewById(R.id.message); mMessageText = view.findViewById(R.id.sud_layout_description);
mLockPatternView = (LockPatternView) view.findViewById(R.id.lockPattern); mLockPatternView = (LockPatternView) view.findViewById(R.id.lockPattern);
mLockPatternView.setOnPatternListener(mChooseNewLockPatternListener); mLockPatternView.setOnPatternListener(mChooseNewLockPatternListener);
mLockPatternView.setTactileFeedbackEnabled( mLockPatternView.setTactileFeedbackEnabled(

View File

@@ -137,7 +137,7 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
if (mHeaderTextView == null) { if (mHeaderTextView == null) {
mHeaderTextView = view.findViewById(R.id.suc_layout_title); mHeaderTextView = view.findViewById(R.id.suc_layout_title);
} }
mDetailsTextView = (TextView) view.findViewById(R.id.detailsText); mDetailsTextView = (TextView) view.findViewById(R.id.sud_layout_description);
mErrorTextView = (TextView) view.findViewById(R.id.errorText); mErrorTextView = (TextView) view.findViewById(R.id.errorText);
mIsAlpha = DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC == storedQuality mIsAlpha = DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC == storedQuality
|| DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC == storedQuality || DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC == storedQuality

View File

@@ -116,7 +116,7 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
false); false);
mHeaderTextView = (TextView) view.findViewById(R.id.headerText); mHeaderTextView = (TextView) view.findViewById(R.id.headerText);
mLockPatternView = (LockPatternView) view.findViewById(R.id.lockPattern); mLockPatternView = (LockPatternView) view.findViewById(R.id.lockPattern);
mDetailsTextView = (TextView) view.findViewById(R.id.detailsText); mDetailsTextView = (TextView) view.findViewById(R.id.sud_layout_description);
mErrorTextView = (TextView) view.findViewById(R.id.errorText); mErrorTextView = (TextView) view.findViewById(R.id.errorText);
mLeftSpacerLandscape = view.findViewById(R.id.leftSpacer); mLeftSpacerLandscape = view.findViewById(R.id.leftSpacer);
mRightSpacerLandscape = view.findViewById(R.id.rightSpacer); mRightSpacerLandscape = view.findViewById(R.id.rightSpacer);

View File

@@ -47,7 +47,7 @@ public class MasterClearConfirmTest {
masterClearConfirm.setSubtitle(); masterClearConfirm.setSubtitle();
assertThat(((TextView) masterClearConfirm.mContentView assertThat(((TextView) masterClearConfirm.mContentView
.findViewById(R.id.master_clear_confirm)).getText()) .findViewById(R.id.sud_layout_description)).getText())
.isEqualTo(mActivity.getString(R.string.master_clear_final_desc_esim)); .isEqualTo(mActivity.getString(R.string.master_clear_final_desc_esim));
} }
@@ -61,7 +61,7 @@ public class MasterClearConfirmTest {
masterClearConfirm.setSubtitle(); masterClearConfirm.setSubtitle();
assertThat(((TextView) masterClearConfirm.mContentView assertThat(((TextView) masterClearConfirm.mContentView
.findViewById(R.id.master_clear_confirm)).getText()) .findViewById(R.id.sud_layout_description)).getText())
.isEqualTo(mActivity.getString(R.string.master_clear_final_desc)); .isEqualTo(mActivity.getString(R.string.master_clear_final_desc));
} }
} }