Loading core/api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -1420,6 +1420,7 @@ package android { field public static final int supportsMultipleDisplays = 16844182; // 0x1010596 field public static final int supportsPictureInPicture = 16844023; // 0x10104f7 field public static final int supportsRtl = 16843695; // 0x10103af field public static final int supportsStylusHandwriting; field public static final int supportsSwitchingToNextInputMethod = 16843755; // 0x10103eb field public static final int supportsUploading = 16843419; // 0x101029b field public static final int suppressesSpellChecker = 16844355; // 0x1010643 Loading Loading @@ -52857,6 +52858,7 @@ package android.view.inputmethod { method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager); method public CharSequence loadLabel(android.content.pm.PackageManager); method public boolean shouldShowInInputMethodPicker(); method public boolean supportsStylusHandwriting(); method public boolean suppressesSpellChecker(); method public void writeToParcel(android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.view.inputmethod.InputMethodInfo> CREATOR; core/java/android/view/inputmethod/InputMethodInfo.java +28 −6 Original line number Diff line number Diff line Loading @@ -140,6 +140,12 @@ public final class InputMethodInfo implements Parcelable { */ private final int mHandledConfigChanges; /** * The flag whether this IME supports Handwriting using stylus input. */ private final boolean mSupportsStylusHandwriting; /** * @param service the {@link ResolveInfo} corresponds in which the IME is implemented. * @return a unique ID to be returned by {@link #getId()}. We have used Loading Loading @@ -234,6 +240,8 @@ public final class InputMethodInfo implements Parcelable { com.android.internal.R.styleable.InputMethod_showInInputMethodPicker, true); mHandledConfigChanges = sa.getInt( com.android.internal.R.styleable.InputMethod_configChanges, 0); mSupportsStylusHandwriting = sa.getBoolean( com.android.internal.R.styleable.InputMethod_supportsStylusHandwriting, false); sa.recycle(); final int depth = parser.getDepth(); Loading Loading @@ -323,6 +331,7 @@ public final class InputMethodInfo implements Parcelable { mService = ResolveInfo.CREATOR.createFromParcel(source); mSubtypes = new InputMethodSubtypeArray(source); mHandledConfigChanges = source.readInt(); mSupportsStylusHandwriting = source.readBoolean(); mForceDefault = false; } Loading @@ -335,7 +344,7 @@ public final class InputMethodInfo implements Parcelable { settingsActivity, null /* subtypes */, 0 /* isDefaultResId */, false /* forceDefault */, true /* supportsSwitchingToNextInputMethod */, false /* inlineSuggestionsEnabled */, false /* isVrOnly */, 0 /* handledConfigChanges */); 0 /* handledConfigChanges */, false /* supportsStylusHandwriting */); } /** Loading @@ -349,7 +358,8 @@ public final class InputMethodInfo implements Parcelable { this(buildFakeResolveInfo(packageName, className, label), false /* isAuxIme */, settingsActivity, null /* subtypes */, 0 /* isDefaultResId */, false /* forceDefault */, true /* supportsSwitchingToNextInputMethod */, false /* inlineSuggestionsEnabled */, false /* isVrOnly */, handledConfigChanges); false /* inlineSuggestionsEnabled */, false /* isVrOnly */, handledConfigChanges, false /* supportsStylusHandwriting */); } /** Loading @@ -361,7 +371,8 @@ public final class InputMethodInfo implements Parcelable { boolean forceDefault) { this(ri, isAuxIme, settingsActivity, subtypes, isDefaultResId, forceDefault, true /* supportsSwitchingToNextInputMethod */, false /* inlineSuggestionsEnabled */, false /* isVrOnly */, 0 /* handledconfigChanges */); false /* isVrOnly */, 0 /* handledconfigChanges */, false /* supportsStylusHandwriting */); } /** Loading @@ -373,7 +384,7 @@ public final class InputMethodInfo implements Parcelable { boolean supportsSwitchingToNextInputMethod, boolean isVrOnly) { this(ri, isAuxIme, settingsActivity, subtypes, isDefaultResId, forceDefault, supportsSwitchingToNextInputMethod, false /* inlineSuggestionsEnabled */, isVrOnly, 0 /* handledConfigChanges */); 0 /* handledConfigChanges */, false /* supportsStylusHandwriting */); } /** Loading @@ -383,7 +394,7 @@ public final class InputMethodInfo implements Parcelable { public InputMethodInfo(ResolveInfo ri, boolean isAuxIme, String settingsActivity, List<InputMethodSubtype> subtypes, int isDefaultResId, boolean forceDefault, boolean supportsSwitchingToNextInputMethod, boolean inlineSuggestionsEnabled, boolean isVrOnly, int handledConfigChanges) { boolean isVrOnly, int handledConfigChanges, boolean supportsStylusHandwriting) { final ServiceInfo si = ri.serviceInfo; mService = ri; mId = new ComponentName(si.packageName, si.name).flattenToShortString(); Loading @@ -398,6 +409,7 @@ public final class InputMethodInfo implements Parcelable { mShowInInputMethodPicker = true; mIsVrOnly = isVrOnly; mHandledConfigChanges = handledConfigChanges; mSupportsStylusHandwriting = supportsStylusHandwriting; } private static ResolveInfo buildFakeResolveInfo(String packageName, String className, Loading Loading @@ -556,6 +568,14 @@ public final class InputMethodInfo implements Parcelable { return mHandledConfigChanges; } /** * Returns if IME supports handwriting using stylus input. * @attr ref android.R.styleable#InputMethod_supportsStylusHandwriting */ public boolean supportsStylusHandwriting() { return mSupportsStylusHandwriting; } public void dump(Printer pw, String prefix) { pw.println(prefix + "mId=" + mId + " mSettingsActivityName=" + mSettingsActivityName Loading @@ -563,7 +583,8 @@ public final class InputMethodInfo implements Parcelable { + " mSupportsSwitchingToNextInputMethod=" + mSupportsSwitchingToNextInputMethod + " mInlineSuggestionsEnabled=" + mInlineSuggestionsEnabled + " mSuppressesSpellChecker=" + mSuppressesSpellChecker + " mShowInInputMethodPicker=" + mShowInInputMethodPicker); + " mShowInInputMethodPicker=" + mShowInInputMethodPicker + " mSupportsStylusHandwriting=" + mSupportsStylusHandwriting); pw.println(prefix + "mIsDefaultResId=0x" + Integer.toHexString(mIsDefaultResId)); pw.println(prefix + "Service:"); Loading Loading @@ -667,6 +688,7 @@ public final class InputMethodInfo implements Parcelable { mService.writeToParcel(dest, flags); mSubtypes.writeToParcel(dest); dest.writeInt(mHandledConfigChanges); dest.writeBoolean(mSupportsStylusHandwriting); } /** Loading core/res/res/values/attrs.xml +3 −0 Original line number Diff line number Diff line Loading @@ -3638,6 +3638,9 @@ to re-retrieve all resources (including view layouts, drawables, etc) to correctly handle any configuration change.--> <attr name="configChanges" /> <!-- Specifies whether the IME supports Handwriting using stylus. Defaults to false. --> <attr name="supportsStylusHandwriting" format="boolean" /> </declare-styleable> <!-- This is the subtype of InputMethod. Subtype can describe locales (for example, en_US and Loading core/res/res/values/public.xml +1 −0 Original line number Diff line number Diff line Loading @@ -3249,6 +3249,7 @@ <public name="canDisplayOnRemoteDevices" /> <public name="supportedTypes" /> <public name="resetEnabledSettingsOnAppDataCleared" /> <public name="supportsStylusHandwriting" /> </staging-public-group> <staging-public-group type="id" first-id="0x01de0000"> Loading services/core/java/com/android/server/inputmethod/InputMethodBindingController.java +5 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ final class InputMethodBindingController { private IBinder mCurToken; private int mCurSeq; private boolean mVisibleBound; private boolean mSupportsStylusHw; /** * Binding flags for establishing connection to the {@link InputMethodService}. Loading Loading @@ -295,6 +296,10 @@ final class InputMethodBindingController { mService.scheduleNotifyImeUidToAudioService(mCurMethodUid); mService.reRequestCurrentClientSessionLocked(); } mSupportsStylusHw = mMethodMap.get(mSelectedMethodId).supportsStylusHandwriting(); if (mSupportsStylusHw) { // TODO init Handwriting spy. } } Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER); } Loading Loading
core/api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -1420,6 +1420,7 @@ package android { field public static final int supportsMultipleDisplays = 16844182; // 0x1010596 field public static final int supportsPictureInPicture = 16844023; // 0x10104f7 field public static final int supportsRtl = 16843695; // 0x10103af field public static final int supportsStylusHandwriting; field public static final int supportsSwitchingToNextInputMethod = 16843755; // 0x10103eb field public static final int supportsUploading = 16843419; // 0x101029b field public static final int suppressesSpellChecker = 16844355; // 0x1010643 Loading Loading @@ -52857,6 +52858,7 @@ package android.view.inputmethod { method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager); method public CharSequence loadLabel(android.content.pm.PackageManager); method public boolean shouldShowInInputMethodPicker(); method public boolean supportsStylusHandwriting(); method public boolean suppressesSpellChecker(); method public void writeToParcel(android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.view.inputmethod.InputMethodInfo> CREATOR;
core/java/android/view/inputmethod/InputMethodInfo.java +28 −6 Original line number Diff line number Diff line Loading @@ -140,6 +140,12 @@ public final class InputMethodInfo implements Parcelable { */ private final int mHandledConfigChanges; /** * The flag whether this IME supports Handwriting using stylus input. */ private final boolean mSupportsStylusHandwriting; /** * @param service the {@link ResolveInfo} corresponds in which the IME is implemented. * @return a unique ID to be returned by {@link #getId()}. We have used Loading Loading @@ -234,6 +240,8 @@ public final class InputMethodInfo implements Parcelable { com.android.internal.R.styleable.InputMethod_showInInputMethodPicker, true); mHandledConfigChanges = sa.getInt( com.android.internal.R.styleable.InputMethod_configChanges, 0); mSupportsStylusHandwriting = sa.getBoolean( com.android.internal.R.styleable.InputMethod_supportsStylusHandwriting, false); sa.recycle(); final int depth = parser.getDepth(); Loading Loading @@ -323,6 +331,7 @@ public final class InputMethodInfo implements Parcelable { mService = ResolveInfo.CREATOR.createFromParcel(source); mSubtypes = new InputMethodSubtypeArray(source); mHandledConfigChanges = source.readInt(); mSupportsStylusHandwriting = source.readBoolean(); mForceDefault = false; } Loading @@ -335,7 +344,7 @@ public final class InputMethodInfo implements Parcelable { settingsActivity, null /* subtypes */, 0 /* isDefaultResId */, false /* forceDefault */, true /* supportsSwitchingToNextInputMethod */, false /* inlineSuggestionsEnabled */, false /* isVrOnly */, 0 /* handledConfigChanges */); 0 /* handledConfigChanges */, false /* supportsStylusHandwriting */); } /** Loading @@ -349,7 +358,8 @@ public final class InputMethodInfo implements Parcelable { this(buildFakeResolveInfo(packageName, className, label), false /* isAuxIme */, settingsActivity, null /* subtypes */, 0 /* isDefaultResId */, false /* forceDefault */, true /* supportsSwitchingToNextInputMethod */, false /* inlineSuggestionsEnabled */, false /* isVrOnly */, handledConfigChanges); false /* inlineSuggestionsEnabled */, false /* isVrOnly */, handledConfigChanges, false /* supportsStylusHandwriting */); } /** Loading @@ -361,7 +371,8 @@ public final class InputMethodInfo implements Parcelable { boolean forceDefault) { this(ri, isAuxIme, settingsActivity, subtypes, isDefaultResId, forceDefault, true /* supportsSwitchingToNextInputMethod */, false /* inlineSuggestionsEnabled */, false /* isVrOnly */, 0 /* handledconfigChanges */); false /* isVrOnly */, 0 /* handledconfigChanges */, false /* supportsStylusHandwriting */); } /** Loading @@ -373,7 +384,7 @@ public final class InputMethodInfo implements Parcelable { boolean supportsSwitchingToNextInputMethod, boolean isVrOnly) { this(ri, isAuxIme, settingsActivity, subtypes, isDefaultResId, forceDefault, supportsSwitchingToNextInputMethod, false /* inlineSuggestionsEnabled */, isVrOnly, 0 /* handledConfigChanges */); 0 /* handledConfigChanges */, false /* supportsStylusHandwriting */); } /** Loading @@ -383,7 +394,7 @@ public final class InputMethodInfo implements Parcelable { public InputMethodInfo(ResolveInfo ri, boolean isAuxIme, String settingsActivity, List<InputMethodSubtype> subtypes, int isDefaultResId, boolean forceDefault, boolean supportsSwitchingToNextInputMethod, boolean inlineSuggestionsEnabled, boolean isVrOnly, int handledConfigChanges) { boolean isVrOnly, int handledConfigChanges, boolean supportsStylusHandwriting) { final ServiceInfo si = ri.serviceInfo; mService = ri; mId = new ComponentName(si.packageName, si.name).flattenToShortString(); Loading @@ -398,6 +409,7 @@ public final class InputMethodInfo implements Parcelable { mShowInInputMethodPicker = true; mIsVrOnly = isVrOnly; mHandledConfigChanges = handledConfigChanges; mSupportsStylusHandwriting = supportsStylusHandwriting; } private static ResolveInfo buildFakeResolveInfo(String packageName, String className, Loading Loading @@ -556,6 +568,14 @@ public final class InputMethodInfo implements Parcelable { return mHandledConfigChanges; } /** * Returns if IME supports handwriting using stylus input. * @attr ref android.R.styleable#InputMethod_supportsStylusHandwriting */ public boolean supportsStylusHandwriting() { return mSupportsStylusHandwriting; } public void dump(Printer pw, String prefix) { pw.println(prefix + "mId=" + mId + " mSettingsActivityName=" + mSettingsActivityName Loading @@ -563,7 +583,8 @@ public final class InputMethodInfo implements Parcelable { + " mSupportsSwitchingToNextInputMethod=" + mSupportsSwitchingToNextInputMethod + " mInlineSuggestionsEnabled=" + mInlineSuggestionsEnabled + " mSuppressesSpellChecker=" + mSuppressesSpellChecker + " mShowInInputMethodPicker=" + mShowInInputMethodPicker); + " mShowInInputMethodPicker=" + mShowInInputMethodPicker + " mSupportsStylusHandwriting=" + mSupportsStylusHandwriting); pw.println(prefix + "mIsDefaultResId=0x" + Integer.toHexString(mIsDefaultResId)); pw.println(prefix + "Service:"); Loading Loading @@ -667,6 +688,7 @@ public final class InputMethodInfo implements Parcelable { mService.writeToParcel(dest, flags); mSubtypes.writeToParcel(dest); dest.writeInt(mHandledConfigChanges); dest.writeBoolean(mSupportsStylusHandwriting); } /** Loading
core/res/res/values/attrs.xml +3 −0 Original line number Diff line number Diff line Loading @@ -3638,6 +3638,9 @@ to re-retrieve all resources (including view layouts, drawables, etc) to correctly handle any configuration change.--> <attr name="configChanges" /> <!-- Specifies whether the IME supports Handwriting using stylus. Defaults to false. --> <attr name="supportsStylusHandwriting" format="boolean" /> </declare-styleable> <!-- This is the subtype of InputMethod. Subtype can describe locales (for example, en_US and Loading
core/res/res/values/public.xml +1 −0 Original line number Diff line number Diff line Loading @@ -3249,6 +3249,7 @@ <public name="canDisplayOnRemoteDevices" /> <public name="supportedTypes" /> <public name="resetEnabledSettingsOnAppDataCleared" /> <public name="supportsStylusHandwriting" /> </staging-public-group> <staging-public-group type="id" first-id="0x01de0000"> Loading
services/core/java/com/android/server/inputmethod/InputMethodBindingController.java +5 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ final class InputMethodBindingController { private IBinder mCurToken; private int mCurSeq; private boolean mVisibleBound; private boolean mSupportsStylusHw; /** * Binding flags for establishing connection to the {@link InputMethodService}. Loading Loading @@ -295,6 +296,10 @@ final class InputMethodBindingController { mService.scheduleNotifyImeUidToAudioService(mCurMethodUid); mService.reRequestCurrentClientSessionLocked(); } mSupportsStylusHw = mMethodMap.get(mSelectedMethodId).supportsStylusHandwriting(); if (mSupportsStylusHw) { // TODO init Handwriting spy. } } Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER); } Loading