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

Commit af1aa710 authored by Fan Zhang's avatar Fan Zhang
Browse files

Force sentence case for free form edit preferences

Change-Id: I5e718a8a3d11894a28b09217cf39b06ab4af78e8
Fixes: 68038971
Test: visual
parent 86259365
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -15,6 +15,9 @@
 */
package com.android.settingslib;

import static android.text.InputType.TYPE_CLASS_TEXT;
import static android.text.InputType.TYPE_TEXT_FLAG_CAP_SENTENCES;

import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
@@ -80,6 +83,7 @@ public class CustomEditTextPreference extends EditTextPreference {
    protected void onBindDialogView(View view) {
        final EditText editText = view.findViewById(android.R.id.edit);
        if (editText != null) {
            editText.setInputType(TYPE_CLASS_TEXT | TYPE_TEXT_FLAG_CAP_SENTENCES);
            editText.requestFocus();
        }
    }