Loading res/layout/choose_lock_pattern_common.xml +1 −1 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ android:minLines="2" android:gravity="center" android:paddingHorizontal="?attr/suwMarginSides" android:textSize="18sp" /> android:textSize="12sp" /> <com.android.setupwizardlib.view.FillContentLayout style="@style/LockPatternContainerStyle" Loading res/values/colors.xml +2 −0 Original line number Diff line number Diff line Loading @@ -128,5 +128,7 @@ <color name="homepage_generic_icon_background">#1A73E8</color> <!-- End of dashboard/homepage icon background colors --> <color name="glif_error_color">@*android:color/material_red_A700</color> </resources> res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -3531,6 +3531,8 @@ <string name="lockpassword_confirm_passwords_dont_match">Passwords don\u2019t match</string> <!-- Header on pin confirm screen if second pin doesn't match the first. [CHAR LIMIT=30]--> <string name="lockpassword_confirm_pins_dont_match">PINs don\u2019t match</string> <!-- Header on pattern confirm screen [CHAR LIMIT=40] --> <string name="lockpassword_draw_your_pattern_again_header">Draw your pattern again</string> <!-- Header shown to ask the user to select an unlock method [CHAR LIMIT=30] --> <string name="lockpassword_choose_lock_generic_header">Unlock selection</string> <!-- Toast shown if setting password was successful --> Loading res/values/themes.xml +3 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ <item name="preferenceTheme">@style/PreferenceTheme.SetupWizard</item> <item name="*android:lockPatternStyle">@style/LockPatternStyle.Setup</item> <item name="*android:colorError">@color/glif_error_color</item> </style> <style name="GlifV2Theme" parent="SuwThemeGlifV2"> Loading Loading @@ -88,6 +89,7 @@ <item name="preferenceTheme">@style/PreferenceTheme.SetupWizard</item> <item name="*android:lockPatternStyle">@style/LockPatternStyle.Setup</item> <item name="*android:colorError">@color/glif_error_color</item> </style> <style name="GlifV3Theme" parent="SuwThemeGlifV3"> Loading Loading @@ -123,6 +125,7 @@ <item name="preferenceTheme">@style/PreferenceTheme.SetupWizard</item> <item name="*android:lockPatternStyle">@style/LockPatternStyle.Setup</item> <item name="*android:colorError">@color/glif_error_color</item> </style> <style name="SetupWizardTheme.Transparent" parent="GlifTheme"> Loading src/com/android/settings/password/ChooseLockPattern.java +27 −0 Original line number Diff line number Diff line Loading @@ -20,9 +20,11 @@ import android.app.Activity; import android.app.Fragment; import android.content.Context; import android.content.Intent; import android.content.res.ColorStateList; import android.content.res.Resources.Theme; import android.os.Bundle; import android.util.Log; import android.util.TypedValue; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; Loading Loading @@ -171,6 +173,7 @@ public class ChooseLockPattern extends SettingsActivity { private String mCurrentPattern; private boolean mHasChallenge; private long mChallenge; protected TextView mTitleText; protected TextView mHeaderText; protected TextView mMessageText; protected LockPatternView mLockPatternView; Loading @@ -179,6 +182,7 @@ public class ChooseLockPattern extends SettingsActivity { private TextView mFooterRightButton; protected List<LockPatternView.Cell> mChosenPattern = null; private boolean mHideDrawer = false; private ColorStateList mDefaultHeaderColorList; // ScrollView that contains title and header, only exist in land mode private ScrollView mTitleHeaderScrollView; Loading Loading @@ -265,6 +269,9 @@ public class ChooseLockPattern extends SettingsActivity { private void patternInProgress() { mHeaderText.setText(R.string.lockpattern_recording_inprogress); if (mDefaultHeaderColorList != null) { mHeaderText.setTextColor(mDefaultHeaderColorList); } mFooterText.setText(""); mFooterLeftButton.setEnabled(false); mFooterRightButton.setEnabled(false); Loading Loading @@ -465,10 +472,13 @@ public class ChooseLockPattern extends SettingsActivity { return layout; } @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); mTitleText = view.findViewById(R.id.suw_layout_title); mHeaderText = (TextView) view.findViewById(R.id.headerText); mDefaultHeaderColorList = mHeaderText.getTextColors(); mMessageText = view.findViewById(R.id.message); mLockPatternView = (LockPatternView) view.findViewById(R.id.lockPattern); mLockPatternView.setOnPatternListener(mChooseNewLockPatternListener); Loading Loading @@ -664,6 +674,23 @@ public class ChooseLockPattern extends SettingsActivity { mFooterText.setText(stage.footerMessage); } if (stage == Stage.ConfirmWrong || stage == Stage.ChoiceTooShort) { TypedValue typedValue = new TypedValue(); Theme theme = getActivity().getTheme(); theme.resolveAttribute(R.attr.colorError, typedValue, true); mHeaderText.setTextColor(typedValue.data); } else { if (mDefaultHeaderColorList != null) { mHeaderText.setTextColor(mDefaultHeaderColorList); } if (stage == Stage.NeedToConfirm && mForFingerprint) { mHeaderText.setText(""); mTitleText.setText(R.string.lockpassword_draw_your_pattern_again_header); } } updateFooterLeftButton(stage, mFooterLeftButton); setRightButtonText(stage.rightMode.text); Loading Loading
res/layout/choose_lock_pattern_common.xml +1 −1 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ android:minLines="2" android:gravity="center" android:paddingHorizontal="?attr/suwMarginSides" android:textSize="18sp" /> android:textSize="12sp" /> <com.android.setupwizardlib.view.FillContentLayout style="@style/LockPatternContainerStyle" Loading
res/values/colors.xml +2 −0 Original line number Diff line number Diff line Loading @@ -128,5 +128,7 @@ <color name="homepage_generic_icon_background">#1A73E8</color> <!-- End of dashboard/homepage icon background colors --> <color name="glif_error_color">@*android:color/material_red_A700</color> </resources>
res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -3531,6 +3531,8 @@ <string name="lockpassword_confirm_passwords_dont_match">Passwords don\u2019t match</string> <!-- Header on pin confirm screen if second pin doesn't match the first. [CHAR LIMIT=30]--> <string name="lockpassword_confirm_pins_dont_match">PINs don\u2019t match</string> <!-- Header on pattern confirm screen [CHAR LIMIT=40] --> <string name="lockpassword_draw_your_pattern_again_header">Draw your pattern again</string> <!-- Header shown to ask the user to select an unlock method [CHAR LIMIT=30] --> <string name="lockpassword_choose_lock_generic_header">Unlock selection</string> <!-- Toast shown if setting password was successful --> Loading
res/values/themes.xml +3 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ <item name="preferenceTheme">@style/PreferenceTheme.SetupWizard</item> <item name="*android:lockPatternStyle">@style/LockPatternStyle.Setup</item> <item name="*android:colorError">@color/glif_error_color</item> </style> <style name="GlifV2Theme" parent="SuwThemeGlifV2"> Loading Loading @@ -88,6 +89,7 @@ <item name="preferenceTheme">@style/PreferenceTheme.SetupWizard</item> <item name="*android:lockPatternStyle">@style/LockPatternStyle.Setup</item> <item name="*android:colorError">@color/glif_error_color</item> </style> <style name="GlifV3Theme" parent="SuwThemeGlifV3"> Loading Loading @@ -123,6 +125,7 @@ <item name="preferenceTheme">@style/PreferenceTheme.SetupWizard</item> <item name="*android:lockPatternStyle">@style/LockPatternStyle.Setup</item> <item name="*android:colorError">@color/glif_error_color</item> </style> <style name="SetupWizardTheme.Transparent" parent="GlifTheme"> Loading
src/com/android/settings/password/ChooseLockPattern.java +27 −0 Original line number Diff line number Diff line Loading @@ -20,9 +20,11 @@ import android.app.Activity; import android.app.Fragment; import android.content.Context; import android.content.Intent; import android.content.res.ColorStateList; import android.content.res.Resources.Theme; import android.os.Bundle; import android.util.Log; import android.util.TypedValue; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; Loading Loading @@ -171,6 +173,7 @@ public class ChooseLockPattern extends SettingsActivity { private String mCurrentPattern; private boolean mHasChallenge; private long mChallenge; protected TextView mTitleText; protected TextView mHeaderText; protected TextView mMessageText; protected LockPatternView mLockPatternView; Loading @@ -179,6 +182,7 @@ public class ChooseLockPattern extends SettingsActivity { private TextView mFooterRightButton; protected List<LockPatternView.Cell> mChosenPattern = null; private boolean mHideDrawer = false; private ColorStateList mDefaultHeaderColorList; // ScrollView that contains title and header, only exist in land mode private ScrollView mTitleHeaderScrollView; Loading Loading @@ -265,6 +269,9 @@ public class ChooseLockPattern extends SettingsActivity { private void patternInProgress() { mHeaderText.setText(R.string.lockpattern_recording_inprogress); if (mDefaultHeaderColorList != null) { mHeaderText.setTextColor(mDefaultHeaderColorList); } mFooterText.setText(""); mFooterLeftButton.setEnabled(false); mFooterRightButton.setEnabled(false); Loading Loading @@ -465,10 +472,13 @@ public class ChooseLockPattern extends SettingsActivity { return layout; } @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); mTitleText = view.findViewById(R.id.suw_layout_title); mHeaderText = (TextView) view.findViewById(R.id.headerText); mDefaultHeaderColorList = mHeaderText.getTextColors(); mMessageText = view.findViewById(R.id.message); mLockPatternView = (LockPatternView) view.findViewById(R.id.lockPattern); mLockPatternView.setOnPatternListener(mChooseNewLockPatternListener); Loading Loading @@ -664,6 +674,23 @@ public class ChooseLockPattern extends SettingsActivity { mFooterText.setText(stage.footerMessage); } if (stage == Stage.ConfirmWrong || stage == Stage.ChoiceTooShort) { TypedValue typedValue = new TypedValue(); Theme theme = getActivity().getTheme(); theme.resolveAttribute(R.attr.colorError, typedValue, true); mHeaderText.setTextColor(typedValue.data); } else { if (mDefaultHeaderColorList != null) { mHeaderText.setTextColor(mDefaultHeaderColorList); } if (stage == Stage.NeedToConfirm && mForFingerprint) { mHeaderText.setText(""); mTitleText.setText(R.string.lockpassword_draw_your_pattern_again_header); } } updateFooterLeftButton(stage, mFooterLeftButton); setRightButtonText(stage.rightMode.text); Loading