| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.text.style; |
| 18 |
|
| 19 |
import android.compat.annotation.UnsupportedAppUsage; |
| 20 |
import android.os.Parcel; |
| 21 |
import android.text.ParcelableSpan; |
| 22 |
import android.text.TextUtils; |
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
public class SpellCheckSpan implements ParcelableSpan { |
| 32 |
|
| 33 |
private boolean mSpellCheckInProgress; |
| 34 |
|
| 35 |
@UnsupportedAppUsage |
| 36 |
public SpellCheckSpan() { |
| 37 |
mSpellCheckInProgress = false; |
| 38 |
} |
| 39 |
|
| 40 |
@UnsupportedAppUsage |
| 41 |
public SpellCheckSpan(Parcel src) { |
| 42 |
mSpellCheckInProgress = (src.readInt() != 0); |
| 43 |
} |
| 44 |
|
| 45 |
@UnsupportedAppUsage |
| 46 |
public void setSpellCheckInProgress(boolean inProgress) { |
| 47 |
mSpellCheckInProgress = inProgress; |
| 48 |
} |
| 49 |
|
| 50 |
@UnsupportedAppUsage |
| 51 |
public boolean isSpellCheckInProgress() { |
| 52 |
return mSpellCheckInProgress; |
| 53 |
} |
| 54 |
|
| 55 |
@Override |
| 56 |
public int describeContents() { |
| 57 |
return 0; |
| 58 |
} |
| 59 |
|
| 60 |
@Override |
| 61 |
public void writeToParcel(Parcel dest, int flags) { |
| 62 |
writeToParcelInternal(dest, flags); |
| 63 |
} |
| 64 |
|
| 65 |
|
| 66 |
public void writeToParcelInternal(Parcel dest, int flags) { |
| 67 |
dest.writeInt(mSpellCheckInProgress ? 1 : 0); |
| 68 |
} |
| 69 |
|
| 70 |
@Override |
| 71 |
public int getSpanTypeId() { |
| 72 |
return getSpanTypeIdInternal(); |
| 73 |
} |
| 74 |
|
| 75 |
|
| 76 |
public int getSpanTypeIdInternal() { |
| 77 |
return TextUtils.SPELL_CHECK_SPAN; |
| 78 |
} |
| 79 |
} |