Fix references to resources for Settings
Bug: 293810334 Test: m Settings Change-Id: Ie140278f492ef7e1c062ec1ecae2866c521a86aa
This commit is contained in:
@@ -497,7 +497,8 @@ public class ChooseLockPassword extends SettingsActivity {
|
||||
.setText(R.string.lockpassword_clear_label)
|
||||
.setListener(this::onSkipOrClearButtonClick)
|
||||
.setButtonType(FooterButton.ButtonType.SKIP)
|
||||
.setTheme(R.style.SudGlifButton_Secondary)
|
||||
.setTheme(
|
||||
com.google.android.setupdesign.R.style.SudGlifButton_Secondary)
|
||||
.build()
|
||||
);
|
||||
mixin.setPrimaryButton(
|
||||
@@ -505,7 +506,7 @@ public class ChooseLockPassword extends SettingsActivity {
|
||||
.setText(R.string.next_label)
|
||||
.setListener(this::onNextButtonClick)
|
||||
.setButtonType(FooterButton.ButtonType.NEXT)
|
||||
.setTheme(R.style.SudGlifButton_Primary)
|
||||
.setTheme(com.google.android.setupdesign.R.style.SudGlifButton_Primary)
|
||||
.build()
|
||||
);
|
||||
mSkipOrClearButton = mixin.getSecondaryButton();
|
||||
@@ -519,7 +520,7 @@ public class ChooseLockPassword extends SettingsActivity {
|
||||
|| DevicePolicyManager.PASSWORD_QUALITY_COMPLEX == mPasswordType;
|
||||
|
||||
final LinearLayout headerLayout = view.findViewById(
|
||||
R.id.sud_layout_header);
|
||||
com.google.android.setupdesign.R.id.sud_layout_header);
|
||||
setupPasswordRequirementsView(headerLayout);
|
||||
|
||||
mPasswordRestrictionView.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
|
||||
@@ -514,7 +514,8 @@ public class ChooseLockPattern extends SettingsActivity {
|
||||
.setText(R.string.lockpattern_tutorial_cancel_label)
|
||||
.setListener(this::onSkipOrClearButtonClick)
|
||||
.setButtonType(FooterButton.ButtonType.OTHER)
|
||||
.setTheme(R.style.SudGlifButton_Secondary)
|
||||
.setTheme(
|
||||
com.google.android.setupdesign.R.style.SudGlifButton_Secondary)
|
||||
.build()
|
||||
);
|
||||
mixin.setPrimaryButton(
|
||||
@@ -522,13 +523,14 @@ public class ChooseLockPattern extends SettingsActivity {
|
||||
.setText(R.string.lockpattern_tutorial_continue_label)
|
||||
.setListener(this::onNextButtonClick)
|
||||
.setButtonType(FooterButton.ButtonType.NEXT)
|
||||
.setTheme(R.style.SudGlifButton_Primary)
|
||||
.setTheme(com.google.android.setupdesign.R.style.SudGlifButton_Primary)
|
||||
.build()
|
||||
);
|
||||
mSkipOrClearButton = mixin.getSecondaryButton();
|
||||
mNextButton = mixin.getPrimaryButton();
|
||||
// TODO(b/243008023) Workaround for Glif layout on 2 panel choose lock settings.
|
||||
mSudContent = layout.findViewById(R.id.sud_layout_content);
|
||||
mSudContent = layout.findViewById(
|
||||
com.google.android.setupdesign.R.id.sud_layout_content);
|
||||
mSudContent.setPadding(mSudContent.getPaddingLeft(), 0, mSudContent.getPaddingRight(),
|
||||
0);
|
||||
|
||||
@@ -741,7 +743,7 @@ public class ChooseLockPattern extends SettingsActivity {
|
||||
if (stage == Stage.ConfirmWrong || stage == Stage.ChoiceTooShort) {
|
||||
TypedValue typedValue = new TypedValue();
|
||||
Theme theme = getActivity().getTheme();
|
||||
theme.resolveAttribute(R.attr.colorError, typedValue, true);
|
||||
theme.resolveAttribute(androidx.appcompat.R.attr.colorError, typedValue, true);
|
||||
mHeaderText.setTextColor(typedValue.data);
|
||||
} else if (mDefaultHeaderColorList != null) {
|
||||
mHeaderText.setTextColor(mDefaultHeaderColorList);
|
||||
|
||||
@@ -135,7 +135,8 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
|
||||
mLockPatternView = (LockPatternView) view.findViewById(R.id.lockPattern);
|
||||
mErrorTextView = (TextView) view.findViewById(R.id.errorText);
|
||||
// TODO(b/243008023) Workaround for Glif layout on 2 panel choose lock settings.
|
||||
mSudContent = mGlifLayout.findViewById(R.id.sud_layout_content);
|
||||
mSudContent = mGlifLayout.findViewById(
|
||||
com.google.android.setupdesign.R.id.sud_layout_content);
|
||||
mSudContent.setPadding(mSudContent.getPaddingLeft(), 0, mSudContent.getPaddingRight(),
|
||||
0);
|
||||
mIsManagedProfile = UserManager.get(getActivity()).isManagedProfile(mEffectiveUserId);
|
||||
|
||||
@@ -64,7 +64,7 @@ public class ForgotPasswordActivity extends Activity {
|
||||
.setText(android.R.string.ok)
|
||||
.setListener(v -> finish())
|
||||
.setButtonType(FooterButton.ButtonType.DONE)
|
||||
.setTheme(R.style.SudGlifButton_Primary)
|
||||
.setTheme(com.google.android.setupdesign.R.style.SudGlifButton_Primary)
|
||||
.build()
|
||||
);
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ public final class PasswordUtils extends com.android.settingslib.Utils {
|
||||
/** Setup screen lock options button under the Glif Header. */
|
||||
public static void setupScreenLockOptionsButton(Context context, View view, Button optButton) {
|
||||
final LinearLayout headerLayout = view.findViewById(
|
||||
R.id.sud_layout_header);
|
||||
com.google.android.setupdesign.R.id.sud_layout_header);
|
||||
final TextView sucTitleView = headerLayout.findViewById(R.id.suc_layout_title);
|
||||
if (headerLayout != null && sucTitleView != null) {
|
||||
final ViewGroup.MarginLayoutParams layoutTitleParams =
|
||||
|
||||
@@ -113,7 +113,7 @@ public class SetupChooseLockGeneric extends ChooseLockGeneric {
|
||||
layout.setDescriptionText(loadDescriptionText());
|
||||
layout.setDividerItemDecoration(new SettingsDividerItemDecoration(getContext()));
|
||||
layout.setDividerInset(getContext().getResources().getDimensionPixelSize(
|
||||
R.dimen.sud_items_glif_text_divider_inset));
|
||||
com.google.android.setupdesign.R.dimen.sud_items_glif_text_divider_inset));
|
||||
|
||||
layout.setIcon(getContext().getDrawable(R.drawable.ic_lock));
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ public class SetupChooseLockPassword extends ChooseLockPassword {
|
||||
|
||||
if (showOptionsButton && anyOptionsShown) {
|
||||
mOptionsButton = new Button(new ContextThemeWrapper(getActivity(),
|
||||
R.style.SudGlifButton_Tertiary));
|
||||
com.google.android.setupdesign.R.style.SudGlifButton_Tertiary));
|
||||
mOptionsButton.setId(R.id.screen_lock_options);
|
||||
PasswordUtils.setupScreenLockOptionsButton(getActivity(), view, mOptionsButton);
|
||||
mOptionsButton.setVisibility(View.VISIBLE);
|
||||
|
||||
@@ -85,7 +85,7 @@ public class SetupChooseLockPattern extends ChooseLockPattern {
|
||||
View view = super.onCreateView(inflater, container, savedInstanceState);
|
||||
if (!getResources().getBoolean(R.bool.config_lock_pattern_minimal_ui)) {
|
||||
mOptionsButton = new Button(new ContextThemeWrapper(getActivity(),
|
||||
R.style.SudGlifButton_Tertiary));
|
||||
com.google.android.setupdesign.R.style.SudGlifButton_Tertiary));
|
||||
mOptionsButton.setId(R.id.screen_lock_options);
|
||||
PasswordUtils.setupScreenLockOptionsButton(getActivity(), view, mOptionsButton);
|
||||
mOptionsButton.setOnClickListener((btn) ->
|
||||
|
||||
Reference in New Issue
Block a user