Merge "[ScreenLock] Change title of encryption interstitial" into mnc-dev
This commit is contained in:
@@ -6370,8 +6370,8 @@
|
|||||||
<!-- Title for IMEI preference [CHAR LIMIT=30] -->
|
<!-- Title for IMEI preference [CHAR LIMIT=30] -->
|
||||||
<string name="imei_information_title">IMEI information</string>
|
<string name="imei_information_title">IMEI information</string>
|
||||||
|
|
||||||
<!-- Encryption interstitial title [CHAR LIMIT=30] -->
|
<!-- 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">Encryption</string>
|
<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] -->
|
<!-- 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>
|
<string name="encryption_continue_button">Continue</string>
|
||||||
|
@@ -20,7 +20,6 @@ import com.android.setupwizardlib.SetupWizardLayout;
|
|||||||
import com.android.setupwizardlib.view.NavigationBar;
|
import com.android.setupwizardlib.view.NavigationBar;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.admin.DevicePolicyManager;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
@@ -77,8 +76,7 @@ public class SetupEncryptionInterstitial extends EncryptionInterstitial {
|
|||||||
layout.setIllustration(R.drawable.setup_illustration_lock_screen,
|
layout.setIllustration(R.drawable.setup_illustration_lock_screen,
|
||||||
R.drawable.setup_illustration_horizontal_tile);
|
R.drawable.setup_illustration_horizontal_tile);
|
||||||
layout.setBackgroundTile(R.drawable.setup_illustration_tile);
|
layout.setBackgroundTile(R.drawable.setup_illustration_tile);
|
||||||
final int headerTextResource = getHeaderTextResource();
|
layout.setHeaderText(R.string.encryption_interstitial_header);
|
||||||
layout.setHeaderText(headerTextResource);
|
|
||||||
|
|
||||||
View content = super.onCreateView(inflater, layout, savedInstanceState);
|
View content = super.onCreateView(inflater, layout, savedInstanceState);
|
||||||
layout.addView(content);
|
layout.addView(content);
|
||||||
@@ -86,25 +84,12 @@ public class SetupEncryptionInterstitial extends EncryptionInterstitial {
|
|||||||
|
|
||||||
Activity activity = getActivity();
|
Activity activity = getActivity();
|
||||||
if (activity != null) {
|
if (activity != null) {
|
||||||
activity.setTitle(headerTextResource);
|
activity.setTitle(R.string.encryption_interstitial_header);
|
||||||
SetupWizardUtils.setImmersiveMode(activity);
|
SetupWizardUtils.setImmersiveMode(activity);
|
||||||
}
|
}
|
||||||
return layout;
|
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
|
@Override
|
||||||
public void onNavigateBack() {
|
public void onNavigateBack() {
|
||||||
final Activity activity = getActivity();
|
final Activity activity = getActivity();
|
||||||
|
Reference in New Issue
Block a user