Set suw description textview to fixed id
Heavy theme supports to costomize description text style. Modify it to fixed id
that can be customized by partner resource.
Heavy theme screenshot: https://screenshot.googleplex.com/TL4M7wmTaPg
Set fixed id screenshot: https://screenshot.googleplex.com/CA6QHoNTQBZ
Test: atest
Bug: 121988926
Change-Id: I8882acd49e7d57f24afa9dd6f3e9abfd06556053
diff --git a/res/layout/choose_lock_password.xml b/res/layout/choose_lock_password.xml
index b779526..be947dc 100644
--- a/res/layout/choose_lock_password.xml
+++ b/res/layout/choose_lock_password.xml
@@ -34,7 +34,7 @@
android:orientation="vertical">
<TextView
- android:id="@+id/message"
+ android:id="@+id/sud_layout_description"
style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/res/layout/choose_lock_pattern_common.xml b/res/layout/choose_lock_pattern_common.xml
index 5d3cbca..0a2294f 100644
--- a/res/layout/choose_lock_pattern_common.xml
+++ b/res/layout/choose_lock_pattern_common.xml
@@ -70,7 +70,7 @@
android:paddingRight="0dp">
<TextView
- android:id="@+id/message"
+ android:id="@+id/sud_layout_description"
style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/res/layout/confirm_lock_password_normal.xml b/res/layout/confirm_lock_password_normal.xml
index 7b04127..61d8505 100644
--- a/res/layout/confirm_lock_password_normal.xml
+++ b/res/layout/confirm_lock_password_normal.xml
@@ -28,7 +28,7 @@
android:layout_height="match_parent">
<TextView
- android:id="@+id/detailsText"
+ android:id="@+id/sud_layout_description"
style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/res/layout/confirm_lock_pattern_normal_base.xml b/res/layout/confirm_lock_pattern_normal_base.xml
index 03d3367..7e2cf8e 100644
--- a/res/layout/confirm_lock_pattern_normal_base.xml
+++ b/res/layout/confirm_lock_pattern_normal_base.xml
@@ -48,7 +48,7 @@
<TextView
style="@style/SudDescription.Glif"
- android:id="@+id/detailsText"
+ android:id="@+id/sud_layout_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="?attr/sudMarginSides"
diff --git a/res/layout/encryption_interstitial.xml b/res/layout/encryption_interstitial.xml
index a2305f8..61ed292 100644
--- a/res/layout/encryption_interstitial.xml
+++ b/res/layout/encryption_interstitial.xml
@@ -30,7 +30,7 @@
android:orientation="vertical">
<TextView
- android:id="@+id/encryption_message"
+ android:id="@+id/sud_layout_description"
style="@style/SudDescription.Glif"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
diff --git a/res/layout/face_enroll_introduction.xml b/res/layout/face_enroll_introduction.xml
index b55041a..71a02db 100644
--- a/res/layout/face_enroll_introduction.xml
+++ b/res/layout/face_enroll_introduction.xml
@@ -33,7 +33,7 @@
android:orientation="vertical">
<com.google.android.setupdesign.view.RichTextView
- android:id="@+id/description_text"
+ android:id="@+id/sud_layout_description"
style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/res/layout/fingerprint_enroll_enrolling_base.xml b/res/layout/fingerprint_enroll_enrolling_base.xml
index eed6fab..e1a9707 100644
--- a/res/layout/fingerprint_enroll_enrolling_base.xml
+++ b/res/layout/fingerprint_enroll_enrolling_base.xml
@@ -38,7 +38,7 @@
<TextView
style="@style/SudDescription.Glif"
- android:id="@+id/start_message"
+ android:id="@+id/sud_layout_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minLines="3"
diff --git a/res/layout/fingerprint_enroll_find_sensor_base.xml b/res/layout/fingerprint_enroll_find_sensor_base.xml
index 2bef539..ce3104f 100644
--- a/res/layout/fingerprint_enroll_find_sensor_base.xml
+++ b/res/layout/fingerprint_enroll_find_sensor_base.xml
@@ -39,6 +39,7 @@
<TextView
style="@style/SudDescription.Glif"
+ android:id="@+id/sud_layout_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sud_description_glif_margin_top"
diff --git a/res/layout/fingerprint_enroll_finish_base.xml b/res/layout/fingerprint_enroll_finish_base.xml
index d85c56c..1f9167e 100644
--- a/res/layout/fingerprint_enroll_finish_base.xml
+++ b/res/layout/fingerprint_enroll_finish_base.xml
@@ -31,7 +31,7 @@
android:clipChildren="false">
<TextView
- android:id="@+id/message"
+ android:id="@+id/sud_layout_description"
style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/res/layout/fingerprint_enroll_introduction.xml b/res/layout/fingerprint_enroll_introduction.xml
index 47d2f02..41be2f6 100644
--- a/res/layout/fingerprint_enroll_introduction.xml
+++ b/res/layout/fingerprint_enroll_introduction.xml
@@ -31,7 +31,7 @@
android:orientation="vertical">
<com.google.android.setupdesign.view.RichTextView
- android:id="@+id/description_text"
+ android:id="@+id/sud_layout_description"
style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/res/layout/master_clear.xml b/res/layout/master_clear.xml
index 6368588..bf22b88 100644
--- a/res/layout/master_clear.xml
+++ b/res/layout/master_clear.xml
@@ -41,6 +41,7 @@
<TextView
style="@style/TextAppearance.SudGlifItemSummary"
+ android:id="@+id/sud_layout_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/master_clear_desc"/>
diff --git a/res/layout/master_clear_confirm.xml b/res/layout/master_clear_confirm.xml
index b4c0270..a236cd3 100644
--- a/res/layout/master_clear_confirm.xml
+++ b/res/layout/master_clear_confirm.xml
@@ -31,7 +31,7 @@
android:orientation="vertical">
<TextView
- android:id="@+id/master_clear_confirm"
+ android:id="@+id/sud_layout_description"
style="@style/SudItemTitle.GlifDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/res/layout/redaction_interstitial.xml b/res/layout/redaction_interstitial.xml
index f911572..0ad8b4d 100644
--- a/res/layout/redaction_interstitial.xml
+++ b/res/layout/redaction_interstitial.xml
@@ -33,7 +33,7 @@
android:orientation="vertical">
<TextView
- android:id="@+id/message"
+ android:id="@+id/sud_layout_description"
style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/src/com/android/settings/EncryptionInterstitial.java b/src/com/android/settings/EncryptionInterstitial.java
index 317e3bd..515b1b0 100644
--- a/src/com/android/settings/EncryptionInterstitial.java
+++ b/src/com/android/settings/EncryptionInterstitial.java
@@ -141,7 +141,7 @@
R.string.encryption_interstitial_message_password;
break;
}
- TextView message = (TextView) getActivity().findViewById(R.id.encryption_message);
+ TextView message = (TextView) getActivity().findViewById(R.id.sud_layout_description);
message.setText(msgId);
setRequirePasswordState(getActivity().getIntent().getBooleanExtra(
diff --git a/src/com/android/settings/MasterClearConfirm.java b/src/com/android/settings/MasterClearConfirm.java
index ac97c11..a8c4341 100644
--- a/src/com/android/settings/MasterClearConfirm.java
+++ b/src/com/android/settings/MasterClearConfirm.java
@@ -207,7 +207,7 @@
private void setAccessibilityTitle() {
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) {
String accessibleText = new StringBuilder(currentTitle).append(",").append(
confirmationMessage.getText()).toString();
@@ -218,7 +218,7 @@
@VisibleForTesting
void setSubtitle() {
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);
}
}
diff --git a/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java b/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java
index 81b70b5..5dded55 100644
--- a/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java
+++ b/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java
@@ -266,7 +266,7 @@
protected void initViews() {
super.initViews();
- TextView description = (TextView) findViewById(R.id.description_text);
+ TextView description = (TextView) findViewById(R.id.sud_layout_description);
if (mBiometricUnlockDisabledByAdmin) {
description.setText(getDescriptionResDisabledByAdmin());
}
diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java
index 3d4ea16..ce5c768 100644
--- a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java
+++ b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java
@@ -131,7 +131,7 @@
super.onCreate(savedInstanceState);
setContentView(R.layout.fingerprint_enroll_enrolling);
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);
mErrorText = (TextView) findViewById(R.id.error_text);
mProgressBar = (ProgressBar) findViewById(R.id.fingerprint_progress_bar);
diff --git a/src/com/android/settings/biometrics/fingerprint/SetupFingerprintEnrollIntroduction.java b/src/com/android/settings/biometrics/fingerprint/SetupFingerprintEnrollIntroduction.java
index c720b5d..7df66b7 100644
--- a/src/com/android/settings/biometrics/fingerprint/SetupFingerprintEnrollIntroduction.java
+++ b/src/com/android/settings/biometrics/fingerprint/SetupFingerprintEnrollIntroduction.java
@@ -89,7 +89,7 @@
protected void initViews() {
super.initViews();
- TextView description = (TextView) findViewById(R.id.description_text);
+ TextView description = (TextView) findViewById(R.id.sud_layout_description);
description.setText(
R.string.security_settings_fingerprint_enroll_introduction_message_setup);
diff --git a/src/com/android/settings/notification/RedactionInterstitial.java b/src/com/android/settings/notification/RedactionInterstitial.java
index f765694..74ccf59 100644
--- a/src/com/android/settings/notification/RedactionInterstitial.java
+++ b/src/com/android/settings/notification/RedactionInterstitial.java
@@ -123,7 +123,7 @@
mUserId = Utils.getUserIdFromBundle(
getContext(), getActivity().getIntent().getExtras());
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);
mShowAllButton.setText(R.string.lock_screen_notifications_summary_show_profile);
mRedactSensitiveButton
diff --git a/src/com/android/settings/password/ChooseLockPassword.java b/src/com/android/settings/password/ChooseLockPassword.java
index 16cecc8..21ef720 100644
--- a/src/com/android/settings/password/ChooseLockPassword.java
+++ b/src/com/android/settings/password/ChooseLockPassword.java
@@ -443,7 +443,7 @@
mSkipOrClearButton = mixin.getSecondaryButton();
mNextButton = mixin.getPrimaryButton();
- mMessage = view.findViewById(R.id.message);
+ mMessage = view.findViewById(R.id.sud_layout_description);
if (mForFingerprint) {
mLayout.setIcon(getActivity().getDrawable(R.drawable.ic_fingerprint_header));
} else if (mForFace) {
diff --git a/src/com/android/settings/password/ChooseLockPattern.java b/src/com/android/settings/password/ChooseLockPattern.java
index e0974fe..85b9a46 100644
--- a/src/com/android/settings/password/ChooseLockPattern.java
+++ b/src/com/android/settings/password/ChooseLockPattern.java
@@ -520,7 +520,7 @@
mTitleText = view.findViewById(R.id.suc_layout_title);
mHeaderText = (TextView) view.findViewById(R.id.headerText);
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.setOnPatternListener(mChooseNewLockPatternListener);
mLockPatternView.setTactileFeedbackEnabled(
diff --git a/src/com/android/settings/password/ConfirmLockPassword.java b/src/com/android/settings/password/ConfirmLockPassword.java
index 6c61967..f2b5a35 100644
--- a/src/com/android/settings/password/ConfirmLockPassword.java
+++ b/src/com/android/settings/password/ConfirmLockPassword.java
@@ -137,7 +137,7 @@
if (mHeaderTextView == null) {
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);
mIsAlpha = DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC == storedQuality
|| DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC == storedQuality
diff --git a/src/com/android/settings/password/ConfirmLockPattern.java b/src/com/android/settings/password/ConfirmLockPattern.java
index 6d3d6e5..f43ee7f 100644
--- a/src/com/android/settings/password/ConfirmLockPattern.java
+++ b/src/com/android/settings/password/ConfirmLockPattern.java
@@ -116,7 +116,7 @@
false);
mHeaderTextView = (TextView) view.findViewById(R.id.headerText);
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);
mLeftSpacerLandscape = view.findViewById(R.id.leftSpacer);
mRightSpacerLandscape = view.findViewById(R.id.rightSpacer);
diff --git a/tests/robotests/src/com/android/settings/MasterClearConfirmTest.java b/tests/robotests/src/com/android/settings/MasterClearConfirmTest.java
index 0c6903a..822eb3c 100644
--- a/tests/robotests/src/com/android/settings/MasterClearConfirmTest.java
+++ b/tests/robotests/src/com/android/settings/MasterClearConfirmTest.java
@@ -47,7 +47,7 @@
masterClearConfirm.setSubtitle();
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));
}
@@ -61,7 +61,7 @@
masterClearConfirm.setSubtitle();
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));
}
}