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

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

Merge changes Icf921fe3,Ie1a8ee22 into nyc-dev am: 2ba26dd8

am: 3b656f7a

* commit '3b656f7a':
  Add a utility method to InputMethodInfo for FBE.
  Fix style issues in InputMethodInfo.java.
parents 038a878a 3b656f7a
Loading
Loading
Loading
Loading
+20 −2
Original line number Diff line number Diff line
@@ -38,7 +38,6 @@ import android.util.Printer;
import android.util.Slog;
import android.util.Xml;
import android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder;
import android.view.inputmethod.InputMethodSubtypeArray;

import java.io.IOException;
import java.util.ArrayList;
@@ -122,7 +121,7 @@ public final class InputMethodInfo implements Parcelable {
     * @param context The Context in which we are parsing the input method.
     * @param service The ResolveInfo returned from the package manager about
     * this input method's component.
     * @param additionalSubtypes additional subtypes being added to this InputMethodInfo
     * @param additionalSubtypesMap additional subtypes being added to this InputMethodInfo
     * @hide
     */
    public InputMethodInfo(Context context, ResolveInfo service,
@@ -429,12 +428,31 @@ public final class InputMethodInfo implements Parcelable {
        }
    }

    /**
     * @return {@code true} if the IME is marked to be Encryption-Aware.
     * @hide
     */
    public boolean isEncryptionAware() {
        if (mService == null || mService.serviceInfo == null ||
                mService.serviceInfo.applicationInfo == null) {
            return false;
        }
        return mService.serviceInfo.applicationInfo.isEncryptionAware();
    }

    public void dump(Printer pw, String prefix) {
        pw.println(prefix + "mId=" + mId
                + " mSettingsActivityName=" + mSettingsActivityName
                + " mSupportsSwitchingToNextInputMethod=" + mSupportsSwitchingToNextInputMethod);
        pw.println(prefix + "mIsDefaultResId=0x"
                + Integer.toHexString(mIsDefaultResId));
        if (mService != null && mService.serviceInfo != null &&
                mService.serviceInfo.applicationInfo != null) {
            pw.println(" encryptionAware=" +
                    mService.serviceInfo.applicationInfo.isEncryptionAware());
        } else {
            pw.println(" encryptionAware=unknown");
        }
        pw.println(prefix + "Service:");
        mService.dump(pw, prefix + "  ");
    }