Loading api/current.xml +146 −0 Original line number Original line Diff line number Diff line Loading @@ -219732,6 +219732,19 @@ <parameter name="text" type="android.view.inputmethod.CompletionInfo"> <parameter name="text" type="android.view.inputmethod.CompletionInfo"> </parameter> </parameter> </method> </method> <method name="commitCorrection" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="correctionInfo" type="android.view.inputmethod.CorrectionInfo"> </parameter> </method> <method name="commitText" <method name="commitText" return="boolean" return="boolean" abstract="false" abstract="false" Loading Loading @@ -220152,6 +220165,100 @@ > > </field> </field> </class> </class> <class name="CorrectionInfo" extends="java.lang.Object" abstract="false" static="false" final="true" deprecated="not deprecated" visibility="public" > <implements name="android.os.Parcelable"> </implements> <constructor name="CorrectionInfo" type="android.view.inputmethod.CorrectionInfo" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="offset" type="int"> </parameter> <parameter name="oldText" type="java.lang.CharSequence"> </parameter> <parameter name="newText" type="java.lang.CharSequence"> </parameter> </constructor> <method name="describeContents" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getNewText" return="java.lang.CharSequence" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getOffset" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getOldText" return="java.lang.CharSequence" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="writeToParcel" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="dest" type="android.os.Parcel"> </parameter> <parameter name="flags" type="int"> </parameter> </method> <field name="CREATOR" type="android.os.Parcelable.Creator" transient="false" volatile="false" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> </class> <class name="EditorInfo" <class name="EditorInfo" extends="java.lang.Object" extends="java.lang.Object" abstract="false" abstract="false" Loading Loading @@ -220958,6 +221065,19 @@ <parameter name="text" type="android.view.inputmethod.CompletionInfo"> <parameter name="text" type="android.view.inputmethod.CompletionInfo"> </parameter> </parameter> </method> </method> <method name="commitCorrection" return="boolean" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="correctionInfo" type="android.view.inputmethod.CorrectionInfo"> </parameter> </method> <method name="commitText" <method name="commitText" return="boolean" return="boolean" abstract="true" abstract="true" Loading Loading @@ -221275,6 +221395,19 @@ <parameter name="text" type="android.view.inputmethod.CompletionInfo"> <parameter name="text" type="android.view.inputmethod.CompletionInfo"> </parameter> </parameter> </method> </method> <method name="commitCorrection" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="correctionInfo" type="android.view.inputmethod.CorrectionInfo"> </parameter> </method> <method name="commitText" <method name="commitText" return="boolean" return="boolean" abstract="false" abstract="false" Loading Loading @@ -247819,6 +247952,19 @@ <parameter name="text" type="android.view.inputmethod.CompletionInfo"> <parameter name="text" type="android.view.inputmethod.CompletionInfo"> </parameter> </parameter> </method> </method> <method name="onCommitCorrection" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="info" type="android.view.inputmethod.CorrectionInfo"> </parameter> </method> <method name="onEditorAction" <method name="onEditorAction" return="void" return="void" abstract="false" abstract="false" core/java/android/view/inputmethod/BaseInputConnection.java +8 −1 Original line number Original line Diff line number Diff line Loading @@ -164,12 +164,19 @@ public class BaseInputConnection implements InputConnection { } } /** /** * Default implementation does nothing. * Default implementation does nothing and returns false. */ */ public boolean commitCompletion(CompletionInfo text) { public boolean commitCompletion(CompletionInfo text) { return false; return false; } } /** * Default implementation does nothing and returns false. */ public boolean commitCorrection(CorrectionInfo correctionInfo) { return false; } /** /** * Default implementation replaces any existing composing text with * Default implementation replaces any existing composing text with * the given text. In addition, only if dummy mode, a key event is * the given text. In addition, only if dummy mode, a key event is Loading core/java/android/view/inputmethod/CompletionInfo.java +7 −9 Original line number Original line Diff line number Diff line Loading @@ -25,12 +25,10 @@ import android.text.TextUtils; * an input method. * an input method. */ */ public final class CompletionInfo implements Parcelable { public final class CompletionInfo implements Parcelable { static final String TAG = "CompletionInfo"; private final long mId; private final int mPosition; final long mId; private final CharSequence mText; final int mPosition; private final CharSequence mLabel; final CharSequence mText; final CharSequence mLabel; /** /** * Create a simple completion with just text, no label. * Create a simple completion with just text, no label. Loading @@ -52,7 +50,7 @@ public final class CompletionInfo implements Parcelable { mLabel = label; mLabel = label; } } CompletionInfo(Parcel source) { private CompletionInfo(Parcel source) { mId = source.readLong(); mId = source.readLong(); mPosition = source.readInt(); mPosition = source.readInt(); mText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(source); mText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(source); Loading core/java/android/view/inputmethod/CorrectionInfo.aidl 0 → 100644 +19 −0 Original line number Original line Diff line number Diff line /* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.view.inputmethod; parcelable CorrectionInfo; core/java/android/view/inputmethod/CorrectionInfo.java 0 → 100644 +105 −0 Original line number Original line Diff line number Diff line /* * Copyright (C) 2007-2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package android.view.inputmethod; import android.os.Parcel; import android.os.Parcelable; import android.text.TextUtils; /** * Information about a single text correction that an editor has reported to * an input method. */ public final class CorrectionInfo implements Parcelable { private final int mOffset; private final CharSequence mOldText; private final CharSequence mNewText; /** * @param offset The offset in the edited text where the old and new text start. * @param oldText The old text that has been replaced. * @param newText The replacement text. */ public CorrectionInfo(int offset, CharSequence oldText, CharSequence newText) { mOffset = offset; mOldText = oldText; mNewText = newText; } private CorrectionInfo(Parcel source) { mOffset = source.readInt(); mOldText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(source); mNewText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(source); } /** * Return the offset position of this correction in the text. Both the {@link #getOldText()} and * {@link #getNewText()} start at this offset. */ public int getOffset() { return mOffset; } /** * Return the text that has actually been typed by the user, and which has been corrected. */ public CharSequence getOldText() { return mOldText; } /** * Return the new text that corrects what was typed by the user. */ public CharSequence getNewText() { return mNewText; } @Override public String toString() { return "CorrectionInfo{#" + mOffset + " \"" + mOldText + "\" -> \"" + mNewText + "\"}"; } /** * Used to package this object into a {@link Parcel}. * * @param dest The {@link Parcel} to be written. * @param flags The flags used for parceling. */ public void writeToParcel(Parcel dest, int flags) { dest.writeInt(mOffset); TextUtils.writeToParcel(mOldText, dest, flags); TextUtils.writeToParcel(mNewText, dest, flags); } /** * Used to make this class parcelable. */ public static final Parcelable.Creator<CorrectionInfo> CREATOR = new Parcelable.Creator<CorrectionInfo>() { public CorrectionInfo createFromParcel(Parcel source) { return new CorrectionInfo(source); } public CorrectionInfo[] newArray(int size) { return new CorrectionInfo[size]; } }; public int describeContents() { return 0; } } Loading
api/current.xml +146 −0 Original line number Original line Diff line number Diff line Loading @@ -219732,6 +219732,19 @@ <parameter name="text" type="android.view.inputmethod.CompletionInfo"> <parameter name="text" type="android.view.inputmethod.CompletionInfo"> </parameter> </parameter> </method> </method> <method name="commitCorrection" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="correctionInfo" type="android.view.inputmethod.CorrectionInfo"> </parameter> </method> <method name="commitText" <method name="commitText" return="boolean" return="boolean" abstract="false" abstract="false" Loading Loading @@ -220152,6 +220165,100 @@ > > </field> </field> </class> </class> <class name="CorrectionInfo" extends="java.lang.Object" abstract="false" static="false" final="true" deprecated="not deprecated" visibility="public" > <implements name="android.os.Parcelable"> </implements> <constructor name="CorrectionInfo" type="android.view.inputmethod.CorrectionInfo" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="offset" type="int"> </parameter> <parameter name="oldText" type="java.lang.CharSequence"> </parameter> <parameter name="newText" type="java.lang.CharSequence"> </parameter> </constructor> <method name="describeContents" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getNewText" return="java.lang.CharSequence" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getOffset" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getOldText" return="java.lang.CharSequence" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="writeToParcel" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="dest" type="android.os.Parcel"> </parameter> <parameter name="flags" type="int"> </parameter> </method> <field name="CREATOR" type="android.os.Parcelable.Creator" transient="false" volatile="false" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> </class> <class name="EditorInfo" <class name="EditorInfo" extends="java.lang.Object" extends="java.lang.Object" abstract="false" abstract="false" Loading Loading @@ -220958,6 +221065,19 @@ <parameter name="text" type="android.view.inputmethod.CompletionInfo"> <parameter name="text" type="android.view.inputmethod.CompletionInfo"> </parameter> </parameter> </method> </method> <method name="commitCorrection" return="boolean" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="correctionInfo" type="android.view.inputmethod.CorrectionInfo"> </parameter> </method> <method name="commitText" <method name="commitText" return="boolean" return="boolean" abstract="true" abstract="true" Loading Loading @@ -221275,6 +221395,19 @@ <parameter name="text" type="android.view.inputmethod.CompletionInfo"> <parameter name="text" type="android.view.inputmethod.CompletionInfo"> </parameter> </parameter> </method> </method> <method name="commitCorrection" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="correctionInfo" type="android.view.inputmethod.CorrectionInfo"> </parameter> </method> <method name="commitText" <method name="commitText" return="boolean" return="boolean" abstract="false" abstract="false" Loading Loading @@ -247819,6 +247952,19 @@ <parameter name="text" type="android.view.inputmethod.CompletionInfo"> <parameter name="text" type="android.view.inputmethod.CompletionInfo"> </parameter> </parameter> </method> </method> <method name="onCommitCorrection" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="info" type="android.view.inputmethod.CorrectionInfo"> </parameter> </method> <method name="onEditorAction" <method name="onEditorAction" return="void" return="void" abstract="false" abstract="false"
core/java/android/view/inputmethod/BaseInputConnection.java +8 −1 Original line number Original line Diff line number Diff line Loading @@ -164,12 +164,19 @@ public class BaseInputConnection implements InputConnection { } } /** /** * Default implementation does nothing. * Default implementation does nothing and returns false. */ */ public boolean commitCompletion(CompletionInfo text) { public boolean commitCompletion(CompletionInfo text) { return false; return false; } } /** * Default implementation does nothing and returns false. */ public boolean commitCorrection(CorrectionInfo correctionInfo) { return false; } /** /** * Default implementation replaces any existing composing text with * Default implementation replaces any existing composing text with * the given text. In addition, only if dummy mode, a key event is * the given text. In addition, only if dummy mode, a key event is Loading
core/java/android/view/inputmethod/CompletionInfo.java +7 −9 Original line number Original line Diff line number Diff line Loading @@ -25,12 +25,10 @@ import android.text.TextUtils; * an input method. * an input method. */ */ public final class CompletionInfo implements Parcelable { public final class CompletionInfo implements Parcelable { static final String TAG = "CompletionInfo"; private final long mId; private final int mPosition; final long mId; private final CharSequence mText; final int mPosition; private final CharSequence mLabel; final CharSequence mText; final CharSequence mLabel; /** /** * Create a simple completion with just text, no label. * Create a simple completion with just text, no label. Loading @@ -52,7 +50,7 @@ public final class CompletionInfo implements Parcelable { mLabel = label; mLabel = label; } } CompletionInfo(Parcel source) { private CompletionInfo(Parcel source) { mId = source.readLong(); mId = source.readLong(); mPosition = source.readInt(); mPosition = source.readInt(); mText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(source); mText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(source); Loading
core/java/android/view/inputmethod/CorrectionInfo.aidl 0 → 100644 +19 −0 Original line number Original line Diff line number Diff line /* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.view.inputmethod; parcelable CorrectionInfo;
core/java/android/view/inputmethod/CorrectionInfo.java 0 → 100644 +105 −0 Original line number Original line Diff line number Diff line /* * Copyright (C) 2007-2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package android.view.inputmethod; import android.os.Parcel; import android.os.Parcelable; import android.text.TextUtils; /** * Information about a single text correction that an editor has reported to * an input method. */ public final class CorrectionInfo implements Parcelable { private final int mOffset; private final CharSequence mOldText; private final CharSequence mNewText; /** * @param offset The offset in the edited text where the old and new text start. * @param oldText The old text that has been replaced. * @param newText The replacement text. */ public CorrectionInfo(int offset, CharSequence oldText, CharSequence newText) { mOffset = offset; mOldText = oldText; mNewText = newText; } private CorrectionInfo(Parcel source) { mOffset = source.readInt(); mOldText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(source); mNewText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(source); } /** * Return the offset position of this correction in the text. Both the {@link #getOldText()} and * {@link #getNewText()} start at this offset. */ public int getOffset() { return mOffset; } /** * Return the text that has actually been typed by the user, and which has been corrected. */ public CharSequence getOldText() { return mOldText; } /** * Return the new text that corrects what was typed by the user. */ public CharSequence getNewText() { return mNewText; } @Override public String toString() { return "CorrectionInfo{#" + mOffset + " \"" + mOldText + "\" -> \"" + mNewText + "\"}"; } /** * Used to package this object into a {@link Parcel}. * * @param dest The {@link Parcel} to be written. * @param flags The flags used for parceling. */ public void writeToParcel(Parcel dest, int flags) { dest.writeInt(mOffset); TextUtils.writeToParcel(mOldText, dest, flags); TextUtils.writeToParcel(mNewText, dest, flags); } /** * Used to make this class parcelable. */ public static final Parcelable.Creator<CorrectionInfo> CREATOR = new Parcelable.Creator<CorrectionInfo>() { public CorrectionInfo createFromParcel(Parcel source) { return new CorrectionInfo(source); } public CorrectionInfo[] newArray(int size) { return new CorrectionInfo[size]; } }; public int describeContents() { return 0; } }