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

Commit 8171b518 authored by Jae Yong Sung's avatar Jae Yong Sung
Browse files

lock screen for xlarge

Change-Id: Iab9f53609bf24be774752a9960aaaa654d7a614f
parent aece2d0c
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -86994,6 +86994,24 @@
</parameter>
<parameter name="modeId" type="int">
</parameter>
<parameter name="width" type="int">
</parameter>
<parameter name="height" type="int">
</parameter>
</constructor>
<constructor name="Keyboard"
 type="android.inputmethodservice.Keyboard"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="context" type="android.content.Context">
</parameter>
<parameter name="xmlLayoutResId" type="int">
</parameter>
<parameter name="modeId" type="int">
</parameter>
</constructor>
<constructor name="Keyboard"
 type="android.inputmethodservice.Keyboard"
+24 −1
Original line number Diff line number Diff line
@@ -501,6 +501,29 @@ public class Keyboard {
        this(context, xmlLayoutResId, 0);
    }

    /**
     * Creates a keyboard from the given xml key layout file. Weeds out rows
     * that have a keyboard mode defined but don't match the specified mode.
     * @param context the application or service context
     * @param xmlLayoutResId the resource file that contains the keyboard layout and keys.
     * @param modeId keyboard mode identifier
     * @param width sets width of keyboard
     * @param height sets height of keyboard
     */
    public Keyboard(Context context, int xmlLayoutResId, int modeId, int width, int height) {
        mDisplayWidth = width;
        mDisplayHeight = height;

        mDefaultHorizontalGap = 0;
        mDefaultWidth = mDisplayWidth / 10;
        mDefaultVerticalGap = 0;
        mDefaultHeight = mDefaultWidth;
        mKeys = new ArrayList<Key>();
        mModifierKeys = new ArrayList<Key>();
        mKeyboardMode = modeId;
        loadKeyboard(context, context.getResources().getXml(xmlLayoutResId));
    }

    /**
     * Creates a keyboard from the given xml key layout file. Weeds out rows
     * that have a keyboard mode defined but don't match the specified mode. 
+14 −0
Original line number Diff line number Diff line
@@ -67,8 +67,22 @@ public class PasswordEntryKeyboard extends Keyboard {
        this(context, xmlLayoutResId, 0);
    }

    public PasswordEntryKeyboard(Context context, int xmlLayoutResId, int width, int height) {
        this(context, xmlLayoutResId, 0, width, height);
    }

    public PasswordEntryKeyboard(Context context, int xmlLayoutResId, int mode) {
        super(context, xmlLayoutResId, mode);
        init(context);
    }

    public PasswordEntryKeyboard(Context context, int xmlLayoutResId, int mode,
            int width, int height) {
        super(context, xmlLayoutResId, mode, width, height);
        init(context);
    }

    private void init(Context context) {
        final Resources res = context.getResources();
        mRes = res;
        mShiftIcon = res.getDrawable(R.drawable.sym_keyboard_shift);
+34 −1
Original line number Diff line number Diff line
@@ -54,10 +54,20 @@ public class PasswordEntryKeyboardHelper implements OnKeyboardActionListener {
    private Vibrator mVibrator;

    public PasswordEntryKeyboardHelper(Context context, KeyboardView keyboardView, View targetView) {
        this(context, keyboardView, targetView, true);
    }

    public PasswordEntryKeyboardHelper(Context context, KeyboardView keyboardView, View targetView,
            boolean useFullScreenWidth) {
        mContext = context;
        mTargetView = targetView;
        mKeyboardView = keyboardView;
        if (useFullScreenWidth || mKeyboardView.getLayoutParams().width == -1) {
            createKeyboards();
        } else {
            createKeyboardsWithSpecificSize(mKeyboardView.getLayoutParams().width,
                    mKeyboardView.getLayoutParams().height);
        }
        mKeyboardView.setOnKeyboardActionListener(this);
        mVibrator = new Vibrator();
    }
@@ -66,6 +76,29 @@ public class PasswordEntryKeyboardHelper implements OnKeyboardActionListener {
        return mKeyboardMode == KEYBOARD_MODE_ALPHA;
    }

    private void createKeyboardsWithSpecificSize(int viewWidth, int viewHeight) {
        mNumericKeyboard = new PasswordEntryKeyboard(mContext, R.xml.password_kbd_numeric,
                viewWidth, viewHeight);
        mQwertyKeyboard = new PasswordEntryKeyboard(mContext,
                R.xml.password_kbd_qwerty, R.id.mode_normal, viewWidth, viewHeight);
        mQwertyKeyboard.enableShiftLock();

        mQwertyKeyboardShifted = new PasswordEntryKeyboard(mContext,
                R.xml.password_kbd_qwerty_shifted,
                R.id.mode_normal, viewWidth, viewHeight);
        mQwertyKeyboardShifted.enableShiftLock();
        mQwertyKeyboardShifted.setShifted(true); // always shifted.

        mSymbolsKeyboard = new PasswordEntryKeyboard(mContext, R.xml.password_kbd_symbols,
                viewWidth, viewHeight);
        mSymbolsKeyboard.enableShiftLock();

        mSymbolsKeyboardShifted = new PasswordEntryKeyboard(mContext,
                R.xml.password_kbd_symbols_shift, viewWidth, viewHeight);
        mSymbolsKeyboardShifted.enableShiftLock();
        mSymbolsKeyboardShifted.setShifted(true); // always shifted
    }

    private void createKeyboards() {
        mNumericKeyboard = new PasswordEntryKeyboard(mContext, R.xml.password_kbd_numeric);
        mQwertyKeyboard = new PasswordEntryKeyboard(mContext,
+2.76 KiB
Loading image diff...
Loading