Merge "Use config_headlineFontFamily for password screens." into oc-dr1-dev

This commit is contained in:
TreeHugger Robot
2017-07-07 02:02:51 +00:00
committed by Android (Google) Code Review
7 changed files with 11 additions and 4 deletions

View File

@@ -76,7 +76,6 @@
android:inputType="textPassword"
android:imeOptions="actionNext|flagNoFullscreen|flagForceAscii"
android:gravity="center"
android:textSize="16sp"
style="@style/TextAppearance.PasswordEntry"/>
<TextView style="@style/TextAppearance.ConfirmDeviceCredentialsErrorText"

View File

@@ -59,7 +59,6 @@
android:gravity="center"
android:inputType="textPassword"
android:imeOptions="actionNext|flagNoExtractUi|flagForceAscii"
android:textSize="24sp"
style="@style/TextAppearance.PasswordEntry"/>
<android.support.v7.widget.RecyclerView

View File

@@ -76,7 +76,6 @@
android:inputType="textPassword"
android:imeOptions="actionNext|flagNoFullscreen|flagForceAscii"
android:gravity="center"
android:textSize="16sp"
style="@style/TextAppearance.PasswordEntry"/>
<TextView

View File

@@ -54,7 +54,6 @@
android:inputType="textPassword"
android:imeOptions="actionNext|flagNoFullscreen|flagForceAscii"
android:gravity="center"
android:textSize="16sp"
style="@style/TextAppearance.PasswordEntry"/>
<TextView

View File

@@ -79,6 +79,7 @@
<item name="android:gravity">center</item>
<item name="android:singleLine">true</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textSize">24sp</item>
</style>
<style name="TextAppearance.CryptKeeper_PasswordEntry" parent="android:TextAppearance.Material">

View File

@@ -30,6 +30,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.res.Resources.Theme;
import android.graphics.Insets;
import android.graphics.Typeface;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
@@ -375,6 +376,10 @@ public class ChooseLockPassword extends SettingsActivity {
int currentType = mPasswordEntry.getInputType();
mPasswordEntry.setInputType(mIsAlphaMode ? currentType
: (InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_PASSWORD));
// Can't set via XML since setInputType resets the fontFamily to null
mPasswordEntry.setTypeface(Typeface.create(
getContext().getString(com.android.internal.R.string.config_headlineFontFamily),
Typeface.NORMAL));
Intent intent = getActivity().getIntent();
final boolean confirmCredentials = intent.getBooleanExtra(

View File

@@ -20,6 +20,7 @@ import android.app.Fragment;
import android.app.admin.DevicePolicyManager;
import android.content.Context;
import android.content.Intent;
import android.graphics.Typeface;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.CountDownTimer;
@@ -172,6 +173,10 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
int currentType = mPasswordEntry.getInputType();
mPasswordEntry.setInputType(mIsAlpha ? currentType
: (InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_PASSWORD));
// Can't set via XML since setInputType resets the fontFamily to null
mPasswordEntry.setTypeface(Typeface.create(
getContext().getString(com.android.internal.R.string.config_headlineFontFamily),
Typeface.NORMAL));
mAppearAnimationUtils = new AppearAnimationUtils(getContext(),
220, 2f /* translationScale */, 1f /* delayScale*/,
AnimationUtils.loadInterpolator(getContext(),