Merge changes Icf921fe3,Ie1a8ee22 into nyc-dev

am: 2ba26dd87c

* commit '2ba26dd87c43e82255f01c5226b4d6264eea5526':
  Add a utility method to InputMethodInfo for FBE.
  Fix style issues in InputMethodInfo.java.
This commit is contained in:
Yohei Yukawa
2016-02-09 19:53:32 +00:00
committed by android-build-merger

View File

@@ -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 + " ");
}