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

Commit 84b615b9 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix crash in ManageKeyboard screen in TvSettings."

parents eb338ad9 c9eb5559
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.content.res.Configuration;
import android.os.UserHandle;
import android.text.TextUtils;
import android.util.Log;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodInfo;
import android.view.inputmethod.InputMethodManager;
import android.view.inputmethod.InputMethodSubtype;
@@ -155,9 +156,16 @@ public class InputMethodPreference extends PrimarySwitchPreference
        final int iconSize = getContext().getResources().getDimensionPixelSize(
                R.dimen.secondary_app_icon_size);
        if (icon != null && iconSize > 0) {
            if (isTv()) {
                ViewGroup.LayoutParams params = icon.getLayoutParams();
                params.height = iconSize;
                params.width = iconSize;
                icon.setLayoutParams(params);
            } else {
                icon.setLayoutParams(new LinearLayout.LayoutParams(iconSize, iconSize));
            }
        }
    }

    @Override
    public boolean onPreferenceChange(final Preference preference, final Object newValue) {