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

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

Merge "Check if InputMethodService is Direct Boot aware" into nyc-mr1-dev

parents e4ae0a88 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();