Merge "Update defend tips card" into tm-qpr-dev am: 8bf872331b am: 06e92f5e45

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19764101

Change-Id: I6bf829b5f72796eb136bc2e6745008e56032cfc5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
YK Hung
2022-09-02 16:22:41 +00:00
committed by Automerger Merge Worker
8 changed files with 44 additions and 14 deletions

View File

@@ -140,6 +140,15 @@ public class CardPreference extends Preference {
updateButtonGroupsVisibility();
}
/**
* Sets the text of content description on secondary button.
*
* @param text text for the content description
*/
public void setSecondaryButtonContentDescription(String text) {
mSecondaryButton.ifPresent(button -> button.setContentDescription(text));
}
private void updateButtonGroupsVisibility() {
int visibility =
(mPrimaryButtonVisible || mSecondaryButtonVisible) ? View.VISIBLE : View.GONE;