Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a16a076 authored by Hao Dong's avatar Hao Dong Committed by Android (Google) Code Review
Browse files

Merge "Show generic ChooseLockPattern title for suw." into main

parents 392659f1 62fddbf4
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -469,9 +469,9 @@ public class ChooseLockPattern extends SettingsActivity {

        private void updateActivityTitle() {
            final String msg;
            if (mForFingerprint) {
            if (mForFingerprint && !shouldShowGenericTitle()) {
                msg = getString(R.string.lockpassword_choose_your_pattern_header_for_fingerprint);
            } else if (mForFace) {
            } else if (mForFace && !shouldShowGenericTitle()) {
                msg = getString(R.string.lockpassword_choose_your_pattern_header_for_face);
            } else if (mIsManagedProfile) {
                msg = getContext().getSystemService(DevicePolicyManager.class).getResources()
@@ -486,6 +486,10 @@ public class ChooseLockPattern extends SettingsActivity {
            getActivity().setTitle(msg);
        }

        protected boolean shouldShowGenericTitle() {
            return false;
        }

        @SuppressLint("ClickableViewAccessibility")
        @Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container,
+5 −0
Original line number Diff line number Diff line
@@ -160,6 +160,11 @@ public class SetupChooseLockPattern extends ChooseLockPattern {
            }
        }

        @Override
        protected boolean shouldShowGenericTitle() {
            return true;
        }

        @Override
        protected Intent getRedactionInterstitialIntent(Context context) {
            // Setup wizard's redaction interstitial is deferred to optional step. Enable that
+8 −0
Original line number Diff line number Diff line
@@ -220,6 +220,14 @@ public class SetupChooseLockPatternTest {
                application.getString(R.string.lockpassword_choose_your_pattern_description));
    }

    @Test
    public void createActivity_patternTitle_shouldShowGenericText() {
        final CharSequence headerView = mActivity.getTitle();

        assertThat(headerView).isEqualTo(
                application.getString(R.string.lockpassword_choose_your_pattern_header));
    }

    @Test
    public void inIntroductionStage_theHeaderHeight_shouldSetMinLinesTwoToPreventFlicker() {
        final PartnerCustomizationLayout layout = mActivity.findViewById(R.id.setup_wizard_layout);