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

Commit d85fafce authored by Maurice Lam's avatar Maurice Lam Committed by Android (Google) Code Review
Browse files

Merge "[ScreenLock] Change title of encryption interstitial" into mnc-dev

parents d10026cb 15546c0b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -6370,8 +6370,8 @@
    <!-- Title for IMEI preference [CHAR LIMIT=30] -->
    <string name="imei_information_title">IMEI information</string>
    <!-- Encryption interstitial title [CHAR LIMIT=30] -->
    <string name="encryption_interstitial_header">Encryption</string>
    <!-- Encryption interstitial title. This screen asks the user whether the device will ask for a PIN / pattern / password before the device starts up. [CHAR LIMIT=30] -->
    <string name="encryption_interstitial_header">Secure start-up</string>
    <!-- Encryption interstitial button to continue with the shown setting.  Appears on screen that asks the user to opt in/out of encrypting device with a pin/pattern/password. [CHAR LIMIT=NONE] -->
    <string name="encryption_continue_button">Continue</string>
+2 −17
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ import com.android.setupwizardlib.SetupWizardLayout;
import com.android.setupwizardlib.view.NavigationBar;

import android.app.Activity;
import android.app.admin.DevicePolicyManager;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
@@ -77,8 +76,7 @@ public class SetupEncryptionInterstitial extends EncryptionInterstitial {
            layout.setIllustration(R.drawable.setup_illustration_lock_screen,
                    R.drawable.setup_illustration_horizontal_tile);
            layout.setBackgroundTile(R.drawable.setup_illustration_tile);
            final int headerTextResource = getHeaderTextResource();
            layout.setHeaderText(headerTextResource);
            layout.setHeaderText(R.string.encryption_interstitial_header);

            View content = super.onCreateView(inflater, layout, savedInstanceState);
            layout.addView(content);
@@ -86,25 +84,12 @@ public class SetupEncryptionInterstitial extends EncryptionInterstitial {

            Activity activity = getActivity();
            if (activity != null) {
                activity.setTitle(headerTextResource);
                activity.setTitle(R.string.encryption_interstitial_header);
                SetupWizardUtils.setImmersiveMode(activity);
            }
            return layout;
        }

        private int getHeaderTextResource() {
            final int quality = getActivity().getIntent().getIntExtra(EXTRA_PASSWORD_QUALITY, 0);
            switch (quality) {
                case DevicePolicyManager.PASSWORD_QUALITY_SOMETHING:
                    return R.string.unlock_set_unlock_pattern_title;
                case DevicePolicyManager.PASSWORD_QUALITY_NUMERIC:
                case DevicePolicyManager.PASSWORD_QUALITY_NUMERIC_COMPLEX:
                    return R.string.unlock_set_unlock_pin_title;
                default:
                    return R.string.unlock_set_unlock_password_title;
            }
        }

        @Override
        public void onNavigateBack() {
            final Activity activity = getActivity();