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

Commit fc7672a0 authored by Yohei Yukawa's avatar Yohei Yukawa Committed by android-build-merger
Browse files

Check if InputMethodService is Direct Boot aware

am: 4e44a5ec

Change-Id: I53c8f33eeb6f02664a06a7b24e29e54f63725507
parents 692737b2 4e44a5ec
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ import android.widget.Toast;

import com.android.internal.inputmethod.InputMethodUtils;
import com.android.settings.R;
import com.android.settings.Utils;
import com.android.settingslib.RestrictedLockUtils;
import com.android.settingslib.RestrictedSwitchPreference;

@@ -149,7 +148,7 @@ class InputMethodPreference extends RestrictedSwitchPreference implements OnPref
        if (InputMethodUtils.isSystemIme(mImi)) {
            // Enable a system IME. No need to show a security warning dialog,
            // but we might need to prompt if it's not Direct Boot aware.
            if (Utils.isPackageDirectBootAware(getContext(), mImi.getPackageName())) {
            if (mImi.getServiceInfo().directBootAware) {
                setCheckedInternal(true);
            } else {
                showDirectBootWarnDialog();
@@ -245,7 +244,7 @@ class InputMethodPreference extends RestrictedSwitchPreference implements OnPref
            public void onClick(final DialogInterface dialog, final int which) {
                // The user confirmed to enable a 3rd party IME, but we might
                // need to prompt if it's not Direct Boot aware.
                if (Utils.isPackageDirectBootAware(getContext(), mImi.getPackageName())) {
                if (mImi.getServiceInfo().directBootAware) {
                    setCheckedInternal(true);
                } else {
                    showDirectBootWarnDialog();