Fix 3148496: Update LockScreen layouts on large device
This updates the layouts to conform to the latest UX spec on large devices and fixes a bug where the IME shown for PIN selection was the QWERTY keyboard. Change-Id: Ib9f0b1631f11c8eff6898bfff9447d3dad75cc42
This commit is contained in:
@@ -29,6 +29,7 @@ import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.text.Editable;
|
||||
import android.text.InputType;
|
||||
import android.text.Selection;
|
||||
import android.text.Spannable;
|
||||
import android.text.TextUtils;
|
||||
@@ -191,6 +192,10 @@ public class ChooseLockPassword extends PreferenceActivity {
|
||||
mHeaderText = (TextView) view.findViewById(R.id.headerText);
|
||||
mKeyboardView.requestFocus();
|
||||
|
||||
int currentType = mPasswordEntry.getInputType();
|
||||
mPasswordEntry.setInputType(mIsAlphaMode ? currentType
|
||||
: (currentType | InputType.TYPE_CLASS_NUMBER));
|
||||
|
||||
Intent intent = getActivity().getIntent();
|
||||
final boolean confirmCredentials = intent.getBooleanExtra("confirm_credentials", true);
|
||||
if (savedInstanceState == null) {
|
||||
|
@@ -26,6 +26,7 @@ import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.text.InputType;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -98,6 +99,11 @@ public class ConfirmLockPassword extends PreferenceActivity {
|
||||
mKeyboardHelper.setKeyboardMode(isAlpha ? PasswordEntryKeyboardHelper.KEYBOARD_MODE_ALPHA
|
||||
: PasswordEntryKeyboardHelper.KEYBOARD_MODE_NUMERIC);
|
||||
mKeyboardView.requestFocus();
|
||||
|
||||
int currentType = mPasswordEntry.getInputType();
|
||||
mPasswordEntry.setInputType(isAlpha ? currentType
|
||||
: (currentType | InputType.TYPE_CLASS_NUMBER));
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user